$OpenBSD: patch-configure_in,v 1.2 2002/03/19 15:20:07 brad Exp $
--- configure.in.orig	Thu Feb 14 14:10:34 2002
+++ configure.in	Sat Mar 16 12:34:28 2002
@@ -704,6 +704,18 @@ AC_ARG_ENABLE(ipf-transparent,
   fi
 ])
 
+dnl Enable PF Transparent Proxy
+AC_ARG_ENABLE(pf-transparent,
+[  --enable-pf-transparent
+                          Enable Transparent Proxy support for systems
+                          using PF network address redirection.],
+[ if test "$enableval" = "yes" ; then
+	echo "PF Transparent Proxy enabled"
+	AC_DEFINE(PF_TRANSPARENT)
+	PF_TRANSPARENT="yes"
+  fi
+])
+
 dnl Enable Linux Netfilter (2.4) Transparent Proxy
 AC_ARG_ENABLE(linux-netfilter,
 [  --enable-linux-netfilter
@@ -1067,6 +1079,7 @@ AC_CHECK_HEADERS( \
 	memory.h \
 	mount.h \
 	net/if.h \
+	net/pfvar.h \
 	netdb.h \
 	netinet/if_ether.h \
 	netinet/in.h \
@@ -1454,18 +1467,6 @@ dnl during compile.
 		;;
 esac
 
-# Remove optimization for GCC 2.95.[123]
-# gcc -O[2] on *BSD and Linux (x86) causes pointers to magically become NULL
-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]]*//'`"
-		;;
-	esac
-fi
-
 # Recommended by Balint Nagy Endre <bne@CareNet.hu>
 case "$host" in
 	*-univel-sysv4.2MP)
@@ -1620,6 +1621,25 @@ if test "$IPF_TRANSPARENT" ; then
 fi 
 if test "$IPF_TRANSPARENT" = "no" ; then
     echo "WARNING: Cannot find necessary IP-Filter header files"
+    echo "         Transparent Proxy support WILL NOT be enabled"
+    sleep 10
+fi
+
+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
+        PF_TRANSPARENT="yes"
+        AC_DEFINE(PF_TRANSPARENT, 1)
+    else
+        PF_TRANSPARENT="no"
+        AC_DEFINE(PF_TRANSPARENT, 0)
+    fi
+    AC_MSG_RESULT($PF_TRANSPARENT)
+fi
+if test "$PF_TRANSPARENT" = "no" ; then
+    echo "WARNING: Cannot find necessary PF header file"
     echo "         Transparent Proxy support WILL NOT be enabled"
     sleep 10
 fi
