source: trunk/m4/yat_header_assert.m4

Last change on this file was 3226, checked in by Peter, 7 years ago

New macro YAT_HEADER_ASSERT

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id Date
File size: 1.3 KB
Line 
1## $Id: yat_header_assert.m4 3226 2014-05-14 03:06:56Z peter $
2#
3# serial 1  (yat 0.13)
4#
5# see http://www.gnu.org/software/automake/manual/automake.html#Serials
6#
7# SYNOPSIS
8#
9#   YAT_HEADER_ASSERT
10#
11# DESCRIPTION
12#
13#   Add an option --enable-assertion; when not given NDEBUG is AC_DEFINEd
14#
15# LAST MODIFICATION
16#
17#   $Date: 2014-05-14 03:06:56 +0000 (Wed, 14 May 2014) $
18#
19# COPYLEFT
20#
21#   Copyright (C) 2014 Peter Johansson
22#
23#   This file is part of the yat library, http://dev.thep.lu.se/yat
24#
25#   The yat library is free software; you can redistribute it and/or
26#   modify it under the terms of the GNU General Public License as
27#   published by the Free Software Foundation; either version 3 of the
28#   License, or (at your option) any later version.
29#
30#   The yat library is distributed in the hope that it will be useful,
31#   but WITHOUT ANY WARRANTY; without even the implied warranty of
32#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
33#   General Public License for more details.
34#
35#   You should have received a copy of the GNU General Public License
36#   along with yat. If not, see <http://www.gnu.org/licenses/>.
37#
38
39AC_DEFUN([YAT_HEADER_ASSERT],
40[
41AC_ARG_ENABLE([assert],
42              [AS_HELP_STRING([--enable-assert], [turn on assertions])],
43              [], [enable_assert=no])
44AS_IF([test x"$enable_assert" = x"no"], [
45  AC_DEFINE([NDEBUG], [1], [Define to turn off assertions])
46])
47]) # YAT_HEADER_ASSERT
Note: See TracBrowser for help on using the repository browser.