]>
Commit | Line | Data |
---|---|---|
f65fd747 UD |
1 | # Local configure fragment for sysdeps/unix/sysv/linux. |
2 | ||
3 | # On Linux, the default is to use libio instead of stdio. | |
4 | test $stdio = default && stdio=libio | |
5 | ||
f65fd747 UD |
6 | # Don't bother trying to generate any glue code to be compatible with the |
7 | # existing system library, because we are the only system library. | |
8 | inhibit_glue=yes | |
9 | ||
10 | echo $ac_n "checking installed Linux kernel header files""... $ac_c" 1>&6 | |
33a934a3 | 11 | echo "configure:12: checking installed Linux kernel header files" >&5 |
f65fd747 UD |
12 | if eval "test \"`echo '$''{'libc_cv_linux2010'+set}'`\" = set"; then |
13 | echo $ac_n "(cached) $ac_c" 1>&6 | |
14 | else | |
15 | cat > conftest.$ac_ext <<EOF | |
33a934a3 | 16 | #line 17 "configure" |
f65fd747 UD |
17 | #include "confdefs.h" |
18 | #include <linux/version.h> | |
19 | int main() { | |
8d57beea | 20 | #if LINUX_VERSION_CODE < (2 *65536+ 0 *256+ 10) /* 2.0.10 */ |
f65fd747 UD |
21 | eat flaming death |
22 | #endif | |
23 | ; return 0; } | |
24 | EOF | |
33a934a3 | 25 | if { (eval echo configure:26: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
564210fe | 26 | rm -rf conftest* |
6b3a2224 | 27 | libc_cv_linux2010='2.0.10 or later' |
564210fe | 28 | else |
f65fd747 UD |
29 | echo "configure: failed program was:" >&5 |
30 | cat conftest.$ac_ext >&5 | |
564210fe | 31 | rm -rf conftest* |
6b3a2224 | 32 | libc_cv_linux2010='TOO OLD!' |
564210fe RM |
33 | fi |
34 | rm -f conftest* | |
564210fe RM |
35 | fi |
36 | ||
f65fd747 | 37 | echo "$ac_t""$libc_cv_linux2010" 1>&6 |
6b3a2224 | 38 | if test "$libc_cv_linux2010" != '2.0.10 or later'; then |
036cc82f | 39 | { echo "configure: error: GNU libc requires kernel header files from |
6b3a2224 | 40 | Linux 2.0.10 or later to be installed before configuring. |
036cc82f RM |
41 | The kernel header files are found usually in /usr/include/asm and |
42 | /usr/include/linux; make sure these directories use files from | |
6b3a2224 | 43 | Linux 2.0.10 or later. This check uses <linux/version.h>, so |
036cc82f RM |
44 | make sure that file was built correctly when installing the kernel header |
45 | files." 1>&2; exit 1; } | |
564210fe | 46 | fi |
84384f5b UD |
47 | |
48 | # The Linux filesystem standard prescribes where to place "essential" | |
49 | # files. I.e., when the installation prefix is "/usr" we have to place | |
6d52618b | 50 | # shared library objects and the configuration files on the root partition |
84384f5b UD |
51 | # in /lib and /etc. |
52 | if test "$prefix" = "/usr"; then | |
53 | libc_cv_slibdir="/lib" | |
54 | libc_cv_sysconfdir="/etc" | |
1ef32c3d | 55 | libc_cv_rootsbindir="/sbin" |
84384f5b | 56 | fi |
c6645251 UD |
57 | |
58 | # Under Linux the LinuxThreads and crypt add-on should be available. | |
59 | case $add_ons in | |
60 | # Both are available. Good. | |
68dbb3a6 | 61 | *linuxthreads*crypt* | *crypt*linuxthreads*) |
a18f587d | 62 | message= |
c6645251 UD |
63 | ;; |
64 | *linuxthreads*) | |
a18f587d | 65 | message="\ |
c6645251 UD |
66 | *** WARNING: |
67 | *** Are you sure you do not want to use the \`crypt' add-on?" | |
68 | ;; | |
68dbb3a6 | 69 | *crypt*) |
a18f587d | 70 | message="\ |
c6645251 | 71 | *** WARNING: |
68dbb3a6 | 72 | *** Are you sure you do not want to use the \`linuxthread' add-on?" |
c6645251 UD |
73 | ;; |
74 | *) | |
a18f587d | 75 | message="\ |
68dbb3a6 | 76 | *** WARNING: Are you sure you do not want to use the \`linuxthreads' |
c6645251 UD |
77 | *** and \`crypt' add-ons?" |
78 | ;; | |
79 | esac | |
a18f587d UD |
80 | |
81 | if test "$message"; then | |
82 | if test $enable_sanity = yes; then | |
83 | echo "\ | |
68dbb3a6 | 84 | *** You should not compile the GNU libc without the \`linuxthreads' and |
a18f587d UD |
85 | *** \`crypt' add-on. Not using them risks to be incompatible with the |
86 | *** libraries of other systems. Consider getting the add-ons and restart | |
87 | *** the configuration. | |
88 | *** If you really mean to avoid those add-ons run configure again, now | |
89 | *** using the extra parameter \`--disable-sanity-checks'." | |
90 | exit 1 | |
91 | else | |
92 | echo "$message" | |
93 | fi | |
94 | fi | |
1ef32c3d UD |
95 | |
96 | # Check whether `ldconfig' sources are available. This will go away as soon | |
97 | # as ldconfig is available in GNU libc. | |
98 | if test -f $srcdir/elf/ldconfig.c; then | |
99 | has_ldconfig=yes | |
100 | fi |