summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2005-06-05 04:18:57 +0000
committerAndrew Bartlett <abartlet@samba.org>2005-06-05 04:18:57 +0000
commit4553da034001e8a537673367d66217c003694268 (patch)
tree44909d67130db90542e058b21d563387d9759006
parent23d0f040993fb97dc2663bb137213070478b1709 (diff)
downloadsamba-4553da034001e8a537673367d66217c003694268.tar.gz
samba-4553da034001e8a537673367d66217c003694268.tar.xz
samba-4553da034001e8a537673367d66217c003694268.zip
r7292: Fix up the build system support for derrell's sqlite3 ldb backend.
It is on by default, so I've also fixed a build issue in it. I'll show how to make it off be default in the next commit. Andrew Bartlett
-rw-r--r--source/configure.in2
-rw-r--r--source/lib/ldb/ldb_sqlite3/ldb_sqlite3.c1
-rw-r--r--source/lib/ldb/sqlite3.m423
3 files changed, 21 insertions, 5 deletions
diff --git a/source/configure.in b/source/configure.in
index 1f8af749dc4..6f24af3a7ff 100644
--- a/source/configure.in
+++ b/source/configure.in
@@ -15,6 +15,8 @@ sinclude(lib/iconv.m4)
sinclude(lib/socket/config.m4)
sinclude(lib/talloc/config.m4)
sinclude(lib/tdb/config.m4)
+sinclude(lib/ldb/ldap.m4)
+sinclude(lib/ldb/sqlite3.m4)
sinclude(lib/ldb/config.m4)
sinclude(lib/events/config.m4)
sinclude(lib/cmdline/config.m4)
diff --git a/source/lib/ldb/ldb_sqlite3/ldb_sqlite3.c b/source/lib/ldb/ldb_sqlite3/ldb_sqlite3.c
index 3fddbe85d4e..b82c0ac6a99 100644
--- a/source/lib/ldb/ldb_sqlite3/ldb_sqlite3.c
+++ b/source/lib/ldb/ldb_sqlite3/ldb_sqlite3.c
@@ -35,6 +35,7 @@
#include <stdarg.h>
#include "includes.h"
+#include "system/filesys.h"
#include "ldb/include/ldb.h"
#include "ldb/include/ldb_private.h"
#include "ldb/ldb_sqlite3/ldb_sqlite3.h"
diff --git a/source/lib/ldb/sqlite3.m4 b/source/lib/ldb/sqlite3.m4
index 8bbe1861602..fe0f398624a 100644
--- a/source/lib/ldb/sqlite3.m4
+++ b/source/lib/ldb/sqlite3.m4
@@ -39,11 +39,24 @@ if test x"$with_sqlite3_support" != x"no"; then
# now see if we can find the sqlite3 libs in standard paths
AC_CHECK_LIB_EXT(sqlite3, SQLITE3_LIBS, sqlite3_open)
- LIBS="$LIBS $SQLITE3_LIBS"
-
- AC_DEFINE(HAVE_SQLITE3,1,[Whether sqlite3 is available])
- AC_MSG_CHECKING(whether SQLITE3 support is used)
- AC_MSG_RESULT(yes)
+ if test x"$ac_cv_lib_ext_sqlite3_sqlite3_open" = x"yes"; then
+ AC_DEFINE(HAVE_SQLITE3,1,[Whether sqlite3 is available])
+ AC_MSG_CHECKING(whether SQLITE3 support is used)
+ AC_MSG_RESULT(yes)
+ with_sqlite3_support=yes
+ SMB_EXT_LIB_ENABLE(SQLITE3,YES)
+ else
+ if test x"$with_sqlite3_support" = x"yes"; then
+ AC_MSG_ERROR(libsqlite3 is needed for SQLITE3 support)
+ else
+ AC_MSG_WARN(libsqlite3 is needed for SQLITE3 support)
+ fi
+
+ SQLITE3_LIBS=""
+ with_sqlite3_support=no
+ fi
+
+ LIBS=$ac_save_LIBS;
fi
SMB_EXT_LIB(SQLITE3,[${SQLITE3_LIBS}],[${SQLITE3_CFLAGS}],[${SQLITE3_CPPFLAGS}],[${SQLITE3_LDFLAGS}])