manual: add dup3
[glibc.git] / sysdeps / unix / sysv / linux / configure
blob70f7937333d541a9d3c6ba008601b1f3f083054d
1 # This file is generated from configure.ac by Autoconf.  DO NOT EDIT!
2  # Local configure fragment for sysdeps/unix/sysv/linux.
4 if test -n "$sysheaders"; then
5   OLD_CPPFLAGS=$CPPFLAGS
6   CPPFLAGS="$CPPFLAGS $SYSINCLUDES"
7 fi
10 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking installed Linux kernel header files" >&5
11 printf %s "checking installed Linux kernel header files... " >&6; }
12 if test ${libc_cv_linux320+y}
13 then :
14   printf %s "(cached) " >&6
15 else $as_nop
16   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17 /* end confdefs.h.  */
18 #include <linux/version.h>
19 #if !defined LINUX_VERSION_CODE || LINUX_VERSION_CODE <  (3 *65536+ 2 *256+ 0) /* 3.2.0 */
20 # error kernel headers missing or too old
21 #endif
22 int
23 main (void)
26   ;
27   return 0;
29 _ACEOF
30 if ac_fn_c_try_cpp "$LINENO"
31 then :
32   libc_cv_linux320='3.2.0 or later'
33 else $as_nop
34   libc_cv_linux320='missing or too old!'
36 rm -f conftest.err conftest.i conftest.$ac_ext
38 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_linux320" >&5
39 printf "%s\n" "$libc_cv_linux320" >&6; }
40 if test "$libc_cv_linux320" != '3.2.0 or later'; then
41   as_fn_error $? "GNU libc requires kernel header files from
42 Linux 3.2.0 or later to be installed before configuring.
43 The kernel header files are found usually in /usr/include/asm and
44 /usr/include/linux; make sure these directories use files from
45 Linux 3.2.0 or later.  This check uses <linux/version.h>, so
46 make sure that file was built correctly when installing the kernel header
47 files.  To use kernel headers not from /usr/include/linux, use the
48 configure option --with-headers." "$LINENO" 5
51 # If the user gave a minimal version number test whether the available
52 # kernel headers are young enough.  Additionally we have minimal
53 # kernel versions for some architectures.  If a previous configure fragment
54 # set arch_minimum_kernel already, let that override our defaults here.
55 # Note that we presume such a fragment has set libc_cv_gcc_unwind_find_fde
56 # if appropriate too.
57 test -n "$arch_minimum_kernel" || arch_minimum_kernel=3.2.0
58 if test -n "$minimum_kernel"; then
60   user_version=$((`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1 \* 65536 + \2 \* 256 + \3/'`))
61   arch_version=$((`echo "$arch_minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1 \* 65536 + \2 \* 256 + \3/'`))
63   if test $user_version -lt $arch_version; then
64     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: minimum kernel version reset to $arch_minimum_kernel" >&5
65 printf "%s\n" "$as_me: WARNING: minimum kernel version reset to $arch_minimum_kernel" >&2;}
66     minimum_kernel=$arch_minimum_kernel
67   fi
68 else
69   minimum_kernel=$arch_minimum_kernel
72 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for kernel header at least $minimum_kernel" >&5
73 printf %s "checking for kernel header at least $minimum_kernel... " >&6; }
74 decnum=`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/(\1 * 65536 + \2 * 256 + \3)/'`;
75 abinumstr=`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1.\2.\3/'`;
76 abinum=`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1,\2,\3/'`;
77 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
78 /* end confdefs.h.  */
79 #include <linux/version.h>
80 #if LINUX_VERSION_CODE < $decnum
81 # error kernel headers too old
82 #endif
83 int
84 main (void)
87   ;
88   return 0;
90 _ACEOF
91 if ac_fn_c_try_cpp "$LINENO"
92 then :
93   libc_minimum_kernel=ok
94 else $as_nop
95   libc_minimum_kernel='too old!'
97 rm -f conftest.err conftest.i conftest.$ac_ext
98 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_minimum_kernel" >&5
99 printf "%s\n" "$libc_minimum_kernel" >&6; }
100 if test "$libc_minimum_kernel" = ok; then
101   printf "%s\n" "#define __LINUX_KERNEL_VERSION $decnum" >>confdefs.h
103   printf "%s\n" "#define __LINUX_KERNEL_VERSION_STR \"$abinumstr\"" >>confdefs.h
105   printf "%s\n" "#define __ABI_TAG_VERSION $abinum" >>confdefs.h
107 else
108   as_fn_error $? "*** The available kernel headers are older than the requested
109 *** compatible kernel version" "$LINENO" 5
112 if test -n "$sysheaders"; then
113   CPPFLAGS=$OLD_CPPFLAGS
116 if test "$prefix" = "/usr/local" -o "$prefix" = "/usr/local/" -o "$prefix" = "NONE"; then
117   if test $enable_sanity = yes; then
118     echo "\
119 *** On GNU/Linux systems the GNU C Library should not be installed into
120 *** /usr/local since this might make your system totally unusable.
121 *** We strongly advise to use a different prefix.  For details read the FAQ.
122 *** If you really mean to do this, run configure again using the extra
123 *** parameter \`--disable-sanity-checks'."
124     exit 1
125   else
126     echo "\
127 *** WARNING: Do you really want to install the GNU C Library into /usr/local?
128 *** This might make your system totally unusable, for details read the FAQ."
129   fi
133 # One Linux we use ldconfig.
134 use_ldconfig=yes
136 if test $host = $build; then
137   # If $prefix/include/{net,scsi} are symlinks, make install will
138   # clobber what they're linked to (probably a kernel tree).
139   # test -L ought to work on all Linux boxes.
140   if test "x$prefix" != xNONE; then
141     ac_prefix=$prefix
142   else
143     ac_prefix=$ac_default_prefix
144   fi
145   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for symlinks in ${ac_prefix}/include" >&5
146 printf %s "checking for symlinks in ${ac_prefix}/include... " >&6; }
147   ac_message=
148   if test -L ${ac_prefix}/include/net; then
149     ac_message="$ac_message
150    ${ac_prefix}/include/net is a symlink"
151   fi
152   if test -L ${ac_prefix}/include/scsi; then
153     ac_message="$ac_message
154    ${ac_prefix}/include/scsi is a symlink"
155   fi
156   if test -n "$ac_message"; then
157     as_fn_error $? "$ac_message
158 'make install' will destroy the target of the link(s).
159 Delete the links and re-run configure, or better still, move the entire
160 ${ac_prefix}/include directory out of the way." "$LINENO" 5
161   else
162     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5
163 printf "%s\n" "ok" >&6; }
164   fi
167 # We have inlined syscalls.
168 printf "%s\n" "#define HAVE_INLINED_SYSCALLS 1" >>confdefs.h