summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorDerrell Lipman <derrell@samba.org>2005-06-04 21:20:56 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:17:36 -0500
commitf725863f75fda1beed47eaef5cb2c4b5289e4dd1 (patch)
treea973ac819a34be8b1d661aeeacdb9cdaaa5eab5a /source4
parent217a8cfe6677c0d435992f96996d5415824f598b (diff)
downloadsamba-f725863f75fda1beed47eaef5cb2c4b5289e4dd1.tar.gz
samba-f725863f75fda1beed47eaef5cb2c4b5289e4dd1.tar.bz2
samba-f725863f75fda1beed47eaef5cb2c4b5289e4dd1.zip
r7283: add sqlite3.m4
(This used to be commit 10a828a442b516551762bff81782072d9807d626)
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/ldb/sqlite3.m449
1 files changed, 49 insertions, 0 deletions
diff --git a/source4/lib/ldb/sqlite3.m4 b/source4/lib/ldb/sqlite3.m4
new file mode 100644
index 0000000000..8bbe186160
--- /dev/null
+++ b/source4/lib/ldb/sqlite3.m4
@@ -0,0 +1,49 @@
+########################################################
+# Compile with SQLITE3 support?
+
+SQLITE3_LIBS=""
+with_sqlite3_support=auto
+AC_MSG_CHECKING([for SQLITE3 support])
+
+AC_ARG_WITH(sqlite3,
+[ --with-sqlite3 SQLITE3 support (default yes)],
+[ case "$withval" in
+ yes|no)
+ 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)
+
+ 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)
+fi
+
+SMB_EXT_LIB(SQLITE3,[${SQLITE3_LIBS}],[${SQLITE3_CFLAGS}],[${SQLITE3_CPPFLAGS}],[${SQLITE3_LDFLAGS}])