<p>Corey Farrell has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/8721">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Build System: Strip '-std=c99' from CFLAGS provided by libraries.<br><br>Asterisk requires GNU C extensions. On some systems certain libraries<br>may incorrectly push -std=c99 into CFLAGS, thus breaking the build.<br>This change causes that flag to be stripped so the Asterisk build is not<br>broken by those libraries. This change is made for both pkgconfig and<br>tool based libraries.<br><br>ASTERISK-27629 #close<br><br>Change-Id: I13389613b194abbac77becf90cd950dc168704db<br>---<br>M autoconf/ast_ext_tool_check.m4<br>M autoconf/ast_pkgconfig.m4<br>M configure<br>M menuselect/configure<br>4 files changed, 18 insertions(+), 18 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/21/8721/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 ef762eb..cbe109e 100644<br>--- a/autoconf/ast_ext_tool_check.m4<br>+++ b/autoconf/ast_ext_tool_check.m4<br>@@ -11,7 +11,7 @@<br> AC_PATH_TOOL(CONFIG_$1, $2, No, [${$1_DIR}/bin:$PATH])<br> if test ! "x${CONFIG_$1}" = xNo; then<br> $1_INCLUDE=$(${CONFIG_$1} m4_default([$3],[--cflags]))<br>- $1_INCLUDE=$(echo ${$1_INCLUDE} | $SED -e "s|-I|-I${$1_DIR}|g")<br>+ $1_INCLUDE=$(echo ${$1_INCLUDE} | $SED -e "s|-I|-I${$1_DIR}|g" -e "s|-std=c99||g")<br> <br> $1_LIB=$(${CONFIG_$1} m4_default([$4],[--libs]))<br> $1_LIB=$(echo ${$1_LIB} | $SED -e "s|-L|-L${$1_DIR}|g")<br>diff --git a/autoconf/ast_pkgconfig.m4 b/autoconf/ast_pkgconfig.m4<br>index ae7bbc0..3415ed5 100644<br>--- a/autoconf/ast_pkgconfig.m4<br>+++ b/autoconf/ast_pkgconfig.m4<br>@@ -5,7 +5,7 @@<br> if test "x${PBX_$1}" != "x1" -a "${USE_$1}" != "no"; then<br> PKG_CHECK_MODULES($1, $2, [<br> PBX_$1=1<br>- $1_INCLUDE="$$1_CFLAGS"<br>+ $1_INCLUDE=$(echo ${$1_CFLAGS} | $SED -e "s|-std=c99||g")<br> $1_LIB="$$1_LIBS"<br> AC_DEFINE([HAVE_$1], 1, [Define if your system has the $1 libraries.])<br> ], [<br>diff --git a/configure b/configure<br>index 3a8c505..472221f 100755<br>--- a/configure<br>+++ b/configure<br>@@ -13428,7 +13428,7 @@<br> $as_echo "yes" >&6; }<br> <br> PBX_LIBEDIT=1<br>- LIBEDIT_INCLUDE="$LIBEDIT_CFLAGS"<br>+ LIBEDIT_INCLUDE=$(echo ${LIBEDIT_CFLAGS} | $SED -e "s|-std=c99||g")<br> LIBEDIT_LIB="$LIBEDIT_LIBS"<br> <br> $as_echo "#define HAVE_LIBEDIT 1" >>confdefs.h<br>@@ -14102,7 +14102,7 @@<br> <br> if test ! "x${CONFIG_LIBXML2}" = xNo; then<br> LIBXML2_INCLUDE=$(${CONFIG_LIBXML2} --cflags)<br>- LIBXML2_INCLUDE=$(echo ${LIBXML2_INCLUDE} | $SED -e "s|-I|-I${LIBXML2_DIR}|g")<br>+ LIBXML2_INCLUDE=$(echo ${LIBXML2_INCLUDE} | $SED -e "s|-I|-I${LIBXML2_DIR}|g" -e "s|-std=c99||g")<br> <br> LIBXML2_LIB=$(${CONFIG_LIBXML2} --libs)<br> LIBXML2_LIB=$(echo ${LIBXML2_LIB} | $SED -e "s|-L|-L${LIBXML2_DIR}|g")<br>@@ -20494,7 +20494,7 @@<br> $as_echo "yes" >&6; }<br> <br> PBX_ILBC=1<br>- ILBC_INCLUDE="$ILBC_CFLAGS"<br>+ ILBC_INCLUDE=$(echo ${ILBC_CFLAGS} | $SED -e "s|-std=c99||g")<br> ILBC_LIB="$ILBC_LIBS"<br> <br> $as_echo "#define HAVE_ILBC 1" >>confdefs.h<br>@@ -22632,7 +22632,7 @@<br> <br> if test ! "x${CONFIG_MYSQLCLIENT}" = xNo; then<br> MYSQLCLIENT_INCLUDE=$(${CONFIG_MYSQLCLIENT} --cflags)<br>- MYSQLCLIENT_INCLUDE=$(echo ${MYSQLCLIENT_INCLUDE} | $SED -e "s|-I|-I${MYSQLCLIENT_DIR}|g")<br>+ MYSQLCLIENT_INCLUDE=$(echo ${MYSQLCLIENT_INCLUDE} | $SED -e "s|-I|-I${MYSQLCLIENT_DIR}|g" -e "s|-std=c99||g")<br> <br> MYSQLCLIENT_LIB=$(${CONFIG_MYSQLCLIENT} --libs)<br> MYSQLCLIENT_LIB=$(echo ${MYSQLCLIENT_LIB} | $SED -e "s|-L|-L${MYSQLCLIENT_DIR}|g")<br>@@ -22849,7 +22849,7 @@<br> <br> if test ! "x${CONFIG_NEON}" = xNo; then<br> NEON_INCLUDE=$(${CONFIG_NEON} --cflags)<br>- NEON_INCLUDE=$(echo ${NEON_INCLUDE} | $SED -e "s|-I|-I${NEON_DIR}|g")<br>+ NEON_INCLUDE=$(echo ${NEON_INCLUDE} | $SED -e "s|-I|-I${NEON_DIR}|g" -e "s|-std=c99||g")<br> <br> NEON_LIB=$(${CONFIG_NEON} --libs)<br> NEON_LIB=$(echo ${NEON_LIB} | $SED -e "s|-L|-L${NEON_DIR}|g")<br>@@ -22969,7 +22969,7 @@<br> <br> if test ! "x${CONFIG_NEON29}" = xNo; then<br> NEON29_INCLUDE=$(${CONFIG_NEON29} --cflags)<br>- NEON29_INCLUDE=$(echo ${NEON29_INCLUDE} | $SED -e "s|-I|-I${NEON29_DIR}|g")<br>+ NEON29_INCLUDE=$(echo ${NEON29_INCLUDE} | $SED -e "s|-I|-I${NEON29_DIR}|g" -e "s|-std=c99||g")<br> <br> NEON29_LIB=$(${CONFIG_NEON29} --libs)<br> NEON29_LIB=$(echo ${NEON29_LIB} | $SED -e "s|-L|-L${NEON29_DIR}|g")<br>@@ -23113,7 +23113,7 @@<br> <br> if test ! "x${CONFIG_NETSNMP}" = xNo; then<br> NETSNMP_INCLUDE=$(${CONFIG_NETSNMP} --cflags)<br>- NETSNMP_INCLUDE=$(echo ${NETSNMP_INCLUDE} | $SED -e "s|-I|-I${NETSNMP_DIR}|g")<br>+ NETSNMP_INCLUDE=$(echo ${NETSNMP_INCLUDE} | $SED -e "s|-I|-I${NETSNMP_DIR}|g" -e "s|-std=c99||g")<br> <br> NETSNMP_LIB=$(${CONFIG_NETSNMP} --agent-libs)<br> NETSNMP_LIB=$(echo ${NETSNMP_LIB} | $SED -e "s|-L|-L${NETSNMP_DIR}|g")<br>@@ -24599,7 +24599,7 @@<br> $as_echo "yes" >&6; }<br> <br> PBX_PJPROJECT=1<br>- PJPROJECT_INCLUDE="$PJPROJECT_CFLAGS"<br>+ PJPROJECT_INCLUDE=$(echo ${PJPROJECT_CFLAGS} | $SED -e "s|-std=c99||g")<br> PJPROJECT_LIB="$PJPROJECT_LIBS"<br> <br> $as_echo "#define HAVE_PJPROJECT 1" >>confdefs.h<br>@@ -25653,7 +25653,7 @@<br> $as_echo "yes" >&6; }<br> <br> PBX_PYTHONDEV=1<br>- PYTHONDEV_INCLUDE="$PYTHONDEV_CFLAGS"<br>+ PYTHONDEV_INCLUDE=$(echo ${PYTHONDEV_CFLAGS} | $SED -e "s|-std=c99||g")<br> PYTHONDEV_LIB="$PYTHONDEV_LIBS"<br> <br> $as_echo "#define HAVE_PYTHONDEV 1" >>confdefs.h<br>@@ -25839,7 +25839,7 @@<br> $as_echo "yes" >&6; }<br> <br> PBX_PORTAUDIO=1<br>- PORTAUDIO_INCLUDE="$PORTAUDIO_CFLAGS"<br>+ PORTAUDIO_INCLUDE=$(echo ${PORTAUDIO_CFLAGS} | $SED -e "s|-std=c99||g")<br> PORTAUDIO_LIB="$PORTAUDIO_LIBS"<br> <br> $as_echo "#define HAVE_PORTAUDIO 1" >>confdefs.h<br>@@ -32345,7 +32345,7 @@<br> $as_echo "yes" >&6; }<br> <br> PBX_GMIME=1<br>- GMIME_INCLUDE="$GMIME_CFLAGS"<br>+ GMIME_INCLUDE=$(echo ${GMIME_CFLAGS} | $SED -e "s|-std=c99||g")<br> GMIME_LIB="$GMIME_LIBS"<br> <br> $as_echo "#define HAVE_GMIME 1" >>confdefs.h<br>@@ -33254,7 +33254,7 @@<br> <br> if test ! "x${CONFIG_SDL}" = xNo; then<br> SDL_INCLUDE=$(${CONFIG_SDL} --cflags)<br>- SDL_INCLUDE=$(echo ${SDL_INCLUDE} | $SED -e "s|-I|-I${SDL_DIR}|g")<br>+ SDL_INCLUDE=$(echo ${SDL_INCLUDE} | $SED -e "s|-I|-I${SDL_DIR}|g" -e "s|-std=c99||g")<br> <br> SDL_LIB=$(${CONFIG_SDL} --libs)<br> SDL_LIB=$(echo ${SDL_LIB} | $SED -e "s|-L|-L${SDL_DIR}|g")<br>@@ -33782,7 +33782,7 @@<br> $as_echo "yes" >&6; }<br> <br> PBX_GTK2=1<br>- GTK2_INCLUDE="$GTK2_CFLAGS"<br>+ GTK2_INCLUDE=$(echo ${GTK2_CFLAGS} | $SED -e "s|-std=c99||g")<br> GTK2_LIB="$GTK2_LIBS"<br> <br> $as_echo "#define HAVE_GTK2 1" >>confdefs.h<br>@@ -33893,7 +33893,7 @@<br> $as_echo "yes" >&6; }<br> <br> PBX_SYSTEMD=1<br>- SYSTEMD_INCLUDE="$SYSTEMD_CFLAGS"<br>+ SYSTEMD_INCLUDE=$(echo ${SYSTEMD_CFLAGS} | $SED -e "s|-std=c99||g")<br> SYSTEMD_LIB="$SYSTEMD_LIBS"<br> <br> $as_echo "#define HAVE_SYSTEMD 1" >>confdefs.h<br>diff --git a/menuselect/configure b/menuselect/configure<br>index 6e5331e..a0aa109 100755<br>--- a/menuselect/configure<br>+++ b/menuselect/configure<br>@@ -4392,7 +4392,7 @@<br> <br> if test ! "x${CONFIG_LIBXML2}" = xNo; then<br> LIBXML2_INCLUDE=$(${CONFIG_LIBXML2} --cflags)<br>- LIBXML2_INCLUDE=$(echo ${LIBXML2_INCLUDE} | $SED -e "s|-I|-I${LIBXML2_DIR}|g")<br>+ LIBXML2_INCLUDE=$(echo ${LIBXML2_INCLUDE} | $SED -e "s|-I|-I${LIBXML2_DIR}|g" -e "s|-std=c99||g")<br> <br> LIBXML2_LIB=$(${CONFIG_LIBXML2} --libs)<br> LIBXML2_LIB=$(echo ${LIBXML2_LIB} | $SED -e "s|-L|-L${LIBXML2_DIR}|g")<br>@@ -4633,7 +4633,7 @@<br> $as_echo "yes" >&6; }<br> <br> PBX_GTK2=1<br>- GTK2_INCLUDE="$GTK2_CFLAGS"<br>+ GTK2_INCLUDE=$(echo ${GTK2_CFLAGS} | $SED -e "s|-std=c99||g")<br> GTK2_LIB="$GTK2_LIBS"<br> <br> $as_echo "#define HAVE_GTK2 1" >>confdefs.h<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/8721">change 8721</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/8721"/><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: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I13389613b194abbac77becf90cd950dc168704db </div>
<div style="display:none"> Gerrit-Change-Number: 8721 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Corey Farrell <git@cfware.com> </div>