gnucash master: Refine forcing C11 to handle case where AC_PROG_CC_C99 doesn't set -std=

John Ralls jralls at code.gnucash.org
Mon May 25 14:07:08 EDT 2015


Updated	 via  https://github.com/Gnucash/gnucash/commit/80034b39 (commit)
	from  https://github.com/Gnucash/gnucash/commit/b9de55c8 (commit)



commit 80034b39bc3931821408705988b9d05cc47207e2
Author: John Ralls <jralls at ceridwen.us>
Date:   Mon May 25 11:06:50 2015 -0700

    Refine forcing C11 to handle case where AC_PROG_CC_C99 doesn't set -std=

diff --git a/configure.ac b/configure.ac
index 3b7387c..47e5e80 100644
--- a/configure.ac
+++ b/configure.ac
@@ -370,8 +370,9 @@ PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.44 gio-2.0 >= 2.25 gthread-2.0
 AC_CHECK_HEADERS(dirent.h dlfcn.h dl.h utmp.h locale.h mcheck.h unistd.h wctype.h)
 
 GLIB_GSETTINGS
-CFLAGS=`echo ${CFLAGS} | sed -E -e "s,-std=[[a-z0-9]]+,-std=${ac_cv_cstd},g"`
-echo "New CFLAGS are $CFLAGS"
+dnl First remove any existing -std= setting from CFLAGS then add the one we want.
+CFLAGS=`echo "${CFLAGS} | sed -E -e "s,-std=[[a-z0-9]]+,,g"`
+CFLAGS="${CFLAGS} -std=${ac_cv_cstd}"
 
 # I'm sure we (used to?) require this in various places, so don't remove
 # this test unless you've done sufficient code review/testing.



Summary of changes:
 configure.ac | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)



More information about the gnucash-changes mailing list