ltmain.in: Use func_warning for all warnings
[libtool.git] / tests / nocase.at
blob088dd0b4514d49b882ac7a05a204f14175398321
1 # nocase.at --  test for nocase lib search  -*- Autotest -*-
3 #   Copyright (C) 2010-2019, 2021-2024 Free Software Foundation, Inc.
4 #   Written by Peter Rosin, 2007
6 #   This file is part of GNU Libtool.
8 # GNU Libtool is free software; you can redistribute it and/or
9 # modify it under the terms of the GNU General Public License as
10 # published by the Free Software Foundation; either version 2 of
11 # the License, or (at your option) any later version.
13 # GNU Libtool 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
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with GNU Libtool; see the file COPYING.  If not, a copy
20 # can be downloaded from  http://www.gnu.org/licenses/gpl.html,
21 # or obtained by writing to the Free Software Foundation, Inc.,
22 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23 ####
26 AT_SETUP([nocase library search])
27 AT_KEYWORDS([libtool])
29 eval `$LIBTOOL --config | $EGREP '^(want_nocaseglob|file_magic_glob)='`
31 AT_CHECK([test yes != "$want_nocaseglob" && ]dnl
32          [test -z "$file_magic_glob" && exit 77],
33           [1], [ignore], [ignore])
35 mkdir foo
36 AT_DATA([foo/Foo.c],
38 int Foo (void) { return 1; }
41 mkdir bar
42 AT_DATA([bar/bar.c],
44 extern int Foo (void);
45 int bar (void) { return Foo (); }
48 AT_DATA([main.c],
50 extern int bar (void);
51 int main (void) { return bar (); }
54 libdir=`pwd`/inst/lib
55 mkdir inst inst/bin inst/lib
57 $LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o foo/Foo.lo foo/Foo.c
58 AT_CHECK([$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o foo/libFoo.la foo/Foo.lo ]dnl
59          [-no-undefined -version-info 1:0:0 -rpath $libdir],
60          [], [ignore], [ignore])
61 AT_CHECK([$LIBTOOL --mode=install cp foo/libFoo.la $libdir],
62          [], [ignore], [ignore])
63 AT_CHECK([$LIBTOOL --mode=clean rm -f foo/libFoo.la],
64          [], [ignore], [ignore])
66 rm -f $libdir/libFoo.la
68 $LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o bar/bar.lo bar/bar.c
69 AT_CHECK([$LIBTOOL --mode=link --tag=CC $CC $CFLAGS $LDFLAGS -o bar/libbar.la bar/bar.lo ]dnl
70          [-L$libdir -lfoo -no-undefined -version-info 1:0:0 -rpath $libdir],
71          [], [ignore], [ignore])
72 AT_CHECK([$LIBTOOL --mode=install cp bar/libbar.la $libdir],
73          [], [ignore], [ignore])
75 str=`$EGREP '^(old_library)=' < $libdir/libbar.la`
76 eval "$str"
77 libbar=$old_library
78 rm -f $libdir/$libbar
80 $LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c -o main.$OBJEXT main.c
82 AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main$EXEEXT main.$OBJEXT -L$libdir -lbar],
83          [], [ignore], [ignore])
85 AT_CLEANUP