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