]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Refactored translation-related option handling
authorFrancesco Chemolli <kinkie@squid-cache.org>
Fri, 30 Jul 2010 19:19:27 +0000 (21:19 +0200)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Fri, 30 Jul 2010 19:19:27 +0000 (21:19 +0200)
configure.in

index f7e02b95ff26bc164c14dd4ece3bacee921169e2..f536960cfe071e21416bbbcbfa48318111b95f7e 100644 (file)
@@ -2985,16 +2985,14 @@ fi
 
 
 dnl Squid will usually attempt to translate when packaging or building from VCS 
-use_translation="yes"
 AC_ARG_ENABLE(translation,
  AS_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
+                Which is usually tried, but may not be needed.]), [ 
+SQUID_YESNO([$enableval],
+     [unrecognized argument to --disable-translation: $enableval])
 ])
 dnl Squid now has .po translation capability, given the right toolkit
-if test "$use_translation" = "yes" ; then
+if test "${enable_translation:=yes}" = "yes" ; then
   AX_WITH_PROG([PO2HTML],[po2html])
 else
   PO2HTML="off"
@@ -3003,22 +3001,17 @@ AC_SUBST(PO2HTML)
 
 dnl Squid now has limited locale handling ...
 dnl on error pages
-use_errlocale=yes
 AC_ARG_ENABLE(auto-locale,
  AS_HELP_STRING([--disable-auto-locale],[This prevents Squid providing localized error pages based on the
                 clients request headers.
-                When disabled Squid requires explicit language configuration.]),
-[ if test "$enableval" = "no" ; then
-    use_errlocale=no
-  fi
+                When disabled Squid requires explicit language configuration.]), [
+SQUID_YESNO([$enableval],
+    [unrecognized argument to --disable-auto-locale: $enableval])
 ])
-if test "$use_errlocale" = "yes" ; then
-    AC_MSG_NOTICE([Enabling Multi-Language Support])
-    AC_DEFINE(USE_ERR_LOCALES,1,[Use multi-language support on error pages])
-else
-    AC_MSG_WARN([Disabling Multi-Language Support])
-    AC_DEFINE(USE_ERR_LOCALES,0,[Use multi-language support on error pages])
-fi
+AC_MSG_NOTICE([Multi-Language support enabled: ${enable_auto_locale:=yes}])
+SQUID_DEFINE_BOOL(USE_ERR_LOCALES,$enable_auto_locale,
+   [Use multi-language support on error pages])
+
 
 dnl Need the debugging version of malloc if available
 XTRA_OBJS=''