summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDavid M. Lee <dlee@respoke.io>2017-06-06 14:54:43 -0500
committerDavid M. Lee <dlee@digium.com>2017-06-08 17:09:33 -0500
commitfcb1a0d7e803e033545fc721ab12a903603d302c (patch)
treee8af4e4ba86a910be99d960f78034205eebddaf4 /configure.ac
parentdb5245f9fde620afdd9b2c7c327bd1b77d8d4718 (diff)
CFLAGS for BIND8 support
Some systems (like macOS) require BIND_8_COMPAT to be defined so that the nameser libraries are, well, BIND8 compatible. Change-Id: If79fc27a64f90de1835b5aa3aadfa9be22bd16b0
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac12
1 files changed, 12 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 9c07a4f6d..07aa1670d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1360,6 +1360,18 @@ AC_LINK_IFELSE(
AC_MSG_RESULT(no)
)
+AC_MSG_CHECKING(for BIND_8_COMPAT required)
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+[[
+#undef BIND_8_COMPAT
+#include <arpa/nameser.h>
+]],
+[[int x = NXDOMAIN]])],
+AC_MSG_RESULT(no),
+AC_MSG_RESULT(yes)
+[BIND8_CFLAGS=-DBIND_8_COMPAT])
+AC_SUBST(BIND8_CFLAGS)
+
AST_C_DEFINE_CHECK([GLOB_NOMAGIC], [GLOB_NOMAGIC], [glob.h])
AST_C_DEFINE_CHECK([GLOB_BRACE], [GLOB_BRACE], [glob.h])