3228 |
17 May 14 |
peter |
#! /bin/sh |
3228 |
17 May 14 |
peter |
# $Id$ |
3228 |
17 May 14 |
peter |
3 |
# |
3855 |
02 Jan 20 |
peter |
# Copyright (C) 2014, 2019 Peter Johansson |
3228 |
17 May 14 |
peter |
5 |
# |
3228 |
17 May 14 |
peter |
# This file is part of the yat library, http://dev.thep.lu.se/yat |
3228 |
17 May 14 |
peter |
7 |
# |
3228 |
17 May 14 |
peter |
# The yat library is free software; you can redistribute it |
3228 |
17 May 14 |
peter |
# and/or modify it under the terms of the GNU General Public License as |
3228 |
17 May 14 |
peter |
# published by the Free Software Foundation; either version 3 of the |
3228 |
17 May 14 |
peter |
# License, or (at your option) any later version. |
3228 |
17 May 14 |
peter |
12 |
# |
3228 |
17 May 14 |
peter |
# The yat library is distributed in the hope that it will be useful, |
3228 |
17 May 14 |
peter |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
3228 |
17 May 14 |
peter |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
3228 |
17 May 14 |
peter |
# General Public License for more details. |
3228 |
17 May 14 |
peter |
17 |
# |
3228 |
17 May 14 |
peter |
# You should have received a copy of the GNU General Public License |
3228 |
17 May 14 |
peter |
# along with yat. If not, see <http://www.gnu.org/licenses/>. |
3228 |
17 May 14 |
peter |
20 |
|
3228 |
17 May 14 |
peter |
21 |
|
3228 |
17 May 14 |
peter |
# test macro YAT_HEADER_ASSERT |
3228 |
17 May 14 |
peter |
23 |
|
3228 |
17 May 14 |
peter |
24 |
required="autoconf aclocal" |
3228 |
17 May 14 |
peter |
25 |
set -e |
3228 |
17 May 14 |
peter |
26 |
. ./test/init.sh || exit 99 |
3228 |
17 May 14 |
peter |
27 |
|
3228 |
17 May 14 |
peter |
28 |
cat >> configure.ac <<EOF |
3228 |
17 May 14 |
peter |
29 |
AC_CONFIG_HEADERS([config.h]) |
3228 |
17 May 14 |
peter |
30 |
YAT_HEADER_ASSERT |
3228 |
17 May 14 |
peter |
31 |
AC_OUTPUT |
3228 |
17 May 14 |
peter |
32 |
EOF |
3228 |
17 May 14 |
peter |
33 |
|
3228 |
17 May 14 |
peter |
34 |
rm -f config.h.in config.h |
3228 |
17 May 14 |
peter |
35 |
|
3228 |
17 May 14 |
peter |
36 |
bootstrap |
3228 |
17 May 14 |
peter |
37 |
|
3228 |
17 May 14 |
peter |
38 |
grep NDEBUG config.h.in || exit_fail |
3228 |
17 May 14 |
peter |
39 |
|
3825 |
18 Jul 19 |
peter |
40 |
run ./configure 0 CXX="$CXX" |
3228 |
17 May 14 |
peter |
41 |
grep '#define NDEBUG 1' config.h || exit_fail |
3228 |
17 May 14 |
peter |
42 |
|
3825 |
18 Jul 19 |
peter |
43 |
run ./configure 0 CXX="$CXX" --enable-assert |
3228 |
17 May 14 |
peter |
44 |
test -s stderr && exit_fail |
3228 |
17 May 14 |
peter |
45 |
grep '#define NDEBUG' config.h && exit_fail |
3228 |
17 May 14 |
peter |
46 |
|
3228 |
17 May 14 |
peter |
47 |
exit_success |