summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-07-28 22:43:25 +0000
committerUlrich Drepper <drepper@redhat.com>2002-07-28 22:43:25 +0000
commit79c38d7f7a5d3b42bf0f7d0afc4ed10ab0f8b275 (patch)
tree12a930dc44123e8c67d7c1585f40fc890386ec79
parent79996eeed13bbb7429f618899318d21762dd3b31 (diff)
downloadglibc-79c38d7f7a5d3b42bf0f7d0afc4ed10ab0f8b275.tar.gz
glibc-79c38d7f7a5d3b42bf0f7d0afc4ed10ab0f8b275.tar.xz
glibc-79c38d7f7a5d3b42bf0f7d0afc4ed10ab0f8b275.zip
Update.
	* sysdeps/unix/sysv/linux/configure.in: Check /lib/modules/`uname
	-r`/build/include for kernel headers.
-rw-r--r--ChangeLog3
-rw-r--r--sysdeps/unix/sysv/linux/configure22
-rw-r--r--sysdeps/unix/sysv/linux/configure.in14
3 files changed, 32 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index f60141271e..72dd90fd5d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2002-07-28  Ulrich Drepper  <drepper@redhat.com>
 
+	* sysdeps/unix/sysv/linux/configure.in: Check /lib/modules/`uname
+	-r`/build/include for kernel headers.
+
 	* po/fi.po: New file.
 
 2002-07-15  Alexandre Oliva  <aoliva@redhat.com>
diff --git a/sysdeps/unix/sysv/linux/configure b/sysdeps/unix/sysv/linux/configure
index 3b30a9ce62..d6dee760e6 100644
--- a/sysdeps/unix/sysv/linux/configure
+++ b/sysdeps/unix/sysv/linux/configure
@@ -1,5 +1,15 @@
  # Local configure fragment for sysdeps/unix/sysv/linux.
 
+# The Linux kernel headers can be found in
+#   /lib/modules/$(uname -r)/build/include
+# Check whether this directory is available.
+if test -z "$sysheaders" &&
+   test -d /lib/modules/`uname -r`/build/include; then
+  sysheaders="/lib/modules/`uname -r`/build/include"
+  ccheaders=`$CC -print-file-name=include`
+      SYSINCLUDES="-I $sysheaders"
+fi
+
 # Don't bother trying to generate any glue code to be compatible with the
 # existing system library, because we are the only system library.
 inhibit_glue=yes
@@ -9,12 +19,12 @@ if test -n "$sysheaders"; then
   CPPFLAGS="$CPPFLAGS $SYSINCLUDES"
 fi
 echo $ac_n "checking installed Linux kernel header files""... $ac_c" 1>&6
-echo "configure:13: checking installed Linux kernel header files" >&5
+echo "configure:23: checking installed Linux kernel header files" >&5
 if eval "test \"`echo '$''{'libc_cv_linux2010'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 18 "configure"
+#line 28 "configure"
 #include "confdefs.h"
 #include <linux/version.h>
 #if !defined LINUX_VERSION_CODE || LINUX_VERSION_CODE <  (2 *65536+ 0 *256+ 10) /* 2.0.10 */
@@ -119,11 +129,11 @@ fi
 
 if test -n "$minimum_kernel"; then
   echo $ac_n "checking for kernel header at least $minimum_kernel""... $ac_c" 1>&6
-echo "configure:123: checking for kernel header at least $minimum_kernel" >&5
+echo "configure:133: checking for kernel header at least $minimum_kernel" >&5
   decnum=`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/(\1 * 65536 + \2 * 256 + \3)/'`;
   abinum=`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1,\2,\3/'`;
   cat > conftest.$ac_ext <<EOF
-#line 127 "configure"
+#line 137 "configure"
 #include "confdefs.h"
 #include <linux/version.h>
 #if LINUX_VERSION_CODE < $decnum
@@ -223,7 +233,7 @@ if test "$prefix" = "/usr/local" -o "$prefix" = "/usr/local/" -o "$prefix" = "NO
 *** On GNU/Linux systems the GNU C Library should not be installed into
 *** /usr/local since this might make your system totally unusable.
 *** We strongly advise to use a different prefix.  For details read the FAQ.
-*** If you really mean to do this, run configure again using the extra 
+*** If you really mean to do this, run configure again using the extra
 *** parameter \`--disable-sanity-checks'."
     exit 1
   else
@@ -270,7 +280,7 @@ if test $host = $build; then
     ac_prefix=$ac_default_prefix
   fi
   echo $ac_n "checking for symlinks in ${ac_prefix}/include""... $ac_c" 1>&6
-echo "configure:274: checking for symlinks in ${ac_prefix}/include" >&5
+echo "configure:284: checking for symlinks in ${ac_prefix}/include" >&5
   ac_message=
   if test -L ${ac_prefix}/include/net; then
     ac_message="$ac_message
diff --git a/sysdeps/unix/sysv/linux/configure.in b/sysdeps/unix/sysv/linux/configure.in
index c5aa4e81cf..1873e4ecf6 100644
--- a/sysdeps/unix/sysv/linux/configure.in
+++ b/sysdeps/unix/sysv/linux/configure.in
@@ -2,6 +2,18 @@ sinclude(./aclocal.m4)dnl Autoconf lossage
 GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
 # Local configure fragment for sysdeps/unix/sysv/linux.
 
+# The Linux kernel headers can be found in
+#   /lib/modules/$(uname -r)/build/include
+# Check whether this directory is available.
+if test -z "$sysheaders" &&
+   test -d /lib/modules/`uname -r`/build/include; then
+  sysheaders="/lib/modules/`uname -r`/build/include"
+  ccheaders=`$CC -print-file-name=include`
+  dnl We don't have to use -nostdinc.  We just want one more directory
+  dnl to be used.
+  SYSINCLUDES="-I $sysheaders"
+fi
+
 # Don't bother trying to generate any glue code to be compatible with the
 # existing system library, because we are the only system library.
 inhibit_glue=yes
@@ -191,7 +203,7 @@ if test "$prefix" = "/usr/local" -o "$prefix" = "/usr/local/" -o "$prefix" = "NO
 *** On GNU/Linux systems the GNU C Library should not be installed into
 *** /usr/local since this might make your system totally unusable.
 *** We strongly advise to use a different prefix.  For details read the FAQ.
-*** If you really mean to do this, run configure again using the extra 
+*** If you really mean to do this, run configure again using the extra
 *** parameter \`--disable-sanity-checks'."
     exit 1
   else