summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/Makefile.am19
-rw-r--r--common/collection/Makefile.am8
-rw-r--r--common/configure.ac17
3 files changed, 38 insertions, 6 deletions
diff --git a/common/Makefile.am b/common/Makefile.am
index 276bbb2a..47d7c4a9 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 1d8f9373..37d3ddf6 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 a5fa3d54..e3213996 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