configure: add check for the program "msgfmt" when i18n is requested

The program may not be installed because it is not needed for non-dev
activities, so it is better to check at the beginning than to let the
compilation fail later. The check is done only if the user has specified
that he wants to install translations.

Took the opportunity to make the generation of "mo" file follow the silent
rules in Makefiles if user enabled them.

Signed-off-by: Christophe <curis@Ares.blacknet.hell>
This commit is contained in:
Christophe CURIS authored and Carlos R. Mafra committed 2015-01-20 21:29:24 +00:00
1 parent 2cfb2b5276
commit b944a4beb2
5 files changed
+9 -4

No files matched your search

+1 -1
View File
@@ -74,7 +74,7 @@ POTFILES += \
SUFFIXES = .po .mo
.po.mo:
msgfmt -c -o $@ $<
$(AM_V_GEN)$(MSGFMT) -c -o $@ $<
all-local: $(CATALOGS)
+1 -1
View File
@@ -40,7 +40,7 @@ POTFILES = \
SUFFIXES = .po .mo
.po.mo:
msgfmt -c -o $@ $<
$(AM_V_GEN)$(MSGFMT) -c -o $@ $<
all-local: $(CATALOGS)
+5
View File
@@ -47,6 +47,11 @@ AS_IF([test "x$LINGUAS" != "x"],
[AC_MSG_ERROR([support for internationalization requested, but gettext was not found])])
LIBS="$wm_save_LIBS"
dnl
dnl The program 'msgfmt' is needed to convert the 'po' files into 'mo' files
AC_CHECK_PROG([MSGFMT], [msgfmt], [msgfmt])
AS_IF([test "x$MSGFMT" = "x"],
[AC_MSG_ERROR([the program 'msgfmt' is mandatory to install translation - do you miss the package 'gettext'?])])
dnl
dnl Environment is sane, let's continue
AC_DEFINE([I18N], [1], [Internationalization (I18N) support (set by configure)])
supported_locales=""
+1 -1
View File
@@ -69,7 +69,7 @@ POTFILES = \
SUFFIXES = .po .mo
.po.mo:
msgfmt -c -o $@ $<
$(AM_V_GEN)$(MSGFMT) -c -o $@ $<
all-local: $(CATALOGS)
+1 -1
View File
@@ -15,7 +15,7 @@ POTFILES = \
SUFFIXES = .po .mo
.po.mo:
msgfmt -c -o $@ $<
$(AM_V_GEN)$(MSGFMT) -c -o $@ $<
all-local: $(CATALOGS)