configure 5.6 KB

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