[kaffe] Configure mischeck

Guilhem Lavaux guilhem.lavaux@free.fr
Sat Jul 5 09:59:01 2003


--Boundary-00=_EVwB/IHZLVCAjLu
Content-Type: Text/Plain;
  charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Content-Description: clearsigned data
Content-Disposition: inline

Hi again,

I have noticed that, on new GLIBC systems, configure complains about=20
asm/signal.h, asm/sigcontext.h, linux/netlink.h and linux/rtnetlink.h.=20
Apparently they are there but cannot be compiled because of the GLIBC=20
volontary incompatible includes. I have so written a new macro to detect th=
e=20
presence of __GLIBC__ and only test linux headers if it is not found. This=
=20
removes the complaints of the latest autoconf.

I have attached the new file and the patch to configure.in to this mail.

Guilhem.
--Boundary-00=_EVwB/IHZLVCAjLu
Content-Type: text/x-csrc;
  charset="us-ascii";
  name="check_glibc.m4"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="check_glibc.m4"

# 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])
     ])

])

--Boundary-00=_EVwB/IHZLVCAjLu
Content-Type: text/x-diff;
  charset="us-ascii";
  name="patch_configure"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="patch_configure"

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

--Boundary-00=_EVwB/IHZLVCAjLu--