From: Ruben Kerkhof Date: Mon, 6 Jan 2014 13:18:16 +0000 (+0100) Subject: Move opendbx check to separate macro X-Git-Tag: rec-3.6.0-rc1~264^2~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=042cbf2bb6f63b0ff3e2ea80c8a6b9005962f52d;p=pdns Move opendbx check to separate macro --- diff --git a/configure.ac b/configure.ac index d18294086..41d5e95b2 100644 --- a/configure.ac +++ b/configure.ac @@ -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 index 000000000..73f4e792e --- /dev/null +++ b/m4/pdns_check_opendbx.m4 @@ -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" + ] + ) +]) +