1AC_PREREQ(2.50) 2AC_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 5]) 6AC_DEFUN([AC_CHECK_FUNC_EXT], [ 7 AC_CHECK_FUNC([$1],[$3],[$4]) 8 ac_cv_func_ext_$1=$ac_cv_func_$1 9]) 10AC_DEFUN([SMB_MODULE_DEFAULT], [echo -n ""]) 11AC_DEFUN([SMB_LIBRARY_ENABLE], [echo -n ""]) 12AC_DEFUN([SMB_EXT_LIB], [echo -n ""]) 13AC_DEFUN([SMB_ENABLE], [echo -n ""]) 14AC_INIT(include/ldb.h) 15AC_CONFIG_SRCDIR([common/ldb.c]) 16 17AC_LIBREPLACE_ALL_CHECKS 18 19if test "$ac_cv_prog_gcc" = yes; then 20 CFLAGS="$CFLAGS -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings" 21fi 22 23WITH_GCOV=0 24AC_ARG_ENABLE(gcov, 25 AS_HELP_STRING([--enable-gcov],[enable GCOV code coverage tests]), 26 [ WITH_GCOV=1]) 27AC_SUBST(WITH_GCOV) 28if test x"$with_gcov_support" = x"yes"; then 29 CFLAGS="$CFLAGS -ftest-coverage -fprofile-arcs" 30 LIBS="$LIBS -lgcov" 31fi 32 33AC_PATH_PROG(XSLTPROC,xsltproc) 34AC_PATH_PROG(DOXYGEN,doxygen) 35AC_PATH_PROG(GCOV,gcov) 36AC_PATH_PROG(SLAPD,slapd) 37AC_CHECK_HEADERS(stdint.h dlfcn.h) 38AC_CONFIG_HEADER(include/config.h) 39AC_SEARCH_LIBS(dlopen, dl, AC_DEFINE(HAVE_DLOPEN, [1], [have dlopen])) 40 41SHLIBEXT="so" # Should be set based on OS later on 42AC_SUBST(SHLIBEXT) 43 44AC_DEFINE_UNQUOTED(MODULESDIR, LIBDIR "/ldb" , [Modules directory] ) 45AC_SUBST(MODULESDIR) 46 47TESTS="" 48EXTRA_OBJ="" 49 50m4_include(libpopt.m4) 51m4_include(libtalloc.m4) 52m4_include(libtdb.m4) 53 54m4_include(ldap.m4) 55if test x"$with_ldap_support" = x"yes"; then 56 LIBS="$LIBS -llber -lldap" 57 CFLAGS="$CFLAGS -DHAVE_LDB_LDAP=1" 58 EXTRA_OBJ="$EXTRA_OBJ ldb_ldap/ldb_ldap.o" 59 TESTS="$TESTS test-ldap.sh" 60fi 61 62m4_include(sqlite3.m4) 63if test x"$with_sqlite3_support" = x"yes"; then 64 LIBS="$LIBS -lsqlite3" 65 CFLAGS="$CFLAGS -DHAVE_LDB_SQLITE3=1" 66 EXTRA_OBJ="$EXTRA_OBJ ldb_sqlite3/ldb_sqlite3.o" 67 TESTS="$TESTS test-sqlite3.sh" 68fi 69 70AC_SUBST(TESTS) 71AC_SUBST(EXTRA_OBJ) 72 73m4_include(libldb.m4) 74AC_OUTPUT(Makefile ldb.pc) 75