diff options
Diffstat (limited to 'source4/lib/ldb/configure.in')
-rw-r--r-- | source4/lib/ldb/configure.in | 36 |
1 files changed, 31 insertions, 5 deletions
diff --git a/source4/lib/ldb/configure.in b/source4/lib/ldb/configure.in index b3a58b56fc..9fc628280b 100644 --- a/source4/lib/ldb/configure.in +++ b/source4/lib/ldb/configure.in @@ -13,12 +13,22 @@ AC_DEFUN([SMB_EXT_LIB], [echo -n ""]) AC_DEFUN([SMB_ENABLE], [echo -n ""]) AC_INIT(include/ldb.h) AC_CONFIG_SRCDIR([common/ldb.c]) +AC_PROG_CC + +if test "$ac_cv_prog_gcc" = yes; then + CFLAGS="$CFLAGS -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings" +fi + WITH_GCOV=0 AC_ARG_ENABLE(gcov, AS_HELP_STRING([--enable-gcov],[enable GCOV code coverage tests]), [ WITH_GCOV=1]) AC_SUBST(WITH_GCOV) -AC_PROG_CC +if test x"$with_gcov_support" = x"yes"; then + CFLAGS="$CFLAGS -ftest-coverage -fprofile-arcs" + LIBS="$LIBS -lgcov" +fi + AC_SYS_LARGEFILE AC_FUNC_MMAP AC_PATH_PROG(XSLTPROC,xsltproc) @@ -38,12 +48,28 @@ AC_SUBST(MODULESDIR) sinclude(popt.m4) +TESTS="" +EXTRA_OBJ="" + sinclude(ldap.m4) -WITH_LDAP=$with_ldap_support -AC_SUBST(WITH_LDAP) +if test x"$with_ldap_support" = x"yes"; then + LIBS="$LIBS -L/usr/lib -llber -lldap" + CFLAGS="$CFLAGS -DHAVE_LDAP=1" + EXTRA_OBJ="$EXTRA_OBJ ldb_ldap/ldb_ldap.o" + TESTS="$TESTS test-ldap.sh" +fi + sinclude(sqlite3.m4) -WITH_SQLITE3=$with_sqlite3_support -AC_SUBST(WITH_SQLITE3) +if test x"$with_sqlite3_support" = x"yes"; then + LIBS="$LIBS -L/usr/lib -lsqlite3" + CFLAGS="$CFLAGS -DHAVE_SQLITE3=1" + EXTRA_OBJ="$EXTRA_OBJ ldb_sqlite3/ldb_sqlite3.o" + TESTS="$TESTS test-sqlite3.sh" +fi + +AC_SUBST(TESTS) +AC_SUBST(EXTRA_OBJ) + sinclude(config.m4) sinclude(../talloc/config.m4) sinclude(../tdb/config.m4) |