changeset 53280:09376ac9647f

Check for <sys/socket.h>. Include it before including <net/if.h>. Move check for <net/if.h> before its use.
author Andreas Schwab <schwab@suse.de>
date Wed, 24 Dec 2003 16:45:05 +0000
parents 2429601c512b
children 5789e2873818
files configure.in
diffstat 1 files changed, 15 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/configure.in	Wed Dec 24 12:02:26 2003 +0000
+++ b/configure.in	Wed Dec 24 16:45:05 2003 +0000
@@ -1507,6 +1507,12 @@
   AC_DEFINE(NO_MATHERR, 1, [Define to 1 if you don't have struct exception in math.h.])
 fi
 
+AC_CHECK_HEADERS(sys/socket.h)
+AC_CHECK_HEADERS(net/if.h, , , [AC_INCLUDES_DEFAULT
+#if HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif])
+
 dnl checks for structure members
 AC_STRUCT_TM
 AC_STRUCT_TIMEZONE
@@ -1516,7 +1522,14 @@
 		[#include <time.h>])
 AC_CHECK_MEMBERS([struct ifreq.ifr_flags, struct ifreq.ifr_hwaddr, 
 		  struct ifreq.ifr_netmask, struct ifreq.ifr_broadaddr,
-		  struct ifreq.ifr_addr], , ,[#include <net/if.h>])
+		  struct ifreq.ifr_addr], , ,
+		 [AC_INCLUDES_DEFAULT
+#if HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#if HAVE_NET_IF_H
+#include <net/if.h>
+#endif])
 
 dnl checks for compiler characteristics
 
@@ -2510,7 +2523,7 @@
 	    [Define to 1 if you have inet sockets.])
 fi
 
-AC_CHECK_HEADERS(sys/ioctl.h net/if.h)
+AC_CHECK_HEADERS(sys/ioctl.h)
 
 if test -f /usr/lpp/X11/bin/smt.exp; then
   AC_DEFINE(HAVE_AIX_SMT_EXP, 1,