]> granicus.if.org Git - pdns/commitdiff
Detect cdb on OSX
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Sun, 28 Sep 2014 09:24:29 +0000 (11:24 +0200)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Sun, 28 Sep 2014 09:24:29 +0000 (11:24 +0200)
cdb from homebrew doesn't ship a .pc file
so detect it the old-fashioned way.

m4/pdns_check_cdb.m4

index 8e2a198d3414b5adfef036052bb9aef86809f8b7..e31680cb0664dac4b315271abfb90e62189f1d55 100644 (file)
@@ -1,7 +1,13 @@
 AC_DEFUN([PDNS_CHECK_CDB],[
   PKG_CHECK_MODULES([CDB], [libcdb],
-    [HAVE_CDB=yes],
-    [AC_MSG_ERROR([Could not find libcdb/tinycdb])]
+    [],
+    [AC_CHECK_HEADERS([cdb.h],
+      [AC_CHECK_LIB([cdb], [cdb_find],
+        [CDB_LIBS="-lcdb"],
+        [AC_MSG_ERROR([Could not find libcdb])]
+      )],
+      [AC_MSG_ERROR([Could not find cdb])]
+    )]
   )
   AC_SUBST(CDB_LIBS)
   AC_SUBST(CDB_CFLAGS)