Update from main archive 961219
[glibc.git] / sysdeps / unix / sysv / linux / configure.in
blob4ac65d02faf04a3ba39eb7c9c941d9d0cbf17d2a
1 sinclude(./aclocal.m4)dnl Autoconf lossage
2 GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
3 # Local configure fragment for sysdeps/unix/sysv/linux.
5 # On Linux, the default is to use libio instead of stdio.
6 test $stdio = default && stdio=libio
8 # We also use the new malloc by default.
9 test $malloc = default && malloc=new-malloc
11 # Don't bother trying to generate any glue code to be compatible with the
12 # existing system library, because we are the only system library.
13 inhibit_glue=yes
15 define([LIBC_LINUX_VERSION],[2.0.10])dnl
16 define([libc_cv_linuxVER], [libc_cv_linux]patsubst(LIBC_LINUX_VERSION,[\.]))dnl
17 AC_CACHE_CHECK(installed Linux kernel header files, libc_cv_linuxVER, [dnl
18 AC_TRY_COMPILE([#include <linux/version.h>],
19 [#if LINUX_VERSION_CODE < ]dnl
20 patsubst(LIBC_LINUX_VERSION,[^\([^.]*\)\.\([^.]*\)\.\([^.]*\)$],dnl
21 [ (\1 *65536+ \2 *256+ \3) /* \1.\2.\3 */])[
22 eat flaming death
23 #endif],
24                libc_cv_linuxVER='LIBC_LINUX_VERSION or later',
25                libc_cv_linuxVER='TOO OLD!')])
26 if test "$libc_cv_linuxVER" != 'LIBC_LINUX_VERSION or later'; then
27   AC_MSG_ERROR([GNU libc requires kernel header files from
28 Linux LIBC_LINUX_VERSION or later to be installed before configuring.
29 The kernel header files are found usually in /usr/include/asm and
30 /usr/include/linux; make sure these directories use files from
31 Linux LIBC_LINUX_VERSION or later.  This check uses <linux/version.h>, so
32 make sure that file was built correctly when installing the kernel header
33 files.])
36 # The Linux filesystem standard prescribes where to place "essential"
37 # files.  I.e., when the installation prefix is "/usr" we have to place
38 # shared library objects and the configuration files on the root partition
39 # in /lib and /etc.
40 if test "$prefix" = "/usr"; then
41   libc_cv_slibdir="/lib"
42   libc_cv_sysconfdir="/etc"
45 # Under Linux the LinuxThreads and crypt add-on should be available.
46 case $add_ons in
47   # Both are available.  Good.
48   *linuxthreads*crypt* | *crypt*linuxthreads*)
49     message=
50     ;;
51   *linuxthreads*)
52     message="\
53 *** WARNING:
54 *** Are you sure you do not want to use the \`crypt' add-on?"
55     ;;
56   *crypt*)
57     message="\
58 *** WARNING:
59 *** Are you sure you do not want to use the \`linuxthread' add-on?"
60     ;;
61   *)
62     message="\
63 *** WARNING: Are you sure you do not want to use the \`linuxthreads'
64 *** and \`crypt' add-ons?"
65     ;;
66 esac
68 if test "$message"; then
69   if test $enable_sanity = yes; then
70     echo "\
71 *** You should not compile the GNU libc without the \`linuxthreads' and
72 *** \`crypt' add-on.  Not using them risks to be incompatible with the
73 *** libraries of other systems.  Consider getting the add-ons and restart
74 *** the configuration.
75 *** If you really mean to avoid those add-ons run configure again, now
76 *** using the extra parameter \`--disable-sanity-checks'."
77     exit 1
78   else
79     echo "$message"
80   fi