From a26be1f6004e0861df482469831326709ec64f2a Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Sun, 21 Jan 2018 13:04:29 +0100 Subject: [PATCH] configure: verify presence of `msgfmt` instead of relying on it --- NEWS.md | 3 +++ Rakefile | 2 +- ac/translations.m4 | 5 +++++ build-config.in | 1 + 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index d846e238b..d9d6e4465 100644 --- a/NEWS.md +++ b/NEWS.md @@ -18,6 +18,9 @@ line feed) again instead of just `\n` (line feed). * build system: an error message is output if a command to execute is not found instead of silently failing. +* build system: in addition to looking for the `gettext` C function and + library, `configure` now also verifies the presence of the `msgfmt` program + instead of simply relying on it. # Version 20.0.0 "I Am The Sun" 2018-01-15 diff --git a/Rakefile b/Rakefile index f0678c5ed..2f36fe292 100644 --- a/Rakefile +++ b/Rakefile @@ -309,7 +309,7 @@ if $building_for[:windows] end rule '.mo' => '.po' do |t| - runq "msgfmt", t.source, "msgfmt -c -o #{t.name} #{t.sources.join(" ")}" + runq "msgfmt", t.source, "#{c(:MSGFMT)} -c -o #{t.name} #{t.sources.join(" ")}" end if !c(:LCONVERT).blank? diff --git a/ac/translations.m4 b/ac/translations.m4 index c079de12a..0fb779fef 100644 --- a/ac/translations.m4 +++ b/ac/translations.m4 @@ -12,6 +12,11 @@ if test "x$with_gettext" != "xno"; then [ gettext_found=no ], [ -liconv ]) fi + + AC_PATH_PROG(MSGFMT, msgfmt,, $PATH) + if test -z "$MSGFMT"; then + gettext_found=no + fi fi if test x"$gettext_found" = xyes ; then diff --git a/build-config.in b/build-config.in index ef822f49f..7d2942644 100644 --- a/build-config.in +++ b/build-config.in @@ -58,6 +58,7 @@ install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c LCONVERT = @LCONVERT@ LD = @LD@ +MSGFMT = @MSGFMT@ MOC = @MOC@ OBJEXT = @OBJEXT@ PANDOC = @PANDOC@