From 771a2958ad7dd5787a489beac94129e8bbf24516 Mon Sep 17 00:00:00 2001 From: Slava Zanko Date: Thu, 26 Nov 2009 13:18:14 +0200 Subject: [PATCH] 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 --- configure.ac | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 543023240..84b1b9bee 100644 --- a/configure.ac +++ b/configure.ac @@ -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) -- 2.11.4.GIT