From: Ruben Kerkhof Date: Wed, 24 Dec 2014 18:42:56 +0000 (+0100) Subject: (Finally) move sqlite3 to separate checks X-Git-Tag: rec-3.7.0-rc1~67^2~1^2^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=13305eb1eb19372ba8c8cfceb3cd0df3362df9dc;p=pdns (Finally) move sqlite3 to separate checks --- diff --git a/configure.ac b/configure.ac index a67f5c5d9..a244d1ab2 100644 --- a/configure.ac +++ b/configure.ac @@ -85,18 +85,7 @@ BOOST_SERIALIZATION([mt]) PDNS_ENABLE_UNIT_TESTS -dnl Allow user to require SQLite3 -AC_MSG_CHECKING([whether user requires sqlite3]) -AC_ARG_WITH([sqlite3], - [AS_HELP_STRING([--with-sqlite3],[include sqlite3 driver @<:@default=no@:>@])], - [with_sqlite3=$withval], - [with_sqlite3=no] -) -AC_MSG_RESULT([$with_sqlite3]) - -AS_IF([test "x$with_sqlite3" != "xno"], [ - needsqlite3=yes -]) +PDNS_WITH_SQLITE3 dnl Checks for typedefs, structures, and compiler characteristics. AC_TYPE_SIZE_T @@ -279,13 +268,8 @@ AM_CONDITIONAL([ORACLE],[test "x$needoracle" = "xyes"]) AM_CONDITIONAL([LMDB],[test "x$needlmdb" = "xyes"]) +PDNS_CHECK_SQLITE3 AM_CONDITIONAL([SQLITE3], [test "x$needsqlite3" = "xyes"]) -AS_IF([test "x$needsqlite3" = "xyes"], [ - PKG_CHECK_MODULES([SQLITE3], [sqlite3], - [AC_DEFINE([HAVE_SQLITE3], [1], [Define to 1 if you have sqlite3])], - [AC_MSG_ERROR([Could not find libsqlite3])] - ) -]) for a in $modules; do moduledirs="$moduledirs ${a}backend" diff --git a/m4/pdns_check_sqlite3.m4 b/m4/pdns_check_sqlite3.m4 new file mode 100644 index 000000000..e2a5e78dd --- /dev/null +++ b/m4/pdns_check_sqlite3.m4 @@ -0,0 +1,8 @@ +AC_DEFUN([PDNS_CHECK_SQLITE3], [ + AS_IF([test "x$needsqlite3" = "xyes"], [ + PKG_CHECK_MODULES([SQLITE3], [sqlite3], + [AC_DEFINE([HAVE_SQLITE3], [1], [Define to 1 if you have sqlite3])], + [AC_MSG_ERROR([Could not find libsqlite3])] + ) + ]) +]) diff --git a/m4/pdns_with_sqlite3.m4 b/m4/pdns_with_sqlite3.m4 new file mode 100644 index 000000000..952ad101a --- /dev/null +++ b/m4/pdns_with_sqlite3.m4 @@ -0,0 +1,13 @@ +AC_DEFUN([PDNS_WITH_SQLITE3], [ + AC_MSG_CHECKING([whether user requires sqlite3]) + AC_ARG_WITH([sqlite3], + [AS_HELP_STRING([--with-sqlite3],[include sqlite3 driver @<:@default=no@:>@])], + [with_sqlite3=$withval], + [with_sqlite3=no] + ) + AC_MSG_RESULT([$with_sqlite3]) + + AS_IF([test "x$with_sqlite3" != "xno"], [ + needsqlite3=yes + ]) +])