* libltdl/m4/libtool.m4 (_LT_PROG_FC): Report FC=no if the FC
[libtool.git] / tests / cdemo-undef.test
blobf38da0d9e764f1b6030ca83c3ae0add820bf2bc7
1 #! /bin/sh
2 # cdemo-undef - test generating shared libraries with undefined symbols
4 # Copyright (C) 2003, 2004 Free Software Foundation, Inc.
5 # Written by Gary V. Vaughan, 2003
7 # This file is part of GNU Libtool.
9 # GNU Libtool is free software; you can redistribute it and/or
10 # modify it under the terms of the GNU General Public License as
11 # published by the Free Software Foundation; either version 2 of
12 # the License, or (at your option) any later version.
14 # GNU Libtool 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
17 # GNU General Public License for more details.
19 # You should have received a copy of the GNU General Public License
20 # along with GNU Libtool; see the file COPYING. If not, a copy
21 # can be downloaded from http://www.gnu.org/licenses/gpl.html,
22 # or obtained by writing to the Free Software Foundation, Inc.,
23 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24 ####
26 . tests/defs || exit 1
28 func_mkprefixdir
29 func_cd "tests/cdemo"
30 func_make_distclean
31 func_configure "--disable-static"
33 grep '^allow_undefined=.?unsupported.?$' ./libtool >/dev/null 2>&1 \
34 && func_skip "$host doesn't support undefined symbols in shared libs"
36 if test -f ./libtool; then
37 $SED 's,allow_undefined=no,allow_undefined=yes,g' ./libtool > ltnew
38 else
39 exit 1
42 if test -f ./ltnew; then
43 rm -f libtool
44 mv ltnew libtool
45 else
46 exit 1
49 exit 0