]> git.ipfire.org Git - thirdparty/glibc.git/blame - sysdeps/unix/sysv/linux/configure
ldbl-opt: Reuse argp tests that print long double
[thirdparty/glibc.git] / sysdeps / unix / sysv / linux / configure
CommitLineData
cb8a6dbd 1# This file is generated from configure.ac by Autoconf. DO NOT EDIT!
f65fd747
UD
2 # Local configure fragment for sysdeps/unix/sysv/linux.
3
14a44a69 4if test -n "$sysheaders"; then
c1ed883f
GK
5 OLD_CPPFLAGS=$CPPFLAGS
6 CPPFLAGS="$CPPFLAGS $SYSINCLUDES"
14a44a69 7fi
46086bc8 8
e9433893 9{ $as_echo "$as_me:${as_lineno-$LINENO}: checking installed Linux kernel header files" >&5
7967983f 10$as_echo_n "checking installed Linux kernel header files... " >&6; }
5b4ecd3f 11if ${libc_cv_linux320+:} false; then :
7967983f 12 $as_echo_n "(cached) " >&6
f65fd747 13else
e9433893 14 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
fc32835a 15/* end confdefs.h. */
f65fd747 16#include <linux/version.h>
5b4ecd3f 17#if !defined LINUX_VERSION_CODE || LINUX_VERSION_CODE < (3 *65536+ 2 *256+ 0) /* 3.2.0 */
c1f5acd4 18# error kernel headers missing or too old
f65fd747 19#endif
c1f5acd4
RM
20int
21main ()
22{
23
24 ;
25 return 0;
26}
8dd8681f 27_ACEOF
c1f5acd4 28if ac_fn_c_try_compile "$LINENO"; then :
5b4ecd3f 29 libc_cv_linux320='3.2.0 or later'
c1f5acd4 30else
5b4ecd3f 31 libc_cv_linux320='missing or too old!'
564210fe 32fi
c1f5acd4 33rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
564210fe 34fi
5b4ecd3f
JM
35{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_linux320" >&5
36$as_echo "$libc_cv_linux320" >&6; }
37if test "$libc_cv_linux320" != '3.2.0 or later'; then
e9433893 38 as_fn_error $? "GNU libc requires kernel header files from
5b4ecd3f 39Linux 3.2.0 or later to be installed before configuring.
8dd8681f
UD
40The kernel header files are found usually in /usr/include/asm and
41/usr/include/linux; make sure these directories use files from
5b4ecd3f 42Linux 3.2.0 or later. This check uses <linux/version.h>, so
8dd8681f
UD
43make sure that file was built correctly when installing the kernel header
44files. To use kernel headers not from /usr/include/linux, use the
e9433893 45configure option --with-headers." "$LINENO" 5
14a44a69 46fi
958f238f
UD
47
48# If the user gave a minimal version number test whether the available
003a02c6 49# kernel headers are young enough. Additionally we have minimal
ffbbbee1
RM
50# kernel versions for some architectures. If a previous configure fragment
51# set arch_minimum_kernel already, let that override our defaults here.
52# Note that we presume such a fragment has set libc_cv_gcc_unwind_find_fde
53# if appropriate too.
5b4ecd3f 54test -n "$arch_minimum_kernel" || arch_minimum_kernel=3.2.0
003a02c6 55if test -n "$minimum_kernel"; then
8dd8681f 56
48d0c5d8
UD
57 user_version=$((`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1 \* 65536 + \2 \* 256 + \3/'`))
58 arch_version=$((`echo "$arch_minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1 \* 65536 + \2 \* 256 + \3/'`))
8dd8681f 59
48d0c5d8 60 if test $user_version -lt $arch_version; then
e9433893 61 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: minimum kernel version reset to $arch_minimum_kernel" >&5
7967983f 62$as_echo "$as_me: WARNING: minimum kernel version reset to $arch_minimum_kernel" >&2;}
003a02c6
UD
63 minimum_kernel=$arch_minimum_kernel
64 fi
65else
37f1abd4 66 minimum_kernel=$arch_minimum_kernel
003a02c6
UD
67fi
68
37f1abd4 69{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kernel header at least $minimum_kernel" >&5
7967983f 70$as_echo_n "checking for kernel header at least $minimum_kernel... " >&6; }
37f1abd4
JM
71decnum=`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/(\1 * 65536 + \2 * 256 + \3)/'`;
72abinum=`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1,\2,\3/'`;
73cat confdefs.h - <<_ACEOF >conftest.$ac_ext
fc32835a 74/* end confdefs.h. */
958f238f 75#include <linux/version.h>
958f238f 76#if LINUX_VERSION_CODE < $decnum
c1f5acd4 77# error kernel headers too old
958f238f 78#endif
c1f5acd4
RM
79int
80main ()
81{
82
83 ;
84 return 0;
85}
8dd8681f 86_ACEOF
c1f5acd4 87if ac_fn_c_try_compile "$LINENO"; then :
0ea554bf 88 libc_minimum_kernel=ok
c1f5acd4
RM
89else
90 libc_minimum_kernel='too old!'
0ea554bf 91fi
c1f5acd4 92rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
37f1abd4 93{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_minimum_kernel" >&5
7967983f 94$as_echo "$libc_minimum_kernel" >&6; }
37f1abd4
JM
95if test "$libc_minimum_kernel" = ok; then
96 cat >>confdefs.h <<_ACEOF
958f238f 97#define __LINUX_KERNEL_VERSION $decnum
8dd8681f 98_ACEOF
a986484f 99
37f1abd4 100 cat >>confdefs.h <<_ACEOF
a986484f 101#define __ABI_TAG_VERSION $abinum
8dd8681f 102_ACEOF
958f238f 103
37f1abd4
JM
104else
105 as_fn_error $? "*** The available kernel headers are older than the requested
e9433893 106*** compatible kernel version" "$LINENO" 5
958f238f
UD
107fi
108
14a44a69 109if test -n "$sysheaders"; then
c1ed883f 110 CPPFLAGS=$OLD_CPPFLAGS
564210fe 111fi
c6645251 112
43ac1905
AJ
113if test "$prefix" = "/usr/local" -o "$prefix" = "/usr/local/" -o "$prefix" = "NONE"; then
114 if test $enable_sanity = yes; then
115 echo "\
116*** On GNU/Linux systems the GNU C Library should not be installed into
117*** /usr/local since this might make your system totally unusable.
118*** We strongly advise to use a different prefix. For details read the FAQ.
79c38d7f 119*** If you really mean to do this, run configure again using the extra
43ac1905
AJ
120*** parameter \`--disable-sanity-checks'."
121 exit 1
122 else
123 echo "\
124*** WARNING: Do you really want to install the GNU C Library into /usr/local?
125*** This might make your system totally unusable, for details read the FAQ."
126 fi
127fi
128
129
b43b13ac
UD
130# One Linux we use ldconfig.
131use_ldconfig=yes
cb343854 132
eeabe877
UD
133if test $host = $build; then
134 # If $prefix/include/{net,scsi} are symlinks, make install will
135 # clobber what they're linked to (probably a kernel tree).
136 # test -L ought to work on all Linux boxes.
137 if test "x$prefix" != xNONE; then
138 ac_prefix=$prefix
139 else
140 ac_prefix=$ac_default_prefix
141 fi
e9433893 142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlinks in ${ac_prefix}/include" >&5
7967983f 143$as_echo_n "checking for symlinks in ${ac_prefix}/include... " >&6; }
fcb7e0a5 144 ac_message=
eeabe877 145 if test -L ${ac_prefix}/include/net; then
fcb7e0a5
UD
146 ac_message="$ac_message
147 ${ac_prefix}/include/net is a symlink"
eeabe877
UD
148 fi
149 if test -L ${ac_prefix}/include/scsi; then
fcb7e0a5 150 ac_message="$ac_message
eeabe877
UD
151 ${ac_prefix}/include/scsi is a symlink"
152 fi
fcb7e0a5 153 if test -n "$ac_message"; then
e9433893 154 as_fn_error $? "$ac_message
8dd8681f
UD
155\`make install' will destroy the target of the link(s).
156Delete the links and re-run configure, or better still, move the entire
e9433893 157${ac_prefix}/include directory out of the way." "$LINENO" 5
eeabe877 158 else
e9433893 159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
7967983f 160$as_echo "ok" >&6; }
eeabe877 161 fi
0fea0021 162fi
ce6e047f
UD
163
164# We have inlined syscalls.
e9433893 165$as_echo "#define HAVE_INLINED_SYSCALLS 1" >>confdefs.h
ce6e047f 166