Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#13 incorrect CXXFLAGS test in configure

open
nobody
None
5
2007-09-08
2007-09-08
Mike Frysinger
No

the configure.ac file reads:
if [ -z "$CXXFLAGS" ] ; then
CXXFLAGS="-O2 -Wall -W -fno-strength-reduce"
fi

this is incorrect for two reasons ... one, "[" is a quote character in m4 ... you need to use the standard "test" binary instead

two, testing for empty CXXFLAGS is incorrect, you need to test if CXXFLAGS is set:
if test "${CXXFLAGS+set}" != "set" ; then
CXXFLAGS="-O2 -Wall -W -fno-strength-reduce"
fi

Discussion