7d87ef5207bdb9ef13818955720b8a9562b8235c
[platform/upstream/linaro-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.3])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