$NetBSD: patch-an,v 1.15 2007/09/07 10:39:36 taca Exp $ --- configure.in.orig 2007-08-31 23:55:13.000000000 +0900 +++ configure.in @@ -1609,11 +1609,13 @@ AC_CHECK_HEADERS( linux/netfilter_ipv4.h \ linux/netfilter_ipv4/ip_tproxy.h \ malloc.h \ + machine/byte_swap.h \ math.h \ memory.h \ mount.h \ net/if.h \ net/pfvar.h \ + net/pf/pfvar.h \ netdb.h \ netinet/if_ether.h \ netinet/tcp.h \ @@ -1974,7 +1976,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 +#include +#include ], + [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) @@ -2253,8 +2264,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 @@ -2648,7 +2659,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.])