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 grep that handles long lines and -e" >&5
26 echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
27 if test "${ac_cv_path_GREP+set}" = set; then
28 echo $ECHO_N "(cached) $ECHO_C" >&6
30 # Extract the first word of "grep ggrep" to use in msg output
31 if test -z "$GREP"; then
32 set dummy grep ggrep; ac_prog_name=$2
33 if test "${ac_cv_path_GREP+set}" = set; then
34 echo $ECHO_N "(cached) $ECHO_C" >&6
36 ac_path_GREP_found=false
37 # Loop through the user's path and test for each of PROGNAME-LIST
38 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
42 test -z "$as_dir" && as_dir=.
43 for ac_prog in grep ggrep; do
44 for ac_exec_ext in '' $ac_executable_extensions; do
45 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
46 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
47 # Check for GNU ac_path_GREP and select it if it is found.
48 # Check for GNU $ac_path_GREP
49 case `"$ac_path_GREP" --version 2>&1` in
51 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
54 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
57 cat "conftest.in" "conftest.in" >"conftest.tmp"
58 mv "conftest.tmp" "conftest.in"
59 cp "conftest.in" "conftest.nl"
60 echo 'GREP' >> "conftest.nl"
61 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
62 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
63 ac_count=`expr $ac_count + 1`
64 if test $ac_count -gt ${ac_path_GREP_max-0}; then
65 # Best one so far, save it but keep looking for a better one
66 ac_cv_path_GREP="$ac_path_GREP"
67 ac_path_GREP_max=$ac_count
69 # 10*(2^10) chars as input seems more than enough
70 test $ac_count -gt 10 && break
72 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
76 $ac_path_GREP_found && break 3
86 GREP="$ac_cv_path_GREP"
87 if test -z "$GREP"; then
88 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
89 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
90 { (exit 1); exit 1; }; }
99 { echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
100 echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
101 GREP="$ac_cv_path_GREP"
104 { echo "$as_me:$LINENO: checking for egrep" >&5
105 echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
106 if test "${ac_cv_path_EGREP+set}" = set; then
107 echo $ECHO_N "(cached) $ECHO_C" >&6
109 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
110 then ac_cv_path_EGREP="$GREP -E"
112 # Extract the first word of "egrep" to use in msg output
113 if test -z "$EGREP"; then
114 set dummy egrep; ac_prog_name=$2
115 if test "${ac_cv_path_EGREP+set}" = set; then
116 echo $ECHO_N "(cached) $ECHO_C" >&6
118 ac_path_EGREP_found=false
119 # Loop through the user's path and test for each of PROGNAME-LIST
120 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
121 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
124 test -z "$as_dir" && as_dir=.
125 for ac_prog in egrep; do
126 for ac_exec_ext in '' $ac_executable_extensions; do
127 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
128 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
129 # Check for GNU ac_path_EGREP and select it if it is found.
130 # Check for GNU $ac_path_EGREP
131 case `"$ac_path_EGREP" --version 2>&1` in
133 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
136 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
139 cat "conftest.in" "conftest.in" >"conftest.tmp"
140 mv "conftest.tmp" "conftest.in"
141 cp "conftest.in" "conftest.nl"
142 echo 'EGREP' >> "conftest.nl"
143 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
144 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
145 ac_count=`expr $ac_count + 1`
146 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
147 # Best one so far, save it but keep looking for a better one
148 ac_cv_path_EGREP="$ac_path_EGREP"
149 ac_path_EGREP_max=$ac_count
151 # 10*(2^10) chars as input seems more than enough
152 test $ac_count -gt 10 && break
154 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
158 $ac_path_EGREP_found && break 3
168 EGREP="$ac_cv_path_EGREP"
169 if test -z "$EGREP"; then
170 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
171 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
172 { (exit 1); exit 1; }; }
176 ac_cv_path_EGREP=$EGREP
182 { echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
183 echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
184 EGREP="$ac_cv_path_EGREP"
187 { echo "$as_me:$LINENO: checking installed Linux kernel header files" >&5
188 echo $ECHO_N "checking installed Linux kernel header files... $ECHO_C" >&6; }
189 if test "${libc_cv_linux2010+set}" = set; then
190 echo $ECHO_N "(cached) $ECHO_C" >&6
192 cat >conftest.$ac_ext <<_ACEOF
195 cat confdefs.h >>conftest.$ac_ext
196 cat >>conftest.$ac_ext <<_ACEOF
197 /* end confdefs.h. */
198 #include <linux/version.h>
199 #if !defined LINUX_VERSION_CODE || LINUX_VERSION_CODE < (2 *65536+ 0 *256+ 10) /* 2.0.10 */
203 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
204 $EGREP "eat flaming death" >/dev/null 2>&1; then
205 libc_cv_linux2010='TOO OLD!'
207 libc_cv_linux2010='2.0.10 or later'
212 { echo "$as_me:$LINENO: result: $libc_cv_linux2010" >&5
213 echo "${ECHO_T}$libc_cv_linux2010" >&6; }
214 if test "$libc_cv_linux2010" != '2.0.10 or later'; then
215 { { echo "$as_me:$LINENO: error: GNU libc requires kernel header files from
216 Linux 2.0.10 or later to be installed before configuring.
217 The kernel header files are found usually in /usr/include/asm and
218 /usr/include/linux; make sure these directories use files from
219 Linux 2.0.10 or later. This check uses <linux/version.h>, so
220 make sure that file was built correctly when installing the kernel header
221 files. To use kernel headers not from /usr/include/linux, use the
222 configure option --with-headers." >&5
223 echo "$as_me: error: GNU libc requires kernel header files from
224 Linux 2.0.10 or later to be installed before configuring.
225 The kernel header files are found usually in /usr/include/asm and
226 /usr/include/linux; make sure these directories use files from
227 Linux 2.0.10 or later. This check uses <linux/version.h>, so
228 make sure that file was built correctly when installing the kernel header
229 files. To use kernel headers not from /usr/include/linux, use the
230 configure option --with-headers." >&2;}
231 { (exit 1); exit 1; }; }
234 # If the user gave a minimal version number test whether the available
235 # kernel headers are young enough. Additionally we have minimal
236 # kernel versions for some architectures. If a previous configure fragment
237 # set arch_minimum_kernel already, let that override our defaults here.
238 # Note that we presume such a fragment has set libc_cv_gcc_unwind_find_fde
239 # if appropriate too.
240 test -n "$arch_minimum_kernel" ||
243 arch_minimum_kernel=2.1.100
244 libc_cv_gcc_unwind_find_fde=yes
247 arch_minimum_kernel=2.0.10
248 libc_cv_gcc_unwind_find_fde=yes
251 libc_cv_gcc_unwind_find_fde=yes
252 arch_minimum_kernel=2.0.10
255 arch_minimum_kernel=2.4.0
258 libc_cv_gcc_unwind_find_fde=yes
259 arch_minimum_kernel=2.4.19
262 arch_minimum_kernel=2.0.10
263 libc_cv_gcc_unwind_find_fde=yes
266 libc_cv_gcc_unwind_find_fde=yes
267 arch_minimum_kernel=2.0.10
270 arch_minimum_kernel=2.4.21
273 libc_cv_gcc_unwind_find_fde=yes
274 arch_minimum_kernel=2.2.10
277 libc_cv_gcc_unwind_find_fde=yes
278 arch_minimum_kernel=2.4.0
281 arch_minimum_kernel=2.3.99
282 libc_cv_gcc_unwind_find_fde=yes
285 libc_cv_gcc_unwind_find_fde=yes
286 arch_minimum_kernel=2.4.21
289 libc_cv_gcc_unwind_find_fde=yes
290 arch_minimum_kernel=2.0.10
293 arch_minimum_kernel=2.4.0
296 arch_minimum_kernel=2.0.10
299 if test -n "$minimum_kernel"; then
301 user_version=$((`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1 \* 65536 + \2 \* 256 + \3/'`))
302 arch_version=$((`echo "$arch_minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1 \* 65536 + \2 \* 256 + \3/'`))
304 if test $user_version -lt $arch_version; then
305 { echo "$as_me:$LINENO: WARNING: minimum kernel version reset to $arch_minimum_kernel" >&5
306 echo "$as_me: WARNING: minimum kernel version reset to $arch_minimum_kernel" >&2;}
307 minimum_kernel=$arch_minimum_kernel
310 if test $arch_minimum_kernel != '2.0.10'; then
311 minimum_kernel=$arch_minimum_kernel
315 if test -n "$minimum_kernel"; then
316 { echo "$as_me:$LINENO: checking for kernel header at least $minimum_kernel" >&5
317 echo $ECHO_N "checking for kernel header at least $minimum_kernel... $ECHO_C" >&6; }
318 decnum=`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/(\1 * 65536 + \2 * 256 + \3)/'`;
319 abinum=`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1,\2,\3/'`;
320 cat >conftest.$ac_ext <<_ACEOF
323 cat confdefs.h >>conftest.$ac_ext
324 cat >>conftest.$ac_ext <<_ACEOF
325 /* end confdefs.h. */
326 #include <linux/version.h>
327 #if LINUX_VERSION_CODE < $decnum
331 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
332 $EGREP "eat flaming death" >/dev/null 2>&1; then
333 libc_minimum_kernel='too old!'
335 libc_minimum_kernel=ok
339 { echo "$as_me:$LINENO: result: $libc_minimum_kernel" >&5
340 echo "${ECHO_T}$libc_minimum_kernel" >&6; }
341 if test "$libc_minimum_kernel" = ok; then
342 cat >>confdefs.h <<_ACEOF
343 #define __LINUX_KERNEL_VERSION $decnum
346 cat >>confdefs.h <<_ACEOF
347 #define __ABI_TAG_VERSION $abinum
351 { { echo "$as_me:$LINENO: error: *** The available kernel headers are older than the requested
352 *** compatible kernel version" >&5
353 echo "$as_me: error: *** The available kernel headers are older than the requested
354 *** compatible kernel version" >&2;}
355 { (exit 1); exit 1; }; }
359 # The result of the above test for the use of the FDE code is invalid if
360 # the user overrides the decision about the minimum ABI.
361 if test "$oldest_abi" != default && test "2.2.4" \< "$oldest_abi"; then
362 libc_cv_gcc_unwind_find_fde=no
365 if test -n "$sysheaders"; then
366 CPPFLAGS=$OLD_CPPFLAGS
368 # The Linux filesystem standard prescribes where to place "essential"
369 # files. I.e., when the installation prefix is "/usr" we have to place
370 # shared library objects and the configuration files on the root partition
374 # 64-bit libraries on bi-arch platforms go in /lib64 instead of /lib.
375 # Allow earlier configure scripts to handle libc_cv_slibdir, libdir,
376 # and libc_cv_localedir.
377 test -n "$libc_cv_slibdir" || \
379 sparc/sparc64 | x86_64 | powerpc/powerpc64 | s390/s390-64)
380 libc_cv_slibdir="/lib64"
381 if test "$libdir" = '${exec_prefix}/lib'; then
382 libdir='${exec_prefix}/lib64';
383 # Locale data can be shared between 32bit and 64bit libraries
384 libc_cv_localedir='${exec_prefix}/lib/locale'
388 libc_cv_slibdir="/lib"
391 # Allow the user to override the path with --sysconfdir
392 if test $sysconfdir = '${prefix}/etc'; then
393 libc_cv_sysconfdir=/etc
395 libc_cv_sysconfdir=$sysconfdir
397 libc_cv_rootsbindir="/sbin"
401 # Under Linux the NPTL add-on should be available.
403 # It is available. Good.
412 if test "$nptl_missing"; then
413 if test $enable_sanity = yes; then
415 *** On GNU/Linux systems it is normal to compile GNU libc with the
416 *** \`nptl' add-on. Without that, the library will be
417 *** incompatible with normal GNU/Linux systems.
418 *** If you really mean to not use this add-on, run configure again
419 *** using the extra parameter \`--disable-sanity-checks'."
423 *** WARNING: Are you sure you do not want to use the \`nptl'
428 if test "$prefix" = "/usr/local" -o "$prefix" = "/usr/local/" -o "$prefix" = "NONE"; then
429 if test $enable_sanity = yes; then
431 *** On GNU/Linux systems the GNU C Library should not be installed into
432 *** /usr/local since this might make your system totally unusable.
433 *** We strongly advise to use a different prefix. For details read the FAQ.
434 *** If you really mean to do this, run configure again using the extra
435 *** parameter \`--disable-sanity-checks'."
439 *** WARNING: Do you really want to install the GNU C Library into /usr/local?
440 *** This might make your system totally unusable, for details read the FAQ."
445 # One Linux we use ldconfig.
448 # We need some extensions to the `ldd' script.
452 ldd_rewrite_script=../sysdeps/unix/sysv/linux/ldd-rewrite.sed
455 ldd_rewrite_script=../sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed
458 ldd_rewrite_script=../sysdeps/unix/sysv/linux/s390/ldd-rewrite.sed
461 ldd_rewrite_script=../sysdeps/unix/sysv/linux/sparc/ldd-rewrite.sed
464 ldd_rewrite_script=../sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed
467 ldd_rewrite_script=../sysdeps/unix/sysv/linux/powerpc/ldd-rewrite.sed
474 if test $host = $build; then
475 # If $prefix/include/{net,scsi} are symlinks, make install will
476 # clobber what they're linked to (probably a kernel tree).
477 # test -L ought to work on all Linux boxes.
478 if test "x$prefix" != xNONE; then
481 ac_prefix=$ac_default_prefix
483 { echo "$as_me:$LINENO: checking for symlinks in ${ac_prefix}/include" >&5
484 echo $ECHO_N "checking for symlinks in ${ac_prefix}/include... $ECHO_C" >&6; }
486 if test -L ${ac_prefix}/include/net; then
487 ac_message="$ac_message
488 ${ac_prefix}/include/net is a symlink"
490 if test -L ${ac_prefix}/include/scsi; then
491 ac_message="$ac_message
492 ${ac_prefix}/include/scsi is a symlink"
494 if test -n "$ac_message"; then
495 { { echo "$as_me:$LINENO: error: $ac_message
496 \`make install' will destroy the target of the link(s).
497 Delete the links and re-run configure, or better still, move the entire
498 ${ac_prefix}/include directory out of the way." >&5
499 echo "$as_me: error: $ac_message
500 \`make install' will destroy the target of the link(s).
501 Delete the links and re-run configure, or better still, move the entire
502 ${ac_prefix}/include directory out of the way." >&2;}
503 { (exit 1); exit 1; }; }
505 { echo "$as_me:$LINENO: result: ok" >&5
506 echo "${ECHO_T}ok" >&6; }
510 # We have inlined syscalls.
511 cat >>confdefs.h <<\_ACEOF
512 #define HAVE_INLINED_SYSCALLS 1