1dnl  This file is part of MED.
2dnl
3dnl  COPYRIGHT (C) 1999 - 2019  EDF R&D, CEA/DEN
4dnl  MED is free software: you can redistribute it and/or modify
5dnl  it under the terms of the GNU Lesser General Public License as published by
6dnl  the Free Software Foundation, either version 3 of the License, or
7dnl  (at your option) any later version.
8dnl
9dnl  MED is distributed in the hope that it will be useful,
10dnl  but WITHOUT ANY WARRANTY; without even the implied warranty of
11dnl  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12dnl  GNU Lesser General Public License for more details.
13dnl
14dnl  You should have received a copy of the GNU Lesser General Public License
15dnl  along with MED.  If not, see <http://www.gnu.org/licenses/>.
16dnl
17
18AC_DEFUN([MED_CHECK_MESGERR],dnl
19[
20
21## Guess if we have to deactivate explicit error messages
22
23AC_ARG_ENABLE([mesgerr],
24               AC_HELP_STRING([--enable-mesgerr],
25	                   [MED library display error messages @<:@default=yes@:>@]),
26	       [med_check_mesgerr=$enableval],
27	       [med_check_mesgerr=yes])
28
29if test "x$med_check_mesgerr" = "xyes"
30then
31    AC_DEFINE(MESGERR,[1],
32                   [MED library will display error messages.])
33    AC_MSG_NOTICE([MED library display error messages is activated.])
34
35else
36## In case user explicitly ask not to use mesgerr !
37    med_check_mesgerr="no"
38    AC_DEFINE(MESGERR,[0],
39                   [MED library will not display error messages.])
40    AC_MSG_WARN([MED library display error messages is desactivated.])
41fi
42MESGERR="$med_check_mesgerr"
43AC_SUBST(MESGERR)
44])
45
46