From 419d4579bcb84a3b10d8b5048df2087a3f55544f Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Thu, 21 May 2009 09:03:01 -0400 Subject: Clean up automake build to work on older versions of libtool LT_INIT is supported only on Libtool >= 2.0, so I reverted it to using AC_PROG_LIBTOOL. Also reorganized how the common libraries were being built. Now they are treated as libtool convenience libraries instead of installable libraries (the --with-singlelib configure flag can still be used to generate a combined, installable DSO) I cleaned up the set of files being installed by automake, so the list of things we need to remove before packaging the RPM is now only the .la files associated with our own plugins. --- common/Makefile.am | 14 ++++++-------- common/collection/Makefile.am | 10 +++++----- common/collection/configure.ac | 5 +---- common/dhash/Makefile.am | 11 ++++++----- common/ini/Makefile.am | 9 +++++---- common/ini/configure.ac | 2 +- common/trace/Makefile.am | 2 +- 7 files changed, 25 insertions(+), 28 deletions(-) (limited to 'common') diff --git a/common/Makefile.am b/common/Makefile.am index 47d7c4a99..42bd483a1 100644 --- a/common/Makefile.am +++ b/common/Makefile.am @@ -1,19 +1,17 @@ ACLOCAL_AMFLAGS = -I m4 - +SUBDIRS = trace collection ini dhash if SINGLELIB # Build all components as a single shared library lib_LTLIBRARIES = libsssd_util.la -libsssd_util_la_SOURCES = \ - collection/collection.c \ - collection/collection_tools.c \ - ini/ini_config.c \ - dhash/dhash.c +libsssd_util_la_SOURCES = +libsssd_util_la_LIBADD = \ + collection/libcollection.la \ + ini/libini_config.la \ + dhash/libdhash.la libsssd_util_la_CFLAGS = $(AM_CFLAGS) \ -I ./collection \ -I ./ini \ -I ./dhash \ -I ./trace -else -SUBDIRS = collection ini trace dhash endif diff --git a/common/collection/Makefile.am b/common/collection/Makefile.am index 86488eddb..0b8d0d035 100644 --- a/common/collection/Makefile.am +++ b/common/collection/Makefile.am @@ -7,17 +7,17 @@ ACLOCAL_AMFLAGS = -I m4 # Set up the pkg-config file pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = collection.pc +dist_noinst_DATA = collection.pc # Build library -lib_LTLIBRARIES = libcollection.la +noinst_LTLIBRARIES = libcollection.la libcollection_la_SOURCES = \ collection.c \ collection_tools.c \ + collection.h \ + collection_tools.h \ collection_priv.h \ - trace.h - -include_HEADERS = collection.h collection_tools.h + ../trace/trace.h # Build unit test noinst_PROGRAMS = collection_ut diff --git a/common/collection/configure.ac b/common/collection/configure.ac index ed51593d9..32a238ce2 100644 --- a/common/collection/configure.ac +++ b/common/collection/configure.ac @@ -3,10 +3,7 @@ AC_CONFIG_SRCDIR([collection.c]) AC_CONFIG_AUX_DIR([build]) AM_INIT_AUTOMAKE([-Wall -Werror foreign]) AC_PROG_CC - -#Until the API is stabilized, we'll statically link -LT_INIT([disable-shared]) - +AC_PROG_LIBTOOL AC_CONFIG_MACRO_DIR([m4]) AC_PROG_INSTALL diff --git a/common/dhash/Makefile.am b/common/dhash/Makefile.am index 67e69b669..9037bf97c 100644 --- a/common/dhash/Makefile.am +++ b/common/dhash/Makefile.am @@ -2,15 +2,16 @@ AM_CPPFLAGS = -Wall ACLOCAL_AMFLAGS = -I m4 pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = dhash.pc +dist_noinst_DATA = dhash.pc -lib_LTLIBRARIES = libdhash.la -libdhash_la_SOURCES = dhash.c -include_HEADERS = dhash.h +noinst_LTLIBRARIES = libdhash.la +libdhash_la_SOURCES = \ + dhash.c \ + dhash.h check_PROGRAMS = dhash_test dhash_example dhash_test_LDADD = dhash.o dhash_example_LDADD = dhash.o examplesdir = $(docdir)/examples -dist_examples_DATA = dhash_test.c dhash_example.c +dist_noinst_DATA += dhash_test.c dhash_example.c diff --git a/common/ini/Makefile.am b/common/ini/Makefile.am index 7278136ec..03d891256 100644 --- a/common/ini/Makefile.am +++ b/common/ini/Makefile.am @@ -7,12 +7,13 @@ ACLOCAL_AMFLAGS = -I m4 # Set up the pkg-config file pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = ini_config.pc +dist_noinst_DATA = ini_config.pc # Build library -lib_LTLIBRARIES = libini_config.la -libini_config_la_SOURCES = ini_config.c -include_HEADERS = ini_config.h +noinst_LTLIBRARIES = libini_config.la +libini_config_la_SOURCES = \ + ini_config.c \ + ini_config.h # Build unit test noinst_PROGRAMS = ini_config_ut diff --git a/common/ini/configure.ac b/common/ini/configure.ac index 63fb1168e..3cf479673 100644 --- a/common/ini/configure.ac +++ b/common/ini/configure.ac @@ -3,7 +3,7 @@ AC_CONFIG_SRCDIR([ini_config.c]) AC_CONFIG_AUX_DIR([build]) AM_INIT_AUTOMAKE([-Wall -Werror foreign]) AC_PROG_CC -LT_INIT([disable-shared]) +AC_PROG_LIBTOOL AC_CONFIG_MACRO_DIR([m4]) AC_PROG_INSTALL diff --git a/common/trace/Makefile.am b/common/trace/Makefile.am index 489a9d997..f0cefd739 100644 --- a/common/trace/Makefile.am +++ b/common/trace/Makefile.am @@ -1 +1 @@ -include_HEADERS = trace.h +dist_noinst_HEADERS = trace.h -- cgit