1 # This file is generated from configure.in by Autoconf. DO NOT EDIT!
2 # Local configure fragment for sysdeps/unix/sysv/linux.
4 # The Linux kernel headers can be found in
5 # /lib/modules/$(uname -r)/build/include
6 # Check whether this directory is available.
7 if test -z "$sysheaders" &&
8 test "x$cross_compiling" = xno &&
9 test -d /lib/modules/`uname -r`/build/include; then
10 sysheaders="/lib/modules/`uname -r`/build/include"
11 ccheaders=`$CC -print-file-name=include`
12 SYSINCLUDES="-I $sysheaders"
15 # Don't bother trying to generate any glue code to be compatible with the
16 # existing system library, because we are the only system library.
19 if test -n "$sysheaders"; then
20 OLD_CPPFLAGS=$CPPFLAGS
21 CPPFLAGS="$CPPFLAGS $SYSINCLUDES"
25 echo "$as_me:$LINENO: checking for egrep" >&5
26 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
27 if test "${ac_cv_prog_egrep+set}" = set; then
28 echo $ECHO_N "(cached) $ECHO_C" >&6
30 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
31 then ac_cv_prog_egrep='grep -E'
32 else ac_cv_prog_egrep='egrep'
35 echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
36 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
37 EGREP=$ac_cv_prog_egrep
40 echo "$as_me:$LINENO: checking installed Linux kernel header files" >&5
41 echo $ECHO_N "checking installed Linux kernel header files... $ECHO_C" >&6
42 if test "${libc_cv_linux2010+set}" = set; then
43 echo $ECHO_N "(cached) $ECHO_C" >&6
45 cat >conftest.$ac_ext <<_ACEOF
48 cat confdefs.h >>conftest.$ac_ext
49 cat >>conftest.$ac_ext <<_ACEOF
51 #include <linux/version.h>
52 #if !defined LINUX_VERSION_CODE || LINUX_VERSION_CODE < (2 *65536+ 0 *256+ 10) /* 2.0.10 */
56 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
57 $EGREP "eat flaming death" >/dev/null 2>&1; then
58 libc_cv_linux2010='TOO OLD!'
60 libc_cv_linux2010='2.0.10 or later'
65 echo "$as_me:$LINENO: result: $libc_cv_linux2010" >&5
66 echo "${ECHO_T}$libc_cv_linux2010" >&6
67 if test "$libc_cv_linux2010" != '2.0.10 or later'; then
68 { { echo "$as_me:$LINENO: error: GNU libc requires kernel header files from
69 Linux 2.0.10 or later to be installed before configuring.
70 The kernel header files are found usually in /usr/include/asm and
71 /usr/include/linux; make sure these directories use files from
72 Linux 2.0.10 or later. This check uses <linux/version.h>, so
73 make sure that file was built correctly when installing the kernel header
74 files. To use kernel headers not from /usr/include/linux, use the
75 configure option --with-headers." >&5
76 echo "$as_me: error: GNU libc requires kernel header files from
77 Linux 2.0.10 or later to be installed before configuring.
78 The kernel header files are found usually in /usr/include/asm and
79 /usr/include/linux; make sure these directories use files from
80 Linux 2.0.10 or later. This check uses <linux/version.h>, so
81 make sure that file was built correctly when installing the kernel header
82 files. To use kernel headers not from /usr/include/linux, use the
83 configure option --with-headers." >&2;}
84 { (exit 1); exit 1; }; }
87 # If the user gave a minimal version number test whether the available
88 # kernel headers are young enough. Additionally we have minimal
89 # kernel versions for some architectures. If a previous configure fragment
90 # set arch_minimum_kernel already, let that override our defaults here.
91 # Note that we presume such a fragment has set libc_cv_gcc_unwind_find_fde
93 test -n "$arch_minimum_kernel" ||
96 arch_minimum_kernel=2.1.100
97 libc_cv_gcc_unwind_find_fde=yes
100 arch_minimum_kernel=2.0.10
101 libc_cv_gcc_unwind_find_fde=yes
104 libc_cv_gcc_unwind_find_fde=yes
105 arch_minimum_kernel=2.0.10
108 arch_minimum_kernel=2.4.0
111 libc_cv_gcc_unwind_find_fde=yes
112 arch_minimum_kernel=2.4.19
115 arch_minimum_kernel=2.0.10
116 libc_cv_gcc_unwind_find_fde=yes
119 arch_minimum_kernel=2.4.0
120 libc_cv_gcc_unwind_find_fde=yes
123 libc_cv_gcc_unwind_find_fde=yes
124 arch_minimum_kernel=2.0.10
127 arch_minimum_kernel=2.4.19
130 libc_cv_gcc_unwind_find_fde=yes
131 arch_minimum_kernel=2.2.10
134 libc_cv_gcc_unwind_find_fde=yes
135 arch_minimum_kernel=2.4.0
138 arch_minimum_kernel=2.3.99
139 libc_cv_gcc_unwind_find_fde=yes
142 libc_cv_gcc_unwind_find_fde=yes
143 arch_minimum_kernel=2.4.21
146 libc_cv_gcc_unwind_find_fde=yes
147 arch_minimum_kernel=2.0.10
150 arch_minimum_kernel=2.4.0
153 arch_minimum_kernel=2.0.10
156 if test -n "$minimum_kernel"; then
158 user_version=$((`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1 \* 65536 + \2 \* 256 + \3/'`))
159 arch_version=$((`echo "$arch_minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1 \* 65536 + \2 \* 256 + \3/'`))
161 if test $user_version -lt $arch_version; then
162 { echo "$as_me:$LINENO: WARNING: minimum kernel version reset to $arch_minimum_kernel" >&5
163 echo "$as_me: WARNING: minimum kernel version reset to $arch_minimum_kernel" >&2;}
164 minimum_kernel=$arch_minimum_kernel
167 if test $arch_minimum_kernel != '2.0.10'; then
168 minimum_kernel=$arch_minimum_kernel
172 if test -n "$minimum_kernel"; then
173 echo "$as_me:$LINENO: checking for kernel header at least $minimum_kernel" >&5
174 echo $ECHO_N "checking for kernel header at least $minimum_kernel... $ECHO_C" >&6
175 decnum=`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/(\1 * 65536 + \2 * 256 + \3)/'`;
176 abinum=`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1,\2,\3/'`;
177 cat >conftest.$ac_ext <<_ACEOF
180 cat confdefs.h >>conftest.$ac_ext
181 cat >>conftest.$ac_ext <<_ACEOF
182 /* end confdefs.h. */
183 #include <linux/version.h>
184 #if LINUX_VERSION_CODE < $decnum
188 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
189 $EGREP "eat flaming death" >/dev/null 2>&1; then
190 libc_minimum_kernel='too old!'
192 libc_minimum_kernel=ok
196 echo "$as_me:$LINENO: result: $libc_minimum_kernel" >&5
197 echo "${ECHO_T}$libc_minimum_kernel" >&6
198 if test "$libc_minimum_kernel" = ok; then
199 cat >>confdefs.h <<_ACEOF
200 #define __LINUX_KERNEL_VERSION $decnum
203 cat >>confdefs.h <<_ACEOF
204 #define __ABI_TAG_VERSION $abinum
208 { { echo "$as_me:$LINENO: error: *** The available kernel headers are older than the requested
209 *** compatible kernel version" >&5
210 echo "$as_me: error: *** The available kernel headers are older than the requested
211 *** compatible kernel version" >&2;}
212 { (exit 1); exit 1; }; }
216 # The result of the above test for the use of the FDE code is invalid if
217 # the user overrides the decision about the minimum ABI.
218 if test "$oldest_abi" != default && test "2.2.4" \< "$oldest_abi"; then
219 libc_cv_gcc_unwind_find_fde=no
222 if test -n "$sysheaders"; then
223 CPPFLAGS=$OLD_CPPFLAGS
225 # The Linux filesystem standard prescribes where to place "essential"
226 # files. I.e., when the installation prefix is "/usr" we have to place
227 # shared library objects and the configuration files on the root partition
231 # 64-bit libraries on bi-arch platforms go in /lib64 instead of /lib
233 sparc/sparc64 | x86_64 | powerpc/powerpc64 | s390/s390-64 | \
235 libc_cv_slibdir="/lib64"
236 if test "$libdir" = '${exec_prefix}/lib'; then
237 libdir='${exec_prefix}/lib64';
238 # Locale data can be shared between 32bit and 64bit libraries
239 libc_cv_localedir='${exec_prefix}/lib/locale'
243 libc_cv_slibdir="/lib32"
244 if test "$libdir" = '${exec_prefix}/lib'; then
245 libdir='${exec_prefix}/lib32';
246 # Locale data can be shared between 32bit and 64bit libraries
247 libc_cv_localedir='${exec_prefix}/lib/locale'
251 libc_cv_slibdir="/lib"
254 # Allow the user to override the path with --sysconfdir
255 if test $sysconfdir = '${prefix}/etc'; then
256 libc_cv_sysconfdir=/etc
258 libc_cv_sysconfdir=$sysconfdir
260 libc_cv_rootsbindir="/sbin"
264 # Under Linux the NPTL add-on should be available.
266 # It is available. Good.
275 if test "$nptl_missing"; then
276 if test $enable_sanity = yes; then
278 *** On GNU/Linux systems it is normal to compile GNU libc with the
279 *** \`nptl' add-on. Without that, the library will be
280 *** incompatible with normal GNU/Linux systems.
281 *** If you really mean to not use this add-on, run configure again
282 *** using the extra parameter \`--disable-sanity-checks'."
286 *** WARNING: Are you sure you do not want to use the \`nptl'
291 if test "$prefix" = "/usr/local" -o "$prefix" = "/usr/local/" -o "$prefix" = "NONE"; then
292 if test $enable_sanity = yes; then
294 *** On GNU/Linux systems the GNU C Library should not be installed into
295 *** /usr/local since this might make your system totally unusable.
296 *** We strongly advise to use a different prefix. For details read the FAQ.
297 *** If you really mean to do this, run configure again using the extra
298 *** parameter \`--disable-sanity-checks'."
302 *** WARNING: Do you really want to install the GNU C Library into /usr/local?
303 *** This might make your system totally unusable, for details read the FAQ."
308 # One Linux we use ldconfig.
311 # We need some extensions to the `ldd' script.
315 ldd_rewrite_script=../sysdeps/unix/sysv/linux/ldd-rewrite.sed
318 ldd_rewrite_script=../sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed
321 ldd_rewrite_script=../sysdeps/unix/sysv/linux/mips/mips64/ldd-rewrite.sed
324 ldd_rewrite_script=../sysdeps/unix/sysv/linux/s390/ldd-rewrite.sed
327 ldd_rewrite_script=../sysdeps/unix/sysv/linux/sparc/ldd-rewrite.sed
330 ldd_rewrite_script=../sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed
333 ldd_rewrite_script=../sysdeps/unix/sysv/linux/powerpc/ldd-rewrite.sed
340 if test $host = $build; then
341 # If $prefix/include/{net,scsi} are symlinks, make install will
342 # clobber what they're linked to (probably a kernel tree).
343 # test -L ought to work on all Linux boxes.
344 if test "x$prefix" != xNONE; then
347 ac_prefix=$ac_default_prefix
349 echo "$as_me:$LINENO: checking for symlinks in ${ac_prefix}/include" >&5
350 echo $ECHO_N "checking for symlinks in ${ac_prefix}/include... $ECHO_C" >&6
352 if test -L ${ac_prefix}/include/net; then
353 ac_message="$ac_message
354 ${ac_prefix}/include/net is a symlink"
356 if test -L ${ac_prefix}/include/scsi; then
357 ac_message="$ac_message
358 ${ac_prefix}/include/scsi is a symlink"
360 if test -n "$ac_message"; then
361 { { echo "$as_me:$LINENO: error: $ac_message
362 \`make install' will destroy the target of the link(s).
363 Delete the links and re-run configure, or better still, move the entire
364 ${ac_prefix}/include directory out of the way." >&5
365 echo "$as_me: error: $ac_message
366 \`make install' will destroy the target of the link(s).
367 Delete the links and re-run configure, or better still, move the entire
368 ${ac_prefix}/include directory out of the way." >&2;}
369 { (exit 1); exit 1; }; }
371 echo "$as_me:$LINENO: result: ok" >&5
372 echo "${ECHO_T}ok" >&6
376 # We have inlined syscalls.
377 cat >>confdefs.h <<\_ACEOF
378 #define HAVE_INLINED_SYSCALLS 1