Salome HOME
a4c7774f2870a1b3a254cc0e93559d4c36d1bb86
[modules/med.git] / adm_local / unix / config_files / renumber.m4
1 dnl Copyright (C) 2007-2019  CEA/DEN, EDF R&D, OPEN CASCADE
2 dnl
3 dnl This library is free software; you can redistribute it and/or
4 dnl modify it under the terms of the GNU Lesser General Public
5 dnl License as published by the Free Software Foundation; either
6 dnl version 2.1 of the License, or (at your option) any later version.
7 dnl
8 dnl This library is distributed in the hope that it will be useful,
9 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
10 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 dnl Lesser General Public License for more details.
12 dnl
13 dnl You should have received a copy of the GNU Lesser General Public
14 dnl License along with this library; if not, write to the Free Software
15 dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 dnl
17 dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 dnl
19
20 dnl define macros :
21 dnl AC_ENABLE_RENUMBER AC_DISABLE_RENUMBER
22 dnl author Vincent BERGEAUD
23 dnl
24 # AC_ENABLE_RENUMBER
25 AC_DEFUN([AC_ENABLE_RENUMBER], [dnl
26 define([AC_ENABLE_RENUMBER_DEFAULT], ifelse($1, yes, yes, no))dnl
27 AC_ARG_ENABLE(renumber,
28 changequote(<<, >>)dnl
29 <<  --enable-renumber[=PKGS]  build with renumber tool [default=>>AC_ENABLE_RENUMBER_DEFAULT],
30 changequote([, ])dnl
31 [p=${PACKAGE-default}
32 case "$enableval" in
33 yes) enable_renumber=yes ;;
34 no) enable_renumber=no ;;
35 *)
36   enable_renumber=no
37   # Look at the argument we got.  We use all the common list separators.
38   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
39   for pkg in $enableval; do
40     if test "X$pkg" = "X$p"; then
41       enable_renumber=yes
42     fi
43   done
44   IFS="$ac_save_ifs"
45   ;;
46 esac],
47 enable_renumber=AC_ENABLE_RENUMBER_DEFAULT)dnl
48
49 if test "X$enable_renumber" = "Xyes"; then
50   ENABLE_RENUMBER="yes"
51   AC_SUBST(ENABLE_RENUMBER)
52 fi
53 ])
54
55 # AC_DISABLE_RENUMBER - set the default flag to --disable-renumber
56 AC_DEFUN([AC_DISABLE_RENUMBER], [AC_ENABLE_RENUMBER(no)])
57