[kaffe] CVS kaffe (robilad): Fix for configure error message for net/if.h on HP-UX

Kaffe CVS cvs-commits at kaffe.org
Thu Aug 18 13:26:20 PDT 2005


PatchSet 6838 
Date: 2005/08/18 19:59:58
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
Fix for configure error message for net/if.h on HP-UX

2005-08-18  Dalibor Topic  <robilad at kaffe.org>

        * configure.ac: Use more extensive test for net/if.h, and include
        necessary headers for HP-UX and OS X. Test taken from autoconf manual.

        Reported by:  Riccardo Mottola  <riccardo at kaffe.org>

Members: 
	ChangeLog:1.4362->1.4363 
	configure:1.480->1.481 
	configure.ac:1.162->1.163 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.4362 kaffe/ChangeLog:1.4363
--- kaffe/ChangeLog:1.4362	Thu Aug 18 15:06:58 2005
+++ kaffe/ChangeLog	Thu Aug 18 19:59:58 2005
@@ -1,3 +1,10 @@
+2005-08-18  Dalibor Topic  <robilad at kaffe.org>
+
+	* configure.ac: Use more extensive test for net/if.h, and include
+	necessary headers for HP-UX and OS X. Test taken from autoconf manual.
+
+	Reported by:  Riccardo Mottola  <riccardo at kaffe.org>
+
 2005-08-18  Riccardo Mottola  <riccardo at kaffe.org>
 	* kaffe/kaffe/kaffevm/access.c: proper system header include
 
Index: kaffe/configure
diff -u kaffe/configure:1.480 kaffe/configure:1.481
--- kaffe/configure:1.480	Wed Aug 17 00:17:41 2005
+++ kaffe/configure	Thu Aug 18 20:00:01 2005
@@ -30037,7 +30037,6 @@
 
 
 
-
 for ac_header in stdarg.h \
 alloca.h \
 bsd/libc.h \
@@ -30055,7 +30054,6 @@
 memory.h \
 mips/cachectl.h \
 netdb.h \
-net/if.h \
 netinet/in.h \
 netinet/in_systm.h \
 netinet/tcp.h \
@@ -30230,6 +30228,82 @@
 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
 fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+# check net/if.h seperately, as it requrires other headers on OS X
+# and HP-UX 10.20
+
+for ac_header in net/if.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdio.h>
+#if STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# if HAVE_STDLIB_H
+#  include <stdlib.h>
+# endif
+#endif
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_Header=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Header=no"
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 if test `eval echo '${'$as_ac_Header'}'` = yes; then
   cat >>confdefs.h <<_ACEOF
 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Index: kaffe/configure.ac
diff -u kaffe/configure.ac:1.162 kaffe/configure.ac:1.163
--- kaffe/configure.ac:1.162	Mon Aug 15 20:58:21 2005
+++ kaffe/configure.ac	Thu Aug 18 20:00:08 2005
@@ -1020,7 +1020,6 @@
 memory.h \
 mips/cachectl.h \
 netdb.h \
-net/if.h \
 netinet/in.h \
 netinet/in_systm.h \
 netinet/tcp.h \
@@ -1056,6 +1055,23 @@
 wintypes.h \
 wtypes.h \
 zlib.h])
+
+# check net/if.h seperately, as it requrires other headers on OS X
+# and HP-UX 10.20
+AC_CHECK_HEADERS([net/if.h], [], [],
+[#include <stdio.h>
+#if STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# if HAVE_STDLIB_H
+#  include <stdlib.h>
+# endif
+#endif
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+])
 
 dnl GNU/Linux sigcontext headers
 AC_CHECK_HEADERS([asm/sigcontext.h])




More information about the kaffe mailing list