]>
Commit | Line | Data |
---|---|---|
564210fe RM |
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 | ||
ce7a5ef4 | 12 | define([LIBC_LINUX_VERSION],[2.0.10])dnl |
4311b2a6 RM |
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 | |
564210fe | 15 | AC_TRY_COMPILE([#include <linux/version.h>], |
4311b2a6 RM |
16 | [#if LINUX_VERSION_CODE < ]dnl |
17 | patsubst(LIBC_LINUX_VERSION,[^\([^.]*\)\.\([^.]*\)\.\([^.]*\)$],dnl | |
18 | [ (\1 *65536+ \2 *256+ \3) /* \1.\2.\3 */])[ | |
564210fe RM |
19 | eat flaming death |
20 | #endif], | |
4311b2a6 RM |
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.]) | |
564210fe | 31 | fi |
a18f587d UD |
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 | |
6d52618b | 35 | # shared library objects and the configuration files on the root partition |
a18f587d UD |
36 | # in /lib and /etc. |
37 | if test "$prefix" = "/usr"; then | |
38 | libc_cv_slibdir="/lib" | |
39 | libc_cv_sysconfdir="/etc" | |
1ef32c3d | 40 | libc_cv_rootsbindir="/sbin" |
a18f587d UD |
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. | |
68dbb3a6 | 46 | *linuxthreads*crypt* | *crypt*linuxthreads*) |
a18f587d UD |
47 | message= |
48 | ;; | |
49 | *linuxthreads*) | |
50 | message="\ | |
51 | *** WARNING: | |
52 | *** Are you sure you do not want to use the \`crypt' add-on?" | |
53 | ;; | |
68dbb3a6 | 54 | *crypt*) |
a18f587d UD |
55 | message="\ |
56 | *** WARNING: | |
68dbb3a6 | 57 | *** Are you sure you do not want to use the \`linuxthread' add-on?" |
a18f587d UD |
58 | ;; |
59 | *) | |
60 | message="\ | |
68dbb3a6 | 61 | *** WARNING: Are you sure you do not want to use the \`linuxthreads' |
a18f587d UD |
62 | *** and \`crypt' add-ons?" |
63 | ;; | |
64 | esac | |
65 | ||
66 | if test "$message"; then | |
67 | if test $enable_sanity = yes; then | |
68 | echo "\ | |
68dbb3a6 | 69 | *** You should not compile the GNU libc without the \`linuxthreads' and |
a18f587d UD |
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 | |
1ef32c3d UD |
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 | |
cb343854 UD |
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([,]) |