From: Francesco Chemolli Date: Wed, 23 Dec 2009 11:23:25 +0000 (+0100) Subject: Fixed brokenness in IPF_TRANSPARENT X-Git-Tag: SQUID_3_2_0_1~310^2~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2277004e89356ce943a66865fa7cdf0278d79488;p=thirdparty%2Fsquid.git Fixed brokenness in IPF_TRANSPARENT Added some documentation about configure.in itself Prettified buildmodel Obsoleted some irix stuff --- diff --git a/configure.in b/configure.in index e47f34b5a0..4a436dcbe6 100644 --- a/configure.in +++ b/configure.in @@ -1297,36 +1297,39 @@ dnl Enable IPFW Transparent Proxy squid_opt_enable_ipfw_transparent=0 AC_ARG_ENABLE(ipfw-transparent, AS_HELP_STRING([--enable-ipfw-transparent],[Enable Transparent Proxy support for systems - using FreeBSD IPFW style redirection.]), + using FreeBSD IPFW-style firewalling.]), [ if test "$enableval" = "yes" ; then AC_MSG_NOTICE([IPFW Transparent Proxy enabled]) squid_opt_enable_ipfw_transparent=1 fi ]) AC_DEFINE_UNQUOTED(IPFW_TRANSPARENT,$squid_opt_enable_ipfw_transparent, - [Enable support for Transparent Proxy on systems using FreeBSD IPFW address redirection.]) + [Enable support for Transparent Proxy on systems using FreeBSD IPFW-style firewalling.]) dnl Enable IP-Filter Transparent Proxy -AH_TEMPLATE(IPF_TRANSPARENT,[Enable support for Transparent Proxy on systems using IP- +AH_TEMPLATE(IPF_TRANSPARENT, + [Enable support for Transparent Proxy on systems using IPF-style firewalling]) squid_opt_ipf_transparent=no -Filter address redirection.]) AC_ARG_ENABLE(ipf-transparent, - AS_HELP_STRING([--enable-ipf-transparent],[Enable Transparent Proxy support for systems - using IP-Filter network address redirection.]), + AS_HELP_STRING([--enable-ipf-transparent], + [Enable Transparent Proxy support for OSes using IPFilter-style firewalling]) [ if test "$enableval" = "yes" ; then AC_MSG_NOTICE([IP-Filter Transparent Proxy enabled]) squid_opt_ipf_transparent="yes" + #will be AC_DEFINE'd later, after checking for appropriate infrastructure fi ]) dnl Enable PF Transparent Proxy -AH_TEMPLATE(PF_TRANSPARENT,[Enable support for Transparent Proxy on systems using PF address redirection (e.g. OpenBSD)]) +AH_TEMPLATE(PF_TRANSPARENT, + [Enable support for Transparent Proxy on systems using OpenBSD-style PF firewalling]) AC_ARG_ENABLE(pf-transparent, - AS_HELP_STRING([--enable-pf-transparent],[Enable Transparent Proxy support for systems - using PF network address redirection.]), + AS_HELP_STRING([--enable-pf-transparent], + [Enable Transparent Proxy support for systems using PF network address redirection.]), [ if test "$enableval" = "yes" ; then AC_MSG_NOTICE([PF Transparent Proxy enabled]) squid_opt_pf_transparent="yes" + #will be AC_DEFINE'd later, after checking for appropriate infrastructure fi ]) @@ -1338,19 +1341,19 @@ AC_ARG_ENABLE(linux-netfilter, [Enable Transparent Proxy support for Linux (Netfilter)]), [ if test "$enableval" = "yes" ; then AC_MSG_NOTICE([Linux (Netfilter) Transparent Proxy enabled]) - AC_DEFINE(LINUX_NETFILTER,1,[Enable support for Transparent Proxy on Linux (Netfilter) systems]) squid_opt_linux_netfilter="yes" + #will be AC_DEFINE'd later, after checking for appropriate infrastructure fi ]) dnl Enable Large file support buildmodel="" -needlargefiles= +squid_opt_enable_large_files=no AC_ARG_WITH(large-files, AS_HELP_STRING([--with-large-files],[Enable support for large files (logs etc).]), [ if test "x$withval" = "xyes"; then - needlargefiles=1 + squid_opt_enable_large_files=yes fi ]) @@ -1370,7 +1373,7 @@ AC_ARG_WITH(build-environment, default The default for your OS], [ case "$withval" in yes|no) - AC_MSG_FAILURE(["--with-build-environment expects a build environment string as used by getconf]) + AC_MSG_FAILURE([--with-build-environment expects a build environment string as used by getconf]) ;; *) buildmodel="$withval" @@ -1378,20 +1381,20 @@ AC_ARG_WITH(build-environment, esac ]) -if test $needlargefiles && test -z "$buildmodel"; then - for model in POSIX_V6_LPBIG_OFFBIG XBS5_LPBIG_OFFBIG POSIX_V6_LP64_OFF64 XBS5_LP64_OFF64 POSIX_V6_ILP32_OFFBIG XBS5_ILP32_OFFBIG; do - if test "`getconf _$model 2>/dev/null || true`" = 1 || test "`getconf $model 2>/dev/null || true`" ; then - buildmodel=$model - break - fi - done - if test -z "$buildmodel"; then - AC_MSG_WARN([No suitable build environment found for large files. Trying to use _FILE_OFFSET_BITS=64]) - fi +if test "$squid_opt_enable_large_files" = "yes" -a -z "$buildmodel"; then + for model in POSIX_V6_LPBIG_OFFBIG XBS5_LPBIG_OFFBIG POSIX_V6_LP64_OFF64 XBS5_LP64_OFF64 POSIX_V6_ILP32_OFFBIG XBS5_ILP32_OFFBIG; do + if test "`getconf _$model 2>/dev/null || true`" = 1 || test "`getconf $model 2>/dev/null || true`" ; then + buildmodel=$model + break + fi + done + if test -z "$buildmodel"; then + AC_MSG_WARN([No suitable build environment found for large files. Trying to use _FILE_OFFSET_BITS=64]) + fi fi case "$buildmodel" in default|"") - if test "$needlargefiles"; then + if test "$squid_opt_enable_large_files" = "yes" ; then AC_MSG_NOTICE([Enabling -D_FILE_OFFSET_BITS=64]) CFLAGS="-D_FILE_OFFSET_BITS=64 $CFLAGS" CXXFLAGS="-D_FILE_OFFSET_BITS=64 $CXXFLAGS" @@ -1408,55 +1411,33 @@ default|"") CXXFLAGS="`getconf ${buildmodel}_CFLAGS` $CXXFLAGS" LIBS="`getconf ${buildmodel}_LIBS` $LIBS" LDFLAGS="`getconf ${buildmodel}_LDFLAGS` $LDFLAGS" - case "$host" in -dnl -dnl On Solaris getconf returns for CFLAGS -xarch=generic64, -Xa and -Usun options, and -dnl for LDFLAGS -xarch=generic64, but: -dnl "-Xa" is supported only by Sun cc, so we need to remove it when using gcc -dnl For gcc "-xarch=generic64" must be replaced with "-m64" -dnl The 'sun' define is needed by ipfilter includes, so we must remove "-Usun" - *-solaris*) - if test "$GCC" = "yes"; then - AC_MSG_NOTICE([Removing -Xa for gcc/g++ on $host]) - CFLAGS="`echo $CFLAGS | sed -e 's/-Xa//'`" - CXXFLAGS="`echo $CXXFLAGS | sed -e 's/-Xa//'`" - AC_MSG_NOTICE([Replacing -xarch=generic64 with -m64 for gcc/g++ on $host]) - CFLAGS="`echo $CFLAGS | sed -e 's/-xarch=generic64/-m64/'`" - CXXFLAGS="`echo $CXXFLAGS | sed -e 's/-xarch=generic64/-m64/'`" - LDFLAGS="`echo $LDFLAGS | sed -e 's/-xarch=generic64//'`" - fi - AC_MSG_NOTICE([Removing -Usun on $host]) - CFLAGS="`echo $CFLAGS | sed -e 's/-Usun//'`" - CXXFLAGS="`echo $CXXFLAGS | sed -e 's/-Usun//'`" - ;; -dnl -dnl On Irix 6.x getconf returns options valid only for the SGI MipsPRO compiler, -dnl so we must adjust something to avoid gcc errors. -dnl On Irix 6.x 32/64 bit we must replace "-n32" with "-mabi=n32" in CFLAGS and -dnl remove "-n32" from LDFLAGS -dnl On Irix 6.x 64 bit we must replace "-64" with "-mabi=64" in CFLAGS and remove -dnl "-64" from LDFLAGS - *-sgi-irix6.*) - if test "$GCC" = "yes"; then - CFLAGS="`echo $CFLAGS | sed -e 's/-n32/-mabi=n32/'`" - CXXFLAGS="`echo $CXXFLAGS | sed -e 's/-n32/-mabi=n32/'`" - LDFLAGS="`echo $LDFLAGS | sed -e 's/-n32//'`" - CFLAGS="`echo $CFLAGS | sed -e 's/-64/-mabi=64/'`" - CXXFLAGS="`echo $CXXFLAGS | sed -e 's/-64/-mabi=64/'`" - LDFLAGS="`echo $LDFLAGS | sed -e 's/-64//'`" - fi - ;; - *) - ;; - esac - ;; + if "$squid_host_os" = "solaris" ; then + +# On Solaris getconf returns for CFLAGS -xarch=generic64, -Xa and -Usun options, and +# for LDFLAGS -xarch=generic64, but: +# "-Xa" is supported only by Sun cc, so we need to remove it when using gcc +# For gcc "-xarch=generic64" must be replaced with "-m64" +# The 'sun' define is needed by ipfilter includes, so we must remove "-Usun" + if test "$GCC" = "yes"; then + AC_MSG_NOTICE([Removing -Xa for gcc/g++ on $host]) + CFLAGS="`echo $CFLAGS | sed -e 's/-Xa//'`" + CXXFLAGS="`echo $CXXFLAGS | sed -e 's/-Xa//'`" + AC_MSG_NOTICE([Replacing -xarch=generic64 with -m64 for gcc/g++ on $host]) + CFLAGS="`echo $CFLAGS | sed -e 's/-xarch=generic64/-m64/'`" + CXXFLAGS="`echo $CXXFLAGS | sed -e 's/-xarch=generic64/-m64/'`" + LDFLAGS="`echo $LDFLAGS | sed -e 's/-xarch=generic64//'`" + fi + AC_MSG_NOTICE([Removing -Usun on $host]) + CFLAGS="`echo $CFLAGS | sed -e 's/-Usun//'`" + CXXFLAGS="`echo $CXXFLAGS | sed -e 's/-Usun//'`" + fi esac dnl Enable Linux transparent proxy support for obsolete TPROXY AH_TEMPLATE(LINUX_TPROXY2,[Enable real Transparent Proxy support for Netfilter TPROXY v2]) AC_ARG_ENABLE(linux-tproxy, - AS_HELP_STRING([--enable-linux-tproxy],[Enable real Transparent Proxy support for Netfilter TPROXY - (version 2).]), + AS_HELP_STRING([--enable-linux-tproxy], + [Enable real Transparent Proxy support for Netfilter TPROXY (version 2).]), [ if test "$enableval" = "yes" ; then AC_MSG_NOTICE([Linux Netfilter/TPROXY v2 enabled]) AC_DEFINE(LINUX_TPROXY2, 1)