]> git.sur5r.net Git - kconfig-frontends/commitdiff
configure: add check for libintl
authorYann E. MORIN" <yann.morin.1998@free.fr>
Thu, 17 May 2012 22:46:53 +0000 (00:46 +0200)
committerYann E. MORIN" <yann.morin.1998@free.fr>
Thu, 17 May 2012 22:46:53 +0000 (00:46 +0200)
Compiling on Cygwin requires explicit link against libintl.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
configure.ac
frontends/conf/Makefile.am
frontends/gconf/Makefile.am
frontends/mconf/Makefile.am
frontends/nconf/Makefile.am
frontends/qconf/Makefile.am
utils/Makefile.am

index 68e0794e467413ffe9ca0eb427d65546504c5976..d31465a3b73dbb3670a2f2da0f9b4de6f5453f70 100644 (file)
@@ -216,6 +216,7 @@ AC_CHECK_FUNCS([ gettimeofday mkdir regcomp setlocale uname ])
 #----------------------------------------
 # Check for gettext, for the kconfig frontends
 AC_SUBST([intl_CPPFLAGS])
+AC_SUBST([intl_LIBS])
 AC_CHECK_HEADERS(
     [libintl.h],
     [ac_ct_gettext_hdr=$ac_header; break],
@@ -227,7 +228,16 @@ AS_IF(
         [gettext],,
         [AC_MSG_WARN([gettext is missing, frontends will not be localised])
          intl_CPPFLAGS=-DKBUILD_NO_NLS],
-        [#include <$ac_ct_gettext_hdr>])])
+        [#include <$ac_ct_gettext_hdr>])
+     LIBS_old="$LIBS"
+     LIBS=
+     AC_SEARCH_LIBS(
+        [gettext],
+        [intl],,
+        [AC_MSG_WARN([gettext is missing, frontends will not be localised])
+         intl_CPPFLAGS=-DKBUILD_NO_NLS])
+    intl_LIBS="$LIBS"
+    LIBS="$LIBS_old"])
 
 #----------------------------------------
 # Check for ncurses, for the mconf & nconf frontends
index 2bdebb6e787f53b7d791b2a9079569ae12d85988..10566cc424b58791c7346c9fe315ef2b9b498945 100644 (file)
@@ -6,4 +6,5 @@ conf_CPPFLAGS = $(AM_CPPFLAGS)      \
                 -I$(top_srcdir)/libs/parser
 conf_CFLAGS = $(AM_CFLAGS) $(kf_CFLAGS)
 conf_LDADD = $(top_builddir)/libs/parser/libkconfig-parser.la  \
+             $(intl_LIBS)                                      \
              $(conf_EXTRA_LIBS)
index 109dfa50459ad66344fa54fde8420b1e5c9de856..93ad7d46d04b63d35d578cd0fa59282dcf88f898 100644 (file)
@@ -11,7 +11,7 @@ gconf_CFLAGS = $(AM_CFLAGS) \
                $(gtk_CFLAGS)
 gconf_LDADD = $(top_builddir)/libs/parser/libkconfig-parser.la  \
               $(top_builddir)/libs/images/libkconfig-images.a   \
-              $(gtk_LIBS) $(gconf_EXTRA_LIBS)
+              $(intl_LIBS) $(gtk_LIBS) $(gconf_EXTRA_LIBS)
 gconfdir = $(pkgdatadir)
 gconf_DATA = gconf.glade
 EXTRA_DIST = gconf.c.patch
index d60f6f1a00b178dccc1ac316f8546d559d645bb7..39bb77b2803ca3824c5d3b31562b7e7855fa0599 100644 (file)
@@ -10,4 +10,4 @@ mconf_CFLAGS = $(AM_CFLAGS) \
                $(kf_CFLAGS)
 mconf_LDADD = $(top_builddir)/libs/parser/libkconfig-parser.la      \
               $(top_builddir)/libs/lxdialog/libkconfig-lxdialog.a   \
-              $(ncurses_LIBS) $(mconf_EXTRA_LIBS)
+              $(intl_LIBS) $(ncurses_LIBS) $(mconf_EXTRA_LIBS)
index 65bc825d22a55c568dfc537f2580739692fea911..a6367d2ace7791a2d70e0cc0735be56ea02721de 100644 (file)
@@ -6,6 +6,6 @@ nconf_CPPFLAGS = $(AM_CPPFLAGS)     \
                  -I$(top_srcdir)/libs/parser
 nconf_CFLAGS = $(AM_CFLAGS) \
                $(kf_CFLAGS)
-nconf_LDADD = $(top_builddir)/libs/parser/libkconfig-parser.la  \
-              $(ncurses_extra_LIBS) $(ncurses_LIBS)             \
+nconf_LDADD = $(top_builddir)/libs/parser/libkconfig-parser.la      \
+              $(intl_LIBS) $(ncurses_extra_LIBS) $(ncurses_LIBS)    \
               $(nconf_EXTRA_LIBS)
index c62dc15c012577c38d0b0eb8695c85cf2aba97f8..7160b9ead38635e5744e6178c1098f0279a7acbb 100644 (file)
@@ -11,7 +11,7 @@ qconf_CXXFLAGS = $(AM_CXXFLAGS) \
                  $(qt4_CFLAGS)
 qconf_LDADD = $(top_builddir)/libs/parser/libkconfig-parser.la  \
               $(top_builddir)/libs/images/libkconfig-images.a   \
-              $(qt4_LIBS) $(qconf_EXTRA_LIBS)
+              $(intl_LIBS) $(qt4_LIBS) $(qconf_EXTRA_LIBS)
 CLEANFILES = qconf.moc
 EXTRA_DIST = qconf.cc.patch
 
index 990db30aabd8533e655ea71dbe45c5efa4893d20..f81be3816bd4f0787d1dd0ba608b0f10ff34c5c4 100644 (file)
@@ -6,4 +6,5 @@ gettext_SOURCES = gettext.c
 gettext_CPPFLAGS = $(AM_CPPFLAGS)   \
                    -I$(top_srcdir)/libs/parser
 gettext_CFLAGS = $(AM_CFLAGS) $(kf_CFLAGS)
-gettext_LDADD = $(top_builddir)/libs/parser/libkconfig-parser.la
+gettext_LDADD = $(top_builddir)/libs/parser/libkconfig-parser.la    \
+                $(intl_LIBS)