From: Francesco Chemolli Date: Fri, 30 Jul 2010 19:19:27 +0000 (+0200) Subject: Refactored translation-related option handling X-Git-Tag: take1~402^2~2^2~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fb46b7789f075d367e006b24c454cbecc091d0bc;p=thirdparty%2Fsquid.git Refactored translation-related option handling --- diff --git a/configure.in b/configure.in index f7e02b95ff..f536960cfe 100644 --- a/configure.in +++ b/configure.in @@ -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=''