From: des Date: Tue, 24 Apr 2007 12:36:58 +0000 (+0000) Subject: Move CFLAGS configuration to the bottom so it doesn't affect other tests. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a256f4e1ccb3653eba7ca8b94e7187f88684bfaf;p=varnish Move CFLAGS configuration to the bottom so it doesn't affect other tests. This makes --enable-werror work again. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1366 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/configure.ac b/varnish-cache/configure.ac index e051c2f5..8015f587 100644 --- a/varnish-cache/configure.ac +++ b/varnish-cache/configure.ac @@ -12,20 +12,6 @@ AC_LANG(C) AM_INIT_AUTOMAKE -# Compiler flags (assume GCC). -# This section *must* come before AC_PROG_CC / AC_PROG_CPP. -CFLAGS="${CFLAGS:--O2 -pipe}" -DEVELOPER_CFLAGS="-Wall -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wformat" -AC_ARG_ENABLE(developer-warnings, - AS_HELP_STRING([--enable-developer-warnings],[enable strict warnings (default is NO)]), - CFLAGS="${CFLAGS} ${DEVELOPER_CFLAGS}") -AC_ARG_ENABLE(debugging-symbols, - AS_HELP_STRING([--enable-debugging-symbols],[enable debugging symbols (default is NO)]), - CFLAGS="${CFLAGS} -O0 -g -fno-inline") -AC_ARG_ENABLE(werror, - AS_HELP_STRING([--enable-werror],[use -Werror (default is NO)]), - CFLAGS="${CFLAGS} -Werror") - # Checks for programs. AC_GNU_SOURCE AC_PROG_CC @@ -113,6 +99,20 @@ AC_CHECK_FUNCS([kqueue]) AC_CHECK_FUNCS([epoll_ctl]) AC_CHECK_FUNCS([poll]) +# Now that we're done using the compiler to look for functions and +# libraries, set CFLAGS to what we want them to be for our own code +DEVELOPER_CFLAGS="-Wall -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wformat" +AC_ARG_ENABLE(developer-warnings, + AS_HELP_STRING([--enable-developer-warnings],[enable strict warnings (default is NO)]), + CFLAGS="${CFLAGS} ${DEVELOPER_CFLAGS}") +AC_ARG_ENABLE(debugging-symbols, + AS_HELP_STRING([--enable-debugging-symbols],[enable debugging symbols (default is NO)]), + CFLAGS="${CFLAGS} -O0 -g -fno-inline") +AC_ARG_ENABLE(werror, + AS_HELP_STRING([--enable-werror],[use -Werror (default is NO)]), + CFLAGS="${CFLAGS} -Werror") + +# Generate output AC_CONFIG_FILES([ Makefile bin/Makefile