From 9d250fbfa2125b2fa7d824bf8af5bbd3a304ab8b Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Sun, 14 Apr 2019 14:59:37 +0200 Subject: [PATCH] configure: Cache result of the msgfmt check. Signed-off-by: Alexandre Julliard --- configure | 15 +++++++++------ configure.ac | 13 ++++++------- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/configure b/configure index bb0259a2ab2..3e87c86bbce 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 <&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 e2b76358a89..719afe68301 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 <conftest.po <&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.],