@@ -59,11 +59,11 @@ case $host_os in
5959 ;;
6060esac
6161
62- CFLAGS="$CFLAGS -W "
62+ CFLAGS="-W $CFLAGS "
6363
6464warn_CFLAGS="-std=c89 -pedantic -Wall -Wextra -Wcast-align -Wnested-externs -Wshadow -Wstrict-prototypes -Wno-unused-function -Wno-long-long -Wno-overlength-strings"
6565saved_CFLAGS="$CFLAGS"
66- CFLAGS="$CFLAGS $warn_CFLAGS "
66+ CFLAGS="$warn_CFLAGS $CFLAGS "
6767AC_MSG_CHECKING ( [ if ${CC} supports ${warn_CFLAGS}] )
6868AC_COMPILE_IFELSE ( [ AC_LANG_SOURCE ( [ [ char foo;] ] ) ] ,
6969 [ AC_MSG_RESULT ( [ yes] ) ] ,
@@ -72,7 +72,7 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[char foo;]])],
7272 ] )
7373
7474saved_CFLAGS="$CFLAGS"
75- CFLAGS="$CFLAGS -fvisibility=hidden"
75+ CFLAGS="-fvisibility=hidden $CFLAGS "
7676AC_MSG_CHECKING ( [ if ${CC} supports -fvisibility=hidden] )
7777AC_COMPILE_IFELSE ( [ AC_LANG_SOURCE ( [ [ char foo;] ] ) ] ,
7878 [ AC_MSG_RESULT ( [ yes] ) ] ,
@@ -173,10 +173,10 @@ AC_CHECK_TYPES([__int128])
173173
174174if test x"$enable_coverage" = x"yes"; then
175175 AC_DEFINE ( COVERAGE , 1 , [ Define this symbol to compile out all VERIFY code] )
176- CFLAGS="$CFLAGS -O0 --coverage"
177- LDFLAGS="$LDFLAGS --coverage"
176+ CFLAGS="-O0 --coverage $CFLAGS "
177+ LDFLAGS="--coverage $LDFLAGS "
178178else
179- CFLAGS="$CFLAGS -O3"
179+ CFLAGS="-O3 $CFLAGS "
180180fi
181181
182182if test x"$use_ecmult_static_precomputation" != x"no"; then
@@ -194,7 +194,7 @@ if test x"$use_ecmult_static_precomputation" != x"no"; then
194194
195195 warn_CFLAGS_FOR_BUILD="-Wall -Wextra -Wno-unused-function"
196196 saved_CFLAGS="$CFLAGS"
197- CFLAGS="$CFLAGS $warn_CFLAGS_FOR_BUILD "
197+ CFLAGS="$warn_CFLAGS_FOR_BUILD $CFLAGS "
198198 AC_MSG_CHECKING ( [ if native ${CC_FOR_BUILD} supports ${warn_CFLAGS_FOR_BUILD}] )
199199 AC_COMPILE_IFELSE ( [ AC_LANG_SOURCE ( [ [ char foo;] ] ) ] ,
200200 [ AC_MSG_RESULT ( [ yes] ) ] ,
0 commit comments