Index: configure.in =================================================================== --- configure.in (revision 1770) +++ configure.in (working copy) @@ -52,7 +52,54 @@ dnl Checks for header files. AC_HEADER_STDC -AC_CHECK_HEADERS(unistd.h sys/ioctl.h sys/time.h termios.h ncurses.h netinet/if_ether.h netinet/ether.h) + +AC_CHECK_HEADERS(unistd.h sys/ioctl.h sys/time.h termios.h ncurses.h) + +dnl Darwin needs sys/socket.h before net/if.h + +AC_CHECK_HEADERS([sys/socket.h]) +AC_CHECK_HEADERS([net/if.h], [], [AC_MSG_WARN(Problems including net/if.h)], +[ +#include +#if STDC_HEADERS +# include +# include +#else +# if HAVE_STDLIB_H +# include +# endif +#endif +#if HAVE_SYS_SOCKET_H +# include +#endif +]) + +dnl as well as net/if.h, netbsd needs netinet/in.h if we're going to use netinet/if_ether.h + +AC_CHECK_HEADERS([netinet/in.h]) + +AC_CHECK_HEADERS([netinet/if_ether.h], [], [AC_MSG_WARN(Problems including netinet/if_ether.h)], +[ +#include +#if STDC_HEADERS +# include +# include +#else +# if HAVE_STDLIB_H +# include +# endif +#endif +#if HAVE_SYS_SOCKET_H +# include +#endif +#if HAVE_NET_IF_H +# include +#endif +#if HAVE_NETINET_IN_H +# include +#endif +]) + dnl AC_EGREP_HEADER(TIOCGWINSZ,sys/ioctl.h,AC_DEFINE(HAVE_TIOCGWINSZ)) dnl Checks for typedefs, structures, and compiler characteristics.