summaryrefslogtreecommitdiff
path: root/common/collection
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2009-04-11 10:15:12 -0400
committerSimo Sorce <ssorce@redhat.com>2009-04-13 09:06:39 -0400
commitc1d6bffe9ba81c265042859dddf3b39be87c161b (patch)
tree34209f38304c86a78ea230b8d77c8cc76eeff90d /common/collection
parentb531c1872952c5f9a2a46d0a0dfe8dc63be470fd (diff)
downloadsssd-c1d6bffe9ba81c265042859dddf3b39be87c161b.tar.gz
sssd-c1d6bffe9ba81c265042859dddf3b39be87c161b.tar.bz2
sssd-c1d6bffe9ba81c265042859dddf3b39be87c161b.zip
Build system improvements for common tools
Allows building shared or static libraries using autotools and provides a pkg-config file to simplify inclusion into other parts of the project (or other projects in the future) For now, we will statically link the collection library and INI parser.
Diffstat (limited to 'common/collection')
-rw-r--r--common/collection/Makefile.am16
-rw-r--r--common/collection/collection.pc.in11
2 files changed, 20 insertions, 7 deletions
diff --git a/common/collection/Makefile.am b/common/collection/Makefile.am
index bdc11112..a47f8f99 100644
--- a/common/collection/Makefile.am
+++ b/common/collection/Makefile.am
@@ -4,14 +4,16 @@ TRACE_LEVEL=@TRACE_VAR@
topdir=..
AM_CPPFLAGS = -Wall -I$(topdir) -I$(topdir)/trace $(TRACE_LEVEL)
-# Build static libraty
-noinst_LIBRARIES = libcollection.a
-libcollection_a_SOURCES = collection.c collection_tools.c collection.h trace.h collection_tools.h collection_class.h
+# Set up the pkg-config file
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = collection.pc
-# Build shared library - reserved for future
-# lib_LTLIBRARIES = libcollection.la
-# libcollection_la_SOURCES = collection.c collection_tools.c collection.h trace.h collection_tools.h collection_class.h
+# Build libraty
+lib_LTLIBRARIES = libcollection.la
+libcollection_la_SOURCES = collection.c collection_tools.c collection_tools.h collection_class.h
+include_HEADERS = collection.h collection_tools.h
+# Build unit test
noinst_PROGRAMS = collection_ut
collection_ut_SOURCES = collection_ut.c
-collection_ut_LDADD = libcollection.a -lm -lz
+collection_ut_LDADD = libcollection.la -lm -lz
diff --git a/common/collection/collection.pc.in b/common/collection/collection.pc.in
new file mode 100644
index 00000000..c73a588c
--- /dev/null
+++ b/common/collection/collection.pc.in
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: collection
+Description: A data-type to collect data in a heirarchical structure for easy iteration and serialization
+Version: @PACKAGE_VERSION@
+Libs: -L${libdir} -lcollection
+Cflags: -I${includedir}
+URL: http://fedorahosted.org/sssd/