Author: tjansen Date: Wed Nov 4 17:38:31 2009 New Revision: 1521 Log: Replaced CFLAGS with AM_CFLAGS and removed -g -O2. Autoconf sets "-g -O2" automatically for CFLAGS, when no CFLAGS are given during configure (provided gcc is available, otherwise only "-g" is used). This way, packagers can decide what level of optimization they want. The benefit of setting our own flags in AM_CFLAGS is that it obsoletes the crutch of having CFLAGS substitution in CFLAGS itself. According to the manual, CFLAGS is reserved for the user (i.e. packager), whereas AM_CFLAGS is supposed to have flags that are deemed mandatory by the programmers. Further information can be found here: http://www.gnu.org/software/autoconf/manual/autoconf.html#Preset-Output-Variables http://www.gnu.org/software/automake/manual/automake.html#User-Variables Modified: trunk/configure.ac Modified: trunk/configure.ac ============================================================================== --- trunk/configure.ac Wed Nov 4 17:16:53 2009 (r1520) +++ trunk/configure.ac Wed Nov 4 17:38:31 2009 (r1521) @@ -121,9 +121,9 @@ AC_SUBST(PISA_HIPL_SRCDIR, "$ac_cv_hipl_dir") fi -# Set default CFLAGS for the complete project. -AC_SUBST(CFLAGS, "$CFLAGS -g -O2 -Wall -Wextra -Wredundant-decls -Wstrict-prototypes -Wdisabled-optimization -Wpointer-arith -Wundef -Winline -Wno-deprecated-declarations -Wmissing-prototypes -Wwrite-strings -Wcast-qual -Wshadow") -#AC_SUBST(CFLAGS, "$CFLAGS -g -O2 -Wall -Wextra -Wredundant-decls -Wstrict-prototypes -Wdisabled-optimization -Wpointer-arith -Wundef -Winline -Wno-deprecated-declarations -Wmissing-prototypes -Wwrite-strings -Wcast-qual -Wshadow -Wtype-limits") +# Set default AM_CFLAGS for the complete project. +AC_SUBST(AM_CFLAGS, "-Wall -Wextra -Wredundant-decls -Wstrict-prototypes -Wdisabled-optimization -Wpointer-arith -Wundef -Winline -Wno-deprecated-declarations -Wmissing-prototypes -Wwrite-strings -Wcast-qual -Wshadow") +#AC_SUBST(AM_CFLAGS, "-Wall -Wextra -Wredundant-decls -Wstrict-prototypes -Wdisabled-optimization -Wpointer-arith -Wundef -Winline -Wno-deprecated-declarations -Wmissing-prototypes -Wwrite-strings -Wcast-qual -Wshadow -Wtype-limits") if test -d "$PISA_HIPL_SRCDIR"; then AC_DEFINE(CONFIG_PISA_WITH_HIPL, AC_PREREQ(2.53))