summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/Makefile.am15
-rw-r--r--server/configure.ac1
-rw-r--r--server/external/libini_config.m412
3 files changed, 23 insertions, 5 deletions
diff --git a/server/Makefile.am b/server/Makefile.am
index 38b96088..0770a5ba 100644
--- a/server/Makefile.am
+++ b/server/Makefile.am
@@ -145,11 +145,16 @@ else
-lcollection
endif
-INI_CFG_CFLAGS = \
- -I$(srcdir)/../common/ini
-INI_CFG_LIBS = \
- -L$(builddir)/../common/ini/.libs/ \
- -lini_config
+if HAVE_SYSTEM_INI_CONFIG
+ INI_CFG_CFLAGS = $(SYSTEM_INI_CONFIG_CFLAGS)
+ INI_CFG_LIBS = $(SYSTEM_INI_CONFIG_LIBS)
+else
+ INI_CFG_CFLAGS = \
+ -I$(srcdir)/../common/ini
+ INI_CFG_LIBS = \
+ -L$(builddir)/../common/ini/ \
+ -lini_config
+endif
if HAVE_SYSTEM_DHASH
DHASH_CFLAGS = $(SYSTEM_DHASH_CFLAGS)
diff --git a/server/configure.ac b/server/configure.ac
index a67dd15d..1e414a30 100644
--- a/server/configure.ac
+++ b/server/configure.ac
@@ -67,6 +67,7 @@ m4_include([external/libtevent.m4])
m4_include([external/libldb.m4])
m4_include([external/libdhash.m4])
m4_include([external/libcollection.m4])
+m4_include([external/libini_config.m4])
m4_include([external/pam.m4])
m4_include([external/ldap.m4])
m4_include([external/libpcre.m4])
diff --git a/server/external/libini_config.m4 b/server/external/libini_config.m4
new file mode 100644
index 00000000..20291efa
--- /dev/null
+++ b/server/external/libini_config.m4
@@ -0,0 +1,12 @@
+AC_SUBST(SYSTEM_INI_CONFIG_OBJ)
+AC_SUBST(SYSTEM_INI_CONFIG_CFLAGS)
+AC_SUBST(SYSTEM_INI_CONFIG_LIBS)
+
+PKG_CHECK_MODULES(SYSTEM_INI_CONFIG, ini_config >= 0.4.0,
+ have_system_ini_config=true,
+ have_system_ini_config=false
+ )
+# This is future-compatible. Right now, we'll force the use of our
+# in-tree copy. When ini_config is split off as its own source package, we'll
+# fix this test
+AM_CONDITIONAL(HAVE_SYSTEM_INI_CONFIG, test x$have_system_ini_config = xtrue_FORCE_IN_TREE)