]> git.ipfire.org Git - thirdparty/glibc.git/blob - sysdeps/unix/sysv/linux/configure.in
update from main archive 970121
[thirdparty/glibc.git] / sysdeps / unix / sysv / linux / configure.in
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.
4
5 # On Linux, the default is to use libio instead of stdio.
6 test $stdio = default && stdio=libio
7
8 # We also use the new malloc by default.
9 test $malloc = default && malloc=new-malloc
10
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
14
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.])
34 fi
35
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"
43 libc_cv_rootsbindir="/sbin"
44 fi
45
46 # Under Linux the LinuxThreads and crypt add-on should be available.
47 case $add_ons in
48 # Both are available. Good.
49 *linuxthreads*crypt* | *crypt*linuxthreads*)
50 message=
51 ;;
52 *linuxthreads*)
53 message="\
54 *** WARNING:
55 *** Are you sure you do not want to use the \`crypt' add-on?"
56 ;;
57 *crypt*)
58 message="\
59 *** WARNING:
60 *** Are you sure you do not want to use the \`linuxthread' add-on?"
61 ;;
62 *)
63 message="\
64 *** WARNING: Are you sure you do not want to use the \`linuxthreads'
65 *** and \`crypt' add-ons?"
66 ;;
67 esac
68
69 if test "$message"; then
70 if test $enable_sanity = yes; then
71 echo "\
72 *** You should not compile the GNU libc without the \`linuxthreads' and
73 *** \`crypt' add-on. Not using them risks to be incompatible with the
74 *** libraries of other systems. Consider getting the add-ons and restart
75 *** the configuration.
76 *** If you really mean to avoid those add-ons run configure again, now
77 *** using the extra parameter \`--disable-sanity-checks'."
78 exit 1
79 else
80 echo "$message"
81 fi
82 fi
83
84 # Check whether `ldconfig' sources are available. This will go away as soon
85 # as ldconfig is available in GNU libc.
86 if test -f $srcdir/elf/ldconfig.c; then
87 has_ldconfig=yes
88 fi