configure.ac: Optimization of building 'CFLAGS' variable.

Now user-defined CFLAG (from envirovement) have higest priority before
internal definitions.

Also, patch have change for respect code optimization options from user.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
This commit is contained in:
Slava Zanko 2009-11-26 13:18:14 +02:00
parent 4bc224dd3c
commit 771a2958ad

View File

@ -515,7 +515,11 @@ fi
MC_CHECK_CFLAGS
CFLAGS_OPTS=" -O2 "
CFLAGS_OPTS=""
if test x$CFLAGS = x; then
CFLAGS_OPTS=" -O2 "
fi
if test x$USE_MAINTAINER_MODE = xyes; then
CFLAGS_OPTS="-g3 -O -ggdb"
@ -530,8 +534,7 @@ AC_ARG_ENABLE(
if test "x$enable_werror" = xyes; then
MC_CHECK_ONE_CFLAG([-Werror])
fi
CFLAGS="$CFLAGS $mc_configured_cflags $CFLAGS_OPTS"
CFLAGS="$mc_configured_cflags $CFLAGS_OPTS $CFLAGS"
AC_SUBST(CFLAGS)
AC_SUBST(CPPFLAGS)