3036 |
03 Jun 13 |
peter |
#! /bin/sh |
3036 |
03 Jun 13 |
peter |
# $Id$ |
3036 |
03 Jun 13 |
peter |
3 |
# |
3855 |
02 Jan 20 |
peter |
# Copyright (C) 2013, 2019 Peter Johansson |
3036 |
03 Jun 13 |
peter |
5 |
# |
3036 |
03 Jun 13 |
peter |
# This file is part of the yat library, http://dev.thep.lu.se/yat |
3036 |
03 Jun 13 |
peter |
7 |
# |
3036 |
03 Jun 13 |
peter |
# The yat library is free software; you can redistribute it |
3036 |
03 Jun 13 |
peter |
# and/or modify it under the terms of the GNU General Public License as |
3036 |
03 Jun 13 |
peter |
# published by the Free Software Foundation; either version 3 of the |
3036 |
03 Jun 13 |
peter |
# License, or (at your option) any later version. |
3036 |
03 Jun 13 |
peter |
12 |
# |
3036 |
03 Jun 13 |
peter |
# The yat library is distributed in the hope that it will be useful, |
3036 |
03 Jun 13 |
peter |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
3036 |
03 Jun 13 |
peter |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
3036 |
03 Jun 13 |
peter |
# General Public License for more details. |
3036 |
03 Jun 13 |
peter |
17 |
# |
3036 |
03 Jun 13 |
peter |
# You should have received a copy of the GNU General Public License |
3036 |
03 Jun 13 |
peter |
# along with yat. If not, see <http://www.gnu.org/licenses/>. |
3036 |
03 Jun 13 |
peter |
20 |
|
3130 |
18 Nov 13 |
peter |
21 |
required="autoconf automake libtool libmy-shared" |
3036 |
03 Jun 13 |
peter |
22 |
set -e |
3036 |
03 Jun 13 |
peter |
23 |
. ./test/init.sh || exit 99 |
3036 |
03 Jun 13 |
peter |
24 |
|
3036 |
03 Jun 13 |
peter |
25 |
cat > configure.ac <<EOF |
3036 |
03 Jun 13 |
peter |
26 |
AC_INIT([hello], [1.0]) |
3036 |
03 Jun 13 |
peter |
27 |
AC_CONFIG_MACRO_DIR([m4]) |
3036 |
03 Jun 13 |
peter |
28 |
AM_INIT_AUTOMAKE([foreign]) |
3036 |
03 Jun 13 |
peter |
29 |
AC_LANG([C++]) |
3036 |
03 Jun 13 |
peter |
30 |
AC_PROG_CXXCPP |
3036 |
03 Jun 13 |
peter |
31 |
AC_PROG_CXX |
3036 |
03 Jun 13 |
peter |
32 |
LT_INIT |
3036 |
03 Jun 13 |
peter |
33 |
|
3036 |
03 Jun 13 |
peter |
34 |
YAT_USE_LIBTOOL_PUSH |
3036 |
03 Jun 13 |
peter |
35 |
|
3069 |
27 Aug 13 |
peter |
36 |
rm -fr .libs |
3036 |
03 Jun 13 |
peter |
37 |
|
3069 |
27 Aug 13 |
peter |
38 |
LDFLAGS="-L$abs_top_builddir/test/lib" |
3069 |
27 Aug 13 |
peter |
39 |
AC_MSG_CHECKING([whether linking against -lmy-shared works]) |
3069 |
27 Aug 13 |
peter |
40 |
LIBS=-lmy-shared |
3069 |
27 Aug 13 |
peter |
41 |
YAT_LT_LINK_LA_IFELSE([ |
3069 |
27 Aug 13 |
peter |
42 |
int foo_shared(void); |
3069 |
27 Aug 13 |
peter |
43 |
int my_func(void) { return foo_shared(); } |
3069 |
27 Aug 13 |
peter |
44 |
],[ |
3069 |
27 Aug 13 |
peter |
45 |
AC_MSG_RESULT([yes]) |
3069 |
27 Aug 13 |
peter |
46 |
],[ |
3069 |
27 Aug 13 |
peter |
47 |
AC_MSG_RESULT([no]) |
3069 |
27 Aug 13 |
peter |
48 |
AC_MSG_FAILURE |
3069 |
27 Aug 13 |
peter |
49 |
]) |
3036 |
03 Jun 13 |
peter |
50 |
|
3036 |
03 Jun 13 |
peter |
51 |
AC_CONFIG_FILES([Makefile]) |
3036 |
03 Jun 13 |
peter |
52 |
AC_OUTPUT |
3036 |
03 Jun 13 |
peter |
53 |
EOF |
3036 |
03 Jun 13 |
peter |
54 |
|
3036 |
03 Jun 13 |
peter |
55 |
bootstrap |
3825 |
18 Jul 19 |
peter |
56 |
if ./configure "$my_FLAGS" $configure_opts; then |
3100 |
01 Nov 13 |
peter |
57 |
echo OK; |
3100 |
01 Nov 13 |
peter |
58 |
else |
3100 |
01 Nov 13 |
peter |
59 |
tail -n 500 config.log; |
3100 |
01 Nov 13 |
peter |
60 |
exit_fail configure failed; |
3100 |
01 Nov 13 |
peter |
61 |
fi |
3100 |
01 Nov 13 |
peter |
62 |
|
3036 |
03 Jun 13 |
peter |
63 |
exit_success |