From: Todd C. Miller Date: Sat, 28 May 2011 13:18:46 +0000 (-0400) Subject: Don't install .mo files if gettext was not found. X-Git-Tag: SUDO_1_8_2~94^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=97214c448514836ae4a546311d4689ad44f0f310;p=sudo Don't install .mo files if gettext was not found. --- diff --git a/configure b/configure index 366dfb9d4..9e5fc03eb 100755 --- a/configure +++ b/configure @@ -16771,8 +16771,6 @@ done # make sure we use the gettext() that matches the include file. # First check that it links w/o additional libs, then try with -lintl. if test "$enable_nls" = "yes"; then - # List of translations - LINGUAS="uk zh_CN" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettext" >&5 $as_echo_n "checking for gettext... " >&6; } if test "${sudo_cv_gettext+set}" = set; then : @@ -16890,12 +16888,18 @@ if test "x$ac_cv_lib_intl_gettext_liconv" = x""yes; then : LIBINTL="-lintl -liconv" $as_echo "#define HAVE_LIBINTL_H 1" >>confdefs.h +else + enable_nls=no fi fi fi + if test "$enable_nls" = "yes"; then + # List of available translations + LINGUAS="uk zh_CN" + fi fi case ${enable_zlib-"yes"} in diff --git a/configure.in b/configure.in index 5cfa1e431..f971d50ee 100644 --- a/configure.in +++ b/configure.in @@ -2193,8 +2193,6 @@ AC_CHECK_FUNCS(getprogname, , [ # make sure we use the gettext() that matches the include file. # First check that it links w/o additional libs, then try with -lintl. if test "$enable_nls" = "yes"; then - # List of translations - LINGUAS="uk zh_CN" AC_MSG_CHECKING([for gettext]) AC_CACHE_VAL(sudo_cv_gettext, [ AC_LINK_IFELSE( @@ -2211,9 +2209,13 @@ if test "$enable_nls" = "yes"; then [AC_DEFINE(HAVE_LIBINTL_H)], [ AC_CHECK_LIB(intl, gettext, [LIBINTL="-lintl -liconv"] - AC_DEFINE(HAVE_LIBINTL_H), [], [-liconv]) + AC_DEFINE(HAVE_LIBINTL_H), [enable_nls=no], [-liconv]) ]) fi + if test "$enable_nls" = "yes"; then + # List of available translations + LINGUAS="uk zh_CN" + fi fi dnl