2 # as_fn_set_status STATUS
3 # -----------------------
4 # Set $? to STATUS, without forking.
12 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
21 # Perform arithmetic evaluation on the ARGs, and store the result in the
22 # global $as_val. Take advantage of shells that can avoid forks. The arguments
23 # must be portable across $(()) and expr.
24 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
32 as_val=`expr "$@" || test $? -eq 1`
36 if expr a : '\(a\)' >/dev/null 2>&1 &&
37 test "X`expr 00001 : '.*\(...\)'`" = X001; then
43 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
49 as_me=`$as_basename -- "$0" ||
50 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
51 X"$0" : 'X\(//\)$' \| \
52 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
54 sed '/^.*\/\([^/][^/]*\)\/*$/{
69 as_lineno_1=$LINENO as_lineno_1a=$LINENO
70 as_lineno_2=$LINENO as_lineno_2a=$LINENO
71 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
72 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
73 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
85 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
89 chmod +x "$as_me.lineno" ||
90 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
92 # Don't try to exec as it changes $[0], causing all sort of problems
93 # (the dirname of $[0] is not the place where we might find the
94 # original and so on. Autoconf is especially sensitive to this).
96 # Exit status is that of the last command.
100 # This file is generated from configure.in by Autoconf. DO NOT EDIT!
101 # Local configure fragment for sysdeps/unix/sysv/linux.
103 # Don't bother trying to generate any glue code to be compatible with the
104 # existing system library, because we are the only system library.
107 if test -n "$sysheaders"; then
108 OLD_CPPFLAGS=$CPPFLAGS
109 CPPFLAGS="$CPPFLAGS $SYSINCLUDES"
113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
114 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
115 if test "${ac_cv_path_GREP+set}" = set; then :
116 $as_echo_n "(cached) " >&6
118 if test -z "$GREP"; then
119 ac_path_GREP_found=false
120 # Loop through the user's path and test for each of PROGNAME-LIST
121 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
122 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
125 test -z "$as_dir" && as_dir=.
126 for ac_prog in grep ggrep; do
127 for ac_exec_ext in '' $ac_executable_extensions; do
128 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
129 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
130 # Check for GNU ac_path_GREP and select it if it is found.
131 # Check for GNU $ac_path_GREP
132 case `"$ac_path_GREP" --version 2>&1` in
134 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
137 $as_echo_n 0123456789 >"conftest.in"
140 cat "conftest.in" "conftest.in" >"conftest.tmp"
141 mv "conftest.tmp" "conftest.in"
142 cp "conftest.in" "conftest.nl"
143 $as_echo 'GREP' >> "conftest.nl"
144 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
145 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
146 as_fn_arith $ac_count + 1 && ac_count=$as_val
147 if test $ac_count -gt ${ac_path_GREP_max-0}; then
148 # Best one so far, save it but keep looking for a better one
149 ac_cv_path_GREP="$ac_path_GREP"
150 ac_path_GREP_max=$ac_count
152 # 10*(2^10) chars as input seems more than enough
153 test $ac_count -gt 10 && break
155 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
158 $ac_path_GREP_found && break 3
163 if test -z "$ac_cv_path_GREP"; then
164 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
167 ac_cv_path_GREP=$GREP
171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
172 $as_echo "$ac_cv_path_GREP" >&6; }
173 GREP="$ac_cv_path_GREP"
176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
177 $as_echo_n "checking for egrep... " >&6; }
178 if test "${ac_cv_path_EGREP+set}" = set; then :
179 $as_echo_n "(cached) " >&6
181 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
182 then ac_cv_path_EGREP="$GREP -E"
184 if test -z "$EGREP"; then
185 ac_path_EGREP_found=false
186 # Loop through the user's path and test for each of PROGNAME-LIST
187 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
188 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
191 test -z "$as_dir" && as_dir=.
192 for ac_prog in egrep; do
193 for ac_exec_ext in '' $ac_executable_extensions; do
194 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
195 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
196 # Check for GNU ac_path_EGREP and select it if it is found.
197 # Check for GNU $ac_path_EGREP
198 case `"$ac_path_EGREP" --version 2>&1` in
200 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
203 $as_echo_n 0123456789 >"conftest.in"
206 cat "conftest.in" "conftest.in" >"conftest.tmp"
207 mv "conftest.tmp" "conftest.in"
208 cp "conftest.in" "conftest.nl"
209 $as_echo 'EGREP' >> "conftest.nl"
210 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
211 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
212 as_fn_arith $ac_count + 1 && ac_count=$as_val
213 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
214 # Best one so far, save it but keep looking for a better one
215 ac_cv_path_EGREP="$ac_path_EGREP"
216 ac_path_EGREP_max=$ac_count
218 # 10*(2^10) chars as input seems more than enough
219 test $ac_count -gt 10 && break
221 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
224 $ac_path_EGREP_found && break 3
229 if test -z "$ac_cv_path_EGREP"; then
230 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
233 ac_cv_path_EGREP=$EGREP
238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
239 $as_echo "$ac_cv_path_EGREP" >&6; }
240 EGREP="$ac_cv_path_EGREP"
243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking installed Linux kernel header files" >&5
244 $as_echo_n "checking installed Linux kernel header files... " >&6; }
245 if test "${libc_cv_linux2010+set}" = set; then :
246 $as_echo_n "(cached) " >&6
248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
249 /* end confdefs.h. */
250 #include <linux/version.h>
251 #if !defined LINUX_VERSION_CODE || LINUX_VERSION_CODE < (2 *65536+ 0 *256+ 10) /* 2.0.10 */
255 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
256 $EGREP "eat flaming death" >/dev/null 2>&1; then :
257 libc_cv_linux2010='TOO OLD!'
259 libc_cv_linux2010='2.0.10 or later'
264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_linux2010" >&5
265 $as_echo "$libc_cv_linux2010" >&6; }
266 if test "$libc_cv_linux2010" != '2.0.10 or later'; then
267 as_fn_error $? "GNU libc requires kernel header files from
268 Linux 2.0.10 or later to be installed before configuring.
269 The kernel header files are found usually in /usr/include/asm and
270 /usr/include/linux; make sure these directories use files from
271 Linux 2.0.10 or later. This check uses <linux/version.h>, so
272 make sure that file was built correctly when installing the kernel header
273 files. To use kernel headers not from /usr/include/linux, use the
274 configure option --with-headers." "$LINENO" 5
277 # If the user gave a minimal version number test whether the available
278 # kernel headers are young enough. Additionally we have minimal
279 # kernel versions for some architectures. If a previous configure fragment
280 # set arch_minimum_kernel already, let that override our defaults here.
281 # Note that we presume such a fragment has set libc_cv_gcc_unwind_find_fde
282 # if appropriate too.
283 test -n "$arch_minimum_kernel" ||
286 arch_minimum_kernel=2.1.100
287 libc_cv_gcc_unwind_find_fde=yes
290 arch_minimum_kernel=2.0.10
291 libc_cv_gcc_unwind_find_fde=yes
294 libc_cv_gcc_unwind_find_fde=yes
295 arch_minimum_kernel=2.0.10
298 arch_minimum_kernel=2.4.0
301 libc_cv_gcc_unwind_find_fde=yes
302 arch_minimum_kernel=2.4.19
305 arch_minimum_kernel=2.0.10
306 libc_cv_gcc_unwind_find_fde=yes
309 libc_cv_gcc_unwind_find_fde=yes
310 arch_minimum_kernel=2.0.10
313 arch_minimum_kernel=2.4.21
316 libc_cv_gcc_unwind_find_fde=yes
317 arch_minimum_kernel=2.2.10
320 libc_cv_gcc_unwind_find_fde=yes
321 arch_minimum_kernel=2.4.0
324 arch_minimum_kernel=2.3.99
325 libc_cv_gcc_unwind_find_fde=yes
328 libc_cv_gcc_unwind_find_fde=yes
329 arch_minimum_kernel=2.4.21
332 libc_cv_gcc_unwind_find_fde=yes
333 arch_minimum_kernel=2.0.10
336 arch_minimum_kernel=2.4.0
339 arch_minimum_kernel=2.0.10
342 if test -n "$minimum_kernel"; then
344 user_version=$((`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1 \* 65536 + \2 \* 256 + \3/'`))
345 arch_version=$((`echo "$arch_minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1 \* 65536 + \2 \* 256 + \3/'`))
347 if test $user_version -lt $arch_version; then
348 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: minimum kernel version reset to $arch_minimum_kernel" >&5
349 $as_echo "$as_me: WARNING: minimum kernel version reset to $arch_minimum_kernel" >&2;}
350 minimum_kernel=$arch_minimum_kernel
353 if test $arch_minimum_kernel != '2.0.10'; then
354 minimum_kernel=$arch_minimum_kernel
358 if test -n "$minimum_kernel"; then
359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kernel header at least $minimum_kernel" >&5
360 $as_echo_n "checking for kernel header at least $minimum_kernel... " >&6; }
361 decnum=`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/(\1 * 65536 + \2 * 256 + \3)/'`;
362 abinum=`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1,\2,\3/'`;
363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
364 /* end confdefs.h. */
365 #include <linux/version.h>
366 #if LINUX_VERSION_CODE < $decnum
370 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
371 $EGREP "eat flaming death" >/dev/null 2>&1; then :
372 libc_minimum_kernel='too old!'
374 libc_minimum_kernel=ok
378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_minimum_kernel" >&5
379 $as_echo "$libc_minimum_kernel" >&6; }
380 if test "$libc_minimum_kernel" = ok; then
381 cat >>confdefs.h <<_ACEOF
382 #define __LINUX_KERNEL_VERSION $decnum
385 cat >>confdefs.h <<_ACEOF
386 #define __ABI_TAG_VERSION $abinum
390 as_fn_error $? "*** The available kernel headers are older than the requested
391 *** compatible kernel version" "$LINENO" 5
395 # The result of the above test for the use of the FDE code is invalid if
396 # the user overrides the decision about the minimum ABI.
397 if test "$oldest_abi" != default && test "2.2.4" \< "$oldest_abi"; then
398 libc_cv_gcc_unwind_find_fde=no
401 if test -n "$sysheaders"; then
402 CPPFLAGS=$OLD_CPPFLAGS
404 # The Linux filesystem standard prescribes where to place "essential"
405 # files. I.e., when the installation prefix is "/usr" we have to place
406 # shared library objects and the configuration files on the root partition
410 # 64-bit libraries on bi-arch platforms go in /lib64 instead of /lib.
411 # Allow earlier configure scripts to handle libc_cv_slibdir, libdir,
412 # and libc_cv_localedir.
413 test -n "$libc_cv_slibdir" || \
415 sparc/sparc64 | x86_64 | powerpc/powerpc64 | s390/s390-64)
416 libc_cv_slibdir="/lib64"
417 if test "$libdir" = '${exec_prefix}/lib'; then
418 libdir='${exec_prefix}/lib64';
419 # Locale data can be shared between 32bit and 64bit libraries
420 libc_cv_localedir='${exec_prefix}/lib/locale'
424 libc_cv_slibdir="/lib"
427 # Allow the user to override the path with --sysconfdir
428 if test $sysconfdir = '${prefix}/etc'; then
429 libc_cv_sysconfdir=/etc
431 libc_cv_sysconfdir=$sysconfdir
433 libc_cv_rootsbindir="/sbin"
437 # Under Linux the NPTL add-on should be available.
439 # It is available. Good.
448 if test "$nptl_missing"; then
449 if test $enable_sanity = yes; then
451 *** On GNU/Linux systems it is normal to compile GNU libc with the
452 *** \`nptl' add-on. Without that, the library will be
453 *** incompatible with normal GNU/Linux systems.
454 *** If you really mean to not use this add-on, run configure again
455 *** using the extra parameter \`--disable-sanity-checks'."
459 *** WARNING: Are you sure you do not want to use the \`nptl'
464 if test "$prefix" = "/usr/local" -o "$prefix" = "/usr/local/" -o "$prefix" = "NONE"; then
465 if test $enable_sanity = yes; then
467 *** On GNU/Linux systems the GNU C Library should not be installed into
468 *** /usr/local since this might make your system totally unusable.
469 *** We strongly advise to use a different prefix. For details read the FAQ.
470 *** If you really mean to do this, run configure again using the extra
471 *** parameter \`--disable-sanity-checks'."
475 *** WARNING: Do you really want to install the GNU C Library into /usr/local?
476 *** This might make your system totally unusable, for details read the FAQ."
481 # One Linux we use ldconfig.
484 # We need some extensions to the `ldd' script.
488 ldd_rewrite_script=../sysdeps/unix/sysv/linux/ldd-rewrite.sed
491 ldd_rewrite_script=../sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed
494 ldd_rewrite_script=../sysdeps/unix/sysv/linux/s390/ldd-rewrite.sed
497 ldd_rewrite_script=../sysdeps/unix/sysv/linux/sparc/ldd-rewrite.sed
500 ldd_rewrite_script=../sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed
503 ldd_rewrite_script=../sysdeps/unix/sysv/linux/powerpc/ldd-rewrite.sed
510 if test $host = $build; then
511 # If $prefix/include/{net,scsi} are symlinks, make install will
512 # clobber what they're linked to (probably a kernel tree).
513 # test -L ought to work on all Linux boxes.
514 if test "x$prefix" != xNONE; then
517 ac_prefix=$ac_default_prefix
519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlinks in ${ac_prefix}/include" >&5
520 $as_echo_n "checking for symlinks in ${ac_prefix}/include... " >&6; }
522 if test -L ${ac_prefix}/include/net; then
523 ac_message="$ac_message
524 ${ac_prefix}/include/net is a symlink"
526 if test -L ${ac_prefix}/include/scsi; then
527 ac_message="$ac_message
528 ${ac_prefix}/include/scsi is a symlink"
530 if test -n "$ac_message"; then
531 as_fn_error $? "$ac_message
532 \`make install' will destroy the target of the link(s).
533 Delete the links and re-run configure, or better still, move the entire
534 ${ac_prefix}/include directory out of the way." "$LINENO" 5
536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
541 # We have inlined syscalls.
542 $as_echo "#define HAVE_INLINED_SYSCALLS 1" >>confdefs.h