1 dnl Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
4 dnl This library is free software; you can redistribute it and/or
5 dnl modify it under the terms of the GNU Lesser General Public
6 dnl License as published by the Free Software Foundation; either
7 dnl version 2.1 of the License.
9 dnl This library is distributed in the hope that it will be useful,
10 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
11 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 dnl Lesser General Public License for more details.
14 dnl You should have received a copy of the GNU Lesser General Public
15 dnl License along with this library; if not, write to the Free Software
16 dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 dnl See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
23 dnl AC_ENABLE_PRODUCTION AC_DISABLE_PRODUCTION
25 dnl AC_ENABLE_DEBUG AC_DISABLE_DEBUG
28 dnl author Patrick GOLDBRONN
31 # AC_ENABLE_PRODUCTION
32 AC_DEFUN(AC_ENABLE_PRODUCTION, [dnl
33 define([AC_ENABLE_PRODUCTION_DEFAULT], ifelse($1, no, no, yes))dnl
34 AC_ARG_ENABLE(production,
35 changequote(<<, >>)dnl
36 << --enable-production[=PKGS] build without debug information [default=>>AC_ENABLE_PRODUCTION_DEFAULT],
40 yes) enable_production=yes ;;
41 no) enable_production=no ;;
44 # Look at the argument we got. We use all the common list separators.
45 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
46 for pkg in $enableval; do
47 if test "X$pkg" = "X$p"; then
54 enable_production=AC_ENABLE_PRODUCTION_DEFAULT)dnl
55 if test "X$enable_production" = "Xyes"; then
58 CXXFLAGS="$CXXFLAGS -O3 "
66 # AC_DISABLE_PRODUCTION - set the default flag to --disable-production
67 AC_DEFUN(AC_DISABLE_PRODUCTION, [AC_ENABLE_PRODUCTION(no)])
70 AC_DEFUN(AC_ENABLE_DEBUG, [dnl
71 define([AC_ENABLE_DEBUG_DEFAULT], ifelse($1, no, no, yes))dnl
73 changequote(<<, >>)dnl
74 << --enable-debug[=PKGS] build without debug information [default=>>AC_ENABLE_DEBUG_DEFAULT],
78 yes) enable_debug=yes ;;
79 no) enable_debug=no ;;
82 # Look at the argument we got. We use all the common list separators.
83 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
84 for pkg in $enableval; do
85 if test "X$pkg" = "X$p"; then
92 enable_debug=AC_ENABLE_DEBUG_DEFAULT)dnl
94 if test "X$enable_debug" = "Xyes"; then
97 CXXFLAGS="$CXXFLAGS -g "
105 # AC_DISABLE_DEBUG - set the default flag to --disable-debug
106 AC_DEFUN(AC_DISABLE_DEBUG, [AC_ENABLE_DEBUG(no)])