Updated to fedora-glibc-20050302T1820
[glibc.git] / sysdeps / unix / sysv / linux / mips / configure
blob4d9568f001ea4aa5f99c95be5351a74b52f1b43c
1 # This file is generated from configure.in by Autoconf.  DO NOT EDIT!
2  # Local configure fragment for sysdeps/unix/sysv/linux/mips.
4 case $machine in
5 mips*64*)
6   rm -f asm-unistd.h
7   asm_unistd_h=$sysheaders/asm/unistd.h
8   if test ! -f $asm_unistd_h; then
9     # Try to find asm/unistd.h in compiler header search path.
10     try_asm_unistd_h=`echo '#include <asm/unistd.h>' | $CPP - |
11                         sed -n '/^# 1 "\(\/[^"]*\)".*/{s,,\1,p;q;}'`
12     if test -n "$try_asm_unistd_h" &&
13        test -f "$try_asm_unistd_h"; then
14       asm_unistd_h=$try_asm_unistd_h
15     fi
16   fi
17   if test ! -f "$asm_unistd_h"; then
18     { echo "$as_me:$LINENO: WARNING: *** asm/unistd.h not found, it will not be pre-processed" >&5
19 echo "$as_me: WARNING: *** asm/unistd.h not found, it will not be pre-processed" >&2;}
20     echo '#include <asm/unistd.h>' > asm-unistd.h
21   elif grep __NR_N32_open "$asm_unistd_h" > /dev/null; then
22     # The point of this preprocessing is to turn __NR_<syscall> into
23     # __NR_N64_<syscall>, as well as to define __NR_<syscall> to
24     # __NR_<abi>_<syscall>, if __NR_<abi>_<syscall> is defined
25     # and <abi> is the compiler-enabled ABI.
26     cat "$asm_unistd_h" |
27     sed -e 's,__NR_,__NR_N64_,g' \
28         -e 's,__NR_N64_##,__NR_##,g' \
29         -e 's,__NR_N64_O32_,__NR_O32_,g' \
30         -e 's,__NR_N64_N32_,__NR_N32_,g' \
31         -e 's,__NR_N64_N64_,__NR_N64_,g' \
32     | awk > asm-unistd.h '
33 BEGIN { print "#include <sgidefs.h>"; }
34 /^#define __NR.*unused/ { print; next; }
35 /^#define __NR_N64__exit __NR_N64_exit/ {
36         print "#define __NR__exit __NR_exit";
37         print "#define __NR_O32__exit __NR_O32_exit";
38         print "#define __NR_N32__exit __NR_N32_exit";
39         print; next;
41 /^#define __NR_O32_/ {
42         name = $2;
43         sub (/_O32_/, "_", name);
44         print;
45         print "#if _MIPS_SIM == _ABIO32";
46         print "# define " name " " $2;
47         print "#endif";
48         next;
50 /^#define __NR_N32_/ {
51         name = $2;
52         sub (/_N32_/, "_", name);
53         print;
54         print "#if _MIPS_SIM == _ABIN32";
55         print "# define " name " " $2;
56         print "#endif";
57         next;
59 /^#define __NR_N64_/ {
60         name = $2;
61         sub (/_N64_/, "_", name);
62         print;
63         print "#if _MIPS_SIM == _ABI64";
64         print "# define " name " " $2;
65         print "#endif";
66         next;
69         print;
71   else
72     echo '#include <asm/unistd.h>' > asm-unistd.h
73   fi ;;
74 mips*)
75   rm -f asm-unistd.h
76   echo '#include <asm/unistd.h>' > asm-unistd.h
77   ;;
78 esac