summaryrefslogtreecommitdiff
path: root/www/squid27/patches/patch-ab
blob: 03f90ffdae102178dee72f0b373e40042490a7ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
$NetBSD: patch-ab,v 1.1.1.1.6.1 2009/02/05 17:05:38 tron Exp $

--- configure.in.orig	2009-02-04 09:44:06.000000000 +0900
+++ configure.in
@@ -1635,11 +1635,13 @@ AC_CHECK_HEADERS(
 	libc.h \
 	linux/netfilter_ipv4.h \
 	linux/netfilter_ipv4/ip_tproxy.h \
+  	machine/byte_swap.h \
 	malloc.h \
 	math.h \
 	memory.h \
 	mount.h \
 	net/if.h \
+	net/pf/pfvar.h \
 	net/pfvar.h \
 	netdb.h \
 	netinet/if_ether.h \
@@ -2004,7 +2006,16 @@ AC_CHECK_SYSTYPE(size_t, unsigned int)
 AC_CHECK_SYSTYPE(ssize_t, int)
 AC_CHECK_SYSTYPE(off_t, int)
 AC_CHECK_SYSTYPE(mode_t, unsigned short)
-AC_CHECK_SYSTYPE(fd_mask, int)
+
+dnl Check for type fd_mask
+AC_CACHE_CHECK(for fd_set,ac_cv_have_fd_mask, [
+  AC_TRY_COMPILE([#include <sys/types.h>
+#include <sys/time.h>
+#include <sys/unistd.h>],
+    [fd_mask fds;],
+    ac_cv_have_fd_mask="yes",
+    ac_cv_have_fd_mask="no")
+])
 
 AC_CHECK_SIZEOF_SYSTYPE(off_t, 4)
 AC_CHECK_SIZEOF_SYSTYPE(size_t, 4)
@@ -2299,8 +2310,8 @@ if test "$GCC" = "yes"; then
 	GCCVER=`$CC -v 2>&1 | awk '$2 ==  "version" {print $3}'`
 	case "$GCCVER" in
 	[2.95.[123]])
-		echo "Removing -O for gcc on $host with GCC $GCCVER"
-		CFLAGS="`echo $CFLAGS | sed -e 's/-O[[0-9]]*//'`"
+		echo "Making -O\[[2-9\]] to -O for gcc on $host with GCC $GCCVER"
+		CFLAGS="`echo $CFLAGS | sed -e 's/-O[[0-9]]*/-O/'`"
 		;;
 	esac
 fi
@@ -2697,7 +2708,7 @@ dnl PF support requires a header file.
 if test "$PF_TRANSPARENT" ; then
     AC_MSG_CHECKING(if PF header file is installed)
     # hold on to your hats...
-    if test "$ac_cv_header_net_pfvar_h" = "yes"; then
+    if test "$ac_cv_header_net_pfvar_h" = "yes" || test "$ac_cv_header_net_pf_pfvar_h" = "yes"; then
 	PF_TRANSPARENT="yes"
 	AC_DEFINE(PF_TRANSPARENT, 1, [Enable support for Transparent Proxy on systems using PF address
 	redirection. This provides "masquerading" support for OpenBSD.])