Blame sysdeps/unix/sysv/linux/configure

Packit 6c4009
# This file is generated from configure.ac by Autoconf.  DO NOT EDIT!
Packit 6c4009
 # Local configure fragment for sysdeps/unix/sysv/linux.
Packit 6c4009
Packit 6c4009
if test -n "$sysheaders"; then
Packit 6c4009
  OLD_CPPFLAGS=$CPPFLAGS
Packit 6c4009
  CPPFLAGS="$CPPFLAGS $SYSINCLUDES"
Packit 6c4009
fi
Packit 6c4009
Packit 6c4009
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking installed Linux kernel header files" >&5
Packit 6c4009
$as_echo_n "checking installed Linux kernel header files... " >&6; }
Packit 6c4009
if ${libc_cv_linux320+:} false; then :
Packit 6c4009
  $as_echo_n "(cached) " >&6
Packit 6c4009
else
Packit 6c4009
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Packit 6c4009
/* end confdefs.h.  */
Packit 6c4009
#include <linux/version.h>
Packit 6c4009
#if !defined LINUX_VERSION_CODE || LINUX_VERSION_CODE <  (3 *65536+ 2 *256+ 0) /* 3.2.0 */
Packit 6c4009
# error kernel headers missing or too old
Packit 6c4009
#endif
Packit 6c4009
int
Packit 6c4009
main ()
Packit 6c4009
{
Packit 6c4009
Packit 6c4009
  ;
Packit 6c4009
  return 0;
Packit 6c4009
}
Packit 6c4009
_ACEOF
Packit 6c4009
if ac_fn_c_try_compile "$LINENO"; then :
Packit 6c4009
  libc_cv_linux320='3.2.0 or later'
Packit 6c4009
else
Packit 6c4009
  libc_cv_linux320='missing or too old!'
Packit 6c4009
fi
Packit 6c4009
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Packit 6c4009
fi
Packit 6c4009
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_linux320" >&5
Packit 6c4009
$as_echo "$libc_cv_linux320" >&6; }
Packit 6c4009
if test "$libc_cv_linux320" != '3.2.0 or later'; then
Packit 6c4009
  as_fn_error $? "GNU libc requires kernel header files from
Packit 6c4009
Linux 3.2.0 or later to be installed before configuring.
Packit 6c4009
The kernel header files are found usually in /usr/include/asm and
Packit 6c4009
/usr/include/linux; make sure these directories use files from
Packit 6c4009
Linux 3.2.0 or later.  This check uses <linux/version.h>, so
Packit 6c4009
make sure that file was built correctly when installing the kernel header
Packit 6c4009
files.  To use kernel headers not from /usr/include/linux, use the
Packit 6c4009
configure option --with-headers." "$LINENO" 5
Packit 6c4009
fi
Packit 6c4009
Packit 6c4009
# If the user gave a minimal version number test whether the available
Packit 6c4009
# kernel headers are young enough.  Additionally we have minimal
Packit 6c4009
# kernel versions for some architectures.  If a previous configure fragment
Packit 6c4009
# set arch_minimum_kernel already, let that override our defaults here.
Packit 6c4009
# Note that we presume such a fragment has set libc_cv_gcc_unwind_find_fde
Packit 6c4009
# if appropriate too.
Packit 6c4009
test -n "$arch_minimum_kernel" || arch_minimum_kernel=3.2.0
Packit 6c4009
if test -n "$minimum_kernel"; then
Packit 6c4009
Packit 6c4009
  user_version=$((`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1 \* 65536 + \2 \* 256 + \3/'`))
Packit 6c4009
  arch_version=$((`echo "$arch_minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1 \* 65536 + \2 \* 256 + \3/'`))
Packit 6c4009
Packit 6c4009
  if test $user_version -lt $arch_version; then
Packit 6c4009
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: minimum kernel version reset to $arch_minimum_kernel" >&5
Packit 6c4009
$as_echo "$as_me: WARNING: minimum kernel version reset to $arch_minimum_kernel" >&2;}
Packit 6c4009
    minimum_kernel=$arch_minimum_kernel
Packit 6c4009
  fi
Packit 6c4009
else
Packit 6c4009
  minimum_kernel=$arch_minimum_kernel
Packit 6c4009
fi
Packit 6c4009
Packit 6c4009
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kernel header at least $minimum_kernel" >&5
Packit 6c4009
$as_echo_n "checking for kernel header at least $minimum_kernel... " >&6; }
Packit 6c4009
decnum=`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/(\1 * 65536 + \2 * 256 + \3)/'`;
Packit 6c4009
abinum=`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1,\2,\3/'`;
Packit 6c4009
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Packit 6c4009
/* end confdefs.h.  */
Packit 6c4009
#include <linux/version.h>
Packit 6c4009
#if LINUX_VERSION_CODE < $decnum
Packit 6c4009
# error kernel headers too old
Packit 6c4009
#endif
Packit 6c4009
int
Packit 6c4009
main ()
Packit 6c4009
{
Packit 6c4009
Packit 6c4009
  ;
Packit 6c4009
  return 0;
Packit 6c4009
}
Packit 6c4009
_ACEOF
Packit 6c4009
if ac_fn_c_try_compile "$LINENO"; then :
Packit 6c4009
  libc_minimum_kernel=ok
