2005-05-16 21:09:51 +00:00
AC_PREREQ(2.50)
2005-05-01 09:04:51 +00:00
AC_DEFUN([AC_CHECK_LIB_EXT], [
AC_CHECK_LIB([$1],[$3],[$4],[$5],[$7])
ac_cv_lib_ext_$1_$3=$ac_cv_lib_$1_$3
])
AC_DEFUN([AC_CHECK_FUNC_EXT], [
AC_CHECK_FUNC([$1],[$3],[$4])
ac_cv_func_ext_$1=$ac_cv_func_$1
])
2005-04-23 04:30:58 +00:00
AC_DEFUN([SMB_MODULE_DEFAULT], [echo -n ""])
AC_DEFUN([SMB_LIBRARY_ENABLE], [echo -n ""])
2005-05-01 09:04:51 +00:00
AC_DEFUN([SMB_EXT_LIB], [echo -n ""])
2005-12-31 03:43:36 +00:00
AC_DEFUN([SMB_ENABLE], [echo -n ""])
2007-09-11 17:27:25 +00:00
AC_INIT(ldb, 0.9.1)
2006-08-22 01:32:29 +00:00
AC_CONFIG_SRCDIR([common/ldb.c])
2006-09-13 16:51:45 +00:00
AC_LIBREPLACE_ALL_CHECKS
2006-08-22 10:46:23 +00:00
if test "$ac_cv_prog_gcc" = yes; then
CFLAGS="$CFLAGS -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings"
fi
2005-05-01 09:04:51 +00:00
WITH_GCOV=0
AC_ARG_ENABLE(gcov,
2006-01-26 16:37:37 +00:00
AS_HELP_STRING([--enable-gcov],[enable GCOV code coverage tests]),
2005-05-01 09:04:51 +00:00
[ WITH_GCOV=1])
AC_SUBST(WITH_GCOV)
2006-08-22 10:46:23 +00:00
if test x"$with_gcov_support" = x"yes"; then
CFLAGS="$CFLAGS -ftest-coverage -fprofile-arcs"
LIBS="$LIBS -lgcov"
fi
2005-05-30 15:59:08 +00:00
AC_PATH_PROG(XSLTPROC,xsltproc)
2006-01-11 16:31:57 +00:00
AC_PATH_PROG(DOXYGEN,doxygen)
2005-04-23 04:30:58 +00:00
AC_PATH_PROG(GCOV,gcov)
2006-08-22 05:33:52 +00:00
AC_PATH_PROG(SLAPD,slapd)
2006-03-20 21:44:59 +00:00
AC_CHECK_HEADERS(stdint.h dlfcn.h)
2005-05-14 22:16:02 +00:00
AC_CONFIG_HEADER(include/config.h)
2006-03-20 21:44:59 +00:00
2007-09-11 16:09:36 +00:00
AC_DEFINE_UNQUOTED(LDB_MODULESDIR, LIBDIR "/ldb" , [Modules directory] )
AC_SUBST(LDB_MODULESDIR)
2005-06-18 07:42:21 +00:00
2006-08-22 10:46:23 +00:00
TESTS=""
EXTRA_OBJ=""
2006-09-05 23:32:35 +00:00
m4_include(libpopt.m4)
m4_include(libtalloc.m4)
m4_include(libtdb.m4)
2006-08-23 04:53:47 +00:00
2006-09-05 15:26:03 +00:00
m4_include(ldap.m4)
2006-08-22 10:46:23 +00:00
if test x"$with_ldap_support" = x"yes"; then
2006-09-25 16:59:00 +00:00
CFLAGS="$CFLAGS -DHAVE_LDB_LDAP=1"
2006-08-22 10:46:23 +00:00
EXTRA_OBJ="$EXTRA_OBJ ldb_ldap/ldb_ldap.o"
2007-09-11 18:24:09 +00:00
LDAP_LIBS="-llber -lldap"
AC_SUBST(LDAP_LIBS)
2006-08-22 10:46:23 +00:00
TESTS="$TESTS test-ldap.sh"
fi
2006-09-05 15:26:03 +00:00
m4_include(sqlite3.m4)
2006-08-22 10:46:23 +00:00
if test x"$with_sqlite3_support" = x"yes"; then
2006-08-24 06:13:11 +00:00
LIBS="$LIBS -lsqlite3"
2006-09-25 16:59:00 +00:00
CFLAGS="$CFLAGS -DHAVE_LDB_SQLITE3=1"
2006-08-22 10:46:23 +00:00
EXTRA_OBJ="$EXTRA_OBJ ldb_sqlite3/ldb_sqlite3.o"
TESTS="$TESTS test-sqlite3.sh"
fi
AC_SUBST(TESTS)
AC_SUBST(EXTRA_OBJ)
2007-11-06 01:05:19 +01:00
AC_LD_EXPORT_DYNAMIC
2007-11-06 02:16:55 +01:00
AC_LD_PICFLAG
2007-11-06 02:35:46 +01:00
AC_LD_SHLIBEXT
2007-11-06 16:23:18 +01:00
AC_LD_SONAMEFLAG
2007-11-16 10:21:57 +01:00
AC_LIBREPLACE_SHLD
2007-11-16 10:10:58 +01:00
AC_LIBREPLACE_SHLD_FLAGS
2007-11-16 08:35:48 +01:00
AC_LIBREPLACE_MDLD
AC_LIBREPLACE_MDLD_FLAGS
2008-01-10 15:36:35 -06:00
AC_LIBREPLACE_RUNTIME_LIB_PATH_VAR
AC_PATH_PROGS([PYTHON_CONFIG], [python2.6-config python2.5-config python2.4-config python-config])
PYTHON_BUILD_TARGET="build-python"
PYTHON_INSTALL_TARGET="install-python"
AC_SUBST(PYTHON_BUILD_TARGET)
AC_SUBST(PYTHON_INSTALL_TARGET)
if test -z "$PYTHON_CONFIG"; then
PYTHON_BUILD_TARGET=""
PYTHON_INSTALL_TARGET=""
fi
2007-11-06 01:05:19 +01:00
2006-09-05 23:32:35 +00:00
m4_include(libldb.m4)
2005-04-26 10:58:54 +00:00
AC_OUTPUT(Makefile ldb.pc)