1842 |
02 Mar 09 |
peter |
#! /bin/sh |
1842 |
02 Mar 09 |
peter |
# $Id$ |
1842 |
02 Mar 09 |
peter |
3 |
# |
3855 |
02 Jan 20 |
peter |
# Copyright (C) 2009, 2010, 2011, 2012, 2013, 2019 Peter Johansson |
1842 |
02 Mar 09 |
peter |
5 |
# |
1842 |
02 Mar 09 |
peter |
# This file is part of the yat library, http://dev.thep.lu.se/yat |
1842 |
02 Mar 09 |
peter |
7 |
# |
1842 |
02 Mar 09 |
peter |
# The yat library is free software; you can redistribute it |
1842 |
02 Mar 09 |
peter |
# and/or modify it under the terms of the GNU General Public License as |
1842 |
02 Mar 09 |
peter |
# published by the Free Software Foundation; either version 3 of the |
1842 |
02 Mar 09 |
peter |
# License, or (at your option) any later version. |
1842 |
02 Mar 09 |
peter |
12 |
# |
1842 |
02 Mar 09 |
peter |
# The yat library is distributed in the hope that it will be useful, |
1842 |
02 Mar 09 |
peter |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
1842 |
02 Mar 09 |
peter |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
1842 |
02 Mar 09 |
peter |
# General Public License for more details. |
1842 |
02 Mar 09 |
peter |
17 |
# |
1842 |
02 Mar 09 |
peter |
# You should have received a copy of the GNU General Public License |
1842 |
02 Mar 09 |
peter |
# along with yat. If not, see <http://www.gnu.org/licenses/>. |
1842 |
02 Mar 09 |
peter |
20 |
|
1842 |
02 Mar 09 |
peter |
21 |
|
1842 |
02 Mar 09 |
peter |
# build a `hello world' project that uses macro YAT_CHECK_YAT in its |
1842 |
02 Mar 09 |
peter |
# configure.ac. Test if the macro works against an uninstalled yat. |
1842 |
02 Mar 09 |
peter |
24 |
|
2240 |
11 Apr 10 |
peter |
25 |
required="autoconf automake libtool" |
1854 |
07 Mar 09 |
peter |
26 |
|
1842 |
02 Mar 09 |
peter |
27 |
set -e |
1842 |
02 Mar 09 |
peter |
28 |
|
3036 |
03 Jun 13 |
peter |
29 |
. test/init.sh || exit 99 |
1842 |
02 Mar 09 |
peter |
30 |
|
2225 |
22 Mar 10 |
peter |
31 |
cat >> configure.ac <<EOF |
2202 |
21 Feb 10 |
peter |
32 |
YAT_FIND_YAT |
2202 |
21 Feb 10 |
peter |
33 |
CXX=\`\$yat_config --cxx\` |
1851 |
05 Mar 09 |
peter |
34 |
YAT_CHECK_VERSION([0.5.99],, |
1851 |
05 Mar 09 |
peter |
35 |
[AC_MSG_ERROR([could not find required version of yat])]) |
1851 |
05 Mar 09 |
peter |
36 |
YAT_CHECK_HEADER(,[AC_MSG_ERROR([could not find yat headers])]) |
3018 |
04 Apr 13 |
peter |
37 |
YAT_LDFLAGS=\`\$yat_config --ldflags\` |
3018 |
04 Apr 13 |
peter |
38 |
AC_SUBST([YAT_LDFLAGS]) |
2694 |
28 Feb 12 |
peter |
39 |
YAT_LDADD=\`\$yat_config --link-libtool\` |
1899 |
16 Apr 09 |
peter |
40 |
AC_SUBST(YAT_LDADD) |
2225 |
22 Mar 10 |
peter |
41 |
AC_CONFIG_FILES([Makefile]) |
2225 |
22 Mar 10 |
peter |
42 |
AC_OUTPUT |
1851 |
05 Mar 09 |
peter |
43 |
EOF |
1851 |
05 Mar 09 |
peter |
44 |
|
2206 |
28 Feb 10 |
peter |
45 |
bootstrap |
3825 |
18 Jul 19 |
peter |
46 |
./configure CXX="$CXX" $configure_opts -C --with-yat=$YAT_CONFIG |
1842 |
02 Mar 09 |
peter |
47 |
|
1842 |
02 Mar 09 |
peter |
48 |
make |
2520 |
11 Jul 11 |
peter |
49 |
./hello || exit_fail |
1842 |
02 Mar 09 |
peter |
50 |
|
3825 |
18 Jul 19 |
peter |
51 |
./configure CXX="$CXX" $configure_opts -C --with-yat=$YAT_CONFIG > stdout |
2694 |
28 Feb 12 |
peter |
52 |
cat stdout |
2694 |
28 Feb 12 |
peter |
53 |
grep yat stdout |
2694 |
28 Feb 12 |
peter |
54 |
grep "version in 'yat/utility/version.h'" stdout | grep cached || exit_failure |
2694 |
28 Feb 12 |
peter |
55 |
|
2608 |
01 Nov 11 |
peter |
56 |
exit_success |