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

index d18294086908d0caa0d920e9d698bb97fbd7930d..41d5e95b2270be736458c0d1b9e04a4154fa822e 100644 (file)
@@ -264,12 +264,7 @@ do
                        PDNS_CHECK_LDAP
                ;;
                opendbx)
-                       AC_CHECK_HEADERS([odbx.h], , [AC_MSG_ERROR([opendbx header (odbx.h) not found])])
-                       AC_SUBST([LIBOPENDBX])
-                       AC_CHECK_LIB(
-                               [opendbx], [odbx_init],
-                               [AC_DEFINE([HAVE_LIBOPENDBX], 1, [Have -lopendbx]) LIBOPENDBX="opendbx"]
-                       )
+                       PDNS_CHECK_OPENDBX
                ;;
                tinydns)
                        needcdb=yes
diff --git a/m4/pdns_check_opendbx.m4 b/m4/pdns_check_opendbx.m4
new file mode 100644 (file)
index 0000000..73f4e79
--- /dev/null
@@ -0,0 +1,10 @@
+AC_DEFUN([PDNS_CHECK_OPENDBX],[
+  AC_CHECK_HEADERS([odbx.h], , [AC_MSG_ERROR([opendbx header (odbx.h) not found])])
+  AC_SUBST([LIBOPENDBX])
+  AC_CHECK_LIB([opendbx], [odbx_init],
+    [AC_DEFINE([HAVE_LIBOPENDBX], [], [Have -lopendbx])
+     LIBOPENDBX="opendbx"
+    ]
+  )
+])
+