summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/Makefile.am2
-rw-r--r--common/collection/Makefile.am16
-rw-r--r--common/collection/collection.pc.in11
-rw-r--r--common/configure.ac2
-rw-r--r--common/ini/Makefile.am16
-rw-r--r--common/ini/ini_config.pc.in11
-rw-r--r--common/trace/Makefile.am1
7 files changed, 43 insertions, 16 deletions
diff --git a/common/Makefile.am b/common/Makefile.am
index b06c0e734..ea23cb953 100644
--- a/common/Makefile.am
+++ b/common/Makefile.am
@@ -1 +1 @@
-SUBDIRS = collection ini
+SUBDIRS = collection ini trace
diff --git a/common/collection/Makefile.am b/common/collection/Makefile.am
index bdc111122..a47f8f99a 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 000000000..c73a588c0
--- /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/
diff --git a/common/configure.ac b/common/configure.ac
index 941125d07..8804b4d74 100644
--- a/common/configure.ac
+++ b/common/configure.ac
@@ -17,7 +17,7 @@ AC_ARG_ENABLE([trace],
AS_IF([test ["$trace_level" -gt "0"] -a ["$trace_level" -lt "8"] ],[AC_SUBST([TRACE_VAR],["-DTRACE_LEVEL=$trace_level"])])
-AC_CONFIG_FILES([Makefile collection/Makefile ini/Makefile])
+AC_CONFIG_FILES([Makefile collection/Makefile collection/collection.pc ini/Makefile ini/ini_config.pc trace/Makefile])
AC_OUTPUT
diff --git a/common/ini/Makefile.am b/common/ini/Makefile.am
index a673aecd8..962172f6e 100644
--- a/common/ini/Makefile.am
+++ b/common/ini/Makefile.am
@@ -4,14 +4,16 @@ TRACE_LEVEL=@TRACE_VAR@
topdir=..
AM_CPPFLAGS = -Wall -I$(topdir) -I$(topdir)/trace -I$(topdir)/collection $(TRACE_LEVEL)
-# Build static libraty
-noinst_LIBRARIES = libini_config.a
-libini_config_a_SOURCES = ini_config.c collection.h trace.h collection_tools.h collection_class.h ini_config.h
+# Set up the pkg-config file
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = ini_config.pc
-# Build shared library
-#lib_LTLIBRARIES = libini.la
-#libini_la_SOURCES = ini_config.c collection.h trace.h collection_tools.h collection_class.h ini_config.h
+# Build library
+lib_LTLIBRARIES = libini_config.la
+libini_config_la_SOURCES = ini_config.c collection.h collection_tools.h collection_class.h
+include_HEADERS = ini_config.h
+# Build unit test
noinst_PROGRAMS = ini_config_ut
ini_config_ut_SOURCES = ini_config_ut.c
-ini_config_ut_LDADD = libini_config.a -lm -lz ../collection/libcollection.a
+ini_config_ut_LDADD = libini_config.la -lm -lz ../collection/libcollection.la \ No newline at end of file
diff --git a/common/ini/ini_config.pc.in b/common/ini/ini_config.pc.in
new file mode 100644
index 000000000..d08e5b5e2
--- /dev/null
+++ b/common/ini/ini_config.pc.in
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: ini_config
+Description: Library to process config files in INI format into a libcollection data structure
+Version: @PACKAGE_VERSION@
+Libs: -L${libdir} -lini_config
+Cflags: -I${includedir}
+URL: http://fedorahosted.org/sssd/
diff --git a/common/trace/Makefile.am b/common/trace/Makefile.am
new file mode 100644
index 000000000..489a9d997
--- /dev/null
+++ b/common/trace/Makefile.am
@@ -0,0 +1 @@
+include_HEADERS = trace.h