diff options
Diffstat (limited to 'm4/want_sqlite.m4')
-rw-r--r-- | m4/want_sqlite.m4 | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/m4/want_sqlite.m4 b/m4/want_sqlite.m4 new file mode 100644 index 0000000..0af632f --- /dev/null +++ b/m4/want_sqlite.m4 @@ -0,0 +1,20 @@ +AC_DEFUN([DOVECOT_WANT_SQLITE], [ + if test $want_sqlite != no; then + AC_CHECK_LIB(sqlite3, sqlite3_open, [ + AC_CHECK_HEADER(sqlite3.h, [ + SQLITE_LIBS="$SQLITE_LIBS -lsqlite3" + + AC_DEFINE(HAVE_SQLITE,, [Build with SQLite3 support]) + found_sql_drivers="$found_sql_drivers sqlite" + ], [ + if test $want_sqlite = yes; then + AC_ERROR([Can't build with SQLite support: sqlite3.h not found]) + fi + ]) + ], [ + if test $want_sqlite = yes; then + AC_ERROR([Can't build with SQLite support: libsqlite3 not found]) + fi + ]) + fi +]) |