nptl: fix potential merge of __rseq_* relro symbols
[glibc.git] / sysdeps / unix / sysv / linux / configure
blob4d642e953bd28eb9d280588e90225c7f69c5a843
1 # This file is generated from configure.ac by Autoconf.  DO NOT EDIT!
2  # Local configure fragment for sysdeps/unix/sysv/linux.
4 if test -n "$sysheaders"; then
5   OLD_CPPFLAGS=$CPPFLAGS
6   CPPFLAGS="$CPPFLAGS $SYSINCLUDES"
7 fi
10 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking installed Linux kernel header files" >&5
11 printf %s "checking installed Linux kernel header files... " >&6; }
12 if test ${libc_cv_linux320+y}
13 then :
14   printf %s "(cached) " >&6
15 else case e in #(
16   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17 /* end confdefs.h.  */
18 #include <linux/version.h>
19 #if !defined LINUX_VERSION_CODE || LINUX_VERSION_CODE <  (3 *65536+ 2 *256+ 0) /* 3.2.0 */
20 # error kernel headers missing or too old
21 #endif
22 int
23 main (void)
26   ;
27   return 0;
29 _ACEOF
30 if ac_fn_c_try_cpp "$LINENO"
31 then :
32   libc_cv_linux320='3.2.0 or later'
33 else case e in #(
34   e) libc_cv_linux320='missing or too old!' ;;
35 esac
37 rm -f conftest.err conftest.i conftest.$ac_ext ;;
38 esac
40 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_linux320" >&5
41 printf "%s\n" "$libc_cv_linux320" >&6; }
42 if test "$libc_cv_linux320" != '3.2.0 or later'; then
43   as_fn_error $? "GNU libc requires kernel header files from
44 Linux 3.2.0 or later to be installed before configuring.
45 The kernel header files are found usually in /usr/include/asm and
46 /usr/include/linux; make sure these directories use files from
47 Linux 3.2.0 or later.  This check uses <linux/version.h>, so
48 make sure that file was built correctly when installing the kernel header
49 files.  To use kernel headers not from /usr/include/linux, use the
50 configure option --with-headers." "$LINENO" 5
53 # If the user gave a minimal version number test whether the available
54 # kernel headers are young enough.  Additionally we have minimal
55 # kernel versions for some architectures.  If a previous configure fragment
56 # set arch_minimum_kernel already, let that override our defaults here.
57 # Note that we presume such a fragment has set libc_cv_gcc_unwind_find_fde
58 # if appropriate too.
59 test -n "$arch_minimum_kernel" || arch_minimum_kernel=3.2.0
60 if test -n "$minimum_kernel"; then
62   user_version=$((`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1 \* 65536 + \2 \* 256 + \3/'`))
63   arch_version=$((`echo "$arch_minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1 \* 65536 + \2 \* 256 + \3/'`))
65   if test $user_version -lt $arch_version; then
66     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: minimum kernel version reset to $arch_minimum_kernel" >&5
67 printf "%s\n" "$as_me: WARNING: minimum kernel version reset to $arch_minimum_kernel" >&2;}
68     minimum_kernel=$arch_minimum_kernel
69   fi
70 else
71   minimum_kernel=$arch_minimum_kernel
74 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for kernel header at least $minimum_kernel" >&5
75 printf %s "checking for kernel header at least $minimum_kernel... " >&6; }
76 decnum=`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/(\1 * 65536 + \2 * 256 + \3)/'`;
77 abinumstr=`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1.\2.\3/'`;
78 abinum=`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1,\2,\3/'`;
79 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
80 /* end confdefs.h.  */
81 #include <linux/version.h>
82 #if LINUX_VERSION_CODE < $decnum
83 # error kernel headers too old
84 #endif
85 int
86 main (void)
89   ;
90   return 0;
92 _ACEOF
93 if ac_fn_c_try_cpp "$LINENO"
94 then :
95   libc_minimum_kernel=ok
96 else case e in #(
97   e) libc_minimum_kernel='too old!' ;;
98 esac
100 rm -f conftest.err conftest.i conftest.$ac_ext
101 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_minimum_kernel" >&5
102 printf "%s\n" "$libc_minimum_kernel" >&6; }
103 if test "$libc_minimum_kernel" = ok; then
104   printf "%s\n" "#define __LINUX_KERNEL_VERSION $decnum" >>confdefs.h
106   printf "%s\n" "#define __LINUX_KERNEL_VERSION_STR \"$abinumstr\"" >>confdefs.h
108   printf "%s\n" "#define __ABI_TAG_VERSION $abinum" >>confdefs.h
110 else
111   as_fn_error $? "*** The available kernel headers are older than the requested
112 *** compatible kernel version" "$LINENO" 5
115 if test -n "$sysheaders"; then
116   CPPFLAGS=$OLD_CPPFLAGS
119 if test "$prefix" = "/usr/local" -o "$prefix" = "/usr/local/" -o "$prefix" = "NONE"; then
120   if test $enable_sanity = yes; then
121     echo "\
122 *** On GNU/Linux systems the GNU C Library should not be installed into
123 *** /usr/local since this might make your system totally unusable.
124 *** We strongly advise to use a different prefix.  For details read the FAQ.
125 *** If you really mean to do this, run configure again using the extra
126 *** parameter \`--disable-sanity-checks'."
127     exit 1
128   else
129     echo "\
130 *** WARNING: Do you really want to install the GNU C Library into /usr/local?
131 *** This might make your system totally unusable, for details read the FAQ."
132   fi
136 # One Linux we use ldconfig.
137 use_ldconfig=yes
139 if test $host = $build; then
140   # If $prefix/include/{net,scsi} are symlinks, make install will
141   # clobber what they're linked to (probably a kernel tree).
142   # test -L ought to work on all Linux boxes.
143   if test "x$prefix" != xNONE; then
144     ac_prefix=$prefix
145   else
146     ac_prefix=$ac_default_prefix
147   fi
148   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for symlinks in ${ac_prefix}/include" >&5
149 printf %s "checking for symlinks in ${ac_prefix}/include... " >&6; }
150   ac_message=
151   if test -L ${ac_prefix}/include/net; then
152     ac_message="$ac_message
153    ${ac_prefix}/include/net is a symlink"
154   fi
155   if test -L ${ac_prefix}/include/scsi; then
156     ac_message="$ac_message
157    ${ac_prefix}/include/scsi is a symlink"
158   fi
159   if test -n "$ac_message"; then
160     as_fn_error $? "$ac_message
161 'make install' will destroy the target of the link(s).
162 Delete the links and re-run configure, or better still, move the entire
163 ${ac_prefix}/include directory out of the way." "$LINENO" 5
164   else
165     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5
166 printf "%s\n" "ok" >&6; }
167   fi
170 # We have inlined syscalls.
171 printf "%s\n" "#define HAVE_INLINED_SYSCALLS 1" >>confdefs.h