Compiling on Cygwin requires explicit link against libintl.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
#----------------------------------------
# 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],
[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
-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)
$(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
$(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)
-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)
$(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
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)