diff options
author | Stephen Gallagher <sgallagh@redhat.com> | 2010-01-07 15:11:07 -0500 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2010-01-20 08:56:00 -0500 |
commit | 746391a1719659161f026684193b3fb04593f563 (patch) | |
tree | 600ba93efdd7182db2d96c86ac7f72d5f7377240 /server | |
parent | 8b179530db795f6e974677a11b38c31ca82ba793 (diff) | |
download | sssd-746391a1719659161f026684193b3fb04593f563.tar.gz sssd-746391a1719659161f026684193b3fb04593f563.tar.xz sssd-746391a1719659161f026684193b3fb04593f563.zip |
Split off libdhash into a shared library
Right now, the pkg-config checks for the system version of
libdhash are forcibly disabled, requiring the SSSD to build it
from its own tree. In the future, when we split the libraries off
from the SSSD, it will be easy to switch this check to the
external library.
Diffstat (limited to 'server')
-rw-r--r-- | server/Makefile.am | 15 | ||||
-rw-r--r-- | server/configure.ac | 1 | ||||
-rw-r--r-- | server/external/libdhash.m4 | 12 |
3 files changed, 23 insertions, 5 deletions
diff --git a/server/Makefile.am b/server/Makefile.am index 989b39e6c..100189d48 100644 --- a/server/Makefile.am +++ b/server/Makefile.am @@ -145,11 +145,16 @@ INI_CFG_LIBS = \ -L$(builddir)/../common/ini/.libs/ \ -lini_config -DHASH_CFLAGS = \ - -I$(srcdir)/../common/dhash -DHASH_LIBS = \ - -L$(builddir)/../common/dhash/ \ - -ldhash +if HAVE_SYSTEM_DHASH + DHASH_CFLAGS = $(SYSTEM_DHASH_CFLAGS) + DHASH_LIBS = $(SYSTEM_DHASH_LIBS) +else + DHASH_CFLAGS = \ + -I$(srcdir)/../common/dhash + DHASH_LIBS = \ + -L$(builddir)/../common/dhash/ \ + -ldhash +endif AM_CPPFLAGS = -Wall \ -Iinclude \ diff --git a/server/configure.ac b/server/configure.ac index 72b15cd0e..4f560239a 100644 --- a/server/configure.ac +++ b/server/configure.ac @@ -62,6 +62,7 @@ m4_include([external/libtalloc.m4]) m4_include([external/libtdb.m4]) m4_include([external/libtevent.m4]) m4_include([external/libldb.m4]) +m4_include([external/libdhash.m4]) m4_include([external/pam.m4]) m4_include([external/ldap.m4]) m4_include([external/libpcre.m4]) diff --git a/server/external/libdhash.m4 b/server/external/libdhash.m4 new file mode 100644 index 000000000..e3afdac38 --- /dev/null +++ b/server/external/libdhash.m4 @@ -0,0 +1,12 @@ +AC_SUBST(SYSTEM_DHASH_OBJ) +AC_SUBST(SYSTEM_DHASH_CFLAGS) +AC_SUBST(SYSTEM_DHASH_LIBS) + +PKG_CHECK_MODULES(SYSTEM_DHASH, dhash >= 0.4.0, + have_system_dhash=true, + have_system_dhash=false + ) +# This is future-compatible. Right now, we'll force the use of our +# in-tree copy. When dhash is split off as its own source package, we'll +# fix this test +AM_CONDITIONAL(HAVE_SYSTEM_DHASH, test x$have_system_dhash = xtrue_FORCE_IN_TREE) |