source: trunk/test/static_test.sh @ 3130

Last change on this file since 3130 was 3130, checked in by Peter, 8 years ago

merge release 0.11 into trunk

  • 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: static_test.sh 3130 2013-11-18 07:38:59Z peter $
3#
4# Copyright (C) 2009, 2010, 2011, 2012 Peter Johansson
5# Copyright (C) 2013 Jari Häkkinen, Peter Johansson
6#
7# This file is part of the yat library, http://dev.thep.lu.se/yat
8#
9# The yat library is free software; you can redistribute it
10# and/or modify it under the terms of the GNU General Public License as
11# published by the Free Software Foundation; either version 3 of the
12# License, or (at your option) any later version.
13#
14# The yat library is distributed in the hope that it will be useful,
15# but WITHOUT ANY WARRANTY; without even the implied warranty of
16# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17# General Public License for more details.
18#
19# You should have received a copy of the GNU General Public License
20# along with yat. If not, see <http://www.gnu.org/licenses/>.
21
22
23# test that it works to link statically against libyat
24
25required="autoconf automake libtool static"
26
27set -e
28
29. test/init.sh || exit 99
30
31cat >> configure.ac <<EOF
32YAT_FIND_YAT
33CXX=\`\$yat_config --cxx\`
34YAT_CHECK_VERSION([0.5.99],,
35                  [AC_MSG_ERROR([could not find required version of yat])])
36YAT_CHECK_HEADER(,[AC_MSG_ERROR([could not find yat headers])])
37YAT_LDADD=\`\$yat_config --link-libtool\`
38AC_SUBST(YAT_LDADD)
39AC_CONFIG_FILES([Makefile])
40AC_OUTPUT
41EOF
42
43sed -i -e 's,^AM_LDFLAGS =,AM_LDFLAGS = -all-static,' Makefile.am
44grep '^AM_LDFLAGS' Makefile.am || exit_fail
45
46bootstrap
47./configure $configure_opts --with-yat=$YAT_CONFIG
48
49make
50./hello || exit_fail
51exit_success
Note: See TracBrowser for help on using the repository browser.