Hi again,
I have noticed that, on new GLIBC systems, configure complains about
asm/signal.h, asm/sigcontext.h, linux/netlink.h and linux/rtnetlink.h.
Apparently they are there but cannot be compiled because of the GLIBC
volontary incompatible includes. I have so written a new macro to detect the
presence of __GLIBC__ and only test linux headers if it is not found. This
removes the complaints of the latest autoconf.
I have attached the new file and the patch to configure.in to this mail.
Guilhem.
# Check whether we are using the GLIBC includes. It does affect the subsequent
# tests in configure.in
AC_DEFUN(AC_CHECK_GLIBC,
[
AC_CACHE_CHECK(for GLIBC style includes, ac_cv_glibc_includes,
[
AC_TRY_RUN([
#include <features.h>
int main() {
#ifdef __GLIBC__
return 0;
#else
return 1;
#endif
}
], [ac_cv_glibc_includes=yes], [ac_cv_glibc_includes=no])
])
])
Index: configure.in
===================================================================
RCS file: /cvs/kaffe/kaffe/configure.in,v
retrieving revision 1.212
diff -u -3 -p -r1.212 configure.in
--- configure.in 1 Jul 2003 15:56:56 -0000 1.212
+++ configure.in 5 Jul 2003 16:56:46 -0000
@@ -737,10 +737,13 @@ dnl Checks for header files.
dnl -------------------------------------------------------------------------
AC_HEADER_STDC
+AC_CHECK_GLIBC
AC_CHECK_HEADERS([alloca.h])
dnl GNU/Linux sigcontext headers
-AC_CHECK_HEADERS([asm/sigcontext.h])
-AC_CHECK_HEADERS([asm/signal.h])
+if test $ac_cv_glibc_includes = no; then
+ AC_CHECK_HEADERS([asm/sigcontext.h])
+ AC_CHECK_HEADERS([asm/signal.h])
+fi
AC_CHECK_HEADERS([bsd/libc.h])
AC_CHECK_HEADERS([dl.h])
AC_CHECK_HEADERS([dlfcn.h])
@@ -792,8 +795,10 @@ dnl needed for ia64
AC_CHECK_HEADERS([ia64intrin.h])
dnl needed to check for Linux 2.0
-AC_CHECK_HEADERS([linux/netlink.h])
-AC_CHECK_HEADERS([linux/rtnetlink.h])
+if test $ac_cv_glibc_includes = no; then
+ AC_CHECK_HEADERS([linux/netlink.h])
+ AC_CHECK_HEADERS([linux/rtnetlink.h])
+fi
AC_CHECK_HEADERS([netpacket/packet.h])
AC_HEADER_SYS_WAIT