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