]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
fix some of the header detection issues on FreeBSD
authorrobertc <>
Sun, 13 Oct 2002 09:01:40 +0000 (09:01 +0000)
committerrobertc <>
Sun, 13 Oct 2002 09:01:40 +0000 (09:01 +0000)
acinclude.m4
aclocal.m4
configure
configure.in

index f6561995e463e0c6f97175d49f5b84436ac8d574..2fe84d3c40b9efc5d8c1e28c9dce2948c75c26f2 100644 (file)
@@ -26,3 +26,23 @@ AC_DEFUN(SQUID_DEFAULT_SIZEOF_INCLUDES,[
 #include <stdio.h>
 SQUID_DEFAULT_INCLUDES
 ])
+
+dnl *BSD net headers
+AC_DEFUN(SQUID_BSDNET_INCLUDES,[
+SQUID_DEFAULT_INCLUDES
+#if HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#if HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#if HAVE_NETINET_IP_COMPAT_H
+#include <netinet/ip_compat.h>
+#endif
+#if HAVE_NETINET_IP_FIL_H
+#include <netinet/ip_fil.h>
+#endif
+#if HAVE_NET_IF_H
+#include <net/if.h>
+#endif
+])
index 42734d47d335368ce93ff73b10e58f2e56a9b749..b8cffc1dc684eff97a670fcede285d481a4840fd 100644 (file)
@@ -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 <sys/socket.h>
+#endif
+#if HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#if HAVE_NETINET_IP_COMPAT_H
+#include <netinet/ip_compat.h>
+#endif
+#if HAVE_NETINET_IP_FIL_H
+#include <netinet/ip_fil.h>
+#endif
+#if HAVE_NET_IF_H
+#include <net/if.h>
+#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.
index 313bd622be2456177e839aca0e6ccacc52c7b49b..cd1ef6922faf8648fa1e980dfde3b8cde62ba1e0 100755 (executable)
--- 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 <sys/types.h>
+#endif
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+#if HAVE_INTTYPES_H
+#include <inttypes.h>
+#endif
+#if HAVE_SYS_BITYPES_H
+#include <sys/bitypes.h>
+#endif
+
+#if HAVE_LIMITS_H
+#include <limits.h>
+#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 <sys/types.h>
+#endif
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+#if HAVE_INTTYPES_H
+#include <inttypes.h>
+#endif
+#if HAVE_SYS_BITYPES_H
+#include <sys/bitypes.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#if HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#if HAVE_NETINET_IP_COMPAT_H
+#include <netinet/ip_compat.h>
+#endif
+#if HAVE_NETINET_IP_FIL_H
+#include <netinet/ip_fil.h>
+#endif
+#if HAVE_NET_IF_H
+#include <net/if.h>
+#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
index 616fd7f874a75cce2f27f6da0d313326a24566bc..1d03d2f6e707979c30905c7d498ba8a1d47a4c64 100644 (file)
@@ -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 <limits.h>
 #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