From: robertc <> Date: Sun, 13 Oct 2002 09:01:40 +0000 (+0000) Subject: fix some of the header detection issues on FreeBSD X-Git-Tag: SQUID_3_0_PRE1~673 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5a3237b0cccc721809511a094975826879d9e9a0;p=thirdparty%2Fsquid.git fix some of the header detection issues on FreeBSD --- diff --git a/acinclude.m4 b/acinclude.m4 index f6561995e4..2fe84d3c40 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -26,3 +26,23 @@ AC_DEFUN(SQUID_DEFAULT_SIZEOF_INCLUDES,[ #include SQUID_DEFAULT_INCLUDES ]) + +dnl *BSD net headers +AC_DEFUN(SQUID_BSDNET_INCLUDES,[ +SQUID_DEFAULT_INCLUDES +#if HAVE_SYS_SOCKET_H +#include +#endif +#if HAVE_NETINET_IN_H +#include +#endif +#if HAVE_NETINET_IP_COMPAT_H +#include +#endif +#if HAVE_NETINET_IP_FIL_H +#include +#endif +#if HAVE_NET_IF_H +#include +#endif +]) diff --git a/aclocal.m4 b/aclocal.m4 index 42734d47d3..b8cffc1dc6 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -40,6 +40,26 @@ AC_DEFUN(SQUID_DEFAULT_SIZEOF_INCLUDES,[ SQUID_DEFAULT_INCLUDES ]) +dnl *BSD net headers +AC_DEFUN(SQUID_BSDNET_INCLUDES,[ +SQUID_DEFAULT_INCLUDES +#if HAVE_SYS_SOCKET_H +#include +#endif +#if HAVE_NETINET_IN_H +#include +#endif +#if HAVE_NETINET_IP_COMPAT_H +#include +#endif +#if HAVE_NETINET_IP_FIL_H +#include +#endif +#if HAVE_NET_IF_H +#include +#endif +]) + # Do all the work for Automake. This macro actually does too much -- # some checks are only needed if your package does certain things. # But this isn't really a big deal. diff --git a/configure b/configure index 313bd622be..cd1ef6922f 100755 --- a/configure +++ b/configure @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 1.291 . +# From configure.in Revision: 1.292 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.53. # @@ -6581,12 +6581,6 @@ done - - - - - - @@ -6613,21 +6607,15 @@ for ac_header in \ ip_nat.h \ libc.h \ limits.h \ - linux/netfilter_ipv4.h \ malloc.h \ math.h \ memory.h \ mount.h \ - net/if.h \ net/pfvar.h \ netdb.h \ - netinet/if_ether.h \ netinet/in.h \ netinet/tcp.h \ - netinet/ip_compat.h \ netinet/ip_fil_compat.h \ - netinet/ip_fil.h \ - netinet/ip_nat.h \ openssl/err.h \ openssl/md5.h \ openssl/ssl.h \ @@ -6787,6 +6775,169 @@ fi done + +for ac_header in linux/netfilter_ipv4.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 +#line $LINENO "configure" +#include "confdefs.h" + +/* What a mess.. many systems have added the (now standard) bit types + * in their own ways, so we need to scan a wide variety of headers to + * find them.. + * IMPORTANT: Keep include/squid_types.h syncronised with this list + */ +#if HAVE_SYS_TYPES_H +#include +#endif +#if STDC_HEADERS +#include +#include +#endif +#if HAVE_INTTYPES_H +#include +#endif +#if HAVE_SYS_BITYPES_H +#include +#endif + +#if HAVE_LIMITS_H +#include +#endif + + +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 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 +cat conftest.$ac_ext >&5 +eval "$as_ac_Header=no" +fi +rm -f 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 +_ACEOF + +fi + +done + + + + + + + +for ac_header in net/if.h \ + netinet/if_ether.h\ + netinet/ip_compat.h\ + netinet/ip_fil.h\ + netinet/ip_nat.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 +#line $LINENO "configure" +#include "confdefs.h" + + +/* What a mess.. many systems have added the (now standard) bit types + * in their own ways, so we need to scan a wide variety of headers to + * find them.. + * IMPORTANT: Keep include/squid_types.h syncronised with this list + */ +#if HAVE_SYS_TYPES_H +#include +#endif +#if STDC_HEADERS +#include +#include +#endif +#if HAVE_INTTYPES_H +#include +#endif +#if HAVE_SYS_BITYPES_H +#include +#endif + +#if HAVE_SYS_SOCKET_H +#include +#endif +#if HAVE_NETINET_IN_H +#include +#endif +#if HAVE_NETINET_IP_COMPAT_H +#include +#endif +#if HAVE_NETINET_IP_FIL_H +#include +#endif +#if HAVE_NET_IF_H +#include +#endif + + +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 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 +cat conftest.$ac_ext >&5 +eval "$as_ac_Header=no" +fi +rm -f 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 +_ACEOF + +fi + +done + + echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 if test "${ac_cv_prog_cc_stdc+set}" = set; then diff --git a/configure.in b/configure.in index 616fd7f874..1d03d2f6e7 100644 --- a/configure.in +++ b/configure.in @@ -3,7 +3,7 @@ dnl Configuration input file for Squid dnl dnl Duane Wessels, wessels@nlanr.net, February 1996 (autoconf v2.9) dnl -dnl $Id: configure.in,v 1.292 2002/10/13 00:42:58 robertc Exp $ +dnl $Id: configure.in,v 1.293 2002/10/13 03:01:41 robertc Exp $ dnl dnl dnl @@ -13,7 +13,7 @@ AC_CONFIG_SRCDIR([src/main.c]) AC_CONFIG_AUX_DIR(cfgaux) AM_INIT_AUTOMAKE(squid, 2.6-DEVEL) AM_CONFIG_HEADER(include/autoconf.h) -AC_REVISION($Revision: 1.292 $)dnl +AC_REVISION($Revision: 1.293 $)dnl AC_PREFIX_DEFAULT(/usr/local/squid) AM_MAINTAINER_MODE @@ -1270,16 +1270,11 @@ AC_CHECK_HEADERS( \ math.h \ memory.h \ mount.h \ - net/if.h \ net/pfvar.h \ netdb.h \ - netinet/if_ether.h \ netinet/in.h \ netinet/tcp.h \ - netinet/ip_compat.h \ netinet/ip_fil_compat.h \ - netinet/ip_fil.h \ - netinet/ip_nat.h \ openssl/err.h \ openssl/md5.h \ openssl/ssl.h \ @@ -1327,13 +1322,19 @@ AC_CHECK_HEADERS( \ nss.h ) -AC_CHECK_HEADER(linux/netfilter_ipv4.h,,, +AC_CHECK_HEADERS(linux/netfilter_ipv4.h,,, SQUID_DEFAULT_INCLUDES #if HAVE_LIMITS_H #include #endif ) +AC_CHECK_HEADERS(net/if.h \ + netinet/if_ether.h\ + netinet/ip_compat.h\ + netinet/ip_fil.h\ + netinet/ip_nat.h,,,SQUID_BSDNET_INCLUDES) + AC_C_CONST AC_C_BIGENDIAN