Packit 6c4009
else
Packit 6c4009
  libc_minimum_kernel='too old!'
Packit 6c4009
fi
Packit 6c4009
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Packit 6c4009
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_minimum_kernel" >&5
Packit 6c4009
$as_echo "$libc_minimum_kernel" >&6; }
Packit 6c4009
if test "$libc_minimum_kernel" = ok; then
Packit 6c4009
  cat >>confdefs.h <<_ACEOF
Packit 6c4009
#define __LINUX_KERNEL_VERSION $decnum
Packit 6c4009
_ACEOF
Packit 6c4009
Packit 6c4009
  cat >>confdefs.h <<_ACEOF
Packit 6c4009
#define __ABI_TAG_VERSION $abinum
Packit 6c4009
_ACEOF
Packit 6c4009
Packit 6c4009
else
Packit 6c4009
  as_fn_error $? "*** The available kernel headers are older than the requested
Packit 6c4009
*** compatible kernel version" "$LINENO" 5
Packit 6c4009
fi
Packit 6c4009
Packit 6c4009
if test -n "$sysheaders"; then
Packit 6c4009
  CPPFLAGS=$OLD_CPPFLAGS
Packit 6c4009
fi
Packit 6c4009
Packit 6c4009
if test "$prefix" = "/usr/local" -o "$prefix" = "/usr/local/" -o "$prefix" = "NONE"; then
Packit 6c4009
  if test $enable_sanity = yes; then
Packit 6c4009
    echo "\
Packit 6c4009
*** On GNU/Linux systems the GNU C Library should not be installed into
Packit 6c4009
*** /usr/local since this might make your system totally unusable.
Packit 6c4009
*** We strongly advise to use a different prefix.  For details read the FAQ.
Packit 6c4009
*** If you really mean to do this, run configure again using the extra
Packit 6c4009
*** parameter \`--disable-sanity-checks'."
Packit 6c4009
    exit 1
Packit 6c4009
  else
Packit 6c4009
    echo "\
Packit 6c4009
*** WARNING: Do you really want to install the GNU C Library into /usr/local?
Packit 6c4009
*** This might make your system totally unusable, for details read the FAQ."
Packit 6c4009
  fi
Packit 6c4009
fi
Packit 6c4009
Packit 6c4009
Packit 6c4009
# One Linux we use ldconfig.
Packit 6c4009
use_ldconfig=yes
Packit 6c4009
Packit 6c4009
if test $host = $build; then
Packit 6c4009
  # If $prefix/include/{net,scsi} are symlinks, make install will
Packit 6c4009
  # clobber what they're linked to (probably a kernel tree).
Packit 6c4009
  # test -L ought to work on all Linux boxes.
Packit 6c4009
  if test "x$prefix" != xNONE; then
Packit 6c4009
    ac_prefix=$prefix
Packit 6c4009
  else
Packit 6c4009
    ac_prefix=$ac_default_prefix
Packit 6c4009
  fi
Packit 6c4009
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlinks in ${ac_prefix}/include" >&5
Packit 6c4009
$as_echo_n "checking for symlinks in ${ac_prefix}/include... " >&6; }
Packit 6c4009
  ac_message=
Packit 6c4009
  if test -L ${ac_prefix}/include/net; then
Packit 6c4009
    ac_message="$ac_message
Packit 6c4009
   ${ac_prefix}/include/net is a symlink"
Packit 6c4009
  fi
Packit 6c4009
  if test -L ${ac_prefix}/include/scsi; then
Packit 6c4009
    ac_message="$ac_message
Packit 6c4009
   ${ac_prefix}/include/scsi is a symlink"
Packit 6c4009
  fi
Packit 6c4009
  if test -n "$ac_message"; then
Packit 6c4009
    as_fn_error $? "$ac_message
Packit 6c4009
\`make install' will destroy the target of the link(s).
Packit 6c4009
Delete the links and re-run configure, or better still, move the entire
Packit 6c4009
${ac_prefix}/include directory out of the way." "$LINENO" 5
Packit 6c4009
  else
Packit 6c4009
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
Packit 6c4009
$as_echo "ok" >&6; }
Packit 6c4009
  fi
Packit 6c4009
fi
Packit 6c4009
Packit 6c4009
# We have inlined syscalls.
Packit 6c4009
$as_echo "#define HAVE_INLINED_SYSCALLS 1" >>confdefs.h
Packit 6c4009