diff options
author | Corey Farrell <git@cfware.com> | 2018-04-04 11:02:06 -0400 |
---|---|---|
committer | Corey Farrell <git@cfware.com> | 2018-04-04 11:04:46 -0400 |
commit | e40fd7a232bd9ab97c047fe9030453e7fb99c9cb (patch) | |
tree | 3a9a366bd90d867ceae167d3d40c679e70ef4ea9 /autoconf | |
parent | edba638a729e8363a07f373006c250e66f353d82 (diff) |
Build System: Strip '-std=c99' from CFLAGS provided by libraries.
Asterisk requires GNU C extensions. On some systems certain libraries
may incorrectly push -std=c99 into CFLAGS, thus breaking the build.
This change causes that flag to be stripped so the Asterisk build is not
broken by those libraries. This change is made for both pkgconfig and
tool based libraries.
ASTERISK-27629 #close
Change-Id: I13389613b194abbac77becf90cd950dc168704db
Diffstat (limited to 'autoconf')
-rw-r--r-- | autoconf/ast_ext_tool_check.m4 | 2 | ||||
-rw-r--r-- | autoconf/ast_pkgconfig.m4 | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/autoconf/ast_ext_tool_check.m4 b/autoconf/ast_ext_tool_check.m4 index ef762eb87..cbe109e4a 100644 --- a/autoconf/ast_ext_tool_check.m4 +++ b/autoconf/ast_ext_tool_check.m4 @@ -11,7 +11,7 @@ AC_DEFUN([AST_EXT_TOOL_CHECK], AC_PATH_TOOL(CONFIG_$1, $2, No, [${$1_DIR}/bin:$PATH]) if test ! "x${CONFIG_$1}" = xNo; then $1_INCLUDE=$(${CONFIG_$1} m4_default([$3],[--cflags])) - $1_INCLUDE=$(echo ${$1_INCLUDE} | $SED -e "s|-I|-I${$1_DIR}|g") + $1_INCLUDE=$(echo ${$1_INCLUDE} | $SED -e "s|-I|-I${$1_DIR}|g" -e "s|-std=c99||g") $1_LIB=$(${CONFIG_$1} m4_default([$4],[--libs])) $1_LIB=$(echo ${$1_LIB} | $SED -e "s|-L|-L${$1_DIR}|g") diff --git a/autoconf/ast_pkgconfig.m4 b/autoconf/ast_pkgconfig.m4 index ae7bbc086..3415ed547 100644 --- a/autoconf/ast_pkgconfig.m4 +++ b/autoconf/ast_pkgconfig.m4 @@ -5,7 +5,7 @@ AC_DEFUN([AST_PKG_CONFIG_CHECK], if test "x${PBX_$1}" != "x1" -a "${USE_$1}" != "no"; then PKG_CHECK_MODULES($1, $2, [ PBX_$1=1 - $1_INCLUDE="$$1_CFLAGS" + $1_INCLUDE=$(echo ${$1_CFLAGS} | $SED -e "s|-std=c99||g") $1_LIB="$$1_LIBS" AC_DEFINE([HAVE_$1], 1, [Define if your system has the $1 libraries.]) ], [ |