]> git.ipfire.org Git - thirdparty/glibc.git/blame - sysdeps/unix/sysv/linux/configure.in
Update.
[thirdparty/glibc.git] / sysdeps / unix / sysv / linux / configure.in
CommitLineData
564210fe
RM
1sinclude(./aclocal.m4)dnl Autoconf lossage
2GLIBC_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.
6test $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.
10inhibit_glue=yes
11
ce7a5ef4 12define([LIBC_LINUX_VERSION],[2.0.10])dnl
4311b2a6
RM
13define([libc_cv_linuxVER], [libc_cv_linux]patsubst(LIBC_LINUX_VERSION,[\.]))dnl
14AC_CACHE_CHECK(installed Linux kernel header files, libc_cv_linuxVER, [dnl
564210fe 15AC_TRY_COMPILE([#include <linux/version.h>],
4311b2a6
RM
16[#if LINUX_VERSION_CODE < ]dnl
17patsubst(LIBC_LINUX_VERSION,[^\([^.]*\)\.\([^.]*\)\.\([^.]*\)$],dnl
18[ (\1 *65536+ \2 *256+ \3) /* \1.\2.\3 */])[
564210fe
RM
19eat flaming death
20#endif],
4311b2a6
RM
21 libc_cv_linuxVER='LIBC_LINUX_VERSION or later',
22 libc_cv_linuxVER='TOO OLD!')])
23if test "$libc_cv_linuxVER" != 'LIBC_LINUX_VERSION or later'; then
24 AC_MSG_ERROR([GNU libc requires kernel header files from
25Linux LIBC_LINUX_VERSION or later to be installed before configuring.
26The kernel header files are found usually in /usr/include/asm and
27/usr/include/linux; make sure these directories use files from
28Linux LIBC_LINUX_VERSION or later. This check uses <linux/version.h>, so
29make sure that file was built correctly when installing the kernel header
30files.])
564210fe 31fi
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.
37if test "$prefix" = "/usr"; then
38 libc_cv_slibdir="/lib"
39 libc_cv_sysconfdir="/etc"
1ef32c3d 40 libc_cv_rootsbindir="/sbin"
a18f587d
UD
41fi
42
43# Under Linux the LinuxThreads and crypt add-on should be available.
44case $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 ;;
64esac
65
66if 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
79fi
1ef32c3d
UD
80
81# Check whether `ldconfig' sources are available. This will go away as soon
82# as ldconfig is available in GNU libc.
83if test -f $srcdir/elf/ldconfig.c; then
84 has_ldconfig=yes
85fi
cb343854
UD
86
87# We need some extensions to the `ldd' script.
88changequote(,)
89case "$machine" in
90 i[3456]86* | m68k | sparc/sparc32)
91 ldd_rewrite_script=../sysdeps/unix/sysv/linux/ldd-rewrite.sed
92 ;;
93 *)
94 ;;
95esac
96changequote([,])