1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-01-04 21:04:18 +01:00

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
2015-01-20 22:03:58 +01:00
committed by Carlos R. Mafra
parent 2cfb2b5276
commit b944a4beb2
5 changed files with 9 additions and 4 deletions

View File

@@ -74,7 +74,7 @@ POTFILES += \
SUFFIXES = .po .mo
.po.mo:
msgfmt -c -o $@ $<
$(AM_V_GEN)$(MSGFMT) -c -o $@ $<
all-local: $(CATALOGS)

View File

@@ -40,7 +40,7 @@ POTFILES = \
SUFFIXES = .po .mo
.po.mo:
msgfmt -c -o $@ $<
$(AM_V_GEN)$(MSGFMT) -c -o $@ $<
all-local: $(CATALOGS)

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=""

View File

@@ -69,7 +69,7 @@ POTFILES = \
SUFFIXES = .po .mo
.po.mo:
msgfmt -c -o $@ $<
$(AM_V_GEN)$(MSGFMT) -c -o $@ $<
all-local: $(CATALOGS)

View File

@@ -15,7 +15,7 @@ POTFILES = \
SUFFIXES = .po .mo
.po.mo:
msgfmt -c -o $@ $<
$(AM_V_GEN)$(MSGFMT) -c -o $@ $<
all-local: $(CATALOGS)