]> granicus.if.org Git - sudo/commitdiff
Don't install .mo files if gettext was not found.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Sat, 28 May 2011 13:18:46 +0000 (09:18 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Sat, 28 May 2011 13:18:46 +0000 (09:18 -0400)
configure
configure.in

index 366dfb9d42c1dbe2c0416073232fd17e9328d4a8..9e5fc03eba658151f802c046600f90020052095e 100755 (executable)
--- 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
index 5cfa1e43151ffb529b521c8f8d2eb941c07f47a3..f971d50eef009e87b10a8a0fcee83ab4a674f03f 100644 (file)
@@ -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