summaryrefslogtreecommitdiff
path: root/source3/lib/ldb/sqlite3.m4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-09-24 02:49:04 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:14:36 -0500
commit3e2c696e45b24b0192ab7b1ddaf1dd4d79571609 (patch)
tree9c4423bdb006f7c183fea0c87331d23e7043d0b1 /source3/lib/ldb/sqlite3.m4
parent0c3194816b513e3743ddcacd1eca2b683ca39b88 (diff)
downloadsamba-3e2c696e45b24b0192ab7b1ddaf1dd4d79571609.tar.gz
samba-3e2c696e45b24b0192ab7b1ddaf1dd4d79571609.tar.bz2
samba-3e2c696e45b24b0192ab7b1ddaf1dd4d79571609.zip
r18866: Jeremy and Volker have given the go-ahead on the group mapping ldb
code. Yay! This first commit copies lib/ldb/ from Samba4. A huge congratulations should go to Simo on this - he has put an enormous amount of work into ldb, and it's great to see it go into the Samba3 tree. (This used to be commit bbedf2e34315f5c420a3a05dfe22b1d5cf79f042)
Diffstat (limited to 'source3/lib/ldb/sqlite3.m4')
-rw-r--r--source3/lib/ldb/sqlite3.m461
1 files changed, 61 insertions, 0 deletions
diff --git a/source3/lib/ldb/sqlite3.m4 b/source3/lib/ldb/sqlite3.m4
new file mode 100644
index 0000000000..49e3807730
--- /dev/null
+++ b/source3/lib/ldb/sqlite3.m4
@@ -0,0 +1,61 @@
+########################################################
+# Compile with SQLITE3 support?
+
+SQLITE3_LIBS=""
+with_sqlite3_support=no
+AC_MSG_CHECKING([for SQLITE3 support])
+
+AC_ARG_WITH(sqlite3,
+AS_HELP_STRING([--with-sqlite3],[SQLITE3 backend support (default=no)]),
+[ case "$withval" in
+ yes|no|auto)
+ with_sqlite3_support=$withval
+ ;;
+ esac ])
+
+AC_MSG_RESULT($with_sqlite3_support)
+
+if test x"$with_sqlite3_support" != x"no"; then
+ ##################################################################
+ # first test for sqlite3.h
+ AC_CHECK_HEADERS(sqlite3.h)
+
+ if test x"$ac_cv_header_sqlite3_h" != x"yes"; then
+ if test x"$with_sqlite3_support" = x"yes"; then
+ AC_MSG_ERROR(sqlite3.h is needed for SQLITE3 support)
+ else
+ AC_MSG_WARN(sqlite3.h is needed for SQLITE3 support)
+ fi
+
+ with_sqlite3_support=no
+ fi
+fi
+
+if test x"$with_sqlite3_support" != x"no"; then
+ ac_save_LIBS=$LIBS
+
+ ########################################################
+ # now see if we can find the sqlite3 libs in standard paths
+ AC_CHECK_LIB_EXT(sqlite3, SQLITE3_LIBS, sqlite3_open)
+
+ 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_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}])