From: Yann E. MORIN" Date: Mon, 5 Mar 2012 22:28:36 +0000 (+0100) Subject: configure: allow passing extra libs per-frontend X-Git-Tag: v3.3.0-0~3 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=99c1ba70e623e97ed727bb3ec0c747b27f987c2e;p=kconfig-frontends configure: allow passing extra libs per-frontend When building statically, it might be necessary to pass extra libraries to some frontends. For example: nconf frontend, using ncursesw ncursesw is linked against libgpm Because static dependencies do not follow (no they don't even with libtool's .la libraries!), we have to set them manually. Recognise xxx_LIBS as a list of extra libraries (in the form -lyyy) to pass to frontend xxx. Signed-off-by: "Yann E. MORIN" --- diff --git a/configure.ac b/configure.ac index ac7b4c0..f856c21 100644 --- a/configure.ac +++ b/configure.ac @@ -287,6 +287,14 @@ AS_IF( [test "$has_qt" = "no" ], [enable_qconf=no]) +#---------------------------------------- +# Per-frontends extra libraries +AC_ARG_VAR([conf_EXTRA_LIBS], [Extra libraries to build the conf frontend] ) +AC_ARG_VAR([gconf_EXTRA_LIBS], [Extra libraries to build the gconf frontend]) +AC_ARG_VAR([mconf_EXTRA_LIBS], [Extra libraries to build the mconf frontend]) +AC_ARG_VAR([nconf_EXTRA_LIBS], [Extra libraries to build the nconf frontend]) +AC_ARG_VAR([qconf_EXTRA_LIBS], [Extra libraries to build the qconf frontend]) + #--------------------------------------------------------------------------- # Now, we know what frontends to enable AS_IF([test "$enable_conf" = "auto"], [enable_conf=yes ]) diff --git a/frontends/conf/Makefile.am b/frontends/conf/Makefile.am index 7fef926..bb5d5b6 100644 --- a/frontends/conf/Makefile.am +++ b/frontends/conf/Makefile.am @@ -4,4 +4,5 @@ conf_SOURCES = conf.c conf_CPPFLAGS = $(AM_CPPFLAGS) \ $(GETTEXT) \ -I../../libs/parser -conf_LDADD = ../../libs/parser/libkconfigparser.la +conf_LDADD = ../../libs/parser/libkconfigparser.la \ + $(conf_EXTRA_LIBS) diff --git a/frontends/gconf/Makefile.am b/frontends/gconf/Makefile.am index d016ce8..d37b692 100644 --- a/frontends/gconf/Makefile.am +++ b/frontends/gconf/Makefile.am @@ -9,6 +9,6 @@ gconf_CPPFLAGS = $(AM_CPPFLAGS) \ gconf_CFLAGS = $(AM_CFLAGS) \ $(gtk_CFLAGS) gconf_LDADD = ../../libs/parser/libkconfigparser.la \ - $(gtk_LIBS) + $(gtk_LIBS) $(gconf_EXTRA_LIBS) gconfdir = $(pkgdatadir) gconf_DATA = gconf.glade diff --git a/frontends/mconf/Makefile.am b/frontends/mconf/Makefile.am index e2a30d2..f33426f 100644 --- a/frontends/mconf/Makefile.am +++ b/frontends/mconf/Makefile.am @@ -8,4 +8,4 @@ mconf_CPPFLAGS = $(AM_CPPFLAGS) \ -I../../libs/parser mconf_LDADD = ../../libs/parser/libkconfigparser.la \ ../../libs/lxdialog/liblxdialog.a \ - $(ncurses_LIBS) + $(ncurses_LIBS) $(mconf_EXTRA_LIBS) diff --git a/frontends/nconf/Makefile.am b/frontends/nconf/Makefile.am index 0ad338b..fe437fb 100644 --- a/frontends/nconf/Makefile.am +++ b/frontends/nconf/Makefile.am @@ -5,4 +5,5 @@ nconf_CPPFLAGS = $(AM_CPPFLAGS) \ $(GETTEXT) \ -I../../libs/parser nconf_LDADD = ../../libs/parser/libkconfigparser.la \ - $(ncurses_extra_LIBS) $(ncurses_LIBS) + $(ncurses_extra_LIBS) $(ncurses_LIBS) \ + $(nconf_EXTRA_LIBS) diff --git a/frontends/qconf/Makefile.am b/frontends/qconf/Makefile.am index fabfaeb..33ea998 100644 --- a/frontends/qconf/Makefile.am +++ b/frontends/qconf/Makefile.am @@ -9,7 +9,7 @@ qconf_CPPFLAGS = $(AM_CPPFLAGS) \ qconf_CXXFLAGS = $(AM_CXXFLAGS) \ $(qt4_CFLAGS) qconf_LDADD = ../../libs/parser/libkconfigparser.la \ - $(qt4_LIBS) + $(qt4_LIBS) $(qconf_EXTRA_LIBS) .h.moc: moc -i $< -o $@