#----------------------------------------
# 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],
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>])])
#----------------------------------------
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
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
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
util.c \
yesno.c
-liblxdialog_a_CPPFLAGS = $(AM_CPPFLAGS) -DCURSES_LOC='"${CURSES_LOC}"'
+liblxdialog_a_CPPFLAGS = $(AM_CPPFLAGS) \
+ -DCURSES_LOC='"${CURSES_LOC}"' \
+ $(GETTEXT)
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 $<