From a7fd37ae24c7f8461ede086b50869fce3d8d68ca Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Tue, 17 Jan 2012 23:39:28 +0100 Subject: [PATCH] configure: effectively deactivate gettext if missing Signed-off-by: "Yann E. MORIN" --- configure.ac | 7 ++++--- frontends/conf/Makefile.am | 4 +++- frontends/mconf/Makefile.am | 5 ++++- frontends/nconf/Makefile.am | 4 +++- lxdialog/Makefile.am | 4 +++- parser/Makefile.am | 3 +++ 6 files changed, 20 insertions(+), 7 deletions(-) diff --git a/configure.ac b/configure.ac index b4a1e29..3e522ab 100644 --- a/configure.ac +++ b/configure.ac @@ -55,7 +55,7 @@ AC_SUBST([AM_YFLAGS], ["-t -l -p zconf"]) #---------------------------------------- # Check for gettext, for the kconfig frontends -AC_SUBST([gettext]) +AC_SUBST([GETTEXT]) AC_CHECK_HEADERS( [libintl.h], [ac_ct_gettext_hdr=$ac_header; break], @@ -63,8 +63,9 @@ AC_CHECK_HEADERS( AS_IF( [test -n "$ac_ct_gettext_hdr"], [AC_CHECK_DECL( - [gettext],[gettext=y], - [AC_MSG_WARN([gettext is missing, frontends will not be localised])], + [gettext],, + [AC_MSG_WARN([gettext is missing, frontends will not be localised]) + GETTEXT=-DKBUILD_NO_NLS], [#include <$ac_ct_gettext_hdr>])]) #---------------------------------------- diff --git a/frontends/conf/Makefile.am b/frontends/conf/Makefile.am index 5b8a083..72f9a7c 100644 --- a/frontends/conf/Makefile.am +++ b/frontends/conf/Makefile.am @@ -1,5 +1,7 @@ bin_PROGRAMS = conf conf_SOURCES = conf.c -conf_CPPFLAGS = $(AM_CPPFLAGS) -I../../parser +conf_CPPFLAGS = $(AM_CPPFLAGS) \ + $(GETTEXT) \ + -I../../parser conf_LDADD = ../../parser/libkconfigparser.a diff --git a/frontends/mconf/Makefile.am b/frontends/mconf/Makefile.am index 0f2eb37..7c784e2 100644 --- a/frontends/mconf/Makefile.am +++ b/frontends/mconf/Makefile.am @@ -1,5 +1,8 @@ bin_PROGRAMS = mconf mconf_SOURCES = mconf.c -mconf_CPPFLAGS = $(AM_CPPFLAGS) -I../../parser -DCURSES_LOC='"${CURSES_LOC}"' +mconf_CPPFLAGS = $(AM_CPPFLAGS) \ + -DCURSES_LOC='"${CURSES_LOC}"' \ + $(GETTEXT) \ + -I../../parser mconf_LDADD = ../../parser/libkconfigparser.a ../../lxdialog/liblxdialog.a diff --git a/frontends/nconf/Makefile.am b/frontends/nconf/Makefile.am index 3d87b86..f952e71 100644 --- a/frontends/nconf/Makefile.am +++ b/frontends/nconf/Makefile.am @@ -1,5 +1,7 @@ bin_PROGRAMS = nconf nconf_SOURCES = nconf.c nconf.gui.c nconf.h -nconf_CPPFLAGS = $(AM_CPPFLAGS) -I../../parser +nconf_CPPFLAGS = $(AM_CPPFLAGS) \ + $(GETTEXT) \ + -I../../parser nconf_LDADD = ../../parser/libkconfigparser.a -lmenu -lpanel diff --git a/lxdialog/Makefile.am b/lxdialog/Makefile.am index 3404314..5f22423 100644 --- a/lxdialog/Makefile.am +++ b/lxdialog/Makefile.am @@ -9,4 +9,6 @@ liblxdialog_a_SOURCES = \ util.c \ yesno.c -liblxdialog_a_CPPFLAGS = $(AM_CPPFLAGS) -DCURSES_LOC='"${CURSES_LOC}"' +liblxdialog_a_CPPFLAGS = $(AM_CPPFLAGS) \ + -DCURSES_LOC='"${CURSES_LOC}"' \ + $(GETTEXT) diff --git a/parser/Makefile.am b/parser/Makefile.am index 498fd3d..5f0d352 100644 --- a/parser/Makefile.am +++ b/parser/Makefile.am @@ -10,6 +10,9 @@ dist_EXTRA_libkconfigparser_a_SOURCES = \ BUILT_SOURCES = hconf.c lconf.c +# Can't use libkconfigparser_a_CPPFLAGS, as it breaks dependencies +yconf.o: CPPFLAGS+=$(GETTEXT) + .gperf.c: $(GPERF) -t --output-file $@ -a -C -E -g -k 1,3,$$ -p -t $< -- 2.39.5