From 50c10e1f61a1bef93a7f768ad6edb28989f1761b Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Tue, 12 May 2009 11:56:27 -0400 Subject: Enable building a single libsssd_utils.so from common --- common/Makefile.am | 19 ++++++++++++++++++- common/collection/Makefile.am | 8 +++++++- common/configure.ac | 17 +++++++++++++---- 3 files changed, 38 insertions(+), 6 deletions(-) (limited to 'common') diff --git a/common/Makefile.am b/common/Makefile.am index 276bbb2a1..47d7c4a99 100644 --- a/common/Makefile.am +++ b/common/Makefile.am @@ -1,2 +1,19 @@ -SUBDIRS = collection ini trace dhash ACLOCAL_AMFLAGS = -I m4 + +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_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 1d8f93738..37d3ddf6a 100644 --- a/common/collection/Makefile.am +++ b/common/collection/Makefile.am @@ -11,7 +11,13 @@ pkgconfig_DATA = collection.pc # Build library lib_LTLIBRARIES = libcollection.la -libcollection_la_SOURCES = collection.c collection_tools.c collection_tools.h collection_class.h +libcollection_la_SOURCES = \ + collection.c \ + collection_tools.c + +noinst_HEADERS = \ + collection_priv.h + include_HEADERS = collection.h collection_tools.h # Build unit test diff --git a/common/configure.ac b/common/configure.ac index a5fa3d547..e32139967 100644 --- a/common/configure.ac +++ b/common/configure.ac @@ -23,8 +23,17 @@ AC_CONFIG_FILES([Makefile AC_CONFIG_SUBDIRS([collection dhash ini]) -AC_OUTPUT - - - +AC_DEFUN([WITH_SINGLELIB], + [ AC_ARG_WITH([singlelib], + [AC_HELP_STRING([--with-singlelib], + [Whether to build a shared object containing all sssd_utils [no]] + ) + ], + [], + with_singlelib=yes + ) + ]) + +AM_CONDITIONAL([SINGLELIB], [test x$with_singlelib = xyes ]) +AC_OUTPUT -- cgit