Set a blank CXXFLAGS only if not already present

This commit is contained in:
Danny Robson 2012-04-27 17:54:26 +10:00
parent 9269d55112
commit a26dcd1444

View File

@ -1,11 +1,11 @@
AC_INIT([libgim], [0.1.0], [danny@nerdcruft.net])
## Explicitly set an empty CXXFLAGS if not present to prevent AC_PROG_CXX from
## generating a default -O2. This allows us to manually select -O0 when
## debugging is enabled.
: ${CXXFLAGS=""}
AC_CANONICAL_HOST
## We remove CXXFLAGS as autotools inserts them /AFTER/ our own CXXFLAGS,
## thus overriding any variables that both set (specifically we're concerned
## about optimisation flags).
CXXFLAGS="-g"
AC_PROG_CXX
AC_LANG([C++])
LT_INIT