0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-03 02:28:55 +02:00

m4: Update CHARYBDIS_C_GCC_TRY_FLAGS, which has a $CFLAGS impurity.

This commit is contained in:
Jason Volk 2016-07-21 17:53:09 -07:00
parent 5ed274e082
commit 7ad2bf79bc

View file

@ -35,8 +35,8 @@ AC_DEFUN([CHARYBDIS_C_GCC_TRY_FLAGS],[
if test "${GCC-no}" = yes
then
AC_CACHE_VAL($2,[
oldcflags="${CFLAGS-}"
CFLAGS="${CFLAGS-} ${CWARNS} $1 -Werror"
oldcflags="${CXXFLAGS-}"
CXXFLAGS="${CXXFLAGS-} ${CWARNS} $1 -Werror"
AC_TRY_COMPILE([
#include <string.h>
#include <stdio.h>
@ -44,7 +44,7 @@ int main(void);
],[
(void)strcmp("a","b"); fprintf(stdout,"test ok\n");
], [$2=yes], [$2=no])
CFLAGS="${oldcflags}"])
CXXFLAGS="${oldcflags}"])
if test "x$$2" = xyes; then
CWARNS="${CWARNS}$1 "
AC_MSG_RESULT(ok)