3069 |
27 Aug 13 |
peter |
#! /bin/sh |
3069 |
27 Aug 13 |
peter |
# $Id$ |
3069 |
27 Aug 13 |
peter |
3 |
# |
3855 |
02 Jan 20 |
peter |
# Copyright (C) 2013, 2019 Peter Johansson |
3069 |
27 Aug 13 |
peter |
5 |
# |
3069 |
27 Aug 13 |
peter |
# This file is part of the yat library, http://dev.thep.lu.se/yat |
3069 |
27 Aug 13 |
peter |
7 |
# |
3069 |
27 Aug 13 |
peter |
# The yat library is free software; you can redistribute it |
3069 |
27 Aug 13 |
peter |
# and/or modify it under the terms of the GNU General Public License as |
3069 |
27 Aug 13 |
peter |
# published by the Free Software Foundation; either version 3 of the |
3069 |
27 Aug 13 |
peter |
# License, or (at your option) any later version. |
3069 |
27 Aug 13 |
peter |
12 |
# |
3069 |
27 Aug 13 |
peter |
# The yat library is distributed in the hope that it will be useful, |
3069 |
27 Aug 13 |
peter |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
3069 |
27 Aug 13 |
peter |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
3069 |
27 Aug 13 |
peter |
# General Public License for more details. |
3069 |
27 Aug 13 |
peter |
17 |
# |
3069 |
27 Aug 13 |
peter |
# You should have received a copy of the GNU General Public License |
3069 |
27 Aug 13 |
peter |
# along with yat. If not, see <http://www.gnu.org/licenses/>. |
3069 |
27 Aug 13 |
peter |
20 |
|
3069 |
27 Aug 13 |
peter |
21 |
|
3069 |
27 Aug 13 |
peter |
# test that YAT_USE_LIBTOOL_PUSH works with AC_COMPILE_IFELSE |
3069 |
27 Aug 13 |
peter |
23 |
|
3113 |
10 Nov 13 |
peter |
# This test is obsolete as YAT_USE_LIBTOOL_PUSH no longer affects |
3113 |
10 Nov 13 |
peter |
# behaviour of AC_COMPILE_IFELSE, but we leave this test here as a |
3113 |
10 Nov 13 |
peter |
# reminder in case we would modify YAT_USE_LIBTOOL_PUSH in the future. |
3113 |
10 Nov 13 |
peter |
27 |
|
3069 |
27 Aug 13 |
peter |
28 |
required="autoconf automake libtool" |
3069 |
27 Aug 13 |
peter |
29 |
|
3069 |
27 Aug 13 |
peter |
30 |
set -e |
3069 |
27 Aug 13 |
peter |
31 |
|
3069 |
27 Aug 13 |
peter |
32 |
. ./test/init.sh || exit 99 |
3069 |
27 Aug 13 |
peter |
33 |
|
3069 |
27 Aug 13 |
peter |
34 |
cat >> configure.ac <<EOF |
3069 |
27 Aug 13 |
peter |
35 |
YAT_USE_LIBTOOL_PUSH |
3069 |
27 Aug 13 |
peter |
36 |
AC_MSG_CHECKING([libtool compiling]) |
3069 |
27 Aug 13 |
peter |
37 |
AC_COMPILE_IFELSE([AC_LANG_PROGRAM], |
3069 |
27 Aug 13 |
peter |
38 |
[AC_MSG_RESULT([ok])], |
3069 |
27 Aug 13 |
peter |
39 |
[AC_MSG_RESULT([no]) |
3069 |
27 Aug 13 |
peter |
40 |
AC_MSG_ERROR([cannot libtool compile simple program])]) |
3069 |
27 Aug 13 |
peter |
41 |
|
3069 |
27 Aug 13 |
peter |
42 |
AC_MSG_CHECKING([libtool compiling rubbish code]) |
3069 |
27 Aug 13 |
peter |
43 |
|
3069 |
27 Aug 13 |
peter |
44 |
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([@%:@include <nonexixting.h>])], |
3069 |
27 Aug 13 |
peter |
45 |
[AC_MSG_RESULT([yes]) |
3069 |
27 Aug 13 |
peter |
46 |
AC_MSG_ERROR([unexpectedly succesful with $LIBS])], |
3069 |
27 Aug 13 |
peter |
47 |
[AC_MSG_RESULT([no (as expected)])]) |
3069 |
27 Aug 13 |
peter |
48 |
|
3069 |
27 Aug 13 |
peter |
49 |
AC_CONFIG_FILES([Makefile]) |
3069 |
27 Aug 13 |
peter |
50 |
AC_OUTPUT |
3069 |
27 Aug 13 |
peter |
51 |
EOF |
3069 |
27 Aug 13 |
peter |
52 |
|
3069 |
27 Aug 13 |
peter |
# bootstrapping |
3069 |
27 Aug 13 |
peter |
54 |
bootstrap |
3825 |
18 Jul 19 |
peter |
55 |
./configure "$my_FLAGS" $configure_opts || exit_fail |
3113 |
10 Nov 13 |
peter |
56 |
|
3113 |
10 Nov 13 |
peter |
# test that it works with --disable-static (see |
3113 |
10 Nov 13 |
peter |
# http://dev.thep.lu.se/yat/ticket/737#comment:18) |
3113 |
10 Nov 13 |
peter |
59 |
if x$enable_shared = xyes; then |
3825 |
18 Jul 19 |
peter |
60 |
./configure "$my_FLAGS" --disable-static || exit_fail |
3113 |
10 Nov 13 |
peter |
61 |
fi |
3113 |
10 Nov 13 |
peter |
62 |
|
3069 |
27 Aug 13 |
peter |
63 |
exit_success |