]> git.sur5r.net Git - kconfig-frontends/commitdiff
configure: allow passing extra libs per-frontend
authorYann E. MORIN" <yann.morin.1998@free.fr>
Mon, 5 Mar 2012 22:28:36 +0000 (23:28 +0100)
committerYann E. MORIN" <yann.morin.1998@free.fr>
Mon, 5 Mar 2012 22:28:36 +0000 (23:28 +0100)
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" <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

index ac7b4c0eec4f92b557a0f869c8d3cf881ef770eb..f856c21e397619b6de5ce9c5256854dfbe6c1e2a 100644 (file)
@@ -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 ])
index 7fef926ce74690bd1d2f8d0fedb753b87caa8e88..bb5d5b6b1137f426dec2fe852bf80e02afbc4e56 100644 (file)
@@ -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)
index d016ce861a907d8c35f82229a20c61ab0920066b..d37b6920b283ba04b8133ad5faa80e03a5b49bc1 100644 (file)
@@ -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
index e2a30d231ce8aa01752f0b4218ec4faaaf1e854b..f33426f302b0cd2667337c8de2ad9f9b462a937e 100644 (file)
@@ -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)
index 0ad338b28aadb23c976d6cb1674088cfe64b62b8..fe437fbb35c00f1d31f62f14c207d84966197e5b 100644 (file)
@@ -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)
index fabfaebf977cd919b39ec5bdaeeafac0a197b3c2..33ea998253859e6ebdea896f42d2da29f857ed79 100644 (file)
@@ -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 $@