Imported Upstream version 2.4.2
[platform/upstream/libtool.git] / tests / no-executables.at
1 # no-executables.at -- Libtool usage in GCC        -*- Autotest -*-
2
3 #   Copyright (C) 2008, 2010 Free Software Foundation, Inc.
4 #
5 #   This file is part of GNU Libtool.
6 #
7 # GNU Libtool is free software; you can redistribute it and/or
8 # modify it under the terms of the GNU General Public License as
9 # published by the Free Software Foundation; either version 2 of
10 # the License, or (at your option) any later version.
11 #
12 # GNU Libtool is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 # GNU General Public License for more details.
16 #
17 # You should have received a copy of the GNU General Public License
18 # along with GNU Libtool; see the file COPYING.  If not, a copy
19 # can be downloaded from  http://www.gnu.org/licenses/gpl.html,
20 # or obtained by writing to the Free Software Foundation, Inc.,
21 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22 ####
23
24 AT_BANNER([Libtool usage in GCC])
25 AT_SETUP([AC_NO_EXECUTABLES])
26
27 mkdir m4
28
29 AT_DATA([configure.ac],
30 [[AC_INIT([no-exec], [1])
31 AC_CONFIG_MACRO_DIR([m4])
32
33 # We punt a bit here, to get the results of AC_PROG_CC
34 # (and allow it to do link tests) but still error out on
35 # link tests within Libtool macros.
36 LDFLAGS=-lnosuchlibrary
37 AC_NO_EXECUTABLES
38 AC_PROG_CC
39 AC_PROG_CXX
40 AC_PROG_F77
41 AC_PROG_FC
42 AM_PROG_GCJ
43
44 # Consequently, we have to set cache variables for each link
45 # test we may need.  For the purposes of this test, it shouldn't
46 # matter much whether these values are actually wrong, the point
47 # is that the linker should never be invoked.
48
49 lt_cv_shlibpath_overrides_runpath=no
50 lt_cv_archive_cmds_need_lc=no
51 lt_cv_cc_needs_belf=no
52 lt_cv_ld_exported_symbols_list=no
53 lt_cv_prog_compiler_static_works=no
54 lt_cv_aix_libpath="/usr/lib:/lib"
55 lt_cv_irix_exported_symbol=yes
56
57 # Deal with AC_LIBTOOL_DLOPEN in one of two possible ways:
58 # - do not execute it at all in the ac_no_link case
59 # - preset the individual Autoconf test variables
60
61 if ${test_ac_libtool_dlopen-false}; then
62     ac_cv_func_shl_load=no
63     ac_cv_lib_dld_shl_load=no
64     ac_cv_func_dlopen=no
65     ac_cv_lib_dl_dlopen=no
66     ac_cv_lib_svld_dlopen=no
67     ac_cv_lib_dld_dld_link=no
68   AC_LIBTOOL_DLOPEN
69 fi
70 AC_PROG_LIBTOOL
71
72 AC_OUTPUT
73 ]])
74
75 LT_AT_BOOTSTRAP([--install], [-I m4], [ignore], [ignore], [], [ignore], [ignore])
76 LT_AT_CONFIGURE([])
77 LT_AT_CONFIGURE([test_ac_libtool_dlopen=:])
78
79 AT_CLEANUP