gentoo: use /var/run for new /run compatibility
[util-vserver.git] / m4 / ensc_release.m4
1 dnl $Id$
2
3 dnl Copyright (C) 2002, 2003, 2009
4 dnl     Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
5 dnl
6 dnl This program is free software; you can redistribute it and/or modify
7 dnl it under the terms of the GNU General Public License as published by
8 dnl the Free Software Foundation; version 2 and/or 3 of the License.
9 dnl
10 dnl This program is distributed in the hope that it will be useful,
11 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
12 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 dnl GNU General Public License for more details.
14 dnl
15 dnl You should have received a copy of the GNU General Public License
16 dnl along with this program; if not, write to the Free Software
17 dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18
19 dnl Usage: ENSC_RELEASE(<cppflag-variable>)
20 dnl        <cppflag-variable> ... name of variable which will get the preprocessor
21 dnl                               flags and which will be AC_SUBST'ed
22
23 AC_DEFUN([ENSC_RELEASE],
24 [
25         AC_MSG_CHECKING([whether to enable release-mode])
26         AC_ARG_ENABLE([release],
27                       [AC_HELP_STRING([--enable-release],
28                                       [enable release mode (default: no)])],
29                       [case "$enableval" in
30                           yes)  ensc_release_mode=yes;;
31                           no)   ensc_release_mode=no;;
32                           *)    AC_MSG_ERROR(['$enableval' is not a valid value for '--enable-release']);;
33                        esac],
34                       [ ensc_release_mode=no ])
35
36         if test x"$ensc_release_mode" = xno; then
37                 $1=
38         else
39                 $1='-DNDEBUG'
40         fi
41
42         AC_SUBST($1)
43         AC_MSG_RESULT($ensc_release_mode)
44 ])