diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2011-03-30 13:08:56 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2011-03-30 13:08:56 +0200 |
commit | 647492377897cf3b7d112d99e9a961a0f786a6b8 (patch) | |
tree | 895d94459e9cff28a0dba4fe6e3741257cee93ba /m4 | |
parent | adc42a1c2661f0900345dd8a7c84879f76395651 (diff) |
Add autotools test for SQLite unlock notify feature
Diffstat (limited to 'm4')
-rw-r--r-- | m4/libsqlite.m4 | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/m4/libsqlite.m4 b/m4/libsqlite.m4 index 2ad9eb1..acb4fe3 100644 --- a/m4/libsqlite.m4 +++ b/m4/libsqlite.m4 @@ -5,9 +5,12 @@ dnl license : GNU GPL v2; see accompanying LICENSE file dnl dnl LIBSQLITE([ACTION-IF-FOUND[,ACTION-IF-NOT-FOUND]]) dnl +dnl Also sets libsqlite_unlock_notify to yes if sqlite3_unlock_notify() +dnl functionality is available. dnl AC_DEFUN([LIBSQLITE], [ libsqlite_found=no +libsqlite_unlock_notify=no AC_MSG_CHECKING([for libsqlite3]) @@ -37,6 +40,25 @@ if test x"$libsqlite_found" = xno; then LIBS="$save_LIBS" fi +# Check for unlock_notify. +# +if test x"$libsqlite_found" = xyes; then +CXX_LIBTOOL_LINK_IFELSE( +AC_LANG_SOURCE([[ +#include <sqlite3.h> + +int +main () +{ + sqlite3* handle (0); + sqlite3_unlock_notify (handle, 0, 0); +} +]]), +[ +libsqlite_unlock_notify=yes +]) +fi + if test x"$libsqlite_found" = xyes; then AC_MSG_RESULT([yes]) $1 |