2 # Copyright (C) 2003, 2004 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/>.
17 # Check for AM_LDFLAGS = -module
18 # Report from Kevin P. Fleming.
33 cat >> configure.
in << 'END'
41 cat > Makefile.am
<< 'END'
43 lib_LTLIBRARIES
= nonstandard.la
44 nonstandard_la_SOURCES
= foo.c
49 AUTOMAKE_fails
--add-missing --gnu
50 grep 'Makefile.am:2:.*nonstandard.la.*standard libtool library name' stderr
51 grep 'Makefile.am:2:.*libnonstandard.la' stderr
53 # We will use -Wno-gnu to disable the warning about setting LDFLAGS (below)
54 # Make sure nonstandard names are diagnosed anyway.
55 AUTOMAKE_fails
--add-missing --gnu -Wno-gnu
56 grep 'Makefile.am:2:.*nonstandard.la.*standard libtool library name' stderr
57 grep 'Makefile.am:2:.*libnonstandard.la' stderr
59 # Make sure nonstandard_la_LDFLAGS is read even if LDFLAGS is used.
60 cat >Makefile.inc
<<'EOF'
62 nonstandard_la_LDFLAGS = $(FOO)
66 # Make sure LDFLAGS is read even if nonstandard_la_LDFLAGS is used.
67 cat >Makefile.inc
<<'EOF'
69 nonstandard_la_LDFLAGS = -lfoo
73 # Make sure AM_LDFLAGS is not read if foo_LDFLAGS is used.
74 cat >Makefile.inc
<<'EOF'
75 nonstandard_la_LDFLAGS = -lfoo
79 grep 'Makefile.am:2:.*nonstandard.la.*standard libtool library name' stderr
80 grep 'Makefile.am:2:.*libnonstandard.la' stderr
82 echo 'AM_LDFLAGS = -module' > Makefile.inc
85 # For module, Automake should not suggest the lib prefix.
86 cat > Makefile.am
<< 'END'
88 lib_LTLIBRARIES
= nonstandard
89 nonstandard_SOURCES
= foo.c
94 grep "Makefile.am:2:.*nonstandard'.*standard libtool module name" stderr
95 grep 'Makefile.am:2:.*`nonstandard.la' stderr