<p>Joshua Colp <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/5788">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Joshua Colp: Looks good to me, but someone else must approve; Approved for Submit
  Kevin Harwell: Looks good to me, approved

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">CFLAGS for BIND8 support<br><br>Some systems (like macOS) require BIND_8_COMPAT to be defined so that<br>the nameser libraries are, well, BIND8 compatible.<br><br>Change-Id: If79fc27a64f90de1835b5aa3aadfa9be22bd16b0<br>---<br>M Makefile<br>M configure<br>M configure.ac<br>M makeopts.in<br>4 files changed, 45 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/Makefile b/Makefile<br>index f29c07f..85a1152 100644<br>--- a/Makefile<br>+++ b/Makefile<br>@@ -124,6 +124,9 @@<br> # libxml2 cflags<br> _ASTCFLAGS+=$(LIBXML2_INCLUDE)<br> <br>+# BIND_8_COMPAT<br>+_ASTCFLAGS+=$(BIND8_CFLAGS)<br>+<br> #Uncomment this to see all build commands instead of 'quiet' output<br> #NOISY_BUILD=yes<br> <br>diff --git a/configure b/configure<br>index 739cf65..9111763 100755<br>--- a/configure<br>+++ b/configure<br>@@ -697,6 +697,7 @@<br> PBX_RTLD_NOLOAD<br> PBX_GLOB_BRACE<br> PBX_GLOB_NOMAGIC<br>+BIND8_CFLAGS<br> AST_RPATH<br> AST_NATIVE_ARCH<br> AST_SHADOW_WARNINGS<br>@@ -19410,6 +19411,33 @@<br> rm -f core conftest.err conftest.$ac_objext \<br>     conftest$ac_exeext conftest.$ac_ext<br> <br>+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BIND_8_COMPAT required" >&5<br>+$as_echo_n "checking for BIND_8_COMPAT required... " >&6; }<br>+cat confdefs.h - <<_ACEOF >conftest.$ac_ext<br>+/* end confdefs.h.  */<br>+<br>+#undef BIND_8_COMPAT<br>+#include <arpa/nameser.h><br>+<br>+int<br>+main ()<br>+{<br>+int x = NXDOMAIN<br>+  ;<br>+  return 0;<br>+}<br>+_ACEOF<br>+if ac_fn_c_try_compile "$LINENO"; then :<br>+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5<br>+$as_echo "no" >&6; }<br>+else<br>+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5<br>+$as_echo "yes" >&6; }<br>+BIND8_CFLAGS=-DBIND_8_COMPAT<br>+fi<br>+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext<br>+<br>+<br> <br>     if test "x${PBX_GLOB_NOMAGIC}" != "x1"; then<br>     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLOB_NOMAGIC in glob.h" >&5<br>diff --git a/configure.ac b/configure.ac<br>index 9c07a4f..07aa167 100644<br>--- a/configure.ac<br>+++ b/configure.ac<br>@@ -1360,6 +1360,18 @@<br>   AC_MSG_RESULT(no)<br> )<br> <br>+AC_MSG_CHECKING(for BIND_8_COMPAT required)<br>+AC_COMPILE_IFELSE([AC_LANG_PROGRAM(<br>+[[<br>+#undef BIND_8_COMPAT<br>+#include <arpa/nameser.h><br>+]],<br>+[[int x = NXDOMAIN]])],<br>+AC_MSG_RESULT(no),<br>+AC_MSG_RESULT(yes)<br>+[BIND8_CFLAGS=-DBIND_8_COMPAT])<br>+AC_SUBST(BIND8_CFLAGS)<br>+<br> AST_C_DEFINE_CHECK([GLOB_NOMAGIC], [GLOB_NOMAGIC], [glob.h])<br> <br> AST_C_DEFINE_CHECK([GLOB_BRACE], [GLOB_BRACE], [glob.h])<br>diff --git a/makeopts.in b/makeopts.in<br>index 03ef747..07360a7 100644<br>--- a/makeopts.in<br>+++ b/makeopts.in<br>@@ -62,6 +62,8 @@<br> OSARCH=@OSARCH@<br> OSREV=@PBX_OSREV@<br> <br>+BIND8_CFLAGS=@BIND8_CFLAGS@<br>+<br> PTHREAD_CFLAGS=@PTHREAD_CFLAGS@<br> PTHREAD_LIBS=@PTHREAD_LIBS@<br> <br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/5788">change 5788</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/5788"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: If79fc27a64f90de1835b5aa3aadfa9be22bd16b0 </div>
<div style="display:none"> Gerrit-Change-Number: 5788 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: David M. Lee <dlee@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>