--- configure.ac.bak 2003-10-22 02:06:04.000000000 +0100 +++ configure.ac 2003-10-22 02:06:12.000000000 +0100 @@ -197,12 +197,266 @@ libutil.h limits.h]) AC_CHECK_HEADERS([sys/socket.h netinet/in.h net/if_dl.h \ - net/netopt.h inet/nd.h net/route.h net/if.h \ - net/if_var.h netinet/in_var.h]) + net/netopt.h inet/nd.h net/route.h]) + +dnl FreeBSD (and other BSDs?) seem hell-bent on making it as difficult as +dnl possible to include headers + +AC_CHECK_HEADERS([net/if.h], [], [], +[#include +#if HAVE_SYS_TYPES_H +# include +#endif +#if HAVE_SYS_STAT_H +# include +#endif +#if STDC_HEADERS +# include +# include +#else +# if HAVE_STDLIB_H +# include +# endif +#endif +#if HAVE_STRING_H +# if !STDC_HEADERS && HAVE_MEMORY_H +# include +# endif +# include +#endif +#if HAVE_STRINGS_H +# include +#endif +#if HAVE_INTTYPES_H +# include +#else +# if HAVE_STDINT_H +# include +# endif +#endif +#if HAVE_UNISTD_H +# include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +]) + +AC_CHECK_HEADERS([net/if_var.h], [], [], +[#include +#if HAVE_SYS_TYPES_H +# include +#endif +#if HAVE_SYS_STAT_H +# include +#endif +#if STDC_HEADERS +# include +# include +#else +# if HAVE_STDLIB_H +# include +# endif +#endif +#if HAVE_STRING_H +# if !STDC_HEADERS && HAVE_MEMORY_H +# include +# endif +# include +#endif +#if HAVE_STRINGS_H +# include +#endif +#if HAVE_INTTYPES_H +# include +#else +# if HAVE_STDINT_H +# include +# endif +#endif +#if HAVE_UNISTD_H +# include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_NET_IF_H +#include +#endif +#ifdef HAVE_NET_IF_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +]) + +AC_CHECK_HEADERS([netinet/in_var.h], [], [], +[#include +#if HAVE_SYS_TYPES_H +# include +#endif +#if HAVE_SYS_STAT_H +# include +#endif +#if STDC_HEADERS +# include +# include +#else +# if HAVE_STDLIB_H +# include +# endif +#endif +#if HAVE_STRING_H +# if !STDC_HEADERS && HAVE_MEMORY_H +# include +# endif +# include +#endif +#if HAVE_STRINGS_H +# include +#endif +#if HAVE_INTTYPES_H +# include +#else +# if HAVE_STDINT_H +# include +# endif +#endif +#if HAVE_UNISTD_H +# include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_NET_IF_H +#include +#endif +#ifdef HAVE_NET_IF_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +]) + if test "x${enable_ipv6}" = "xyes"; then -AC_CHECK_HEADERS([netinet6/in6.h netinet/in6_var.h netinet/icmp6.h \ - netinet6/in6_var.h netinet6/nd6.h]) +AC_CHECK_HEADERS([netinet6/in6.h ]) + +AC_CHECK_HEADERS([netinet/in6_var.h netinet/icmp6.h netinet6/in6_var.h], \ + [], [], +[#include +#if HAVE_SYS_TYPES_H +# include +#endif +#if HAVE_SYS_STAT_H +# include +#endif +#if STDC_HEADERS +# include +# include +#else +# if HAVE_STDLIB_H +# include +# endif +#endif +#if HAVE_STRING_H +# if !STDC_HEADERS && HAVE_MEMORY_H +# include +# endif +# include +#endif +#if HAVE_STRINGS_H +# include +#endif +#if HAVE_INTTYPES_H +# include +#else +# if HAVE_STDINT_H +# include +# endif +#endif +#if HAVE_UNISTD_H +# include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_NET_IF_H +#include +#endif +#ifdef HAVE_NET_IF_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_NETINET6_IN6_H +#include +#endif +]) + +AC_CHECK_HEADERS([netinet6/nd6.h], [], [], +[#include +#if HAVE_SYS_TYPES_H +# include +#endif +#if HAVE_SYS_STAT_H +# include +#endif +#if STDC_HEADERS +# include +# include +#else +# if HAVE_STDLIB_H +# include +# endif +#endif +#if HAVE_STRING_H +# if !STDC_HEADERS && HAVE_MEMORY_H +# include +# endif +# include +#endif +#if HAVE_STRINGS_H +# include +#endif +#if HAVE_INTTYPES_H +# include +#else +# if HAVE_STDINT_H +# include +# endif +#endif +#if HAVE_UNISTD_H +# include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_NET_IF_H +#include +#endif +#ifdef HAVE_NET_IF_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_NETINET6_IN6_H +#include +#endif +#ifdef HAVE_NETINET6_IN6_VAR_H +#include +#endif +#ifdef HAVE_NETINET_IN6_VAR_H +#include +#endif +]) fi dnl if enable_ipv6