1 # nonrecursive.at -- test nonrecursive Automake Libltdl -*- Autotest -*-
3 # Copyright (C) 2005, 2008, 2009 Free Software Foundation, Inc.
4 # Written by Gary V. Vaughan, 2005
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.
26 AT_BANNER([Nonrecursive Automake Libltdl.])
30 m4_pushdef([_LT_AT_LTDL_SETUP],
31 [AT_DATA([configure.ac],
32 [[AC_INIT([subdirectory-demo], ]AT_PACKAGE_VERSION[, ]AT_PACKAGE_BUGREPORT[)
33 LT_CONFIG_LTDL_DIR([ltdl])
34 AC_CONFIG_AUX_DIR([ltdl/config])
35 AC_CONFIG_MACRO_DIR([ltdl/m4])
36 AC_CONFIG_LIBOBJ_DIR([ltdl])
37 AC_CONFIG_HEADERS([config.h:config.hin])
38 AM_INIT_AUTOMAKE([foreign subdir-objects])
42 LTDL_INIT([nonrecursive])
43 AC_CONFIG_FILES([Makefile])
47 AT_DATA([Makefile.am],
48 [[ACLOCAL_AMFLAGS = -I ltdl/m4
49 AUTOMAKE_OPTIONS = 1.9.6
57 lib_LTLIBRARIES = foo.la
65 include ltdl/Makefile.inc
67 foo_la_LDFLAGS = -module -avoid-version -no-undefined
68 foo_la_SOURCES = foo.c
71 echo 'int dummy = 0;' > foo.c
74 ## ------------------------ ##
75 ## Softlinked libltdl tree. ##
76 ## ------------------------ ##
78 AT_SETUP([compiling softlinked libltdl])
82 LT_AT_LIBTOOLIZE([--ltdl])
83 AT_CHECK([if test -f ltdl/configure.ac; then false; fi])
85 # Support vanilla autoconf-2.59 & automake-1.9.6
86 for file in argz.c lt__dirent.c lt__strl.c; do
90 LT_AT_BOOTSTRAP([ignore], [-I ltdl/m4], [], [--add-missing --copy],
91 [], [], [all $tst_dist])
93 AT_CHECK([test -f ltdl/libltdlc.la])
98 ## -------------------- ##
99 ## Copied libltdl tree. ##
100 ## -------------------- ##
102 AT_SETUP([compiling copied libltdl])
106 LT_AT_LIBTOOLIZE([--copy --ltdl])
107 AT_CHECK([if test -f ltdl/configure.ac; then false; fi])
109 # Support vanilla autoconf-2.59 & automake-1.9.6
110 for file in argz.c lt__dirent.c lt__strl.c; do
114 LT_AT_BOOTSTRAP([ignore], [-I ltdl/m4], [], [--add-missing --copy],
115 [], [], [all $tst_dist])
117 AT_CHECK([test -f ltdl/libltdlc.la])
122 ## ------------------------- ##
123 ## Installable libltdl tree. ##
124 ## ------------------------- ##
126 AT_SETUP([installable libltdl])
132 LT_AT_LIBTOOLIZE([--copy --ltdl])
133 AT_CHECK([if test -f ltdl/configure.ac; then false; fi])
135 # Support vanilla autoconf-2.59 & automake-1.9.6
136 for file in argz.c lt__dirent.c lt__strl.c; do
140 LT_AT_BOOTSTRAP([ignore], [-I ltdl/m4], [], [--add-missing --copy],
141 [], [--enable-ltdl-install --prefix=$prefix], [all install $tst_dist])
143 AT_CHECK([test -f $prefix/lib/libltdl.la])
144 AT_CHECK([test -f $prefix/include/ltdl.h])
148 dnl Be careful not to let the definition leak into other tests
149 m4_popdef([_LT_AT_LTDL_SETUP])