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.
5 # On Linux, the default is to use libio instead of stdio.
6 test $stdio = default && stdio=libio
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.
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 */])[
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
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
37 if test "$prefix" = "/usr"; then
38 libc_cv_slibdir="/lib"
39 libc_cv_sysconfdir="/etc"
40 libc_cv_rootsbindir="/sbin"
43 # Under Linux the LinuxThreads and crypt add-on should be available.
45 # Both are available. Good.
46 *linuxthreads*crypt* | *crypt*linuxthreads*)
52 *** Are you sure you do not want to use the \`crypt' add-on?"
57 *** Are you sure you do not want to use the \`linuxthread' add-on?"
61 *** WARNING: Are you sure you do not want to use the \`linuxthreads'
62 *** and \`crypt' add-ons?"
66 if test "$message"; then
67 if test $enable_sanity = yes; then
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'."
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
87 # Generate stdio_lim.h
88 default_fopen_max="`${CC-gcc} -E $srcdir/sysdeps/unix/sysv/linux/mk-stdiolim.c | grep DEFAULT_FOPEN_MAX | cut -f2 -d':'`"
89 default_filename_max="`${CC-gcc} -E $srcdir/sysdeps/unix/sysv/linux/mk-stdiolim.c | grep DEFAULT_FILENAME_MAX | cut -f2 -d':'`"
90 # We double check if "default_fopen_max" and "default_filename_max" are
92 if test "x$default_fopen_max" != "xOPEN_MAX" \
93 -a "x$default_filename_max" != "xPATH_MAX"
95 sed -e "s/DEFAULT_FOPEN_MAX/$default_fopen_max/" \
96 -e "s/DEFAULT_FILENAME_MAX/$default_filename_max/" \
97 $srcdir/sysdeps/unix/sysv/linux/stdio_lim.h.in > stdio_lim.h.new
98 if test -r stdio_lim.h.new && cmp -s stdio_lim.h.new stdio_lim.h
100 echo stdio_lim.h unchanged
101 rm -f stdio_lim.h.new
103 mv -f stdio_lim.h.new stdio_lim.h
106 # We remove the old one if we cannot generate the new one during