]> git.sur5r.net Git - kconfig-frontends/commitdiff
configure: effectively deactivate gettext if missing
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue, 17 Jan 2012 22:39:28 +0000 (23:39 +0100)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue, 17 Jan 2012 22:39:28 +0000 (23:39 +0100)
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
configure.ac
frontends/conf/Makefile.am
frontends/mconf/Makefile.am
frontends/nconf/Makefile.am
lxdialog/Makefile.am
parser/Makefile.am

index b4a1e29a715faff3eda3364398aead94e7dca68b..3e522abdaeedaa68db17917d749d727916b8d77f 100644 (file)
@@ -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>])])
 
 #----------------------------------------
index 5b8a08305d320146fdee898a441dfde145c91e15..72f9a7c981e442db9b023f2984e910803437b646 100644 (file)
@@ -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
index 0f2eb37259bb16a7a10f858a7d866506934dd6e2..7c784e2ef2b0dd2f741f4aca28b754431f98ff04 100644 (file)
@@ -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
index 3d87b865a56804e6874cbedf6adaf4f159e48659..f952e711d2084b056f406e596bea37acc46fbb05 100644 (file)
@@ -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
index 3404314bdc2a89a2bd8c4bca98f0225e419c566c..5f22423d2485f24a4380a3f5b7f0578ae374f0e6 100644 (file)
@@ -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)
index 498fd3d29cc8780024c7d4d8e0c454b3ee049363..5f0d352ce36f3a378f9c032c5dd68d676496a3fd 100644 (file)
@@ -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 $<