Imported Upstream version 2.4.2
[platform/upstream/libtool.git] / tests / standalone.at
1 # standalone.at -- test standalone libltdl builds             -*- Autotest -*-
2 #
3 #   Copyright (C) 2005, 2008 Free Software Foundation, Inc.
4 #   Written by Gary V. Vaughan, 2006
5 #
6 #   This file is part of GNU Libtool.
7 #
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.
12 #
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.
17 #
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.
23 ####
24
25 AT_BANNER([Standalone Libltdl.])
26
27 ## ------------------------ ##
28 ## Softlinked libltdl tree. ##
29 ## ------------------------ ##
30
31 AT_SETUP([compiling softlinked libltdl])
32
33 LT_AT_CHECK_LIBTOOLIZE([--ltdl=.], [], [ignore])
34 LT_AT_CONFIGURE
35 LT_AT_MAKE([all $tst_dist])
36
37 AT_CHECK([test -f libltdlc.la])
38
39 AT_CLEANUP
40
41
42 ## -------------------- ##
43 ## Copied libltdl tree. ##
44 ## -------------------- ##
45
46 AT_SETUP([compiling copied libltdl])
47
48 LT_AT_CHECK_LIBTOOLIZE([--copy --ltdl=.], [], [ignore])
49 LT_AT_CONFIGURE
50 LT_AT_MAKE([all $tst_dist])
51
52 AT_CHECK([test -f libltdlc.la])
53
54 AT_CLEANUP
55
56
57 ## ------------------------- ##
58 ## Installable libltdl tree. ##
59 ## ------------------------- ##
60
61 AT_SETUP([installable libltdl])
62
63 prefix=`pwd`/_inst
64
65 LT_AT_CHECK_LIBTOOLIZE([--copy --ltdl=.], [], [ignore])
66 LT_AT_CONFIGURE([--enable-ltdl-install --prefix=$prefix])
67 LT_AT_MAKE([all install $tst_dist])
68
69 AT_CHECK([test -f $prefix/lib/libltdl.la])
70 AT_CHECK([test -f $prefix/include/ltdl.h])
71
72 AT_CLEANUP
73
74
75 ## ----------------------------------------------- ##
76 ## libltdl is usable without Autoconf or Automake. ##
77 ## ----------------------------------------------- ##
78
79 AT_SETUP([linking libltdl without autotools])
80
81 _LTDL_PROJECT_FILES([libltdl])
82 LT_AT_CHECK_LIBTOOLIZE([--copy --ltdl], [], [ignore])
83 LT_AT_MAKE([], [CC="$CC" LIBTOOLFLAGS="$LIBTOOLFLAGS" CPPFLAGS="$CPPFLAGS" ]dnl
84         [CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" ]dnl
85         [CONFIGURE_OPTIONS="$configure_options"])
86
87 LT_AT_EXEC_CHECK([./ltdldemo], 0, [ignore])
88
89 AT_CLEANUP