summaryrefslogtreecommitdiffstats
path: root/source4/lib/ldb/sqlite3.m4
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2005-06-05 04:18:57 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:17:37 -0500
commitc88d65a862cefe832f3b5f38844829372a926e33 (patch)
treef1354162698e84fdfe2ae993aa6ba4984f7b16b4 /source4/lib/ldb/sqlite3.m4
parent2e787b5b17afe761c863ccccc262c2a276bdbc66 (diff)
downloadsamba-c88d65a862cefe832f3b5f38844829372a926e33.tar.gz
samba-c88d65a862cefe832f3b5f38844829372a926e33.tar.xz
samba-c88d65a862cefe832f3b5f38844829372a926e33.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 (This used to be commit 5a1ef888100e8ef803100a6341133d96e8a400b0)
Diffstat (limited to 'source4/lib/ldb/sqlite3.m4')
-rw-r--r--source4/lib/ldb/sqlite3.m423
1 files changed, 18 insertions, 5 deletions
diff --git a/source4/lib/ldb/sqlite3.m4 b/source4/lib/ldb/sqlite3.m4
index 8bbe186160..fe0f398624 100644
--- a/source4/lib/ldb/sqlite3.m4
+++ b/source4/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}])