]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Add --disable-translation to break .po from error negotiation
authorAmos Jeffries <squid3@treenet.co.nz>
Mon, 6 Jul 2009 04:37:36 +0000 (16:37 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Mon, 6 Jul 2009 04:37:36 +0000 (16:37 +1200)
This enables build-time translation to be disabled without also disabling
run-time error page negotiation. They should not have been linked tightly.

configure.in
doc/release-notes/release-3.1.sgml
test-suite/buildtests/layer-01-minimal.opts
test-suite/buildtests/layer-02-maximus.opts

index 4b20da21be12cf135ed424b56e4d32024377e847..98c74201582433bd53a3085a650109dcfaac5c0d 100644 (file)
@@ -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=''
index 0a03b1623174f8cd7847c20b1f0e645b02fbab31..f1112a61bbefc0e52c7536b0f019032e91956552 100644 (file)
@@ -1109,6 +1109,12 @@ This section gives an account of those changes in three categories:
        <tag>--disable-loadable-modules</tag>
        <p>Build without support for loadable modules.
 
+       <tag>--disable-translation</tag>
+        <p>Prevent Squid generating localized error page templates and manuals.
+           Which is usually tried, but may not be needed.
+        <p>This is a development optimization for building from VCS when localization is
+           not needed. Has no effect on pre-translated source bundles.
+
         <tag>--with-dns-cname</tag>
         <p>Enable CNAME recursion within the Internal DNS resolver stub squid uses.
            This has no effect on the external DNS helper.
index b41103ad6f4123d80d770f102e012371f445d263..353cd7aa455eaa6f7a28b32c81f289a85798c545 100644 (file)
@@ -84,6 +84,7 @@ OPTS=" \
        --disable-ipv6 \
        --disable-zph-qos \
        --disable-auto-locale \
+       --disable-translation \
  \
        --without-pthreads \
        --without-aio \
index d74486671da481c87cb48b092c6cfaca67c46934..70e116a9213f92cb606b5ef3f0944aad07e1b8a0 100644 (file)
@@ -93,6 +93,7 @@ OPTS=" \
        --enable-x-accelerator-vary \
        --enable-ipv6 \
        --enable-auto-locale \
+       --enable-translation \
        --enable-zph-qos \
  \
        --with-aio \