source: trunk/test/yat_lt_link_la_ifelse_test.sh

Last change on this file was 3855, checked in by Peter, 19 months ago

updating copyright statements

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