]> granicus.if.org Git - pdns/commitdiff
Move CDB check to separate macro
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Mon, 6 Jan 2014 13:19:11 +0000 (14:19 +0100)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Mon, 6 Jan 2014 13:27:10 +0000 (14:27 +0100)
configure.ac
m4/pdns_check_cdb.m4 [new file with mode: 0644]

index 41d5e95b2270be736458c0d1b9e04a4154fa822e..c325824f9847e066e235dd17509b232d5bd8ddf6 100644 (file)
@@ -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 (file)
index 0000000..8e2a198
--- /dev/null
@@ -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)
+])