1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

When checking for <net/if.h>, #include <sys/socket.h> first.

On Mac OS X 10.5.4, <net/if.h> does not #include <sys/socket.h> but
uses struct sockaddr defined there.  Autoconf 2.61 generates a
configure script that warns if the header can be preprocessed but not
compiled.  The Autoconf manual cautions that future versions of
Autoconf will treat the file as missing in this case.  To let ELinks
detect <net/if.h> even with a future Autoconf, make the test program
#include <sys/socket.h> before <net/if.h>.
This commit is contained in:
Kalle Olavi Niemitalo 2008-07-29 19:09:28 +03:00 committed by Kalle Olavi Niemitalo
parent abe4927d69
commit e019038c17

View File

@ -191,7 +191,7 @@ AC_CHECK_HEADERS(fcntl.h limits.h time.h unistd.h)
AC_CHECK_HEADERS(sigaction.h)
AC_CHECK_HEADERS(arpa/inet.h)
AC_CHECK_HEADERS(netinet/in_systm.h netinet/in_system.h netinet/ip.h)
AC_CHECK_HEADERS(net/if.h netdb.h netinet/in.h netinet/in6_var.h)
AC_CHECK_HEADERS(netdb.h netinet/in.h netinet/in6_var.h)
AC_CHECK_HEADERS(ifaddrs.h)
AC_CHECK_HEADERS(sys/cygwin.h io.h)
AC_CHECK_HEADERS(sys/fmutex.h)
@ -202,6 +202,11 @@ AC_CHECK_HEADERS(sys/signal.h)
AC_CHECK_HEADERS(sys/socket.h)
AC_CHECK_HEADERS(sys/time.h)
AC_CHECK_HEADERS(sys/utsname.h)
AC_CHECK_HEADERS([net/if.h], [], [],
[[#ifdef HAVE_SYS_SOCKET_H
# include <sys/socket.h> /* <net/if.h> on Mac OS X 10.5.4 needs this */
#endif
]])
AC_CHECK_HEADERS(stdint.h inttypes.h)
AC_CHECK_HEADERS(locale.h pwd.h)
AC_CHECK_HEADERS(termios.h)