From 8cf3c57b468493a4efe3c418bfee36662d9e5124 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Fri, 18 May 2012 00:46:53 +0200 Subject: [PATCH] configure: add check for libintl Compiling on Cygwin requires explicit link against libintl. Signed-off-by: "Yann E. MORIN" --- configure.ac | 12 +++++++++++- frontends/conf/Makefile.am | 1 + frontends/gconf/Makefile.am | 2 +- frontends/mconf/Makefile.am | 2 +- frontends/nconf/Makefile.am | 4 ++-- frontends/qconf/Makefile.am | 2 +- utils/Makefile.am | 3 ++- 7 files changed, 19 insertions(+), 7 deletions(-) diff --git a/configure.ac b/configure.ac index 68e0794..d31465a 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/frontends/conf/Makefile.am b/frontends/conf/Makefile.am index 2bdebb6..10566cc 100644 --- a/frontends/conf/Makefile.am +++ b/frontends/conf/Makefile.am @@ -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) diff --git a/frontends/gconf/Makefile.am b/frontends/gconf/Makefile.am index 109dfa5..93ad7d4 100644 --- a/frontends/gconf/Makefile.am +++ b/frontends/gconf/Makefile.am @@ -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 diff --git a/frontends/mconf/Makefile.am b/frontends/mconf/Makefile.am index d60f6f1..39bb77b 100644 --- a/frontends/mconf/Makefile.am +++ b/frontends/mconf/Makefile.am @@ -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) diff --git a/frontends/nconf/Makefile.am b/frontends/nconf/Makefile.am index 65bc825..a6367d2 100644 --- a/frontends/nconf/Makefile.am +++ b/frontends/nconf/Makefile.am @@ -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) diff --git a/frontends/qconf/Makefile.am b/frontends/qconf/Makefile.am index c62dc15..7160b9e 100644 --- a/frontends/qconf/Makefile.am +++ b/frontends/qconf/Makefile.am @@ -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 diff --git a/utils/Makefile.am b/utils/Makefile.am index 990db30..f81be38 100644 --- a/utils/Makefile.am +++ b/utils/Makefile.am @@ -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) -- 2.39.5