2 AC_DEFUN([AC_CHECK_LIB_EXT], [
3 AC_CHECK_LIB([$1],[$3],[$4],[$5],[$7])
4 ac_cv_lib_ext_$1_$3=$ac_cv_lib_$1_$3
6 AC_DEFUN([AC_CHECK_FUNC_EXT], [
7 AC_CHECK_FUNC([$1],[$3],[$4])
8 ac_cv_func_ext_$1=$ac_cv_func_$1
10 AC_DEFUN([SMB_MODULE_DEFAULT], [echo -n ""])
11 AC_DEFUN([SMB_LIBRARY_ENABLE], [echo -n ""])
12 AC_DEFUN([SMB_EXT_LIB], [echo -n ""])
13 AC_DEFUN([SMB_ENABLE], [echo -n ""])
15 AC_CONFIG_SRCDIR([common/ldb.c])
17 AC_LIBREPLACE_ALL_CHECKS
19 if test "$ac_cv_prog_gcc" = yes; then
20 CFLAGS="$CFLAGS -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings"
25 AS_HELP_STRING([--enable-gcov],[enable GCOV code coverage tests]),
28 if test x"$with_gcov_support" = x"yes"; then
29 CFLAGS="$CFLAGS -ftest-coverage -fprofile-arcs"
33 AC_PATH_PROG(XSLTPROC,xsltproc)
34 AC_PATH_PROG(DOXYGEN,doxygen)
35 AC_PATH_PROG(GCOV,gcov)
36 AC_PATH_PROG(SLAPD,slapd)
37 AC_CHECK_HEADERS(stdint.h dlfcn.h)
38 AC_CONFIG_HEADER(include/config.h)
40 LDB_MODULESDIR="${libdir}/ldb"
41 AC_SUBST(LDB_MODULESDIR)
46 m4_include(build_macros.m4)
47 BUILD_WITH_SHARED_BUILD_DIR
50 m4_include(libpopt.m4)
51 m4_include(libtalloc.m4)
53 m4_include(libevents.m4)
56 if test x"$with_ldap_support" = x"yes"; then
57 CFLAGS="$CFLAGS -DHAVE_LDB_LDAP=1"
58 EXTRA_OBJ="$EXTRA_OBJ ldb_ldap/ldb_ldap.o"
59 LDAP_LIBS="-llber -lldap"
61 TESTS="$TESTS test-ldap.sh"
64 m4_include(sqlite3.m4)
65 if test x"$with_sqlite3_support" = x"yes"; then
66 LIBS="$LIBS -lsqlite3"
67 CFLAGS="$CFLAGS -DHAVE_LDB_SQLITE3=1"
68 EXTRA_OBJ="$EXTRA_OBJ ldb_sqlite3/ldb_sqlite3.o"
69 TESTS="$TESTS test-sqlite3.sh"
80 AC_LIBREPLACE_SHLD_FLAGS
82 AC_LIBREPLACE_MDLD_FLAGS
83 AC_LIBREPLACE_RUNTIME_LIB_PATH_VAR
85 AC_PATH_PROGS([PYTHON_CONFIG], [python2.6-config python2.5-config python2.4-config python-config])
86 AC_PATH_PROGS([PYTHON], [python2.6 python2.5 python2.4 python])
88 PYTHON_BUILD_TARGET="build-python"
89 PYTHON_INSTALL_TARGET="install-python"
90 PYTHON_CHECK_TARGET="check-python"
91 AC_SUBST(PYTHON_BUILD_TARGET)
92 AC_SUBST(PYTHON_INSTALL_TARGET)
93 AC_SUBST(PYTHON_CHECK_TARGET)
95 if test -z "$PYTHON_CONFIG"; then
96 PYTHON_BUILD_TARGET=""
97 PYTHON_CHECK_TARGET=""
98 PYTHON_INSTALL_TARGET=""
101 m4_include(libldb.m4)
102 AC_OUTPUT(Makefile ldb.pc)