update from main archive 970121
[glibc.git] / sysdeps / unix / sysv / linux / configure
blob20923215ae32939a711fd0a57b40a3f299069ea6
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 <  ( *65536+ 0 *256+ 10) /* .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"
58   libc_cv_rootsbindir="/sbin"
61 # Under Linux the LinuxThreads and crypt add-on should be available.
62 case $add_ons in
63   # Both are available.  Good.
64   *linuxthreads*crypt* | *crypt*linuxthreads*)
65     message=
66     ;;
67   *linuxthreads*)
68     message="\
69 *** WARNING:
70 *** Are you sure you do not want to use the \`crypt' add-on?"
71     ;;
72   *crypt*)
73     message="\
74 *** WARNING:
75 *** Are you sure you do not want to use the \`linuxthread' add-on?"
76     ;;
77   *)
78     message="\
79 *** WARNING: Are you sure you do not want to use the \`linuxthreads'
80 *** and \`crypt' add-ons?"
81     ;;
82 esac
84 if test "$message"; then
85   if test $enable_sanity = yes; then
86     echo "\
87 *** You should not compile the GNU libc without the \`linuxthreads' and
88 *** \`crypt' add-on.  Not using them risks to be incompatible with the
89 *** libraries of other systems.  Consider getting the add-ons and restart
90 *** the configuration.
91 *** If you really mean to avoid those add-ons run configure again, now
92 *** using the extra parameter \`--disable-sanity-checks'."
93     exit 1
94   else
95     echo "$message"
96   fi
99 # Check whether `ldconfig' sources are available.  This will go away as soon
100 # as ldconfig is available in GNU libc.
101 if test -f $srcdir/elf/ldconfig.c; then
102   has_ldconfig=yes