From: caremoli Date: Tue, 19 Jun 2007 17:09:53 +0000 (+0000) Subject: CCAR: remove PKGS from enable-debug and enable-production macros X-Git-Tag: BR_For40_DSC_20070622~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=732fff6662dcd9b75052d8a7b38c4eccd6d97c82;p=modules%2Fkernel.git CCAR: remove PKGS from enable-debug and enable-production macros --- diff --git a/salome_adm/unix/config_files/production.m4 b/salome_adm/unix/config_files/production.m4 index e4a61870b..1d2b1b0a5 100644 --- a/salome_adm/unix/config_files/production.m4 +++ b/salome_adm/unix/config_files/production.m4 @@ -28,30 +28,20 @@ dnl version $Id$ dnl author Patrick GOLDBRONN dnl -# AC_ENABLE_PRODUCTION -AC_DEFUN([AC_ENABLE_PRODUCTION], [dnl -define([AC_ENABLE_PRODUCTION_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE(production, -changequote(<<, >>)dnl -<< --enable-production[=PKGS] build without debug information [default=>>AC_ENABLE_PRODUCTION_DEFAULT], -changequote([, ])dnl -[p=${PACKAGE-default} -case "$enableval" in -yes) enable_production=yes ;; -no) enable_production=no ;; -*) - enable_production=no - # Look at the argument we got. We use all the common list separators. - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," - for pkg in $enableval; do - if test "X$pkg" = "X$p"; then - enable_production=yes - fi - done - IFS="$ac_save_ifs" - ;; -esac], -enable_production=AC_ENABLE_PRODUCTION_DEFAULT)dnl +dnl AC_ENABLE_PRODUCTION +dnl +dnl This macro enables production build : optimized + no debugging information (-g) +dnl default = not enabled +dnl +AC_DEFUN([AC_ENABLE_PRODUCTION], +[define([AC_ENABLE_PRODUCTION_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE([production], + [AC_HELP_STRING([--enable-production], + [compile in optimized mode @<:@default=]AC_ENABLE_PRODUCTION_DEFAULT[@:>@])], + [ + enable_production=$enableval + ], + [enable_production=]AC_ENABLE_PRODUCTION_DEFAULT) AC_CXX_OPTION(-Wno-deprecated,CXXFLAGS) AC_CXX_OPTION(-Wparentheses,CXXFLAGS) @@ -65,36 +55,29 @@ if test "X$enable_production" = "Xyes"; then CFLAGS="$CFLAGS -O" AC_CXX_OPTION(-Wuninitialized,CXXFLAGS) CXXFLAGS="$CXXFLAGS -O " +else + CFLAGS="$CFLAGS -O -g" + CXXFLAGS="$CXXFLAGS -O -g" fi ]) # AC_DISABLE_PRODUCTION - set the default flag to --disable-production AC_DEFUN([AC_DISABLE_PRODUCTION], [AC_ENABLE_PRODUCTION(no)]) -# AC_ENABLE_DEBUG -AC_DEFUN([AC_ENABLE_DEBUG], [dnl -define([AC_ENABLE_DEBUG_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE(debug, -changequote(<<, >>)dnl -<< --enable-debug[=PKGS] build without debug information [default=>>AC_ENABLE_DEBUG_DEFAULT], -changequote([, ])dnl -[p=${PACKAGE-default} -case "$enableval" in -yes) enable_debug=yes ;; -no) enable_debug=no ;; -*) - enable_debug=no - # Look at the argument we got. We use all the common list separators. - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," - for pkg in $enableval; do - if test "X$pkg" = "X$p"; then - enable_debug=yes - fi - done - IFS="$ac_save_ifs" - ;; -esac], -enable_debug=AC_ENABLE_DEBUG_DEFAULT)dnl +dnl AC_ENABLE_DEBUG +dnl +dnl This macro enables debugging build : debug + trace +dnl default = not enabled +dnl +AC_DEFUN([AC_ENABLE_DEBUG], + [define([AC_ENABLE_DEBUG_DEFAULT], ifelse($1, no, no, yes))dnl + AC_ARG_ENABLE([debug], + [AC_HELP_STRING([--enable-debug], + [build with debug and trace information @<:@default=]AC_ENABLE_DEBUG_DEFAULT[@:>@])], + [ + enable_debug=$enableval + ], + [enable_debug=]AC_ENABLE_DEBUG_DEFAULT) if test "X$enable_debug" = "Xyes"; then CFLAGS="$CFLAGS -g -D_DEBUG_ "