Alexandre Julliard : configure: Cache result of the msgfmt check.

Alexandre Julliard julliard at winehq.org
Mon Apr 15 16:26:40 CDT 2019


Module: wine
Branch: master
Commit: 9d250fbfa2125b2fa7d824bf8af5bbd3a304ab8b
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=9d250fbfa2125b2fa7d824bf8af5bbd3a304ab8b

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Sun Apr 14 14:59:37 2019 +0200

configure: Cache result of the msgfmt check.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 configure    | 15 +++++++++------
 configure.ac | 13 ++++++-------
 2 files changed, 15 insertions(+), 13 deletions(-)

diff --git a/configure b/configure
index bb0259a..3e87c86 100755
--- a/configure
+++ b/configure
@@ -6712,7 +6712,6 @@ $as_echo "yes ($icotool_version_major.$icotool_version_minor)" >&6; }
 
     with_gettext=yes
   with_gettextpo=yes
-  { ac_cv_header_gettext_po_h=; unset ac_cv_header_gettext_po_h;}
 fi
 
 test "x$with_gettext" != xno || MSGFMT=false
@@ -6720,6 +6719,9 @@ if test "$MSGFMT" != "false"
 then
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether msgfmt supports contexts" >&5
 $as_echo_n "checking whether msgfmt supports contexts... " >&6; }
+if ${wine_cv_msgfmt_contexts+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
   cat >conftest.po <<EOF
 # comment
 msgctxt "ctxt"
@@ -6728,14 +6730,15 @@ msgstr "str"
 EOF
   if $MSGFMT -o /dev/null conftest.po 2>&5
   then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+    wine_cv_msgfmt_contexts=yes
   else
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-    MSGFMT=false
+    wine_cv_msgfmt_contexts=no
   fi
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $wine_cv_msgfmt_contexts" >&5
+$as_echo "$wine_cv_msgfmt_contexts" >&6; }
+  test $wine_cv_msgfmt_contexts != no || MSGFMT=false
+fi
 if test "$MSGFMT" = false; then :
   case "x$with_gettext" in
   x)   as_fn_append wine_warnings "|gettext tools not found (or too old), translations won't be built." ;;
diff --git a/configure.ac b/configure.ac
index e2b7635..719afe6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -366,14 +366,13 @@ else
   dnl Maintainer mode requires gettext
   with_gettext=yes
   with_gettextpo=yes
-  AS_UNSET(ac_cv_header_gettext_po_h)
 fi
 
 test "x$with_gettext" != xno || MSGFMT=false
 if test "$MSGFMT" != "false"
 then
-  AC_MSG_CHECKING([whether msgfmt supports contexts])
-  cat >conftest.po <<EOF
+  AC_CACHE_CHECK([whether msgfmt supports contexts],wine_cv_msgfmt_contexts,
+  [cat >conftest.po <<EOF
 # comment
 msgctxt "ctxt"
 msgid "id"
@@ -381,11 +380,11 @@ msgstr "str"
 EOF
   if $MSGFMT -o /dev/null conftest.po 2>&AS_MESSAGE_LOG_FD
   then
-    AC_MSG_RESULT([yes])
+    wine_cv_msgfmt_contexts=yes
   else
-    AC_MSG_RESULT([no])
-    MSGFMT=false
-  fi
+    wine_cv_msgfmt_contexts=no
+  fi])
+  test $wine_cv_msgfmt_contexts != no || MSGFMT=false
 fi
 WINE_WARNING_WITH(gettext,[test "$MSGFMT" = false],
                   [gettext tools not found (or too old), translations won't be built.],




More information about the wine-cvs mailing list