diff options
Diffstat (limited to 'source4/configure.ac')
-rw-r--r-- | source4/configure.ac | 65 |
1 files changed, 46 insertions, 19 deletions
diff --git a/source4/configure.ac b/source4/configure.ac index c947a1629a..52be29c022 100644 --- a/source4/configure.ac +++ b/source4/configure.ac @@ -27,26 +27,53 @@ m4_include(lib/charset/config.m4) m4_include(lib/socket/config.m4) m4_include(nsswitch/nsstest.m4) -#SMB_EXT_LIB_FROM_PKGCONFIG(LIBTALLOC, talloc >= 1.0, -# [samba_cv_internal_talloc=no], -# [samba_cv_internal_talloc=yes]) -samba_cv_internal_talloc=yes -if test x"$samba_cv_internal_talloc" = x"yes"; then - m4_include(lib/talloc/libtalloc.m4) - SMB_INCLUDE_MK(lib/talloc/config.mk) -fi - -#SMB_EXT_LIB_FROM_PKGCONFIG(LIBTDB, tdb >= 1.1.0, -# [samba_cv_internal_tdb=no], -# [samba_cv_internal_tdb=yes]) -samba_cv_internal_tdb=yes -if test x"$samba_cv_internal_tdb" = x"yes"; then - m4_include(lib/tdb/libtdb.m4) - SMB_INCLUDE_MK(lib/tdb/config.mk) -fi +SMB_EXT_LIB_FROM_PKGCONFIG(LIBTALLOC, talloc >= 1.1.0, + [], + [ + m4_include(lib/talloc/libtalloc.m4) + SMB_INCLUDE_MK(lib/talloc/config.mk) + ] +) + +SMB_EXT_LIB_FROM_PKGCONFIG(LIBTDB, tdb >= 1.1.0, + [], + [ + m4_include(lib/tdb/libtdb.m4) + SMB_INCLUDE_MK(lib/tdb/config.mk) + ] +) + +SMB_EXT_LIB_FROM_PKGCONFIG(LIBLDB, ldb >= 0.9.1, + [ + SMB_INCLUDE_MK(lib/ldb/ldb_ildap/config.mk) + SMB_INCLUDE_MK(lib/ldb/tools/config.mk) + SMB_SUBSYSTEM(ldb_map, [], [LIBLDB]) + define_ldb_modulesdir=no + ], + [ + # Here we need to do some tricks + # with AC_CONFIG_COMMANDS_PRE + # as that's the deferrs the commands + # to location after $prefix and $exec_prefix + # have usefull values and directly before + # creating config.status. + # + # The 'eval eval echo' trick is used to + # actually get the raw absolute directory + # path as this is needed in config.h + define_ldb_modulesdir=yes + AC_CONFIG_COMMANDS_PRE([ + if test x"$define_ldb_modulesdir" = x"yes";then + LDB_MODULESDIR=`eval eval echo ${modulesdir}/ldb` + AC_DEFINE_UNQUOTED(LDB_MODULESDIR, "${LDB_MODULESDIR}" , [ldb Modules directory]) + fi + ]) + m4_include(lib/ldb/sqlite3.m4) + m4_include(lib/ldb/libldb.m4) + SMB_INCLUDE_MK(lib/ldb/config.mk) + ] +) -m4_include(lib/ldb/sqlite3.m4) -m4_include(lib/ldb/libldb.m4) m4_include(lib/tls/config.m4) m4_include(lib/events/config.m4) |