configure: verify presence of msgfmt instead of relying on it

This commit is contained in:
Moritz Bunkus 2018-01-21 13:04:29 +01:00
parent de37cf3418
commit a26be1f600
4 changed files with 10 additions and 1 deletions

View File

@ -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

View File

@ -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?

View File

@ -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

View File

@ -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@