2 # Copyright (C) 2001-2024 Free Software Foundation, Inc.
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2, or (at your option)
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <https://www.gnu.org/licenses/>.
17 # Test to make sure we can compile libtool libraries when the compiler
18 # doesn't understand '-c -o'.
20 required
='gcc libtoolize' # For cc-no-c-o.
23 cat >> configure.ac
<< 'END'
32 cat > Makefile.am
<< 'END'
33 lib_LTLIBRARIES
= libwish.la
36 cat > libwish.c
<< 'END'
37 int wish_granted
(void
)
43 # Make sure the compiler doesn't understand '-c -o'.
44 CC
=$am_testaux_builddir/cc-no-c-o
; export CC
46 libtoolize
--verbose --install
49 $AUTOMAKE --copy --add-missing
51 for vpath
in : false
; do
59 $srcdir/configure
>stdout ||
{ cat stdout
; exit 1; }
61 $EGREP 'understands? -c and -o together.* no$' stdout
62 # No repeated checks please.
63 test $
(grep ".*-c['\" ].*-o['\" ]" stdout \
64 |
$FGREP -v ' -c -o file.o' |
wc -l) -eq 1
65 # Once we have rewritten $CC to use our 'compile' wrapper script,
66 # libtool should pick it up correctly, and not mess with the
68 grep '^checking if .*/compile .*supports -c -o file\.o\.\.\. yes' stdout
69 # And of course, we should be able to build our package.