1856 |
07 Mar 09 |
peter |
#! /bin/sh |
1856 |
07 Mar 09 |
peter |
# $Id$ |
1856 |
07 Mar 09 |
peter |
3 |
# |
3114 |
10 Nov 13 |
peter |
# Copyright (C) 2009, 2010, 2011, 2012, 2013 Peter Johansson |
1856 |
07 Mar 09 |
peter |
5 |
# |
1856 |
07 Mar 09 |
peter |
# This file is part of the yat library, http://dev.thep.lu.se/yat |
1856 |
07 Mar 09 |
peter |
7 |
# |
1856 |
07 Mar 09 |
peter |
# The yat library is free software; you can redistribute it |
1856 |
07 Mar 09 |
peter |
# and/or modify it under the terms of the GNU General Public License as |
1856 |
07 Mar 09 |
peter |
# published by the Free Software Foundation; either version 3 of the |
1856 |
07 Mar 09 |
peter |
# License, or (at your option) any later version. |
1856 |
07 Mar 09 |
peter |
12 |
# |
1856 |
07 Mar 09 |
peter |
# The yat library is distributed in the hope that it will be useful, |
1856 |
07 Mar 09 |
peter |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
1856 |
07 Mar 09 |
peter |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
1856 |
07 Mar 09 |
peter |
# General Public License for more details. |
1856 |
07 Mar 09 |
peter |
17 |
# |
1856 |
07 Mar 09 |
peter |
# You should have received a copy of the GNU General Public License |
1856 |
07 Mar 09 |
peter |
# along with yat. If not, see <http://www.gnu.org/licenses/>. |
1856 |
07 Mar 09 |
peter |
20 |
|
1856 |
07 Mar 09 |
peter |
21 |
|
1856 |
07 Mar 09 |
peter |
# test that YAT_CXX_ADD_FLAG adds the passed flag and but not if FLAFS |
1856 |
07 Mar 09 |
peter |
# is already present |
1856 |
07 Mar 09 |
peter |
24 |
|
2240 |
11 Apr 10 |
peter |
25 |
required="autoconf automake g++" |
1856 |
07 Mar 09 |
peter |
26 |
|
1856 |
07 Mar 09 |
peter |
27 |
set -e |
1856 |
07 Mar 09 |
peter |
28 |
|
3036 |
03 Jun 13 |
peter |
29 |
. test/init.sh || exit 99 |
1856 |
07 Mar 09 |
peter |
30 |
|
2225 |
22 Mar 10 |
peter |
31 |
cat >> configure.ac <<EOF |
2527 |
26 Jul 11 |
peter |
32 |
AC_LANG([C++]) |
2527 |
26 Jul 11 |
peter |
33 |
AC_PROG_CXXCPP |
2527 |
26 Jul 11 |
peter |
34 |
AC_PROG_CXX |
1856 |
07 Mar 09 |
peter |
35 |
YAT_CXX_ADD_FLAG([YAT_CXXFLAGS__], [-DSOMETHING]) |
1856 |
07 Mar 09 |
peter |
36 |
YAT_CXX_ADD_FLAG([YAT_CXXFLAGS__], [-DSOMETHING]) |
1856 |
07 Mar 09 |
peter |
37 |
AC_SUBST(YAT_CXXFLAGS__) |
2225 |
22 Mar 10 |
peter |
38 |
AC_CONFIG_FILES([Makefile]) |
2225 |
22 Mar 10 |
peter |
39 |
AC_OUTPUT |
1856 |
07 Mar 09 |
peter |
40 |
EOF |
1856 |
07 Mar 09 |
peter |
41 |
|
2205 |
27 Feb 10 |
peter |
42 |
bootstrap |
3112 |
10 Nov 13 |
peter |
43 |
./configure $configure_opts CXX=g++ |
1856 |
07 Mar 09 |
peter |
44 |
|
1856 |
07 Mar 09 |
peter |
45 |
grep 'YAT_CXXFLAGS__' Makefile |
1856 |
07 Mar 09 |
peter |
46 |
|
2520 |
11 Jul 11 |
peter |
47 |
grep 'YAT_CXXFLAGS__.*SOMETHING' Makefile || exit_fail found no SOMETHING |
1856 |
07 Mar 09 |
peter |
48 |
|
1856 |
07 Mar 09 |
peter |
49 |
if test `grep 'YAT_CXXFLAGS__.*SOMETHING.*SOMETHING' Makefile | wc -l` = 0; then |
1856 |
07 Mar 09 |
peter |
50 |
: |
1856 |
07 Mar 09 |
peter |
51 |
else |
1856 |
07 Mar 09 |
peter |
52 |
echo "ERROR: double SOMETHING" |
2528 |
26 Jul 11 |
peter |
53 |
exit_fail |
1856 |
07 Mar 09 |
peter |
54 |
fi |
1856 |
07 Mar 09 |
peter |
55 |
|
1856 |
07 Mar 09 |
peter |
56 |
echo "Test is OK" |