]> git.ipfire.org Git - thirdparty/glibc.git/blob - sysdeps/unix/sysv/linux/configure.in
Update.
[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 # Don't bother trying to generate any glue code to be compatible with the
9 # existing system library, because we are the only system library.
10 inhibit_glue=yes
11
12 define([LIBC_LINUX_VERSION],[2.0.10])dnl
13 define([libc_cv_linuxVER], [libc_cv_linux]patsubst(LIBC_LINUX_VERSION,[\.]))dnl
14 AC_CACHE_CHECK(installed Linux kernel header files, libc_cv_linuxVER, [dnl
15 AC_TRY_COMPILE([#include <linux/version.h>],
16 [#if LINUX_VERSION_CODE < ]dnl
17 patsubst(LIBC_LINUX_VERSION,[^\([^.]*\)\.\([^.]*\)\.\([^.]*\)$],dnl
18 [ (\1 *65536+ \2 *256+ \3) /* \1.\2.\3 */])[
19 eat flaming death
20 #endif],
21 libc_cv_linuxVER='LIBC_LINUX_VERSION or later',
22 libc_cv_linuxVER='TOO OLD!')])
23 if test "$libc_cv_linuxVER" != 'LIBC_LINUX_VERSION or later'; then
24 AC_MSG_ERROR([GNU libc requires kernel header files from
25 Linux LIBC_LINUX_VERSION or later to be installed before configuring.
26 The kernel header files are found usually in /usr/include/asm and
27 /usr/include/linux; make sure these directories use files from
28 Linux LIBC_LINUX_VERSION or later. This check uses <linux/version.h>, so
29 make sure that file was built correctly when installing the kernel header
30 files.])
31 fi
32
33 # The Linux filesystem standard prescribes where to place "essential"
34 # files. I.e., when the installation prefix is "/usr" we have to place
35 # shared library objects and the configuration files on the root partition
36 # in /lib and /etc.
37 if test "$prefix" = "/usr"; then
38 libc_cv_slibdir="/lib"
39 libc_cv_sysconfdir="/etc"
40 libc_cv_rootsbindir="/sbin"
41 fi
42
43 # Under Linux the LinuxThreads and crypt add-on should be available.
44 case $add_ons in
45 # Both are available. Good.
46 *linuxthreads*crypt* | *crypt*linuxthreads*)
47 message=
48 ;;
49 *linuxthreads*)
50 message="\
51 *** WARNING:
52 *** Are you sure you do not want to use the \`crypt' add-on?"
53 ;;
54 *crypt*)
55 message="\
56 *** WARNING:
57 *** Are you sure you do not want to use the \`linuxthread' add-on?"
58 ;;
59 *)
60 message="\
61 *** WARNING: Are you sure you do not want to use the \`linuxthreads'
62 *** and \`crypt' add-ons?"
63 ;;
64 esac
65
66 if test "$message"; then
67 if test $enable_sanity = yes; then
68 echo "\
69 *** You should not compile the GNU libc without the \`linuxthreads' and
70 *** \`crypt' add-on. Not using them risks to be incompatible with the
71 *** libraries of other systems. Consider getting the add-ons and restart
72 *** the configuration.
73 *** If you really mean to avoid those add-ons run configure again, now
74 *** using the extra parameter \`--disable-sanity-checks'."
75 exit 1
76 else
77 echo "$message"
78 fi
79 fi
80
81 # Check whether `ldconfig' sources are available. This will go away as soon
82 # as ldconfig is available in GNU libc.
83 if test -f $srcdir/elf/ldconfig.c; then
84 has_ldconfig=yes
85 fi
86
87 # We need some extensions to the `ldd' script.
88 changequote(,)
89 case "$machine" in
90 i[3456]86* | m68k | sparc/sparc32)
91 ldd_rewrite_script=../sysdeps/unix/sysv/linux/ldd-rewrite.sed
92 ;;
93 *)
94 ;;
95 esac
96 changequote([,])