2445 |
19 Mar 11 |
peter |
#! /bin/sh |
2445 |
19 Mar 11 |
peter |
# $Id$ |
2445 |
19 Mar 11 |
peter |
3 |
# |
3855 |
02 Jan 20 |
peter |
# Copyright (C) 2011, 2012, 2013, 2014, 2019 Peter Johansson |
2445 |
19 Mar 11 |
peter |
5 |
# |
2445 |
19 Mar 11 |
peter |
# This file is part of the yat library, http://dev.thep.lu.se/yat |
2445 |
19 Mar 11 |
peter |
7 |
# |
2445 |
19 Mar 11 |
peter |
# The yat library is free software; you can redistribute it |
2445 |
19 Mar 11 |
peter |
# and/or modify it under the terms of the GNU General Public License as |
2445 |
19 Mar 11 |
peter |
# published by the Free Software Foundation; either version 3 of the |
2445 |
19 Mar 11 |
peter |
# License, or (at your option) any later version. |
2445 |
19 Mar 11 |
peter |
12 |
# |
2445 |
19 Mar 11 |
peter |
# The yat library is distributed in the hope that it will be useful, |
2445 |
19 Mar 11 |
peter |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
2445 |
19 Mar 11 |
peter |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
2445 |
19 Mar 11 |
peter |
# General Public License for more details. |
2445 |
19 Mar 11 |
peter |
17 |
# |
2445 |
19 Mar 11 |
peter |
# You should have received a copy of the GNU General Public License |
2445 |
19 Mar 11 |
peter |
# along with yat. If not, see <http://www.gnu.org/licenses/>. |
2445 |
19 Mar 11 |
peter |
20 |
|
2445 |
19 Mar 11 |
peter |
21 |
|
2445 |
19 Mar 11 |
peter |
# test macros in m4/yat_msg_error.m4 |
2445 |
19 Mar 11 |
peter |
23 |
|
3227 |
17 May 14 |
peter |
24 |
required="autoconf aclocal" |
2445 |
19 Mar 11 |
peter |
25 |
|
2445 |
19 Mar 11 |
peter |
26 |
set -e |
2445 |
19 Mar 11 |
peter |
27 |
|
3036 |
03 Jun 13 |
peter |
28 |
. ./test/init.sh || exit 99 |
2445 |
19 Mar 11 |
peter |
29 |
|
2445 |
19 Mar 11 |
peter |
30 |
specific_msg='some specific message a51965' |
2445 |
19 Mar 11 |
peter |
31 |
|
2527 |
26 Jul 11 |
peter |
32 |
cat >> configure.ac <<EOF |
2445 |
19 Mar 11 |
peter |
33 |
YAT_MSG_ERROR([$specific_msg]) |
3130 |
18 Nov 13 |
peter |
34 |
AC_PREREQ([2.63]) |
2445 |
19 Mar 11 |
peter |
35 |
AC_MSG_CHECKING([for something more]) |
2445 |
19 Mar 11 |
peter |
36 |
AC_MSG_RESULT([no]) |
2445 |
19 Mar 11 |
peter |
37 |
YAT_MSG_ERROR([could not find something more]) |
2865 |
11 Nov 12 |
peter |
38 |
AC_COMPILE_IFELSE([AC_LANG_PROGRAM]) |
2445 |
19 Mar 11 |
peter |
39 |
AC_CONFIG_FILES([Makefile]) |
2445 |
19 Mar 11 |
peter |
40 |
AC_OUTPUT |
2445 |
19 Mar 11 |
peter |
41 |
EOF |
2445 |
19 Mar 11 |
peter |
42 |
|
2445 |
19 Mar 11 |
peter |
43 |
echo "@configure_input@" > Makefile.in |
2445 |
19 Mar 11 |
peter |
44 |
|
2445 |
19 Mar 11 |
peter |
45 |
bootstrap |
2445 |
19 Mar 11 |
peter |
46 |
rm -f config.status |
3825 |
18 Jul 19 |
peter |
47 |
run ./configure 1 "$my_FLAGS" $configure_opts |
2520 |
11 Jul 11 |
peter |
48 |
grep "$specific_msg" stderr || exit_fail |
2520 |
11 Jul 11 |
peter |
49 |
grep "$specific_msg" config.log || exit_fail |
2445 |
19 Mar 11 |
peter |
50 |
|
2445 |
19 Mar 11 |
peter |
# configure should abort before config.status creates Makefile |
2520 |
11 Jul 11 |
peter |
52 |
test -f Makefile && exit_fail |
2445 |
19 Mar 11 |
peter |
53 |
|
2520 |
11 Jul 11 |
peter |
54 |
grep 'for something more' stdout || exit_fail |
2622 |
06 Nov 11 |
peter |
55 |
exit_success |