fi
dnl PF support requires a header file.
-AC_MSG_NOTICE([Support for PF-based transparent proxy requested: $squid_opt_pf_transparent])
-if test "$squid_opt_pf_transparent" != "no" ; then
- AC_MSG_CHECKING(for availability of PF header files)
- # hold on to your hats...
- if test "$ac_cv_header_net_pfvar_h" = "yes" || test "$ac_cv_header_net_pf_pfvar_h" = "yes"; then
- squid_opt_pf_transparent="yes"
- AC_DEFINE(PF_TRANSPARENT, 1)
- else
- squid_opt_pf_transparent="no"
- AC_DEFINE(PF_TRANSPARENT, 0)
- fi
- AC_MSG_RESULT($squid_opt_pf_transparent)
-fi
-if test "$squid_opt_pf_transparent" = "no" ; then
- AC_MSG_WARN([Cannot find necessary PF header file])
- AC_MSG_WARN([Transparent Proxy support WILL NOT be enabled])
+if test "$enable_pf_transparent" != "no" ; then
+ if test "$ac_cv_header_net_pfvar_h" = "yes" -o \
+ "$ac_cv_header_net_pf_pfvar_h" = "yes"; then
+ if test "$enable_pf_transparent" = "auto" ; then
+ enable_pf_transparent="yes"
+ fi
+ else
+ if test "$enable_pf_transparent" = "yes" ; then
+ AC_MSG_ERROR([PF-based transparent proxy requested but needed header not found])
+ fi
+ enable_pf_transparent="no"
+ fi
fi
+SQUID_DEFINE_UNQUOTED([PF_TRANSPARENT],$enable_pf_transparent,
+ [Enable support for PF-style transparent proxying])
-if test "$squid_opt_linux_netfilter" != "no" ; then
- AC_MSG_CHECKING(if Linux (Netfilter) kernel header files are installed)
- # hold on to your hats...
- if test "$ac_cv_header_linux_netfilter_ipv4_h" = "yes"; then
- AC_DEFINE(LINUX_NETFILTER, 1)
+if test "$enable_linux_netfilter" != "no" ; then
+ if test "$ac_cv_header_linux_netfilter_ipv4_h" = "yes"; then
+ if test "$enable_linux_netfilter" = "auto" ; then
+ enable_linux_netfilter=yes
+ fi
+ else
+ if test "$enable_linux_netfilter" = "auto" ; then
+ enable_linux_netfilter=no
else
- squid_opt_linux_netfilter="no"
- AC_DEFINE(LINUX_NETFILTER, 0)
- AC_MSG_WARN([Cannot find necessary Linux kernel (Netfilter) header files])
- AC_MSG_WARN([Linux Transparent and Intercepting Proxy support WILL NOT be enabled])
+ AC_MSG_ERROR([Linux Netfilter support requested but needed headers not found])
fi
- AC_MSG_RESULT($squid_opt_linux_netfilter)
+ fi
fi
+#notice and define for LINUX_NETFILTER must be delayed as TPROXY
+# may have something to say about it
dnl Netfilter TPROXY depends on libcap but the NAT parts can still work.
-AC_MSG_NOTICE([Support for Netfilter-based interception proxy requested: $squid_opt_linux_netfilter])
-if test "$squid_opt_linux_netfilter" = "yes" && test "$use_libcap" != "yes" ; then
- AC_MSG_WARN([Missing needed capabilities from libcap for TPROXY])
+AC_MSG_NOTICE([Support for Netfilter-based interception proxy requested: $enable_linux_netfilter])
+if test "$enable_linux_netfilter" = "yes" && test "$use_libcap" != "yes" ; then
+ AC_MSG_WARN([Missing needed capabilities (libcap or libcap2) for TPROXY])
AC_MSG_WARN([Linux Transparent Proxy support WILL NOT be enabled])
AC_MSG_WARN([Reduced support to Interception Proxy])
- enable_linux_tproxy="no"
# AC_DEFINE'd later
fi
- # Linux Netfilter/TPROXYv2 support requires some specific header files and
- # support infrastructure (netfilter and libcap)
- if test "$enable_linux_tproxy" = "yes" -a "$use_libcap" != "yes" ; then
- AC_MSG_WARN([Missing needed capabilities (libcap or libcap2) for TPROXY])
- AC_MSG_WARN([Disabling Linux TPROXY v2 support])
- AC_MSG_WARN([Interception proxy will still work])
- enable_linux_tproxy="no"
- fi
- if test "$enable_linux_tproxy" = "yes" ; then
- # we already checked that $use_libcap2=yes
- if test "$enable_linux_netfilter" = "no" ; then
- enable_linux_netfilter="yes"
- AC_MSG_NOTICE([Enabling Linux Netfilter support needed by Linux TPROXY v2])
- fi
- AC_MSG_CHECKING([if TPROXYv2 header files are installed])
- if test "$ac_cv_header_linux_netfilter_ipv4_ip_tproxy_h" != "yes" ; then
- enable_linux_tproxy="no"
- dnl need to output before next lines
- AC_MSG_RESULT($enable_linux_tproxy)
- AC_MSG_WARN([Cannot find TPROXY v2 headers, you need to patch the kernel with ])
- AC_MSG_WARN([tproxy package from: http://www.balabit.com/downloads/files/tproxy/])
- AC_MSG_WARN([or use '--enable-linux-netfilter' option instead for Netfilter support.])
- else
- AC_MSG_RESULT($enable_linux_tproxy)
- fi
- fi
-
- AC_MSG_NOTICE([Linux Netfilter support enabled: $enable_linux_netfilter])
- SQUID_DEFINE_UNQUOTED([LINUX_NETFILTER],$enable_linux_netfilter,
- [Enable support for Transparent Proxy on Linux via Netfilter])
- SQUID_DEFINE_UNQUOTED(LINUX_TPROXY2,$enable_linux_tproxy,
- [Enable real Transparent Proxy support for Netfilter TPROXY v2])
-
-
AC_ARG_ENABLE(gnuregex,
- AS_HELP_STRING([--enable-gnuregex],[Compile GNUregex. Unless you have reason to use
+ AS_HELP_STRING([--enable-gnuregex],
+ [Compile GNUregex. Unless you have reason to use
this option, you should not enable it.
This library file is usually only required on Windows and
very old Unix boxes which do not have their own regex