]> git.sur5r.net Git - kconfig-frontends/commitdiff
parser: build a shared library
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Mon, 13 Feb 2012 23:04:03 +0000 (00:04 +0100)
committerYann E. MORIN" <yann.morin.1998@free.fr>
Mon, 13 Feb 2012 23:04:03 +0000 (00:04 +0100)
A shared library allows for all frontends to share code.
It also allows third-party programs to use the parser.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
.hgignore
bootstrap
configure.ac
frontends/conf/Makefile.am
frontends/gconf/Makefile.am
frontends/mconf/Makefile.am
frontends/nconf/Makefile.am
frontends/qconf/Makefile.am
libs/parser/Makefile.am

index b5aff725caf82cdcf8b936e9e5764a75eb395b7d..2d0f36c5f19f99b2ea76dbceca30de2b7d72e089 100644 (file)
--- a/.hgignore
+++ b/.hgignore
@@ -2,7 +2,10 @@ syntax: glob
 
 .*.swp
 *.o
+*.lo
 *.a
+*.la
+*.lai
 
 frontends/conf/conf
 frontends/gconf/gconf
@@ -12,6 +15,8 @@ frontends/qconf/qconf
 frontends/qconf/qconf.moc
 
 libs/parser/?conf.c
+libs/*/.libs
+frontends/*/.libs
 
 aclocal.m4
 configure
@@ -19,6 +24,7 @@ config.h
 config.h.in
 config.log
 config.status
+libtool
 
 Makefile
 Makefile.in
index b07f76de2977e19a559b31a1ee596549039ad912..004202002bb47948b1a26c884da6d1e3f5affdde 100755 (executable)
--- a/bootstrap
+++ b/bootstrap
@@ -1,6 +1,9 @@
 #!/bin/sh
 set -e
 
+printf "Running libtoolize...\n"
+libtoolize --copy --force
+
 printf "Running aclocal...\n"
 aclocal -Wall --force
 
index 7f7569e3c2bdd0cc9aa14906db316d732b4ba76d..8ee8fd5d83763f8b69f8114dfa4a859eec53f10c 100644 (file)
@@ -78,7 +78,6 @@ AC_SUBST([enable_qconf], [${enable_qconf:-auto}])
 
 #----------------------------------------
 # Some program checks
-AC_PROG_RANLIB
 AC_PROG_LEX
 AC_PROG_YACC
 AC_CHECK_PROGS(
@@ -263,6 +262,10 @@ AM_CONDITIONAL(
     [COND_lxdialog],
     [test "$need_lxdialog" = "yes"])
 
+#---------------------------------------------------------------------------
+# Prepare libtool
+LT_INIT([disable-static])
+
 #----------------------------------------
 # Finalise
 AC_CONFIG_FILES([
index c8068dffe9b808032c1e7deb686052ef64d539c7..7fef926ce74690bd1d2f8d0fedb753b87caa8e88 100644 (file)
@@ -4,4 +4,4 @@ conf_SOURCES = conf.c
 conf_CPPFLAGS = $(AM_CPPFLAGS)  \
                 $(GETTEXT)      \
                 -I../../libs/parser
-conf_LDADD = ../../libs/parser/libkconfigparser.a
+conf_LDADD = ../../libs/parser/libkconfigparser.la
index 3f34d6e5686d44b876f4cd8d17034d41c5b030a1..310198e3d0259fab810b7c93aab8fe89512ec654 100644 (file)
@@ -9,6 +9,6 @@ gconf_CPPFLAGS = $(AM_CPPFLAGS)         \
 gconf_CFLAGS = $(AM_CFLAGS) \
                $(gtk_CFLAGS)
 gconf_LDADD = $(gtk_LIBS)                           \
-              ../../libs/parser/libkconfigparser.a
+              ../../libs/parser/libkconfigparser.la
 gconfdir = $(pkgdatadir)
 gconf_DATA = gconf.glade
index 4e06958b6fa6f2362d4c6dfcefd33cb585375cc6..0440c2d97f26f0e644155aec6e56088fa1ba19cc 100644 (file)
@@ -6,5 +6,5 @@ mconf_CPPFLAGS = $(AM_CPPFLAGS)                 \
                  $(GETTEXT)                     \
                  -I../../libs                   \
                  -I../../libs/parser
-mconf_LDADD = ../../libs/parser/libkconfigparser. \
+mconf_LDADD = ../../libs/parser/libkconfigparser.la \
               ../../libs/lxdialog/liblxdialog.a
index c68566cee9f7579857c6c4f5fcc0e87c4a14ac18..532c8f92edd0968ca313ddc4226c08ef83c86490 100644 (file)
@@ -4,4 +4,4 @@ nconf_SOURCES = nconf.c nconf.gui.c nconf.h
 nconf_CPPFLAGS = $(AM_CPPFLAGS)     \
                  $(GETTEXT)         \
                  -I../../libs/parser
-nconf_LDADD = ../../libs/parser/libkconfigparser.a
+nconf_LDADD = ../../libs/parser/libkconfigparser.la
index 0f4b19957ec3bee6b89838cfa31803daad7df287..f93fe709d6edb08ce886df782aaeb4f852bd8ad9 100644 (file)
@@ -9,7 +9,7 @@ qconf_CPPFLAGS = $(AM_CPPFLAGS)     \
 qconf_CXXFLAGS = $(AM_CXXFLAGS) \
                  $(qt4_CFLAGS)
 qconf_LDADD = $(qt4_LIBS)                           \
-              ../../libs/parser/libkconfigparser.a
+              ../../libs/parser/libkconfigparser.la
 
 .h.moc:
        moc -i $< -o $@
index 5f0d352ce36f3a378f9c032c5dd68d676496a3fd..40fe4b87d7a3a694c15270a5aa9871f5d51438f7 100644 (file)
@@ -1,13 +1,14 @@
 SUFFIXES = .gperf
 
-noinst_LIBRARIES = libkconfigparser.a
-
-libkconfigparser_a_SOURCES = yconf.y
-dist_EXTRA_libkconfigparser_a_SOURCES =   \
+lib_LTLIBRARIES = libkconfigparser.la
+libkconfigparser_la_SOURCES = yconf.y
+dist_EXTRA_libkconfigparser_la_SOURCES =  \
     hconf.gperf lconf.l                   \
     confdata.c menu.c symbol.c util.c     \
     expr.c expr.h lkc.h lkc_proto.h
 
+include_HEADERS = expr.h lkc.h lkc_proto.h
+
 BUILT_SOURCES = hconf.c lconf.c
 
 # Can't use libkconfigparser_a_CPPFLAGS, as it breaks dependencies