2 # Copyright (C) 2002, 2004, 2005 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 <http://www.gnu.org/licenses/>.
19 required
='libtoolize g++'
22 cat > configure.
in << 'END'
24 AM_INIT_AUTOMAKE
([foreign subdir-objects
])
29 AC_CONFIG_FILES
([Makefile
])
33 cat > Makefile.am
<< 'END'
34 noinst_LTLIBRARIES
= libfoo.la
35 libfoo_la_SOURCES
= src
/foo.cc .
//src
/bar.cc
# the `.//' is meant.
38 @
echo BEG1
: "$(LTCXXCOMPILE)" :1END
39 @
echo BEG2
: "$(CXXLINK)" :2END
43 cat > src
/foo.cc
<< 'END'
51 cat > src
/bar.cc
<< 'END'
65 # Skip this test on configure errors (e.g., broken C++ compilers).
66 .
/configure || Exit
77
68 # opportunistically check that --tag=CXX is used when supported
69 if test -n "`./libtool --help | grep tag=TAG`"; then
72 grep 'BEG1: .*--tag=CXX.*--mode=compile.* :1END' stdout
73 grep 'BEG2: .*--tag=CXX.*--mode=link.* :2END' stdout
77 $MAKE distcheck
2>&1 |
tee out
78 # GNU Make used to complain that the Makefile contained two rules
79 # for `src/.dirstamp' and `.//src/.dirstamp'.
80 grep 'overriding commands' out
&& Exit
1