configure: Cache result of the msgfmt check.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
stable
Alexandre Julliard 2019-04-14 14:59:37 +02:00
parent 9b75443c2f
commit 9d250fbfa2
2 changed files with 15 additions and 13 deletions

15
configure vendored
View File

@ -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." ;;

View File

@ -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.],