<p>Corey Farrell has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/7389">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">autoconf: Use m4 conditional in AST_EXT_TOOL_CHECK.<br><br>Change-Id: Iaed407519103c20501352d3f8b9d86d4f44c16a2<br>---<br>M autoconf/ast_ext_tool_check.m4<br>M configure<br>M menuselect/configure<br>3 files changed, 27 insertions(+), 148 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/89/7389/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/autoconf/ast_ext_tool_check.m4 b/autoconf/ast_ext_tool_check.m4<br>index 758720d..ef762eb 100644<br>--- a/autoconf/ast_ext_tool_check.m4<br>+++ b/autoconf/ast_ext_tool_check.m4<br>@@ -10,15 +10,13 @@<br> PBX_$1=0<br> AC_PATH_TOOL(CONFIG_$1, $2, No, [${$1_DIR}/bin:$PATH])<br> if test ! "x${CONFIG_$1}" = xNo; then<br>- if test x"$3" = x ; then A=--cflags ; else A="$3" ; fi<br>- $1_INCLUDE=$(${CONFIG_$1} $A)<br>+ $1_INCLUDE=$(${CONFIG_$1} m4_default([$3],[--cflags]))<br> $1_INCLUDE=$(echo ${$1_INCLUDE} | $SED -e "s|-I|-I${$1_DIR}|g")<br> <br>- if test x"$4" = x ; then A=--libs ; else A="$4" ; fi<br>- $1_LIB=$(${CONFIG_$1} $A)<br>+ $1_LIB=$(${CONFIG_$1} m4_default([$4],[--libs]))<br> $1_LIB=$(echo ${$1_LIB} | $SED -e "s|-L|-L${$1_DIR}|g")<br> <br>- if test x"$5" != x ; then<br>+ m4_ifval([$5], [<br> saved_cppflags="${CPPFLAGS}"<br> CPPFLAGS="${CPPFLAGS} ${$1_INCLUDE}"<br> <br>@@ -28,15 +26,15 @@<br> AC_LINK_IFELSE(<br> [ AC_LANG_PROGRAM( [ $5 ], [ $6; ])],<br> [ PBX_$1=1 AC_DEFINE([HAVE_$1], 1,<br>- [Define if your system has the $1 headers.])],<br>+ [Define if your system has the $1 libraries.])],<br> []<br> )<br> CPPFLAGS="${saved_cppflags}"<br> LIBS="${saved_libs}"<br>- else<br>+ ], [<br> PBX_$1=1<br> AC_DEFINE([HAVE_$1], 1, [Define if your system has the $1 libraries.])<br>- fi<br>+ ])<br> fi<br> fi<br> ])<br>diff --git a/configure b/configure<br>index ab7f07f..43ef738 100755<br>--- a/configure<br>+++ b/configure<br>@@ -14226,16 +14226,13 @@<br> fi<br> <br> if test ! "x${CONFIG_LIBXML2}" = xNo; then<br>- if test x"" = x ; then A=--cflags ; else A="" ; fi<br>- LIBXML2_INCLUDE=$(${CONFIG_LIBXML2} $A)<br>+ LIBXML2_INCLUDE=$(${CONFIG_LIBXML2} --cflags)<br> LIBXML2_INCLUDE=$(echo ${LIBXML2_INCLUDE} | $SED -e "s|-I|-I${LIBXML2_DIR}|g")<br> <br>- if test x"" = x ; then A=--libs ; else A="" ; fi<br>- LIBXML2_LIB=$(${CONFIG_LIBXML2} $A)<br>+ LIBXML2_LIB=$(${CONFIG_LIBXML2} --libs)<br> LIBXML2_LIB=$(echo ${LIBXML2_LIB} | $SED -e "s|-L|-L${LIBXML2_DIR}|g")<br> <br>- if test x"#include <libxml/tree.h><br>- #include <libxml/parser.h>" != x ; then<br>+<br> saved_cppflags="${CPPFLAGS}"<br> CPPFLAGS="${CPPFLAGS} ${LIBXML2_INCLUDE}"<br> <br>@@ -14263,12 +14260,7 @@<br> conftest$ac_exeext conftest.$ac_ext<br> CPPFLAGS="${saved_cppflags}"<br> LIBS="${saved_libs}"<br>- else<br>- PBX_LIBXML2=1<br> <br>-$as_echo "#define HAVE_LIBXML2 1" >>confdefs.h<br>-<br>- fi<br> fi<br> fi<br> <br>@@ -23342,47 +23334,18 @@<br> fi<br> <br> if test ! "x${CONFIG_MYSQLCLIENT}" = xNo; then<br>- if test x"" = x ; then A=--cflags ; else A="" ; fi<br>- MYSQLCLIENT_INCLUDE=$(${CONFIG_MYSQLCLIENT} $A)<br>+ MYSQLCLIENT_INCLUDE=$(${CONFIG_MYSQLCLIENT} --cflags)<br> MYSQLCLIENT_INCLUDE=$(echo ${MYSQLCLIENT_INCLUDE} | $SED -e "s|-I|-I${MYSQLCLIENT_DIR}|g")<br> <br>- if test x"" = x ; then A=--libs ; else A="" ; fi<br>- MYSQLCLIENT_LIB=$(${CONFIG_MYSQLCLIENT} $A)<br>+ MYSQLCLIENT_LIB=$(${CONFIG_MYSQLCLIENT} --libs)<br> MYSQLCLIENT_LIB=$(echo ${MYSQLCLIENT_LIB} | $SED -e "s|-L|-L${MYSQLCLIENT_DIR}|g")<br> <br>- if test x"" != x ; then<br>- saved_cppflags="${CPPFLAGS}"<br>- CPPFLAGS="${CPPFLAGS} ${MYSQLCLIENT_INCLUDE}"<br> <br>- saved_libs="${LIBS}"<br>- LIBS=${MYSQLCLIENT_LIB}<br>-<br>- cat confdefs.h - <<_ACEOF >conftest.$ac_ext<br>-/* end confdefs.h. */<br>-<br>-int<br>-main ()<br>-{<br>- ;<br>- ;<br>- return 0;<br>-}<br>-_ACEOF<br>-if ac_fn_c_try_link "$LINENO"; then :<br>- PBX_MYSQLCLIENT=1<br>-$as_echo "#define HAVE_MYSQLCLIENT 1" >>confdefs.h<br>-<br>-fi<br>-rm -f core conftest.err conftest.$ac_objext \<br>- conftest$ac_exeext conftest.$ac_ext<br>- CPPFLAGS="${saved_cppflags}"<br>- LIBS="${saved_libs}"<br>- else<br> PBX_MYSQLCLIENT=1<br> <br> $as_echo "#define HAVE_MYSQLCLIENT 1" >>confdefs.h<br> <br>- fi<br>+<br> fi<br> fi<br> <br>@@ -23588,47 +23551,18 @@<br> fi<br> <br> if test ! "x${CONFIG_NEON}" = xNo; then<br>- if test x"" = x ; then A=--cflags ; else A="" ; fi<br>- NEON_INCLUDE=$(${CONFIG_NEON} $A)<br>+ NEON_INCLUDE=$(${CONFIG_NEON} --cflags)<br> NEON_INCLUDE=$(echo ${NEON_INCLUDE} | $SED -e "s|-I|-I${NEON_DIR}|g")<br> <br>- if test x"" = x ; then A=--libs ; else A="" ; fi<br>- NEON_LIB=$(${CONFIG_NEON} $A)<br>+ NEON_LIB=$(${CONFIG_NEON} --libs)<br> NEON_LIB=$(echo ${NEON_LIB} | $SED -e "s|-L|-L${NEON_DIR}|g")<br> <br>- if test x"" != x ; then<br>- saved_cppflags="${CPPFLAGS}"<br>- CPPFLAGS="${CPPFLAGS} ${NEON_INCLUDE}"<br> <br>- saved_libs="${LIBS}"<br>- LIBS=${NEON_LIB}<br>-<br>- cat confdefs.h - <<_ACEOF >conftest.$ac_ext<br>-/* end confdefs.h. */<br>-<br>-int<br>-main ()<br>-{<br>- ;<br>- ;<br>- return 0;<br>-}<br>-_ACEOF<br>-if ac_fn_c_try_link "$LINENO"; then :<br>- PBX_NEON=1<br>-$as_echo "#define HAVE_NEON 1" >>confdefs.h<br>-<br>-fi<br>-rm -f core conftest.err conftest.$ac_objext \<br>- conftest$ac_exeext conftest.$ac_ext<br>- CPPFLAGS="${saved_cppflags}"<br>- LIBS="${saved_libs}"<br>- else<br> PBX_NEON=1<br> <br> $as_echo "#define HAVE_NEON 1" >>confdefs.h<br> <br>- fi<br>+<br> fi<br> fi<br> <br>@@ -23737,15 +23671,13 @@<br> fi<br> <br> if test ! "x${CONFIG_NEON29}" = xNo; then<br>- if test x"" = x ; then A=--cflags ; else A="" ; fi<br>- NEON29_INCLUDE=$(${CONFIG_NEON29} $A)<br>+ NEON29_INCLUDE=$(${CONFIG_NEON29} --cflags)<br> NEON29_INCLUDE=$(echo ${NEON29_INCLUDE} | $SED -e "s|-I|-I${NEON29_DIR}|g")<br> <br>- if test x"--libs" = x ; then A=--libs ; else A="--libs" ; fi<br>- NEON29_LIB=$(${CONFIG_NEON29} $A)<br>+ NEON29_LIB=$(${CONFIG_NEON29} --libs)<br> NEON29_LIB=$(echo ${NEON29_LIB} | $SED -e "s|-L|-L${NEON29_DIR}|g")<br> <br>- if test x"#include <ne_auth.h>" != x ; then<br>+<br> saved_cppflags="${CPPFLAGS}"<br> CPPFLAGS="${CPPFLAGS} ${NEON29_INCLUDE}"<br> <br>@@ -23774,12 +23706,7 @@<br> conftest$ac_exeext conftest.$ac_ext<br> CPPFLAGS="${saved_cppflags}"<br> LIBS="${saved_libs}"<br>- else<br>- PBX_NEON29=1<br> <br>-$as_echo "#define HAVE_NEON29 1" >>confdefs.h<br>-<br>- fi<br> fi<br> fi<br> <br>@@ -23888,17 +23815,13 @@<br> fi<br> <br> if test ! "x${CONFIG_NETSNMP}" = xNo; then<br>- if test x"" = x ; then A=--cflags ; else A="" ; fi<br>- NETSNMP_INCLUDE=$(${CONFIG_NETSNMP} $A)<br>+ NETSNMP_INCLUDE=$(${CONFIG_NETSNMP} --cflags)<br> NETSNMP_INCLUDE=$(echo ${NETSNMP_INCLUDE} | $SED -e "s|-I|-I${NETSNMP_DIR}|g")<br> <br>- if test x"--agent-libs" = x ; then A=--libs ; else A="--agent-libs" ; fi<br>- NETSNMP_LIB=$(${CONFIG_NETSNMP} $A)<br>+ NETSNMP_LIB=$(${CONFIG_NETSNMP} --agent-libs)<br> NETSNMP_LIB=$(echo ${NETSNMP_LIB} | $SED -e "s|-L|-L${NETSNMP_DIR}|g")<br> <br>- if test x"#include <net-snmp/net-snmp-config.h><br>-#include <net-snmp/net-snmp-includes.h><br>-#include <net-snmp/agent/net-snmp-agent-includes.h>" != x ; then<br>+<br> saved_cppflags="${CPPFLAGS}"<br> CPPFLAGS="${CPPFLAGS} ${NETSNMP_INCLUDE}"<br> <br>@@ -23927,12 +23850,7 @@<br> conftest$ac_exeext conftest.$ac_ext<br> CPPFLAGS="${saved_cppflags}"<br> LIBS="${saved_libs}"<br>- else<br>- PBX_NETSNMP=1<br> <br>-$as_echo "#define HAVE_NETSNMP 1" >>confdefs.h<br>-<br>- fi<br> fi<br> fi<br> <br>@@ -33615,47 +33533,18 @@<br> fi<br> <br> if test ! "x${CONFIG_SDL}" = xNo; then<br>- if test x"" = x ; then A=--cflags ; else A="" ; fi<br>- SDL_INCLUDE=$(${CONFIG_SDL} $A)<br>+ SDL_INCLUDE=$(${CONFIG_SDL} --cflags)<br> SDL_INCLUDE=$(echo ${SDL_INCLUDE} | $SED -e "s|-I|-I${SDL_DIR}|g")<br> <br>- if test x"" = x ; then A=--libs ; else A="" ; fi<br>- SDL_LIB=$(${CONFIG_SDL} $A)<br>+ SDL_LIB=$(${CONFIG_SDL} --libs)<br> SDL_LIB=$(echo ${SDL_LIB} | $SED -e "s|-L|-L${SDL_DIR}|g")<br> <br>- if test x"" != x ; then<br>- saved_cppflags="${CPPFLAGS}"<br>- CPPFLAGS="${CPPFLAGS} ${SDL_INCLUDE}"<br> <br>- saved_libs="${LIBS}"<br>- LIBS=${SDL_LIB}<br>-<br>- cat confdefs.h - <<_ACEOF >conftest.$ac_ext<br>-/* end confdefs.h. */<br>-<br>-int<br>-main ()<br>-{<br>- ;<br>- ;<br>- return 0;<br>-}<br>-_ACEOF<br>-if ac_fn_c_try_link "$LINENO"; then :<br>- PBX_SDL=1<br>-$as_echo "#define HAVE_SDL 1" >>confdefs.h<br>-<br>-fi<br>-rm -f core conftest.err conftest.$ac_objext \<br>- conftest$ac_exeext conftest.$ac_ext<br>- CPPFLAGS="${saved_cppflags}"<br>- LIBS="${saved_libs}"<br>- else<br> PBX_SDL=1<br> <br> $as_echo "#define HAVE_SDL 1" >>confdefs.h<br> <br>- fi<br>+<br> fi<br> fi<br> <br>diff --git a/menuselect/configure b/menuselect/configure<br>index ddd3af8..6e5331e 100755<br>--- a/menuselect/configure<br>+++ b/menuselect/configure<br>@@ -4391,16 +4391,13 @@<br> fi<br> <br> if test ! "x${CONFIG_LIBXML2}" = xNo; then<br>- if test x"" = x ; then A=--cflags ; else A="" ; fi<br>- LIBXML2_INCLUDE=$(${CONFIG_LIBXML2} $A)<br>+ LIBXML2_INCLUDE=$(${CONFIG_LIBXML2} --cflags)<br> LIBXML2_INCLUDE=$(echo ${LIBXML2_INCLUDE} | $SED -e "s|-I|-I${LIBXML2_DIR}|g")<br> <br>- if test x"" = x ; then A=--libs ; else A="" ; fi<br>- LIBXML2_LIB=$(${CONFIG_LIBXML2} $A)<br>+ LIBXML2_LIB=$(${CONFIG_LIBXML2} --libs)<br> LIBXML2_LIB=$(echo ${LIBXML2_LIB} | $SED -e "s|-L|-L${LIBXML2_DIR}|g")<br> <br>- if test x"#include <libxml/tree.h><br>- #include <libxml/parser.h>" != x ; then<br>+<br> saved_cppflags="${CPPFLAGS}"<br> CPPFLAGS="${CPPFLAGS} ${LIBXML2_INCLUDE}"<br> <br>@@ -4428,12 +4425,7 @@<br> conftest$ac_exeext conftest.$ac_ext<br> CPPFLAGS="${saved_cppflags}"<br> LIBS="${saved_libs}"<br>- else<br>- PBX_LIBXML2=1<br> <br>-$as_echo "#define HAVE_LIBXML2 1" >>confdefs.h<br>-<br>- fi<br> fi<br> fi<br> <br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/7389">change 7389</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/7389"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Iaed407519103c20501352d3f8b9d86d4f44c16a2 </div>
<div style="display:none"> Gerrit-Change-Number: 7389 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Corey Farrell <git@cfware.com> </div>