2 # Copyright (C) 2003 Free Software Foundation, Inc.
4 # This file is part of GNU Automake.
6 # GNU Automake is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2, or (at your option)
11 # GNU Automake is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with Automake; see the file COPYING. If not, write to
18 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 # Boston, MA 02111-1307, USA.
21 # Check multilib support.
22 # Based on a test case from Ralf Corsepius.
24 required
='gcc GNUmake'
29 cat >>configure.
in <<'END'
30 AC_CONFIG_SRCDIR(libfoo/foo.c)
32 AC_CONFIG_SUBDIRS(libfoo)
33 AC_CONFIG_SUBDIRS(libbar)
50 cat >Makefile.am
<<'EOF'
52 EXTRA_DIST = config-ml.in symlink-tree
55 # libfoo tests multilib supports when there are no subdirectories
56 # libbar tests multilib supports when there are subdirectories
60 cat >libfoo
/configure.
in <<'END'
62 AC_INIT(libfoo, 0.1, nobody@localhost)
63 AC_CONFIG_SRCDIR(foo.c)
64 # Apparently it doesn't work to have auxdir=.. when
65 # multilib uses symlinked trees.
67 AM_INIT_AUTOMAKE(foreign)
70 AM_ENABLE_MULTILIB(Makefile,[..])
71 AC_CONFIG_FILES([Makefile])
75 cat >libfoo
/Makefile.am
<<'END'
76 noinst_LIBRARIES = libfoo.a
77 libfoo_a_SOURCES = foo.c
84 cat >libbar
/configure.
in <<'END'
86 AC_INIT(libbar, 0.1, nobody@localhost)
87 # Apparently it doesn't work to have auxdir=.. when
88 # multilib uses symlinked trees.
90 AM_INIT_AUTOMAKE(foreign)
93 AM_ENABLE_MULTILIB(Makefile,[..])
94 AC_CONFIG_FILES([Makefile sub/Makefile])
98 cat >libbar
/Makefile.am
<<'END'
100 noinst_LIBRARIES = libbar.a
101 libbar_a_SOURCES = bar.c
106 : >libbar
/sub
/Makefile.am
110 cp $testsrcdir/..
/lib
/config-ml.
in .
111 cp $testsrcdir/..
/lib
/symlink-tree .
115 $AUTOMAKE --add-missing
119 $AUTOMAKE --add-missing
123 $AUTOMAKE --add-missing
130 ..
/configure
--enable-multilib CC
=`pwd`/..
/mycc
135 # Check standard builds.
137 # Why to I have to specify --with-target-subdir?
138 .
/configure
--enable-multilib --with-target-subdir=. CC
=`pwd`/mycc