Cache the status of the initial gettext() check.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 9 May 2011 15:04:19 +0000 (11:04 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 9 May 2011 15:04:19 +0000 (11:04 -0400)
configure
configure.in

index 91205acacd098f192b9a18d843c01aa78069e7dc..1b66a38b36a6d72030480a4f6f309f675d2252a6 100755 (executable)
--- a/configure
+++ b/configure
@@ -16709,6 +16709,12 @@ 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
+    if test "${sudo_cv_gettext+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettext" >&5
+$as_echo_n "checking for gettext... " >&6; }
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -16724,11 +16730,17 @@ main ()
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
 
+           sudo_cv_gettext=yes
+           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sudo_cv_gettext" >&5
+$as_echo "$sudo_cv_gettext" >&6; }
            $as_echo "#define HAVE_LIBINTL_H 1" >>confdefs.h
 
 
 else
 
+           sudo_cv_gettext=no
+           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sudo_cv_gettext" >&5
+$as_echo "$sudo_cv_gettext" >&6; }
            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettext in -lintl" >&5
 $as_echo_n "checking for gettext in -lintl... " >&6; }
 if test "${ac_cv_lib_intl_gettext+set}" = set; then :
@@ -16822,6 +16834,8 @@ rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
 fi
 
+fi
+
 case ${enable_zlib-"yes"} in
     yes)
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gzdopen in -lz" >&5
index 13f0870e77769afeb90b47b78700b01782f8a317..92cd83c7ce365327d8e5c116b116b03d547ac256 100644 (file)
@@ -2151,12 +2151,18 @@ 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
+    AC_CACHE_VAL(sudo_cv_gettext, [
+    AC_MSG_CHECKING([for gettext])
     AC_LINK_IFELSE(
        [
            AC_LANG_PROGRAM([[#include <libintl.h>]], [(void)gettext((char *)0);])
        ], [
+           sudo_cv_gettext=yes
+           AC_MSG_RESULT($sudo_cv_gettext)
            AC_DEFINE(HAVE_LIBINTL_H)
        ], [
+           sudo_cv_gettext=no
+           AC_MSG_RESULT($sudo_cv_gettext)
            AC_CHECK_LIB(intl, gettext,
                [LIBS="${LIBS} -lintl"]
                [AC_DEFINE(HAVE_LIBINTL_H)],
@@ -2164,7 +2170,7 @@ if test "$enable_nls" = "yes"; then
                AC_CHECK_LIB(intl, gettext, [LIBS="${LIBS} -lintl -liconv"]
                    AC_DEFINE(HAVE_LIBINTL_H), [], [-liconv])
            ])
-       ])
+       ])])
 fi
 
 dnl