From: Amos Jeffries Date: Mon, 6 Jul 2009 04:37:36 +0000 (+1200) Subject: Add --disable-translation to break .po from error negotiation X-Git-Tag: SQUID_3_2_0_1~910 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=461b82198c0e93f3f6977b42273bec049f3accea;p=thirdparty%2Fsquid.git Add --disable-translation to break .po from error negotiation This enables build-time translation to be disabled without also disabling run-time error page negotiation. They should not have been linked tightly. --- diff --git a/configure.in b/configure.in index 4b20da21be..98c7420158 100644 --- a/configure.in +++ b/configure.in @@ -3792,8 +3792,23 @@ if test $ac_cv_have_res_ns_list = "yes" ; then fi fi +dnl Squid will usually attempt to translate when packaging or building from VCS +use_translate="yes" +AC_ARG_ENABLE(translation, + AC_HELP_STRING([--disable-translation], + [Prevent Squid generating localized error page templates and manuals. + Which is usually tried, but may not be needed.]) +[ if test "$enableval" = "no" ; then + use_translation=no + fi +]) dnl Squid now has .po translation capability, given the right toolkit -AX_WITH_PROG([PO2HTML],[po2html]) +if test "$use_translation" = "yes" ; then + AX_WITH_PROG([PO2HTML],[po2html]) +else + PO2HTML="off" +fi +AC_SUBST(PO2HTML) dnl Squid now has limited locale handling ... dnl on error pages @@ -3813,10 +3828,7 @@ if test "$use_errlocale" = "yes" ; then else AC_MSG_WARN([Disabling Multi-Language Support]) AC_DEFINE(USE_ERR_LOCALES,0,[Use multi-language support on error pages]) - dnl So we don't want to even attempt translation if its forcibly disabled. - PO2HTML="off" fi -AC_SUBST(PO2HTML) dnl Need the debugging version of malloc if available XTRA_OBJS='' diff --git a/doc/release-notes/release-3.1.sgml b/doc/release-notes/release-3.1.sgml index 0a03b16231..f1112a61bb 100644 --- a/doc/release-notes/release-3.1.sgml +++ b/doc/release-notes/release-3.1.sgml @@ -1109,6 +1109,12 @@ This section gives an account of those changes in three categories: --disable-loadable-modules

Build without support for loadable modules. + --disable-translation +

Prevent Squid generating localized error page templates and manuals. + Which is usually tried, but may not be needed. +

This is a development optimization for building from VCS when localization is + not needed. Has no effect on pre-translated source bundles. + --with-dns-cname

Enable CNAME recursion within the Internal DNS resolver stub squid uses. This has no effect on the external DNS helper. diff --git a/test-suite/buildtests/layer-01-minimal.opts b/test-suite/buildtests/layer-01-minimal.opts index b41103ad6f..353cd7aa45 100644 --- a/test-suite/buildtests/layer-01-minimal.opts +++ b/test-suite/buildtests/layer-01-minimal.opts @@ -84,6 +84,7 @@ OPTS=" \ --disable-ipv6 \ --disable-zph-qos \ --disable-auto-locale \ + --disable-translation \ \ --without-pthreads \ --without-aio \ diff --git a/test-suite/buildtests/layer-02-maximus.opts b/test-suite/buildtests/layer-02-maximus.opts index d74486671d..70e116a921 100644 --- a/test-suite/buildtests/layer-02-maximus.opts +++ b/test-suite/buildtests/layer-02-maximus.opts @@ -93,6 +93,7 @@ OPTS=" \ --enable-x-accelerator-vary \ --enable-ipv6 \ --enable-auto-locale \ + --enable-translation \ --enable-zph-qos \ \ --with-aio \