Update.
[glibc.git] / sysdeps / unix / sysv / linux / configure
blob79dbf169120162549c696544d353a531b38c9949
1  # Local configure fragment for sysdeps/unix/sysv/linux.
3 # On Linux, the default is to use libio instead of stdio.
4 test $stdio = default && stdio=libio
6 # Don't bother trying to generate any glue code to be compatible with the
7 # existing system library, because we are the only system library.
8 inhibit_glue=yes
10 echo $ac_n "checking installed Linux kernel header files""... $ac_c" 1>&6
11 echo "configure:12: checking installed Linux kernel header files" >&5
12 if eval "test \"`echo '$''{'libc_cv_linux2010'+set}'`\" = set"; then
13   echo $ac_n "(cached) $ac_c" 1>&6
14 else
15   cat > conftest.$ac_ext <<EOF
16 #line 17 "configure"
17 #include "confdefs.h"
18 #include <linux/version.h>
19 int main() {
20 #if LINUX_VERSION_CODE <  (2 *65536+ 0 *256+ 10) /* 2.0.10 */
21 eat flaming death
22 #endif
23 ; return 0; }
24 EOF
25 if { (eval echo configure:26: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
26   rm -rf conftest*
27   libc_cv_linux2010='2.0.10 or later'
28 else
29   echo "configure: failed program was:" >&5
30   cat conftest.$ac_ext >&5
31   rm -rf conftest*
32   libc_cv_linux2010='TOO OLD!'
34 rm -f conftest*
37 echo "$ac_t""$libc_cv_linux2010" 1>&6
38 if test "$libc_cv_linux2010" != '2.0.10 or later'; then
39   { echo "configure: error: GNU libc requires kernel header files from
40 Linux 2.0.10 or later to be installed before configuring.
41 The kernel header files are found usually in /usr/include/asm and
42 /usr/include/linux; make sure these directories use files from
43 Linux 2.0.10 or later.  This check uses <linux/version.h>, so
44 make sure that file was built correctly when installing the kernel header
45 files." 1>&2; exit 1; }
48 # The Linux filesystem standard prescribes where to place "essential"
49 # files.  I.e., when the installation prefix is "/usr" we have to place
50 # shared library objects and the configuration files on the root partition
51 # in /lib and /etc.
52 if test "$prefix" = "/usr"; then
53   libc_cv_slibdir="/lib"
54   libc_cv_sysconfdir="/etc"
55   libc_cv_rootsbindir="/sbin"
58 # Under Linux the LinuxThreads and crypt add-on should be available.
59 case $add_ons in
60   # Both are available.  Good.
61   *linuxthreads*crypt* | *crypt*linuxthreads*)
62     message=
63     ;;
64   *linuxthreads*)
65     message="\
66 *** WARNING:
67 *** Are you sure you do not want to use the \`crypt' add-on?"
68     ;;
69   *crypt*)
70     message="\
71 *** WARNING:
72 *** Are you sure you do not want to use the \`linuxthread' add-on?"
73     ;;
74   *)
75     message="\
76 *** WARNING: Are you sure you do not want to use the \`linuxthreads'
77 *** and \`crypt' add-ons?"
78     ;;
79 esac
81 if test "$message"; then
82   if test $enable_sanity = yes; then
83     echo "\
84 *** You should not compile the GNU libc without the \`linuxthreads' and
85 *** \`crypt' add-on.  Not using them risks to be incompatible with the
86 *** libraries of other systems.  Consider getting the add-ons and restart
87 *** the configuration.
88 *** If you really mean to avoid those add-ons run configure again, now
89 *** using the extra parameter \`--disable-sanity-checks'."
90     exit 1
91   else
92     echo "$message"
93   fi
96 # Check whether `ldconfig' sources are available.  This will go away as soon
97 # as ldconfig is available in GNU libc.
98 if test -f $srcdir/elf/ldconfig.c; then
99   has_ldconfig=yes