From 2a931cfff313402ac2e401cbf7d85f336e36ab3a Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Mon, 6 Jan 2014 14:19:11 +0100 Subject: [PATCH] Move CDB check to separate macro --- configure.ac | 7 ++----- m4/pdns_check_cdb.m4 | 8 ++++++++ 2 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 m4/pdns_check_cdb.m4 diff --git a/configure.ac b/configure.ac index 41d5e95b22..c325824f98 100644 --- a/configure.ac +++ b/configure.ac @@ -295,11 +295,8 @@ then AC_DEFINE(HAVE_SQLITE3,1,[If we have sqlite3]) fi -if test "$needcdb" -then - PKG_CHECK_MODULES(CDB, libcdb, HAVE_CDB=yes, AC_MSG_ERROR([+Could not find libcdb/tinycdb])) - AC_SUBST(CDB_LIBS) - AC_SUBST(CDB_CFLAGS) +if test "$needcdb"; then + PDNS_CHECK_CDB fi for a in $modules diff --git a/m4/pdns_check_cdb.m4 b/m4/pdns_check_cdb.m4 new file mode 100644 index 0000000000..8e2a198d34 --- /dev/null +++ b/m4/pdns_check_cdb.m4 @@ -0,0 +1,8 @@ +AC_DEFUN([PDNS_CHECK_CDB],[ + PKG_CHECK_MODULES([CDB], [libcdb], + [HAVE_CDB=yes], + [AC_MSG_ERROR([Could not find libcdb/tinycdb])] + ) + AC_SUBST(CDB_LIBS) + AC_SUBST(CDB_CFLAGS) +]) -- 2.47.3