diff --git a/src/auto/configure b/src/auto/configure index 5c1464835300ee..9712104cde7ae7 100755 --- a/src/auto/configure +++ b/src/auto/configure @@ -650,6 +650,7 @@ ac_subst_vars='LTLIBOBJS LIBOBJS LINK_AS_NEEDED DEPEND_CFLAGS_FILTER +MSGFMTCMD MSGFMT_DESKTOP MAKEMO MSGFMT @@ -15964,6 +15965,18 @@ printf "%s\n" "yes" >&6; } printf "%s\n" "no" >&6; } fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if msgfmt supports --no-convert" >&5 +printf %s "checking if msgfmt supports --no-convert... " >&6; } + if "$MSGFMT" --help | grep -q -- '--no-convert' >/dev/null; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + MSGFMTCMD="OLD_PO_FILE_INPUT=yes msgfmt --no-convert -v" + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + MSGFMTCMD="OLD_PO_FILE_INPUT=yes msgfmt -v" + fi + fi else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no \"po/Makefile\" - disabled" >&5 diff --git a/src/config.mk.in b/src/config.mk.in index 4eb692839be5d0..2aaaf69f4343f3 100644 --- a/src/config.mk.in +++ b/src/config.mk.in @@ -175,6 +175,7 @@ OS_EXTRA_OBJ = @OS_EXTRA_OBJ@ MAKEMO = @MAKEMO@ MSGFMT = @MSGFMT@ +MSGFMTCMD = @MSGFMTCMD@ MSGFMT_DESKTOP = @MSGFMT_DESKTOP@ ### set if $SOURCE_DATE_EPOCH was set when running configure diff --git a/src/configure.ac b/src/configure.ac index 664f2194054e07..6311269e158fd7 100644 --- a/src/configure.ac +++ b/src/configure.ac @@ -4523,6 +4523,15 @@ if test "$enable_nls" = "yes"; then AC_MSG_RESULT([no]) fi AC_SUBST(MSGFMT_DESKTOP) + AC_MSG_CHECKING([if msgfmt supports --no-convert]) + if "$MSGFMT" --help | grep -q -- '--no-convert' >/dev/null; then + AC_MSG_RESULT([yes]) + MSGFMTCMD="OLD_PO_FILE_INPUT=yes msgfmt --no-convert -v" + else + AC_MSG_RESULT([no]) + MSGFMTCMD="OLD_PO_FILE_INPUT=yes msgfmt -v" + fi + AC_SUBST(MSGFMTCMD) fi else AC_MSG_RESULT([no "po/Makefile" - disabled]); diff --git a/src/po/Makefile b/src/po/Makefile index 03aaa532c608b4..6f505b2208bd8a 100644 --- a/src/po/Makefile +++ b/src/po/Makefile @@ -20,8 +20,9 @@ SED = LANG=C sed # tools 0.10.37, which use a slightly different .po file format that is not # compatible with Solaris (and old gettext implementations) unless these are # set. gettext 0.10.36 will not work! -MSGFMTC != if $(MSGFMT) --help |grep -q -- --no-convert ; then echo msgfmt -v --no-convert; else echo msgfmt -v; fi -MSGFMTCMD = OLD_PO_FILE_INPUT=yes $(MSGFMTC) + +# MSGFMTCMD is defined by Configure in ../auto/config.mk +# MSGFMTCMD = OLD_PO_FILE_INPUT=yes $(MSGFMT) -v XGETTEXT = OLD_PO_FILE_INPUT=yes OLD_PO_FILE_OUTPUT=yes xgettext MSGMERGE = OLD_PO_FILE_INPUT=yes OLD_PO_FILE_OUTPUT=yes msgmerge