Codebase list libvirt-glib / 42951b4
Merge tag 'upstream/0.0.5' Upstream version 0.0.5 # gpg: Signature made Mo 05 Mär 2012 08:54:03 CET # gpg: using DSA key 0x9FCF2CCD3F3E6426 # gpg: please do a --check-trustdb # gpg: Good signature from "Guido Günther <agx@sigxcpu.org>" # gpg: aka "Guido Guenther <agx@debian.org>" # gpg: aka "Guido Guenther <agx@sigxcpu.org>" Guido Günther 12 years ago
78 changed file(s) with 10942 addition(s) and 8928 deletion(s). Raw diff Collapse all Expand all
0 2012-02-20 Daniel P. Berrange <berrange@redhat.com>
1
2 Add notes for 0.0.5 release
3
4 2012-02-20 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
5
6 Fixes to gvir_domain_*save*() docs
7 The saved state of a domain is restored using gvir_domain_start() rather
8 than gvir_domain_resume().
9
10 2012-02-19 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
11
12 API to get node information about the connection
13 Mostly just a wrapper around virNodeGetInfo() and virNodeInfo struct.
14
15 Add Flags for use with gvir_domain_delete()
16
17 2012-02-16 Christophe Fergeau <cfergeau@redhat.com>
18
19 Add more sanity checks to libvirt-gconfig test
20
21 Add gvir_config_domain_disk_[gs]et_cache
22
23 Fix [gs]et_custom_xml-related leaks
24 I forgot to run the testing code through valgrind before pushing
25 the patches so a few small memory leaks crept in.
26
27 2012-02-16 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
28
29 Add gvir_domain_get_saved()
30 Binding for virDomainHasManagedSaveImage().
31
32 Correct docs for gir_domain_save*()
33 A saved domain is stopped/shutdown on a successful save operation, not
34 suspended.
35
36 Tell CC to ignore unused macros
37
38 2012-02-15 Daniel P. Berrange <berrange@redhat.com>
39
40 Avoid triggering deprecation warnings on newest GLib
41
42 2012-02-14 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
43
44 Add gvir_storage_vol_resize()
45 Add wrapper for virStorageVolResize().
46
47 Volume keeps an weak ref to its parent pool
48
49 2012-02-10 Daniel P. Berrange <berrange@redhat.com>
50
51 Rename 'unlink' variable to avoid clash on Win32
52
53 Switch over to use GNULIB's compile warning macros
54
55 Add missing default: in example program
56
57 Simplify condition that is always true
58
59 Disable unused macro for debug
60
61 2012-02-06 Christophe Fergeau <cfergeau@redhat.com>
62
63 Add testcase for gvir_config_domain_[gs]et_custom_xml
64
65 API to get/set custom metadata from/to domain config
66 Based on a patch from Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
67
68 Add gvir_config_object_set_namespace helper
69
70 Handle namespaces in gvir_config_object_delete_child{ren}
71 These functions now take an additional argument corresponding to
72 a namespace href. It's optional and can be NULL when namespaces
73 should be ignored.
74 The 'child_name' argument can now be NULL in order to remove all nodes
75 belonging to a given namespace.
76
77 Factorize xml dumping code
78 Use the new gvir_config_xml_node_to_string to implement
79 gvir_config_object_to_xml, this avoids duplicating this code.
80
81 Add gvir_config_xml_node_to_string helper
82
83 Make root_node optional in gvir_config_xml_parse
84 It's only used to make some sanity checks on what was just parsed,
85 so allowing NULL root_node is fine.
86
87 Fix gvir_config_object_new_from_xml error reporting
88 It's currently failing to report parsing errors if the passed in
89 error is NULL.
90
91 2012-02-05 Christophe Fergeau <cfergeau@redhat.com>
92
93 Don't assign const char * to non-const
94 This causes a gcc warning.
95
96 2012-01-31 Christophe Fergeau <cfergeau@redhat.com>
97
98 Replace g_error with g_warning in constructors
99 g_error generates a fatal error message, meaning it will abort
100 the currently running process. It's nicer to use g_warning here.
101
102 Don't use g_error in xxx_get_name
103 g_error will trigger an abort of the running process so it's not
104 desirable to call it in a library. This commit uses g_warning when
105 this occurs and returns NULL. libvirt will only return NULL for these
106 strings if some kind of memory corruption is going on, or if we are
107 using an invalid pointer.
108
109 Add proper error reporting to gvir_storage_vol_get_path
110 gvir_storage_vol_get_name currently call g_error when an error occurs.
111 Since g_error trigger a coredump, calling it in a library is harmful.
112 Replace this with proper GError error reporting.
113
114 2012-01-26 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
115
116 Don't loop forever on blank nodes
117
118 2012-01-20 Christophe Fergeau <cfergeau@redhat.com>
119
120 Remove 2 unwanted exports
121 These 2 GVirObject helpers are declared in libvirt-gobject-private.h
122 and so shouldn't be exported.
123
124 Split gvir_config_object_attach
125 Most of the time we want gvir_config_object_attach to replace
126 existing nodes, but sometimes (for <devices> subnodes) we want
127 it to append the new node and to keep the existing nodes with
128 the same name. This commit solves this by adding 2 distinct helpers,
129 _attach_add and _attach_replace.
130 This should fix some unexpected behaviour of various _set_ functions
131 which were appending new nodes instead of replacing the existing one.
132
133 Add gvir_config_object_delete_children
134
135 Refactor gvir_config_object_delete_child
136 By changing gvir_config_xml_foreach_child to make it robust against
137 current node deletion in the "foreach" callback, we can use
138 gvir_config_object_foreach_child to implement
139 gvir_config_object_delete_child
140
141 2012-01-18 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
142
143 Correct return type of gvir_storage_pool_create_volume()
144
145 Handle failure of virDomainIsPersistent() correctly
146 virDomainIsPersistent() failing most probably means that domain is no
147 longer available so flaging it as transient isn't exactly wrong.
148
149 API to get/set 'description' node in domain config
150
151 2012-01-18 Daniel P. Berrange <berrange@redhat.com>
152
153 Fix syntax-check violations
154
155 2012-01-18 Christophe Fergeau <cfergeau@redhat.com>
156
157 Fix compilation with glib 2.22
158 This commit raises glib required version to 2.22 or newer, adds a few
159 missing functions to libvirt-gobject-compat.h and includes it in the
160 files using these functions.
161
162 2012-01-16 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
163
164 Make use of G_PARAM_STATIC_STRINGS everywhere
165
166 Add gvir_config_domain_disk_set_readonly()
167
168 2012-01-16 Christophe Fergeau <cfergeau@redhat.com>
169
170 Raise libvirt requirement to 0.9.8
171 We are using VIR_DOMAIN_EVENT_SHUTDOWN which was introduced
172 in libvirt 0.9.8. Reflect this requirement by bumping the minimum
173 version of libvirt we require in configure.ac.
174 This issue was reported by Nirbheek Chauhan <nirbheek@gentoo.org>
175
176 2012-01-13 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
177
178 Post-release version bump
179
180 2012-01-13 Marc-André Lureau <marcandre.lureau@gmail.com>
181
182 Fix libvirt error message after finishing a stream
183 The callback is now added & removed from libvirt-gobject-stream.c
184
185 It should have been part of c5a239423a215435626bf6d1af75458c5ec03147.
186
187 #0 virErrorMsg (error=VIR_ERR_INTERNAL_ERROR, info=0x7fffffffcf00 "no stream callback registered") at util/virterror.c:760
188 #1 0x00007ffff627f304 in virReportErrorHelper (domcode=7, errcode=1, filename=0x7ffff6479a4d "rpc/virnetclientstream.c",
189 funcname=0x7ffff6479ca0 "virNetClientStreamEventRemoveCallback", linenr=514, fmt=<optimized out>) at util/virterror.c:1260
190 #2 0x00007ffff6339aa4 in virNetClientStreamEventRemoveCallback (st=0x1de8ef0) at rpc/virnetclientstream.c:513
191 #3 0x00007ffff631a6ba in remoteStreamEventRemoveCallback (st=<optimized out>) at remote/remote_driver.c:3713
192 #4 0x00007ffff62fe97d in virStreamEventRemoveCallback (stream=0x1db9e00) at libvirt.c:14781
193 #5 0x00007ffff69114f3 in gvir_stream_update_events (stream=0x1db2570) at libvirt-gobject-stream.c:561
194 #6 0x00007ffff6911616 in gvir_stream_source_finalize (source=0x1da25e0) at libvirt-gobject-stream.c:606
195
0196 2012-01-12 Daniel P. Berrange <berrange@redhat.com>
1197
2198 Update NEWS & syms files for 0.0.4 release
4545 build-aux/config.guess build-aux/config.sub build-aux/depcomp \
4646 build-aux/install-sh build-aux/ltmain.sh build-aux/missing
4747 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
48 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
49 $(top_srcdir)/configure.ac
48 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
49 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
50 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
51 $(top_srcdir)/m4/manywarnings.m4 \
52 $(top_srcdir)/m4/virt-compile-warnings.m4 \
53 $(top_srcdir)/m4/warnings.m4 $(top_srcdir)/configure.ac
5054 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
5155 $(ACLOCAL_M4)
5256 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
151155 CC = @CC@
152156 CCDEPMODE = @CCDEPMODE@
153157 CFLAGS = @CFLAGS@
154 COMPILER_FLAGS = @COMPILER_FLAGS@
155158 COVERAGE_CFLAGS = @COVERAGE_CFLAGS@
156159 COVERAGE_LDFLAGS = @COVERAGE_LDFLAGS@
160 COV_FLAGS = @COV_FLAGS@
157161 CPP = @CPP@
158162 CPPFLAGS = @CPPFLAGS@
159163 CYGPATH_W = @CYGPATH_W@
247251 VAPIGEN = @VAPIGEN@
248252 VERSION = @VERSION@
249253 WARN_CFLAGS = @WARN_CFLAGS@
254 WARN_LDFLAGS = @WARN_LDFLAGS@
250255 abs_builddir = @abs_builddir@
251256 abs_srcdir = @abs_srcdir@
252257 abs_top_builddir = @abs_top_builddir@
0 libvirt-glib News
1 =================
2
3 0.0.5 - Feb 20, 2012
4 ====================
5
6 - Require libvirt >= 0.9.10
7 - Fix error after finishing a stream
8 - Use G_PARAM_STATIC_STRINGS
9 - Add config for readonly disks
10 - Add config for description/metadata
11 - Fix type when creating storage volumes
12 - Remove some bogus g_error usage
13 - Import GNULIB's compiler warning flags support & fix
14 problems
15 - Add API for resizing storage volumes
16 - Add API to check if a domain is saved
17 - Add config for disk cache method
18 - Add APIs to get node information
19 - Add flags for deleting domains
20
21
022 0.0.4 - Jan 12, 2012
123 ====================
224
1335 - Change namespace for GVirConfig APIs (breaks ABI
1436 and API)
1537 - New APIs for save/suspend
38
1639
1740 0.0.3 - Dec 19, 2011
1841 ====================
3558 - Add vala files to the RPM
3659 - Add binding for open domain consoles & graphics
3760
61
3862 0.0.2 - Nov 22, 2011
3963 ====================
4064
5175 - Update COPYING file to have latest FSF address
5276 - Update RPM specfile to include Fedora review feedback
5377
78
5479 0.0.1 - Nov 16, 2011
5580 ====================
5681
+0
-127
acinclude.m4 less more
0 dnl
1 dnl Taken from gnome-common/macros2/gnome-compiler-flags.m4
2 dnl
3 dnl We've added:
4 dnl -Wextra -Wshadow -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Winline -Wredundant-decls
5 dnl We've removed
6 dnl CFLAGS="$realsave_CFLAGS"
7 dnl to avoid clobbering user-specified CFLAGS
8 dnl
9 AC_DEFUN([LIBVIRT_GLIB_COMPILE_WARNINGS],[
10 dnl ******************************
11 dnl More compiler warnings
12 dnl ******************************
13
14 AC_ARG_ENABLE(compile-warnings,
15 AC_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
16 [Turn on compiler warnings]),,
17 [enable_compile_warnings="m4_default([$1],[maximum])"])
18
19 warnCFLAGS=
20
21 common_flags="-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fasynchronous-unwind-tables"
22
23 case "$enable_compile_warnings" in
24 no)
25 try_compiler_flags=""
26 ;;
27 minimum)
28 try_compiler_flags="-Wall -Wformat -Wformat-security $common_flags"
29 ;;
30 yes)
31 try_compiler_flags="-Wall -Wformat -Wformat-security -Wmissing-prototypes $common_flags"
32 ;;
33 maximum|error)
34 try_compiler_flags="-Wall -Wformat -Wformat-security -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
35 try_compiler_flags="$try_compiler_flags -Wextra -Wshadow -Wcast-align -Wwrite-strings -Waggregate-return"
36 try_compiler_flags="$try_compiler_flags -Wstrict-prototypes -Winline -Wredundant-decls -Wno-sign-compare"
37 try_compiler_flags="$try_compiler_flags $common_flags"
38 if test "$enable_compile_warnings" = "error" ; then
39 try_compiler_flags="$try_compiler_flags -Werror"
40 fi
41 ;;
42 *)
43 AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
44 ;;
45 esac
46
47 compiler_flags=
48 for option in $try_compiler_flags; do
49 SAVE_CFLAGS="$CFLAGS"
50 CFLAGS="$CFLAGS $option"
51 AC_MSG_CHECKING([whether gcc understands $option])
52 AC_TRY_LINK([], [],
53 has_option=yes,
54 has_option=no,)
55 CFLAGS="$SAVE_CFLAGS"
56 AC_MSG_RESULT($has_option)
57 if test $has_option = yes; then
58 compiler_flags="$compiler_flags $option"
59 fi
60 unset has_option
61 unset SAVE_CFLAGS
62 done
63 unset option
64 unset try_compiler_flags
65
66 AC_ARG_ENABLE(iso-c,
67 AC_HELP_STRING([--enable-iso-c],
68 [Try to warn if code is not ISO C ]),,
69 [enable_iso_c=no])
70
71 AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
72 complCFLAGS=
73 if test "x$enable_iso_c" != "xno"; then
74 if test "x$GCC" = "xyes"; then
75 case " $CFLAGS " in
76 *[\ \ ]-ansi[\ \ ]*) ;;
77 *) complCFLAGS="$complCFLAGS -ansi" ;;
78 esac
79 case " $CFLAGS " in
80 *[\ \ ]-pedantic[\ \ ]*) ;;
81 *) complCFLAGS="$complCFLAGS -pedantic" ;;
82 esac
83 fi
84 fi
85 AC_MSG_RESULT($complCFLAGS)
86
87 WARN_CFLAGS="$compiler_flags $complCFLAGS"
88 AC_SUBST(WARN_CFLAGS)
89 ])
90
91 AC_DEFUN([gl_COMPILER_FLAGS],
92 [AC_MSG_CHECKING(whether compiler accepts $1)
93 AC_SUBST(COMPILER_FLAGS)
94 ac_save_CFLAGS="$CFLAGS"
95 CFLAGS="$CFLAGS $1"
96 AC_TRY_COMPILE(,
97 [int x;],
98 COMPILER_FLAGS="$COMPILER_FLAGS $1"
99 AC_MSG_RESULT(yes),
100 AC_MSG_RESULT(no))
101 CFLAGS="$ac_save_CFLAGS"
102 ])
103
104 dnl
105 dnl To support the old pkg-config from RHEL4 vintage, we need
106 dnl to define the PKG_PROG_PKG_CONFIG macro if its not already
107 dnl present
108 m4_ifndef([PKG_PROG_PKG_CONFIG],
109 [AC_DEFUN([PKG_PROG_PKG_CONFIG],
110 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
111 m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
112 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
113 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
114 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
115 fi
116 if test -n "$PKG_CONFIG"; then
117 _pkg_min_version=m4_default([$1], [0.9.0])
118 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
119 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
120 AC_MSG_RESULT([yes])
121 else
122 AC_MSG_RESULT([no])
123 PKG_CONFIG=""
124 fi
125 fi[]dnl
126 ])])
8585 AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"])
8686 AM_CONDITIONAL([GTK_DOC_USE_REBASE], [test -n "$GTKDOC_REBASE"])
8787 ])
88
89 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
90 #
91 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
92 # 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
93 # Inc.
94 # Written by Gordon Matzigkeit, 1996
95 #
96 # This file is free software; the Free Software Foundation gives
97 # unlimited permission to copy and/or distribute it, with or without
98 # modifications, as long as this notice is preserved.
99
100 m4_define([_LT_COPYING], [dnl
101 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
102 # 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
103 # Inc.
104 # Written by Gordon Matzigkeit, 1996
105 #
106 # This file is part of GNU Libtool.
107 #
108 # GNU Libtool is free software; you can redistribute it and/or
109 # modify it under the terms of the GNU General Public License as
110 # published by the Free Software Foundation; either version 2 of
111 # the License, or (at your option) any later version.
112 #
113 # As a special exception to the GNU General Public License,
114 # if you distribute this file as part of a program or library that
115 # is built using GNU Libtool, you may include this file under the
116 # same distribution terms that you use for the rest of that program.
117 #
118 # GNU Libtool is distributed in the hope that it will be useful,
119 # but WITHOUT ANY WARRANTY; without even the implied warranty of
120 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
121 # GNU General Public License for more details.
122 #
123 # You should have received a copy of the GNU General Public License
124 # along with GNU Libtool; see the file COPYING. If not, a copy
125 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
126 # obtained by writing to the Free Software Foundation, Inc.,
127 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
128 ])
129
130 # serial 57 LT_INIT
131
132
133 # LT_PREREQ(VERSION)
134 # ------------------
135 # Complain and exit if this libtool version is less that VERSION.
136 m4_defun([LT_PREREQ],
137 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
138 [m4_default([$3],
139 [m4_fatal([Libtool version $1 or higher is required],
140 63)])],
141 [$2])])
142
143
144 # _LT_CHECK_BUILDDIR
145 # ------------------
146 # Complain if the absolute build directory name contains unusual characters
147 m4_defun([_LT_CHECK_BUILDDIR],
148 [case `pwd` in
149 *\ * | *\ *)
150 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
151 esac
152 ])
153
154
155 # LT_INIT([OPTIONS])
156 # ------------------
157 AC_DEFUN([LT_INIT],
158 [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
159 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
160 AC_BEFORE([$0], [LT_LANG])dnl
161 AC_BEFORE([$0], [LT_OUTPUT])dnl
162 AC_BEFORE([$0], [LTDL_INIT])dnl
163 m4_require([_LT_CHECK_BUILDDIR])dnl
164
165 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
166 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
167 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
168 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
169 dnl unless we require an AC_DEFUNed macro:
170 AC_REQUIRE([LTOPTIONS_VERSION])dnl
171 AC_REQUIRE([LTSUGAR_VERSION])dnl
172 AC_REQUIRE([LTVERSION_VERSION])dnl
173 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
174 m4_require([_LT_PROG_LTMAIN])dnl
175
176 _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
177
178 dnl Parse OPTIONS
179 _LT_SET_OPTIONS([$0], [$1])
180
181 # This can be used to rebuild libtool when needed
182 LIBTOOL_DEPS="$ltmain"
183
184 # Always use our own libtool.
185 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
186 AC_SUBST(LIBTOOL)dnl
187
188 _LT_SETUP
189
190 # Only expand once:
191 m4_define([LT_INIT])
192 ])# LT_INIT
193
194 # Old names:
195 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
196 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
197 dnl aclocal-1.4 backwards compatibility:
198 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
199 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
200
201
202 # _LT_CC_BASENAME(CC)
203 # -------------------
204 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
205 m4_defun([_LT_CC_BASENAME],
206 [for cc_temp in $1""; do
207 case $cc_temp in
208 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
209 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
210 \-*) ;;
211 *) break;;
212 esac
213 done
214 cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
215 ])
216
217
218 # _LT_FILEUTILS_DEFAULTS
219 # ----------------------
220 # It is okay to use these file commands and assume they have been set
221 # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
222 m4_defun([_LT_FILEUTILS_DEFAULTS],
223 [: ${CP="cp -f"}
224 : ${MV="mv -f"}
225 : ${RM="rm -f"}
226 ])# _LT_FILEUTILS_DEFAULTS
227
228
229 # _LT_SETUP
230 # ---------
231 m4_defun([_LT_SETUP],
232 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
233 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
234 AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
235 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
236
237 _LT_DECL([], [host_alias], [0], [The host system])dnl
238 _LT_DECL([], [host], [0])dnl
239 _LT_DECL([], [host_os], [0])dnl
240 dnl
241 _LT_DECL([], [build_alias], [0], [The build system])dnl
242 _LT_DECL([], [build], [0])dnl
243 _LT_DECL([], [build_os], [0])dnl
244 dnl
245 AC_REQUIRE([AC_PROG_CC])dnl
246 AC_REQUIRE([LT_PATH_LD])dnl
247 AC_REQUIRE([LT_PATH_NM])dnl
248 dnl
249 AC_REQUIRE([AC_PROG_LN_S])dnl
250 test -z "$LN_S" && LN_S="ln -s"
251 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
252 dnl
253 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
254 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
255 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
256 dnl
257 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
258 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
259 m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
260 m4_require([_LT_CMD_RELOAD])dnl
261 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
262 m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
263 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
264 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
265 m4_require([_LT_WITH_SYSROOT])dnl
266
267 _LT_CONFIG_LIBTOOL_INIT([
268 # See if we are running on zsh, and set the options which allow our
269 # commands through without removal of \ escapes INIT.
270 if test -n "\${ZSH_VERSION+set}" ; then
271 setopt NO_GLOB_SUBST
272 fi
273 ])
274 if test -n "${ZSH_VERSION+set}" ; then
275 setopt NO_GLOB_SUBST
276 fi
277
278 _LT_CHECK_OBJDIR
279
280 m4_require([_LT_TAG_COMPILER])dnl
281
282 case $host_os in
283 aix3*)
284 # AIX sometimes has problems with the GCC collect2 program. For some
285 # reason, if we set the COLLECT_NAMES environment variable, the problems
286 # vanish in a puff of smoke.
287 if test "X${COLLECT_NAMES+set}" != Xset; then
288 COLLECT_NAMES=
289 export COLLECT_NAMES
290 fi
291 ;;
292 esac
293
294 # Global variables:
295 ofile=libtool
296 can_build_shared=yes
297
298 # All known linkers require a `.a' archive for static linking (except MSVC,
299 # which needs '.lib').
300 libext=a
301
302 with_gnu_ld="$lt_cv_prog_gnu_ld"
303
304 old_CC="$CC"
305 old_CFLAGS="$CFLAGS"
306
307 # Set sane defaults for various variables
308 test -z "$CC" && CC=cc
309 test -z "$LTCC" && LTCC=$CC
310 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
311 test -z "$LD" && LD=ld
312 test -z "$ac_objext" && ac_objext=o
313
314 _LT_CC_BASENAME([$compiler])
315
316 # Only perform the check for file, if the check method requires it
317 test -z "$MAGIC_CMD" && MAGIC_CMD=file
318 case $deplibs_check_method in
319 file_magic*)
320 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
321 _LT_PATH_MAGIC
322 fi
323 ;;
324 esac
325
326 # Use C for the default configuration in the libtool script
327 LT_SUPPORTED_TAG([CC])
328 _LT_LANG_C_CONFIG
329 _LT_LANG_DEFAULT_CONFIG
330 _LT_CONFIG_COMMANDS
331 ])# _LT_SETUP
332
333
334 # _LT_PREPARE_SED_QUOTE_VARS
335 # --------------------------
336 # Define a few sed substitution that help us do robust quoting.
337 m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
338 [# Backslashify metacharacters that are still active within
339 # double-quoted strings.
340 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
341
342 # Same as above, but do not quote variable references.
343 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
344
345 # Sed substitution to delay expansion of an escaped shell variable in a
346 # double_quote_subst'ed string.
347 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
348
349 # Sed substitution to delay expansion of an escaped single quote.
350 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
351
352 # Sed substitution to avoid accidental globbing in evaled expressions
353 no_glob_subst='s/\*/\\\*/g'
354 ])
355
356 # _LT_PROG_LTMAIN
357 # ---------------
358 # Note that this code is called both from `configure', and `config.status'
359 # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
360 # `config.status' has no value for ac_aux_dir unless we are using Automake,
361 # so we pass a copy along to make sure it has a sensible value anyway.
362 m4_defun([_LT_PROG_LTMAIN],
363 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
364 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
365 ltmain="$ac_aux_dir/ltmain.sh"
366 ])# _LT_PROG_LTMAIN
367
368
369
370 # So that we can recreate a full libtool script including additional
371 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
372 # in macros and then make a single call at the end using the `libtool'
373 # label.
374
375
376 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
377 # ----------------------------------------
378 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
379 m4_define([_LT_CONFIG_LIBTOOL_INIT],
380 [m4_ifval([$1],
381 [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
382 [$1
383 ])])])
384
385 # Initialize.
386 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
387
388
389 # _LT_CONFIG_LIBTOOL([COMMANDS])
390 # ------------------------------
391 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
392 m4_define([_LT_CONFIG_LIBTOOL],
393 [m4_ifval([$1],
394 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
395 [$1
396 ])])])
397
398 # Initialize.
399 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
400
401
402 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
403 # -----------------------------------------------------
404 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
405 [_LT_CONFIG_LIBTOOL([$1])
406 _LT_CONFIG_LIBTOOL_INIT([$2])
407 ])
408
409
410 # _LT_FORMAT_COMMENT([COMMENT])
411 # -----------------------------
412 # Add leading comment marks to the start of each line, and a trailing
413 # full-stop to the whole comment if one is not present already.
414 m4_define([_LT_FORMAT_COMMENT],
415 [m4_ifval([$1], [
416 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
417 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
418 )])
419
420
421
422
423
424 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
425 # -------------------------------------------------------------------
426 # CONFIGNAME is the name given to the value in the libtool script.
427 # VARNAME is the (base) name used in the configure script.
428 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
429 # VARNAME. Any other value will be used directly.
430 m4_define([_LT_DECL],
431 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
432 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
433 [m4_ifval([$1], [$1], [$2])])
434 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
435 m4_ifval([$4],
436 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
437 lt_dict_add_subkey([lt_decl_dict], [$2],
438 [tagged?], [m4_ifval([$5], [yes], [no])])])
439 ])
440
441
442 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
443 # --------------------------------------------------------
444 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
445
446
447 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
448 # ------------------------------------------------
449 m4_define([lt_decl_tag_varnames],
450 [_lt_decl_filter([tagged?], [yes], $@)])
451
452
453 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
454 # ---------------------------------------------------------
455 m4_define([_lt_decl_filter],
456 [m4_case([$#],
457 [0], [m4_fatal([$0: too few arguments: $#])],
458 [1], [m4_fatal([$0: too few arguments: $#: $1])],
459 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
460 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
461 [lt_dict_filter([lt_decl_dict], $@)])[]dnl
462 ])
463
464
465 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
466 # --------------------------------------------------
467 m4_define([lt_decl_quote_varnames],
468 [_lt_decl_filter([value], [1], $@)])
469
470
471 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
472 # ---------------------------------------------------
473 m4_define([lt_decl_dquote_varnames],
474 [_lt_decl_filter([value], [2], $@)])
475
476
477 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
478 # ---------------------------------------------------
479 m4_define([lt_decl_varnames_tagged],
480 [m4_assert([$# <= 2])dnl
481 _$0(m4_quote(m4_default([$1], [[, ]])),
482 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
483 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
484 m4_define([_lt_decl_varnames_tagged],
485 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
486
487
488 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
489 # ------------------------------------------------
490 m4_define([lt_decl_all_varnames],
491 [_$0(m4_quote(m4_default([$1], [[, ]])),
492 m4_if([$2], [],
493 m4_quote(lt_decl_varnames),
494 m4_quote(m4_shift($@))))[]dnl
495 ])
496 m4_define([_lt_decl_all_varnames],
497 [lt_join($@, lt_decl_varnames_tagged([$1],
498 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
499 ])
500
501
502 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
503 # ------------------------------------
504 # Quote a variable value, and forward it to `config.status' so that its
505 # declaration there will have the same value as in `configure'. VARNAME
506 # must have a single quote delimited value for this to work.
507 m4_define([_LT_CONFIG_STATUS_DECLARE],
508 [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
509
510
511 # _LT_CONFIG_STATUS_DECLARATIONS
512 # ------------------------------
513 # We delimit libtool config variables with single quotes, so when
514 # we write them to config.status, we have to be sure to quote all
515 # embedded single quotes properly. In configure, this macro expands
516 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
517 #
518 # <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
519 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
520 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
521 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
522
523
524 # _LT_LIBTOOL_TAGS
525 # ----------------
526 # Output comment and list of tags supported by the script
527 m4_defun([_LT_LIBTOOL_TAGS],
528 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
529 available_tags="_LT_TAGS"dnl
530 ])
531
532
533 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
534 # -----------------------------------
535 # Extract the dictionary values for VARNAME (optionally with TAG) and
536 # expand to a commented shell variable setting:
537 #
538 # # Some comment about what VAR is for.
539 # visible_name=$lt_internal_name
540 m4_define([_LT_LIBTOOL_DECLARE],
541 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
542 [description])))[]dnl
543 m4_pushdef([_libtool_name],
544 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
545 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
546 [0], [_libtool_name=[$]$1],
547 [1], [_libtool_name=$lt_[]$1],
548 [2], [_libtool_name=$lt_[]$1],
549 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
550 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
551 ])
552
553
554 # _LT_LIBTOOL_CONFIG_VARS
555 # -----------------------
556 # Produce commented declarations of non-tagged libtool config variables
557 # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
558 # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
559 # section) are produced by _LT_LIBTOOL_TAG_VARS.
560 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
561 [m4_foreach([_lt_var],
562 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
563 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
564
565
566 # _LT_LIBTOOL_TAG_VARS(TAG)
567 # -------------------------
568 m4_define([_LT_LIBTOOL_TAG_VARS],
569 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
570 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
571
572
573 # _LT_TAGVAR(VARNAME, [TAGNAME])
574 # ------------------------------
575 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
576
577
578 # _LT_CONFIG_COMMANDS
579 # -------------------
580 # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
581 # variables for single and double quote escaping we saved from calls
582 # to _LT_DECL, we can put quote escaped variables declarations
583 # into `config.status', and then the shell code to quote escape them in
584 # for loops in `config.status'. Finally, any additional code accumulated
585 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
586 m4_defun([_LT_CONFIG_COMMANDS],
587 [AC_PROVIDE_IFELSE([LT_OUTPUT],
588 dnl If the libtool generation code has been placed in $CONFIG_LT,
589 dnl instead of duplicating it all over again into config.status,
590 dnl then we will have config.status run $CONFIG_LT later, so it
591 dnl needs to know what name is stored there:
592 [AC_CONFIG_COMMANDS([libtool],
593 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
594 dnl If the libtool generation code is destined for config.status,
595 dnl expand the accumulated commands and init code now:
596 [AC_CONFIG_COMMANDS([libtool],
597 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
598 ])#_LT_CONFIG_COMMANDS
599
600
601 # Initialize.
602 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
603 [
604
605 # The HP-UX ksh and POSIX shell print the target directory to stdout
606 # if CDPATH is set.
607 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
608
609 sed_quote_subst='$sed_quote_subst'
610 double_quote_subst='$double_quote_subst'
611 delay_variable_subst='$delay_variable_subst'
612 _LT_CONFIG_STATUS_DECLARATIONS
613 LTCC='$LTCC'
614 LTCFLAGS='$LTCFLAGS'
615 compiler='$compiler_DEFAULT'
616
617 # A function that is used when there is no print builtin or printf.
618 func_fallback_echo ()
619 {
620 eval 'cat <<_LTECHO_EOF
621 \$[]1
622 _LTECHO_EOF'
623 }
624
625 # Quote evaled strings.
626 for var in lt_decl_all_varnames([[ \
627 ]], lt_decl_quote_varnames); do
628 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
629 *[[\\\\\\\`\\"\\\$]]*)
630 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
631 ;;
632 *)
633 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
634 ;;
635 esac
636 done
637
638 # Double-quote double-evaled strings.
639 for var in lt_decl_all_varnames([[ \
640 ]], lt_decl_dquote_varnames); do
641 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
642 *[[\\\\\\\`\\"\\\$]]*)
643 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
644 ;;
645 *)
646 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
647 ;;
648 esac
649 done
650
651 _LT_OUTPUT_LIBTOOL_INIT
652 ])
653
654 # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
655 # ------------------------------------
656 # Generate a child script FILE with all initialization necessary to
657 # reuse the environment learned by the parent script, and make the
658 # file executable. If COMMENT is supplied, it is inserted after the
659 # `#!' sequence but before initialization text begins. After this
660 # macro, additional text can be appended to FILE to form the body of
661 # the child script. The macro ends with non-zero status if the
662 # file could not be fully written (such as if the disk is full).
663 m4_ifdef([AS_INIT_GENERATED],
664 [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
665 [m4_defun([_LT_GENERATED_FILE_INIT],
666 [m4_require([AS_PREPARE])]dnl
667 [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
668 [lt_write_fail=0
669 cat >$1 <<_ASEOF || lt_write_fail=1
670 #! $SHELL
671 # Generated by $as_me.
672 $2
673 SHELL=\${CONFIG_SHELL-$SHELL}
674 export SHELL
675 _ASEOF
676 cat >>$1 <<\_ASEOF || lt_write_fail=1
677 AS_SHELL_SANITIZE
678 _AS_PREPARE
679 exec AS_MESSAGE_FD>&1
680 _ASEOF
681 test $lt_write_fail = 0 && chmod +x $1[]dnl
682 m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
683
684 # LT_OUTPUT
685 # ---------
686 # This macro allows early generation of the libtool script (before
687 # AC_OUTPUT is called), incase it is used in configure for compilation
688 # tests.
689 AC_DEFUN([LT_OUTPUT],
690 [: ${CONFIG_LT=./config.lt}
691 AC_MSG_NOTICE([creating $CONFIG_LT])
692 _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
693 [# Run this file to recreate a libtool stub with the current configuration.])
694
695 cat >>"$CONFIG_LT" <<\_LTEOF
696 lt_cl_silent=false
697 exec AS_MESSAGE_LOG_FD>>config.log
698 {
699 echo
700 AS_BOX([Running $as_me.])
701 } >&AS_MESSAGE_LOG_FD
702
703 lt_cl_help="\
704 \`$as_me' creates a local libtool stub from the current configuration,
705 for use in further configure time tests before the real libtool is
706 generated.
707
708 Usage: $[0] [[OPTIONS]]
709
710 -h, --help print this help, then exit
711 -V, --version print version number, then exit
712 -q, --quiet do not print progress messages
713 -d, --debug don't remove temporary files
714
715 Report bugs to <bug-libtool@gnu.org>."
716
717 lt_cl_version="\
718 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
719 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
720 configured by $[0], generated by m4_PACKAGE_STRING.
721
722 Copyright (C) 2010 Free Software Foundation, Inc.
723 This config.lt script is free software; the Free Software Foundation
724 gives unlimited permision to copy, distribute and modify it."
725
726 while test $[#] != 0
727 do
728 case $[1] in
729 --version | --v* | -V )
730 echo "$lt_cl_version"; exit 0 ;;
731 --help | --h* | -h )
732 echo "$lt_cl_help"; exit 0 ;;
733 --debug | --d* | -d )
734 debug=: ;;
735 --quiet | --q* | --silent | --s* | -q )
736 lt_cl_silent=: ;;
737
738 -*) AC_MSG_ERROR([unrecognized option: $[1]
739 Try \`$[0] --help' for more information.]) ;;
740
741 *) AC_MSG_ERROR([unrecognized argument: $[1]
742 Try \`$[0] --help' for more information.]) ;;
743 esac
744 shift
745 done
746
747 if $lt_cl_silent; then
748 exec AS_MESSAGE_FD>/dev/null
749 fi
750 _LTEOF
751
752 cat >>"$CONFIG_LT" <<_LTEOF
753 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
754 _LTEOF
755
756 cat >>"$CONFIG_LT" <<\_LTEOF
757 AC_MSG_NOTICE([creating $ofile])
758 _LT_OUTPUT_LIBTOOL_COMMANDS
759 AS_EXIT(0)
760 _LTEOF
761 chmod +x "$CONFIG_LT"
762
763 # configure is writing to config.log, but config.lt does its own redirection,
764 # appending to config.log, which fails on DOS, as config.log is still kept
765 # open by configure. Here we exec the FD to /dev/null, effectively closing
766 # config.log, so it can be properly (re)opened and appended to by config.lt.
767 lt_cl_success=:
768 test "$silent" = yes &&
769 lt_config_lt_args="$lt_config_lt_args --quiet"
770 exec AS_MESSAGE_LOG_FD>/dev/null
771 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
772 exec AS_MESSAGE_LOG_FD>>config.log
773 $lt_cl_success || AS_EXIT(1)
774 ])# LT_OUTPUT
775
776
777 # _LT_CONFIG(TAG)
778 # ---------------
779 # If TAG is the built-in tag, create an initial libtool script with a
780 # default configuration from the untagged config vars. Otherwise add code
781 # to config.status for appending the configuration named by TAG from the
782 # matching tagged config vars.
783 m4_defun([_LT_CONFIG],
784 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
785 _LT_CONFIG_SAVE_COMMANDS([
786 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
787 m4_if(_LT_TAG, [C], [
788 # See if we are running on zsh, and set the options which allow our
789 # commands through without removal of \ escapes.
790 if test -n "${ZSH_VERSION+set}" ; then
791 setopt NO_GLOB_SUBST
792 fi
793
794 cfgfile="${ofile}T"
795 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
796 $RM "$cfgfile"
797
798 cat <<_LT_EOF >> "$cfgfile"
799 #! $SHELL
800
801 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
802 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
803 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
804 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
805 #
806 _LT_COPYING
807 _LT_LIBTOOL_TAGS
808
809 # ### BEGIN LIBTOOL CONFIG
810 _LT_LIBTOOL_CONFIG_VARS
811 _LT_LIBTOOL_TAG_VARS
812 # ### END LIBTOOL CONFIG
813
814 _LT_EOF
815
816 case $host_os in
817 aix3*)
818 cat <<\_LT_EOF >> "$cfgfile"
819 # AIX sometimes has problems with the GCC collect2 program. For some
820 # reason, if we set the COLLECT_NAMES environment variable, the problems
821 # vanish in a puff of smoke.
822 if test "X${COLLECT_NAMES+set}" != Xset; then
823 COLLECT_NAMES=
824 export COLLECT_NAMES
825 fi
826 _LT_EOF
827 ;;
828 esac
829
830 _LT_PROG_LTMAIN
831
832 # We use sed instead of cat because bash on DJGPP gets confused if
833 # if finds mixed CR/LF and LF-only lines. Since sed operates in
834 # text mode, it properly converts lines to CR/LF. This bash problem
835 # is reportedly fixed, but why not run on old versions too?
836 sed '$q' "$ltmain" >> "$cfgfile" \
837 || (rm -f "$cfgfile"; exit 1)
838
839 _LT_PROG_REPLACE_SHELLFNS
840
841 mv -f "$cfgfile" "$ofile" ||
842 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
843 chmod +x "$ofile"
844 ],
845 [cat <<_LT_EOF >> "$ofile"
846
847 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
848 dnl in a comment (ie after a #).
849 # ### BEGIN LIBTOOL TAG CONFIG: $1
850 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
851 # ### END LIBTOOL TAG CONFIG: $1
852 _LT_EOF
853 ])dnl /m4_if
854 ],
855 [m4_if([$1], [], [
856 PACKAGE='$PACKAGE'
857 VERSION='$VERSION'
858 TIMESTAMP='$TIMESTAMP'
859 RM='$RM'
860 ofile='$ofile'], [])
861 ])dnl /_LT_CONFIG_SAVE_COMMANDS
862 ])# _LT_CONFIG
863
864
865 # LT_SUPPORTED_TAG(TAG)
866 # ---------------------
867 # Trace this macro to discover what tags are supported by the libtool
868 # --tag option, using:
869 # autoconf --trace 'LT_SUPPORTED_TAG:$1'
870 AC_DEFUN([LT_SUPPORTED_TAG], [])
871
872
873 # C support is built-in for now
874 m4_define([_LT_LANG_C_enabled], [])
875 m4_define([_LT_TAGS], [])
876
877
878 # LT_LANG(LANG)
879 # -------------
880 # Enable libtool support for the given language if not already enabled.
881 AC_DEFUN([LT_LANG],
882 [AC_BEFORE([$0], [LT_OUTPUT])dnl
883 m4_case([$1],
884 [C], [_LT_LANG(C)],
885 [C++], [_LT_LANG(CXX)],
886 [Java], [_LT_LANG(GCJ)],
887 [Fortran 77], [_LT_LANG(F77)],
888 [Fortran], [_LT_LANG(FC)],
889 [Windows Resource], [_LT_LANG(RC)],
890 [m4_ifdef([_LT_LANG_]$1[_CONFIG],
891 [_LT_LANG($1)],
892 [m4_fatal([$0: unsupported language: "$1"])])])dnl
893 ])# LT_LANG
894
895
896 # _LT_LANG(LANGNAME)
897 # ------------------
898 m4_defun([_LT_LANG],
899 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
900 [LT_SUPPORTED_TAG([$1])dnl
901 m4_append([_LT_TAGS], [$1 ])dnl
902 m4_define([_LT_LANG_]$1[_enabled], [])dnl
903 _LT_LANG_$1_CONFIG($1)])dnl
904 ])# _LT_LANG
905
906
907 # _LT_LANG_DEFAULT_CONFIG
908 # -----------------------
909 m4_defun([_LT_LANG_DEFAULT_CONFIG],
910 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
911 [LT_LANG(CXX)],
912 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
913
914 AC_PROVIDE_IFELSE([AC_PROG_F77],
915 [LT_LANG(F77)],
916 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
917
918 AC_PROVIDE_IFELSE([AC_PROG_FC],
919 [LT_LANG(FC)],
920 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
921
922 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
923 dnl pulling things in needlessly.
924 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
925 [LT_LANG(GCJ)],
926 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
927 [LT_LANG(GCJ)],
928 [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
929 [LT_LANG(GCJ)],
930 [m4_ifdef([AC_PROG_GCJ],
931 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
932 m4_ifdef([A][M_PROG_GCJ],
933 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
934 m4_ifdef([LT_PROG_GCJ],
935 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
936
937 AC_PROVIDE_IFELSE([LT_PROG_RC],
938 [LT_LANG(RC)],
939 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
940 ])# _LT_LANG_DEFAULT_CONFIG
941
942 # Obsolete macros:
943 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
944 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
945 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
946 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
947 AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
948 dnl aclocal-1.4 backwards compatibility:
949 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
950 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
951 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
952 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
953 dnl AC_DEFUN([AC_LIBTOOL_RC], [])
954
955
956 # _LT_TAG_COMPILER
957 # ----------------
958 m4_defun([_LT_TAG_COMPILER],
959 [AC_REQUIRE([AC_PROG_CC])dnl
960
961 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
962 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
963 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
964 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
965
966 # If no C compiler was specified, use CC.
967 LTCC=${LTCC-"$CC"}
968
969 # If no C compiler flags were specified, use CFLAGS.
970 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
971
972 # Allow CC to be a program name with arguments.
973 compiler=$CC
974 ])# _LT_TAG_COMPILER
975
976
977 # _LT_COMPILER_BOILERPLATE
978 # ------------------------
979 # Check for compiler boilerplate output or warnings with
980 # the simple compiler test code.
981 m4_defun([_LT_COMPILER_BOILERPLATE],
982 [m4_require([_LT_DECL_SED])dnl
983 ac_outfile=conftest.$ac_objext
984 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
985 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
986 _lt_compiler_boilerplate=`cat conftest.err`
987 $RM conftest*
988 ])# _LT_COMPILER_BOILERPLATE
989
990
991 # _LT_LINKER_BOILERPLATE
992 # ----------------------
993 # Check for linker boilerplate output or warnings with
994 # the simple link test code.
995 m4_defun([_LT_LINKER_BOILERPLATE],
996 [m4_require([_LT_DECL_SED])dnl
997 ac_outfile=conftest.$ac_objext
998 echo "$lt_simple_link_test_code" >conftest.$ac_ext
999 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1000 _lt_linker_boilerplate=`cat conftest.err`
1001 $RM -r conftest*
1002 ])# _LT_LINKER_BOILERPLATE
1003
1004 # _LT_REQUIRED_DARWIN_CHECKS
1005 # -------------------------
1006 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
1007 case $host_os in
1008 rhapsody* | darwin*)
1009 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
1010 AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
1011 AC_CHECK_TOOL([LIPO], [lipo], [:])
1012 AC_CHECK_TOOL([OTOOL], [otool], [:])
1013 AC_CHECK_TOOL([OTOOL64], [otool64], [:])
1014 _LT_DECL([], [DSYMUTIL], [1],
1015 [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
1016 _LT_DECL([], [NMEDIT], [1],
1017 [Tool to change global to local symbols on Mac OS X])
1018 _LT_DECL([], [LIPO], [1],
1019 [Tool to manipulate fat objects and archives on Mac OS X])
1020 _LT_DECL([], [OTOOL], [1],
1021 [ldd/readelf like tool for Mach-O binaries on Mac OS X])
1022 _LT_DECL([], [OTOOL64], [1],
1023 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
1024
1025 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
1026 [lt_cv_apple_cc_single_mod=no
1027 if test -z "${LT_MULTI_MODULE}"; then
1028 # By default we will add the -single_module flag. You can override
1029 # by either setting the environment variable LT_MULTI_MODULE
1030 # non-empty at configure time, or by adding -multi_module to the
1031 # link flags.
1032 rm -rf libconftest.dylib*
1033 echo "int foo(void){return 1;}" > conftest.c
1034 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1035 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
1036 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1037 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
1038 _lt_result=$?
1039 if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
1040 lt_cv_apple_cc_single_mod=yes
1041 else
1042 cat conftest.err >&AS_MESSAGE_LOG_FD
1043 fi
1044 rm -rf libconftest.dylib*
1045 rm -f conftest.*
1046 fi])
1047 AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1048 [lt_cv_ld_exported_symbols_list],
1049 [lt_cv_ld_exported_symbols_list=no
1050 save_LDFLAGS=$LDFLAGS
1051 echo "_main" > conftest.sym
1052 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1053 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1054 [lt_cv_ld_exported_symbols_list=yes],
1055 [lt_cv_ld_exported_symbols_list=no])
1056 LDFLAGS="$save_LDFLAGS"
1057 ])
1058 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
1059 [lt_cv_ld_force_load=no
1060 cat > conftest.c << _LT_EOF
1061 int forced_loaded() { return 2;}
1062 _LT_EOF
1063 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
1064 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
1065 echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
1066 $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
1067 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
1068 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
1069 cat > conftest.c << _LT_EOF
1070 int main() { return 0;}
1071 _LT_EOF
1072 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
1073 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
1074 _lt_result=$?
1075 if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
1076 lt_cv_ld_force_load=yes
1077 else
1078 cat conftest.err >&AS_MESSAGE_LOG_FD
1079 fi
1080 rm -f conftest.err libconftest.a conftest conftest.c
1081 rm -rf conftest.dSYM
1082 ])
1083 case $host_os in
1084 rhapsody* | darwin1.[[012]])
1085 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
1086 darwin1.*)
1087 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1088 darwin*) # darwin 5.x on
1089 # if running on 10.5 or later, the deployment target defaults
1090 # to the OS version, if on x86, and 10.4, the deployment
1091 # target defaults to 10.4. Don't you love it?
1092 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
1093 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
1094 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1095 10.[[012]]*)
1096 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1097 10.*)
1098 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1099 esac
1100 ;;
1101 esac
1102 if test "$lt_cv_apple_cc_single_mod" = "yes"; then
1103 _lt_dar_single_mod='$single_module'
1104 fi
1105 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
1106 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
1107 else
1108 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
1109 fi
1110 if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
1111 _lt_dsymutil='~$DSYMUTIL $lib || :'
1112 else
1113 _lt_dsymutil=
1114 fi
1115 ;;
1116 esac
1117 ])
1118
1119
1120 # _LT_DARWIN_LINKER_FEATURES
1121 # --------------------------
1122 # Checks for linker and compiler features on darwin
1123 m4_defun([_LT_DARWIN_LINKER_FEATURES],
1124 [
1125 m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1126 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1127 _LT_TAGVAR(hardcode_direct, $1)=no
1128 _LT_TAGVAR(hardcode_automatic, $1)=yes
1129 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1130 if test "$lt_cv_ld_force_load" = "yes"; then
1131 _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
1132 else
1133 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1134 fi
1135 _LT_TAGVAR(link_all_deplibs, $1)=yes
1136 _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
1137 case $cc_basename in
1138 ifort*) _lt_dar_can_shared=yes ;;
1139 *) _lt_dar_can_shared=$GCC ;;
1140 esac
1141 if test "$_lt_dar_can_shared" = "yes"; then
1142 output_verbose_link_cmd=func_echo_all
1143 _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
1144 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
1145 _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
1146 _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
1147 m4_if([$1], [CXX],
1148 [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
1149 _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
1150 _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
1151 fi
1152 ],[])
1153 else
1154 _LT_TAGVAR(ld_shlibs, $1)=no
1155 fi
1156 ])
1157
1158 # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
1159 # ----------------------------------
1160 # Links a minimal program and checks the executable
1161 # for the system default hardcoded library path. In most cases,
1162 # this is /usr/lib:/lib, but when the MPI compilers are used
1163 # the location of the communication and MPI libs are included too.
1164 # If we don't find anything, use the default library path according
1165 # to the aix ld manual.
1166 # Store the results from the different compilers for each TAGNAME.
1167 # Allow to override them for all tags through lt_cv_aix_libpath.
1168 m4_defun([_LT_SYS_MODULE_PATH_AIX],
1169 [m4_require([_LT_DECL_SED])dnl
1170 if test "${lt_cv_aix_libpath+set}" = set; then
1171 aix_libpath=$lt_cv_aix_libpath
1172 else
1173 AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
1174 [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
1175 lt_aix_libpath_sed='[
1176 /Import File Strings/,/^$/ {
1177 /^0/ {
1178 s/^0 *\([^ ]*\) *$/\1/
1179 p
1180 }
1181 }]'
1182 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1183 # Check for a 64-bit object if we didn't find anything.
1184 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1185 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1186 fi],[])
1187 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1188 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
1189 fi
1190 ])
1191 aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
1192 fi
1193 ])# _LT_SYS_MODULE_PATH_AIX
1194
1195
1196 # _LT_SHELL_INIT(ARG)
1197 # -------------------
1198 m4_define([_LT_SHELL_INIT],
1199 [m4_divert_text([M4SH-INIT], [$1
1200 ])])# _LT_SHELL_INIT
1201
1202
1203
1204 # _LT_PROG_ECHO_BACKSLASH
1205 # -----------------------
1206 # Find how we can fake an echo command that does not interpret backslash.
1207 # In particular, with Autoconf 2.60 or later we add some code to the start
1208 # of the generated configure script which will find a shell with a builtin
1209 # printf (which we can use as an echo command).
1210 m4_defun([_LT_PROG_ECHO_BACKSLASH],
1211 [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1212 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1213 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1214
1215 AC_MSG_CHECKING([how to print strings])
1216 # Test print first, because it will be a builtin if present.
1217 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
1218 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
1219 ECHO='print -r --'
1220 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
1221 ECHO='printf %s\n'
1222 else
1223 # Use this function as a fallback that always works.
1224 func_fallback_echo ()
1225 {
1226 eval 'cat <<_LTECHO_EOF
1227 $[]1
1228 _LTECHO_EOF'
1229 }
1230 ECHO='func_fallback_echo'
1231 fi
1232
1233 # func_echo_all arg...
1234 # Invoke $ECHO with all args, space-separated.
1235 func_echo_all ()
1236 {
1237 $ECHO "$*"
1238 }
1239
1240 case "$ECHO" in
1241 printf*) AC_MSG_RESULT([printf]) ;;
1242 print*) AC_MSG_RESULT([print -r]) ;;
1243 *) AC_MSG_RESULT([cat]) ;;
1244 esac
1245
1246 m4_ifdef([_AS_DETECT_SUGGESTED],
1247 [_AS_DETECT_SUGGESTED([
1248 test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
1249 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1250 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1251 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1252 PATH=/empty FPATH=/empty; export PATH FPATH
1253 test "X`printf %s $ECHO`" = "X$ECHO" \
1254 || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
1255
1256 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1257 _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
1258 ])# _LT_PROG_ECHO_BACKSLASH
1259
1260
1261 # _LT_WITH_SYSROOT
1262 # ----------------
1263 AC_DEFUN([_LT_WITH_SYSROOT],
1264 [AC_MSG_CHECKING([for sysroot])
1265 AC_ARG_WITH([sysroot],
1266 [ --with-sysroot[=DIR] Search for dependent libraries within DIR
1267 (or the compiler's sysroot if not specified).],
1268 [], [with_sysroot=no])
1269
1270 dnl lt_sysroot will always be passed unquoted. We quote it here
1271 dnl in case the user passed a directory name.
1272 lt_sysroot=
1273 case ${with_sysroot} in #(
1274 yes)
1275 if test "$GCC" = yes; then
1276 lt_sysroot=`$CC --print-sysroot 2>/dev/null`
1277 fi
1278 ;; #(
1279 /*)
1280 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
1281 ;; #(
1282 no|'')
1283 ;; #(
1284 *)
1285 AC_MSG_RESULT([${with_sysroot}])
1286 AC_MSG_ERROR([The sysroot must be an absolute path.])
1287 ;;
1288 esac
1289
1290 AC_MSG_RESULT([${lt_sysroot:-no}])
1291 _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
1292 [dependent libraries, and in which our libraries should be installed.])])
1293
1294 # _LT_ENABLE_LOCK
1295 # ---------------
1296 m4_defun([_LT_ENABLE_LOCK],
1297 [AC_ARG_ENABLE([libtool-lock],
1298 [AS_HELP_STRING([--disable-libtool-lock],
1299 [avoid locking (might break parallel builds)])])
1300 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1301
1302 # Some flags need to be propagated to the compiler or linker for good
1303 # libtool support.
1304 case $host in
1305 ia64-*-hpux*)
1306 # Find out which ABI we are using.
1307 echo 'int i;' > conftest.$ac_ext
1308 if AC_TRY_EVAL(ac_compile); then
1309 case `/usr/bin/file conftest.$ac_objext` in
1310 *ELF-32*)
1311 HPUX_IA64_MODE="32"
1312 ;;
1313 *ELF-64*)
1314 HPUX_IA64_MODE="64"
1315 ;;
1316 esac
1317 fi
1318 rm -rf conftest*
1319 ;;
1320 *-*-irix6*)
1321 # Find out which ABI we are using.
1322 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
1323 if AC_TRY_EVAL(ac_compile); then
1324 if test "$lt_cv_prog_gnu_ld" = yes; then
1325 case `/usr/bin/file conftest.$ac_objext` in
1326 *32-bit*)
1327 LD="${LD-ld} -melf32bsmip"
1328 ;;
1329 *N32*)
1330 LD="${LD-ld} -melf32bmipn32"
1331 ;;
1332 *64-bit*)
1333 LD="${LD-ld} -melf64bmip"
1334 ;;
1335 esac
1336 else
1337 case `/usr/bin/file conftest.$ac_objext` in
1338 *32-bit*)
1339 LD="${LD-ld} -32"
1340 ;;
1341 *N32*)
1342 LD="${LD-ld} -n32"
1343 ;;
1344 *64-bit*)
1345 LD="${LD-ld} -64"
1346 ;;
1347 esac
1348 fi
1349 fi
1350 rm -rf conftest*
1351 ;;
1352
1353 x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
1354 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1355 # Find out which ABI we are using.
1356 echo 'int i;' > conftest.$ac_ext
1357 if AC_TRY_EVAL(ac_compile); then
1358 case `/usr/bin/file conftest.o` in
1359 *32-bit*)
1360 case $host in
1361 x86_64-*kfreebsd*-gnu)
1362 LD="${LD-ld} -m elf_i386_fbsd"
1363 ;;
1364 x86_64-*linux*)
1365 LD="${LD-ld} -m elf_i386"
1366 ;;
1367 ppc64-*linux*|powerpc64-*linux*)
1368 LD="${LD-ld} -m elf32ppclinux"
1369 ;;
1370 s390x-*linux*)
1371 LD="${LD-ld} -m elf_s390"
1372 ;;
1373 sparc64-*linux*)
1374 LD="${LD-ld} -m elf32_sparc"
1375 ;;
1376 esac
1377 ;;
1378 *64-bit*)
1379 case $host in
1380 x86_64-*kfreebsd*-gnu)
1381 LD="${LD-ld} -m elf_x86_64_fbsd"
1382 ;;
1383 x86_64-*linux*)
1384 LD="${LD-ld} -m elf_x86_64"
1385 ;;
1386 ppc*-*linux*|powerpc*-*linux*)
1387 LD="${LD-ld} -m elf64ppc"
1388 ;;
1389 s390*-*linux*|s390*-*tpf*)
1390 LD="${LD-ld} -m elf64_s390"
1391 ;;
1392 sparc*-*linux*)
1393 LD="${LD-ld} -m elf64_sparc"
1394 ;;
1395 esac
1396 ;;
1397 esac
1398 fi
1399 rm -rf conftest*
1400 ;;
1401
1402 *-*-sco3.2v5*)
1403 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1404 SAVE_CFLAGS="$CFLAGS"
1405 CFLAGS="$CFLAGS -belf"
1406 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1407 [AC_LANG_PUSH(C)
1408 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1409 AC_LANG_POP])
1410 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1411 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1412 CFLAGS="$SAVE_CFLAGS"
1413 fi
1414 ;;
1415 sparc*-*solaris*)
1416 # Find out which ABI we are using.
1417 echo 'int i;' > conftest.$ac_ext
1418 if AC_TRY_EVAL(ac_compile); then
1419 case `/usr/bin/file conftest.o` in
1420 *64-bit*)
1421 case $lt_cv_prog_gnu_ld in
1422 yes*) LD="${LD-ld} -m elf64_sparc" ;;
1423 *)
1424 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1425 LD="${LD-ld} -64"
1426 fi
1427 ;;
1428 esac
1429 ;;
1430 esac
1431 fi
1432 rm -rf conftest*
1433 ;;
1434 esac
1435
1436 need_locks="$enable_libtool_lock"
1437 ])# _LT_ENABLE_LOCK
1438
1439
1440 # _LT_PROG_AR
1441 # -----------
1442 m4_defun([_LT_PROG_AR],
1443 [AC_CHECK_TOOLS(AR, [ar], false)
1444 : ${AR=ar}
1445 : ${AR_FLAGS=cru}
1446 _LT_DECL([], [AR], [1], [The archiver])
1447 _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
1448
1449 AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
1450 [lt_cv_ar_at_file=no
1451 AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
1452 [echo conftest.$ac_objext > conftest.lst
1453 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
1454 AC_TRY_EVAL([lt_ar_try])
1455 if test "$ac_status" -eq 0; then
1456 # Ensure the archiver fails upon bogus file names.
1457 rm -f conftest.$ac_objext libconftest.a
1458 AC_TRY_EVAL([lt_ar_try])
1459 if test "$ac_status" -ne 0; then
1460 lt_cv_ar_at_file=@
1461 fi
1462 fi
1463 rm -f conftest.* libconftest.a
1464 ])
1465 ])
1466
1467 if test "x$lt_cv_ar_at_file" = xno; then
1468 archiver_list_spec=
1469 else
1470 archiver_list_spec=$lt_cv_ar_at_file
1471 fi
1472 _LT_DECL([], [archiver_list_spec], [1],
1473 [How to feed a file listing to the archiver])
1474 ])# _LT_PROG_AR
1475
1476
1477 # _LT_CMD_OLD_ARCHIVE
1478 # -------------------
1479 m4_defun([_LT_CMD_OLD_ARCHIVE],
1480 [_LT_PROG_AR
1481
1482 AC_CHECK_TOOL(STRIP, strip, :)
1483 test -z "$STRIP" && STRIP=:
1484 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
1485
1486 AC_CHECK_TOOL(RANLIB, ranlib, :)
1487 test -z "$RANLIB" && RANLIB=:
1488 _LT_DECL([], [RANLIB], [1],
1489 [Commands used to install an old-style archive])
1490
1491 # Determine commands to create old-style static archives.
1492 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1493 old_postinstall_cmds='chmod 644 $oldlib'
1494 old_postuninstall_cmds=
1495
1496 if test -n "$RANLIB"; then
1497 case $host_os in
1498 openbsd*)
1499 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
1500 ;;
1501 *)
1502 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
1503 ;;
1504 esac
1505 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1506 fi
1507
1508 case $host_os in
1509 darwin*)
1510 lock_old_archive_extraction=yes ;;
1511 *)
1512 lock_old_archive_extraction=no ;;
1513 esac
1514 _LT_DECL([], [old_postinstall_cmds], [2])
1515 _LT_DECL([], [old_postuninstall_cmds], [2])
1516 _LT_TAGDECL([], [old_archive_cmds], [2],
1517 [Commands used to build an old-style archive])
1518 _LT_DECL([], [lock_old_archive_extraction], [0],
1519 [Whether to use a lock for old archive extraction])
1520 ])# _LT_CMD_OLD_ARCHIVE
1521
1522
1523 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1524 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1525 # ----------------------------------------------------------------
1526 # Check whether the given compiler option works
1527 AC_DEFUN([_LT_COMPILER_OPTION],
1528 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1529 m4_require([_LT_DECL_SED])dnl
1530 AC_CACHE_CHECK([$1], [$2],
1531 [$2=no
1532 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1533 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1534 lt_compiler_flag="$3"
1535 # Insert the option either (1) after the last *FLAGS variable, or
1536 # (2) before a word containing "conftest.", or (3) at the end.
1537 # Note that $ac_compile itself does not contain backslashes and begins
1538 # with a dollar sign (not a hyphen), so the echo should work correctly.
1539 # The option is referenced via a variable to avoid confusing sed.
1540 lt_compile=`echo "$ac_compile" | $SED \
1541 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1542 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1543 -e 's:$: $lt_compiler_flag:'`
1544 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1545 (eval "$lt_compile" 2>conftest.err)
1546 ac_status=$?
1547 cat conftest.err >&AS_MESSAGE_LOG_FD
1548 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1549 if (exit $ac_status) && test -s "$ac_outfile"; then
1550 # The compiler can only warn and ignore the option if not recognized
1551 # So say no if there are warnings other than the usual output.
1552 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
1553 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1554 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1555 $2=yes
1556 fi
1557 fi
1558 $RM conftest*
1559 ])
1560
1561 if test x"[$]$2" = xyes; then
1562 m4_if([$5], , :, [$5])
1563 else
1564 m4_if([$6], , :, [$6])
1565 fi
1566 ])# _LT_COMPILER_OPTION
1567
1568 # Old name:
1569 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
1570 dnl aclocal-1.4 backwards compatibility:
1571 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
1572
1573
1574 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1575 # [ACTION-SUCCESS], [ACTION-FAILURE])
1576 # ----------------------------------------------------
1577 # Check whether the given linker option works
1578 AC_DEFUN([_LT_LINKER_OPTION],
1579 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1580 m4_require([_LT_DECL_SED])dnl
1581 AC_CACHE_CHECK([$1], [$2],
1582 [$2=no
1583 save_LDFLAGS="$LDFLAGS"
1584 LDFLAGS="$LDFLAGS $3"
1585 echo "$lt_simple_link_test_code" > conftest.$ac_ext
1586 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1587 # The linker can only warn and ignore the option if not recognized
1588 # So say no if there are warnings
1589 if test -s conftest.err; then
1590 # Append any errors to the config.log.
1591 cat conftest.err 1>&AS_MESSAGE_LOG_FD
1592 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
1593 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1594 if diff conftest.exp conftest.er2 >/dev/null; then
1595 $2=yes
1596 fi
1597 else
1598 $2=yes
1599 fi
1600 fi
1601 $RM -r conftest*
1602 LDFLAGS="$save_LDFLAGS"
1603 ])
1604
1605 if test x"[$]$2" = xyes; then
1606 m4_if([$4], , :, [$4])
1607 else
1608 m4_if([$5], , :, [$5])
1609 fi
1610 ])# _LT_LINKER_OPTION
1611
1612 # Old name:
1613 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
1614 dnl aclocal-1.4 backwards compatibility:
1615 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
1616
1617
1618 # LT_CMD_MAX_LEN
1619 #---------------
1620 AC_DEFUN([LT_CMD_MAX_LEN],
1621 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1622 # find the maximum length of command line arguments
1623 AC_MSG_CHECKING([the maximum length of command line arguments])
1624 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1625 i=0
1626 teststring="ABCD"
1627
1628 case $build_os in
1629 msdosdjgpp*)
1630 # On DJGPP, this test can blow up pretty badly due to problems in libc
1631 # (any single argument exceeding 2000 bytes causes a buffer overrun
1632 # during glob expansion). Even if it were fixed, the result of this
1633 # check would be larger than it should be.
1634 lt_cv_sys_max_cmd_len=12288; # 12K is about right
1635 ;;
1636
1637 gnu*)
1638 # Under GNU Hurd, this test is not required because there is
1639 # no limit to the length of command line arguments.
1640 # Libtool will interpret -1 as no limit whatsoever
1641 lt_cv_sys_max_cmd_len=-1;
1642 ;;
1643
1644 cygwin* | mingw* | cegcc*)
1645 # On Win9x/ME, this test blows up -- it succeeds, but takes
1646 # about 5 minutes as the teststring grows exponentially.
1647 # Worse, since 9x/ME are not pre-emptively multitasking,
1648 # you end up with a "frozen" computer, even though with patience
1649 # the test eventually succeeds (with a max line length of 256k).
1650 # Instead, let's just punt: use the minimum linelength reported by
1651 # all of the supported platforms: 8192 (on NT/2K/XP).
1652 lt_cv_sys_max_cmd_len=8192;
1653 ;;
1654
1655 mint*)
1656 # On MiNT this can take a long time and run out of memory.
1657 lt_cv_sys_max_cmd_len=8192;
1658 ;;
1659
1660 amigaos*)
1661 # On AmigaOS with pdksh, this test takes hours, literally.
1662 # So we just punt and use a minimum line length of 8192.
1663 lt_cv_sys_max_cmd_len=8192;
1664 ;;
1665
1666 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
1667 # This has been around since 386BSD, at least. Likely further.
1668 if test -x /sbin/sysctl; then
1669 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1670 elif test -x /usr/sbin/sysctl; then
1671 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1672 else
1673 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
1674 fi
1675 # And add a safety zone
1676 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1677 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1678 ;;
1679
1680 interix*)
1681 # We know the value 262144 and hardcode it with a safety zone (like BSD)
1682 lt_cv_sys_max_cmd_len=196608
1683 ;;
1684
1685 osf*)
1686 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1687 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1688 # nice to cause kernel panics so lets avoid the loop below.
1689 # First set a reasonable default.
1690 lt_cv_sys_max_cmd_len=16384
1691 #
1692 if test -x /sbin/sysconfig; then
1693 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1694 *1*) lt_cv_sys_max_cmd_len=-1 ;;
1695 esac
1696 fi
1697 ;;
1698 sco3.2v5*)
1699 lt_cv_sys_max_cmd_len=102400
1700 ;;
1701 sysv5* | sco5v6* | sysv4.2uw2*)
1702 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1703 if test -n "$kargmax"; then
1704 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
1705 else
1706 lt_cv_sys_max_cmd_len=32768
1707 fi
1708 ;;
1709 *)
1710 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
1711 if test -n "$lt_cv_sys_max_cmd_len"; then
1712 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1713 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1714 else
1715 # Make teststring a little bigger before we do anything with it.
1716 # a 1K string should be a reasonable start.
1717 for i in 1 2 3 4 5 6 7 8 ; do
1718 teststring=$teststring$teststring
1719 done
1720 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1721 # If test is not a shell built-in, we'll probably end up computing a
1722 # maximum length that is only half of the actual maximum length, but
1723 # we can't tell.
1724 while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
1725 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
1726 test $i != 17 # 1/2 MB should be enough
1727 do
1728 i=`expr $i + 1`
1729 teststring=$teststring$teststring
1730 done
1731 # Only check the string length outside the loop.
1732 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1733 teststring=
1734 # Add a significant safety factor because C++ compilers can tack on
1735 # massive amounts of additional arguments before passing them to the
1736 # linker. It appears as though 1/2 is a usable value.
1737 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1738 fi
1739 ;;
1740 esac
1741 ])
1742 if test -n $lt_cv_sys_max_cmd_len ; then
1743 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1744 else
1745 AC_MSG_RESULT(none)
1746 fi
1747 max_cmd_len=$lt_cv_sys_max_cmd_len
1748 _LT_DECL([], [max_cmd_len], [0],
1749 [What is the maximum length of a command?])
1750 ])# LT_CMD_MAX_LEN
1751
1752 # Old name:
1753 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
1754 dnl aclocal-1.4 backwards compatibility:
1755 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
1756
1757
1758 # _LT_HEADER_DLFCN
1759 # ----------------
1760 m4_defun([_LT_HEADER_DLFCN],
1761 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
1762 ])# _LT_HEADER_DLFCN
1763
1764
1765 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1766 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1767 # ----------------------------------------------------------------
1768 m4_defun([_LT_TRY_DLOPEN_SELF],
1769 [m4_require([_LT_HEADER_DLFCN])dnl
1770 if test "$cross_compiling" = yes; then :
1771 [$4]
1772 else
1773 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1774 lt_status=$lt_dlunknown
1775 cat > conftest.$ac_ext <<_LT_EOF
1776 [#line $LINENO "configure"
1777 #include "confdefs.h"
1778
1779 #if HAVE_DLFCN_H
1780 #include <dlfcn.h>
1781 #endif
1782
1783 #include <stdio.h>
1784
1785 #ifdef RTLD_GLOBAL
1786 # define LT_DLGLOBAL RTLD_GLOBAL
1787 #else
1788 # ifdef DL_GLOBAL
1789 # define LT_DLGLOBAL DL_GLOBAL
1790 # else
1791 # define LT_DLGLOBAL 0
1792 # endif
1793 #endif
1794
1795 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1796 find out it does not work in some platform. */
1797 #ifndef LT_DLLAZY_OR_NOW
1798 # ifdef RTLD_LAZY
1799 # define LT_DLLAZY_OR_NOW RTLD_LAZY
1800 # else
1801 # ifdef DL_LAZY
1802 # define LT_DLLAZY_OR_NOW DL_LAZY
1803 # else
1804 # ifdef RTLD_NOW
1805 # define LT_DLLAZY_OR_NOW RTLD_NOW
1806 # else
1807 # ifdef DL_NOW
1808 # define LT_DLLAZY_OR_NOW DL_NOW
1809 # else
1810 # define LT_DLLAZY_OR_NOW 0
1811 # endif
1812 # endif
1813 # endif
1814 # endif
1815 #endif
1816
1817 /* When -fvisbility=hidden is used, assume the code has been annotated
1818 correspondingly for the symbols needed. */
1819 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
1820 int fnord () __attribute__((visibility("default")));
1821 #endif
1822
1823 int fnord () { return 42; }
1824 int main ()
1825 {
1826 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1827 int status = $lt_dlunknown;
1828
1829 if (self)
1830 {
1831 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1832 else
1833 {
1834 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1835 else puts (dlerror ());
1836 }
1837 /* dlclose (self); */
1838 }
1839 else
1840 puts (dlerror ());
1841
1842 return status;
1843 }]
1844 _LT_EOF
1845 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1846 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1847 lt_status=$?
1848 case x$lt_status in
1849 x$lt_dlno_uscore) $1 ;;
1850 x$lt_dlneed_uscore) $2 ;;
1851 x$lt_dlunknown|x*) $3 ;;
1852 esac
1853 else :
1854 # compilation failed
1855 $3
1856 fi
1857 fi
1858 rm -fr conftest*
1859 ])# _LT_TRY_DLOPEN_SELF
1860
1861
1862 # LT_SYS_DLOPEN_SELF
1863 # ------------------
1864 AC_DEFUN([LT_SYS_DLOPEN_SELF],
1865 [m4_require([_LT_HEADER_DLFCN])dnl
1866 if test "x$enable_dlopen" != xyes; then
1867 enable_dlopen=unknown
1868 enable_dlopen_self=unknown
1869 enable_dlopen_self_static=unknown
1870 else
1871 lt_cv_dlopen=no
1872 lt_cv_dlopen_libs=
1873
1874 case $host_os in
1875 beos*)
1876 lt_cv_dlopen="load_add_on"
1877 lt_cv_dlopen_libs=
1878 lt_cv_dlopen_self=yes
1879 ;;
1880
1881 mingw* | pw32* | cegcc*)
1882 lt_cv_dlopen="LoadLibrary"
1883 lt_cv_dlopen_libs=
1884 ;;
1885
1886 cygwin*)
1887 lt_cv_dlopen="dlopen"
1888 lt_cv_dlopen_libs=
1889 ;;
1890
1891 darwin*)
1892 # if libdl is installed we need to link against it
1893 AC_CHECK_LIB([dl], [dlopen],
1894 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1895 lt_cv_dlopen="dyld"
1896 lt_cv_dlopen_libs=
1897 lt_cv_dlopen_self=yes
1898 ])
1899 ;;
1900
1901 *)
1902 AC_CHECK_FUNC([shl_load],
1903 [lt_cv_dlopen="shl_load"],
1904 [AC_CHECK_LIB([dld], [shl_load],
1905 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
1906 [AC_CHECK_FUNC([dlopen],
1907 [lt_cv_dlopen="dlopen"],
1908 [AC_CHECK_LIB([dl], [dlopen],
1909 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1910 [AC_CHECK_LIB([svld], [dlopen],
1911 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1912 [AC_CHECK_LIB([dld], [dld_link],
1913 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
1914 ])
1915 ])
1916 ])
1917 ])
1918 ])
1919 ;;
1920 esac
1921
1922 if test "x$lt_cv_dlopen" != xno; then
1923 enable_dlopen=yes
1924 else
1925 enable_dlopen=no
1926 fi
1927
1928 case $lt_cv_dlopen in
1929 dlopen)
1930 save_CPPFLAGS="$CPPFLAGS"
1931 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1932
1933 save_LDFLAGS="$LDFLAGS"
1934 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1935
1936 save_LIBS="$LIBS"
1937 LIBS="$lt_cv_dlopen_libs $LIBS"
1938
1939 AC_CACHE_CHECK([whether a program can dlopen itself],
1940 lt_cv_dlopen_self, [dnl
1941 _LT_TRY_DLOPEN_SELF(
1942 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1943 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1944 ])
1945
1946 if test "x$lt_cv_dlopen_self" = xyes; then
1947 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
1948 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1949 lt_cv_dlopen_self_static, [dnl
1950 _LT_TRY_DLOPEN_SELF(
1951 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1952 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1953 ])
1954 fi
1955
1956 CPPFLAGS="$save_CPPFLAGS"
1957 LDFLAGS="$save_LDFLAGS"
1958 LIBS="$save_LIBS"
1959 ;;
1960 esac
1961
1962 case $lt_cv_dlopen_self in
1963 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1964 *) enable_dlopen_self=unknown ;;
1965 esac
1966
1967 case $lt_cv_dlopen_self_static in
1968 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1969 *) enable_dlopen_self_static=unknown ;;
1970 esac
1971 fi
1972 _LT_DECL([dlopen_support], [enable_dlopen], [0],
1973 [Whether dlopen is supported])
1974 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
1975 [Whether dlopen of programs is supported])
1976 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
1977 [Whether dlopen of statically linked programs is supported])
1978 ])# LT_SYS_DLOPEN_SELF
1979
1980 # Old name:
1981 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
1982 dnl aclocal-1.4 backwards compatibility:
1983 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
1984
1985
1986 # _LT_COMPILER_C_O([TAGNAME])
1987 # ---------------------------
1988 # Check to see if options -c and -o are simultaneously supported by compiler.
1989 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
1990 m4_defun([_LT_COMPILER_C_O],
1991 [m4_require([_LT_DECL_SED])dnl
1992 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1993 m4_require([_LT_TAG_COMPILER])dnl
1994 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1995 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1996 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1997 $RM -r conftest 2>/dev/null
1998 mkdir conftest
1999 cd conftest
2000 mkdir out
2001 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2002
2003 lt_compiler_flag="-o out/conftest2.$ac_objext"
2004 # Insert the option either (1) after the last *FLAGS variable, or
2005 # (2) before a word containing "conftest.", or (3) at the end.
2006 # Note that $ac_compile itself does not contain backslashes and begins
2007 # with a dollar sign (not a hyphen), so the echo should work correctly.
2008 lt_compile=`echo "$ac_compile" | $SED \
2009 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2010 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2011 -e 's:$: $lt_compiler_flag:'`
2012 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2013 (eval "$lt_compile" 2>out/conftest.err)
2014 ac_status=$?
2015 cat out/conftest.err >&AS_MESSAGE_LOG_FD
2016 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2017 if (exit $ac_status) && test -s out/conftest2.$ac_objext
2018 then
2019 # The compiler can only warn and ignore the option if not recognized
2020 # So say no if there are warnings
2021 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
2022 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2023 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2024 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2025 fi
2026 fi
2027 chmod u+w . 2>&AS_MESSAGE_LOG_FD
2028 $RM conftest*
2029 # SGI C++ compiler will create directory out/ii_files/ for
2030 # template instantiation
2031 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
2032 $RM out/* && rmdir out
2033 cd ..
2034 $RM -r conftest
2035 $RM conftest*
2036 ])
2037 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
2038 [Does compiler simultaneously support -c and -o options?])
2039 ])# _LT_COMPILER_C_O
2040
2041
2042 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
2043 # ----------------------------------
2044 # Check to see if we can do hard links to lock some files if needed
2045 m4_defun([_LT_COMPILER_FILE_LOCKS],
2046 [m4_require([_LT_ENABLE_LOCK])dnl
2047 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2048 _LT_COMPILER_C_O([$1])
2049
2050 hard_links="nottested"
2051 if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
2052 # do not overwrite the value of need_locks provided by the user
2053 AC_MSG_CHECKING([if we can lock with hard links])
2054 hard_links=yes
2055 $RM conftest*
2056 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2057 touch conftest.a
2058 ln conftest.a conftest.b 2>&5 || hard_links=no
2059 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2060 AC_MSG_RESULT([$hard_links])
2061 if test "$hard_links" = no; then
2062 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2063 need_locks=warn
2064 fi
2065 else
2066 need_locks=no
2067 fi
2068 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
2069 ])# _LT_COMPILER_FILE_LOCKS
2070
2071
2072 # _LT_CHECK_OBJDIR
2073 # ----------------
2074 m4_defun([_LT_CHECK_OBJDIR],
2075 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2076 [rm -f .libs 2>/dev/null
2077 mkdir .libs 2>/dev/null
2078 if test -d .libs; then
2079 lt_cv_objdir=.libs
2080 else
2081 # MS-DOS does not allow filenames that begin with a dot.
2082 lt_cv_objdir=_libs
2083 fi
2084 rmdir .libs 2>/dev/null])
2085 objdir=$lt_cv_objdir
2086 _LT_DECL([], [objdir], [0],
2087 [The name of the directory that contains temporary libtool files])dnl
2088 m4_pattern_allow([LT_OBJDIR])dnl
2089 AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
2090 [Define to the sub-directory in which libtool stores uninstalled libraries.])
2091 ])# _LT_CHECK_OBJDIR
2092
2093
2094 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
2095 # --------------------------------------
2096 # Check hardcoding attributes.
2097 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
2098 [AC_MSG_CHECKING([how to hardcode library paths into programs])
2099 _LT_TAGVAR(hardcode_action, $1)=
2100 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
2101 test -n "$_LT_TAGVAR(runpath_var, $1)" ||
2102 test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2103
2104 # We can hardcode non-existent directories.
2105 if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
2106 # If the only mechanism to avoid hardcoding is shlibpath_var, we
2107 # have to relink, otherwise we might link with an installed library
2108 # when we should be linking with a yet-to-be-installed one
2109 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2110 test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
2111 # Linking always hardcodes the temporary library directory.
2112 _LT_TAGVAR(hardcode_action, $1)=relink
2113 else
2114 # We can link without hardcoding, and we can hardcode nonexisting dirs.
2115 _LT_TAGVAR(hardcode_action, $1)=immediate
2116 fi
2117 else
2118 # We cannot hardcode anything, or else we can only hardcode existing
2119 # directories.
2120 _LT_TAGVAR(hardcode_action, $1)=unsupported
2121 fi
2122 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
2123
2124 if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
2125 test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
2126 # Fast installation is not supported
2127 enable_fast_install=no
2128 elif test "$shlibpath_overrides_runpath" = yes ||
2129 test "$enable_shared" = no; then
2130 # Fast installation is not necessary
2131 enable_fast_install=needless
2132 fi
2133 _LT_TAGDECL([], [hardcode_action], [0],
2134 [How to hardcode a shared library path into an executable])
2135 ])# _LT_LINKER_HARDCODE_LIBPATH
2136
2137
2138 # _LT_CMD_STRIPLIB
2139 # ----------------
2140 m4_defun([_LT_CMD_STRIPLIB],
2141 [m4_require([_LT_DECL_EGREP])
2142 striplib=
2143 old_striplib=
2144 AC_MSG_CHECKING([whether stripping libraries is possible])
2145 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2146 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2147 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2148 AC_MSG_RESULT([yes])
2149 else
2150 # FIXME - insert some real tests, host_os isn't really good enough
2151 case $host_os in
2152 darwin*)
2153 if test -n "$STRIP" ; then
2154 striplib="$STRIP -x"
2155 old_striplib="$STRIP -S"
2156 AC_MSG_RESULT([yes])
2157 else
2158 AC_MSG_RESULT([no])
2159 fi
2160 ;;
2161 *)
2162 AC_MSG_RESULT([no])
2163 ;;
2164 esac
2165 fi
2166 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2167 _LT_DECL([], [striplib], [1])
2168 ])# _LT_CMD_STRIPLIB
2169
2170
2171 # _LT_SYS_DYNAMIC_LINKER([TAG])
2172 # -----------------------------
2173 # PORTME Fill in your ld.so characteristics
2174 m4_defun([_LT_SYS_DYNAMIC_LINKER],
2175 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2176 m4_require([_LT_DECL_EGREP])dnl
2177 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2178 m4_require([_LT_DECL_OBJDUMP])dnl
2179 m4_require([_LT_DECL_SED])dnl
2180 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
2181 AC_MSG_CHECKING([dynamic linker characteristics])
2182 m4_if([$1],
2183 [], [
2184 if test "$GCC" = yes; then
2185 case $host_os in
2186 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2187 *) lt_awk_arg="/^libraries:/" ;;
2188 esac
2189 case $host_os in
2190 mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
2191 *) lt_sed_strip_eq="s,=/,/,g" ;;
2192 esac
2193 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
2194 case $lt_search_path_spec in
2195 *\;*)
2196 # if the path contains ";" then we assume it to be the separator
2197 # otherwise default to the standard path separator (i.e. ":") - it is
2198 # assumed that no part of a normal pathname contains ";" but that should
2199 # okay in the real world where ";" in dirpaths is itself problematic.
2200 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
2201 ;;
2202 *)
2203 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
2204 ;;
2205 esac
2206 # Ok, now we have the path, separated by spaces, we can step through it
2207 # and add multilib dir if necessary.
2208 lt_tmp_lt_search_path_spec=
2209 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2210 for lt_sys_path in $lt_search_path_spec; do
2211 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
2212 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
2213 else
2214 test -d "$lt_sys_path" && \
2215 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2216 fi
2217 done
2218 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
2219 BEGIN {RS=" "; FS="/|\n";} {
2220 lt_foo="";
2221 lt_count=0;
2222 for (lt_i = NF; lt_i > 0; lt_i--) {
2223 if ($lt_i != "" && $lt_i != ".") {
2224 if ($lt_i == "..") {
2225 lt_count++;
2226 } else {
2227 if (lt_count == 0) {
2228 lt_foo="/" $lt_i lt_foo;
2229 } else {
2230 lt_count--;
2231 }
2232 }
2233 }
2234 }
2235 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2236 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2237 }'`
2238 # AWK program above erroneously prepends '/' to C:/dos/paths
2239 # for these hosts.
2240 case $host_os in
2241 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
2242 $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
2243 esac
2244 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
2245 else
2246 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2247 fi])
2248 library_names_spec=
2249 libname_spec='lib$name'
2250 soname_spec=
2251 shrext_cmds=".so"
2252 postinstall_cmds=
2253 postuninstall_cmds=
2254 finish_cmds=
2255 finish_eval=
2256 shlibpath_var=
2257 shlibpath_overrides_runpath=unknown
2258 version_type=none
2259 dynamic_linker="$host_os ld.so"
2260 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2261 need_lib_prefix=unknown
2262 hardcode_into_libs=no
2263
2264 # when you set need_version to no, make sure it does not cause -set_version
2265 # flags to be left without arguments
2266 need_version=unknown
2267
2268 case $host_os in
2269 aix3*)
2270 version_type=linux
2271 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2272 shlibpath_var=LIBPATH
2273
2274 # AIX 3 has no versioning support, so we append a major version to the name.
2275 soname_spec='${libname}${release}${shared_ext}$major'
2276 ;;
2277
2278 aix[[4-9]]*)
2279 version_type=linux
2280 need_lib_prefix=no
2281 need_version=no
2282 hardcode_into_libs=yes
2283 if test "$host_cpu" = ia64; then
2284 # AIX 5 supports IA64
2285 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2286 shlibpath_var=LD_LIBRARY_PATH
2287 else
2288 # With GCC up to 2.95.x, collect2 would create an import file
2289 # for dependence libraries. The import file would start with
2290 # the line `#! .'. This would cause the generated library to
2291 # depend on `.', always an invalid library. This was fixed in
2292 # development snapshots of GCC prior to 3.0.
2293 case $host_os in
2294 aix4 | aix4.[[01]] | aix4.[[01]].*)
2295 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2296 echo ' yes '
2297 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
2298 :
2299 else
2300 can_build_shared=no
2301 fi
2302 ;;
2303 esac
2304 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2305 # soname into executable. Probably we can add versioning support to
2306 # collect2, so additional links can be useful in future.
2307 if test "$aix_use_runtimelinking" = yes; then
2308 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2309 # instead of lib<name>.a to let people know that these are not
2310 # typical AIX shared libraries.
2311 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2312 else
2313 # We preserve .a as extension for shared libraries through AIX4.2
2314 # and later when we are not doing run time linking.
2315 library_names_spec='${libname}${release}.a $libname.a'
2316 soname_spec='${libname}${release}${shared_ext}$major'
2317 fi
2318 shlibpath_var=LIBPATH
2319 fi
2320 ;;
2321
2322 amigaos*)
2323 case $host_cpu in
2324 powerpc)
2325 # Since July 2007 AmigaOS4 officially supports .so libraries.
2326 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2327 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2328 ;;
2329 m68k)
2330 library_names_spec='$libname.ixlibrary $libname.a'
2331 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2332 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
2333 ;;
2334 esac
2335 ;;
2336
2337 beos*)
2338 library_names_spec='${libname}${shared_ext}'
2339 dynamic_linker="$host_os ld.so"
2340 shlibpath_var=LIBRARY_PATH
2341 ;;
2342
2343 bsdi[[45]]*)
2344 version_type=linux
2345 need_version=no
2346 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2347 soname_spec='${libname}${release}${shared_ext}$major'
2348 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2349 shlibpath_var=LD_LIBRARY_PATH
2350 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2351 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2352 # the default ld.so.conf also contains /usr/contrib/lib and
2353 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2354 # libtool to hard-code these into programs
2355 ;;
2356
2357 cygwin* | mingw* | pw32* | cegcc*)
2358 version_type=windows
2359 shrext_cmds=".dll"
2360 need_version=no
2361 need_lib_prefix=no
2362
2363 case $GCC,$cc_basename in
2364 yes,*)
2365 # gcc
2366 library_names_spec='$libname.dll.a'
2367 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2368 postinstall_cmds='base_file=`basename \${file}`~
2369 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2370 dldir=$destdir/`dirname \$dlpath`~
2371 test -d \$dldir || mkdir -p \$dldir~
2372 $install_prog $dir/$dlname \$dldir/$dlname~
2373 chmod a+x \$dldir/$dlname~
2374 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2375 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2376 fi'
2377 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2378 dlpath=$dir/\$dldll~
2379 $RM \$dlpath'
2380 shlibpath_overrides_runpath=yes
2381
2382 case $host_os in
2383 cygwin*)
2384 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2385 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2386 m4_if([$1], [],[
2387 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
2388 ;;
2389 mingw* | cegcc*)
2390 # MinGW DLLs use traditional 'lib' prefix
2391 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2392 ;;
2393 pw32*)
2394 # pw32 DLLs use 'pw' prefix rather than 'lib'
2395 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2396 ;;
2397 esac
2398 dynamic_linker='Win32 ld.exe'
2399 ;;
2400
2401 *,cl*)
2402 # Native MSVC
2403 libname_spec='$name'
2404 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2405 library_names_spec='${libname}.dll.lib'
2406
2407 case $build_os in
2408 mingw*)
2409 sys_lib_search_path_spec=
2410 lt_save_ifs=$IFS
2411 IFS=';'
2412 for lt_path in $LIB
2413 do
2414 IFS=$lt_save_ifs
2415 # Let DOS variable expansion print the short 8.3 style file name.
2416 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
2417 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
2418 done
2419 IFS=$lt_save_ifs
2420 # Convert to MSYS style.
2421 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
2422 ;;
2423 cygwin*)
2424 # Convert to unix form, then to dos form, then back to unix form
2425 # but this time dos style (no spaces!) so that the unix form looks
2426 # like /cygdrive/c/PROGRA~1:/cygdr...
2427 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
2428 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
2429 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2430 ;;
2431 *)
2432 sys_lib_search_path_spec="$LIB"
2433 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2434 # It is most probably a Windows format PATH.
2435 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2436 else
2437 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2438 fi
2439 # FIXME: find the short name or the path components, as spaces are
2440 # common. (e.g. "Program Files" -> "PROGRA~1")
2441 ;;
2442 esac
2443
2444 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2445 postinstall_cmds='base_file=`basename \${file}`~
2446 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2447 dldir=$destdir/`dirname \$dlpath`~
2448 test -d \$dldir || mkdir -p \$dldir~
2449 $install_prog $dir/$dlname \$dldir/$dlname'
2450 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2451 dlpath=$dir/\$dldll~
2452 $RM \$dlpath'
2453 shlibpath_overrides_runpath=yes
2454 dynamic_linker='Win32 link.exe'
2455 ;;
2456
2457 *)
2458 # Assume MSVC wrapper
2459 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2460 dynamic_linker='Win32 ld.exe'
2461 ;;
2462 esac
2463 # FIXME: first we should search . and the directory the executable is in
2464 shlibpath_var=PATH
2465 ;;
2466
2467 darwin* | rhapsody*)
2468 dynamic_linker="$host_os dyld"
2469 version_type=darwin
2470 need_lib_prefix=no
2471 need_version=no
2472 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2473 soname_spec='${libname}${release}${major}$shared_ext'
2474 shlibpath_overrides_runpath=yes
2475 shlibpath_var=DYLD_LIBRARY_PATH
2476 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2477 m4_if([$1], [],[
2478 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2479 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2480 ;;
2481
2482 dgux*)
2483 version_type=linux
2484 need_lib_prefix=no
2485 need_version=no
2486 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2487 soname_spec='${libname}${release}${shared_ext}$major'
2488 shlibpath_var=LD_LIBRARY_PATH
2489 ;;
2490
2491 freebsd1*)
2492 dynamic_linker=no
2493 ;;
2494
2495 freebsd* | dragonfly*)
2496 # DragonFly does not have aout. When/if they implement a new
2497 # versioning mechanism, adjust this.
2498 if test -x /usr/bin/objformat; then
2499 objformat=`/usr/bin/objformat`
2500 else
2501 case $host_os in
2502 freebsd[[123]]*) objformat=aout ;;
2503 *) objformat=elf ;;
2504 esac
2505 fi
2506 version_type=freebsd-$objformat
2507 case $version_type in
2508 freebsd-elf*)
2509 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2510 need_version=no
2511 need_lib_prefix=no
2512 ;;
2513 freebsd-*)
2514 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2515 need_version=yes
2516 ;;
2517 esac
2518 shlibpath_var=LD_LIBRARY_PATH
2519 case $host_os in
2520 freebsd2*)
2521 shlibpath_overrides_runpath=yes
2522 ;;
2523 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2524 shlibpath_overrides_runpath=yes
2525 hardcode_into_libs=yes
2526 ;;
2527 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2528 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2529 shlibpath_overrides_runpath=no
2530 hardcode_into_libs=yes
2531 ;;
2532 *) # from 4.6 on, and DragonFly
2533 shlibpath_overrides_runpath=yes
2534 hardcode_into_libs=yes
2535 ;;
2536 esac
2537 ;;
2538
2539 gnu*)
2540 version_type=linux
2541 need_lib_prefix=no
2542 need_version=no
2543 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2544 soname_spec='${libname}${release}${shared_ext}$major'
2545 shlibpath_var=LD_LIBRARY_PATH
2546 hardcode_into_libs=yes
2547 ;;
2548
2549 haiku*)
2550 version_type=linux
2551 need_lib_prefix=no
2552 need_version=no
2553 dynamic_linker="$host_os runtime_loader"
2554 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2555 soname_spec='${libname}${release}${shared_ext}$major'
2556 shlibpath_var=LIBRARY_PATH
2557 shlibpath_overrides_runpath=yes
2558 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
2559 hardcode_into_libs=yes
2560 ;;
2561
2562 hpux9* | hpux10* | hpux11*)
2563 # Give a soname corresponding to the major version so that dld.sl refuses to
2564 # link against other versions.
2565 version_type=sunos
2566 need_lib_prefix=no
2567 need_version=no
2568 case $host_cpu in
2569 ia64*)
2570 shrext_cmds='.so'
2571 hardcode_into_libs=yes
2572 dynamic_linker="$host_os dld.so"
2573 shlibpath_var=LD_LIBRARY_PATH
2574 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2575 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2576 soname_spec='${libname}${release}${shared_ext}$major'
2577 if test "X$HPUX_IA64_MODE" = X32; then
2578 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2579 else
2580 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2581 fi
2582 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2583 ;;
2584 hppa*64*)
2585 shrext_cmds='.sl'
2586 hardcode_into_libs=yes
2587 dynamic_linker="$host_os dld.sl"
2588 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2589 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2590 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2591 soname_spec='${libname}${release}${shared_ext}$major'
2592 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2593 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2594 ;;
2595 *)
2596 shrext_cmds='.sl'
2597 dynamic_linker="$host_os dld.sl"
2598 shlibpath_var=SHLIB_PATH
2599 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2600 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2601 soname_spec='${libname}${release}${shared_ext}$major'
2602 ;;
2603 esac
2604 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
2605 postinstall_cmds='chmod 555 $lib'
2606 # or fails outright, so override atomically:
2607 install_override_mode=555
2608 ;;
2609
2610 interix[[3-9]]*)
2611 version_type=linux
2612 need_lib_prefix=no
2613 need_version=no
2614 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2615 soname_spec='${libname}${release}${shared_ext}$major'
2616 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2617 shlibpath_var=LD_LIBRARY_PATH
2618 shlibpath_overrides_runpath=no
2619 hardcode_into_libs=yes
2620 ;;
2621
2622 irix5* | irix6* | nonstopux*)
2623 case $host_os in
2624 nonstopux*) version_type=nonstopux ;;
2625 *)
2626 if test "$lt_cv_prog_gnu_ld" = yes; then
2627 version_type=linux
2628 else
2629 version_type=irix
2630 fi ;;
2631 esac
2632 need_lib_prefix=no
2633 need_version=no
2634 soname_spec='${libname}${release}${shared_ext}$major'
2635 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2636 case $host_os in
2637 irix5* | nonstopux*)
2638 libsuff= shlibsuff=
2639 ;;
2640 *)
2641 case $LD in # libtool.m4 will add one of these switches to LD
2642 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2643 libsuff= shlibsuff= libmagic=32-bit;;
2644 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2645 libsuff=32 shlibsuff=N32 libmagic=N32;;
2646 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2647 libsuff=64 shlibsuff=64 libmagic=64-bit;;
2648 *) libsuff= shlibsuff= libmagic=never-match;;
2649 esac
2650 ;;
2651 esac
2652 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2653 shlibpath_overrides_runpath=no
2654 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2655 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2656 hardcode_into_libs=yes
2657 ;;
2658
2659 # No shared lib support for Linux oldld, aout, or coff.
2660 linux*oldld* | linux*aout* | linux*coff*)
2661 dynamic_linker=no
2662 ;;
2663
2664 # This must be Linux ELF.
2665 linux* | k*bsd*-gnu | kopensolaris*-gnu)
2666 version_type=linux
2667 need_lib_prefix=no
2668 need_version=no
2669 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2670 soname_spec='${libname}${release}${shared_ext}$major'
2671 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2672 shlibpath_var=LD_LIBRARY_PATH
2673 shlibpath_overrides_runpath=no
2674
2675 # Some binutils ld are patched to set DT_RUNPATH
2676 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
2677 [lt_cv_shlibpath_overrides_runpath=no
2678 save_LDFLAGS=$LDFLAGS
2679 save_libdir=$libdir
2680 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
2681 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
2682 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2683 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
2684 [lt_cv_shlibpath_overrides_runpath=yes])])
2685 LDFLAGS=$save_LDFLAGS
2686 libdir=$save_libdir
2687 ])
2688 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
2689
2690 # This implies no fast_install, which is unacceptable.
2691 # Some rework will be needed to allow for fast_install
2692 # before this can be enabled.
2693 hardcode_into_libs=yes
2694
2695 # Add ABI-specific directories to the system library path.
2696 sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
2697
2698 # Append ld.so.conf contents to the search path
2699 if test -f /etc/ld.so.conf; then
2700 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
2701 sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
2702
2703 fi
2704
2705 # We used to test for /lib/ld.so.1 and disable shared libraries on
2706 # powerpc, because MkLinux only supported shared libraries with the
2707 # GNU dynamic linker. Since this was broken with cross compilers,
2708 # most powerpc-linux boxes support dynamic linking these days and
2709 # people can always --disable-shared, the test was removed, and we
2710 # assume the GNU/Linux dynamic linker is in use.
2711 dynamic_linker='GNU/Linux ld.so'
2712 ;;
2713
2714 netbsd*)
2715 version_type=sunos
2716 need_lib_prefix=no
2717 need_version=no
2718 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
2719 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2720 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2721 dynamic_linker='NetBSD (a.out) ld.so'
2722 else
2723 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2724 soname_spec='${libname}${release}${shared_ext}$major'
2725 dynamic_linker='NetBSD ld.elf_so'
2726 fi
2727 shlibpath_var=LD_LIBRARY_PATH
2728 shlibpath_overrides_runpath=yes
2729 hardcode_into_libs=yes
2730 ;;
2731
2732 newsos6)
2733 version_type=linux
2734 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2735 shlibpath_var=LD_LIBRARY_PATH
2736 shlibpath_overrides_runpath=yes
2737 ;;
2738
2739 *nto* | *qnx*)
2740 version_type=qnx
2741 need_lib_prefix=no
2742 need_version=no
2743 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2744 soname_spec='${libname}${release}${shared_ext}$major'
2745 shlibpath_var=LD_LIBRARY_PATH
2746 shlibpath_overrides_runpath=no
2747 hardcode_into_libs=yes
2748 dynamic_linker='ldqnx.so'
2749 ;;
2750
2751 openbsd*)
2752 version_type=sunos
2753 sys_lib_dlsearch_path_spec="/usr/lib"
2754 need_lib_prefix=no
2755 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
2756 case $host_os in
2757 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
2758 *) need_version=no ;;
2759 esac
2760 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2761 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2762 shlibpath_var=LD_LIBRARY_PATH
2763 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2764 case $host_os in
2765 openbsd2.[[89]] | openbsd2.[[89]].*)
2766 shlibpath_overrides_runpath=no
2767 ;;
2768 *)
2769 shlibpath_overrides_runpath=yes
2770 ;;
2771 esac
2772 else
2773 shlibpath_overrides_runpath=yes
2774 fi
2775 ;;
2776
2777 os2*)
2778 libname_spec='$name'
2779 shrext_cmds=".dll"
2780 need_lib_prefix=no
2781 library_names_spec='$libname${shared_ext} $libname.a'
2782 dynamic_linker='OS/2 ld.exe'
2783 shlibpath_var=LIBPATH
2784 ;;
2785
2786 osf3* | osf4* | osf5*)
2787 version_type=osf
2788 need_lib_prefix=no
2789 need_version=no
2790 soname_spec='${libname}${release}${shared_ext}$major'
2791 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2792 shlibpath_var=LD_LIBRARY_PATH
2793 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2794 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2795 ;;
2796
2797 rdos*)
2798 dynamic_linker=no
2799 ;;
2800
2801 solaris*)
2802 version_type=linux
2803 need_lib_prefix=no
2804 need_version=no
2805 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2806 soname_spec='${libname}${release}${shared_ext}$major'
2807 shlibpath_var=LD_LIBRARY_PATH
2808 shlibpath_overrides_runpath=yes
2809 hardcode_into_libs=yes
2810 # ldd complains unless libraries are executable
2811 postinstall_cmds='chmod +x $lib'
2812 ;;
2813
2814 sunos4*)
2815 version_type=sunos
2816 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2817 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2818 shlibpath_var=LD_LIBRARY_PATH
2819 shlibpath_overrides_runpath=yes
2820 if test "$with_gnu_ld" = yes; then
2821 need_lib_prefix=no
2822 fi
2823 need_version=yes
2824 ;;
2825
2826 sysv4 | sysv4.3*)
2827 version_type=linux
2828 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2829 soname_spec='${libname}${release}${shared_ext}$major'
2830 shlibpath_var=LD_LIBRARY_PATH
2831 case $host_vendor in
2832 sni)
2833 shlibpath_overrides_runpath=no
2834 need_lib_prefix=no
2835 runpath_var=LD_RUN_PATH
2836 ;;
2837 siemens)
2838 need_lib_prefix=no
2839 ;;
2840 motorola)
2841 need_lib_prefix=no
2842 need_version=no
2843 shlibpath_overrides_runpath=no
2844 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2845 ;;
2846 esac
2847 ;;
2848
2849 sysv4*MP*)
2850 if test -d /usr/nec ;then
2851 version_type=linux
2852 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2853 soname_spec='$libname${shared_ext}.$major'
2854 shlibpath_var=LD_LIBRARY_PATH
2855 fi
2856 ;;
2857
2858 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2859 version_type=freebsd-elf
2860 need_lib_prefix=no
2861 need_version=no
2862 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2863 soname_spec='${libname}${release}${shared_ext}$major'
2864 shlibpath_var=LD_LIBRARY_PATH
2865 shlibpath_overrides_runpath=yes
2866 hardcode_into_libs=yes
2867 if test "$with_gnu_ld" = yes; then
2868 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
2869 else
2870 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
2871 case $host_os in
2872 sco3.2v5*)
2873 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
2874 ;;
2875 esac
2876 fi
2877 sys_lib_dlsearch_path_spec='/usr/lib'
2878 ;;
2879
2880 tpf*)
2881 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
2882 version_type=linux
2883 need_lib_prefix=no
2884 need_version=no
2885 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2886 shlibpath_var=LD_LIBRARY_PATH
2887 shlibpath_overrides_runpath=no
2888 hardcode_into_libs=yes
2889 ;;
2890
2891 uts4*)
2892 version_type=linux
2893 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2894 soname_spec='${libname}${release}${shared_ext}$major'
2895 shlibpath_var=LD_LIBRARY_PATH
2896 ;;
2897
2898 *)
2899 dynamic_linker=no
2900 ;;
2901 esac
2902 AC_MSG_RESULT([$dynamic_linker])
2903 test "$dynamic_linker" = no && can_build_shared=no
2904
2905 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2906 if test "$GCC" = yes; then
2907 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2908 fi
2909
2910 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
2911 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
2912 fi
2913 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
2914 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
2915 fi
2916
2917 _LT_DECL([], [variables_saved_for_relink], [1],
2918 [Variables whose values should be saved in libtool wrapper scripts and
2919 restored at link time])
2920 _LT_DECL([], [need_lib_prefix], [0],
2921 [Do we need the "lib" prefix for modules?])
2922 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
2923 _LT_DECL([], [version_type], [0], [Library versioning type])
2924 _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
2925 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
2926 _LT_DECL([], [shlibpath_overrides_runpath], [0],
2927 [Is shlibpath searched before the hard-coded library search path?])
2928 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
2929 _LT_DECL([], [library_names_spec], [1],
2930 [[List of archive names. First name is the real one, the rest are links.
2931 The last name is the one that the linker finds with -lNAME]])
2932 _LT_DECL([], [soname_spec], [1],
2933 [[The coded name of the library, if different from the real name]])
2934 _LT_DECL([], [install_override_mode], [1],
2935 [Permission mode override for installation of shared libraries])
2936 _LT_DECL([], [postinstall_cmds], [2],
2937 [Command to use after installation of a shared archive])
2938 _LT_DECL([], [postuninstall_cmds], [2],
2939 [Command to use after uninstallation of a shared archive])
2940 _LT_DECL([], [finish_cmds], [2],
2941 [Commands used to finish a libtool library installation in a directory])
2942 _LT_DECL([], [finish_eval], [1],
2943 [[As "finish_cmds", except a single script fragment to be evaled but
2944 not shown]])
2945 _LT_DECL([], [hardcode_into_libs], [0],
2946 [Whether we should hardcode library paths into libraries])
2947 _LT_DECL([], [sys_lib_search_path_spec], [2],
2948 [Compile-time system search path for libraries])
2949 _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
2950 [Run-time system search path for libraries])
2951 ])# _LT_SYS_DYNAMIC_LINKER
2952
2953
2954 # _LT_PATH_TOOL_PREFIX(TOOL)
2955 # --------------------------
2956 # find a file program which can recognize shared library
2957 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
2958 [m4_require([_LT_DECL_EGREP])dnl
2959 AC_MSG_CHECKING([for $1])
2960 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2961 [case $MAGIC_CMD in
2962 [[\\/*] | ?:[\\/]*])
2963 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2964 ;;
2965 *)
2966 lt_save_MAGIC_CMD="$MAGIC_CMD"
2967 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2968 dnl $ac_dummy forces splitting on constant user-supplied paths.
2969 dnl POSIX.2 word splitting is done only on the output of word expansions,
2970 dnl not every word. This closes a longstanding sh security hole.
2971 ac_dummy="m4_if([$2], , $PATH, [$2])"
2972 for ac_dir in $ac_dummy; do
2973 IFS="$lt_save_ifs"
2974 test -z "$ac_dir" && ac_dir=.
2975 if test -f $ac_dir/$1; then
2976 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2977 if test -n "$file_magic_test_file"; then
2978 case $deplibs_check_method in
2979 "file_magic "*)
2980 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2981 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2982 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2983 $EGREP "$file_magic_regex" > /dev/null; then
2984 :
2985 else
2986 cat <<_LT_EOF 1>&2
2987
2988 *** Warning: the command libtool uses to detect shared libraries,
2989 *** $file_magic_cmd, produces output that libtool cannot recognize.
2990 *** The result is that libtool may fail to recognize shared libraries
2991 *** as such. This will affect the creation of libtool libraries that
2992 *** depend on shared libraries, but programs linked with such libtool
2993 *** libraries will work regardless of this problem. Nevertheless, you
2994 *** may want to report the problem to your system manager and/or to
2995 *** bug-libtool@gnu.org
2996
2997 _LT_EOF
2998 fi ;;
2999 esac
3000 fi
3001 break
3002 fi
3003 done
3004 IFS="$lt_save_ifs"
3005 MAGIC_CMD="$lt_save_MAGIC_CMD"
3006 ;;
3007 esac])
3008 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3009 if test -n "$MAGIC_CMD"; then
3010 AC_MSG_RESULT($MAGIC_CMD)
3011 else
3012 AC_MSG_RESULT(no)
3013 fi
3014 _LT_DECL([], [MAGIC_CMD], [0],
3015 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
3016 ])# _LT_PATH_TOOL_PREFIX
3017
3018 # Old name:
3019 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
3020 dnl aclocal-1.4 backwards compatibility:
3021 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
3022
3023
3024 # _LT_PATH_MAGIC
3025 # --------------
3026 # find a file program which can recognize a shared library
3027 m4_defun([_LT_PATH_MAGIC],
3028 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3029 if test -z "$lt_cv_path_MAGIC_CMD"; then
3030 if test -n "$ac_tool_prefix"; then
3031 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3032 else
3033 MAGIC_CMD=:
3034 fi
3035 fi
3036 ])# _LT_PATH_MAGIC
3037
3038
3039 # LT_PATH_LD
3040 # ----------
3041 # find the pathname to the GNU or non-GNU linker
3042 AC_DEFUN([LT_PATH_LD],
3043 [AC_REQUIRE([AC_PROG_CC])dnl
3044 AC_REQUIRE([AC_CANONICAL_HOST])dnl
3045 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3046 m4_require([_LT_DECL_SED])dnl
3047 m4_require([_LT_DECL_EGREP])dnl
3048 m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
3049
3050 AC_ARG_WITH([gnu-ld],
3051 [AS_HELP_STRING([--with-gnu-ld],
3052 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
3053 [test "$withval" = no || with_gnu_ld=yes],
3054 [with_gnu_ld=no])dnl
3055
3056 ac_prog=ld
3057 if test "$GCC" = yes; then
3058 # Check if gcc -print-prog-name=ld gives a path.
3059 AC_MSG_CHECKING([for ld used by $CC])
3060 case $host in
3061 *-*-mingw*)
3062 # gcc leaves a trailing carriage return which upsets mingw
3063 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3064 *)
3065 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3066 esac
3067 case $ac_prog in
3068 # Accept absolute paths.
3069 [[\\/]]* | ?:[[\\/]]*)
3070 re_direlt='/[[^/]][[^/]]*/\.\./'
3071 # Canonicalize the pathname of ld
3072 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
3073 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
3074 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
3075 done
3076 test -z "$LD" && LD="$ac_prog"
3077 ;;
3078 "")
3079 # If it fails, then pretend we aren't using GCC.
3080 ac_prog=ld
3081 ;;
3082 *)
3083 # If it is relative, then search for the first ld in PATH.
3084 with_gnu_ld=unknown
3085 ;;
3086 esac
3087 elif test "$with_gnu_ld" = yes; then
3088 AC_MSG_CHECKING([for GNU ld])
3089 else
3090 AC_MSG_CHECKING([for non-GNU ld])
3091 fi
3092 AC_CACHE_VAL(lt_cv_path_LD,
3093 [if test -z "$LD"; then
3094 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3095 for ac_dir in $PATH; do
3096 IFS="$lt_save_ifs"
3097 test -z "$ac_dir" && ac_dir=.
3098 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3099 lt_cv_path_LD="$ac_dir/$ac_prog"
3100 # Check to see if the program is GNU ld. I'd rather use --version,
3101 # but apparently some variants of GNU ld only accept -v.
3102 # Break only if it was the GNU/non-GNU ld that we prefer.
3103 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3104 *GNU* | *'with BFD'*)
3105 test "$with_gnu_ld" != no && break
3106 ;;
3107 *)
3108 test "$with_gnu_ld" != yes && break
3109 ;;
3110 esac
3111 fi
3112 done
3113 IFS="$lt_save_ifs"
3114 else
3115 lt_cv_path_LD="$LD" # Let the user override the test with a path.
3116 fi])
3117 LD="$lt_cv_path_LD"
3118 if test -n "$LD"; then
3119 AC_MSG_RESULT($LD)
3120 else
3121 AC_MSG_RESULT(no)
3122 fi
3123 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3124 _LT_PATH_LD_GNU
3125 AC_SUBST([LD])
3126
3127 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
3128 ])# LT_PATH_LD
3129
3130 # Old names:
3131 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
3132 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
3133 dnl aclocal-1.4 backwards compatibility:
3134 dnl AC_DEFUN([AM_PROG_LD], [])
3135 dnl AC_DEFUN([AC_PROG_LD], [])
3136
3137
3138 # _LT_PATH_LD_GNU
3139 #- --------------
3140 m4_defun([_LT_PATH_LD_GNU],
3141 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3142 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
3143 case `$LD -v 2>&1 </dev/null` in
3144 *GNU* | *'with BFD'*)
3145 lt_cv_prog_gnu_ld=yes
3146 ;;
3147 *)
3148 lt_cv_prog_gnu_ld=no
3149 ;;
3150 esac])
3151 with_gnu_ld=$lt_cv_prog_gnu_ld
3152 ])# _LT_PATH_LD_GNU
3153
3154
3155 # _LT_CMD_RELOAD
3156 # --------------
3157 # find reload flag for linker
3158 # -- PORTME Some linkers may need a different reload flag.
3159 m4_defun([_LT_CMD_RELOAD],
3160 [AC_CACHE_CHECK([for $LD option to reload object files],
3161 lt_cv_ld_reload_flag,
3162 [lt_cv_ld_reload_flag='-r'])
3163 reload_flag=$lt_cv_ld_reload_flag
3164 case $reload_flag in
3165 "" | " "*) ;;
3166 *) reload_flag=" $reload_flag" ;;
3167 esac
3168 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3169 case $host_os in
3170 cygwin* | mingw* | pw32* | cegcc*)
3171 if test "$GCC" != yes; then
3172 reload_cmds=false
3173 fi
3174 ;;
3175 darwin*)
3176 if test "$GCC" = yes; then
3177 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
3178 else
3179 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3180 fi
3181 ;;
3182 esac
3183 _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
3184 _LT_TAGDECL([], [reload_cmds], [2])dnl
3185 ])# _LT_CMD_RELOAD
3186
3187
3188 # _LT_CHECK_MAGIC_METHOD
3189 # ----------------------
3190 # how to check for library dependencies
3191 # -- PORTME fill in with the dynamic library characteristics
3192 m4_defun([_LT_CHECK_MAGIC_METHOD],
3193 [m4_require([_LT_DECL_EGREP])
3194 m4_require([_LT_DECL_OBJDUMP])
3195 AC_CACHE_CHECK([how to recognize dependent libraries],
3196 lt_cv_deplibs_check_method,
3197 [lt_cv_file_magic_cmd='$MAGIC_CMD'
3198 lt_cv_file_magic_test_file=
3199 lt_cv_deplibs_check_method='unknown'
3200 # Need to set the preceding variable on all platforms that support
3201 # interlibrary dependencies.
3202 # 'none' -- dependencies not supported.
3203 # `unknown' -- same as none, but documents that we really don't know.
3204 # 'pass_all' -- all dependencies passed with no checks.
3205 # 'test_compile' -- check by making test program.
3206 # 'file_magic [[regex]]' -- check by looking for files in library path
3207 # which responds to the $file_magic_cmd with a given extended regex.
3208 # If you have `file' or equivalent on your system and you're not sure
3209 # whether `pass_all' will *always* work, you probably want this one.
3210
3211 case $host_os in
3212 aix[[4-9]]*)
3213 lt_cv_deplibs_check_method=pass_all
3214 ;;
3215
3216 beos*)
3217 lt_cv_deplibs_check_method=pass_all
3218 ;;
3219
3220 bsdi[[45]]*)
3221 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3222 lt_cv_file_magic_cmd='/usr/bin/file -L'
3223 lt_cv_file_magic_test_file=/shlib/libc.so
3224 ;;
3225
3226 cygwin*)
3227 # func_win32_libid is a shell function defined in ltmain.sh
3228 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3229 lt_cv_file_magic_cmd='func_win32_libid'
3230 ;;
3231
3232 mingw* | pw32*)
3233 # Base MSYS/MinGW do not provide the 'file' command needed by
3234 # func_win32_libid shell function, so use a weaker test based on 'objdump',
3235 # unless we find 'file', for example because we are cross-compiling.
3236 # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
3237 if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
3238 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3239 lt_cv_file_magic_cmd='func_win32_libid'
3240 else
3241 # Keep this pattern in sync with the one in func_win32_libid.
3242 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
3243 lt_cv_file_magic_cmd='$OBJDUMP -f'
3244 fi
3245 ;;
3246
3247 cegcc*)
3248 # use the weaker test based on 'objdump'. See mingw*.
3249 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3250 lt_cv_file_magic_cmd='$OBJDUMP -f'
3251 ;;
3252
3253 darwin* | rhapsody*)
3254 lt_cv_deplibs_check_method=pass_all
3255 ;;
3256
3257 freebsd* | dragonfly*)
3258 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3259 case $host_cpu in
3260 i*86 )
3261 # Not sure whether the presence of OpenBSD here was a mistake.
3262 # Let's accept both of them until this is cleared up.
3263 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3264 lt_cv_file_magic_cmd=/usr/bin/file
3265 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3266 ;;
3267 esac
3268 else
3269 lt_cv_deplibs_check_method=pass_all
3270 fi
3271 ;;
3272
3273 gnu*)
3274 lt_cv_deplibs_check_method=pass_all
3275 ;;
3276
3277 haiku*)
3278 lt_cv_deplibs_check_method=pass_all
3279 ;;
3280
3281 hpux10.20* | hpux11*)
3282 lt_cv_file_magic_cmd=/usr/bin/file
3283 case $host_cpu in
3284 ia64*)
3285 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3286 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3287 ;;
3288 hppa*64*)
3289 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
3290 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3291 ;;
3292 *)
3293 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
3294 lt_cv_file_magic_test_file=/usr/lib/libc.sl
3295 ;;
3296 esac
3297 ;;
3298
3299 interix[[3-9]]*)
3300 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3301 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3302 ;;
3303
3304 irix5* | irix6* | nonstopux*)
3305 case $LD in
3306 *-32|*"-32 ") libmagic=32-bit;;
3307 *-n32|*"-n32 ") libmagic=N32;;
3308 *-64|*"-64 ") libmagic=64-bit;;
3309 *) libmagic=never-match;;
3310 esac
3311 lt_cv_deplibs_check_method=pass_all
3312 ;;
3313
3314 # This must be Linux ELF.
3315 linux* | k*bsd*-gnu | kopensolaris*-gnu)
3316 lt_cv_deplibs_check_method=pass_all
3317 ;;
3318
3319 netbsd*)
3320 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3321 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3322 else
3323 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3324 fi
3325 ;;
3326
3327 newos6*)
3328 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3329 lt_cv_file_magic_cmd=/usr/bin/file
3330 lt_cv_file_magic_test_file=/usr/lib/libnls.so
3331 ;;
3332
3333 *nto* | *qnx*)
3334 lt_cv_deplibs_check_method=pass_all
3335 ;;
3336
3337 openbsd*)
3338 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3339 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3340 else
3341 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3342 fi
3343 ;;
3344
3345 osf3* | osf4* | osf5*)
3346 lt_cv_deplibs_check_method=pass_all
3347 ;;
3348
3349 rdos*)
3350 lt_cv_deplibs_check_method=pass_all
3351 ;;
3352
3353 solaris*)
3354 lt_cv_deplibs_check_method=pass_all
3355 ;;
3356
3357 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3358 lt_cv_deplibs_check_method=pass_all
3359 ;;
3360
3361 sysv4 | sysv4.3*)
3362 case $host_vendor in
3363 motorola)
3364 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
3365 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3366 ;;
3367 ncr)
3368 lt_cv_deplibs_check_method=pass_all
3369 ;;
3370 sequent)
3371 lt_cv_file_magic_cmd='/bin/file'
3372 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3373 ;;
3374 sni)
3375 lt_cv_file_magic_cmd='/bin/file'
3376 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3377 lt_cv_file_magic_test_file=/lib/libc.so
3378 ;;
3379 siemens)
3380 lt_cv_deplibs_check_method=pass_all
3381 ;;
3382 pc)
3383 lt_cv_deplibs_check_method=pass_all
3384 ;;
3385 esac
3386 ;;
3387
3388 tpf*)
3389 lt_cv_deplibs_check_method=pass_all
3390 ;;
3391 esac
3392 ])
3393
3394 file_magic_glob=
3395 want_nocaseglob=no
3396 if test "$build" = "$host"; then
3397 case $host_os in
3398 mingw* | pw32*)
3399 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
3400 want_nocaseglob=yes
3401 else
3402 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
3403 fi
3404 ;;
3405 esac
3406 fi
3407
3408 file_magic_cmd=$lt_cv_file_magic_cmd
3409 deplibs_check_method=$lt_cv_deplibs_check_method
3410 test -z "$deplibs_check_method" && deplibs_check_method=unknown
3411
3412 _LT_DECL([], [deplibs_check_method], [1],
3413 [Method to check whether dependent libraries are shared objects])
3414 _LT_DECL([], [file_magic_cmd], [1],
3415 [Command to use when deplibs_check_method = "file_magic"])
3416 _LT_DECL([], [file_magic_glob], [1],
3417 [How to find potential files when deplibs_check_method = "file_magic"])
3418 _LT_DECL([], [want_nocaseglob], [1],
3419 [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
3420 ])# _LT_CHECK_MAGIC_METHOD
3421
3422
3423 # LT_PATH_NM
3424 # ----------
3425 # find the pathname to a BSD- or MS-compatible name lister
3426 AC_DEFUN([LT_PATH_NM],
3427 [AC_REQUIRE([AC_PROG_CC])dnl
3428 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
3429 [if test -n "$NM"; then
3430 # Let the user override the test.
3431 lt_cv_path_NM="$NM"
3432 else
3433 lt_nm_to_check="${ac_tool_prefix}nm"
3434 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3435 lt_nm_to_check="$lt_nm_to_check nm"
3436 fi
3437 for lt_tmp_nm in $lt_nm_to_check; do
3438 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3439 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3440 IFS="$lt_save_ifs"
3441 test -z "$ac_dir" && ac_dir=.
3442 tmp_nm="$ac_dir/$lt_tmp_nm"
3443 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3444 # Check to see if the nm accepts a BSD-compat flag.
3445 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3446 # nm: unknown option "B" ignored
3447 # Tru64's nm complains that /dev/null is an invalid object file
3448 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3449 */dev/null* | *'Invalid file or object type'*)
3450 lt_cv_path_NM="$tmp_nm -B"
3451 break
3452 ;;
3453 *)
3454 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3455 */dev/null*)
3456 lt_cv_path_NM="$tmp_nm -p"
3457 break
3458 ;;
3459 *)
3460 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3461 continue # so that we can try to find one that supports BSD flags
3462 ;;
3463 esac
3464 ;;
3465 esac
3466 fi
3467 done
3468 IFS="$lt_save_ifs"
3469 done
3470 : ${lt_cv_path_NM=no}
3471 fi])
3472 if test "$lt_cv_path_NM" != "no"; then
3473 NM="$lt_cv_path_NM"
3474 else
3475 # Didn't find any BSD compatible name lister, look for dumpbin.
3476 if test -n "$DUMPBIN"; then :
3477 # Let the user override the test.
3478 else
3479 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
3480 case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
3481 *COFF*)
3482 DUMPBIN="$DUMPBIN -symbols"
3483 ;;
3484 *)
3485 DUMPBIN=:
3486 ;;
3487 esac
3488 fi
3489 AC_SUBST([DUMPBIN])
3490 if test "$DUMPBIN" != ":"; then
3491 NM="$DUMPBIN"
3492 fi
3493 fi
3494 test -z "$NM" && NM=nm
3495 AC_SUBST([NM])
3496 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3497
3498 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3499 [lt_cv_nm_interface="BSD nm"
3500 echo "int some_variable = 0;" > conftest.$ac_ext
3501 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3502 (eval "$ac_compile" 2>conftest.err)
3503 cat conftest.err >&AS_MESSAGE_LOG_FD
3504 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3505 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3506 cat conftest.err >&AS_MESSAGE_LOG_FD
3507 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
3508 cat conftest.out >&AS_MESSAGE_LOG_FD
3509 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3510 lt_cv_nm_interface="MS dumpbin"
3511 fi
3512 rm -f conftest*])
3513 ])# LT_PATH_NM
3514
3515 # Old names:
3516 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3517 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3518 dnl aclocal-1.4 backwards compatibility:
3519 dnl AC_DEFUN([AM_PROG_NM], [])
3520 dnl AC_DEFUN([AC_PROG_NM], [])
3521
3522 # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3523 # --------------------------------
3524 # how to determine the name of the shared library
3525 # associated with a specific link library.
3526 # -- PORTME fill in with the dynamic library characteristics
3527 m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
3528 [m4_require([_LT_DECL_EGREP])
3529 m4_require([_LT_DECL_OBJDUMP])
3530 m4_require([_LT_DECL_DLLTOOL])
3531 AC_CACHE_CHECK([how to associate runtime and link libraries],
3532 lt_cv_sharedlib_from_linklib_cmd,
3533 [lt_cv_sharedlib_from_linklib_cmd='unknown'
3534
3535 case $host_os in
3536 cygwin* | mingw* | pw32* | cegcc*)
3537 # two different shell functions defined in ltmain.sh
3538 # decide which to use based on capabilities of $DLLTOOL
3539 case `$DLLTOOL --help 2>&1` in
3540 *--identify-strict*)
3541 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
3542 ;;
3543 *)
3544 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
3545 ;;
3546 esac
3547 ;;
3548 *)
3549 # fallback: assume linklib IS sharedlib
3550 lt_cv_sharedlib_from_linklib_cmd="$ECHO"
3551 ;;
3552 esac
3553 ])
3554 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
3555 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
3556
3557 _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
3558 [Command to associate shared and link libraries])
3559 ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3560
3561
3562 # _LT_PATH_MANIFEST_TOOL
3563 # ----------------------
3564 # locate the manifest tool
3565 m4_defun([_LT_PATH_MANIFEST_TOOL],
3566 [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
3567 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
3568 AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
3569 [lt_cv_path_mainfest_tool=no
3570 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
3571 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
3572 cat conftest.err >&AS_MESSAGE_LOG_FD
3573 if $GREP 'Manifest Tool' conftest.out > /dev/null; then
3574 lt_cv_path_mainfest_tool=yes
3575 fi
3576 rm -f conftest*])
3577 if test "x$lt_cv_path_mainfest_tool" != xyes; then
3578 MANIFEST_TOOL=:
3579 fi
3580 _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
3581 ])# _LT_PATH_MANIFEST_TOOL
3582
3583
3584 # LT_LIB_M
3585 # --------
3586 # check for math library
3587 AC_DEFUN([LT_LIB_M],
3588 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3589 LIBM=
3590 case $host in
3591 *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
3592 # These system don't have libm, or don't need it
3593 ;;
3594 *-ncr-sysv4.3*)
3595 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3596 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3597 ;;
3598 *)
3599 AC_CHECK_LIB(m, cos, LIBM="-lm")
3600 ;;
3601 esac
3602 AC_SUBST([LIBM])
3603 ])# LT_LIB_M
3604
3605 # Old name:
3606 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
3607 dnl aclocal-1.4 backwards compatibility:
3608 dnl AC_DEFUN([AC_CHECK_LIBM], [])
3609
3610
3611 # _LT_COMPILER_NO_RTTI([TAGNAME])
3612 # -------------------------------
3613 m4_defun([_LT_COMPILER_NO_RTTI],
3614 [m4_require([_LT_TAG_COMPILER])dnl
3615
3616 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3617
3618 if test "$GCC" = yes; then
3619 case $cc_basename in
3620 nvcc*)
3621 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
3622 *)
3623 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
3624 esac
3625
3626 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3627 lt_cv_prog_compiler_rtti_exceptions,
3628 [-fno-rtti -fno-exceptions], [],
3629 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3630 fi
3631 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
3632 [Compiler flag to turn off builtin functions])
3633 ])# _LT_COMPILER_NO_RTTI
3634
3635
3636 # _LT_CMD_GLOBAL_SYMBOLS
3637 # ----------------------
3638 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
3639 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3640 AC_REQUIRE([AC_PROG_CC])dnl
3641 AC_REQUIRE([AC_PROG_AWK])dnl
3642 AC_REQUIRE([LT_PATH_NM])dnl
3643 AC_REQUIRE([LT_PATH_LD])dnl
3644 m4_require([_LT_DECL_SED])dnl
3645 m4_require([_LT_DECL_EGREP])dnl
3646 m4_require([_LT_TAG_COMPILER])dnl
3647
3648 # Check for command to grab the raw symbol name followed by C symbol from nm.
3649 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
3650 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
3651 [
3652 # These are sane defaults that work on at least a few old systems.
3653 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
3654
3655 # Character class describing NM global symbol codes.
3656 symcode='[[BCDEGRST]]'
3657
3658 # Regexp to match symbols that can be accessed directly from C.
3659 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
3660
3661 # Define system-specific variables.
3662 case $host_os in
3663 aix*)
3664 symcode='[[BCDT]]'
3665 ;;
3666 cygwin* | mingw* | pw32* | cegcc*)
3667 symcode='[[ABCDGISTW]]'
3668 ;;
3669 hpux*)
3670 if test "$host_cpu" = ia64; then
3671 symcode='[[ABCDEGRST]]'
3672 fi
3673 ;;
3674 irix* | nonstopux*)
3675 symcode='[[BCDEGRST]]'
3676 ;;
3677 osf*)
3678 symcode='[[BCDEGQRST]]'
3679 ;;
3680 solaris*)
3681 symcode='[[BDRT]]'
3682 ;;
3683 sco3.2v5*)
3684 symcode='[[DT]]'
3685 ;;
3686 sysv4.2uw2*)
3687 symcode='[[DT]]'
3688 ;;
3689 sysv5* | sco5v6* | unixware* | OpenUNIX*)
3690 symcode='[[ABDT]]'
3691 ;;
3692 sysv4)
3693 symcode='[[DFNSTU]]'
3694 ;;
3695 esac
3696
3697 # If we're using GNU nm, then use its standard symbol codes.
3698 case `$NM -V 2>&1` in
3699 *GNU* | *'with BFD'*)
3700 symcode='[[ABCDGIRSTW]]' ;;
3701 esac
3702
3703 # Transform an extracted symbol line into a proper C declaration.
3704 # Some systems (esp. on ia64) link data and code symbols differently,
3705 # so use this general approach.
3706 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3707
3708 # Transform an extracted symbol line into symbol name and symbol address
3709 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
3710 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
3711
3712 # Handle CRLF in mingw tool chain
3713 opt_cr=
3714 case $build_os in
3715 mingw*)
3716 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3717 ;;
3718 esac
3719
3720 # Try without a prefix underscore, then with it.
3721 for ac_symprfx in "" "_"; do
3722
3723 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
3724 symxfrm="\\1 $ac_symprfx\\2 \\2"
3725
3726 # Write the raw and C identifiers.
3727 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3728 # Fake it for dumpbin and say T for any non-static function
3729 # and D for any global variable.
3730 # Also find C++ and __fastcall symbols from MSVC++,
3731 # which start with @ or ?.
3732 lt_cv_sys_global_symbol_pipe="$AWK ['"\
3733 " {last_section=section; section=\$ 3};"\
3734 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
3735 " \$ 0!~/External *\|/{next};"\
3736 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
3737 " {if(hide[section]) next};"\
3738 " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
3739 " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
3740 " s[1]~/^[@?]/{print s[1], s[1]; next};"\
3741 " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
3742 " ' prfx=^$ac_symprfx]"
3743 else
3744 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
3745 fi
3746 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
3747
3748 # Check to see that the pipe works correctly.
3749 pipe_works=no
3750
3751 rm -f conftest*
3752 cat > conftest.$ac_ext <<_LT_EOF
3753 #ifdef __cplusplus
3754 extern "C" {
3755 #endif
3756 char nm_test_var;
3757 void nm_test_func(void);
3758 void nm_test_func(void){}
3759 #ifdef __cplusplus
3760 }
3761 #endif
3762 int main(){nm_test_var='a';nm_test_func();return(0);}
3763 _LT_EOF
3764
3765 if AC_TRY_EVAL(ac_compile); then
3766 # Now try to grab the symbols.
3767 nlist=conftest.nm
3768 if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
3769 # Try sorting and uniquifying the output.
3770 if sort "$nlist" | uniq > "$nlist"T; then
3771 mv -f "$nlist"T "$nlist"
3772 else
3773 rm -f "$nlist"T
3774 fi
3775
3776 # Make sure that we snagged all the symbols we need.
3777 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
3778 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
3779 cat <<_LT_EOF > conftest.$ac_ext
3780 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
3781 #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
3782 /* DATA imports from DLLs on WIN32 con't be const, because runtime
3783 relocations are performed -- see ld's documentation on pseudo-relocs. */
3784 # define LT@&t@_DLSYM_CONST
3785 #elif defined(__osf__)
3786 /* This system does not cope well with relocations in const data. */
3787 # define LT@&t@_DLSYM_CONST
3788 #else
3789 # define LT@&t@_DLSYM_CONST const
3790 #endif
3791
3792 #ifdef __cplusplus
3793 extern "C" {
3794 #endif
3795
3796 _LT_EOF
3797 # Now generate the symbol file.
3798 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
3799
3800 cat <<_LT_EOF >> conftest.$ac_ext
3801
3802 /* The mapping between symbol names and symbols. */
3803 LT@&t@_DLSYM_CONST struct {
3804 const char *name;
3805 void *address;
3806 }
3807 lt__PROGRAM__LTX_preloaded_symbols[[]] =
3808 {
3809 { "@PROGRAM@", (void *) 0 },
3810 _LT_EOF
3811 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
3812 cat <<\_LT_EOF >> conftest.$ac_ext
3813 {0, (void *) 0}
3814 };
3815
3816 /* This works around a problem in FreeBSD linker */
3817 #ifdef FREEBSD_WORKAROUND
3818 static const void *lt_preloaded_setup() {
3819 return lt__PROGRAM__LTX_preloaded_symbols;
3820 }
3821 #endif
3822
3823 #ifdef __cplusplus
3824 }
3825 #endif
3826 _LT_EOF
3827 # Now try linking the two files.
3828 mv conftest.$ac_objext conftstm.$ac_objext
3829 lt_globsym_save_LIBS=$LIBS
3830 lt_globsym_save_CFLAGS=$CFLAGS
3831 LIBS="conftstm.$ac_objext"
3832 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
3833 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
3834 pipe_works=yes
3835 fi
3836 LIBS=$lt_globsym_save_LIBS
3837 CFLAGS=$lt_globsym_save_CFLAGS
3838 else
3839 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
3840 fi
3841 else
3842 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
3843 fi
3844 else
3845 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
3846 fi
3847 else
3848 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
3849 cat conftest.$ac_ext >&5
3850 fi
3851 rm -rf conftest* conftst*
3852
3853 # Do not use the global_symbol_pipe unless it works.
3854 if test "$pipe_works" = yes; then
3855 break
3856 else
3857 lt_cv_sys_global_symbol_pipe=
3858 fi
3859 done
3860 ])
3861 if test -z "$lt_cv_sys_global_symbol_pipe"; then
3862 lt_cv_sys_global_symbol_to_cdecl=
3863 fi
3864 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
3865 AC_MSG_RESULT(failed)
3866 else
3867 AC_MSG_RESULT(ok)
3868 fi
3869
3870 # Response file support.
3871 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3872 nm_file_list_spec='@'
3873 elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
3874 nm_file_list_spec='@'
3875 fi
3876
3877 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
3878 [Take the output of nm and produce a listing of raw symbols and C names])
3879 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
3880 [Transform the output of nm in a proper C declaration])
3881 _LT_DECL([global_symbol_to_c_name_address],
3882 [lt_cv_sys_global_symbol_to_c_name_address], [1],
3883 [Transform the output of nm in a C name address pair])
3884 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
3885 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
3886 [Transform the output of nm in a C name address pair when lib prefix is needed])
3887 _LT_DECL([], [nm_file_list_spec], [1],
3888 [Specify filename containing input files for $NM])
3889 ]) # _LT_CMD_GLOBAL_SYMBOLS
3890
3891
3892 # _LT_COMPILER_PIC([TAGNAME])
3893 # ---------------------------
3894 m4_defun([_LT_COMPILER_PIC],
3895 [m4_require([_LT_TAG_COMPILER])dnl
3896 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
3897 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3898 _LT_TAGVAR(lt_prog_compiler_static, $1)=
3899
3900 m4_if([$1], [CXX], [
3901 # C++ specific cases for pic, static, wl, etc.
3902 if test "$GXX" = yes; then
3903 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3904 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3905
3906 case $host_os in
3907 aix*)
3908 # All AIX code is PIC.
3909 if test "$host_cpu" = ia64; then
3910 # AIX 5 now supports IA64 processor
3911 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3912 fi
3913 ;;
3914
3915 amigaos*)
3916 case $host_cpu in
3917 powerpc)
3918 # see comment about AmigaOS4 .so support
3919 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3920 ;;
3921 m68k)
3922 # FIXME: we need at least 68020 code to build shared libraries, but
3923 # adding the `-m68020' flag to GCC prevents building anything better,
3924 # like `-m68040'.
3925 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3926 ;;
3927 esac
3928 ;;
3929
3930 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3931 # PIC is the default for these OSes.
3932 ;;
3933 mingw* | cygwin* | os2* | pw32* | cegcc*)
3934 # This hack is so that the source file can tell whether it is being
3935 # built for inclusion in a dll (and should export symbols for example).
3936 # Although the cygwin gcc ignores -fPIC, still need this for old-style
3937 # (--disable-auto-import) libraries
3938 m4_if([$1], [GCJ], [],
3939 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3940 ;;
3941 darwin* | rhapsody*)
3942 # PIC is the default on this platform
3943 # Common symbols not allowed in MH_DYLIB files
3944 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
3945 ;;
3946 *djgpp*)
3947 # DJGPP does not support shared libraries at all
3948 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3949 ;;
3950 haiku*)
3951 # PIC is the default for Haiku.
3952 # The "-static" flag exists, but is broken.
3953 _LT_TAGVAR(lt_prog_compiler_static, $1)=
3954 ;;
3955 interix[[3-9]]*)
3956 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
3957 # Instead, we relocate shared libraries at runtime.
3958 ;;
3959 sysv4*MP*)
3960 if test -d /usr/nec; then
3961 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
3962 fi
3963 ;;
3964 hpux*)
3965 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
3966 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
3967 # sets the default TLS model and affects inlining.
3968 case $host_cpu in
3969 hppa*64*)
3970 ;;
3971 *)
3972 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3973 ;;
3974 esac
3975 ;;
3976 *qnx* | *nto*)
3977 # QNX uses GNU C++, but need to define -shared option too, otherwise
3978 # it will coredump.
3979 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3980 ;;
3981 *)
3982 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3983 ;;
3984 esac
3985 else
3986 case $host_os in
3987 aix[[4-9]]*)
3988 # All AIX code is PIC.
3989 if test "$host_cpu" = ia64; then
3990 # AIX 5 now supports IA64 processor
3991 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3992 else
3993 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
3994 fi
3995 ;;
3996 chorus*)
3997 case $cc_basename in
3998 cxch68*)
3999 # Green Hills C++ Compiler
4000 # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
4001 ;;
4002 esac
4003 ;;
4004 mingw* | cygwin* | os2* | pw32* | cegcc*)
4005 # This hack is so that the source file can tell whether it is being
4006 # built for inclusion in a dll (and should export symbols for example).
4007 m4_if([$1], [GCJ], [],
4008 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4009 ;;
4010 dgux*)
4011 case $cc_basename in
4012 ec++*)
4013 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4014 ;;
4015 ghcx*)
4016 # Green Hills C++ Compiler
4017 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4018 ;;
4019 *)
4020 ;;
4021 esac
4022 ;;
4023 freebsd* | dragonfly*)
4024 # FreeBSD uses GNU C++
4025 ;;
4026 hpux9* | hpux10* | hpux11*)
4027 case $cc_basename in
4028 CC*)
4029 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4030 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4031 if test "$host_cpu" != ia64; then
4032 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4033 fi
4034 ;;
4035 aCC*)
4036 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4037 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4038 case $host_cpu in
4039 hppa*64*|ia64*)
4040 # +Z the default
4041 ;;
4042 *)
4043 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4044 ;;
4045 esac
4046 ;;
4047 *)
4048 ;;
4049 esac
4050 ;;
4051 interix*)
4052 # This is c89, which is MS Visual C++ (no shared libs)
4053 # Anyone wants to do a port?
4054 ;;
4055 irix5* | irix6* | nonstopux*)
4056 case $cc_basename in
4057 CC*)
4058 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4059 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4060 # CC pic flag -KPIC is the default.
4061 ;;
4062 *)
4063 ;;
4064 esac
4065 ;;
4066 linux* | k*bsd*-gnu | kopensolaris*-gnu)
4067 case $cc_basename in
4068 KCC*)
4069 # KAI C++ Compiler
4070 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4071 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4072 ;;
4073 ecpc* )
4074 # old Intel C++ for x86_64 which still supported -KPIC.
4075 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4076 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4077 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4078 ;;
4079 icpc* )
4080 # Intel C++, used to be incompatible with GCC.
4081 # ICC 10 doesn't accept -KPIC any more.
4082 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4083 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4084 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4085 ;;
4086 pgCC* | pgcpp*)
4087 # Portland Group C++ compiler
4088 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4089 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4090 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4091 ;;
4092 cxx*)
4093 # Compaq C++
4094 # Make sure the PIC flag is empty. It appears that all Alpha
4095 # Linux and Compaq Tru64 Unix objects are PIC.
4096 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4097 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4098 ;;
4099 xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
4100 # IBM XL 8.0, 9.0 on PPC and BlueGene
4101 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4102 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4103 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4104 ;;
4105 *)
4106 case `$CC -V 2>&1 | sed 5q` in
4107 *Sun\ C*)
4108 # Sun C++ 5.9
4109 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4110 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4111 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4112 ;;
4113 esac
4114 ;;
4115 esac
4116 ;;
4117 lynxos*)
4118 ;;
4119 m88k*)
4120 ;;
4121 mvs*)
4122 case $cc_basename in
4123 cxx*)
4124 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4125 ;;
4126 *)
4127 ;;
4128 esac
4129 ;;
4130 netbsd*)
4131 ;;
4132 *qnx* | *nto*)
4133 # QNX uses GNU C++, but need to define -shared option too, otherwise
4134 # it will coredump.
4135 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4136 ;;
4137 osf3* | osf4* | osf5*)
4138 case $cc_basename in
4139 KCC*)
4140 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4141 ;;
4142 RCC*)
4143 # Rational C++ 2.4.1
4144 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4145 ;;
4146 cxx*)
4147 # Digital/Compaq C++
4148 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4149 # Make sure the PIC flag is empty. It appears that all Alpha
4150 # Linux and Compaq Tru64 Unix objects are PIC.
4151 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4152 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4153 ;;
4154 *)
4155 ;;
4156 esac
4157 ;;
4158 psos*)
4159 ;;
4160 solaris*)
4161 case $cc_basename in
4162 CC* | sunCC*)
4163 # Sun C++ 4.2, 5.x and Centerline C++
4164 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4165 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4166 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4167 ;;
4168 gcx*)
4169 # Green Hills C++ Compiler
4170 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4171 ;;
4172 *)
4173 ;;
4174 esac
4175 ;;
4176 sunos4*)
4177 case $cc_basename in
4178 CC*)
4179 # Sun C++ 4.x
4180 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4181 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4182 ;;
4183 lcc*)
4184 # Lucid
4185 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4186 ;;
4187 *)
4188 ;;
4189 esac
4190 ;;
4191 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4192 case $cc_basename in
4193 CC*)
4194 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4195 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4196 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4197 ;;
4198 esac
4199 ;;
4200 tandem*)
4201 case $cc_basename in
4202 NCC*)
4203 # NonStop-UX NCC 3.20
4204 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4205 ;;
4206 *)
4207 ;;
4208 esac
4209 ;;
4210 vxworks*)
4211 ;;
4212 *)
4213 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4214 ;;
4215 esac
4216 fi
4217 ],
4218 [
4219 if test "$GCC" = yes; then
4220 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4221 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4222
4223 case $host_os in
4224 aix*)
4225 # All AIX code is PIC.
4226 if test "$host_cpu" = ia64; then
4227 # AIX 5 now supports IA64 processor
4228 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4229 fi
4230 ;;
4231
4232 amigaos*)
4233 case $host_cpu in
4234 powerpc)
4235 # see comment about AmigaOS4 .so support
4236 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4237 ;;
4238 m68k)
4239 # FIXME: we need at least 68020 code to build shared libraries, but
4240 # adding the `-m68020' flag to GCC prevents building anything better,
4241 # like `-m68040'.
4242 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4243 ;;
4244 esac
4245 ;;
4246
4247 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4248 # PIC is the default for these OSes.
4249 ;;
4250
4251 mingw* | cygwin* | pw32* | os2* | cegcc*)
4252 # This hack is so that the source file can tell whether it is being
4253 # built for inclusion in a dll (and should export symbols for example).
4254 # Although the cygwin gcc ignores -fPIC, still need this for old-style
4255 # (--disable-auto-import) libraries
4256 m4_if([$1], [GCJ], [],
4257 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4258 ;;
4259
4260 darwin* | rhapsody*)
4261 # PIC is the default on this platform
4262 # Common symbols not allowed in MH_DYLIB files
4263 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4264 ;;
4265
4266 haiku*)
4267 # PIC is the default for Haiku.
4268 # The "-static" flag exists, but is broken.
4269 _LT_TAGVAR(lt_prog_compiler_static, $1)=
4270 ;;
4271
4272 hpux*)
4273 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4274 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
4275 # sets the default TLS model and affects inlining.
4276 case $host_cpu in
4277 hppa*64*)
4278 # +Z the default
4279 ;;
4280 *)
4281 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4282 ;;
4283 esac
4284 ;;
4285
4286 interix[[3-9]]*)
4287 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4288 # Instead, we relocate shared libraries at runtime.
4289 ;;
4290
4291 msdosdjgpp*)
4292 # Just because we use GCC doesn't mean we suddenly get shared libraries
4293 # on systems that don't support them.
4294 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4295 enable_shared=no
4296 ;;
4297
4298 *nto* | *qnx*)
4299 # QNX uses GNU C++, but need to define -shared option too, otherwise
4300 # it will coredump.
4301 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4302 ;;
4303
4304 sysv4*MP*)
4305 if test -d /usr/nec; then
4306 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4307 fi
4308 ;;
4309
4310 *)
4311 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4312 ;;
4313 esac
4314
4315 case $cc_basename in
4316 nvcc*) # Cuda Compiler Driver 2.2
4317 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
4318 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC'
4319 ;;
4320 esac
4321 else
4322 # PORTME Check for flag to pass linker flags through the system compiler.
4323 case $host_os in
4324 aix*)
4325 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4326 if test "$host_cpu" = ia64; then
4327 # AIX 5 now supports IA64 processor
4328 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4329 else
4330 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4331 fi
4332 ;;
4333
4334 mingw* | cygwin* | pw32* | os2* | cegcc*)
4335 # This hack is so that the source file can tell whether it is being
4336 # built for inclusion in a dll (and should export symbols for example).
4337 m4_if([$1], [GCJ], [],
4338 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4339 ;;
4340
4341 hpux9* | hpux10* | hpux11*)
4342 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4343 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4344 # not for PA HP-UX.
4345 case $host_cpu in
4346 hppa*64*|ia64*)
4347 # +Z the default
4348 ;;
4349 *)
4350 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4351 ;;
4352 esac
4353 # Is there a better lt_prog_compiler_static that works with the bundled CC?
4354 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4355 ;;
4356
4357 irix5* | irix6* | nonstopux*)
4358 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4359 # PIC (with -KPIC) is the default.
4360 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4361 ;;
4362
4363 linux* | k*bsd*-gnu | kopensolaris*-gnu)
4364 case $cc_basename in
4365 # old Intel for x86_64 which still supported -KPIC.
4366 ecc*)
4367 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4368 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4369 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4370 ;;
4371 # icc used to be incompatible with GCC.
4372 # ICC 10 doesn't accept -KPIC any more.
4373 icc* | ifort*)
4374 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4375 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4376 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4377 ;;
4378 # Lahey Fortran 8.1.
4379 lf95*)
4380 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4381 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4382 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4383 ;;
4384 nagfor*)
4385 # NAG Fortran compiler
4386 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
4387 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4388 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4389 ;;
4390 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
4391 # Portland Group compilers (*not* the Pentium gcc compiler,
4392 # which looks to be a dead project)
4393 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4394 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4395 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4396 ;;
4397 ccc*)
4398 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4399 # All Alpha code is PIC.
4400 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4401 ;;
4402 xl* | bgxl* | bgf* | mpixl*)
4403 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
4404 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4405 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4406 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4407 ;;
4408 *)
4409 case `$CC -V 2>&1 | sed 5q` in
4410 *Sun\ F* | *Sun*Fortran*)
4411 # Sun Fortran 8.3 passes all unrecognized flags to the linker
4412 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4413 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4414 _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4415 ;;
4416 *Sun\ C*)
4417 # Sun C 5.9
4418 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4419 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4420 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4421 ;;
4422 esac
4423 ;;
4424 esac
4425 ;;
4426
4427 newsos6)
4428 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4429 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4430 ;;
4431
4432 *nto* | *qnx*)
4433 # QNX uses GNU C++, but need to define -shared option too, otherwise
4434 # it will coredump.
4435 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4436 ;;
4437
4438 osf3* | osf4* | osf5*)
4439 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4440 # All OSF/1 code is PIC.
4441 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4442 ;;
4443
4444 rdos*)
4445 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4446 ;;
4447
4448 solaris*)
4449 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4450 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4451 case $cc_basename in
4452 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
4453 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
4454 *)
4455 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
4456 esac
4457 ;;
4458
4459 sunos4*)
4460 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4461 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4462 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4463 ;;
4464
4465 sysv4 | sysv4.2uw2* | sysv4.3*)
4466 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4467 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4468 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4469 ;;
4470
4471 sysv4*MP*)
4472 if test -d /usr/nec ;then
4473 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4474 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4475 fi
4476 ;;
4477
4478 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4479 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4480 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4481 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4482 ;;
4483
4484 unicos*)
4485 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4486 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4487 ;;
4488
4489 uts4*)
4490 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4491 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4492 ;;
4493
4494 *)
4495 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4496 ;;
4497 esac
4498 fi
4499 ])
4500 case $host_os in
4501 # For platforms which do not support PIC, -DPIC is meaningless:
4502 *djgpp*)
4503 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4504 ;;
4505 *)
4506 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
4507 ;;
4508 esac
4509
4510 AC_CACHE_CHECK([for $compiler option to produce PIC],
4511 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
4512 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4513 _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
4514
4515 #
4516 # Check to make sure the PIC flag actually works.
4517 #
4518 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4519 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
4520 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
4521 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
4522 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
4523 "" | " "*) ;;
4524 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4525 esac],
4526 [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4527 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4528 fi
4529 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4530 [Additional compiler flags for building library objects])
4531
4532 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4533 [How to pass a linker flag through the compiler])
4534 #
4535 # Check to make sure the static flag actually works.
4536 #
4537 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
4538 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
4539 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
4540 $lt_tmp_static_flag,
4541 [],
4542 [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
4543 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
4544 [Compiler flag to prevent dynamic linking])
4545 ])# _LT_COMPILER_PIC
4546
4547
4548 # _LT_LINKER_SHLIBS([TAGNAME])
4549 # ----------------------------
4550 # See if the linker supports building shared libraries.
4551 m4_defun([_LT_LINKER_SHLIBS],
4552 [AC_REQUIRE([LT_PATH_LD])dnl
4553 AC_REQUIRE([LT_PATH_NM])dnl
4554 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
4555 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4556 m4_require([_LT_DECL_EGREP])dnl
4557 m4_require([_LT_DECL_SED])dnl
4558 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
4559 m4_require([_LT_TAG_COMPILER])dnl
4560 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4561 m4_if([$1], [CXX], [
4562 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4563 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4564 case $host_os in
4565 aix[[4-9]]*)
4566 # If we're using GNU nm, then we don't want the "-C" option.
4567 # -C means demangle to AIX nm, but means don't demangle with GNU nm
4568 # Also, AIX nm treats weak defined symbols like other global defined
4569 # symbols, whereas GNU nm marks them as "W".
4570 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4571 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4572 else
4573 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4574 fi
4575 ;;
4576 pw32*)
4577 _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
4578 ;;
4579 cygwin* | mingw* | cegcc*)
4580 case $cc_basename in
4581 cl*) ;;
4582 *)
4583 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
4584 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
4585 ;;
4586 esac
4587 ;;
4588 *)
4589 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4590 ;;
4591 esac
4592 ], [
4593 runpath_var=
4594 _LT_TAGVAR(allow_undefined_flag, $1)=
4595 _LT_TAGVAR(always_export_symbols, $1)=no
4596 _LT_TAGVAR(archive_cmds, $1)=
4597 _LT_TAGVAR(archive_expsym_cmds, $1)=
4598 _LT_TAGVAR(compiler_needs_object, $1)=no
4599 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4600 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4601 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4602 _LT_TAGVAR(hardcode_automatic, $1)=no
4603 _LT_TAGVAR(hardcode_direct, $1)=no
4604 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
4605 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4606 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4607 _LT_TAGVAR(hardcode_libdir_separator, $1)=
4608 _LT_TAGVAR(hardcode_minus_L, $1)=no
4609 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4610 _LT_TAGVAR(inherit_rpath, $1)=no
4611 _LT_TAGVAR(link_all_deplibs, $1)=unknown
4612 _LT_TAGVAR(module_cmds, $1)=
4613 _LT_TAGVAR(module_expsym_cmds, $1)=
4614 _LT_TAGVAR(old_archive_from_new_cmds, $1)=
4615 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4616 _LT_TAGVAR(thread_safe_flag_spec, $1)=
4617 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4618 # include_expsyms should be a list of space-separated symbols to be *always*
4619 # included in the symbol list
4620 _LT_TAGVAR(include_expsyms, $1)=
4621 # exclude_expsyms can be an extended regexp of symbols to exclude
4622 # it will be wrapped by ` (' and `)$', so one must not match beginning or
4623 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
4624 # as well as any symbol that contains `d'.
4625 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4626 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4627 # platforms (ab)use it in PIC code, but their linkers get confused if
4628 # the symbol is explicitly referenced. Since portable code cannot
4629 # rely on this symbol name, it's probably fine to never include it in
4630 # preloaded symbol tables.
4631 # Exclude shared library initialization/finalization symbols.
4632 dnl Note also adjust exclude_expsyms for C++ above.
4633 extract_expsyms_cmds=
4634
4635 case $host_os in
4636 cygwin* | mingw* | pw32* | cegcc*)
4637 # FIXME: the MSVC++ port hasn't been tested in a loooong time
4638 # When not using gcc, we currently assume that we are using
4639 # Microsoft Visual C++.
4640 if test "$GCC" != yes; then
4641 with_gnu_ld=no
4642 fi
4643 ;;
4644 interix*)
4645 # we just hope/assume this is gcc and not c89 (= MSVC++)
4646 with_gnu_ld=yes
4647 ;;
4648 openbsd*)
4649 with_gnu_ld=no
4650 ;;
4651 esac
4652
4653 _LT_TAGVAR(ld_shlibs, $1)=yes
4654
4655 # On some targets, GNU ld is compatible enough with the native linker
4656 # that we're better off using the native interface for both.
4657 lt_use_gnu_ld_interface=no
4658 if test "$with_gnu_ld" = yes; then
4659 case $host_os in
4660 aix*)
4661 # The AIX port of GNU ld has always aspired to compatibility
4662 # with the native linker. However, as the warning in the GNU ld
4663 # block says, versions before 2.19.5* couldn't really create working
4664 # shared libraries, regardless of the interface used.
4665 case `$LD -v 2>&1` in
4666 *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
4667 *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
4668 *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
4669 *)
4670 lt_use_gnu_ld_interface=yes
4671 ;;
4672 esac
4673 ;;
4674 *)
4675 lt_use_gnu_ld_interface=yes
4676 ;;
4677 esac
4678 fi
4679
4680 if test "$lt_use_gnu_ld_interface" = yes; then
4681 # If archive_cmds runs LD, not CC, wlarc should be empty
4682 wlarc='${wl}'
4683
4684 # Set some defaults for GNU ld with shared library support. These
4685 # are reset later if shared libraries are not supported. Putting them
4686 # here allows them to be overridden if necessary.
4687 runpath_var=LD_RUN_PATH
4688 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4689 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4690 # ancient GNU ld didn't support --whole-archive et. al.
4691 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
4692 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4693 else
4694 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4695 fi
4696 supports_anon_versioning=no
4697 case `$LD -v 2>&1` in
4698 *GNU\ gold*) supports_anon_versioning=yes ;;
4699 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
4700 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
4701 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
4702 *\ 2.11.*) ;; # other 2.11 versions
4703 *) supports_anon_versioning=yes ;;
4704 esac
4705
4706 # See if GNU ld supports shared libraries.
4707 case $host_os in
4708 aix[[3-9]]*)
4709 # On AIX/PPC, the GNU linker is very broken
4710 if test "$host_cpu" != ia64; then
4711 _LT_TAGVAR(ld_shlibs, $1)=no
4712 cat <<_LT_EOF 1>&2
4713
4714 *** Warning: the GNU linker, at least up to release 2.19, is reported
4715 *** to be unable to reliably create shared libraries on AIX.
4716 *** Therefore, libtool is disabling shared libraries support. If you
4717 *** really care for shared libraries, you may want to install binutils
4718 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
4719 *** You will then need to restart the configuration process.
4720
4721 _LT_EOF
4722 fi
4723 ;;
4724
4725 amigaos*)
4726 case $host_cpu in
4727 powerpc)
4728 # see comment about AmigaOS4 .so support
4729 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4730 _LT_TAGVAR(archive_expsym_cmds, $1)=''
4731 ;;
4732 m68k)
4733 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
4734 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4735 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4736 ;;
4737 esac
4738 ;;
4739
4740 beos*)
4741 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4742 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4743 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
4744 # support --undefined. This deserves some investigation. FIXME
4745 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4746 else
4747 _LT_TAGVAR(ld_shlibs, $1)=no
4748 fi
4749 ;;
4750
4751 cygwin* | mingw* | pw32* | cegcc*)
4752 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4753 # as there is no search path for DLLs.
4754 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4755 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
4756 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4757 _LT_TAGVAR(always_export_symbols, $1)=no
4758 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4759 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
4760 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
4761
4762 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
4763 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4764 # If the export-symbols file already is a .def file (1st line
4765 # is EXPORTS), use it as is; otherwise, prepend...
4766 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
4767 cp $export_symbols $output_objdir/$soname.def;
4768 else
4769 echo EXPORTS > $output_objdir/$soname.def;
4770 cat $export_symbols >> $output_objdir/$soname.def;
4771 fi~
4772 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4773 else
4774 _LT_TAGVAR(ld_shlibs, $1)=no
4775 fi
4776 ;;
4777
4778 haiku*)
4779 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4780 _LT_TAGVAR(link_all_deplibs, $1)=yes
4781 ;;
4782
4783 interix[[3-9]]*)
4784 _LT_TAGVAR(hardcode_direct, $1)=no
4785 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4786 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4787 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4788 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
4789 # Instead, shared libraries are loaded at an image base (0x10000000 by
4790 # default) and relocated if they conflict, which is a slow very memory
4791 # consuming and fragmenting process. To avoid this, we pick a random,
4792 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
4793 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
4794 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
4795 _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
4796 ;;
4797
4798 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
4799 tmp_diet=no
4800 if test "$host_os" = linux-dietlibc; then
4801 case $cc_basename in
4802 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
4803 esac
4804 fi
4805 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
4806 && test "$tmp_diet" = no
4807 then
4808 tmp_addflag=' $pic_flag'
4809 tmp_sharedflag='-shared'
4810 case $cc_basename,$host_cpu in
4811 pgcc*) # Portland Group C compiler
4812 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
4813 tmp_addflag=' $pic_flag'
4814 ;;
4815 pgf77* | pgf90* | pgf95* | pgfortran*)
4816 # Portland Group f77 and f90 compilers
4817 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
4818 tmp_addflag=' $pic_flag -Mnomain' ;;
4819 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
4820 tmp_addflag=' -i_dynamic' ;;
4821 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
4822 tmp_addflag=' -i_dynamic -nofor_main' ;;
4823 ifc* | ifort*) # Intel Fortran compiler
4824 tmp_addflag=' -nofor_main' ;;
4825 lf95*) # Lahey Fortran 8.1
4826 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4827 tmp_sharedflag='--shared' ;;
4828 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
4829 tmp_sharedflag='-qmkshrobj'
4830 tmp_addflag= ;;
4831 nvcc*) # Cuda Compiler Driver 2.2
4832 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
4833 _LT_TAGVAR(compiler_needs_object, $1)=yes
4834 ;;
4835 esac
4836 case `$CC -V 2>&1 | sed 5q` in
4837 *Sun\ C*) # Sun C 5.9
4838 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
4839 _LT_TAGVAR(compiler_needs_object, $1)=yes
4840 tmp_sharedflag='-G' ;;
4841 *Sun\ F*) # Sun Fortran 8.3
4842 tmp_sharedflag='-G' ;;
4843 esac
4844 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4845
4846 if test "x$supports_anon_versioning" = xyes; then
4847 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4848 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4849 echo "local: *; };" >> $output_objdir/$libname.ver~
4850 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
4851 fi
4852
4853 case $cc_basename in
4854 xlf* | bgf* | bgxlf* | mpixlf*)
4855 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
4856 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
4857 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4858 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
4859 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
4860 if test "x$supports_anon_versioning" = xyes; then
4861 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4862 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4863 echo "local: *; };" >> $output_objdir/$libname.ver~
4864 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
4865 fi
4866 ;;
4867 esac
4868 else
4869 _LT_TAGVAR(ld_shlibs, $1)=no
4870 fi
4871 ;;
4872
4873 netbsd*)
4874 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4875 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
4876 wlarc=
4877 else
4878 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4879 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4880 fi
4881 ;;
4882
4883 solaris*)
4884 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
4885 _LT_TAGVAR(ld_shlibs, $1)=no
4886 cat <<_LT_EOF 1>&2
4887
4888 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
4889 *** create shared libraries on Solaris systems. Therefore, libtool
4890 *** is disabling shared libraries support. We urge you to upgrade GNU
4891 *** binutils to release 2.9.1 or newer. Another option is to modify
4892 *** your PATH or compiler configuration so that the native linker is
4893 *** used, and then restart.
4894
4895 _LT_EOF
4896 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4897 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4898 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4899 else
4900 _LT_TAGVAR(ld_shlibs, $1)=no
4901 fi
4902 ;;
4903
4904 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
4905 case `$LD -v 2>&1` in
4906 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
4907 _LT_TAGVAR(ld_shlibs, $1)=no
4908 cat <<_LT_EOF 1>&2
4909
4910 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
4911 *** reliably create shared libraries on SCO systems. Therefore, libtool
4912 *** is disabling shared libraries support. We urge you to upgrade GNU
4913 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
4914 *** your PATH or compiler configuration so that the native linker is
4915 *** used, and then restart.
4916
4917 _LT_EOF
4918 ;;
4919 *)
4920 # For security reasons, it is highly recommended that you always
4921 # use absolute paths for naming shared libraries, and exclude the
4922 # DT_RUNPATH tag from executables and libraries. But doing so
4923 # requires that you compile everything twice, which is a pain.
4924 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4925 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4926 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4927 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4928 else
4929 _LT_TAGVAR(ld_shlibs, $1)=no
4930 fi
4931 ;;
4932 esac
4933 ;;
4934
4935 sunos4*)
4936 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4937 wlarc=
4938 _LT_TAGVAR(hardcode_direct, $1)=yes
4939 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4940 ;;
4941
4942 *)
4943 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4944 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4945 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4946 else
4947 _LT_TAGVAR(ld_shlibs, $1)=no
4948 fi
4949 ;;
4950 esac
4951
4952 if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
4953 runpath_var=
4954 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4955 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4956 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4957 fi
4958 else
4959 # PORTME fill in a description of your system's linker (not GNU ld)
4960 case $host_os in
4961 aix3*)
4962 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4963 _LT_TAGVAR(always_export_symbols, $1)=yes
4964 _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
4965 # Note: this linker hardcodes the directories in LIBPATH if there
4966 # are no directories specified by -L.
4967 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4968 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
4969 # Neither direct hardcoding nor static linking is supported with a
4970 # broken collect2.
4971 _LT_TAGVAR(hardcode_direct, $1)=unsupported
4972 fi
4973 ;;
4974
4975 aix[[4-9]]*)
4976 if test "$host_cpu" = ia64; then
4977 # On IA64, the linker does run time linking by default, so we don't
4978 # have to do anything special.
4979 aix_use_runtimelinking=no
4980 exp_sym_flag='-Bexport'
4981 no_entry_flag=""
4982 else
4983 # If we're using GNU nm, then we don't want the "-C" option.
4984 # -C means demangle to AIX nm, but means don't demangle with GNU nm
4985 # Also, AIX nm treats weak defined symbols like other global
4986 # defined symbols, whereas GNU nm marks them as "W".
4987 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4988 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4989 else
4990 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4991 fi
4992 aix_use_runtimelinking=no
4993
4994 # Test if we are trying to use run time linking or normal
4995 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
4996 # need to do runtime linking.
4997 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
4998 for ld_flag in $LDFLAGS; do
4999 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5000 aix_use_runtimelinking=yes
5001 break
5002 fi
5003 done
5004 ;;
5005 esac
5006
5007 exp_sym_flag='-bexport'
5008 no_entry_flag='-bnoentry'
5009 fi
5010
5011 # When large executables or shared objects are built, AIX ld can
5012 # have problems creating the table of contents. If linking a library
5013 # or program results in "error TOC overflow" add -mminimal-toc to
5014 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5015 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5016
5017 _LT_TAGVAR(archive_cmds, $1)=''
5018 _LT_TAGVAR(hardcode_direct, $1)=yes
5019 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5020 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5021 _LT_TAGVAR(link_all_deplibs, $1)=yes
5022 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
5023
5024 if test "$GCC" = yes; then
5025 case $host_os in aix4.[[012]]|aix4.[[012]].*)
5026 # We only want to do this on AIX 4.2 and lower, the check
5027 # below for broken collect2 doesn't work under 4.3+
5028 collect2name=`${CC} -print-prog-name=collect2`
5029 if test -f "$collect2name" &&
5030 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5031 then
5032 # We have reworked collect2
5033 :
5034 else
5035 # We have old collect2
5036 _LT_TAGVAR(hardcode_direct, $1)=unsupported
5037 # It fails to find uninstalled libraries when the uninstalled
5038 # path is not listed in the libpath. Setting hardcode_minus_L
5039 # to unsupported forces relinking
5040 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5041 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5042 _LT_TAGVAR(hardcode_libdir_separator, $1)=
5043 fi
5044 ;;
5045 esac
5046 shared_flag='-shared'
5047 if test "$aix_use_runtimelinking" = yes; then
5048 shared_flag="$shared_flag "'${wl}-G'
5049 fi
5050 else
5051 # not using gcc
5052 if test "$host_cpu" = ia64; then
5053 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5054 # chokes on -Wl,-G. The following line is correct:
5055 shared_flag='-G'
5056 else
5057 if test "$aix_use_runtimelinking" = yes; then
5058 shared_flag='${wl}-G'
5059 else
5060 shared_flag='${wl}-bM:SRE'
5061 fi
5062 fi
5063 fi
5064
5065 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
5066 # It seems that -bexpall does not export symbols beginning with
5067 # underscore (_), so it is better to generate a list of symbols to export.
5068 _LT_TAGVAR(always_export_symbols, $1)=yes
5069 if test "$aix_use_runtimelinking" = yes; then
5070 # Warning - without using the other runtime loading flags (-brtl),
5071 # -berok will link without error, but may produce a broken library.
5072 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5073 # Determine the default libpath from the value encoded in an
5074 # empty executable.
5075 _LT_SYS_MODULE_PATH_AIX([$1])
5076 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5077 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
5078 else
5079 if test "$host_cpu" = ia64; then
5080 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5081 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5082 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
5083 else
5084 # Determine the default libpath from the value encoded in an
5085 # empty executable.
5086 _LT_SYS_MODULE_PATH_AIX([$1])
5087 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5088 # Warning - without using the other run time loading flags,
5089 # -berok will link without error, but may produce a broken library.
5090 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5091 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5092 if test "$with_gnu_ld" = yes; then
5093 # We only use this code for GNU lds that support --whole-archive.
5094 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
5095 else
5096 # Exported symbols can be pulled into shared objects from archives
5097 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5098 fi
5099 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5100 # This is similar to how AIX traditionally builds its shared libraries.
5101 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
5102 fi
5103 fi
5104 ;;
5105
5106 amigaos*)
5107 case $host_cpu in
5108 powerpc)
5109 # see comment about AmigaOS4 .so support
5110 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5111 _LT_TAGVAR(archive_expsym_cmds, $1)=''
5112 ;;
5113 m68k)
5114 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
5115 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5116 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5117 ;;
5118 esac
5119 ;;
5120
5121 bsdi[[45]]*)
5122 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5123 ;;
5124
5125 cygwin* | mingw* | pw32* | cegcc*)
5126 # When not using gcc, we currently assume that we are using
5127 # Microsoft Visual C++.
5128 # hardcode_libdir_flag_spec is actually meaningless, as there is
5129 # no search path for DLLs.
5130 case $cc_basename in
5131 cl*)
5132 # Native MSVC
5133 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5134 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5135 _LT_TAGVAR(always_export_symbols, $1)=yes
5136 _LT_TAGVAR(file_list_spec, $1)='@'
5137 # Tell ltmain to make .lib files, not .a files.
5138 libext=lib
5139 # Tell ltmain to make .dll files, not .so files.
5140 shrext_cmds=".dll"
5141 # FIXME: Setting linknames here is a bad hack.
5142 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
5143 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5144 sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
5145 else
5146 sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
5147 fi~
5148 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
5149 linknames='
5150 # The linker will not automatically build a static lib if we build a DLL.
5151 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5152 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5153 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
5154 # Don't use ranlib
5155 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
5156 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
5157 lt_tool_outputfile="@TOOL_OUTPUT@"~
5158 case $lt_outputfile in
5159 *.exe|*.EXE) ;;
5160 *)
5161 lt_outputfile="$lt_outputfile.exe"
5162 lt_tool_outputfile="$lt_tool_outputfile.exe"
5163 ;;
5164 esac~
5165 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
5166 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
5167 $RM "$lt_outputfile.manifest";
5168 fi'
5169 ;;
5170 *)
5171 # Assume MSVC wrapper
5172 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5173 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5174 # Tell ltmain to make .lib files, not .a files.
5175 libext=lib
5176 # Tell ltmain to make .dll files, not .so files.
5177 shrext_cmds=".dll"
5178 # FIXME: Setting linknames here is a bad hack.
5179 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
5180 # The linker will automatically build a .lib file if we build a DLL.
5181 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5182 # FIXME: Should let the user specify the lib program.
5183 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5184 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5185 ;;
5186 esac
5187 ;;
5188
5189 darwin* | rhapsody*)
5190 _LT_DARWIN_LINKER_FEATURES($1)
5191 ;;
5192
5193 dgux*)
5194 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5195 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5196 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5197 ;;
5198
5199 freebsd1*)
5200 _LT_TAGVAR(ld_shlibs, $1)=no
5201 ;;
5202
5203 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5204 # support. Future versions do this automatically, but an explicit c++rt0.o
5205 # does not break anything, and helps significantly (at the cost of a little
5206 # extra space).
5207 freebsd2.2*)
5208 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5209 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5210 _LT_TAGVAR(hardcode_direct, $1)=yes
5211 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5212 ;;
5213
5214 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5215 freebsd2*)
5216 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5217 _LT_TAGVAR(hardcode_direct, $1)=yes
5218 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5219 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5220 ;;
5221
5222 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5223 freebsd* | dragonfly*)
5224 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5225 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5226 _LT_TAGVAR(hardcode_direct, $1)=yes
5227 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5228 ;;
5229
5230 hpux9*)
5231 if test "$GCC" = yes; then
5232 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5233 else
5234 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5235 fi
5236 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5237 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5238 _LT_TAGVAR(hardcode_direct, $1)=yes
5239
5240 # hardcode_minus_L: Not really in the search PATH,
5241 # but as the default location of the library.
5242 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5243 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5244 ;;
5245
5246 hpux10*)
5247 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
5248 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5249 else
5250 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5251 fi
5252 if test "$with_gnu_ld" = no; then
5253 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5254 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
5255 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5256 _LT_TAGVAR(hardcode_direct, $1)=yes
5257 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5258 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5259 # hardcode_minus_L: Not really in the search PATH,
5260 # but as the default location of the library.
5261 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5262 fi
5263 ;;
5264
5265 hpux11*)
5266 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
5267 case $host_cpu in
5268 hppa*64*)
5269 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5270 ;;
5271 ia64*)
5272 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5273 ;;
5274 *)
5275 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5276 ;;
5277 esac
5278 else
5279 case $host_cpu in
5280 hppa*64*)
5281 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5282 ;;
5283 ia64*)
5284 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5285 ;;
5286 *)
5287 m4_if($1, [], [
5288 # Older versions of the 11.00 compiler do not understand -b yet
5289 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
5290 _LT_LINKER_OPTION([if $CC understands -b],
5291 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
5292 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
5293 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
5294 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
5295 ;;
5296 esac
5297 fi
5298 if test "$with_gnu_ld" = no; then
5299 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5300 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5301
5302 case $host_cpu in
5303 hppa*64*|ia64*)
5304 _LT_TAGVAR(hardcode_direct, $1)=no
5305 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5306 ;;
5307 *)
5308 _LT_TAGVAR(hardcode_direct, $1)=yes
5309 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5310 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5311
5312 # hardcode_minus_L: Not really in the search PATH,
5313 # but as the default location of the library.
5314 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5315 ;;
5316 esac
5317 fi
5318 ;;
5319
5320 irix5* | irix6* | nonstopux*)
5321 if test "$GCC" = yes; then
5322 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5323 # Try to use the -exported_symbol ld option, if it does not
5324 # work, assume that -exports_file does not work either and
5325 # implicitly export all symbols.
5326 # This should be the same for all languages, so no per-tag cache variable.
5327 AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
5328 [lt_cv_irix_exported_symbol],
5329 [save_LDFLAGS="$LDFLAGS"
5330 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
5331 AC_LINK_IFELSE(
5332 [AC_LANG_SOURCE(
5333 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
5334 [C++], [[int foo (void) { return 0; }]],
5335 [Fortran 77], [[
5336 subroutine foo
5337 end]],
5338 [Fortran], [[
5339 subroutine foo
5340 end]])])],
5341 [lt_cv_irix_exported_symbol=yes],
5342 [lt_cv_irix_exported_symbol=no])
5343 LDFLAGS="$save_LDFLAGS"])
5344 if test "$lt_cv_irix_exported_symbol" = yes; then
5345 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
5346 fi
5347 else
5348 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
5349 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
5350 fi
5351 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5352 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5353 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5354 _LT_TAGVAR(inherit_rpath, $1)=yes
5355 _LT_TAGVAR(link_all_deplibs, $1)=yes
5356 ;;
5357
5358 netbsd*)
5359 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5360 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
5361 else
5362 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
5363 fi
5364 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5365 _LT_TAGVAR(hardcode_direct, $1)=yes
5366 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5367 ;;
5368
5369 newsos6)
5370 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5371 _LT_TAGVAR(hardcode_direct, $1)=yes
5372 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5373 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5374 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5375 ;;
5376
5377 *nto* | *qnx*)
5378 ;;
5379
5380 openbsd*)
5381 if test -f /usr/libexec/ld.so; then
5382 _LT_TAGVAR(hardcode_direct, $1)=yes
5383 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5384 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5385 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5386 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5387 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
5388 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5389 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5390 else
5391 case $host_os in
5392 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
5393 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5394 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5395 ;;
5396 *)
5397 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5398 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5399 ;;
5400 esac
5401 fi
5402 else
5403 _LT_TAGVAR(ld_shlibs, $1)=no
5404 fi
5405 ;;
5406
5407 os2*)
5408 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5409 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5410 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5411 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
5412 _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5413 ;;
5414
5415 osf3*)
5416 if test "$GCC" = yes; then
5417 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5418 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5419 else
5420 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5421 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
5422 fi
5423 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5424 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5425 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5426 ;;
5427
5428 osf4* | osf5*) # as osf3* with the addition of -msym flag
5429 if test "$GCC" = yes; then
5430 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5431 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5432 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5433 else
5434 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5435 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
5436 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
5437 $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
5438
5439 # Both c and cxx compiler support -rpath directly
5440 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5441 fi
5442 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5443 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5444 ;;
5445
5446 solaris*)
5447 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
5448 if test "$GCC" = yes; then
5449 wlarc='${wl}'
5450 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5451 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5452 $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5453 else
5454 case `$CC -V 2>&1` in
5455 *"Compilers 5.0"*)
5456 wlarc=''
5457 _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5458 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5459 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
5460 ;;
5461 *)
5462 wlarc='${wl}'
5463 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
5464 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5465 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5466 ;;
5467 esac
5468 fi
5469 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5470 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5471 case $host_os in
5472 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5473 *)
5474 # The compiler driver will combine and reorder linker options,
5475 # but understands `-z linker_flag'. GCC discards it without `$wl',
5476 # but is careful enough not to reorder.
5477 # Supported since Solaris 2.6 (maybe 2.5.1?)
5478 if test "$GCC" = yes; then
5479 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
5480 else
5481 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
5482 fi
5483 ;;
5484 esac
5485 _LT_TAGVAR(link_all_deplibs, $1)=yes
5486 ;;
5487
5488 sunos4*)
5489 if test "x$host_vendor" = xsequent; then
5490 # Use $CC to link under sequent, because it throws in some extra .o
5491 # files that make .init and .fini sections work.
5492 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5493 else
5494 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5495 fi
5496 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5497 _LT_TAGVAR(hardcode_direct, $1)=yes
5498 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5499 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5500 ;;
5501
5502 sysv4)
5503 case $host_vendor in
5504 sni)
5505 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5506 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5507 ;;
5508 siemens)
5509 ## LD is ld it makes a PLAMLIB
5510 ## CC just makes a GrossModule.
5511 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5512 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5513 _LT_TAGVAR(hardcode_direct, $1)=no
5514 ;;
5515 motorola)
5516 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5517 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5518 ;;
5519 esac
5520 runpath_var='LD_RUN_PATH'
5521 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5522 ;;
5523
5524 sysv4.3*)
5525 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5526 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5527 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
5528 ;;
5529
5530 sysv4*MP*)
5531 if test -d /usr/nec; then
5532 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5533 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5534 runpath_var=LD_RUN_PATH
5535 hardcode_runpath_var=yes
5536 _LT_TAGVAR(ld_shlibs, $1)=yes
5537 fi
5538 ;;
5539
5540 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
5541 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5542 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5543 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5544 runpath_var='LD_RUN_PATH'
5545
5546 if test "$GCC" = yes; then
5547 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5548 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5549 else
5550 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5551 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5552 fi
5553 ;;
5554
5555 sysv5* | sco3.2v5* | sco5v6*)
5556 # Note: We can NOT use -z defs as we might desire, because we do not
5557 # link with -lc, and that would cause any symbols used from libc to
5558 # always be unresolved, which means just about no library would
5559 # ever link correctly. If we're not using GNU ld we use -z text
5560 # though, which does catch some bad symbols but isn't as heavy-handed
5561 # as -z defs.
5562 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5563 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
5564 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5565 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5566 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
5567 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5568 _LT_TAGVAR(link_all_deplibs, $1)=yes
5569 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5570 runpath_var='LD_RUN_PATH'
5571
5572 if test "$GCC" = yes; then
5573 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5574 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5575 else
5576 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5577 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5578 fi
5579 ;;
5580
5581 uts4*)
5582 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5583 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5584 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5585 ;;
5586
5587 *)
5588 _LT_TAGVAR(ld_shlibs, $1)=no
5589 ;;
5590 esac
5591
5592 if test x$host_vendor = xsni; then
5593 case $host in
5594 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5595 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
5596 ;;
5597 esac
5598 fi
5599 fi
5600 ])
5601 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
5602 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5603
5604 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
5605
5606 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
5607 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
5608 _LT_DECL([], [extract_expsyms_cmds], [2],
5609 [The commands to extract the exported symbol list from a shared archive])
5610
5611 #
5612 # Do we need to explicitly link libc?
5613 #
5614 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
5615 x|xyes)
5616 # Assume -lc should be added
5617 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5618
5619 if test "$enable_shared" = yes && test "$GCC" = yes; then
5620 case $_LT_TAGVAR(archive_cmds, $1) in
5621 *'~'*)
5622 # FIXME: we may have to deal with multi-command sequences.
5623 ;;
5624 '$CC '*)
5625 # Test whether the compiler implicitly links with -lc since on some
5626 # systems, -lgcc has to come before -lc. If gcc already passes -lc
5627 # to ld, don't add -lc before -lgcc.
5628 AC_CACHE_CHECK([whether -lc should be explicitly linked in],
5629 [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
5630 [$RM conftest*
5631 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
5632
5633 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5634 soname=conftest
5635 lib=conftest
5636 libobjs=conftest.$ac_objext
5637 deplibs=
5638 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
5639 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
5640 compiler_flags=-v
5641 linker_flags=-v
5642 verstring=
5643 output_objdir=.
5644 libname=conftest
5645 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
5646 _LT_TAGVAR(allow_undefined_flag, $1)=
5647 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
5648 then
5649 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
5650 else
5651 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5652 fi
5653 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5654 else
5655 cat conftest.err 1>&5
5656 fi
5657 $RM conftest*
5658 ])
5659 _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
5660 ;;
5661 esac
5662 fi
5663 ;;
5664 esac
5665
5666 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
5667 [Whether or not to add -lc for building shared libraries])
5668 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
5669 [enable_shared_with_static_runtimes], [0],
5670 [Whether or not to disallow shared libs when runtime libs are static])
5671 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
5672 [Compiler flag to allow reflexive dlopens])
5673 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
5674 [Compiler flag to generate shared objects directly from archives])
5675 _LT_TAGDECL([], [compiler_needs_object], [1],
5676 [Whether the compiler copes with passing no objects directly])
5677 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
5678 [Create an old-style archive from a shared archive])
5679 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
5680 [Create a temporary old-style archive to link instead of a shared archive])
5681 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
5682 _LT_TAGDECL([], [archive_expsym_cmds], [2])
5683 _LT_TAGDECL([], [module_cmds], [2],
5684 [Commands used to build a loadable module if different from building
5685 a shared archive.])
5686 _LT_TAGDECL([], [module_expsym_cmds], [2])
5687 _LT_TAGDECL([], [with_gnu_ld], [1],
5688 [Whether we are building with GNU ld or not])
5689 _LT_TAGDECL([], [allow_undefined_flag], [1],
5690 [Flag that allows shared libraries with undefined symbols to be built])
5691 _LT_TAGDECL([], [no_undefined_flag], [1],
5692 [Flag that enforces no undefined symbols])
5693 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
5694 [Flag to hardcode $libdir into a binary during linking.
5695 This must work even if $libdir does not exist])
5696 _LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
5697 [[If ld is used when linking, flag to hardcode $libdir into a binary
5698 during linking. This must work even if $libdir does not exist]])
5699 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
5700 [Whether we need a single "-rpath" flag with a separated argument])
5701 _LT_TAGDECL([], [hardcode_direct], [0],
5702 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5703 DIR into the resulting binary])
5704 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
5705 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5706 DIR into the resulting binary and the resulting library dependency is
5707 "absolute", i.e impossible to change by setting ${shlibpath_var} if the
5708 library is relocated])
5709 _LT_TAGDECL([], [hardcode_minus_L], [0],
5710 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
5711 into the resulting binary])
5712 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
5713 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
5714 into the resulting binary])
5715 _LT_TAGDECL([], [hardcode_automatic], [0],
5716 [Set to "yes" if building a shared library automatically hardcodes DIR
5717 into the library and all subsequent libraries and executables linked
5718 against it])
5719 _LT_TAGDECL([], [inherit_rpath], [0],
5720 [Set to yes if linker adds runtime paths of dependent libraries
5721 to runtime path list])
5722 _LT_TAGDECL([], [link_all_deplibs], [0],
5723 [Whether libtool must link a program against all its dependency libraries])
5724 _LT_TAGDECL([], [always_export_symbols], [0],
5725 [Set to "yes" if exported symbols are required])
5726 _LT_TAGDECL([], [export_symbols_cmds], [2],
5727 [The commands to list exported symbols])
5728 _LT_TAGDECL([], [exclude_expsyms], [1],
5729 [Symbols that should not be listed in the preloaded symbols])
5730 _LT_TAGDECL([], [include_expsyms], [1],
5731 [Symbols that must always be exported])
5732 _LT_TAGDECL([], [prelink_cmds], [2],
5733 [Commands necessary for linking programs (against libraries) with templates])
5734 _LT_TAGDECL([], [postlink_cmds], [2],
5735 [Commands necessary for finishing linking programs])
5736 _LT_TAGDECL([], [file_list_spec], [1],
5737 [Specify filename containing input files])
5738 dnl FIXME: Not yet implemented
5739 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
5740 dnl [Compiler flag to generate thread safe objects])
5741 ])# _LT_LINKER_SHLIBS
5742
5743
5744 # _LT_LANG_C_CONFIG([TAG])
5745 # ------------------------
5746 # Ensure that the configuration variables for a C compiler are suitably
5747 # defined. These variables are subsequently used by _LT_CONFIG to write
5748 # the compiler configuration to `libtool'.
5749 m4_defun([_LT_LANG_C_CONFIG],
5750 [m4_require([_LT_DECL_EGREP])dnl
5751 lt_save_CC="$CC"
5752 AC_LANG_PUSH(C)
5753
5754 # Source file extension for C test sources.
5755 ac_ext=c
5756
5757 # Object file extension for compiled C test sources.
5758 objext=o
5759 _LT_TAGVAR(objext, $1)=$objext
5760
5761 # Code to be used in simple compile tests
5762 lt_simple_compile_test_code="int some_variable = 0;"
5763
5764 # Code to be used in simple link tests
5765 lt_simple_link_test_code='int main(){return(0);}'
5766
5767 _LT_TAG_COMPILER
5768 # Save the default compiler, since it gets overwritten when the other
5769 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
5770 compiler_DEFAULT=$CC
5771
5772 # save warnings/boilerplate of simple test code
5773 _LT_COMPILER_BOILERPLATE
5774 _LT_LINKER_BOILERPLATE
5775
5776 if test -n "$compiler"; then
5777 _LT_COMPILER_NO_RTTI($1)
5778 _LT_COMPILER_PIC($1)
5779 _LT_COMPILER_C_O($1)
5780 _LT_COMPILER_FILE_LOCKS($1)
5781 _LT_LINKER_SHLIBS($1)
5782 _LT_SYS_DYNAMIC_LINKER($1)
5783 _LT_LINKER_HARDCODE_LIBPATH($1)
5784 LT_SYS_DLOPEN_SELF
5785 _LT_CMD_STRIPLIB
5786
5787 # Report which library types will actually be built
5788 AC_MSG_CHECKING([if libtool supports shared libraries])
5789 AC_MSG_RESULT([$can_build_shared])
5790
5791 AC_MSG_CHECKING([whether to build shared libraries])
5792 test "$can_build_shared" = "no" && enable_shared=no
5793
5794 # On AIX, shared libraries and static libraries use the same namespace, and
5795 # are all built from PIC.
5796 case $host_os in
5797 aix3*)
5798 test "$enable_shared" = yes && enable_static=no
5799 if test -n "$RANLIB"; then
5800 archive_cmds="$archive_cmds~\$RANLIB \$lib"
5801 postinstall_cmds='$RANLIB $lib'
5802 fi
5803 ;;
5804
5805 aix[[4-9]]*)
5806 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
5807 test "$enable_shared" = yes && enable_static=no
5808 fi
5809 ;;
5810 esac
5811 AC_MSG_RESULT([$enable_shared])
5812
5813 AC_MSG_CHECKING([whether to build static libraries])
5814 # Make sure either enable_shared or enable_static is yes.
5815 test "$enable_shared" = yes || enable_static=yes
5816 AC_MSG_RESULT([$enable_static])
5817
5818 _LT_CONFIG($1)
5819 fi
5820 AC_LANG_POP
5821 CC="$lt_save_CC"
5822 ])# _LT_LANG_C_CONFIG
5823
5824
5825 # _LT_LANG_CXX_CONFIG([TAG])
5826 # --------------------------
5827 # Ensure that the configuration variables for a C++ compiler are suitably
5828 # defined. These variables are subsequently used by _LT_CONFIG to write
5829 # the compiler configuration to `libtool'.
5830 m4_defun([_LT_LANG_CXX_CONFIG],
5831 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5832 m4_require([_LT_DECL_EGREP])dnl
5833 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
5834 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
5835 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
5836 (test "X$CXX" != "Xg++"))) ; then
5837 AC_PROG_CXXCPP
5838 else
5839 _lt_caught_CXX_error=yes
5840 fi
5841
5842 AC_LANG_PUSH(C++)
5843 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5844 _LT_TAGVAR(allow_undefined_flag, $1)=
5845 _LT_TAGVAR(always_export_symbols, $1)=no
5846 _LT_TAGVAR(archive_expsym_cmds, $1)=
5847 _LT_TAGVAR(compiler_needs_object, $1)=no
5848 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5849 _LT_TAGVAR(hardcode_direct, $1)=no
5850 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5851 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5852 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5853 _LT_TAGVAR(hardcode_libdir_separator, $1)=
5854 _LT_TAGVAR(hardcode_minus_L, $1)=no
5855 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5856 _LT_TAGVAR(hardcode_automatic, $1)=no
5857 _LT_TAGVAR(inherit_rpath, $1)=no
5858 _LT_TAGVAR(module_cmds, $1)=
5859 _LT_TAGVAR(module_expsym_cmds, $1)=
5860 _LT_TAGVAR(link_all_deplibs, $1)=unknown
5861 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5862 _LT_TAGVAR(reload_flag, $1)=$reload_flag
5863 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
5864 _LT_TAGVAR(no_undefined_flag, $1)=
5865 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5866 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5867
5868 # Source file extension for C++ test sources.
5869 ac_ext=cpp
5870
5871 # Object file extension for compiled C++ test sources.
5872 objext=o
5873 _LT_TAGVAR(objext, $1)=$objext
5874
5875 # No sense in running all these tests if we already determined that
5876 # the CXX compiler isn't working. Some variables (like enable_shared)
5877 # are currently assumed to apply to all compilers on this platform,
5878 # and will be corrupted by setting them based on a non-working compiler.
5879 if test "$_lt_caught_CXX_error" != yes; then
5880 # Code to be used in simple compile tests
5881 lt_simple_compile_test_code="int some_variable = 0;"
5882
5883 # Code to be used in simple link tests
5884 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
5885
5886 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5887 _LT_TAG_COMPILER
5888
5889 # save warnings/boilerplate of simple test code
5890 _LT_COMPILER_BOILERPLATE
5891 _LT_LINKER_BOILERPLATE
5892
5893 # Allow CC to be a program name with arguments.
5894 lt_save_CC=$CC
5895 lt_save_CFLAGS=$CFLAGS
5896 lt_save_LD=$LD
5897 lt_save_GCC=$GCC
5898 GCC=$GXX
5899 lt_save_with_gnu_ld=$with_gnu_ld
5900 lt_save_path_LD=$lt_cv_path_LD
5901 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
5902 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
5903 else
5904 $as_unset lt_cv_prog_gnu_ld
5905 fi
5906 if test -n "${lt_cv_path_LDCXX+set}"; then
5907 lt_cv_path_LD=$lt_cv_path_LDCXX
5908 else
5909 $as_unset lt_cv_path_LD
5910 fi
5911 test -z "${LDCXX+set}" || LD=$LDCXX
5912 CC=${CXX-"c++"}
5913 CFLAGS=$CXXFLAGS
5914 compiler=$CC
5915 _LT_TAGVAR(compiler, $1)=$CC
5916 _LT_CC_BASENAME([$compiler])
5917
5918 if test -n "$compiler"; then
5919 # We don't want -fno-exception when compiling C++ code, so set the
5920 # no_builtin_flag separately
5921 if test "$GXX" = yes; then
5922 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5923 else
5924 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5925 fi
5926
5927 if test "$GXX" = yes; then
5928 # Set up default GNU C++ configuration
5929
5930 LT_PATH_LD
5931
5932 # Check if GNU C++ uses GNU ld as the underlying linker, since the
5933 # archiving commands below assume that GNU ld is being used.
5934 if test "$with_gnu_ld" = yes; then
5935 _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5936 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5937
5938 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5939 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5940
5941 # If archive_cmds runs LD, not CC, wlarc should be empty
5942 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
5943 # investigate it a little bit more. (MM)
5944 wlarc='${wl}'
5945
5946 # ancient GNU ld didn't support --whole-archive et. al.
5947 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
5948 $GREP 'no-whole-archive' > /dev/null; then
5949 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5950 else
5951 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5952 fi
5953 else
5954 with_gnu_ld=no
5955 wlarc=
5956
5957 # A generic and very simple default shared library creation
5958 # command for GNU C++ for the case where it uses the native
5959 # linker, instead of GNU ld. If possible, this setting should
5960 # overridden to take advantage of the native linker features on
5961 # the platform it is being used on.
5962 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
5963 fi
5964
5965 # Commands to make compiler produce verbose output that lists
5966 # what "hidden" libraries, object files and flags are used when
5967 # linking a shared library.
5968 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
5969
5970 else
5971 GXX=no
5972 with_gnu_ld=no
5973 wlarc=
5974 fi
5975
5976 # PORTME: fill in a description of your system's C++ link characteristics
5977 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5978 _LT_TAGVAR(ld_shlibs, $1)=yes
5979 case $host_os in
5980 aix3*)
5981 # FIXME: insert proper C++ library support
5982 _LT_TAGVAR(ld_shlibs, $1)=no
5983 ;;
5984 aix[[4-9]]*)
5985 if test "$host_cpu" = ia64; then
5986 # On IA64, the linker does run time linking by default, so we don't
5987 # have to do anything special.
5988 aix_use_runtimelinking=no
5989 exp_sym_flag='-Bexport'
5990 no_entry_flag=""
5991 else
5992 aix_use_runtimelinking=no
5993
5994 # Test if we are trying to use run time linking or normal
5995 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5996 # need to do runtime linking.
5997 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5998 for ld_flag in $LDFLAGS; do
5999 case $ld_flag in
6000 *-brtl*)
6001 aix_use_runtimelinking=yes
6002 break
6003 ;;
6004 esac
6005 done
6006 ;;
6007 esac
6008
6009 exp_sym_flag='-bexport'
6010 no_entry_flag='-bnoentry'
6011 fi
6012
6013 # When large executables or shared objects are built, AIX ld can
6014 # have problems creating the table of contents. If linking a library
6015 # or program results in "error TOC overflow" add -mminimal-toc to
6016 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
6017 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6018
6019 _LT_TAGVAR(archive_cmds, $1)=''
6020 _LT_TAGVAR(hardcode_direct, $1)=yes
6021 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6022 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6023 _LT_TAGVAR(link_all_deplibs, $1)=yes
6024 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6025
6026 if test "$GXX" = yes; then
6027 case $host_os in aix4.[[012]]|aix4.[[012]].*)
6028 # We only want to do this on AIX 4.2 and lower, the check
6029 # below for broken collect2 doesn't work under 4.3+
6030 collect2name=`${CC} -print-prog-name=collect2`
6031 if test -f "$collect2name" &&
6032 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6033 then
6034 # We have reworked collect2
6035 :
6036 else
6037 # We have old collect2
6038 _LT_TAGVAR(hardcode_direct, $1)=unsupported
6039 # It fails to find uninstalled libraries when the uninstalled
6040 # path is not listed in the libpath. Setting hardcode_minus_L
6041 # to unsupported forces relinking
6042 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6043 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6044 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6045 fi
6046 esac
6047 shared_flag='-shared'
6048 if test "$aix_use_runtimelinking" = yes; then
6049 shared_flag="$shared_flag "'${wl}-G'
6050 fi
6051 else
6052 # not using gcc
6053 if test "$host_cpu" = ia64; then
6054 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6055 # chokes on -Wl,-G. The following line is correct:
6056 shared_flag='-G'
6057 else
6058 if test "$aix_use_runtimelinking" = yes; then
6059 shared_flag='${wl}-G'
6060 else
6061 shared_flag='${wl}-bM:SRE'
6062 fi
6063 fi
6064 fi
6065
6066 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6067 # It seems that -bexpall does not export symbols beginning with
6068 # underscore (_), so it is better to generate a list of symbols to
6069 # export.
6070 _LT_TAGVAR(always_export_symbols, $1)=yes
6071 if test "$aix_use_runtimelinking" = yes; then
6072 # Warning - without using the other runtime loading flags (-brtl),
6073 # -berok will link without error, but may produce a broken library.
6074 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6075 # Determine the default libpath from the value encoded in an empty
6076 # executable.
6077 _LT_SYS_MODULE_PATH_AIX([$1])
6078 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6079
6080 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
6081 else
6082 if test "$host_cpu" = ia64; then
6083 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6084 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6085 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
6086 else
6087 # Determine the default libpath from the value encoded in an
6088 # empty executable.
6089 _LT_SYS_MODULE_PATH_AIX([$1])
6090 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6091 # Warning - without using the other run time loading flags,
6092 # -berok will link without error, but may produce a broken library.
6093 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6094 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6095 if test "$with_gnu_ld" = yes; then
6096 # We only use this code for GNU lds that support --whole-archive.
6097 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6098 else
6099 # Exported symbols can be pulled into shared objects from archives
6100 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6101 fi
6102 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6103 # This is similar to how AIX traditionally builds its shared
6104 # libraries.
6105 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
6106 fi
6107 fi
6108 ;;
6109
6110 beos*)
6111 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6112 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6113 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6114 # support --undefined. This deserves some investigation. FIXME
6115 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6116 else
6117 _LT_TAGVAR(ld_shlibs, $1)=no
6118 fi
6119 ;;
6120
6121 chorus*)
6122 case $cc_basename in
6123 *)
6124 # FIXME: insert proper C++ library support
6125 _LT_TAGVAR(ld_shlibs, $1)=no
6126 ;;
6127 esac
6128 ;;
6129
6130 cygwin* | mingw* | pw32* | cegcc*)
6131 case $GXX,$cc_basename in
6132 ,cl* | no,cl*)
6133 # Native MSVC
6134 # hardcode_libdir_flag_spec is actually meaningless, as there is
6135 # no search path for DLLs.
6136 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6137 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6138 _LT_TAGVAR(always_export_symbols, $1)=yes
6139 _LT_TAGVAR(file_list_spec, $1)='@'
6140 # Tell ltmain to make .lib files, not .a files.
6141 libext=lib
6142 # Tell ltmain to make .dll files, not .so files.
6143 shrext_cmds=".dll"
6144 # FIXME: Setting linknames here is a bad hack.
6145 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
6146 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6147 $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
6148 else
6149 $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
6150 fi~
6151 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6152 linknames='
6153 # The linker will not automatically build a static lib if we build a DLL.
6154 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6155 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6156 # Don't use ranlib
6157 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6158 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6159 lt_tool_outputfile="@TOOL_OUTPUT@"~
6160 case $lt_outputfile in
6161 *.exe|*.EXE) ;;
6162 *)
6163 lt_outputfile="$lt_outputfile.exe"
6164 lt_tool_outputfile="$lt_tool_outputfile.exe"
6165 ;;
6166 esac~
6167 func_to_tool_file "$lt_outputfile"~
6168 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
6169 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6170 $RM "$lt_outputfile.manifest";
6171 fi'
6172 ;;
6173 *)
6174 # g++
6175 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6176 # as there is no search path for DLLs.
6177 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6178 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
6179 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6180 _LT_TAGVAR(always_export_symbols, $1)=no
6181 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6182
6183 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6184 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6185 # If the export-symbols file already is a .def file (1st line
6186 # is EXPORTS), use it as is; otherwise, prepend...
6187 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6188 cp $export_symbols $output_objdir/$soname.def;
6189 else
6190 echo EXPORTS > $output_objdir/$soname.def;
6191 cat $export_symbols >> $output_objdir/$soname.def;
6192 fi~
6193 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6194 else
6195 _LT_TAGVAR(ld_shlibs, $1)=no
6196 fi
6197 ;;
6198 esac
6199 ;;
6200 darwin* | rhapsody*)
6201 _LT_DARWIN_LINKER_FEATURES($1)
6202 ;;
6203
6204 dgux*)
6205 case $cc_basename in
6206 ec++*)
6207 # FIXME: insert proper C++ library support
6208 _LT_TAGVAR(ld_shlibs, $1)=no
6209 ;;
6210 ghcx*)
6211 # Green Hills C++ Compiler
6212 # FIXME: insert proper C++ library support
6213 _LT_TAGVAR(ld_shlibs, $1)=no
6214 ;;
6215 *)
6216 # FIXME: insert proper C++ library support
6217 _LT_TAGVAR(ld_shlibs, $1)=no
6218 ;;
6219 esac
6220 ;;
6221
6222 freebsd[[12]]*)
6223 # C++ shared libraries reported to be fairly broken before
6224 # switch to ELF
6225 _LT_TAGVAR(ld_shlibs, $1)=no
6226 ;;
6227
6228 freebsd-elf*)
6229 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6230 ;;
6231
6232 freebsd* | dragonfly*)
6233 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
6234 # conventions
6235 _LT_TAGVAR(ld_shlibs, $1)=yes
6236 ;;
6237
6238 gnu*)
6239 ;;
6240
6241 haiku*)
6242 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6243 _LT_TAGVAR(link_all_deplibs, $1)=yes
6244 ;;
6245
6246 hpux9*)
6247 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6248 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6249 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6250 _LT_TAGVAR(hardcode_direct, $1)=yes
6251 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6252 # but as the default
6253 # location of the library.
6254
6255 case $cc_basename in
6256 CC*)
6257 # FIXME: insert proper C++ library support
6258 _LT_TAGVAR(ld_shlibs, $1)=no
6259 ;;
6260 aCC*)
6261 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6262 # Commands to make compiler produce verbose output that lists
6263 # what "hidden" libraries, object files and flags are used when
6264 # linking a shared library.
6265 #
6266 # There doesn't appear to be a way to prevent this compiler from
6267 # explicitly linking system object files so we need to strip them
6268 # from the output so that they don't get included in the library
6269 # dependencies.
6270 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
6271 ;;
6272 *)
6273 if test "$GXX" = yes; then
6274 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6275 else
6276 # FIXME: insert proper C++ library support
6277 _LT_TAGVAR(ld_shlibs, $1)=no
6278 fi
6279 ;;
6280 esac
6281 ;;
6282
6283 hpux10*|hpux11*)
6284 if test $with_gnu_ld = no; then
6285 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6286 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6287
6288 case $host_cpu in
6289 hppa*64*|ia64*)
6290 ;;
6291 *)
6292 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6293 ;;
6294 esac
6295 fi
6296 case $host_cpu in
6297 hppa*64*|ia64*)
6298 _LT_TAGVAR(hardcode_direct, $1)=no
6299 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6300 ;;
6301 *)
6302 _LT_TAGVAR(hardcode_direct, $1)=yes
6303 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6304 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6305 # but as the default
6306 # location of the library.
6307 ;;
6308 esac
6309
6310 case $cc_basename in
6311 CC*)
6312 # FIXME: insert proper C++ library support
6313 _LT_TAGVAR(ld_shlibs, $1)=no
6314 ;;
6315 aCC*)
6316 case $host_cpu in
6317 hppa*64*)
6318 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6319 ;;
6320 ia64*)
6321 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6322 ;;
6323 *)
6324 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6325 ;;
6326 esac
6327 # Commands to make compiler produce verbose output that lists
6328 # what "hidden" libraries, object files and flags are used when
6329 # linking a shared library.
6330 #
6331 # There doesn't appear to be a way to prevent this compiler from
6332 # explicitly linking system object files so we need to strip them
6333 # from the output so that they don't get included in the library
6334 # dependencies.
6335 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
6336 ;;
6337 *)
6338 if test "$GXX" = yes; then
6339 if test $with_gnu_ld = no; then
6340 case $host_cpu in
6341 hppa*64*)
6342 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6343 ;;
6344 ia64*)
6345 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6346 ;;
6347 *)
6348 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6349 ;;
6350 esac
6351 fi
6352 else
6353 # FIXME: insert proper C++ library support
6354 _LT_TAGVAR(ld_shlibs, $1)=no
6355 fi
6356 ;;
6357 esac
6358 ;;
6359
6360 interix[[3-9]]*)
6361 _LT_TAGVAR(hardcode_direct, $1)=no
6362 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6363 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6364 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6365 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6366 # Instead, shared libraries are loaded at an image base (0x10000000 by
6367 # default) and relocated if they conflict, which is a slow very memory
6368 # consuming and fragmenting process. To avoid this, we pick a random,
6369 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6370 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
6371 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
6372 _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
6373 ;;
6374 irix5* | irix6*)
6375 case $cc_basename in
6376 CC*)
6377 # SGI C++
6378 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6379
6380 # Archives containing C++ object files must be created using
6381 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
6382 # necessary to make sure instantiated templates are included
6383 # in the archive.
6384 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
6385 ;;
6386 *)
6387 if test "$GXX" = yes; then
6388 if test "$with_gnu_ld" = no; then
6389 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6390 else
6391 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
6392 fi
6393 fi
6394 _LT_TAGVAR(link_all_deplibs, $1)=yes
6395 ;;
6396 esac
6397 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6398 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6399 _LT_TAGVAR(inherit_rpath, $1)=yes
6400 ;;
6401
6402 linux* | k*bsd*-gnu | kopensolaris*-gnu)
6403 case $cc_basename in
6404 KCC*)
6405 # Kuck and Associates, Inc. (KAI) C++ Compiler
6406
6407 # KCC will only create a shared library if the output file
6408 # ends with ".so" (or ".sl" for HP-UX), so rename the library
6409 # to its proper name (with version) after linking.
6410 _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
6411 _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
6412 # Commands to make compiler produce verbose output that lists
6413 # what "hidden" libraries, object files and flags are used when
6414 # linking a shared library.
6415 #
6416 # There doesn't appear to be a way to prevent this compiler from
6417 # explicitly linking system object files so we need to strip them
6418 # from the output so that they don't get included in the library
6419 # dependencies.
6420 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
6421
6422 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6423 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6424
6425 # Archives containing C++ object files must be created using
6426 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
6427 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
6428 ;;
6429 icpc* | ecpc* )
6430 # Intel C++
6431 with_gnu_ld=yes
6432 # version 8.0 and above of icpc choke on multiply defined symbols
6433 # if we add $predep_objects and $postdep_objects, however 7.1 and
6434 # earlier do not add the objects themselves.
6435 case `$CC -V 2>&1` in
6436 *"Version 7."*)
6437 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6438 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6439 ;;
6440 *) # Version 8.0 or newer
6441 tmp_idyn=
6442 case $host_cpu in
6443 ia64*) tmp_idyn=' -i_dynamic';;
6444 esac
6445 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6446 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6447 ;;
6448 esac
6449 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6450 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6451 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6452 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6453 ;;
6454 pgCC* | pgcpp*)
6455 # Portland Group C++ compiler
6456 case `$CC -V` in
6457 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
6458 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
6459 rm -rf $tpldir~
6460 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
6461 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
6462 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
6463 rm -rf $tpldir~
6464 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
6465 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
6466 $RANLIB $oldlib'
6467 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
6468 rm -rf $tpldir~
6469 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6470 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6471 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
6472 rm -rf $tpldir~
6473 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6474 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
6475 ;;
6476 *) # Version 6 and above use weak symbols
6477 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6478 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
6479 ;;
6480 esac
6481
6482 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6483 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6484 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
6485 ;;
6486 cxx*)
6487 # Compaq C++
6488 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6489 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
6490
6491 runpath_var=LD_RUN_PATH
6492 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6493 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6494
6495 # Commands to make compiler produce verbose output that lists
6496 # what "hidden" libraries, object files and flags are used when
6497 # linking a shared library.
6498 #
6499 # There doesn't appear to be a way to prevent this compiler from
6500 # explicitly linking system object files so we need to strip them
6501 # from the output so that they don't get included in the library
6502 # dependencies.
6503 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
6504 ;;
6505 xl* | mpixl* | bgxl*)
6506 # IBM XL 8.0 on PPC, with GNU ld
6507 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6508 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6509 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6510 if test "x$supports_anon_versioning" = xyes; then
6511 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6512 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6513 echo "local: *; };" >> $output_objdir/$libname.ver~
6514 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6515 fi
6516 ;;
6517 *)
6518 case `$CC -V 2>&1 | sed 5q` in
6519 *Sun\ C*)
6520 # Sun C++ 5.9
6521 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6522 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6523 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
6524 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6525 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
6526 _LT_TAGVAR(compiler_needs_object, $1)=yes
6527
6528 # Not sure whether something based on
6529 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
6530 # would be better.
6531 output_verbose_link_cmd='func_echo_all'
6532
6533 # Archives containing C++ object files must be created using
6534 # "CC -xar", where "CC" is the Sun C++ compiler. This is
6535 # necessary to make sure instantiated templates are included
6536 # in the archive.
6537 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6538 ;;
6539 esac
6540 ;;
6541 esac
6542 ;;
6543
6544 lynxos*)
6545 # FIXME: insert proper C++ library support
6546 _LT_TAGVAR(ld_shlibs, $1)=no
6547 ;;
6548
6549 m88k*)
6550 # FIXME: insert proper C++ library support
6551 _LT_TAGVAR(ld_shlibs, $1)=no
6552 ;;
6553
6554 mvs*)
6555 case $cc_basename in
6556 cxx*)
6557 # FIXME: insert proper C++ library support
6558 _LT_TAGVAR(ld_shlibs, $1)=no
6559 ;;
6560 *)
6561 # FIXME: insert proper C++ library support
6562 _LT_TAGVAR(ld_shlibs, $1)=no
6563 ;;
6564 esac
6565 ;;
6566
6567 netbsd*)
6568 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6569 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
6570 wlarc=
6571 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6572 _LT_TAGVAR(hardcode_direct, $1)=yes
6573 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6574 fi
6575 # Workaround some broken pre-1.5 toolchains
6576 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
6577 ;;
6578
6579 *nto* | *qnx*)
6580 _LT_TAGVAR(ld_shlibs, $1)=yes
6581 ;;
6582
6583 openbsd2*)
6584 # C++ shared libraries are fairly broken
6585 _LT_TAGVAR(ld_shlibs, $1)=no
6586 ;;
6587
6588 openbsd*)
6589 if test -f /usr/libexec/ld.so; then
6590 _LT_TAGVAR(hardcode_direct, $1)=yes
6591 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6592 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6593 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6594 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6595 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6596 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
6597 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6598 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6599 fi
6600 output_verbose_link_cmd=func_echo_all
6601 else
6602 _LT_TAGVAR(ld_shlibs, $1)=no
6603 fi
6604 ;;
6605
6606 osf3* | osf4* | osf5*)
6607 case $cc_basename in
6608 KCC*)
6609 # Kuck and Associates, Inc. (KAI) C++ Compiler
6610
6611 # KCC will only create a shared library if the output file
6612 # ends with ".so" (or ".sl" for HP-UX), so rename the library
6613 # to its proper name (with version) after linking.
6614 _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
6615
6616 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6617 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6618
6619 # Archives containing C++ object files must be created using
6620 # the KAI C++ compiler.
6621 case $host in
6622 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
6623 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
6624 esac
6625 ;;
6626 RCC*)
6627 # Rational C++ 2.4.1
6628 # FIXME: insert proper C++ library support
6629 _LT_TAGVAR(ld_shlibs, $1)=no
6630 ;;
6631 cxx*)
6632 case $host in
6633 osf3*)
6634 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6635 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6636 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6637 ;;
6638 *)
6639 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6640 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6641 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
6642 echo "-hidden">> $lib.exp~
6643 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~
6644 $RM $lib.exp'
6645 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6646 ;;
6647 esac
6648
6649 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6650
6651 # Commands to make compiler produce verbose output that lists
6652 # what "hidden" libraries, object files and flags are used when
6653 # linking a shared library.
6654 #
6655 # There doesn't appear to be a way to prevent this compiler from
6656 # explicitly linking system object files so we need to strip them
6657 # from the output so that they don't get included in the library
6658 # dependencies.
6659 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
6660 ;;
6661 *)
6662 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6663 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6664 case $host in
6665 osf3*)
6666 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6667 ;;
6668 *)
6669 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6670 ;;
6671 esac
6672
6673 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6674 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6675
6676 # Commands to make compiler produce verbose output that lists
6677 # what "hidden" libraries, object files and flags are used when
6678 # linking a shared library.
6679 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6680
6681 else
6682 # FIXME: insert proper C++ library support
6683 _LT_TAGVAR(ld_shlibs, $1)=no
6684 fi
6685 ;;
6686 esac
6687 ;;
6688
6689 psos*)
6690 # FIXME: insert proper C++ library support
6691 _LT_TAGVAR(ld_shlibs, $1)=no
6692 ;;
6693
6694 sunos4*)
6695 case $cc_basename in
6696 CC*)
6697 # Sun C++ 4.x
6698 # FIXME: insert proper C++ library support
6699 _LT_TAGVAR(ld_shlibs, $1)=no
6700 ;;
6701 lcc*)
6702 # Lucid
6703 # FIXME: insert proper C++ library support
6704 _LT_TAGVAR(ld_shlibs, $1)=no
6705 ;;
6706 *)
6707 # FIXME: insert proper C++ library support
6708 _LT_TAGVAR(ld_shlibs, $1)=no
6709 ;;
6710 esac
6711 ;;
6712
6713 solaris*)
6714 case $cc_basename in
6715 CC* | sunCC*)
6716 # Sun C++ 4.2, 5.x and Centerline C++
6717 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
6718 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6719 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6720 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6721 $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6722
6723 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6724 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6725 case $host_os in
6726 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6727 *)
6728 # The compiler driver will combine and reorder linker options,
6729 # but understands `-z linker_flag'.
6730 # Supported since Solaris 2.6 (maybe 2.5.1?)
6731 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6732 ;;
6733 esac
6734 _LT_TAGVAR(link_all_deplibs, $1)=yes
6735
6736 output_verbose_link_cmd='func_echo_all'
6737
6738 # Archives containing C++ object files must be created using
6739 # "CC -xar", where "CC" is the Sun C++ compiler. This is
6740 # necessary to make sure instantiated templates are included
6741 # in the archive.
6742 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6743 ;;
6744 gcx*)
6745 # Green Hills C++ Compiler
6746 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6747
6748 # The C++ compiler must be used to create the archive.
6749 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
6750 ;;
6751 *)
6752 # GNU C++ compiler with Solaris linker
6753 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6754 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
6755 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
6756 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6757 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6758 $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6759
6760 # Commands to make compiler produce verbose output that lists
6761 # what "hidden" libraries, object files and flags are used when
6762 # linking a shared library.
6763 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6764 else
6765 # g++ 2.7 appears to require `-G' NOT `-shared' on this
6766 # platform.
6767 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6768 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6769 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6770
6771 # Commands to make compiler produce verbose output that lists
6772 # what "hidden" libraries, object files and flags are used when
6773 # linking a shared library.
6774 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6775 fi
6776
6777 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
6778 case $host_os in
6779 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6780 *)
6781 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6782 ;;
6783 esac
6784 fi
6785 ;;
6786 esac
6787 ;;
6788
6789 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6790 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6791 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6792 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6793 runpath_var='LD_RUN_PATH'
6794
6795 case $cc_basename in
6796 CC*)
6797 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6798 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6799 ;;
6800 *)
6801 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6802 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6803 ;;
6804 esac
6805 ;;
6806
6807 sysv5* | sco3.2v5* | sco5v6*)
6808 # Note: We can NOT use -z defs as we might desire, because we do not
6809 # link with -lc, and that would cause any symbols used from libc to
6810 # always be unresolved, which means just about no library would
6811 # ever link correctly. If we're not using GNU ld we use -z text
6812 # though, which does catch some bad symbols but isn't as heavy-handed
6813 # as -z defs.
6814 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6815 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6816 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6817 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6818 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6819 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6820 _LT_TAGVAR(link_all_deplibs, $1)=yes
6821 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6822 runpath_var='LD_RUN_PATH'
6823
6824 case $cc_basename in
6825 CC*)
6826 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6827 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6828 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
6829 '"$_LT_TAGVAR(old_archive_cmds, $1)"
6830 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
6831 '"$_LT_TAGVAR(reload_cmds, $1)"
6832 ;;
6833 *)
6834 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6835 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6836 ;;
6837 esac
6838 ;;
6839
6840 tandem*)
6841 case $cc_basename in
6842 NCC*)
6843 # NonStop-UX NCC 3.20
6844 # FIXME: insert proper C++ library support
6845 _LT_TAGVAR(ld_shlibs, $1)=no
6846 ;;
6847 *)
6848 # FIXME: insert proper C++ library support
6849 _LT_TAGVAR(ld_shlibs, $1)=no
6850 ;;
6851 esac
6852 ;;
6853
6854 vxworks*)
6855 # FIXME: insert proper C++ library support
6856 _LT_TAGVAR(ld_shlibs, $1)=no
6857 ;;
6858
6859 *)
6860 # FIXME: insert proper C++ library support
6861 _LT_TAGVAR(ld_shlibs, $1)=no
6862 ;;
6863 esac
6864
6865 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6866 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6867
6868 _LT_TAGVAR(GCC, $1)="$GXX"
6869 _LT_TAGVAR(LD, $1)="$LD"
6870
6871 ## CAVEAT EMPTOR:
6872 ## There is no encapsulation within the following macros, do not change
6873 ## the running order or otherwise move them around unless you know exactly
6874 ## what you are doing...
6875 _LT_SYS_HIDDEN_LIBDEPS($1)
6876 _LT_COMPILER_PIC($1)
6877 _LT_COMPILER_C_O($1)
6878 _LT_COMPILER_FILE_LOCKS($1)
6879 _LT_LINKER_SHLIBS($1)
6880 _LT_SYS_DYNAMIC_LINKER($1)
6881 _LT_LINKER_HARDCODE_LIBPATH($1)
6882
6883 _LT_CONFIG($1)
6884 fi # test -n "$compiler"
6885
6886 CC=$lt_save_CC
6887 CFLAGS=$lt_save_CFLAGS
6888 LDCXX=$LD
6889 LD=$lt_save_LD
6890 GCC=$lt_save_GCC
6891 with_gnu_ld=$lt_save_with_gnu_ld
6892 lt_cv_path_LDCXX=$lt_cv_path_LD
6893 lt_cv_path_LD=$lt_save_path_LD
6894 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
6895 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
6896 fi # test "$_lt_caught_CXX_error" != yes
6897
6898 AC_LANG_POP
6899 ])# _LT_LANG_CXX_CONFIG
6900
6901
6902 # _LT_FUNC_STRIPNAME_CNF
6903 # ----------------------
6904 # func_stripname_cnf prefix suffix name
6905 # strip PREFIX and SUFFIX off of NAME.
6906 # PREFIX and SUFFIX must not contain globbing or regex special
6907 # characters, hashes, percent signs, but SUFFIX may contain a leading
6908 # dot (in which case that matches only a dot).
6909 #
6910 # This function is identical to the (non-XSI) version of func_stripname,
6911 # except this one can be used by m4 code that may be executed by configure,
6912 # rather than the libtool script.
6913 m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
6914 AC_REQUIRE([_LT_DECL_SED])
6915 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
6916 func_stripname_cnf ()
6917 {
6918 case ${2} in
6919 .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
6920 *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
6921 esac
6922 } # func_stripname_cnf
6923 ])# _LT_FUNC_STRIPNAME_CNF
6924
6925 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
6926 # ---------------------------------
6927 # Figure out "hidden" library dependencies from verbose
6928 # compiler output when linking a shared library.
6929 # Parse the compiler output and extract the necessary
6930 # objects, libraries and library flags.
6931 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
6932 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6933 AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
6934 # Dependencies to place before and after the object being linked:
6935 _LT_TAGVAR(predep_objects, $1)=
6936 _LT_TAGVAR(postdep_objects, $1)=
6937 _LT_TAGVAR(predeps, $1)=
6938 _LT_TAGVAR(postdeps, $1)=
6939 _LT_TAGVAR(compiler_lib_search_path, $1)=
6940
6941 dnl we can't use the lt_simple_compile_test_code here,
6942 dnl because it contains code intended for an executable,
6943 dnl not a library. It's possible we should let each
6944 dnl tag define a new lt_????_link_test_code variable,
6945 dnl but it's only used here...
6946 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
6947 int a;
6948 void foo (void) { a = 0; }
6949 _LT_EOF
6950 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
6951 class Foo
6952 {
6953 public:
6954 Foo (void) { a = 0; }
6955 private:
6956 int a;
6957 };
6958 _LT_EOF
6959 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
6960 subroutine foo
6961 implicit none
6962 integer*4 a
6963 a=0
6964 return
6965 end
6966 _LT_EOF
6967 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
6968 subroutine foo
6969 implicit none
6970 integer a
6971 a=0
6972 return
6973 end
6974 _LT_EOF
6975 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
6976 public class foo {
6977 private int a;
6978 public void bar (void) {
6979 a = 0;
6980 }
6981 };
6982 _LT_EOF
6983 ])
6984
6985 _lt_libdeps_save_CFLAGS=$CFLAGS
6986 case "$CC $CFLAGS " in #(
6987 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
6988 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
6989 esac
6990
6991 dnl Parse the compiler output and extract the necessary
6992 dnl objects, libraries and library flags.
6993 if AC_TRY_EVAL(ac_compile); then
6994 # Parse the compiler output and extract the necessary
6995 # objects, libraries and library flags.
6996
6997 # Sentinel used to keep track of whether or not we are before
6998 # the conftest object file.
6999 pre_test_object_deps_done=no
7000
7001 for p in `eval "$output_verbose_link_cmd"`; do
7002 case ${prev}${p} in
7003
7004 -L* | -R* | -l*)
7005 # Some compilers place space between "-{L,R}" and the path.
7006 # Remove the space.
7007 if test $p = "-L" ||
7008 test $p = "-R"; then
7009 prev=$p
7010 continue
7011 fi
7012
7013 # Expand the sysroot to ease extracting the directories later.
7014 if test -z "$prev"; then
7015 case $p in
7016 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
7017 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
7018 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
7019 esac
7020 fi
7021 case $p in
7022 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
7023 esac
7024 if test "$pre_test_object_deps_done" = no; then
7025 case ${prev} in
7026 -L | -R)
7027 # Internal compiler library paths should come after those
7028 # provided the user. The postdeps already come after the
7029 # user supplied libs so there is no need to process them.
7030 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
7031 _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
7032 else
7033 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
7034 fi
7035 ;;
7036 # The "-l" case would never come before the object being
7037 # linked, so don't bother handling this case.
7038 esac
7039 else
7040 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
7041 _LT_TAGVAR(postdeps, $1)="${prev}${p}"
7042 else
7043 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
7044 fi
7045 fi
7046 prev=
7047 ;;
7048
7049 *.lto.$objext) ;; # Ignore GCC LTO objects
7050 *.$objext)
7051 # This assumes that the test object file only shows up
7052 # once in the compiler output.
7053 if test "$p" = "conftest.$objext"; then
7054 pre_test_object_deps_done=yes
7055 continue
7056 fi
7057
7058 if test "$pre_test_object_deps_done" = no; then
7059 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
7060 _LT_TAGVAR(predep_objects, $1)="$p"
7061 else
7062 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
7063 fi
7064 else
7065 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
7066 _LT_TAGVAR(postdep_objects, $1)="$p"
7067 else
7068 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
7069 fi
7070 fi
7071 ;;
7072
7073 *) ;; # Ignore the rest.
7074
7075 esac
7076 done
7077
7078 # Clean up.
7079 rm -f a.out a.exe
7080 else
7081 echo "libtool.m4: error: problem compiling $1 test program"
7082 fi
7083
7084 $RM -f confest.$objext
7085 CFLAGS=$_lt_libdeps_save_CFLAGS
7086
7087 # PORTME: override above test on systems where it is broken
7088 m4_if([$1], [CXX],
7089 [case $host_os in
7090 interix[[3-9]]*)
7091 # Interix 3.5 installs completely hosed .la files for C++, so rather than
7092 # hack all around it, let's just trust "g++" to DTRT.
7093 _LT_TAGVAR(predep_objects,$1)=
7094 _LT_TAGVAR(postdep_objects,$1)=
7095 _LT_TAGVAR(postdeps,$1)=
7096 ;;
7097
7098 linux*)
7099 case `$CC -V 2>&1 | sed 5q` in
7100 *Sun\ C*)
7101 # Sun C++ 5.9
7102
7103 # The more standards-conforming stlport4 library is
7104 # incompatible with the Cstd library. Avoid specifying
7105 # it if it's in CXXFLAGS. Ignore libCrun as
7106 # -library=stlport4 depends on it.
7107 case " $CXX $CXXFLAGS " in
7108 *" -library=stlport4 "*)
7109 solaris_use_stlport4=yes
7110 ;;
7111 esac
7112
7113 if test "$solaris_use_stlport4" != yes; then
7114 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7115 fi
7116 ;;
7117 esac
7118 ;;
7119
7120 solaris*)
7121 case $cc_basename in
7122 CC* | sunCC*)
7123 # The more standards-conforming stlport4 library is
7124 # incompatible with the Cstd library. Avoid specifying
7125 # it if it's in CXXFLAGS. Ignore libCrun as
7126 # -library=stlport4 depends on it.
7127 case " $CXX $CXXFLAGS " in
7128 *" -library=stlport4 "*)
7129 solaris_use_stlport4=yes
7130 ;;
7131 esac
7132
7133 # Adding this requires a known-good setup of shared libraries for
7134 # Sun compiler versions before 5.6, else PIC objects from an old
7135 # archive will be linked into the output, leading to subtle bugs.
7136 if test "$solaris_use_stlport4" != yes; then
7137 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7138 fi
7139 ;;
7140 esac
7141 ;;
7142 esac
7143 ])
7144
7145 case " $_LT_TAGVAR(postdeps, $1) " in
7146 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
7147 esac
7148 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
7149 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
7150 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
7151 fi
7152 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
7153 [The directories searched by this compiler when creating a shared library])
7154 _LT_TAGDECL([], [predep_objects], [1],
7155 [Dependencies to place before and after the objects being linked to
7156 create a shared library])
7157 _LT_TAGDECL([], [postdep_objects], [1])
7158 _LT_TAGDECL([], [predeps], [1])
7159 _LT_TAGDECL([], [postdeps], [1])
7160 _LT_TAGDECL([], [compiler_lib_search_path], [1],
7161 [The library search path used internally by the compiler when linking
7162 a shared library])
7163 ])# _LT_SYS_HIDDEN_LIBDEPS
7164
7165
7166 # _LT_LANG_F77_CONFIG([TAG])
7167 # --------------------------
7168 # Ensure that the configuration variables for a Fortran 77 compiler are
7169 # suitably defined. These variables are subsequently used by _LT_CONFIG
7170 # to write the compiler configuration to `libtool'.
7171 m4_defun([_LT_LANG_F77_CONFIG],
7172 [AC_LANG_PUSH(Fortran 77)
7173 if test -z "$F77" || test "X$F77" = "Xno"; then
7174 _lt_disable_F77=yes
7175 fi
7176
7177 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7178 _LT_TAGVAR(allow_undefined_flag, $1)=
7179 _LT_TAGVAR(always_export_symbols, $1)=no
7180 _LT_TAGVAR(archive_expsym_cmds, $1)=
7181 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7182 _LT_TAGVAR(hardcode_direct, $1)=no
7183 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7184 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7185 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7186 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7187 _LT_TAGVAR(hardcode_minus_L, $1)=no
7188 _LT_TAGVAR(hardcode_automatic, $1)=no
7189 _LT_TAGVAR(inherit_rpath, $1)=no
7190 _LT_TAGVAR(module_cmds, $1)=
7191 _LT_TAGVAR(module_expsym_cmds, $1)=
7192 _LT_TAGVAR(link_all_deplibs, $1)=unknown
7193 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7194 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7195 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7196 _LT_TAGVAR(no_undefined_flag, $1)=
7197 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7198 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7199
7200 # Source file extension for f77 test sources.
7201 ac_ext=f
7202
7203 # Object file extension for compiled f77 test sources.
7204 objext=o
7205 _LT_TAGVAR(objext, $1)=$objext
7206
7207 # No sense in running all these tests if we already determined that
7208 # the F77 compiler isn't working. Some variables (like enable_shared)
7209 # are currently assumed to apply to all compilers on this platform,
7210 # and will be corrupted by setting them based on a non-working compiler.
7211 if test "$_lt_disable_F77" != yes; then
7212 # Code to be used in simple compile tests
7213 lt_simple_compile_test_code="\
7214 subroutine t
7215 return
7216 end
7217 "
7218
7219 # Code to be used in simple link tests
7220 lt_simple_link_test_code="\
7221 program t
7222 end
7223 "
7224
7225 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7226 _LT_TAG_COMPILER
7227
7228 # save warnings/boilerplate of simple test code
7229 _LT_COMPILER_BOILERPLATE
7230 _LT_LINKER_BOILERPLATE
7231
7232 # Allow CC to be a program name with arguments.
7233 lt_save_CC="$CC"
7234 lt_save_GCC=$GCC
7235 lt_save_CFLAGS=$CFLAGS
7236 CC=${F77-"f77"}
7237 CFLAGS=$FFLAGS
7238 compiler=$CC
7239 _LT_TAGVAR(compiler, $1)=$CC
7240 _LT_CC_BASENAME([$compiler])
7241 GCC=$G77
7242 if test -n "$compiler"; then
7243 AC_MSG_CHECKING([if libtool supports shared libraries])
7244 AC_MSG_RESULT([$can_build_shared])
7245
7246 AC_MSG_CHECKING([whether to build shared libraries])
7247 test "$can_build_shared" = "no" && enable_shared=no
7248
7249 # On AIX, shared libraries and static libraries use the same namespace, and
7250 # are all built from PIC.
7251 case $host_os in
7252 aix3*)
7253 test "$enable_shared" = yes && enable_static=no
7254 if test -n "$RANLIB"; then
7255 archive_cmds="$archive_cmds~\$RANLIB \$lib"
7256 postinstall_cmds='$RANLIB $lib'
7257 fi
7258 ;;
7259 aix[[4-9]]*)
7260 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7261 test "$enable_shared" = yes && enable_static=no
7262 fi
7263 ;;
7264 esac
7265 AC_MSG_RESULT([$enable_shared])
7266
7267 AC_MSG_CHECKING([whether to build static libraries])
7268 # Make sure either enable_shared or enable_static is yes.
7269 test "$enable_shared" = yes || enable_static=yes
7270 AC_MSG_RESULT([$enable_static])
7271
7272 _LT_TAGVAR(GCC, $1)="$G77"
7273 _LT_TAGVAR(LD, $1)="$LD"
7274
7275 ## CAVEAT EMPTOR:
7276 ## There is no encapsulation within the following macros, do not change
7277 ## the running order or otherwise move them around unless you know exactly
7278 ## what you are doing...
7279 _LT_COMPILER_PIC($1)
7280 _LT_COMPILER_C_O($1)
7281 _LT_COMPILER_FILE_LOCKS($1)
7282 _LT_LINKER_SHLIBS($1)
7283 _LT_SYS_DYNAMIC_LINKER($1)
7284 _LT_LINKER_HARDCODE_LIBPATH($1)
7285
7286 _LT_CONFIG($1)
7287 fi # test -n "$compiler"
7288
7289 GCC=$lt_save_GCC
7290 CC="$lt_save_CC"
7291 CFLAGS="$lt_save_CFLAGS"
7292 fi # test "$_lt_disable_F77" != yes
7293
7294 AC_LANG_POP
7295 ])# _LT_LANG_F77_CONFIG
7296
7297
7298 # _LT_LANG_FC_CONFIG([TAG])
7299 # -------------------------
7300 # Ensure that the configuration variables for a Fortran compiler are
7301 # suitably defined. These variables are subsequently used by _LT_CONFIG
7302 # to write the compiler configuration to `libtool'.
7303 m4_defun([_LT_LANG_FC_CONFIG],
7304 [AC_LANG_PUSH(Fortran)
7305
7306 if test -z "$FC" || test "X$FC" = "Xno"; then
7307 _lt_disable_FC=yes
7308 fi
7309
7310 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7311 _LT_TAGVAR(allow_undefined_flag, $1)=
7312 _LT_TAGVAR(always_export_symbols, $1)=no
7313 _LT_TAGVAR(archive_expsym_cmds, $1)=
7314 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7315 _LT_TAGVAR(hardcode_direct, $1)=no
7316 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7317 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7318 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7319 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7320 _LT_TAGVAR(hardcode_minus_L, $1)=no
7321 _LT_TAGVAR(hardcode_automatic, $1)=no
7322 _LT_TAGVAR(inherit_rpath, $1)=no
7323 _LT_TAGVAR(module_cmds, $1)=
7324 _LT_TAGVAR(module_expsym_cmds, $1)=
7325 _LT_TAGVAR(link_all_deplibs, $1)=unknown
7326 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7327 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7328 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7329 _LT_TAGVAR(no_undefined_flag, $1)=
7330 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7331 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7332
7333 # Source file extension for fc test sources.
7334 ac_ext=${ac_fc_srcext-f}
7335
7336 # Object file extension for compiled fc test sources.
7337 objext=o
7338 _LT_TAGVAR(objext, $1)=$objext
7339
7340 # No sense in running all these tests if we already determined that
7341 # the FC compiler isn't working. Some variables (like enable_shared)
7342 # are currently assumed to apply to all compilers on this platform,
7343 # and will be corrupted by setting them based on a non-working compiler.
7344 if test "$_lt_disable_FC" != yes; then
7345 # Code to be used in simple compile tests
7346 lt_simple_compile_test_code="\
7347 subroutine t
7348 return
7349 end
7350 "
7351
7352 # Code to be used in simple link tests
7353 lt_simple_link_test_code="\
7354 program t
7355 end
7356 "
7357
7358 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7359 _LT_TAG_COMPILER
7360
7361 # save warnings/boilerplate of simple test code
7362 _LT_COMPILER_BOILERPLATE
7363 _LT_LINKER_BOILERPLATE
7364
7365 # Allow CC to be a program name with arguments.
7366 lt_save_CC="$CC"
7367 lt_save_GCC=$GCC
7368 lt_save_CFLAGS=$CFLAGS
7369 CC=${FC-"f95"}
7370 CFLAGS=$FCFLAGS
7371 compiler=$CC
7372 GCC=$ac_cv_fc_compiler_gnu
7373
7374 _LT_TAGVAR(compiler, $1)=$CC
7375 _LT_CC_BASENAME([$compiler])
7376
7377 if test -n "$compiler"; then
7378 AC_MSG_CHECKING([if libtool supports shared libraries])
7379 AC_MSG_RESULT([$can_build_shared])
7380
7381 AC_MSG_CHECKING([whether to build shared libraries])
7382 test "$can_build_shared" = "no" && enable_shared=no
7383
7384 # On AIX, shared libraries and static libraries use the same namespace, and
7385 # are all built from PIC.
7386 case $host_os in
7387 aix3*)
7388 test "$enable_shared" = yes && enable_static=no
7389 if test -n "$RANLIB"; then
7390 archive_cmds="$archive_cmds~\$RANLIB \$lib"
7391 postinstall_cmds='$RANLIB $lib'
7392 fi
7393 ;;
7394 aix[[4-9]]*)
7395 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7396 test "$enable_shared" = yes && enable_static=no
7397 fi
7398 ;;
7399 esac
7400 AC_MSG_RESULT([$enable_shared])
7401
7402 AC_MSG_CHECKING([whether to build static libraries])
7403 # Make sure either enable_shared or enable_static is yes.
7404 test "$enable_shared" = yes || enable_static=yes
7405 AC_MSG_RESULT([$enable_static])
7406
7407 _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
7408 _LT_TAGVAR(LD, $1)="$LD"
7409
7410 ## CAVEAT EMPTOR:
7411 ## There is no encapsulation within the following macros, do not change
7412 ## the running order or otherwise move them around unless you know exactly
7413 ## what you are doing...
7414 _LT_SYS_HIDDEN_LIBDEPS($1)
7415 _LT_COMPILER_PIC($1)
7416 _LT_COMPILER_C_O($1)
7417 _LT_COMPILER_FILE_LOCKS($1)
7418 _LT_LINKER_SHLIBS($1)
7419 _LT_SYS_DYNAMIC_LINKER($1)
7420 _LT_LINKER_HARDCODE_LIBPATH($1)
7421
7422 _LT_CONFIG($1)
7423 fi # test -n "$compiler"
7424
7425 GCC=$lt_save_GCC
7426 CC=$lt_save_CC
7427 CFLAGS=$lt_save_CFLAGS
7428 fi # test "$_lt_disable_FC" != yes
7429
7430 AC_LANG_POP
7431 ])# _LT_LANG_FC_CONFIG
7432
7433
7434 # _LT_LANG_GCJ_CONFIG([TAG])
7435 # --------------------------
7436 # Ensure that the configuration variables for the GNU Java Compiler compiler
7437 # are suitably defined. These variables are subsequently used by _LT_CONFIG
7438 # to write the compiler configuration to `libtool'.
7439 m4_defun([_LT_LANG_GCJ_CONFIG],
7440 [AC_REQUIRE([LT_PROG_GCJ])dnl
7441 AC_LANG_SAVE
7442
7443 # Source file extension for Java test sources.
7444 ac_ext=java
7445
7446 # Object file extension for compiled Java test sources.
7447 objext=o
7448 _LT_TAGVAR(objext, $1)=$objext
7449
7450 # Code to be used in simple compile tests
7451 lt_simple_compile_test_code="class foo {}"
7452
7453 # Code to be used in simple link tests
7454 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
7455
7456 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7457 _LT_TAG_COMPILER
7458
7459 # save warnings/boilerplate of simple test code
7460 _LT_COMPILER_BOILERPLATE
7461 _LT_LINKER_BOILERPLATE
7462
7463 # Allow CC to be a program name with arguments.
7464 lt_save_CC=$CC
7465 lt_save_CFLAGS=$CFLAGS
7466 lt_save_GCC=$GCC
7467 GCC=yes
7468 CC=${GCJ-"gcj"}
7469 CFLAGS=$GCJFLAGS
7470 compiler=$CC
7471 _LT_TAGVAR(compiler, $1)=$CC
7472 _LT_TAGVAR(LD, $1)="$LD"
7473 _LT_CC_BASENAME([$compiler])
7474
7475 # GCJ did not exist at the time GCC didn't implicitly link libc in.
7476 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7477
7478 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7479 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7480 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7481
7482 if test -n "$compiler"; then
7483 _LT_COMPILER_NO_RTTI($1)
7484 _LT_COMPILER_PIC($1)
7485 _LT_COMPILER_C_O($1)
7486 _LT_COMPILER_FILE_LOCKS($1)
7487 _LT_LINKER_SHLIBS($1)
7488 _LT_LINKER_HARDCODE_LIBPATH($1)
7489
7490 _LT_CONFIG($1)
7491 fi
7492
7493 AC_LANG_RESTORE
7494
7495 GCC=$lt_save_GCC
7496 CC=$lt_save_CC
7497 CFLAGS=$lt_save_CFLAGS
7498 ])# _LT_LANG_GCJ_CONFIG
7499
7500
7501 # _LT_LANG_RC_CONFIG([TAG])
7502 # -------------------------
7503 # Ensure that the configuration variables for the Windows resource compiler
7504 # are suitably defined. These variables are subsequently used by _LT_CONFIG
7505 # to write the compiler configuration to `libtool'.
7506 m4_defun([_LT_LANG_RC_CONFIG],
7507 [AC_REQUIRE([LT_PROG_RC])dnl
7508 AC_LANG_SAVE
7509
7510 # Source file extension for RC test sources.
7511 ac_ext=rc
7512
7513 # Object file extension for compiled RC test sources.
7514 objext=o
7515 _LT_TAGVAR(objext, $1)=$objext
7516
7517 # Code to be used in simple compile tests
7518 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
7519
7520 # Code to be used in simple link tests
7521 lt_simple_link_test_code="$lt_simple_compile_test_code"
7522
7523 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7524 _LT_TAG_COMPILER
7525
7526 # save warnings/boilerplate of simple test code
7527 _LT_COMPILER_BOILERPLATE
7528 _LT_LINKER_BOILERPLATE
7529
7530 # Allow CC to be a program name with arguments.
7531 lt_save_CC="$CC"
7532 lt_save_CFLAGS=$CFLAGS
7533 lt_save_GCC=$GCC
7534 GCC=
7535 CC=${RC-"windres"}
7536 CFLAGS=
7537 compiler=$CC
7538 _LT_TAGVAR(compiler, $1)=$CC
7539 _LT_CC_BASENAME([$compiler])
7540 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
7541
7542 if test -n "$compiler"; then
7543 :
7544 _LT_CONFIG($1)
7545 fi
7546
7547 GCC=$lt_save_GCC
7548 AC_LANG_RESTORE
7549 CC=$lt_save_CC
7550 CFLAGS=$lt_save_CFLAGS
7551 ])# _LT_LANG_RC_CONFIG
7552
7553
7554 # LT_PROG_GCJ
7555 # -----------
7556 AC_DEFUN([LT_PROG_GCJ],
7557 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
7558 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
7559 [AC_CHECK_TOOL(GCJ, gcj,)
7560 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
7561 AC_SUBST(GCJFLAGS)])])[]dnl
7562 ])
7563
7564 # Old name:
7565 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
7566 dnl aclocal-1.4 backwards compatibility:
7567 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
7568
7569
7570 # LT_PROG_RC
7571 # ----------
7572 AC_DEFUN([LT_PROG_RC],
7573 [AC_CHECK_TOOL(RC, windres,)
7574 ])
7575
7576 # Old name:
7577 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
7578 dnl aclocal-1.4 backwards compatibility:
7579 dnl AC_DEFUN([LT_AC_PROG_RC], [])
7580
7581
7582 # _LT_DECL_EGREP
7583 # --------------
7584 # If we don't have a new enough Autoconf to choose the best grep
7585 # available, choose the one first in the user's PATH.
7586 m4_defun([_LT_DECL_EGREP],
7587 [AC_REQUIRE([AC_PROG_EGREP])dnl
7588 AC_REQUIRE([AC_PROG_FGREP])dnl
7589 test -z "$GREP" && GREP=grep
7590 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
7591 _LT_DECL([], [EGREP], [1], [An ERE matcher])
7592 _LT_DECL([], [FGREP], [1], [A literal string matcher])
7593 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
7594 AC_SUBST([GREP])
7595 ])
7596
7597
7598 # _LT_DECL_OBJDUMP
7599 # --------------
7600 # If we don't have a new enough Autoconf to choose the best objdump
7601 # available, choose the one first in the user's PATH.
7602 m4_defun([_LT_DECL_OBJDUMP],
7603 [AC_CHECK_TOOL(OBJDUMP, objdump, false)
7604 test -z "$OBJDUMP" && OBJDUMP=objdump
7605 _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
7606 AC_SUBST([OBJDUMP])
7607 ])
7608
7609 # _LT_DECL_DLLTOOL
7610 # ----------------
7611 # Ensure DLLTOOL variable is set.
7612 m4_defun([_LT_DECL_DLLTOOL],
7613 [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
7614 test -z "$DLLTOOL" && DLLTOOL=dlltool
7615 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
7616 AC_SUBST([DLLTOOL])
7617 ])
7618
7619 # _LT_DECL_SED
7620 # ------------
7621 # Check for a fully-functional sed program, that truncates
7622 # as few characters as possible. Prefer GNU sed if found.
7623 m4_defun([_LT_DECL_SED],
7624 [AC_PROG_SED
7625 test -z "$SED" && SED=sed
7626 Xsed="$SED -e 1s/^X//"
7627 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
7628 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
7629 [Sed that helps us avoid accidentally triggering echo(1) options like -n])
7630 ])# _LT_DECL_SED
7631
7632 m4_ifndef([AC_PROG_SED], [
7633 # NOTE: This macro has been submitted for inclusion into #
7634 # GNU Autoconf as AC_PROG_SED. When it is available in #
7635 # a released version of Autoconf we should remove this #
7636 # macro and use it instead. #
7637
7638 m4_defun([AC_PROG_SED],
7639 [AC_MSG_CHECKING([for a sed that does not truncate output])
7640 AC_CACHE_VAL(lt_cv_path_SED,
7641 [# Loop through the user's path and test for sed and gsed.
7642 # Then use that list of sed's as ones to test for truncation.
7643 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7644 for as_dir in $PATH
7645 do
7646 IFS=$as_save_IFS
7647 test -z "$as_dir" && as_dir=.
7648 for lt_ac_prog in sed gsed; do
7649 for ac_exec_ext in '' $ac_executable_extensions; do
7650 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
7651 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
7652 fi
7653 done
7654 done
7655 done
7656 IFS=$as_save_IFS
7657 lt_ac_max=0
7658 lt_ac_count=0
7659 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
7660 # along with /bin/sed that truncates output.
7661 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
7662 test ! -f $lt_ac_sed && continue
7663 cat /dev/null > conftest.in
7664 lt_ac_count=0
7665 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
7666 # Check for GNU sed and select it if it is found.
7667 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
7668 lt_cv_path_SED=$lt_ac_sed
7669 break
7670 fi
7671 while true; do
7672 cat conftest.in conftest.in >conftest.tmp
7673 mv conftest.tmp conftest.in
7674 cp conftest.in conftest.nl
7675 echo >>conftest.nl
7676 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
7677 cmp -s conftest.out conftest.nl || break
7678 # 10000 chars as input seems more than enough
7679 test $lt_ac_count -gt 10 && break
7680 lt_ac_count=`expr $lt_ac_count + 1`
7681 if test $lt_ac_count -gt $lt_ac_max; then
7682 lt_ac_max=$lt_ac_count
7683 lt_cv_path_SED=$lt_ac_sed
7684 fi
7685 done
7686 done
7687 ])
7688 SED=$lt_cv_path_SED
7689 AC_SUBST([SED])
7690 AC_MSG_RESULT([$SED])
7691 ])#AC_PROG_SED
7692 ])#m4_ifndef
7693
7694 # Old name:
7695 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
7696 dnl aclocal-1.4 backwards compatibility:
7697 dnl AC_DEFUN([LT_AC_PROG_SED], [])
7698
7699
7700 # _LT_CHECK_SHELL_FEATURES
7701 # ------------------------
7702 # Find out whether the shell is Bourne or XSI compatible,
7703 # or has some other useful features.
7704 m4_defun([_LT_CHECK_SHELL_FEATURES],
7705 [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
7706 # Try some XSI features
7707 xsi_shell=no
7708 ( _lt_dummy="a/b/c"
7709 test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
7710 = c,a/b,b/c, \
7711 && eval 'test $(( 1 + 1 )) -eq 2 \
7712 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
7713 && xsi_shell=yes
7714 AC_MSG_RESULT([$xsi_shell])
7715 _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
7716
7717 AC_MSG_CHECKING([whether the shell understands "+="])
7718 lt_shell_append=no
7719 ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
7720 >/dev/null 2>&1 \
7721 && lt_shell_append=yes
7722 AC_MSG_RESULT([$lt_shell_append])
7723 _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
7724
7725 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7726 lt_unset=unset
7727 else
7728 lt_unset=false
7729 fi
7730 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
7731
7732 # test EBCDIC or ASCII
7733 case `echo X|tr X '\101'` in
7734 A) # ASCII based system
7735 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7736 lt_SP2NL='tr \040 \012'
7737 lt_NL2SP='tr \015\012 \040\040'
7738 ;;
7739 *) # EBCDIC based system
7740 lt_SP2NL='tr \100 \n'
7741 lt_NL2SP='tr \r\n \100\100'
7742 ;;
7743 esac
7744 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
7745 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
7746 ])# _LT_CHECK_SHELL_FEATURES
7747
7748
7749 # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
7750 # ------------------------------------------------------
7751 # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
7752 # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
7753 m4_defun([_LT_PROG_FUNCTION_REPLACE],
7754 [dnl {
7755 sed -e '/^$1 ()$/,/^} # $1 /c\
7756 $1 ()\
7757 {\
7758 m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1])
7759 } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
7760 && mv -f "$cfgfile.tmp" "$cfgfile" \
7761 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7762 test 0 -eq $? || _lt_function_replace_fail=:
7763 ])
7764
7765
7766 # _LT_PROG_REPLACE_SHELLFNS
7767 # -------------------------
7768 # Replace existing portable implementations of several shell functions with
7769 # equivalent extended shell implementations where those features are available..
7770 m4_defun([_LT_PROG_REPLACE_SHELLFNS],
7771 [if test x"$xsi_shell" = xyes; then
7772 _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
7773 case ${1} in
7774 */*) func_dirname_result="${1%/*}${2}" ;;
7775 * ) func_dirname_result="${3}" ;;
7776 esac])
7777
7778 _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
7779 func_basename_result="${1##*/}"])
7780
7781 _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
7782 case ${1} in
7783 */*) func_dirname_result="${1%/*}${2}" ;;
7784 * ) func_dirname_result="${3}" ;;
7785 esac
7786 func_basename_result="${1##*/}"])
7787
7788 _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
7789 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
7790 # positional parameters, so assign one to ordinary parameter first.
7791 func_stripname_result=${3}
7792 func_stripname_result=${func_stripname_result#"${1}"}
7793 func_stripname_result=${func_stripname_result%"${2}"}])
7794
7795 _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
7796 func_split_long_opt_name=${1%%=*}
7797 func_split_long_opt_arg=${1#*=}])
7798
7799 _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
7800 func_split_short_opt_arg=${1#??}
7801 func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
7802
7803 _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
7804 case ${1} in
7805 *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
7806 *) func_lo2o_result=${1} ;;
7807 esac])
7808
7809 _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo])
7810
7811 _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))])
7812
7813 _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}])
7814 fi
7815
7816 if test x"$lt_shell_append" = xyes; then
7817 _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"])
7818
7819 _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
7820 func_quote_for_eval "${2}"
7821 dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
7822 eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
7823
7824 # Save a `func_append' function call where possible by direct use of '+='
7825 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
7826 && mv -f "$cfgfile.tmp" "$cfgfile" \
7827 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7828 test 0 -eq $? || _lt_function_replace_fail=:
7829 else
7830 # Save a `func_append' function call even when '+=' is not available
7831 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
7832 && mv -f "$cfgfile.tmp" "$cfgfile" \
7833 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7834 test 0 -eq $? || _lt_function_replace_fail=:
7835 fi
7836
7837 if test x"$_lt_function_replace_fail" = x":"; then
7838 AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
7839 fi
7840 ])
7841
7842 # _LT_PATH_CONVERSION_FUNCTIONS
7843 # -----------------------------
7844 # Determine which file name conversion functions should be used by
7845 # func_to_host_file (and, implicitly, by func_to_host_path). These are needed
7846 # for certain cross-compile configurations and native mingw.
7847 m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
7848 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
7849 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
7850 AC_MSG_CHECKING([how to convert $build file names to $host format])
7851 AC_CACHE_VAL(lt_cv_to_host_file_cmd,
7852 [case $host in
7853 *-*-mingw* )
7854 case $build in
7855 *-*-mingw* ) # actually msys
7856 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
7857 ;;
7858 *-*-cygwin* )
7859 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
7860 ;;
7861 * ) # otherwise, assume *nix
7862 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
7863 ;;
7864 esac
7865 ;;
7866 *-*-cygwin* )
7867 case $build in
7868 *-*-mingw* ) # actually msys
7869 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
7870 ;;
7871 *-*-cygwin* )
7872 lt_cv_to_host_file_cmd=func_convert_file_noop
7873 ;;
7874 * ) # otherwise, assume *nix
7875 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
7876 ;;
7877 esac
7878 ;;
7879 * ) # unhandled hosts (and "normal" native builds)
7880 lt_cv_to_host_file_cmd=func_convert_file_noop
7881 ;;
7882 esac
7883 ])
7884 to_host_file_cmd=$lt_cv_to_host_file_cmd
7885 AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
7886 _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
7887 [0], [convert $build file names to $host format])dnl
7888
7889 AC_MSG_CHECKING([how to convert $build file names to toolchain format])
7890 AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
7891 [#assume ordinary cross tools, or native build.
7892 lt_cv_to_tool_file_cmd=func_convert_file_noop
7893 case $host in
7894 *-*-mingw* )
7895 case $build in
7896 *-*-mingw* ) # actually msys
7897 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
7898 ;;
7899 esac
7900 ;;
7901 esac
7902 ])
7903 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
7904 AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
7905 _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
7906 [0], [convert $build files to toolchain format])dnl
7907 ])# _LT_PATH_CONVERSION_FUNCTIONS
7908
7909 # Helper functions for option handling. -*- Autoconf -*-
7910 #
7911 # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
7912 # Inc.
7913 # Written by Gary V. Vaughan, 2004
7914 #
7915 # This file is free software; the Free Software Foundation gives
7916 # unlimited permission to copy and/or distribute it, with or without
7917 # modifications, as long as this notice is preserved.
7918
7919 # serial 7 ltoptions.m4
7920
7921 # This is to help aclocal find these macros, as it can't see m4_define.
7922 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
7923
7924
7925 # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
7926 # ------------------------------------------
7927 m4_define([_LT_MANGLE_OPTION],
7928 [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
7929
7930
7931 # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
7932 # ---------------------------------------
7933 # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
7934 # matching handler defined, dispatch to it. Other OPTION-NAMEs are
7935 # saved as a flag.
7936 m4_define([_LT_SET_OPTION],
7937 [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
7938 m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
7939 _LT_MANGLE_DEFUN([$1], [$2]),
7940 [m4_warning([Unknown $1 option `$2'])])[]dnl
7941 ])
7942
7943
7944 # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
7945 # ------------------------------------------------------------
7946 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
7947 m4_define([_LT_IF_OPTION],
7948 [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
7949
7950
7951 # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
7952 # -------------------------------------------------------
7953 # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
7954 # are set.
7955 m4_define([_LT_UNLESS_OPTIONS],
7956 [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
7957 [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
7958 [m4_define([$0_found])])])[]dnl
7959 m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
7960 ])[]dnl
7961 ])
7962
7963
7964 # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
7965 # ----------------------------------------
7966 # OPTION-LIST is a space-separated list of Libtool options associated
7967 # with MACRO-NAME. If any OPTION has a matching handler declared with
7968 # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
7969 # the unknown option and exit.
7970 m4_defun([_LT_SET_OPTIONS],
7971 [# Set options
7972 m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
7973 [_LT_SET_OPTION([$1], _LT_Option)])
7974
7975 m4_if([$1],[LT_INIT],[
7976 dnl
7977 dnl Simply set some default values (i.e off) if boolean options were not
7978 dnl specified:
7979 _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
7980 ])
7981 _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
7982 ])
7983 dnl
7984 dnl If no reference was made to various pairs of opposing options, then
7985 dnl we run the default mode handler for the pair. For example, if neither
7986 dnl `shared' nor `disable-shared' was passed, we enable building of shared
7987 dnl archives by default:
7988 _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
7989 _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
7990 _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
7991 _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
7992 [_LT_ENABLE_FAST_INSTALL])
7993 ])
7994 ])# _LT_SET_OPTIONS
7995
7996
7997
7998 # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
7999 # -----------------------------------------
8000 m4_define([_LT_MANGLE_DEFUN],
8001 [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
8002
8003
8004 # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
8005 # -----------------------------------------------
8006 m4_define([LT_OPTION_DEFINE],
8007 [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
8008 ])# LT_OPTION_DEFINE
8009
8010
8011 # dlopen
8012 # ------
8013 LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
8014 ])
8015
8016 AU_DEFUN([AC_LIBTOOL_DLOPEN],
8017 [_LT_SET_OPTION([LT_INIT], [dlopen])
8018 AC_DIAGNOSE([obsolete],
8019 [$0: Remove this warning and the call to _LT_SET_OPTION when you
8020 put the `dlopen' option into LT_INIT's first parameter.])
8021 ])
8022
8023 dnl aclocal-1.4 backwards compatibility:
8024 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
8025
8026
8027 # win32-dll
8028 # ---------
8029 # Declare package support for building win32 dll's.
8030 LT_OPTION_DEFINE([LT_INIT], [win32-dll],
8031 [enable_win32_dll=yes
8032
8033 case $host in
8034 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
8035 AC_CHECK_TOOL(AS, as, false)
8036 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8037 AC_CHECK_TOOL(OBJDUMP, objdump, false)
8038 ;;
8039 esac
8040
8041 test -z "$AS" && AS=as
8042 _LT_DECL([], [AS], [1], [Assembler program])dnl
8043
8044 test -z "$DLLTOOL" && DLLTOOL=dlltool
8045 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
8046
8047 test -z "$OBJDUMP" && OBJDUMP=objdump
8048 _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
8049 ])# win32-dll
8050
8051 AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
8052 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
8053 _LT_SET_OPTION([LT_INIT], [win32-dll])
8054 AC_DIAGNOSE([obsolete],
8055 [$0: Remove this warning and the call to _LT_SET_OPTION when you
8056 put the `win32-dll' option into LT_INIT's first parameter.])
8057 ])
8058
8059 dnl aclocal-1.4 backwards compatibility:
8060 dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
8061
8062
8063 # _LT_ENABLE_SHARED([DEFAULT])
8064 # ----------------------------
8065 # implement the --enable-shared flag, and supports the `shared' and
8066 # `disable-shared' LT_INIT options.
8067 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
8068 m4_define([_LT_ENABLE_SHARED],
8069 [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
8070 AC_ARG_ENABLE([shared],
8071 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
8072 [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
8073 [p=${PACKAGE-default}
8074 case $enableval in
8075 yes) enable_shared=yes ;;
8076 no) enable_shared=no ;;
8077 *)
8078 enable_shared=no
8079 # Look at the argument we got. We use all the common list separators.
8080 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8081 for pkg in $enableval; do
8082 IFS="$lt_save_ifs"
8083 if test "X$pkg" = "X$p"; then
8084 enable_shared=yes
8085 fi
8086 done
8087 IFS="$lt_save_ifs"
8088 ;;
8089 esac],
8090 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
8091
8092 _LT_DECL([build_libtool_libs], [enable_shared], [0],
8093 [Whether or not to build shared libraries])
8094 ])# _LT_ENABLE_SHARED
8095
8096 LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
8097 LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
8098
8099 # Old names:
8100 AC_DEFUN([AC_ENABLE_SHARED],
8101 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
8102 ])
8103
8104 AC_DEFUN([AC_DISABLE_SHARED],
8105 [_LT_SET_OPTION([LT_INIT], [disable-shared])
8106 ])
8107
8108 AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
8109 AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
8110
8111 dnl aclocal-1.4 backwards compatibility:
8112 dnl AC_DEFUN([AM_ENABLE_SHARED], [])
8113 dnl AC_DEFUN([AM_DISABLE_SHARED], [])
8114
8115
8116
8117 # _LT_ENABLE_STATIC([DEFAULT])
8118 # ----------------------------
8119 # implement the --enable-static flag, and support the `static' and
8120 # `disable-static' LT_INIT options.
8121 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
8122 m4_define([_LT_ENABLE_STATIC],
8123 [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
8124 AC_ARG_ENABLE([static],
8125 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
8126 [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
8127 [p=${PACKAGE-default}
8128 case $enableval in
8129 yes) enable_static=yes ;;
8130 no) enable_static=no ;;
8131 *)
8132 enable_static=no
8133 # Look at the argument we got. We use all the common list separators.
8134 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8135 for pkg in $enableval; do
8136 IFS="$lt_save_ifs"
8137 if test "X$pkg" = "X$p"; then
8138 enable_static=yes
8139 fi
8140 done
8141 IFS="$lt_save_ifs"
8142 ;;
8143 esac],
8144 [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
8145
8146 _LT_DECL([build_old_libs], [enable_static], [0],
8147 [Whether or not to build static libraries])
8148 ])# _LT_ENABLE_STATIC
8149
8150 LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
8151 LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
8152
8153 # Old names:
8154 AC_DEFUN([AC_ENABLE_STATIC],
8155 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
8156 ])
8157
8158 AC_DEFUN([AC_DISABLE_STATIC],
8159 [_LT_SET_OPTION([LT_INIT], [disable-static])
8160 ])
8161
8162 AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
8163 AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
8164
8165 dnl aclocal-1.4 backwards compatibility:
8166 dnl AC_DEFUN([AM_ENABLE_STATIC], [])
8167 dnl AC_DEFUN([AM_DISABLE_STATIC], [])
8168
8169
8170
8171 # _LT_ENABLE_FAST_INSTALL([DEFAULT])
8172 # ----------------------------------
8173 # implement the --enable-fast-install flag, and support the `fast-install'
8174 # and `disable-fast-install' LT_INIT options.
8175 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
8176 m4_define([_LT_ENABLE_FAST_INSTALL],
8177 [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
8178 AC_ARG_ENABLE([fast-install],
8179 [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
8180 [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
8181 [p=${PACKAGE-default}
8182 case $enableval in
8183 yes) enable_fast_install=yes ;;
8184 no) enable_fast_install=no ;;
8185 *)
8186 enable_fast_install=no
8187 # Look at the argument we got. We use all the common list separators.
8188 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8189 for pkg in $enableval; do
8190 IFS="$lt_save_ifs"
8191 if test "X$pkg" = "X$p"; then
8192 enable_fast_install=yes
8193 fi
8194 done
8195 IFS="$lt_save_ifs"
8196 ;;
8197 esac],
8198 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
8199
8200 _LT_DECL([fast_install], [enable_fast_install], [0],
8201 [Whether or not to optimize for fast installation])dnl
8202 ])# _LT_ENABLE_FAST_INSTALL
8203
8204 LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
8205 LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
8206
8207 # Old names:
8208 AU_DEFUN([AC_ENABLE_FAST_INSTALL],
8209 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
8210 AC_DIAGNOSE([obsolete],
8211 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
8212 the `fast-install' option into LT_INIT's first parameter.])
8213 ])
8214
8215 AU_DEFUN([AC_DISABLE_FAST_INSTALL],
8216 [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
8217 AC_DIAGNOSE([obsolete],
8218 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
8219 the `disable-fast-install' option into LT_INIT's first parameter.])
8220 ])
8221
8222 dnl aclocal-1.4 backwards compatibility:
8223 dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
8224 dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
8225
8226
8227 # _LT_WITH_PIC([MODE])
8228 # --------------------
8229 # implement the --with-pic flag, and support the `pic-only' and `no-pic'
8230 # LT_INIT options.
8231 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
8232 m4_define([_LT_WITH_PIC],
8233 [AC_ARG_WITH([pic],
8234 [AS_HELP_STRING([--with-pic],
8235 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
8236 [pic_mode="$withval"],
8237 [pic_mode=default])
8238
8239 test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
8240
8241 _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
8242 ])# _LT_WITH_PIC
8243
8244 LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
8245 LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
8246
8247 # Old name:
8248 AU_DEFUN([AC_LIBTOOL_PICMODE],
8249 [_LT_SET_OPTION([LT_INIT], [pic-only])
8250 AC_DIAGNOSE([obsolete],
8251 [$0: Remove this warning and the call to _LT_SET_OPTION when you
8252 put the `pic-only' option into LT_INIT's first parameter.])
8253 ])
8254
8255 dnl aclocal-1.4 backwards compatibility:
8256 dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
8257
8258
8259 m4_define([_LTDL_MODE], [])
8260 LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
8261 [m4_define([_LTDL_MODE], [nonrecursive])])
8262 LT_OPTION_DEFINE([LTDL_INIT], [recursive],
8263 [m4_define([_LTDL_MODE], [recursive])])
8264 LT_OPTION_DEFINE([LTDL_INIT], [subproject],
8265 [m4_define([_LTDL_MODE], [subproject])])
8266
8267 m4_define([_LTDL_TYPE], [])
8268 LT_OPTION_DEFINE([LTDL_INIT], [installable],
8269 [m4_define([_LTDL_TYPE], [installable])])
8270 LT_OPTION_DEFINE([LTDL_INIT], [convenience],
8271 [m4_define([_LTDL_TYPE], [convenience])])
8272
8273 # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
8274 #
8275 # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
8276 # Written by Gary V. Vaughan, 2004
8277 #
8278 # This file is free software; the Free Software Foundation gives
8279 # unlimited permission to copy and/or distribute it, with or without
8280 # modifications, as long as this notice is preserved.
8281
8282 # serial 6 ltsugar.m4
8283
8284 # This is to help aclocal find these macros, as it can't see m4_define.
8285 AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
8286
8287
8288 # lt_join(SEP, ARG1, [ARG2...])
8289 # -----------------------------
8290 # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
8291 # associated separator.
8292 # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
8293 # versions in m4sugar had bugs.
8294 m4_define([lt_join],
8295 [m4_if([$#], [1], [],
8296 [$#], [2], [[$2]],
8297 [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
8298 m4_define([_lt_join],
8299 [m4_if([$#$2], [2], [],
8300 [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
8301
8302
8303 # lt_car(LIST)
8304 # lt_cdr(LIST)
8305 # ------------
8306 # Manipulate m4 lists.
8307 # These macros are necessary as long as will still need to support
8308 # Autoconf-2.59 which quotes differently.
8309 m4_define([lt_car], [[$1]])
8310 m4_define([lt_cdr],
8311 [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
8312 [$#], 1, [],
8313 [m4_dquote(m4_shift($@))])])
8314 m4_define([lt_unquote], $1)
8315
8316
8317 # lt_append(MACRO-NAME, STRING, [SEPARATOR])
8318 # ------------------------------------------
8319 # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
8320 # Note that neither SEPARATOR nor STRING are expanded; they are appended
8321 # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
8322 # No SEPARATOR is output if MACRO-NAME was previously undefined (different
8323 # than defined and empty).
8324 #
8325 # This macro is needed until we can rely on Autoconf 2.62, since earlier
8326 # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
8327 m4_define([lt_append],
8328 [m4_define([$1],
8329 m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
8330
8331
8332
8333 # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
8334 # ----------------------------------------------------------
8335 # Produce a SEP delimited list of all paired combinations of elements of
8336 # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
8337 # has the form PREFIXmINFIXSUFFIXn.
8338 # Needed until we can rely on m4_combine added in Autoconf 2.62.
8339 m4_define([lt_combine],
8340 [m4_if(m4_eval([$# > 3]), [1],
8341 [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
8342 [[m4_foreach([_Lt_prefix], [$2],
8343 [m4_foreach([_Lt_suffix],
8344 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
8345 [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
8346
8347
8348 # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
8349 # -----------------------------------------------------------------------
8350 # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
8351 # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
8352 m4_define([lt_if_append_uniq],
8353 [m4_ifdef([$1],
8354 [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
8355 [lt_append([$1], [$2], [$3])$4],
8356 [$5])],
8357 [lt_append([$1], [$2], [$3])$4])])
8358
8359
8360 # lt_dict_add(DICT, KEY, VALUE)
8361 # -----------------------------
8362 m4_define([lt_dict_add],
8363 [m4_define([$1($2)], [$3])])
8364
8365
8366 # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
8367 # --------------------------------------------
8368 m4_define([lt_dict_add_subkey],
8369 [m4_define([$1($2:$3)], [$4])])
8370
8371
8372 # lt_dict_fetch(DICT, KEY, [SUBKEY])
8373 # ----------------------------------
8374 m4_define([lt_dict_fetch],
8375 [m4_ifval([$3],
8376 m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
8377 m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
8378
8379
8380 # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
8381 # -----------------------------------------------------------------
8382 m4_define([lt_if_dict_fetch],
8383 [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
8384 [$5],
8385 [$6])])
8386
8387
8388 # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
8389 # --------------------------------------------------------------
8390 m4_define([lt_dict_filter],
8391 [m4_if([$5], [], [],
8392 [lt_join(m4_quote(m4_default([$4], [[, ]])),
8393 lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
8394 [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
8395 ])
8396
8397 # ltversion.m4 -- version numbers -*- Autoconf -*-
8398 #
8399 # Copyright (C) 2004 Free Software Foundation, Inc.
8400 # Written by Scott James Remnant, 2004
8401 #
8402 # This file is free software; the Free Software Foundation gives
8403 # unlimited permission to copy and/or distribute it, with or without
8404 # modifications, as long as this notice is preserved.
8405
8406 # @configure_input@
8407
8408 # serial 3293 ltversion.m4
8409 # This file is part of GNU Libtool
8410
8411 m4_define([LT_PACKAGE_VERSION], [2.4])
8412 m4_define([LT_PACKAGE_REVISION], [1.3293])
8413
8414 AC_DEFUN([LTVERSION_VERSION],
8415 [macro_version='2.4'
8416 macro_revision='1.3293'
8417 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
8418 _LT_DECL(, macro_revision, 0)
8419 ])
8420
8421 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
8422 #
8423 # Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
8424 # Written by Scott James Remnant, 2004.
8425 #
8426 # This file is free software; the Free Software Foundation gives
8427 # unlimited permission to copy and/or distribute it, with or without
8428 # modifications, as long as this notice is preserved.
8429
8430 # serial 5 lt~obsolete.m4
8431
8432 # These exist entirely to fool aclocal when bootstrapping libtool.
8433 #
8434 # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
8435 # which have later been changed to m4_define as they aren't part of the
8436 # exported API, or moved to Autoconf or Automake where they belong.
8437 #
8438 # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
8439 # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
8440 # using a macro with the same name in our local m4/libtool.m4 it'll
8441 # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
8442 # and doesn't know about Autoconf macros at all.)
8443 #
8444 # So we provide this file, which has a silly filename so it's always
8445 # included after everything else. This provides aclocal with the
8446 # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
8447 # because those macros already exist, or will be overwritten later.
8448 # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
8449 #
8450 # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
8451 # Yes, that means every name once taken will need to remain here until
8452 # we give up compatibility with versions before 1.7, at which point
8453 # we need to keep only those names which we still refer to.
8454
8455 # This is to help aclocal find these macros, as it can't see m4_define.
8456 AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
8457
8458 m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
8459 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
8460 m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
8461 m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
8462 m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
8463 m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
8464 m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
8465 m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
8466 m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
8467 m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
8468 m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
8469 m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
8470 m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
8471 m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
8472 m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
8473 m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
8474 m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
8475 m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
8476 m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
8477 m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
8478 m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
8479 m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
8480 m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
8481 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
8482 m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
8483 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
8484 m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
8485 m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
8486 m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
8487 m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
8488 m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
8489 m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
8490 m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
8491 m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
8492 m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
8493 m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
8494 m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
8495 m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
8496 m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
8497 m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
8498 m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
8499 m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
8500 m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
8501 m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
8502 m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
8503 m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
8504 m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
8505 m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
8506 m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
8507 m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
8508 m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
8509 m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
8510 m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
8511 m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
8512 m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
8513 m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
8514 m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
8515 m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
8516 m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
8517 m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
8518 m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
851988
852089 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
852190 # serial 1 (pkg-config-0.24)
96791248 AC_SUBST([am__untar])
96801249 ]) # _AM_PROG_TAR
96811250
9682 m4_include([acinclude.m4])
1251 m4_include([m4/libtool.m4])
1252 m4_include([m4/ltoptions.m4])
1253 m4_include([m4/ltsugar.m4])
1254 m4_include([m4/ltversion.m4])
1255 m4_include([m4/lt~obsolete.m4])
1256 m4_include([m4/manywarnings.m4])
1257 m4_include([m4/virt-compile-warnings.m4])
1258 m4_include([m4/warnings.m4])
6666 /* enable GObject introspection support */
6767 #undef WITH_GOBJECT_INTROSPECTION
6868
69 /* enable compile-time and run-time bounds-checking, and some warnings */
70 #undef _FORTIFY_SOURCE
71
6972 /* Enable GNU extensions */
7073 #undef _GNU_SOURCE
00 #! /bin/sh
11 # Guess values for system-dependent variables and create Makefiles.
2 # Generated by GNU Autoconf 2.68 for libvirt-glib 0.0.4.
2 # Generated by GNU Autoconf 2.68 for libvirt-glib 0.0.5.
33 #
44 #
55 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
566566 # Identity of this package.
567567 PACKAGE_NAME='libvirt-glib'
568568 PACKAGE_TARNAME='libvirt-glib'
569 PACKAGE_VERSION='0.0.4'
570 PACKAGE_STRING='libvirt-glib 0.0.4'
569 PACKAGE_VERSION='0.0.5'
570 PACKAGE_STRING='libvirt-glib 0.0.5'
571571 PACKAGE_BUGREPORT=''
572572 PACKAGE_URL=''
573573
630630 PYTHON
631631 COVERAGE_LDFLAGS
632632 COVERAGE_CFLAGS
633 COMPILER_FLAGS
633 COV_FLAGS
634634 MINGW_EXTRA_LDFLAGS
635635 CYGWIN_EXTRA_PYTHON_LIBADD
636636 CYGWIN_EXTRA_LIBADD
667667 PKG_CONFIG_LIBDIR
668668 PKG_CONFIG_PATH
669669 PKG_CONFIG
670 WARN_LDFLAGS
670671 WARN_CFLAGS
671672 CPP
672673 OTOOL64
796797 with_gnu_ld
797798 with_sysroot
798799 enable_libtool_lock
799 enable_compile_warnings
800 enable_iso_c
800 enable_werror
801801 with_html_dir
802802 enable_gtk_doc
803803 enable_gtk_doc_html
13771377 # Omit some internal or obsolete options to make the list less imposing.
13781378 # This message is too long to be a string in the A/UX 3.1 sh.
13791379 cat <<_ACEOF
1380 \`configure' configures libvirt-glib 0.0.4 to adapt to many kinds of systems.
1380 \`configure' configures libvirt-glib 0.0.5 to adapt to many kinds of systems.
13811381
13821382 Usage: $0 [OPTION]... [VAR=VALUE]...
13831383
14471447
14481448 if test -n "$ac_init_help"; then
14491449 case $ac_init_help in
1450 short | recursive ) echo "Configuration of libvirt-glib 0.0.4:";;
1450 short | recursive ) echo "Configuration of libvirt-glib 0.0.5:";;
14511451 esac
14521452 cat <<\_ACEOF
14531453
14641464 --enable-fast-install[=PKGS]
14651465 optimize for fast installation [default=yes]
14661466 --disable-libtool-lock avoid locking (might break parallel builds)
1467 --enable-compile-warnings=[no/minimum/yes/maximum/error]
1468 Turn on compiler warnings
1469 --enable-iso-c Try to warn if code is not ISO C
1467 --enable-werror Use -Werror (if supported)
14701468 --enable-gtk-doc use gtk-doc to build documentation [[default=no]]
14711469 --enable-gtk-doc-html build documentation in html format [[default=yes]]
14721470 --enable-gtk-doc-pdf build documentation in pdf format [[default=no]]
15961594 test -n "$ac_init_help" && exit $ac_status
15971595 if $ac_init_version; then
15981596 cat <<\_ACEOF
1599 libvirt-glib configure 0.0.4
1597 libvirt-glib configure 0.0.5
16001598 generated by GNU Autoconf 2.68
16011599
16021600 Copyright (C) 2010 Free Software Foundation, Inc.
18741872 This file contains any messages produced by compilers while
18751873 running configure, to aid debugging if configure makes a mistake.
18761874
1877 It was created by libvirt-glib $as_me 0.0.4, which was
1875 It was created by libvirt-glib $as_me 0.0.5, which was
18781876 generated by GNU Autoconf 2.68. Invocation command line was
18791877
18801878 $ $0 $@
26932691
26942692 # Define the identity of the package.
26952693 PACKAGE='libvirt-glib'
2696 VERSION='0.0.4'
2694 VERSION='0.0.5'
26972695
26982696
26992697 cat >>confdefs.h <<_ACEOF
28182816 AM_BACKSLASH='\'
28192817
28202818
2821 LIBVIRT_REQUIRED=0.9.7
2822 GLIB2_REQUIRED=2.10.0
2819 LIBVIRT_REQUIRED=0.9.10
2820 GLIB2_REQUIRED=2.22.0
28232821 GOBJECT2_REQUIRED=2.10.0
28242822 GIO_REQUIRED=2.10.0
28252823 GOBJECT_INTROSPECTION_REQUIRED=0.10.8
81608158 $RM -r conftest*
81618159
81628160
8161 ## CAVEAT EMPTOR:
8162 ## There is no encapsulation within the following macros, do not change
8163 ## the running order or otherwise move them around unless you know exactly
8164 ## what you are doing...
81638165 if test -n "$compiler"; then
81648166
81658167 lt_prog_compiler_no_builtin_flag=
1171411716
1171511717
1171611718
11717 # Check whether --enable-compile-warnings was given.
11718 if test "${enable_compile_warnings+set}" = set; then :
11719 enableval=$enable_compile_warnings;
11720 else
11721 enable_compile_warnings="maximum"
11722 fi
11723
11724
11725 warnCFLAGS=
11726
11727 common_flags="-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fasynchronous-unwind-tables"
11728
11729 case "$enable_compile_warnings" in
11730 no)
11731 try_compiler_flags=""
11732 ;;
11733 minimum)
11734 try_compiler_flags="-Wall -Wformat -Wformat-security $common_flags"
11735 ;;
11736 yes)
11737 try_compiler_flags="-Wall -Wformat -Wformat-security -Wmissing-prototypes $common_flags"
11738 ;;
11739 maximum|error)
11740 try_compiler_flags="-Wall -Wformat -Wformat-security -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
11741 try_compiler_flags="$try_compiler_flags -Wextra -Wshadow -Wcast-align -Wwrite-strings -Waggregate-return"
11742 try_compiler_flags="$try_compiler_flags -Wstrict-prototypes -Winline -Wredundant-decls -Wno-sign-compare"
11743 try_compiler_flags="$try_compiler_flags $common_flags"
11744 if test "$enable_compile_warnings" = "error" ; then
11745 try_compiler_flags="$try_compiler_flags -Werror"
11746 fi
11747 ;;
11748 *)
11749 as_fn_error $? "Unknown argument '$enable_compile_warnings' to --enable-compile-warnings" "$LINENO" 5
11750 ;;
11751 esac
11752
11753 compiler_flags=
11754 for option in $try_compiler_flags; do
11755 SAVE_CFLAGS="$CFLAGS"
11756 CFLAGS="$CFLAGS $option"
11757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands $option" >&5
11758 $as_echo_n "checking whether gcc understands $option... " >&6; }
11759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11719 # Check whether --enable-werror was given.
11720 if test "${enable_werror+set}" = set; then :
11721 enableval=$enable_werror; set_werror="$enableval"
11722 else
11723 if test -d $srcdir/.git; then
11724 is_git_version=true
11725 set_werror=yes
11726 else
11727 set_werror=no
11728 fi
11729 fi
11730
11731
11732 # List of warnings that are not relevant / wanted
11733
11734 # Don't care about C++ compiler compat
11735 dontwarn="$dontwarn -Wc++-compat"
11736 dontwarn="$dontwarn -Wabi"
11737 dontwarn="$dontwarn -Wdeprecated"
11738 # Don't care about ancient C standard compat
11739 dontwarn="$dontwarn -Wtraditional"
11740 # Don't care about ancient C standard compat
11741 dontwarn="$dontwarn -Wtraditional-conversion"
11742 # Ignore warnings in /usr/include
11743 dontwarn="$dontwarn -Wsystem-headers"
11744 # Happy for compiler to add struct padding
11745 dontwarn="$dontwarn -Wpadded"
11746 # GCC very confused with -O2
11747 dontwarn="$dontwarn -Wunreachable-code"
11748 # We explicitly need to remove const sometimes
11749 dontwarn="$dontwarn -Wcast-qual"
11750 # Allow vars decl in the middle of blocks
11751 dontwarn="$dontwarn -Wdeclaration-after-statement"
11752 # Using long long is fine
11753 dontwarn="$dontwarn -Wlong-long"
11754 # Unused macros are ok
11755 dontwarn="$dontwarn -Wunused-macros"
11756
11757
11758 # g_clear_object & G_ATOMIC_OP_USE_GCC_BUILTINS causes
11759 # violations with this. XXX Fix glib ?
11760 dontwarn="$dontwarn -Wbad-function-cast"
11761
11762 # Get all possible GCC warnings
11763
11764
11765 if test -n "$GCC"; then
11766
11767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5
11768 $as_echo_n "checking whether -Wno-missing-field-initializers is supported... " >&6; }
11769 if ${gl_cv_cc_nomfi_supported+:} false; then :
11770 $as_echo_n "(cached) " >&6
11771 else
11772
11773 gl_save_CFLAGS="$CFLAGS"
11774 CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers"
11775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1176011776 /* end confdefs.h. */
1176111777
1176211778 int
1176711783 return 0;
1176811784 }
1176911785 _ACEOF
11770 if ac_fn_c_try_link "$LINENO"; then :
11771 has_option=yes
11772 else
11773 has_option=no
11774 fi
11775 rm -f core conftest.err conftest.$ac_objext \
11776 conftest$ac_exeext conftest.$ac_ext
11777 CFLAGS="$SAVE_CFLAGS"
11778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5
11779 $as_echo "$has_option" >&6; }
11780 if test $has_option = yes; then
11781 compiler_flags="$compiler_flags $option"
11782 fi
11783 unset has_option
11784 unset SAVE_CFLAGS
11786 if ac_fn_c_try_compile "$LINENO"; then :
11787 gl_cv_cc_nomfi_supported=yes
11788 else
11789 gl_cv_cc_nomfi_supported=no
11790 fi
11791 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11792 CFLAGS="$gl_save_CFLAGS"
11793 fi
11794
11795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5
11796 $as_echo "$gl_cv_cc_nomfi_supported" >&6; }
11797
11798 if test "$gl_cv_cc_nomfi_supported" = yes; then
11799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5
11800 $as_echo_n "checking whether -Wno-missing-field-initializers is needed... " >&6; }
11801 if ${gl_cv_cc_nomfi_needed+:} false; then :
11802 $as_echo_n "(cached) " >&6
11803 else
11804
11805 gl_save_CFLAGS="$CFLAGS"
11806 CFLAGS="$CFLAGS -W -Werror"
11807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11808 /* end confdefs.h. */
11809 void f (void)
11810 {
11811 typedef struct { int a; int b; } s_t;
11812 s_t s1 = { 0, };
11813 }
11814
11815 int
11816 main ()
11817 {
11818
11819 ;
11820 return 0;
11821 }
11822 _ACEOF
11823 if ac_fn_c_try_compile "$LINENO"; then :
11824 gl_cv_cc_nomfi_needed=no
11825 else
11826 gl_cv_cc_nomfi_needed=yes
11827 fi
11828 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11829 CFLAGS="$gl_save_CFLAGS"
11830
11831 fi
11832
11833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5
11834 $as_echo "$gl_cv_cc_nomfi_needed" >&6; }
11835 fi
11836 fi
11837
11838 gl_manywarn_set=
11839 for gl_manywarn_item in \
11840 -Wall \
11841 -W \
11842 -Wformat-y2k \
11843 -Wformat-nonliteral \
11844 -Wformat-security \
11845 -Winit-self \
11846 -Wmissing-include-dirs \
11847 -Wswitch-default \
11848 -Wswitch-enum \
11849 -Wunused \
11850 -Wunknown-pragmas \
11851 -Wstrict-aliasing \
11852 -Wstrict-overflow \
11853 -Wsystem-headers \
11854 -Wfloat-equal \
11855 -Wtraditional \
11856 -Wtraditional-conversion \
11857 -Wdeclaration-after-statement \
11858 -Wundef \
11859 -Wshadow \
11860 -Wunsafe-loop-optimizations \
11861 -Wpointer-arith \
11862 -Wbad-function-cast \
11863 -Wc++-compat \
11864 -Wcast-qual \
11865 -Wcast-align \
11866 -Wwrite-strings \
11867 -Wconversion \
11868 -Wsign-conversion \
11869 -Wlogical-op \
11870 -Waggregate-return \
11871 -Wstrict-prototypes \
11872 -Wold-style-definition \
11873 -Wmissing-prototypes \
11874 -Wmissing-declarations \
11875 -Wmissing-noreturn \
11876 -Wmissing-format-attribute \
11877 -Wpacked \
11878 -Wpadded \
11879 -Wredundant-decls \
11880 -Wnested-externs \
11881 -Wunreachable-code \
11882 -Winline \
11883 -Winvalid-pch \
11884 -Wlong-long \
11885 -Wvla \
11886 -Wvolatile-register-var \
11887 -Wdisabled-optimization \
11888 -Wstack-protector \
11889 -Woverlength-strings \
11890 -Wbuiltin-macro-redefined \
11891 -Wmudflap \
11892 -Wpacked-bitfield-compat \
11893 -Wsync-nand \
11894 ; do
11895 gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
11896 done
11897 # The following are not documented in the manual but are included in
11898 # output from gcc --help=warnings.
11899 for gl_manywarn_item in \
11900 -Wattributes \
11901 -Wcoverage-mismatch \
11902 -Wmultichar \
11903 -Wunused-macros \
11904 ; do
11905 gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
11906 done
11907 # More warnings from gcc 4.6.2 --help=warnings.
11908 for gl_manywarn_item in \
11909 -Wabi \
11910 -Wcpp \
11911 -Wdeprecated \
11912 -Wdeprecated-declarations \
11913 -Wdiv-by-zero \
11914 -Wdouble-promotion \
11915 -Wendif-labels \
11916 -Wextra \
11917 -Wformat-contains-nul \
11918 -Wformat-extra-args \
11919 -Wformat-zero-length \
11920 -Wformat=2 \
11921 -Wmultichar \
11922 -Wnormalized=nfc \
11923 -Woverflow \
11924 -Wpointer-to-int-cast \
11925 -Wpragmas \
11926 -Wsuggest-attribute=const \
11927 -Wsuggest-attribute=noreturn \
11928 -Wsuggest-attribute=pure \
11929 -Wtrampolines \
11930 ; do
11931 gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
11932 done
11933
11934 # Disable the missing-field-initializers warning if needed
11935 if test "$gl_cv_cc_nomfi_needed" = yes; then
11936 gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
11937 fi
11938
11939 maybewarn=$gl_manywarn_set
11940
11941
11942 # Remove the ones we don't want, blacklisted earlier
11943
11944 gl_warn_set=
11945 set x $maybewarn; shift
11946 for gl_warn_item
11947 do
11948 case " $dontwarn " in
11949 *" $gl_warn_item "*)
11950 ;;
11951 *)
11952 gl_warn_set="$gl_warn_set $gl_warn_item"
11953 ;;
11954 esac
11955 done
11956 wantwarn=$gl_warn_set
11957
11958
11959 # Check for $CC support of each warning
11960 for w in $wantwarn; do
11961 as_gl_Warn=`$as_echo "gl_cv_warn_$w" | $as_tr_sh`
11962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles $w" >&5
11963 $as_echo_n "checking whether compiler handles $w... " >&6; }
11964 if eval \${$as_gl_Warn+:} false; then :
11965 $as_echo_n "(cached) " >&6
11966 else
11967
11968 gl_save_CPPFLAGS="$CPPFLAGS"
11969 CPPFLAGS="${CPPFLAGS} $w"
11970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11971 /* end confdefs.h. */
11972
11973 int
11974 main ()
11975 {
11976
11977 ;
11978 return 0;
11979 }
11980 _ACEOF
11981 if ac_fn_c_try_cpp "$LINENO"; then :
11982 eval "$as_gl_Warn=yes"
11983 else
11984 eval "$as_gl_Warn=no"
11985 fi
11986 rm -f conftest.err conftest.i conftest.$ac_ext
11987 CPPFLAGS="$gl_save_CPPFLAGS"
11988
11989 fi
11990 eval ac_res=\$$as_gl_Warn
11991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11992 $as_echo "$ac_res" >&6; }
11993 if eval test \"x\$"$as_gl_Warn"\" = x"yes"; then :
11994 as_fn_append WARN_CFLAGS " $w"
11995 fi
11996
1178511997 done
11786 unset option
11787 unset try_compiler_flags
11788
11789 # Check whether --enable-iso-c was given.
11790 if test "${enable_iso_c+set}" = set; then :
11791 enableval=$enable_iso_c;
11792 else
11793 enable_iso_c=no
11794 fi
11795
11796
11797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what language compliance flags to pass to the C compiler" >&5
11798 $as_echo_n "checking what language compliance flags to pass to the C compiler... " >&6; }
11799 complCFLAGS=
11800 if test "x$enable_iso_c" != "xno"; then
11801 if test "x$GCC" = "xyes"; then
11802 case " $CFLAGS " in
11803 *\ \ -ansi\ \ *) ;;
11804 *) complCFLAGS="$complCFLAGS -ansi" ;;
11805 esac
11806 case " $CFLAGS " in
11807 *\ \ -pedantic\ \ *) ;;
11808 *) complCFLAGS="$complCFLAGS -pedantic" ;;
11809 esac
11810 fi
11998
11999 # GNULIB uses '-W' (aka -Wextra) which includes a bunch of stuff.
12000 # Unfortunately, this means you can't simply use '-Wsign-compare'
12001 # with gl_MANYWARN_COMPLEMENT
12002 # So we have -W enabled, and then have to explicitly turn off...
12003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -Wno-sign-compare" >&5
12004 $as_echo_n "checking whether compiler handles -Wno-sign-compare... " >&6; }
12005 if ${gl_cv_warn__Wno_sign_compare+:} false; then :
12006 $as_echo_n "(cached) " >&6
12007 else
12008
12009 gl_save_CPPFLAGS="$CPPFLAGS"
12010 CPPFLAGS="${CPPFLAGS} -Wno-sign-compare"
12011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12012 /* end confdefs.h. */
12013
12014 int
12015 main ()
12016 {
12017
12018 ;
12019 return 0;
12020 }
12021 _ACEOF
12022 if ac_fn_c_try_cpp "$LINENO"; then :
12023 gl_cv_warn__Wno_sign_compare=yes
12024 else
12025 gl_cv_warn__Wno_sign_compare=no
12026 fi
12027 rm -f conftest.err conftest.i conftest.$ac_ext
12028 CPPFLAGS="$gl_save_CPPFLAGS"
12029
12030 fi
12031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__Wno_sign_compare" >&5
12032 $as_echo "$gl_cv_warn__Wno_sign_compare" >&6; }
12033 if test "x$gl_cv_warn__Wno_sign_compare" = xyes; then :
12034 as_fn_append WARN_CFLAGS " -Wno-sign-compare"
12035 fi
12036
12037
12038 # Due to gutils.h bug in g_bit_storage
12039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -Wno-sign-conversion" >&5
12040 $as_echo_n "checking whether compiler handles -Wno-sign-conversion... " >&6; }
12041 if ${gl_cv_warn__Wno_sign_conversion+:} false; then :
12042 $as_echo_n "(cached) " >&6
12043 else
12044
12045 gl_save_CPPFLAGS="$CPPFLAGS"
12046 CPPFLAGS="${CPPFLAGS} -Wno-sign-conversion"
12047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12048 /* end confdefs.h. */
12049
12050 int
12051 main ()
12052 {
12053
12054 ;
12055 return 0;
12056 }
12057 _ACEOF
12058 if ac_fn_c_try_cpp "$LINENO"; then :
12059 gl_cv_warn__Wno_sign_conversion=yes
12060 else
12061 gl_cv_warn__Wno_sign_conversion=no
12062 fi
12063 rm -f conftest.err conftest.i conftest.$ac_ext
12064 CPPFLAGS="$gl_save_CPPFLAGS"
12065
12066 fi
12067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__Wno_sign_conversion" >&5
12068 $as_echo "$gl_cv_warn__Wno_sign_conversion" >&6; }
12069 if test "x$gl_cv_warn__Wno_sign_conversion" = xyes; then :
12070 as_fn_append WARN_CFLAGS " -Wno-sign-conversion"
12071 fi
12072
12073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -Wno-conversion" >&5
12074 $as_echo_n "checking whether compiler handles -Wno-conversion... " >&6; }
12075 if ${gl_cv_warn__Wno_conversion+:} false; then :
12076 $as_echo_n "(cached) " >&6
12077 else
12078
12079 gl_save_CPPFLAGS="$CPPFLAGS"
12080 CPPFLAGS="${CPPFLAGS} -Wno-conversion"
12081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12082 /* end confdefs.h. */
12083
12084 int
12085 main ()
12086 {
12087
12088 ;
12089 return 0;
12090 }
12091 _ACEOF
12092 if ac_fn_c_try_cpp "$LINENO"; then :
12093 gl_cv_warn__Wno_conversion=yes
12094 else
12095 gl_cv_warn__Wno_conversion=no
12096 fi
12097 rm -f conftest.err conftest.i conftest.$ac_ext
12098 CPPFLAGS="$gl_save_CPPFLAGS"
12099
12100 fi
12101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__Wno_conversion" >&5
12102 $as_echo "$gl_cv_warn__Wno_conversion" >&6; }
12103 if test "x$gl_cv_warn__Wno_conversion" = xyes; then :
12104 as_fn_append WARN_CFLAGS " -Wno-conversion"
12105 fi
12106
12107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -Wno-unused-parameter" >&5
12108 $as_echo_n "checking whether compiler handles -Wno-unused-parameter... " >&6; }
12109 if ${gl_cv_warn__Wno_unused_parameter+:} false; then :
12110 $as_echo_n "(cached) " >&6
12111 else
12112
12113 gl_save_CPPFLAGS="$CPPFLAGS"
12114 CPPFLAGS="${CPPFLAGS} -Wno-unused-parameter"
12115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12116 /* end confdefs.h. */
12117
12118 int
12119 main ()
12120 {
12121
12122 ;
12123 return 0;
12124 }
12125 _ACEOF
12126 if ac_fn_c_try_cpp "$LINENO"; then :
12127 gl_cv_warn__Wno_unused_parameter=yes
12128 else
12129 gl_cv_warn__Wno_unused_parameter=no
12130 fi
12131 rm -f conftest.err conftest.i conftest.$ac_ext
12132 CPPFLAGS="$gl_save_CPPFLAGS"
12133
12134 fi
12135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__Wno_unused_parameter" >&5
12136 $as_echo "$gl_cv_warn__Wno_unused_parameter" >&6; }
12137 if test "x$gl_cv_warn__Wno_unused_parameter" = xyes; then :
12138 as_fn_append WARN_CFLAGS " -Wno-unused-parameter"
12139 fi
12140
12141 # We can't enable this due to horrible spice_usb_device_get_description
12142 # signature
12143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -Wno-format-nonliteral" >&5
12144 $as_echo_n "checking whether compiler handles -Wno-format-nonliteral... " >&6; }
12145 if ${gl_cv_warn__Wno_format_nonliteral+:} false; then :
12146 $as_echo_n "(cached) " >&6
12147 else
12148
12149 gl_save_CPPFLAGS="$CPPFLAGS"
12150 CPPFLAGS="${CPPFLAGS} -Wno-format-nonliteral"
12151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12152 /* end confdefs.h. */
12153
12154 int
12155 main ()
12156 {
12157
12158 ;
12159 return 0;
12160 }
12161 _ACEOF
12162 if ac_fn_c_try_cpp "$LINENO"; then :
12163 gl_cv_warn__Wno_format_nonliteral=yes
12164 else
12165 gl_cv_warn__Wno_format_nonliteral=no
12166 fi
12167 rm -f conftest.err conftest.i conftest.$ac_ext
12168 CPPFLAGS="$gl_save_CPPFLAGS"
12169
12170 fi
12171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__Wno_format_nonliteral" >&5
12172 $as_echo "$gl_cv_warn__Wno_format_nonliteral" >&6; }
12173 if test "x$gl_cv_warn__Wno_format_nonliteral" = xyes; then :
12174 as_fn_append WARN_CFLAGS " -Wno-format-nonliteral"
12175 fi
12176
12177
12178
12179
12180 # GNULIB expects this to be part of -Wc++-compat, but we turn
12181 # that one off, so we need to manually enable this again
12182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -Wjump-misses-init" >&5
12183 $as_echo_n "checking whether compiler handles -Wjump-misses-init... " >&6; }
12184 if ${gl_cv_warn__Wjump_misses_init+:} false; then :
12185 $as_echo_n "(cached) " >&6
12186 else
12187
12188 gl_save_CPPFLAGS="$CPPFLAGS"
12189 CPPFLAGS="${CPPFLAGS} -Wjump-misses-init"
12190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12191 /* end confdefs.h. */
12192
12193 int
12194 main ()
12195 {
12196
12197 ;
12198 return 0;
12199 }
12200 _ACEOF
12201 if ac_fn_c_try_cpp "$LINENO"; then :
12202 gl_cv_warn__Wjump_misses_init=yes
12203 else
12204 gl_cv_warn__Wjump_misses_init=no
12205 fi
12206 rm -f conftest.err conftest.i conftest.$ac_ext
12207 CPPFLAGS="$gl_save_CPPFLAGS"
12208
12209 fi
12210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__Wjump_misses_init" >&5
12211 $as_echo "$gl_cv_warn__Wjump_misses_init" >&6; }
12212 if test "x$gl_cv_warn__Wjump_misses_init" = xyes; then :
12213 as_fn_append WARN_CFLAGS " -Wjump-misses-init"
12214 fi
12215
12216
12217 # This should be < 256 really. Currently we're down to 4096,
12218 # but using 1024 bytes sized buffers (mostly for virStrerror)
12219 # stops us from going down further
12220 as_gl_Warn=`$as_echo "gl_cv_warn_-Wframe-larger-than=4096" | $as_tr_sh`
12221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -Wframe-larger-than=4096" >&5
12222 $as_echo_n "checking whether compiler handles -Wframe-larger-than=4096... " >&6; }
12223 if eval \${$as_gl_Warn+:} false; then :
12224 $as_echo_n "(cached) " >&6
12225 else
12226
12227 gl_save_CPPFLAGS="$CPPFLAGS"
12228 CPPFLAGS="${CPPFLAGS} -Wframe-larger-than=4096"
12229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12230 /* end confdefs.h. */
12231
12232 int
12233 main ()
12234 {
12235
12236 ;
12237 return 0;
12238 }
12239 _ACEOF
12240 if ac_fn_c_try_cpp "$LINENO"; then :
12241 eval "$as_gl_Warn=yes"
12242 else
12243 eval "$as_gl_Warn=no"
12244 fi
12245 rm -f conftest.err conftest.i conftest.$ac_ext
12246 CPPFLAGS="$gl_save_CPPFLAGS"
12247
12248 fi
12249 eval ac_res=\$$as_gl_Warn
12250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12251 $as_echo "$ac_res" >&6; }
12252 if eval test \"x\$"$as_gl_Warn"\" = x"yes"; then :
12253 as_fn_append WARN_CFLAGS " -Wframe-larger-than=4096"
12254 fi
12255
12256
12257 # Use improved glibc headers
12258
12259 $as_echo "#define _FORTIFY_SOURCE 2" >>confdefs.h
12260
12261
12262 # Extra special flags
12263 case $host in
12264 *-*-linux*)
12265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -fstack-protector-all" >&5
12266 $as_echo_n "checking whether compiler handles -fstack-protector-all... " >&6; }
12267 if ${gl_cv_warn__fstack_protector_all+:} false; then :
12268 $as_echo_n "(cached) " >&6
12269 else
12270
12271 gl_save_CPPFLAGS="$CPPFLAGS"
12272 CPPFLAGS="${CPPFLAGS} -fstack-protector-all"
12273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12274 /* end confdefs.h. */
12275
12276 int
12277 main ()
12278 {
12279
12280 ;
12281 return 0;
12282 }
12283 _ACEOF
12284 if ac_fn_c_try_cpp "$LINENO"; then :
12285 gl_cv_warn__fstack_protector_all=yes
12286 else
12287 gl_cv_warn__fstack_protector_all=no
12288 fi
12289 rm -f conftest.err conftest.i conftest.$ac_ext
12290 CPPFLAGS="$gl_save_CPPFLAGS"
12291
12292 fi
12293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__fstack_protector_all" >&5
12294 $as_echo "$gl_cv_warn__fstack_protector_all" >&6; }
12295 if test "x$gl_cv_warn__fstack_protector_all" = xyes; then :
12296 as_fn_append WARN_CFLAGS " -fstack-protector-all"
12297 fi
12298
12299 as_gl_Warn=`$as_echo "gl_cv_warn_--param=ssp-buffer-size=4" | $as_tr_sh`
12300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles --param=ssp-buffer-size=4" >&5
12301 $as_echo_n "checking whether compiler handles --param=ssp-buffer-size=4... " >&6; }
12302 if eval \${$as_gl_Warn+:} false; then :
12303 $as_echo_n "(cached) " >&6
12304 else
12305
12306 gl_save_CPPFLAGS="$CPPFLAGS"
12307 CPPFLAGS="${CPPFLAGS} --param=ssp-buffer-size=4"
12308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12309 /* end confdefs.h. */
12310
12311 int
12312 main ()
12313 {
12314
12315 ;
12316 return 0;
12317 }
12318 _ACEOF
12319 if ac_fn_c_try_cpp "$LINENO"; then :
12320 eval "$as_gl_Warn=yes"
12321 else
12322 eval "$as_gl_Warn=no"
12323 fi
12324 rm -f conftest.err conftest.i conftest.$ac_ext
12325 CPPFLAGS="$gl_save_CPPFLAGS"
12326
12327 fi
12328 eval ac_res=\$$as_gl_Warn
12329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12330 $as_echo "$ac_res" >&6; }
12331 if eval test \"x\$"$as_gl_Warn"\" = x"yes"; then :
12332 as_fn_append WARN_CFLAGS " --param=ssp-buffer-size=4"
12333 fi
12334
12335 ;;
12336 esac
12337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -fexceptions" >&5
12338 $as_echo_n "checking whether compiler handles -fexceptions... " >&6; }
12339 if ${gl_cv_warn__fexceptions+:} false; then :
12340 $as_echo_n "(cached) " >&6
12341 else
12342
12343 gl_save_CPPFLAGS="$CPPFLAGS"
12344 CPPFLAGS="${CPPFLAGS} -fexceptions"
12345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12346 /* end confdefs.h. */
12347
12348 int
12349 main ()
12350 {
12351
12352 ;
12353 return 0;
12354 }
12355 _ACEOF
12356 if ac_fn_c_try_cpp "$LINENO"; then :
12357 gl_cv_warn__fexceptions=yes
12358 else
12359 gl_cv_warn__fexceptions=no
12360 fi
12361 rm -f conftest.err conftest.i conftest.$ac_ext
12362 CPPFLAGS="$gl_save_CPPFLAGS"
12363
12364 fi
12365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__fexceptions" >&5
12366 $as_echo "$gl_cv_warn__fexceptions" >&6; }
12367 if test "x$gl_cv_warn__fexceptions" = xyes; then :
12368 as_fn_append WARN_CFLAGS " -fexceptions"
12369 fi
12370
12371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -fasynchronous-unwind-tables" >&5
12372 $as_echo_n "checking whether compiler handles -fasynchronous-unwind-tables... " >&6; }
12373 if ${gl_cv_warn__fasynchronous_unwind_tables+:} false; then :
12374 $as_echo_n "(cached) " >&6
12375 else
12376
12377 gl_save_CPPFLAGS="$CPPFLAGS"
12378 CPPFLAGS="${CPPFLAGS} -fasynchronous-unwind-tables"
12379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12380 /* end confdefs.h. */
12381
12382 int
12383 main ()
12384 {
12385
12386 ;
12387 return 0;
12388 }
12389 _ACEOF
12390 if ac_fn_c_try_cpp "$LINENO"; then :
12391 gl_cv_warn__fasynchronous_unwind_tables=yes
12392 else
12393 gl_cv_warn__fasynchronous_unwind_tables=no
12394 fi
12395 rm -f conftest.err conftest.i conftest.$ac_ext
12396 CPPFLAGS="$gl_save_CPPFLAGS"
12397
12398 fi
12399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__fasynchronous_unwind_tables" >&5
12400 $as_echo "$gl_cv_warn__fasynchronous_unwind_tables" >&6; }
12401 if test "x$gl_cv_warn__fasynchronous_unwind_tables" = xyes; then :
12402 as_fn_append WARN_CFLAGS " -fasynchronous-unwind-tables"
12403 fi
12404
12405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -fdiagnostics-show-option" >&5
12406 $as_echo_n "checking whether compiler handles -fdiagnostics-show-option... " >&6; }
12407 if ${gl_cv_warn__fdiagnostics_show_option+:} false; then :
12408 $as_echo_n "(cached) " >&6
12409 else
12410
12411 gl_save_CPPFLAGS="$CPPFLAGS"
12412 CPPFLAGS="${CPPFLAGS} -fdiagnostics-show-option"
12413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12414 /* end confdefs.h. */
12415
12416 int
12417 main ()
12418 {
12419
12420 ;
12421 return 0;
12422 }
12423 _ACEOF
12424 if ac_fn_c_try_cpp "$LINENO"; then :
12425 gl_cv_warn__fdiagnostics_show_option=yes
12426 else
12427 gl_cv_warn__fdiagnostics_show_option=no
12428 fi
12429 rm -f conftest.err conftest.i conftest.$ac_ext
12430 CPPFLAGS="$gl_save_CPPFLAGS"
12431
12432 fi
12433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__fdiagnostics_show_option" >&5
12434 $as_echo "$gl_cv_warn__fdiagnostics_show_option" >&6; }
12435 if test "x$gl_cv_warn__fdiagnostics_show_option" = xyes; then :
12436 as_fn_append WARN_CFLAGS " -fdiagnostics-show-option"
12437 fi
12438
12439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -funit-at-a-time" >&5
12440 $as_echo_n "checking whether compiler handles -funit-at-a-time... " >&6; }
12441 if ${gl_cv_warn__funit_at_a_time+:} false; then :
12442 $as_echo_n "(cached) " >&6
12443 else
12444
12445 gl_save_CPPFLAGS="$CPPFLAGS"
12446 CPPFLAGS="${CPPFLAGS} -funit-at-a-time"
12447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12448 /* end confdefs.h. */
12449
12450 int
12451 main ()
12452 {
12453
12454 ;
12455 return 0;
12456 }
12457 _ACEOF
12458 if ac_fn_c_try_cpp "$LINENO"; then :
12459 gl_cv_warn__funit_at_a_time=yes
12460 else
12461 gl_cv_warn__funit_at_a_time=no
12462 fi
12463 rm -f conftest.err conftest.i conftest.$ac_ext
12464 CPPFLAGS="$gl_save_CPPFLAGS"
12465
12466 fi
12467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__funit_at_a_time" >&5
12468 $as_echo "$gl_cv_warn__funit_at_a_time" >&6; }
12469 if test "x$gl_cv_warn__funit_at_a_time" = xyes; then :
12470 as_fn_append WARN_CFLAGS " -funit-at-a-time"
12471 fi
12472
12473
12474 # Need -fipa-pure-const in order to make -Wsuggest-attribute=pure
12475 # fire even without -O.
12476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -fipa-pure-const" >&5
12477 $as_echo_n "checking whether compiler handles -fipa-pure-const... " >&6; }
12478 if ${gl_cv_warn__fipa_pure_const+:} false; then :
12479 $as_echo_n "(cached) " >&6
12480 else
12481
12482 gl_save_CPPFLAGS="$CPPFLAGS"
12483 CPPFLAGS="${CPPFLAGS} -fipa-pure-const"
12484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12485 /* end confdefs.h. */
12486
12487 int
12488 main ()
12489 {
12490
12491 ;
12492 return 0;
12493 }
12494 _ACEOF
12495 if ac_fn_c_try_cpp "$LINENO"; then :
12496 gl_cv_warn__fipa_pure_const=yes
12497 else
12498 gl_cv_warn__fipa_pure_const=no
12499 fi
12500 rm -f conftest.err conftest.i conftest.$ac_ext
12501 CPPFLAGS="$gl_save_CPPFLAGS"
12502
12503 fi
12504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__fipa_pure_const" >&5
12505 $as_echo "$gl_cv_warn__fipa_pure_const" >&6; }
12506 if test "x$gl_cv_warn__fipa_pure_const" = xyes; then :
12507 as_fn_append WARN_CFLAGS " -fipa-pure-const"
12508 fi
12509
12510
12511 # We should eventually enable this, but right now there are at
12512 # least 75 functions triggering warnings.
12513 as_gl_Warn=`$as_echo "gl_cv_warn_-Wno-suggest-attribute=pure" | $as_tr_sh`
12514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -Wno-suggest-attribute=pure" >&5
12515 $as_echo_n "checking whether compiler handles -Wno-suggest-attribute=pure... " >&6; }
12516 if eval \${$as_gl_Warn+:} false; then :
12517 $as_echo_n "(cached) " >&6
12518 else
12519
12520 gl_save_CPPFLAGS="$CPPFLAGS"
12521 CPPFLAGS="${CPPFLAGS} -Wno-suggest-attribute=pure"
12522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12523 /* end confdefs.h. */
12524
12525 int
12526 main ()
12527 {
12528
12529 ;
12530 return 0;
12531 }
12532 _ACEOF
12533 if ac_fn_c_try_cpp "$LINENO"; then :
12534 eval "$as_gl_Warn=yes"
12535 else
12536 eval "$as_gl_Warn=no"
12537 fi
12538 rm -f conftest.err conftest.i conftest.$ac_ext
12539 CPPFLAGS="$gl_save_CPPFLAGS"
12540
12541 fi
12542 eval ac_res=\$$as_gl_Warn
12543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12544 $as_echo "$ac_res" >&6; }
12545 if eval test \"x\$"$as_gl_Warn"\" = x"yes"; then :
12546 as_fn_append WARN_CFLAGS " -Wno-suggest-attribute=pure"
12547 fi
12548
12549 as_gl_Warn=`$as_echo "gl_cv_warn_-Wno-suggest-attribute=const" | $as_tr_sh`
12550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -Wno-suggest-attribute=const" >&5
12551 $as_echo_n "checking whether compiler handles -Wno-suggest-attribute=const... " >&6; }
12552 if eval \${$as_gl_Warn+:} false; then :
12553 $as_echo_n "(cached) " >&6
12554 else
12555
12556 gl_save_CPPFLAGS="$CPPFLAGS"
12557 CPPFLAGS="${CPPFLAGS} -Wno-suggest-attribute=const"
12558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12559 /* end confdefs.h. */
12560
12561 int
12562 main ()
12563 {
12564
12565 ;
12566 return 0;
12567 }
12568 _ACEOF
12569 if ac_fn_c_try_cpp "$LINENO"; then :
12570 eval "$as_gl_Warn=yes"
12571 else
12572 eval "$as_gl_Warn=no"
12573 fi
12574 rm -f conftest.err conftest.i conftest.$ac_ext
12575 CPPFLAGS="$gl_save_CPPFLAGS"
12576
12577 fi
12578 eval ac_res=\$$as_gl_Warn
12579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12580 $as_echo "$ac_res" >&6; }
12581 if eval test \"x\$"$as_gl_Warn"\" = x"yes"; then :
12582 as_fn_append WARN_CFLAGS " -Wno-suggest-attribute=const"
12583 fi
12584
12585
12586
12587 if test "$set_werror" = "yes"
12588 then
12589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -Werror" >&5
12590 $as_echo_n "checking whether compiler handles -Werror... " >&6; }
12591 if ${gl_cv_warn__Werror+:} false; then :
12592 $as_echo_n "(cached) " >&6
12593 else
12594
12595 gl_save_CPPFLAGS="$CPPFLAGS"
12596 CPPFLAGS="${CPPFLAGS} -Werror"
12597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12598 /* end confdefs.h. */
12599
12600 int
12601 main ()
12602 {
12603
12604 ;
12605 return 0;
12606 }
12607 _ACEOF
12608 if ac_fn_c_try_cpp "$LINENO"; then :
12609 gl_cv_warn__Werror=yes
12610 else
12611 gl_cv_warn__Werror=no
12612 fi
12613 rm -f conftest.err conftest.i conftest.$ac_ext
12614 CPPFLAGS="$gl_save_CPPFLAGS"
12615
12616 fi
12617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__Werror" >&5
12618 $as_echo "$gl_cv_warn__Werror" >&6; }
12619 if test "x$gl_cv_warn__Werror" = xyes; then :
12620 as_fn_append WARN_CFLAGS " -Werror"
12621 fi
12622
1181112623 fi
11812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $complCFLAGS" >&5
11813 $as_echo "$complCFLAGS" >&6; }
11814
11815 WARN_CFLAGS="$compiler_flags $complCFLAGS"
12624
12625 WARN_LDFLAGS=$WARN_CFLAGS
12626
1181612627
1181712628
1181812629
1284313654 enable_coverage=$enableval
1284413655
1284513656 if test "${enable_coverage}" = yes; then
12846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler accepts -fprofile-arcs" >&5
12847 $as_echo_n "checking whether compiler accepts -fprofile-arcs... " >&6; }
12848
12849 ac_save_CFLAGS="$CFLAGS"
12850 CFLAGS="$CFLAGS -fprofile-arcs"
12851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -fprofile-arcs" >&5
13658 $as_echo_n "checking whether compiler handles -fprofile-arcs... " >&6; }
13659 if ${gl_cv_warn__fprofile_arcs+:} false; then :
13660 $as_echo_n "(cached) " >&6
13661 else
13662
13663 gl_save_CPPFLAGS="$CPPFLAGS"
13664 CPPFLAGS="${CPPFLAGS} -fprofile-arcs"
13665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1285213666 /* end confdefs.h. */
1285313667
1285413668 int
1285513669 main ()
1285613670 {
12857 int x;
13671
1285813672 ;
1285913673 return 0;
1286013674 }
1286113675 _ACEOF
12862 if ac_fn_c_try_compile "$LINENO"; then :
12863 COMPILER_FLAGS="$COMPILER_FLAGS -fprofile-arcs"
12864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12865 $as_echo "yes" >&6; }
12866 else
12867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12868 $as_echo "no" >&6; }
12869 fi
12870 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12871 CFLAGS="$ac_save_CFLAGS"
12872
12873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler accepts -ftest-coverage" >&5
12874 $as_echo_n "checking whether compiler accepts -ftest-coverage... " >&6; }
12875
12876 ac_save_CFLAGS="$CFLAGS"
12877 CFLAGS="$CFLAGS -ftest-coverage"
12878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13676 if ac_fn_c_try_cpp "$LINENO"; then :
13677 gl_cv_warn__fprofile_arcs=yes
13678 else
13679 gl_cv_warn__fprofile_arcs=no
13680 fi
13681 rm -f conftest.err conftest.i conftest.$ac_ext
13682 CPPFLAGS="$gl_save_CPPFLAGS"
13683
13684 fi
13685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__fprofile_arcs" >&5
13686 $as_echo "$gl_cv_warn__fprofile_arcs" >&6; }
13687 if test "x$gl_cv_warn__fprofile_arcs" = xyes; then :
13688 as_fn_append COV_FLAGS " -fprofile-arcs"
13689 fi
13690
13691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler handles -ftest-coverage" >&5
13692 $as_echo_n "checking whether compiler handles -ftest-coverage... " >&6; }
13693 if ${gl_cv_warn__ftest_coverage+:} false; then :
13694 $as_echo_n "(cached) " >&6
13695 else
13696
13697 gl_save_CPPFLAGS="$CPPFLAGS"
13698 CPPFLAGS="${CPPFLAGS} -ftest-coverage"
13699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1287913700 /* end confdefs.h. */
1288013701
1288113702 int
1288213703 main ()
1288313704 {
12884 int x;
13705
1288513706 ;
1288613707 return 0;
1288713708 }
1288813709 _ACEOF
12889 if ac_fn_c_try_compile "$LINENO"; then :
12890 COMPILER_FLAGS="$COMPILER_FLAGS -ftest-coverage"
12891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12892 $as_echo "yes" >&6; }
12893 else
12894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12895 $as_echo "no" >&6; }
12896 fi
12897 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12898 CFLAGS="$ac_save_CFLAGS"
12899
12900 COVERAGE_CFLAGS=$COMPILER_FLAGS
12901
12902 COVERAGE_LDFLAGS=$COMPILER_FLAGS
12903
12904 COMPILER_FLAGS=
13710 if ac_fn_c_try_cpp "$LINENO"; then :
13711 gl_cv_warn__ftest_coverage=yes
13712 else
13713 gl_cv_warn__ftest_coverage=no
13714 fi
13715 rm -f conftest.err conftest.i conftest.$ac_ext
13716 CPPFLAGS="$gl_save_CPPFLAGS"
13717
13718 fi
13719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn__ftest_coverage" >&5
13720 $as_echo "$gl_cv_warn__ftest_coverage" >&6; }
13721 if test "x$gl_cv_warn__ftest_coverage" = xyes; then :
13722 as_fn_append COV_FLAGS " -ftest-coverage"
13723 fi
13724
13725 COVERAGE_CFLAGS=$COV_FLAGS
13726
13727 COVERAGE_LDFLAGS=$COV_FLAGS
13728
13729 COV_FLAGS=
1290513730 fi
1290613731
1290713732
1380214627 # report actual input values of CONFIG_FILES etc. instead of their
1380314628 # values after options handling.
1380414629 ac_log="
13805 This file was extended by libvirt-glib $as_me 0.0.4, which was
14630 This file was extended by libvirt-glib $as_me 0.0.5, which was
1380614631 generated by GNU Autoconf 2.68. Invocation command line was
1380714632
1380814633 CONFIG_FILES = $CONFIG_FILES
1387214697 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
1387314698 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
1387414699 ac_cs_version="\\
13875 libvirt-glib config.status 0.0.4
14700 libvirt-glib config.status 0.0.5
1387614701 configured by $0, generated by GNU Autoconf 2.68,
1387714702 with options \\"\$ac_cs_config\\"
1387814703
0 AC_INIT(libvirt-glib, 0.0.4)
0 AC_INIT(libvirt-glib, 0.0.5)
11 AC_CONFIG_SRCDIR(libvirt-glib/libvirt-glib-main.c)
22 AC_CONFIG_AUX_DIR([build-aux])
33 AM_CONFIG_HEADER(config.h)
88
99 AM_SILENT_RULES([yes])
1010
11 LIBVIRT_REQUIRED=0.9.7
12 GLIB2_REQUIRED=2.10.0
11 LIBVIRT_REQUIRED=0.9.10
12 GLIB2_REQUIRED=2.22.0
1313 GOBJECT2_REQUIRED=2.10.0
1414 GIO_REQUIRED=2.10.0
1515 GOBJECT_INTROSPECTION_REQUIRED=0.10.8
5050 [AC_CONFIG_LINKS([$GNUmakefile:$GNUmakefile], [],
5151 [GNUmakefile=$GNUmakefile])])
5252
53 LIBVIRT_GLIB_COMPILE_WARNINGS([maximum])
53 LIBVIRT_GLIB_COMPILE_WARNINGS
5454
5555 PKG_CHECK_MODULES(LIBVIRT, libvirt >= $LIBVIRT_REQUIRED)
5656 PKG_CHECK_MODULES(GLIB2, glib-2.0 >= $GLIB2_REQUIRED)
100100 enable_coverage=$enableval
101101
102102 if test "${enable_coverage}" = yes; then
103 gl_COMPILER_FLAGS(-fprofile-arcs)
104 gl_COMPILER_FLAGS(-ftest-coverage)
105 AC_SUBST([COVERAGE_CFLAGS], [$COMPILER_FLAGS])
106 AC_SUBST([COVERAGE_LDFLAGS], [$COMPILER_FLAGS])
107 COMPILER_FLAGS=
103 gl_WARN_ADD([-fprofile-arcs], COV_FLAGS)
104 gl_WARN_ADD([-ftest-coverage], COV_FLAGS)
105 AC_SUBST([COVERAGE_CFLAGS], [$COV_FLAGS])
106 AC_SUBST([COVERAGE_LDFLAGS], [$COV_FLAGS])
107 COV_FLAGS=
108108 fi
109109
110110 dnl
3535 subdir = docs
3636 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
3737 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
38 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
39 $(top_srcdir)/configure.ac
38 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
39 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
40 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
41 $(top_srcdir)/m4/manywarnings.m4 \
42 $(top_srcdir)/m4/virt-compile-warnings.m4 \
43 $(top_srcdir)/m4/warnings.m4 $(top_srcdir)/configure.ac
4044 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
4145 $(ACLOCAL_M4)
4246 mkinstalldirs = $(install_sh) -d
104108 CC = @CC@
105109 CCDEPMODE = @CCDEPMODE@
106110 CFLAGS = @CFLAGS@
107 COMPILER_FLAGS = @COMPILER_FLAGS@
108111 COVERAGE_CFLAGS = @COVERAGE_CFLAGS@
109112 COVERAGE_LDFLAGS = @COVERAGE_LDFLAGS@
113 COV_FLAGS = @COV_FLAGS@
110114 CPP = @CPP@
111115 CPPFLAGS = @CPPFLAGS@
112116 CYGPATH_W = @CYGPATH_W@
200204 VAPIGEN = @VAPIGEN@
201205 VERSION = @VERSION@
202206 WARN_CFLAGS = @WARN_CFLAGS@
207 WARN_LDFLAGS = @WARN_LDFLAGS@
203208 abs_builddir = @abs_builddir@
204209 abs_srcdir = @abs_srcdir@
205210 abs_top_builddir = @abs_top_builddir@
33 GVIR_CONFIG_TYPE_DOMAIN_CLOCK_OFFSET
44 GVIR_CONFIG_TYPE_DOMAIN_CONSOLE_TARGET_TYPE
55 GVIR_CONFIG_TYPE_DOMAIN_DISK_BUS
6 GVIR_CONFIG_TYPE_DOMAIN_DISK_CACHE_TYPE
67 GVIR_CONFIG_TYPE_DOMAIN_DISK_GUEST_DEVICE_TYPE
78 GVIR_CONFIG_TYPE_DOMAIN_DISK_SNAPSHOT_TYPE
89 GVIR_CONFIG_TYPE_DOMAIN_DISK_TYPE
2829 gvir_config_domain_clock_offset_get_type
2930 gvir_config_domain_console_target_type_get_type
3031 gvir_config_domain_disk_bus_get_type
32 gvir_config_domain_disk_cache_type_get_type
3133 gvir_config_domain_disk_guest_device_type_get_type
3234 gvir_config_domain_disk_snapshot_type_get_type
3335 gvir_config_domain_disk_type_get_type
11 gvir_config_domain_clock_offset_get_type
22 gvir_config_domain_console_target_type_get_type
33 gvir_config_domain_disk_bus_get_type
4 gvir_config_domain_disk_cache_type_get_type
45 gvir_config_domain_disk_guest_device_type_get_type
56 gvir_config_domain_disk_snapshot_type_get_type
67 gvir_config_domain_disk_type_get_type
4242 $(top_srcdir)/gtk-doc.make
4343 subdir = docs/libvirt-gconfig
4444 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
45 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
46 $(top_srcdir)/configure.ac
45 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
46 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
47 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
48 $(top_srcdir)/m4/manywarnings.m4 \
49 $(top_srcdir)/m4/virt-compile-warnings.m4 \
50 $(top_srcdir)/m4/warnings.m4 $(top_srcdir)/configure.ac
4751 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
4852 $(ACLOCAL_M4)
4953 mkinstalldirs = $(install_sh) -d
7175 CC = @CC@
7276 CCDEPMODE = @CCDEPMODE@
7377 CFLAGS = @CFLAGS@
74 COMPILER_FLAGS = @COMPILER_FLAGS@
7578 COVERAGE_CFLAGS = @COVERAGE_CFLAGS@
7679 COVERAGE_LDFLAGS = @COVERAGE_LDFLAGS@
80 COV_FLAGS = @COV_FLAGS@
7781 CPP = @CPP@
7882 CPPFLAGS = @CPPFLAGS@
7983 CYGPATH_W = @CYGPATH_W@
167171 VAPIGEN = @VAPIGEN@
168172 VERSION = @VERSION@
169173 WARN_CFLAGS = @WARN_CFLAGS@
174 WARN_LDFLAGS = @WARN_LDFLAGS@
170175 abs_builddir = @abs_builddir@
171176 abs_srcdir = @abs_srcdir@
172177 abs_top_builddir = @abs_top_builddir@
3838 <dd></dd>
3939 <dt>
4040 GVIR_CONFIG_TYPE_DOMAIN_DISK_BUS, macro in libvirt-gconfig-enum-types
41 </dt>
42 <dd></dd>
43 <dt>
44 GVIR_CONFIG_TYPE_DOMAIN_DISK_CACHE_TYPE, macro in libvirt-gconfig-enum-types
4145 </dt>
4246 <dd></dd>
4347 <dt>
2020 </tr></table>
2121 <div class="chapter">
2222 <div class="titlepage"><div><div><h2 class="title">
23 <a name="id486980"></a>Libvirt-gconfig</h2></div></div></div>
23 <a name="id532310"></a>Libvirt-gconfig</h2></div></div></div>
2424 <span style="color: red">&lt;xi:include&gt;&lt;/xi:include&gt;</span><span style="color: red">&lt;xi:include&gt;&lt;/xi:include&gt;</span><span style="color: red">&lt;xi:include&gt;&lt;/xi:include&gt;</span><span style="color: red">&lt;xi:include&gt;&lt;/xi:include&gt;</span><span style="color: red">&lt;xi:include&gt;&lt;/xi:include&gt;</span><span style="color: red">&lt;xi:include&gt;&lt;/xi:include&gt;</span><span style="color: red">&lt;xi:include&gt;&lt;/xi:include&gt;</span><span style="color: red">&lt;xi:include&gt;&lt;/xi:include&gt;</span><span style="color: red">&lt;xi:include&gt;&lt;/xi:include&gt;</span><span style="color: red">&lt;xi:include&gt;&lt;/xi:include&gt;</span><span style="color: red">&lt;xi:include&gt;&lt;/xi:include&gt;</span>
2525 </div>
2626 <div class="footer">
4242 $(top_srcdir)/gtk-doc.make
4343 subdir = docs/libvirt-glib
4444 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
45 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
46 $(top_srcdir)/configure.ac
45 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
46 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
47 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
48 $(top_srcdir)/m4/manywarnings.m4 \
49 $(top_srcdir)/m4/virt-compile-warnings.m4 \
50 $(top_srcdir)/m4/warnings.m4 $(top_srcdir)/configure.ac
4751 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
4852 $(ACLOCAL_M4)
4953 mkinstalldirs = $(install_sh) -d
7175 CC = @CC@
7276 CCDEPMODE = @CCDEPMODE@
7377 CFLAGS = @CFLAGS@
74 COMPILER_FLAGS = @COMPILER_FLAGS@
7578 COVERAGE_CFLAGS = @COVERAGE_CFLAGS@
7679 COVERAGE_LDFLAGS = @COVERAGE_LDFLAGS@
80 COV_FLAGS = @COV_FLAGS@
7781 CPP = @CPP@
7882 CPPFLAGS = @CPPFLAGS@
7983 CYGPATH_W = @CYGPATH_W@
167171 VAPIGEN = @VAPIGEN@
168172 VERSION = @VERSION@
169173 WARN_CFLAGS = @WARN_CFLAGS@
174 WARN_LDFLAGS = @WARN_LDFLAGS@
170175 abs_builddir = @abs_builddir@
171176 abs_srcdir = @abs_srcdir@
172177 abs_top_builddir = @abs_top_builddir@
2020 </tr></table>
2121 <div class="chapter">
2222 <div class="titlepage"><div><div><h2 class="title">
23 <a name="id533095"></a>Libvirt-glib</h2></div></div></div>
23 <a name="id588186"></a>Libvirt-glib</h2></div></div></div>
2424 <span style="color: red">&lt;xi:include&gt;&lt;/xi:include&gt;</span><span style="color: red">&lt;xi:include&gt;&lt;/xi:include&gt;</span><span style="color: red">&lt;xi:include&gt;&lt;/xi:include&gt;</span>
2525 </div>
2626 <div class="footer">
00 <SECTION>
11 <FILE>libvirt-gobject-enums</FILE>
22 <SUBSECTION Standard>
3 GVIR_TYPE_DOMAIN_DELETE_FLAGS
34 GVIR_TYPE_DOMAIN_START_FLAGS
45 GVIR_TYPE_DOMAIN_STATE
6 gvir_domain_delete_flags_get_type
57 gvir_domain_start_flags_get_type
68 gvir_domain_state_get_type
79 </SECTION>
0 gvir_domain_delete_flags_get_type
01 gvir_domain_start_flags_get_type
12 gvir_domain_state_get_type
4242 $(top_srcdir)/gtk-doc.make
4343 subdir = docs/libvirt-gobject
4444 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
45 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
46 $(top_srcdir)/configure.ac
45 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
46 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
47 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
48 $(top_srcdir)/m4/manywarnings.m4 \
49 $(top_srcdir)/m4/virt-compile-warnings.m4 \
50 $(top_srcdir)/m4/warnings.m4 $(top_srcdir)/configure.ac
4751 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
4852 $(ACLOCAL_M4)
4953 mkinstalldirs = $(install_sh) -d
7175 CC = @CC@
7276 CCDEPMODE = @CCDEPMODE@
7377 CFLAGS = @CFLAGS@
74 COMPILER_FLAGS = @COMPILER_FLAGS@
7578 COVERAGE_CFLAGS = @COVERAGE_CFLAGS@
7679 COVERAGE_LDFLAGS = @COVERAGE_LDFLAGS@
80 COV_FLAGS = @COV_FLAGS@
7781 CPP = @CPP@
7882 CPPFLAGS = @CPPFLAGS@
7983 CYGPATH_W = @CYGPATH_W@
167171 VAPIGEN = @VAPIGEN@
168172 VERSION = @VERSION@
169173 WARN_CFLAGS = @WARN_CFLAGS@
174 WARN_LDFLAGS = @WARN_LDFLAGS@
170175 abs_builddir = @abs_builddir@
171176 abs_srcdir = @abs_srcdir@
172177 abs_top_builddir = @abs_top_builddir@
2020 </tr></table>
2121 <div class="chapter">
2222 <div class="titlepage"><div><div><h2 class="title">
23 <a name="id383591"></a>Libvirt-gobject</h2></div></div></div>
23 <a name="id437248"></a>Libvirt-gobject</h2></div></div></div>
2424 <span style="color: red">&lt;xi:include&gt;&lt;/xi:include&gt;</span><span style="color: red">&lt;xi:include&gt;&lt;/xi:include&gt;</span><span style="color: red">&lt;xi:include&gt;&lt;/xi:include&gt;</span><span style="color: red">&lt;xi:include&gt;&lt;/xi:include&gt;</span><span style="color: red">&lt;xi:include&gt;&lt;/xi:include&gt;</span><span style="color: red">&lt;xi:include&gt;&lt;/xi:include&gt;</span><span style="color: red">&lt;xi:include&gt;&lt;/xi:include&gt;</span><span style="color: red">&lt;xi:include&gt;&lt;/xi:include&gt;</span><span style="color: red">&lt;xi:include&gt;&lt;/xi:include&gt;</span><span style="color: red">&lt;xi:include&gt;&lt;/xi:include&gt;</span><span style="color: red">&lt;xi:include&gt;&lt;/xi:include&gt;</span><span style="color: red">&lt;xi:include&gt;&lt;/xi:include&gt;</span>
2525 </div>
2626 <div class="footer">
3737 subdir = examples
3838 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
3939 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
40 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
41 $(top_srcdir)/configure.ac
40 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
41 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
42 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
43 $(top_srcdir)/m4/manywarnings.m4 \
44 $(top_srcdir)/m4/virt-compile-warnings.m4 \
45 $(top_srcdir)/m4/warnings.m4 $(top_srcdir)/configure.ac
4246 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
4347 $(ACLOCAL_M4)
4448 mkinstalldirs = $(install_sh) -d
108112 CC = @CC@
109113 CCDEPMODE = @CCDEPMODE@
110114 CFLAGS = @CFLAGS@
111 COMPILER_FLAGS = @COMPILER_FLAGS@
112115 COVERAGE_CFLAGS = @COVERAGE_CFLAGS@
113116 COVERAGE_LDFLAGS = @COVERAGE_LDFLAGS@
117 COV_FLAGS = @COV_FLAGS@
114118 CPP = @CPP@
115119 CPPFLAGS = @CPPFLAGS@
116120 CYGPATH_W = @CYGPATH_W@
204208 VAPIGEN = @VAPIGEN@
205209 VERSION = @VERSION@
206210 WARN_CFLAGS = @WARN_CFLAGS@
211 WARN_LDFLAGS = @WARN_LDFLAGS@
207212 abs_builddir = @abs_builddir@
208213 abs_srcdir = @abs_srcdir@
209214 abs_top_builddir = @abs_top_builddir@
7171 case VIR_DOMAIN_EVENT_STARTED_RESTORED:
7272 ret = "Restored";
7373 break;
74 default:
75 break;
7476 }
7577 break;
7678 case VIR_DOMAIN_EVENT_SUSPENDED:
105107 case VIR_DOMAIN_EVENT_STOPPED_FAILED:
106108 ret = "Failed";
107109 break;
110 default:
111 break;
108112 }
113 break;
114 default:
109115 break;
110116 }
111117 return ret;
4040 DIST_COMMON = $(libvirt_gconfig_1_0_la_HEADERS) $(noinst_HEADERS) \
4141 $(srcdir)/Makefile.am $(srcdir)/Makefile.in
4242 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
43 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
44 $(top_srcdir)/configure.ac
43 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
44 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
45 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
46 $(top_srcdir)/m4/manywarnings.m4 \
47 $(top_srcdir)/m4/virt-compile-warnings.m4 \
48 $(top_srcdir)/m4/warnings.m4 $(top_srcdir)/configure.ac
4549 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
4650 $(ACLOCAL_M4)
4751 mkinstalldirs = $(install_sh) -d
219223 CC = @CC@
220224 CCDEPMODE = @CCDEPMODE@
221225 CFLAGS = @CFLAGS@
222 COMPILER_FLAGS = @COMPILER_FLAGS@
223226 COVERAGE_CFLAGS = @COVERAGE_CFLAGS@
224227 COVERAGE_LDFLAGS = @COVERAGE_LDFLAGS@
228 COV_FLAGS = @COV_FLAGS@
225229 CPP = @CPP@
226230 CPPFLAGS = @CPPFLAGS@
227231 CYGPATH_W = @CYGPATH_W@
315319 VAPIGEN = @VAPIGEN@
316320 VERSION = @VERSION@
317321 WARN_CFLAGS = @WARN_CFLAGS@
322 WARN_LDFLAGS = @WARN_LDFLAGS@
318323 abs_builddir = @abs_builddir@
319324 abs_srcdir = @abs_srcdir@
320325 abs_top_builddir = @abs_top_builddir@
171171 "driver", "type", driver_type);
172172 }
173173
174 void gvir_config_domain_disk_set_driver_cache(GVirConfigDomainDisk *disk,
175 GVirConfigDomainDiskCacheType cache_type)
176 {
177 const char *cache_str;
178
179 g_return_if_fail(GVIR_CONFIG_IS_DOMAIN_DISK(disk));
180 cache_str = gvir_config_genum_get_nick(GVIR_CONFIG_TYPE_DOMAIN_DISK_CACHE_TYPE, cache_type);
181 g_return_if_fail(cache_str != NULL);
182 gvir_config_object_add_child_with_attribute(GVIR_CONFIG_OBJECT(disk),
183 "driver", "cache", cache_str);
184 }
185
174186 void gvir_config_domain_disk_set_target_bus(GVirConfigDomainDisk *disk,
175187 GVirConfigDomainDiskBus bus)
176188 {
268280 "driver", "type");
269281 }
270282
283 GVirConfigDomainDiskCacheType
284 gvir_config_domain_disk_get_driver_cache(GVirConfigDomainDisk *disk)
285 {
286 g_return_val_if_fail(GVIR_CONFIG_IS_DOMAIN_DISK(disk),
287 GVIR_CONFIG_DOMAIN_DISK_CACHE_DEFAULT);
288
289 return gvir_config_object_get_attribute_genum(GVIR_CONFIG_OBJECT(disk),
290 "driver", "cache",
291 GVIR_CONFIG_TYPE_DOMAIN_DISK_CACHE_TYPE,
292 GVIR_CONFIG_DOMAIN_DISK_CACHE_DEFAULT);
293 }
271294 GVirConfigDomainDiskBus
272295 gvir_config_domain_disk_get_target_bus(GVirConfigDomainDisk *disk)
273296 {
291314 return gvir_config_object_get_attribute(GVIR_CONFIG_OBJECT(disk),
292315 "target", "dev");
293316 }
317
318 void
319 gvir_config_domain_disk_set_readonly(GVirConfigDomainDisk *disk,
320 gboolean readonly)
321 {
322 if (readonly) {
323 GVirConfigObject *node = gvir_config_object_replace_child(GVIR_CONFIG_OBJECT(disk), "readonly");
324 g_object_unref(node);
325 } else
326 gvir_config_object_delete_child(GVIR_CONFIG_OBJECT(disk), "readonly", NULL);
327 }
7474 } GVirConfigDomainDiskBus;
7575
7676 typedef enum {
77 GVIR_CONFIG_DOMAIN_DISK_CACHE_DEFAULT,
78 GVIR_CONFIG_DOMAIN_DISK_CACHE_NONE,
79 GVIR_CONFIG_DOMAIN_DISK_CACHE_WRITETHROUGH,
80 GVIR_CONFIG_DOMAIN_DISK_CACHE_WRITEBACK,
81 GVIR_CONFIG_DOMAIN_DISK_CACHE_DIRECTSYNC,
82 GVIR_CONFIG_DOMAIN_DISK_CACHE_UNSAFE
83 } GVirConfigDomainDiskCacheType;
84
85 typedef enum {
7786 GVIR_CONFIG_DOMAIN_DISK_GUEST_DEVICE_DISK,
7887 GVIR_CONFIG_DOMAIN_DISK_GUEST_DEVICE_FLOPPY,
7988 GVIR_CONFIG_DOMAIN_DISK_GUEST_DEVICE_CDROM
99108 GVirConfigDomainDiskSnapshotType type);
100109 void gvir_config_domain_disk_set_source(GVirConfigDomainDisk *disk,
101110 const char *source);
111 void gvir_config_domain_disk_set_driver_cache(GVirConfigDomainDisk *disk,
112 GVirConfigDomainDiskCacheType cache_type);
102113 void gvir_config_domain_disk_set_driver_name(GVirConfigDomainDisk *disk,
103114 const char *driver_name);
104115 void gvir_config_domain_disk_set_driver_type(GVirConfigDomainDisk *disk,
112123 GVirConfigDomainDiskGuestDeviceType gvir_config_domain_disk_get_guest_device_type(GVirConfigDomainDisk *disk);
113124 GVirConfigDomainDiskSnapshotType gvir_config_domain_disk_get_snapshot_type(GVirConfigDomainDisk *disk);
114125 char *gvir_config_domain_disk_get_source(GVirConfigDomainDisk *disk);
126 GVirConfigDomainDiskCacheType gvir_config_domain_disk_get_driver_cache(GVirConfigDomainDisk *disk);
115127 char *gvir_config_domain_disk_get_driver_name(GVirConfigDomainDisk *disk);
116128 char *gvir_config_domain_disk_get_driver_type(GVirConfigDomainDisk *disk);
117129 GVirConfigDomainDiskBus gvir_config_domain_disk_get_target_bus(GVirConfigDomainDisk *disk);
118130 char *gvir_config_domain_disk_get_target_dev(GVirConfigDomainDisk *disk);
131 void gvir_config_domain_disk_set_readonly(GVirConfigDomainDisk *disk,
132 gboolean readonly);
119133
120134 G_END_DECLS
121135
155155 GVirConfigObject *node = gvir_config_object_replace_child(GVIR_CONFIG_OBJECT(filesys), "readonly");
156156 g_object_unref(node);
157157 } else {
158 gvir_config_object_delete_child(GVIR_CONFIG_OBJECT(filesys), "readonly");
158 gvir_config_object_delete_child(GVIR_CONFIG_OBJECT(filesys), "readonly", NULL);
159159 }
160160 }
3838 enum {
3939 PROP_0,
4040 PROP_NAME,
41 PROP_DESCRIPTION,
4142 PROP_MEMORY,
4243 PROP_VCPU,
4344 PROP_FEATURES
5455 case PROP_NAME:
5556 g_value_take_string(value, gvir_config_domain_get_name(domain));
5657 break;
58 case PROP_DESCRIPTION:
59 g_value_take_string(value, gvir_config_domain_get_description(domain));
60 break;
5761 case PROP_MEMORY:
5862 g_value_set_uint64(value, gvir_config_domain_get_memory(domain));
5963 break;
7983 switch (prop_id) {
8084 case PROP_NAME:
8185 gvir_config_domain_set_name(domain, g_value_get_string(value));
86 break;
87 case PROP_DESCRIPTION:
88 gvir_config_domain_set_description(domain, g_value_get_string(value));
8289 break;
8390 case PROP_MEMORY:
8491 gvir_config_domain_set_memory(domain, g_value_get_uint64(value));
109116 g_param_spec_string("name",
110117 "Name",
111118 "Domain Name",
119 NULL,
120 G_PARAM_READWRITE |
121 G_PARAM_STATIC_STRINGS));
122 g_object_class_install_property(object_class,
123 PROP_DESCRIPTION,
124 g_param_spec_string("description",
125 "Description",
126 "Some human readable description (could be anything).",
112127 NULL,
113128 G_PARAM_READWRITE |
114129 G_PARAM_STATIC_STRINGS));
195210 g_object_notify(G_OBJECT(domain), "name");
196211 }
197212
213 char *gvir_config_domain_get_description(GVirConfigDomain *domain)
214 {
215 return gvir_config_object_get_node_content(GVIR_CONFIG_OBJECT(domain),
216 "description");
217 }
218
219 void gvir_config_domain_set_description(GVirConfigDomain *domain, const char *description)
220 {
221 gvir_config_object_set_node_content(GVIR_CONFIG_OBJECT(domain),
222 "description", description);
223 g_object_notify(G_OBJECT(domain), "description");
224 }
225
198226 /**
199227 * gvir_config_domain_get_memory:
200228 * @domain: A domain configuration object.
289317 g_return_if_fail(GVIR_CONFIG_IS_DOMAIN(domain));
290318 g_return_if_fail(GVIR_CONFIG_IS_DOMAIN_CLOCK(klock));
291319
292 gvir_config_object_attach(GVIR_CONFIG_OBJECT(domain),
293 GVIR_CONFIG_OBJECT(klock));
320 gvir_config_object_attach_replace(GVIR_CONFIG_OBJECT(domain),
321 GVIR_CONFIG_OBJECT(klock));
294322 }
295323
296324 void gvir_config_domain_set_os(GVirConfigDomain *domain,
299327 g_return_if_fail(GVIR_CONFIG_IS_DOMAIN(domain));
300328 g_return_if_fail(GVIR_CONFIG_IS_DOMAIN_OS(os));
301329
302 gvir_config_object_attach(GVIR_CONFIG_OBJECT(domain),
303 GVIR_CONFIG_OBJECT(os));
330 gvir_config_object_attach_replace(GVIR_CONFIG_OBJECT(domain),
331 GVIR_CONFIG_OBJECT(os));
304332 }
305333
306334 void gvir_config_domain_set_seclabel(GVirConfigDomain *domain,
309337 g_return_if_fail(GVIR_CONFIG_IS_DOMAIN(domain));
310338 g_return_if_fail(GVIR_CONFIG_IS_DOMAIN_SECLABEL(seclabel));
311339
312 gvir_config_object_attach(GVIR_CONFIG_OBJECT(domain),
313 GVIR_CONFIG_OBJECT(seclabel));
340 gvir_config_object_attach_replace(GVIR_CONFIG_OBJECT(domain),
341 GVIR_CONFIG_OBJECT(seclabel));
314342 }
315343
316344 void gvir_config_domain_set_lifecycle(GVirConfigDomain *domain,
353381 g_warn_if_reached();
354382 continue;
355383 }
356 gvir_config_object_attach(devices_node, GVIR_CONFIG_OBJECT(it->data));
357 }
358
359 gvir_config_object_attach(GVIR_CONFIG_OBJECT(domain), devices_node);
384 gvir_config_object_attach_add(devices_node,
385 GVIR_CONFIG_OBJECT(it->data));
386 }
387
388 gvir_config_object_attach_replace(GVIR_CONFIG_OBJECT(domain),
389 devices_node);
360390 g_object_unref(G_OBJECT(devices_node));
361391 }
362392
371401 devices_node = gvir_config_object_add_child(GVIR_CONFIG_OBJECT(domain),
372402 "devices");
373403
374 gvir_config_object_attach(devices_node, GVIR_CONFIG_OBJECT(device));
404 gvir_config_object_attach_add(devices_node, GVIR_CONFIG_OBJECT(device));
375405 g_object_unref(G_OBJECT(devices_node));
376406 }
377407
418448
419449 return data.devices;
420450 }
451
452 gboolean gvir_config_domain_set_custom_xml(GVirConfigDomain *domain,
453 const gchar *xml,
454 const gchar *ns,
455 const gchar *ns_uri,
456 GError **error)
457 {
458 GVirConfigObject *metadata;
459 GVirConfigObject *custom_xml;
460
461 g_return_val_if_fail(GVIR_CONFIG_IS_DOMAIN(domain), FALSE);
462 g_return_val_if_fail(xml != NULL, FALSE);
463 g_return_val_if_fail(error == NULL || *error == NULL, FALSE);
464
465 metadata = gvir_config_object_add_child(GVIR_CONFIG_OBJECT(domain),
466 "metadata");
467
468 custom_xml = gvir_config_object_new_from_xml(GVIR_CONFIG_TYPE_OBJECT,
469 NULL, NULL, xml, error);
470 if (custom_xml == NULL) {
471 g_assert_not_reached();
472 g_object_unref(G_OBJECT(metadata));
473 return FALSE;
474 }
475
476 gvir_config_object_set_namespace(custom_xml, ns, ns_uri);
477
478 gvir_config_object_delete_children(metadata, NULL, ns_uri);
479 gvir_config_object_attach_add(metadata, custom_xml);
480 g_object_unref(G_OBJECT(metadata));
481 g_object_unref(G_OBJECT(custom_xml));
482
483 return TRUE;
484 }
485
486 struct LookupNamespacedNodeData {
487 const char *ns_uri;
488 xmlNodePtr node;
489 };
490
491 static gboolean lookup_namespaced_node(xmlNodePtr node, gpointer opaque)
492 {
493 struct LookupNamespacedNodeData* data = opaque;
494
495 if (node->ns == NULL)
496 return TRUE;
497
498 if (g_strcmp0((char *)node->ns->href, data->ns_uri) == 0) {
499 data->node = node;
500 return FALSE;
501 }
502
503 return TRUE;
504 }
505
506 gchar *gvir_config_domain_get_custom_xml(GVirConfigDomain *domain,
507 const gchar *ns_uri)
508 {
509 struct LookupNamespacedNodeData data = { NULL, NULL };
510
511 g_return_val_if_fail(GVIR_CONFIG_IS_DOMAIN(domain), NULL);
512 g_return_val_if_fail(ns_uri != NULL, NULL);
513
514 data.ns_uri = ns_uri;
515 gvir_config_object_foreach_child(GVIR_CONFIG_OBJECT(domain), "metadata",
516 lookup_namespaced_node, &data);
517 return gvir_config_xml_node_to_string(data.node);
518 }
101101 void gvir_config_domain_set_virt_type(GVirConfigDomain *domain, GVirConfigDomainVirtType type);
102102 char *gvir_config_domain_get_name(GVirConfigDomain *domain);
103103 void gvir_config_domain_set_name(GVirConfigDomain *domain, const char *name);
104 char *gvir_config_domain_get_description(GVirConfigDomain *domain);
105 void gvir_config_domain_set_description(GVirConfigDomain *domain, const char *description);
104106 guint64 gvir_config_domain_get_memory(GVirConfigDomain *domain);
105107 void gvir_config_domain_set_memory(GVirConfigDomain *domain, guint64 memory);
106108 guint64 gvir_config_domain_get_vcpus(GVirConfigDomain *domain);
123125 void gvir_config_domain_set_lifecycle(GVirConfigDomain *domain,
124126 GVirConfigDomainLifecycleEvent event,
125127 GVirConfigDomainLifecycleAction action);
128 gboolean gvir_config_domain_set_custom_xml(GVirConfigDomain *domain,
129 const gchar *xml,
130 const gchar *ns,
131 const gchar *ns_uri,
132 GError **error);
133 gchar *gvir_config_domain_get_custom_xml(GVirConfigDomain *domain,
134 const gchar *ns_uri);
126135
127136 G_END_DECLS
128137
5555 const char *child_name);
5656 xmlChar *gvir_config_xml_get_attribute_content(xmlNodePtr node,
5757 const char *attr_name);
58 char *gvir_config_xml_node_to_string(xmlNodePtr node);
5859 char *gvir_config_xml_get_attribute_content_glib(xmlNodePtr node,
5960 const char *attr_name);
6061 const char *gvir_config_genum_get_nick (GType enum_type, gint value);
147147 "Unable to parse configuration");
148148 return NULL;
149149 }
150 if ((!doc->children) || (strcmp((char *)doc->children->name, root_node) != 0)) {
150 if ((!doc->children) ||
151 ((root_node != NULL) && g_strcmp0((char *)doc->children->name, root_node) != 0)) {
151152 g_set_error(err,
152153 GVIR_CONFIG_OBJECT_ERROR,
153154 0,
168169
169170 g_return_if_fail(iter_func != NULL);
170171
171 for (it = node->children; it != NULL; it = it->next) {
172 it = node->children;
173 while (it != NULL) {
172174 gboolean cont;
173
174 if (xmlIsBlankNode(it))
175 continue;
176 cont = iter_func(it, opaque);
177 if (!cont)
178 break;
175 xmlNodePtr next = it->next;
176
177 if (!xmlIsBlankNode(it)) {
178 cont = iter_func(it, opaque);
179 if (!cont)
180 break;
181 }
182
183 it = next;
179184 }
180185 }
181186
302307
303308 g_return_val_if_reached(default_value);
304309 }
310
311 G_GNUC_INTERNAL char *
312 gvir_config_xml_node_to_string(xmlNodePtr node)
313 {
314 xmlBufferPtr xmlbuf;
315 char *xml;
316
317 if (node == NULL)
318 return NULL;
319
320 xmlbuf = xmlBufferCreate();
321 if (xmlNodeDump(xmlbuf, node->doc, node, 0, 1) < 0)
322 return NULL;
323 else
324 xml = g_strndup((gchar *)xmlBufferContent(xmlbuf), xmlBufferLength(xmlbuf));
325
326 xmlBufferFree(xmlbuf);
327
328 return xml;
329 }
7070 const char *attr_name,
7171 const char *attr_value);
7272 void gvir_config_object_delete_child(GVirConfigObject *object,
73 const char *child_name);
73 const char *child_name,
74 const char *ns_href);
75 void gvir_config_object_delete_children(GVirConfigObject *object,
76 const char *child_name,
77 const char *ns_href);
7478 void gvir_config_object_set_child(GVirConfigObject *object,
7579 xmlNodePtr child);
7680
77 void gvir_config_object_attach(GVirConfigObject *parent,
78 GVirConfigObject *child);
81 void gvir_config_object_attach_add(GVirConfigObject *parent,
82 GVirConfigObject *child);
83 void gvir_config_object_attach_replace(GVirConfigObject *parent,
84 GVirConfigObject *child);
7985 void gvir_config_object_set_attribute(GVirConfigObject *object,
8086 ...) G_GNUC_NULL_TERMINATED;
8187 void gvir_config_object_set_attribute_with_type(GVirConfigObject *object,
8692 const char *parent_name,
8793 GVirConfigXmlNodeIterator iter_func,
8894 gpointer opaque);
95 gboolean gvir_config_object_set_namespace(GVirConfigObject *object,
96 const char *ns,
97 const char *ns_uri);
8998
9099 G_END_DECLS
91100
255255
256256 gchar *gvir_config_object_to_xml(GVirConfigObject *config)
257257 {
258 xmlChar *doc;
259 int size;
260 xmlNodePtr node;
261 gchar *output_doc;
262
263 node = gvir_config_object_get_xml_node(config);
264 if (node == NULL)
265 return NULL;
266
267 xmlDocDumpFormatMemory(node->doc, &doc, &size, 1);
268
269 output_doc = g_strdup((gchar *)doc);
270 xmlFree(doc);
271
272 return output_doc;
258 return gvir_config_xml_node_to_string(config->priv->node);
273259 }
274260
275261 const gchar *gvir_config_object_get_schema(GVirConfigObject *config)
464450 g_object_unref(G_OBJECT(child));
465451 }
466452
453 struct NodeMatch {
454 const char *name;
455 const char *ns;
456 };
457
458 static gboolean maybe_unlink_node(xmlNodePtr node, void *opaque)
459 {
460 gboolean dounlink = TRUE;
461 struct NodeMatch *match = (struct NodeMatch *)opaque;
462
463 if (match->ns != NULL) {
464 dounlink = dounlink && (g_strcmp0(match->ns, (char *)node->ns->href) == 0);
465 }
466
467 if (match->name != NULL) {
468 dounlink = dounlink && (g_strcmp0(match->name, (char *)node->name) == 0);
469 }
470 if (dounlink) {
471 xmlUnlinkNode(node);
472 xmlFreeNode(node);
473 }
474
475 return dounlink;
476 }
477
478 static gboolean remove_oneshot(xmlNodePtr node, gpointer opaque)
479 {
480 return !maybe_unlink_node(node, opaque);
481 }
482
467483 G_GNUC_INTERNAL void
468484 gvir_config_object_delete_child(GVirConfigObject *object,
469 const char *child_name)
470 {
471 xmlNodePtr parent_node;
472 xmlNodePtr old_node;
485 const char *child_name,
486 const char *ns_href)
487 {
488 struct NodeMatch match;
473489
474490 g_return_if_fail(GVIR_CONFIG_IS_OBJECT(object));
475 g_return_if_fail(child_name != NULL);
476
477 parent_node = gvir_config_object_get_xml_node(GVIR_CONFIG_OBJECT(object));
478 g_return_if_fail(parent_node != NULL);
479
480 if (!(old_node = gvir_config_xml_get_element(parent_node, child_name, NULL)))
481 return;
482
483 /* FIXME: should we make sure there are no multiple occurrences
484 * of this node?
485 */
486 xmlUnlinkNode(old_node);
487 xmlFreeNode(old_node);
488 }
489
491
492 match.name = child_name;
493 match.ns = ns_href;
494 gvir_config_object_foreach_child(object, NULL, remove_oneshot, &match);
495 }
496
497 static gboolean remove_always(xmlNodePtr node, gpointer opaque)
498 {
499 maybe_unlink_node(node, opaque);
500
501 return TRUE;
502 }
503
504 G_GNUC_INTERNAL void
505 gvir_config_object_delete_children(GVirConfigObject *object,
506 const char *child_name,
507 const char *ns_href)
508 {
509 struct NodeMatch match;
510
511 g_return_if_fail(GVIR_CONFIG_IS_OBJECT(object));
512
513 match.name = child_name;
514 match.ns = ns_href;
515
516 gvir_config_object_foreach_child(object, NULL, remove_always, &match);
517 }
490518
491519 G_GNUC_INTERNAL void
492520 gvir_config_object_set_node_content(GVirConfigObject *object,
614642 GVirConfigObject *object;
615643 GVirConfigXmlDoc *doc;
616644 xmlNodePtr node;
617
618 node = gvir_config_xml_parse(xml, root_name, error);
619 if ((error != NULL) && (*error != NULL))
645 GError *tmp_error = NULL;
646
647 node = gvir_config_xml_parse(xml, root_name, &tmp_error);
648 if (tmp_error != NULL) {
649 g_propagate_error(error, tmp_error);
620650 return NULL;
651 }
621652 doc = gvir_config_xml_doc_new(node->doc);
622653 object = GVIR_CONFIG_OBJECT(g_object_new(type,
623654 "doc", doc,
781812 va_end(args);
782813 }
783814
784 G_GNUC_INTERNAL void
785 gvir_config_object_attach(GVirConfigObject *parent, GVirConfigObject *child)
815 static void
816 gvir_config_object_attach(GVirConfigObject *parent, GVirConfigObject *child, gboolean replace)
786817 {
787818 g_return_if_fail(GVIR_CONFIG_IS_OBJECT(parent));
788819 g_return_if_fail(GVIR_CONFIG_IS_OBJECT(child));
789820
821 if (replace) {
822 gvir_config_object_delete_children(parent,
823 (char *)child->priv->node->name,
824 NULL);
825 }
790826 xmlUnlinkNode(child->priv->node);
791827 xmlAddChild(parent->priv->node, child->priv->node);
792828 if (child->priv->doc != NULL) {
799835 }
800836
801837 G_GNUC_INTERNAL void
838 gvir_config_object_attach_replace(GVirConfigObject *parent, GVirConfigObject *child)
839 {
840 gvir_config_object_attach(parent, child, TRUE);
841 }
842
843 G_GNUC_INTERNAL void
844 gvir_config_object_attach_add(GVirConfigObject *parent, GVirConfigObject *child)
845 {
846 gvir_config_object_attach(parent, child, FALSE);
847 }
848
849 G_GNUC_INTERNAL void
802850 gvir_config_object_remove_attribute(GVirConfigObject *object,
803851 const char *attr_name)
804852 {
808856 status = xmlUnsetProp(object->priv->node, (xmlChar *)attr_name);
809857 } while (status == 0);
810858 }
859
860 G_GNUC_INTERNAL gboolean
861 gvir_config_object_set_namespace(GVirConfigObject *object, const char *ns,
862 const char *ns_uri)
863 {
864 xmlNsPtr namespace;
865
866 g_return_val_if_fail(GVIR_CONFIG_IS_OBJECT(object), FALSE);
867 g_return_val_if_fail(ns != NULL, FALSE);
868 g_return_val_if_fail(ns_uri != NULL, FALSE);
869
870 namespace = xmlNewNs(object->priv->node,
871 (xmlChar *)ns_uri, (xmlChar *)ns);
872 if (namespace == NULL)
873 return FALSE;
874
875 xmlSetNs(object->priv->node, namespace);
876
877 return TRUE;
878 }
8585 g_return_if_fail(GVIR_CONFIG_IS_STORAGE_POOL_TARGET(target));
8686 g_return_if_fail(GVIR_CONFIG_IS_STORAGE_PERMISSIONS(perms));
8787
88 gvir_config_object_attach(GVIR_CONFIG_OBJECT(target),
89 GVIR_CONFIG_OBJECT(perms));
88 gvir_config_object_attach_replace(GVIR_CONFIG_OBJECT(target),
89 GVIR_CONFIG_OBJECT(perms));
9090 }
136136 g_return_if_fail(GVIR_CONFIG_IS_STORAGE_POOL(pool));
137137 g_return_if_fail(GVIR_CONFIG_IS_STORAGE_POOL_SOURCE(source));
138138
139 gvir_config_object_attach(GVIR_CONFIG_OBJECT(pool),
140 GVIR_CONFIG_OBJECT(source));
139 gvir_config_object_attach_replace(GVIR_CONFIG_OBJECT(pool),
140 GVIR_CONFIG_OBJECT(source));
141141 }
142142
143143 void gvir_config_storage_pool_set_target(GVirConfigStoragePool *pool,
146146 g_return_if_fail(GVIR_CONFIG_IS_STORAGE_POOL(pool));
147147 g_return_if_fail(GVIR_CONFIG_IS_STORAGE_POOL_TARGET(target));
148148
149 gvir_config_object_attach(GVIR_CONFIG_OBJECT(pool),
150 GVIR_CONFIG_OBJECT(target));
149 gvir_config_object_attach_replace(GVIR_CONFIG_OBJECT(pool),
150 GVIR_CONFIG_OBJECT(target));
151151 }
8989 g_return_if_fail(GVIR_CONFIG_IS_STORAGE_VOL_TARGET(target));
9090 g_return_if_fail(GVIR_CONFIG_IS_STORAGE_PERMISSIONS(perms));
9191
92 gvir_config_object_attach(GVIR_CONFIG_OBJECT(target),
93 GVIR_CONFIG_OBJECT(perms));
92 gvir_config_object_attach_replace(GVIR_CONFIG_OBJECT(target),
93 GVIR_CONFIG_OBJECT(perms));
9494 }
106106 g_return_if_fail(GVIR_CONFIG_IS_STORAGE_VOL(vol));
107107 g_return_if_fail(GVIR_CONFIG_IS_STORAGE_VOL_TARGET(target));
108108
109 gvir_config_object_attach(GVIR_CONFIG_OBJECT(vol),
110 GVIR_CONFIG_OBJECT(target));
109 gvir_config_object_attach_replace(GVIR_CONFIG_OBJECT(vol),
110 GVIR_CONFIG_OBJECT(target));
111111 }
112112
113113 void gvir_config_storage_vol_set_backing_store(GVirConfigStorageVol *vol,
116116 g_return_if_fail(GVIR_CONFIG_IS_STORAGE_VOL(vol));
117117 g_return_if_fail(GVIR_CONFIG_IS_STORAGE_VOL_BACKING_STORE(backing_store));
118118
119 gvir_config_object_attach(GVIR_CONFIG_OBJECT(vol),
120 GVIR_CONFIG_OBJECT(backing_store));
119 gvir_config_object_attach_replace(GVIR_CONFIG_OBJECT(vol),
120 GVIR_CONFIG_OBJECT(backing_store));
121121 }
1313 gvir_config_domain_new;
1414 gvir_config_domain_new_from_xml;
1515 gvir_config_domain_set_clock;
16 gvir_config_domain_set_custom_xml;
17 gvir_config_domain_get_custom_xml;
18 gvir_config_domain_get_description;
19 gvir_config_domain_set_description;
1620 gvir_config_domain_get_devices;
1721 gvir_config_domain_set_devices;
1822 gvir_config_domain_get_features;
6468
6569 gvir_config_domain_disk_get_type;
6670 gvir_config_domain_disk_bus_get_type;
71 gvir_config_domain_disk_cache_type_get_type;
6772 gvir_config_domain_disk_guest_device_type_get_type;
6873 gvir_config_domain_disk_snapshot_type_get_type;
6974 gvir_config_domain_disk_type_get_type;
7075 gvir_config_domain_disk_new;
7176 gvir_config_domain_disk_new_from_xml;
77 gvir_config_domain_disk_get_driver_cache;
78 gvir_config_domain_disk_set_driver_cache;
7279 gvir_config_domain_disk_get_driver_name;
7380 gvir_config_domain_disk_set_driver_name;
7481 gvir_config_domain_disk_get_driver_type;
8491 gvir_config_domain_disk_get_target_dev;
8592 gvir_config_domain_disk_set_target_dev;
8693 gvir_config_domain_disk_get_disk_type;
94 gvir_config_domain_disk_set_readonly;
8795 gvir_config_domain_disk_set_type;
8896
8997 gvir_config_domain_filesys_get_type;
237245 gvir_config_object_get_schema;
238246 gvir_config_object_to_xml;
239247 gvir_config_object_validate;
240 gvir_config_object_attach;
241 gvir_config_object_set_attribute;
242 gvir_config_object_set_attribute_with_type;
243248
244249 gvir_config_secret_get_type;
245250 gvir_config_secret_new;
3838 subdir = libvirt-gconfig/tests
3939 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
4040 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
41 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
42 $(top_srcdir)/configure.ac
41 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
42 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
43 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
44 $(top_srcdir)/m4/manywarnings.m4 \
45 $(top_srcdir)/m4/virt-compile-warnings.m4 \
46 $(top_srcdir)/m4/warnings.m4 $(top_srcdir)/configure.ac
4347 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
4448 $(ACLOCAL_M4)
4549 mkinstalldirs = $(install_sh) -d
109113 CC = @CC@
110114 CCDEPMODE = @CCDEPMODE@
111115 CFLAGS = @CFLAGS@
112 COMPILER_FLAGS = @COMPILER_FLAGS@
113116 COVERAGE_CFLAGS = @COVERAGE_CFLAGS@
114117 COVERAGE_LDFLAGS = @COVERAGE_LDFLAGS@
118 COV_FLAGS = @COV_FLAGS@
115119 CPP = @CPP@
116120 CPPFLAGS = @CPPFLAGS@
117121 CYGPATH_W = @CYGPATH_W@
205209 VAPIGEN = @VAPIGEN@
206210 VERSION = @VERSION@
207211 WARN_CFLAGS = @WARN_CFLAGS@
212 WARN_LDFLAGS = @WARN_LDFLAGS@
208213 abs_builddir = @abs_builddir@
209214 abs_srcdir = @abs_srcdir@
210215 abs_top_builddir = @abs_top_builddir@
3131
3232 const char *features[] = { "foo", "bar", "baz", NULL };
3333
34 #define g_str_check(str1, str2) G_STMT_START { \
35 char *alloced_str = (str1); \
36 g_assert(alloced_str != NULL); \
37 g_assert(g_strcmp0(alloced_str, (str2)) == 0); \
38 g_free(alloced_str); \
39 } G_STMT_END
40
3441 int main(int argc, char **argv)
3542 {
3643 GVirConfigDomain *domain;
37 char *name;
3844 GStrv feat;
3945 unsigned int i;
4046 char *xml;
4450 domain = gvir_config_domain_new();
4551 g_assert(domain != NULL);
4652 gvir_config_domain_set_name(domain, "foo");
47 name = gvir_config_domain_get_name(domain);
48 g_assert(name != NULL);
49 g_assert(strcmp(name, "foo") == 0);
50 g_free(name);
53 g_str_check(gvir_config_domain_get_name(domain), "foo");
5154
5255 gvir_config_domain_set_memory(domain, 1234);
56 g_assert(gvir_config_domain_get_memory(domain) == 1234);
5357 gvir_config_domain_set_vcpus(domain, 3);
54 g_assert(gvir_config_domain_get_memory(domain) == 1234);
58 g_assert(gvir_config_domain_get_vcpus(domain) == 3);
5559
5660 gvir_config_domain_set_features(domain, (const GStrv)features);
5761 feat = gvir_config_domain_get_features(domain);
100104 gvir_config_domain_disk_set_driver_name(disk, "foo");
101105 gvir_config_domain_disk_set_driver_type(disk, "bar");
102106 gvir_config_domain_disk_set_driver_name(disk, "qemu");
107 gvir_config_domain_disk_set_driver_cache(disk, GVIR_CONFIG_DOMAIN_DISK_CACHE_NONE);
103108 gvir_config_domain_disk_set_driver_type(disk, "qcow2");
104109 gvir_config_domain_disk_set_target_bus(disk, GVIR_CONFIG_DOMAIN_DISK_BUS_IDE);
105110 gvir_config_domain_disk_set_target_dev(disk, "hda");
106111 devices = g_list_append(devices, GVIR_CONFIG_DOMAIN_DEVICE(disk));
112
113 g_assert(gvir_config_domain_disk_get_disk_type(disk) == GVIR_CONFIG_DOMAIN_DISK_FILE);
114 g_assert(gvir_config_domain_disk_get_guest_device_type(disk) == GVIR_CONFIG_DOMAIN_DISK_GUEST_DEVICE_DISK);
115 g_str_check(gvir_config_domain_disk_get_source(disk), "/tmp/foo/bar");
116 g_assert(gvir_config_domain_disk_get_driver_cache(disk) == GVIR_CONFIG_DOMAIN_DISK_CACHE_NONE);
117 g_str_check(gvir_config_domain_disk_get_driver_name(disk), "qemu");
118 g_str_check(gvir_config_domain_disk_get_driver_type(disk), "qcow2");
119 g_assert(gvir_config_domain_disk_get_target_bus(disk) == GVIR_CONFIG_DOMAIN_DISK_BUS_IDE);
120 g_str_check(gvir_config_domain_disk_get_target_dev(disk), "hda");
107121
108122
109123 /* network interfaces node */
171185 g_list_free(devices);
172186 devices = NULL;
173187
188 gvir_config_domain_set_custom_xml(domain, "<foo/>", "ns", "http://foo", NULL);
189 gvir_config_domain_set_custom_xml(domain, "<foo/>", "nsbar", "http://bar", NULL);
190 gvir_config_domain_set_custom_xml(domain, "<foo/>", "ns", "http://bar", NULL);
191 gvir_config_domain_set_custom_xml(domain, "<bar/>", "ns", "http://foo", NULL);
192
193 g_str_check(gvir_config_domain_get_custom_xml(domain, "http://foo"), "<ns:bar xmlns:ns=\"http://foo\"/>");
194 g_str_check(gvir_config_domain_get_custom_xml(domain, "http://bar"), "<ns:foo xmlns:ns=\"http://bar\"/>");
174195
175196 xml = gvir_config_object_to_xml(GVIR_CONFIG_OBJECT(domain));
176197 g_print("%s\n\n", xml);
3939 DIST_COMMON = $(libvirt_glib_1_0_la_HEADERS) $(srcdir)/Makefile.am \
4040 $(srcdir)/Makefile.in
4141 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
42 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
43 $(top_srcdir)/configure.ac
42 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
43 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
44 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
45 $(top_srcdir)/m4/manywarnings.m4 \
46 $(top_srcdir)/m4/virt-compile-warnings.m4 \
47 $(top_srcdir)/m4/warnings.m4 $(top_srcdir)/configure.ac
4448 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
4549 $(ACLOCAL_M4)
4650 mkinstalldirs = $(install_sh) -d
131135 CC = @CC@
132136 CCDEPMODE = @CCDEPMODE@
133137 CFLAGS = @CFLAGS@
134 COMPILER_FLAGS = @COMPILER_FLAGS@
135138 COVERAGE_CFLAGS = @COVERAGE_CFLAGS@
136139 COVERAGE_LDFLAGS = @COVERAGE_LDFLAGS@
140 COV_FLAGS = @COV_FLAGS@
137141 CPP = @CPP@
138142 CPPFLAGS = @CPPFLAGS@
139143 CYGPATH_W = @CYGPATH_W@
227231 VAPIGEN = @VAPIGEN@
228232 VERSION = @VERSION@
229233 WARN_CFLAGS = @WARN_CFLAGS@
234 WARN_LDFLAGS = @WARN_LDFLAGS@
230235 abs_builddir = @abs_builddir@
231236 abs_srcdir = @abs_srcdir@
232237 abs_top_builddir = @abs_top_builddir@
3030
3131 #include "libvirt-glib/libvirt-glib.h"
3232
33 #if GLIB_CHECK_VERSION(2, 31, 0)
34 #define g_mutex_new() g_new0(GMutex, 1)
35 #endif
36
3337 struct gvir_event_handle
3438 {
3539 int watch;
6262 GError **err G_GNUC_UNUSED)
6363 {
6464 virSetErrorFunc(NULL, gvir_error_func);
65
66 /* Threading is always enabled from 2.31.0 onwards */
67 #if !GLIB_CHECK_VERSION(2, 31, 0)
6568 if (!g_thread_supported())
6669 g_thread_init(NULL);
70 #endif
6771
6872 virInitialize();
6973
2020 %endif
2121
2222 Name: libvirt-glib
23 Version: 0.0.4
23 Version: 0.0.5
2424 Release: 1%{?dist}%{?extra_release}
2525 Summary: libvirt glib integration for events
2626 Group: Development/Libraries
2929 Source0: ftp://libvirt.org/libvirt/glib/%{name}-%{version}.tar.gz
3030 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
3131
32 BuildRequires: glib2-devel >= 2.10.0
32 BuildRequires: glib2-devel >= 2.22.0
3333 BuildRequires: libvirt-devel >= 0.9.7
3434 BuildRequires: python-devel
3535 %if %{with_introspection}
2929 Source0: ftp://libvirt.org/libvirt/glib/%{name}-%{version}.tar.gz
3030 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
3131
32 BuildRequires: glib2-devel >= 2.10.0
32 BuildRequires: glib2-devel >= 2.22.0
3333 BuildRequires: libvirt-devel >= 0.9.7
3434 BuildRequires: python-devel
3535 %if %{with_introspection}
5252 $(GOBJECT_SOURCE_FILES) \
5353 libvirt-gobject-domain-device-private.h \
5454 libvirt-gobject-compat.h \
55 libvirt-gobject-compat.c \
5556 libvirt-gobject-input-stream.h \
5657 libvirt-gobject-input-stream.c \
5758 libvirt-gobject-output-stream.h \
4040 DIST_COMMON = $(libvirt_gobject_1_0_la_HEADERS) $(srcdir)/Makefile.am \
4141 $(srcdir)/Makefile.in
4242 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
43 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
44 $(top_srcdir)/configure.ac
43 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
44 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
45 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
46 $(top_srcdir)/m4/manywarnings.m4 \
47 $(top_srcdir)/m4/virt-compile-warnings.m4 \
48 $(top_srcdir)/m4/warnings.m4 $(top_srcdir)/configure.ac
4549 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
4650 $(ACLOCAL_M4)
4751 mkinstalldirs = $(install_sh) -d
9498 libvirt_gobject_1_0_la-libvirt-gobject-connection.lo \
9599 libvirt_gobject_1_0_la-libvirt-gobject-manager.lo
96100 am_libvirt_gobject_1_0_la_OBJECTS = $(am__objects_2) $(am__objects_3) \
101 libvirt_gobject_1_0_la-libvirt-gobject-compat.lo \
97102 libvirt_gobject_1_0_la-libvirt-gobject-input-stream.lo \
98103 libvirt_gobject_1_0_la-libvirt-gobject-output-stream.lo
99104 am__objects_4 = libvirt_gobject_1_0_la-libvirt-gobject-enums.lo
154159 CC = @CC@
155160 CCDEPMODE = @CCDEPMODE@
156161 CFLAGS = @CFLAGS@
157 COMPILER_FLAGS = @COMPILER_FLAGS@
158162 COVERAGE_CFLAGS = @COVERAGE_CFLAGS@
159163 COVERAGE_LDFLAGS = @COVERAGE_LDFLAGS@
164 COV_FLAGS = @COV_FLAGS@
160165 CPP = @CPP@
161166 CPPFLAGS = @CPPFLAGS@
162167 CYGPATH_W = @CYGPATH_W@
250255 VAPIGEN = @VAPIGEN@
251256 VERSION = @VERSION@
252257 WARN_CFLAGS = @WARN_CFLAGS@
258 WARN_LDFLAGS = @WARN_LDFLAGS@
253259 abs_builddir = @abs_builddir@
254260 abs_srcdir = @abs_srcdir@
255261 abs_top_builddir = @abs_top_builddir@
358364 $(GOBJECT_SOURCE_FILES) \
359365 libvirt-gobject-domain-device-private.h \
360366 libvirt-gobject-compat.h \
367 libvirt-gobject-compat.c \
361368 libvirt-gobject-input-stream.h \
362369 libvirt-gobject-input-stream.c \
363370 libvirt-gobject-output-stream.h \
480487 distclean-compile:
481488 -rm -f *.tab.c
482489
490 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvirt_gobject_1_0_la-libvirt-gobject-compat.Plo@am__quote@
483491 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvirt_gobject_1_0_la-libvirt-gobject-connection.Plo@am__quote@
484492 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvirt_gobject_1_0_la-libvirt-gobject-domain-device.Plo@am__quote@
485493 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvirt_gobject_1_0_la-libvirt-gobject-domain-disk.Plo@am__quote@
651659 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libvirt-gobject-manager.c' object='libvirt_gobject_1_0_la-libvirt-gobject-manager.lo' libtool=yes @AMDEPBACKSLASH@
652660 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
653661 @am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvirt_gobject_1_0_la_CFLAGS) $(CFLAGS) -c -o libvirt_gobject_1_0_la-libvirt-gobject-manager.lo `test -f 'libvirt-gobject-manager.c' || echo '$(srcdir)/'`libvirt-gobject-manager.c
662
663 libvirt_gobject_1_0_la-libvirt-gobject-compat.lo: libvirt-gobject-compat.c
664 @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvirt_gobject_1_0_la_CFLAGS) $(CFLAGS) -MT libvirt_gobject_1_0_la-libvirt-gobject-compat.lo -MD -MP -MF $(DEPDIR)/libvirt_gobject_1_0_la-libvirt-gobject-compat.Tpo -c -o libvirt_gobject_1_0_la-libvirt-gobject-compat.lo `test -f 'libvirt-gobject-compat.c' || echo '$(srcdir)/'`libvirt-gobject-compat.c
665 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libvirt_gobject_1_0_la-libvirt-gobject-compat.Tpo $(DEPDIR)/libvirt_gobject_1_0_la-libvirt-gobject-compat.Plo
666 @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
667 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libvirt-gobject-compat.c' object='libvirt_gobject_1_0_la-libvirt-gobject-compat.lo' libtool=yes @AMDEPBACKSLASH@
668 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
669 @am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvirt_gobject_1_0_la_CFLAGS) $(CFLAGS) -c -o libvirt_gobject_1_0_la-libvirt-gobject-compat.lo `test -f 'libvirt-gobject-compat.c' || echo '$(srcdir)/'`libvirt-gobject-compat.c
654670
655671 libvirt_gobject_1_0_la-libvirt-gobject-input-stream.lo: libvirt-gobject-input-stream.c
656672 @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvirt_gobject_1_0_la_CFLAGS) $(CFLAGS) -MT libvirt_gobject_1_0_la-libvirt-gobject-input-stream.lo -MD -MP -MF $(DEPDIR)/libvirt_gobject_1_0_la-libvirt-gobject-input-stream.Tpo -c -o libvirt_gobject_1_0_la-libvirt-gobject-input-stream.lo `test -f 'libvirt-gobject-input-stream.c' || echo '$(srcdir)/'`libvirt-gobject-input-stream.c
0 /*
1 * This library is free software; you can redistribute it and/or
2 * modify it under the terms of the GNU Lesser General Public
3 * License as published by the Free Software Foundation; either
4 * version 2.1 of the License, or (at your option) any later version.
5 *
6 * This library is distributed in the hope that it will be useful,
7 * but WITHOUT ANY WARRANTY; without even the implied warranty of
8 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9 * Lesser General Public License for more details.
10 *
11 * You should have received a copy of the GNU Lesser General Public
12 * License along with this library; if not, see <http://www.gnu.org/licenses/>.
13 */
14
15 #include <config.h>
16
17 #include "libvirt-gobject-compat.h"
18
19 #if !GLIB_CHECK_VERSION(2,28,0)
20 /**
21 * g_simple_async_result_take_error: (skip)
22 * @simple: a #GSimpleAsyncResult
23 * @error: a #GError
24 *
25 * Sets the result from @error, and takes over the caller's ownership
26 * of @error, so the caller does not need to free it any more.
27 *
28 * Since: 2.28
29 **/
30 G_GNUC_INTERNAL void
31 g_simple_async_result_take_error (GSimpleAsyncResult *simple,
32 GError *error)
33 {
34 /* this code is different from upstream */
35 /* we can't avoid extra copy/free, since the simple struct is
36 opaque */
37 g_simple_async_result_set_from_error (simple, error);
38 g_error_free (error);
39 }
40
41 /**
42 * g_simple_async_result_new_take_error: (skip)
43 * @source_object: (allow-none): a #GObject, or %NULL
44 * @callback: (scope async): a #GAsyncReadyCallback
45 * @user_data: (closure): user data passed to @callback
46 * @error: a #GError
47 *
48 * Creates a #GSimpleAsyncResult from an error condition, and takes over the
49 * caller's ownership of @error, so the caller does not need to free it anymore.
50 *
51 * Returns: a #GSimpleAsyncResult
52 *
53 * Since: 2.28
54 **/
55 GSimpleAsyncResult *
56 g_simple_async_result_new_take_error(GObject *source_object,
57 GAsyncReadyCallback callback,
58 gpointer user_data,
59 GError *error)
60 {
61 GSimpleAsyncResult *simple;
62
63 g_return_val_if_fail(!source_object || G_IS_OBJECT(source_object), NULL);
64
65 simple = g_simple_async_result_new(source_object,
66 callback,
67 user_data, NULL);
68 g_simple_async_result_take_error(simple, error);
69
70 return simple;
71 }
72
73 /**
74 * g_simple_async_report_take_gerror_in_idle: (skip)
75 * @object: (allow-none): a #GObject, or %NULL
76 * @callback: a #GAsyncReadyCallback.
77 * @user_data: user data passed to @callback.
78 * @error: the #GError to report
79 *
80 * Reports an error in an idle function. Similar to
81 * g_simple_async_report_gerror_in_idle(), but takes over the caller's
82 * ownership of @error, so the caller does not have to free it any more.
83 *
84 * Since: 2.28
85 **/
86 void
87 g_simple_async_report_take_gerror_in_idle(GObject *object,
88 GAsyncReadyCallback callback,
89 gpointer user_data,
90 GError *error)
91 {
92 GSimpleAsyncResult *simple;
93
94 g_return_if_fail(!object || G_IS_OBJECT(object));
95 g_return_if_fail(error != NULL);
96
97 simple = g_simple_async_result_new_take_error(object,
98 callback,
99 user_data,
100 error);
101 g_simple_async_result_complete_in_idle(simple);
102 g_object_unref(simple);
103 }
104 #endif
2323 #define __LIBVIRT_GOBJECT_COMPAT_H__
2424
2525 #include <glib-object.h>
26 #include <gio/gio.h>
27
28 #if GLIB_CHECK_VERSION(2, 31, 0)
29 #define g_mutex_new() g_new0(GMutex, 1)
30 #define g_mutex_free(m) g_free(m)
31 #endif
2632
2733 #if !GLIB_CHECK_VERSION(2,26,0)
2834 #define G_DEFINE_BOXED_TYPE(TypeName, type_name, copy_func, free_func) G_DEFINE_BOXED_TYPE_WITH_CODE (TypeName, type_name, copy_func, free_func, {})
6874 #endif /* __GNUC__ */
6975 #endif /* glib 2.26 */
7076
77 #if !GLIB_CHECK_VERSION(2,28,0)
78 #define g_clear_object(object_ptr) \
79 G_STMT_START { \
80 /* Only one access, please */ \
81 gpointer *_p = (gpointer) (object_ptr); \
82 gpointer _o; \
83 \
84 do \
85 _o = g_atomic_pointer_get (_p); \
86 while G_UNLIKELY (!g_atomic_pointer_compare_and_exchange (_p, _o, NULL));\
87 \
88 if (_o) \
89 g_object_unref (_o); \
90 } G_STMT_END
91
92 void
93 g_simple_async_result_take_error(GSimpleAsyncResult *simple,
94 GError *error);
95 GSimpleAsyncResult *g_simple_async_result_new_take_error (GObject *source_object,
96 GAsyncReadyCallback callback,
97 gpointer user_data,
98 GError *error);
99 void g_simple_async_report_take_gerror_in_idle (GObject *object,
100 GAsyncReadyCallback callback,
101 gpointer user_data,
102 GError *error);
103 #endif /* glib 2.28 */
104
105
71106 #endif /* __LIBVIRT_GOBJECT_COMPAT_H__ */
6969 {
7070 return g_quark_from_static_string("gvir-connection");
7171 }
72
73 static GVirNodeInfo *
74 gvir_node_info_copy(GVirNodeInfo *info)
75 {
76 return g_slice_dup(GVirNodeInfo, info);
77 }
78
79 static void
80 gvir_node_info_free(GVirNodeInfo *info)
81 {
82 g_slice_free(GVirNodeInfo, info);
83 }
84
85 G_DEFINE_BOXED_TYPE(GVirNodeInfo, gvir_node_info,
86 gvir_node_info_copy, gvir_node_info_free)
7287
7388 static void gvir_connection_get_property(GObject *object,
7489 guint prop_id,
162177 G_PARAM_READABLE |
163178 G_PARAM_WRITABLE |
164179 G_PARAM_CONSTRUCT_ONLY |
165 G_PARAM_STATIC_NAME |
166 G_PARAM_STATIC_NICK |
167 G_PARAM_STATIC_BLURB));
180 G_PARAM_STATIC_STRINGS));
181
182 g_object_class_install_property(object_class,
183 PROP_HANDLE,
184 g_param_spec_boxed("handle",
185 "Handle",
186 "The connection handle",
187 GVIR_TYPE_CONNECTION_HANDLE,
188 G_PARAM_READABLE |
189 G_PARAM_WRITABLE |
190 G_PARAM_CONSTRUCT_ONLY |
191 G_PARAM_STATIC_STRINGS));
168192
169193 signals[VIR_CONNECTION_OPENED] = g_signal_new("connection-opened",
170194 G_OBJECT_CLASS_TYPE(object_class),
203227 G_TYPE_NONE,
204228 1,
205229 GVIR_TYPE_DOMAIN);
206
207 g_object_class_install_property(object_class,
208 PROP_HANDLE,
209 g_param_spec_boxed("handle",
210 "Handle",
211 "The connection handle",
212 GVIR_TYPE_CONNECTION_HANDLE,
213 G_PARAM_READABLE |
214 G_PARAM_WRITABLE |
215 G_PARAM_CONSTRUCT_ONLY |
216 G_PARAM_STATIC_NAME |
217 G_PARAM_STATIC_NICK |
218 G_PARAM_STATIC_BLURB));
219230
220231 g_type_class_add_private(klass, sizeof(GVirConnectionPrivate));
221232 }
11171128 GVirDomain *dom = value;
11181129 const gchar *thisname = gvir_domain_get_name(dom);
11191130
1131 if (thisname == NULL)
1132 continue;
1133
11201134 if (strcmp(thisname, name) == 0) {
11211135 g_object_ref(dom);
11221136 g_mutex_unlock(priv->lock);
11471161 while (g_hash_table_iter_next(&iter, &key, &value)) {
11481162 GVirStoragePool *pool = value;
11491163 const gchar *thisname = gvir_storage_pool_get_name(pool);
1164
1165 if (thisname == NULL)
1166 continue;
11501167
11511168 if (strcmp(thisname, name) == 0) {
11521169 g_object_ref(pool);
13351352
13361353 return g_object_ref(pool);
13371354 }
1355
1356 /**
1357 * gvir_connection_get_node_info:
1358 * @conn: the connection
1359 * @err: return location for any #GError
1360 *
1361 * Returns: (transfer full): the info
1362 */
1363 GVirNodeInfo *gvir_connection_get_node_info(GVirConnection *conn,
1364 GError **err)
1365 {
1366 GVirConnectionPrivate *priv = conn->priv;
1367 virNodeInfo info;
1368 GVirNodeInfo *ret;
1369
1370 if (virNodeGetInfo(priv->conn, &info) < 0) {
1371 gvir_set_error_literal(err, GVIR_CONNECTION_ERROR,
1372 0,
1373 "Unable to get node info");
1374 return NULL;
1375 }
1376
1377 ret = g_slice_new(GVirNodeInfo);
1378 g_utf8_strncpy (ret->model, info.model, sizeof (ret->model));
1379 ret->memory = info.memory;
1380 ret->cpus = info.cpus;
1381 ret->mhz = info.mhz;
1382 ret->nodes = info.nodes;
1383 ret->sockets = info.sockets;
1384 ret->cores = info.cores;
1385 ret->threads = info.threads;
1386
1387 return ret;
1388 }
3737
3838 #define GVIR_TYPE_CONNECTION_HANDLE (gvir_connection_handle_get_type ())
3939
40 typedef struct _GVirNodeInfo GVirNodeInfo;
41 struct _GVirNodeInfo
42 {
43 gchar model[32]; /* string indicating the CPU model */
44 gulong memory; /* memory size in kilobytes */
45 guint cpus; /* the number of active CPUs */
46 guint mhz; /* expected CPU frequency */
47 guint nodes; /* the number of NUMA cell, 1 for unusual NUMA topologies or uniform memo */
48 guint sockets; /* number of CPU sockets per node if nodes > 1, total number of CPU socke */
49 guint cores; /* number of cores per socket */
50 guint threads; /* number of threads per core */
51 };
52
4053 typedef struct _GVirConnection GVirConnection;
4154 typedef struct _GVirConnectionPrivate GVirConnectionPrivate;
4255 typedef struct _GVirConnectionClass GVirConnectionClass;
6881
6982 GType gvir_connection_get_type(void);
7083 GType gvir_connection_handle_get_type(void);
84 GType gvir_node_info_get_type(void);
7185
7286 GVirConnection *gvir_connection_new(const char *uri);
7387 gboolean gvir_connection_open(GVirConnection *conn,
173187 GVirStream *gvir_connection_get_stream(GVirConnection *conn,
174188 guint flags);
175189
190 GVirNodeInfo *gvir_connection_get_node_info(GVirConnection *conn,
191 GError **err);
192
176193 G_END_DECLS
177194
178195 #endif /* __LIBVIRT_GOBJECT_CONNECTION_H__ */
2626
2727 #include "libvirt-glib/libvirt-glib.h"
2828 #include "libvirt-gobject/libvirt-gobject.h"
29 #include "libvirt-gobject-compat.h"
2930
3031 #include "libvirt-gobject/libvirt-gobject-domain-device-private.h"
3132
125125 G_PARAM_READABLE |
126126 G_PARAM_WRITABLE |
127127 G_PARAM_CONSTRUCT_ONLY |
128 G_PARAM_STATIC_NAME |
129 G_PARAM_STATIC_NICK |
130 G_PARAM_STATIC_BLURB));
128 G_PARAM_STATIC_STRINGS));
131129
132130 g_type_class_add_private(klass, sizeof(GVirDomainSnapshotPrivate));
133131 }
167165 const char *name;
168166
169167 if (!(name = virDomainSnapshotGetName(priv->handle))) {
170 g_error("Failed to get domain_snapshot name on %p", priv->handle);
168 g_warning("Failed to get domain_snapshot name on %p", priv->handle);
169 return NULL;
171170 }
172171
173172 return name;
174173 #else
175 if (snapshot || !snapshot)
174 if (snapshot)
176175 return NULL;
177176 #endif
178177
133133
134134 /* xxx we may want to turn this into an initable */
135135 if (virDomainGetUUIDString(priv->handle, priv->uuid) < 0) {
136 g_error("Failed to get domain UUID on %p", priv->handle);
136 virErrorPtr verr = virGetLastError();
137 if (verr) {
138 g_warning("Failed to get domain UUID on %p: %s",
139 priv->handle, verr->message);
140 } else {
141 g_warning("Failed to get domain UUID on %p",
142 priv->handle);
143 }
137144 }
138145 }
139146
156163 G_PARAM_READABLE |
157164 G_PARAM_WRITABLE |
158165 G_PARAM_CONSTRUCT_ONLY |
159 G_PARAM_STATIC_NAME |
160 G_PARAM_STATIC_NICK |
161 G_PARAM_STATIC_BLURB));
166 G_PARAM_STATIC_STRINGS));
162167
163168 g_object_class_install_property(object_class,
164169 PROP_PERSISTENT,
167172 "If domain is persistent",
168173 TRUE,
169174 G_PARAM_READABLE |
170 G_PARAM_STATIC_NAME |
171 G_PARAM_STATIC_NICK |
172 G_PARAM_STATIC_BLURB));
175 G_PARAM_STATIC_STRINGS));
173176
174177 signals[VIR_STARTED] = g_signal_new("started",
175178 G_OBJECT_CLASS_TYPE(object_class),
273276 const char *name;
274277
275278 if (!(name = virDomainGetName(priv->handle))) {
276 g_error("Failed to get domain name on %p", priv->handle);
279 g_warning("Failed to get domain name on %p", priv->handle);
280 return NULL;
277281 }
278282
279283 return name;
726730
727731 /**
728732 * gvir_domain_save:
729 * @dom: the domain to save and suspend
733 * @dom: the domain to save
730734 * @flags: extra flags, currently unused
731735 * @err: Place-holder for possible errors
732736 *
733 * Just like #gvir_domain_suspend but also saves the state of the domain on disk
734 * and therefore makes it possible to restore the domain to its previous state
737 * Saves the state of the domain on disk and stops it. Use #gvir_domain_start
738 * to restore the saved state of the domain. A saved domain can be restored
735739 * even after shutdown/reboot of host machine.
736740 *
737 * Returns: TRUE if domain was saved and suspended successfully, FALSE otherwise.
741 * Returns: TRUE if domain was saved successfully, FALSE otherwise.
738742 */
739743 gboolean gvir_domain_save (GVirDomain *dom,
740744 unsigned int flags,
745749 if (virDomainManagedSave(dom->priv->handle, flags) < 0) {
746750 gvir_set_error_literal(err, GVIR_DOMAIN_ERROR,
747751 0,
748 "Unable to save and suspend domain");
752 "Unable to save domain");
749753 return FALSE;
750754 }
751755
778782
779783 /**
780784 * gir_domain_save_async:
781 * @dom: the domain to save and suspend
785 * @dom: the domain to save
782786 * @flags: extra flags, currently unused
783787 * @cancellable: (allow-none)(transfer none): cancellation object
784788 * @callback: (scope async): completion callback
814818
815819 /**
816820 * gir_domain_save_finish:
817 * @dom: the domain to save and suspend
821 * @dom: the domain to save
818822 * @result: (transfer none): async method result
819823 * @err: Place-holder for possible errors
820824 *
821825 * Finishes the operation started by #gvir_domain_save_async.
822826 *
823 * Returns: TRUE if domain was saved and suspended successfully, FALSE otherwise.
827 * Returns: TRUE if domain was saved successfully, FALSE otherwise.
824828 */
825829 gboolean gvir_domain_save_finish (GVirDomain *dom,
826830 GAsyncResult *result,
847851 {
848852 g_return_val_if_fail(GVIR_IS_DOMAIN(dom), FALSE);
849853
850 return virDomainIsPersistent(dom->priv->handle);
851 }
854 return virDomainIsPersistent(dom->priv->handle) == 1;
855 }
856
857 /**
858 * gvir_domain_get_saved:
859 * @dom: the domain
860 *
861 * Returns: TRUE if a stopped domain has a saved state to which it can be
862 * restored to using #gvir_domain_start, FALSE otherwise.
863 */
864 gboolean gvir_domain_get_saved(GVirDomain *dom)
865 {
866 g_return_val_if_fail(GVIR_IS_DOMAIN(dom), FALSE);
867
868 return virDomainHasManagedSaveImage(dom->priv->handle, 0) == 1;
869 }
2929 G_BEGIN_DECLS
3030
3131 #include <libvirt-gobject/libvirt-gobject-stream.h>
32 #include <libvirt/libvirt.h>
3233
3334 #define GVIR_TYPE_DOMAIN (gvir_domain_get_type ())
3435 #define GVIR_DOMAIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GVIR_TYPE_DOMAIN, GVirDomain))
8687 GVIR_DOMAIN_START_BYPASS_CACHE = (1 << 2),
8788 GVIR_DOMAIN_START_FORCE_BOOT = (1 << 3),
8889 } GVirDomainStartFlags;
90
91 /**
92 * GVirDomainDeleteFlags:
93 * @GVIR_DOMAIN_DELETE_NONE: No flags
94 * @GVIR_DOMAIN_DELETE_SAVED_STATE: Also remove associated saved state (if present).
95 * @GVIR_DOMAIN_DELETE_SNAPSHOTS_METADATA: If last use of domain, then also
96 * remove any snapshot metadata.
97 */
98 typedef enum {
99 GVIR_DOMAIN_DELETE_NONE = 0,
100 GVIR_DOMAIN_DELETE_SAVED_STATE = VIR_DOMAIN_UNDEFINE_MANAGED_SAVE,
101 GVIR_DOMAIN_DELETE_SNAPSHOTS_METADATA = VIR_DOMAIN_UNDEFINE_SNAPSHOTS_METADATA,
102 } GVirDomainDeleteFlags;
89103
90104 typedef struct _GVirDomainInfo GVirDomainInfo;
91105 struct _GVirDomainInfo
166180 GAsyncResult *result,
167181 GError **err);
168182 gboolean gvir_domain_get_persistent(GVirDomain *dom);
183 gboolean gvir_domain_get_saved(GVirDomain *dom);
169184
170185 G_END_DECLS
171186
2828 #include "libvirt-glib/libvirt-glib.h"
2929 #include "libvirt-gobject/libvirt-gobject.h"
3030 #include "libvirt-gobject-input-stream.h"
31 #include "libvirt-gobject-compat.h"
3132
3233 #define gvir_input_stream_get_type _gvir_input_stream_get_type
3334 G_DEFINE_TYPE(GVirInputStream, gvir_input_stream, G_TYPE_INPUT_STREAM);
196197
197198 count = g_simple_async_result_get_op_res_gssize(simple);
198199
199 virStreamEventRemoveCallback(handle);
200200 virStreamFree(handle);
201201
202202 return count;
2727
2828 #include "libvirt-glib/libvirt-glib.h"
2929 #include "libvirt-gobject/libvirt-gobject.h"
30 #include "libvirt-gobject-compat.h"
3031
3132 #define GVIR_INTERFACE_GET_PRIVATE(obj) \
3233 (G_TYPE_INSTANCE_GET_PRIVATE((obj), GVIR_TYPE_INTERFACE, GVirInterfacePrivate))
124125 G_PARAM_READABLE |
125126 G_PARAM_WRITABLE |
126127 G_PARAM_CONSTRUCT_ONLY |
127 G_PARAM_STATIC_NAME |
128 G_PARAM_STATIC_NICK |
129 G_PARAM_STATIC_BLURB));
128 G_PARAM_STATIC_STRINGS));
130129
131130 g_type_class_add_private(klass, sizeof(GVirInterfacePrivate));
132131 }
163162 const char *name;
164163
165164 if (!(name = virInterfaceGetName(priv->handle))) {
166 g_error("Failed to get interface name on %p", priv->handle);
165 g_warning("Failed to get interface name on %p", priv->handle);
166 return NULL;
167167 }
168168
169169 return name;
2727
2828 #include "libvirt-glib/libvirt-glib.h"
2929 #include "libvirt-gobject/libvirt-gobject.h"
30 #include "libvirt-gobject/libvirt-gobject-compat.h"
3031
3132 #define GVIR_MANAGER_GET_PRIVATE(obj) \
3233 (G_TYPE_INSTANCE_GET_PRIVATE((obj), GVIR_TYPE_MANAGER, GVirManagerPrivate))
4546 };
4647
4748
49 #if 0
4850 #define GVIR_MANAGER_ERROR gvir_manager_error_quark()
4951
50 #if 0
5152 static GQuark
5253 gvir_manager_error_quark(void)
5354 {
118118
119119 /* xxx we may want to turn this into an initable */
120120 if (virNWFilterGetUUIDString(priv->handle, priv->uuid) < 0) {
121 g_error("Failed to get network filter UUID on %p", priv->handle);
121 virErrorPtr verr = virGetLastError();
122 if (verr) {
123 g_warning("Failed to get network filter UUID on %p: %s",
124 priv->handle, verr->message);
125 } else {
126 g_warning("Failed to get network filter UUID on %p",
127 priv->handle);
128 }
122129 }
123130 }
124131
141148 G_PARAM_READABLE |
142149 G_PARAM_WRITABLE |
143150 G_PARAM_CONSTRUCT_ONLY |
144 G_PARAM_STATIC_NAME |
145 G_PARAM_STATIC_NICK |
146 G_PARAM_STATIC_BLURB));
151 G_PARAM_STATIC_STRINGS));
147152
148153 g_type_class_add_private(klass, sizeof(GVirNetworkFilterPrivate));
149154 }
180185 const char *name;
181186
182187 if (!(name = virNWFilterGetName(priv->handle))) {
183 g_error("Failed to get network_filter name on %p", priv->handle);
188 g_warning("Failed to get network_filter name on %p", priv->handle);
189 return NULL;
184190 }
185191
186192 return name;
117117
118118 /* xxx we may want to turn this into an initable */
119119 if (virNetworkGetUUIDString(priv->handle, priv->uuid) < 0) {
120 g_error("Failed to get network UUID on %p", priv->handle);
120 virErrorPtr verr = virGetLastError();
121 if (verr) {
122 g_warning("Failed to get network UUID on %p: %s",
123 priv->handle, verr->message);
124 } else {
125 g_warning("Failed to get network UUID on %p",
126 priv->handle);
127 }
121128 }
122129 }
123130
139146 G_PARAM_READABLE |
140147 G_PARAM_WRITABLE |
141148 G_PARAM_CONSTRUCT_ONLY |
142 G_PARAM_STATIC_NAME |
143 G_PARAM_STATIC_NICK |
144 G_PARAM_STATIC_BLURB));
149 G_PARAM_STATIC_STRINGS));
145150
146151 g_type_class_add_private(klass, sizeof(GVirNetworkPrivate));
147152 }
178183 const char *name;
179184
180185 if (!(name = virNetworkGetName(priv->handle))) {
181 g_error("Failed to get network name on %p", priv->handle);
186 g_warning("Failed to get network name on %p", priv->handle);
187 return NULL;
182188 }
183189
184190 return name;
125125 G_PARAM_READABLE |
126126 G_PARAM_WRITABLE |
127127 G_PARAM_CONSTRUCT_ONLY |
128 G_PARAM_STATIC_NAME |
129 G_PARAM_STATIC_NICK |
130 G_PARAM_STATIC_BLURB));
128 G_PARAM_STATIC_STRINGS));
131129
132130 g_type_class_add_private(klass, sizeof(GVirNodeDevicePrivate));
133131 }
164162 const char *name;
165163
166164 if (!(name = virNodeDeviceGetName(priv->handle))) {
167 g_error("Failed to get node_device name on %p", priv->handle);
165 g_warning("Failed to get node_device name on %p", priv->handle);
166 return NULL;
168167 }
169168
170169 return name;
2828 #include "libvirt-glib/libvirt-glib.h"
2929 #include "libvirt-gobject/libvirt-gobject.h"
3030 #include "libvirt-gobject-output-stream.h"
31 #include "libvirt-gobject-compat.h"
3132
3233 #define gvir_output_stream_get_type _gvir_output_stream_get_type
3334 G_DEFINE_TYPE(GVirOutputStream, gvir_output_stream, G_TYPE_OUTPUT_STREAM);
196197
197198 count = g_simple_async_result_get_op_res_gssize(simple);
198199
199 virStreamEventRemoveCallback(handle);
200200 virStreamFree(handle);
201201
202202 return count;
118118
119119 /* xxx we may want to turn this into an initable */
120120 if (virSecretGetUUIDString(priv->handle, priv->uuid) < 0) {
121 g_error("Failed to get secret UUID on %p", priv->handle);
121 virErrorPtr verr = virGetLastError();
122 if (verr) {
123 g_warning("Failed to get secret UUID on %p: %s",
124 priv->handle, verr->message);
125 } else {
126 g_warning("Failed to get secret UUID on %p", priv->handle);
127 }
122128 }
123129 }
124130
141147 G_PARAM_READABLE |
142148 G_PARAM_WRITABLE |
143149 G_PARAM_CONSTRUCT_ONLY |
144 G_PARAM_STATIC_NAME |
145 G_PARAM_STATIC_NICK |
146 G_PARAM_STATIC_BLURB));
150 G_PARAM_STATIC_STRINGS));
147151
148152 g_type_class_add_private(klass, sizeof(GVirSecretPrivate));
149153 }
128128
129129 /* xxx we may want to turn this into an initable */
130130 if (virStoragePoolGetUUIDString(priv->handle, priv->uuid) < 0) {
131 g_error("Failed to get storage pool UUID on %p", priv->handle);
131 virErrorPtr verr = virGetLastError();
132 if (verr) {
133 g_warning("Failed to get storage pool UUID on %p: %s",
134 priv->handle, verr->message);
135 } else {
136 g_warning("Failed to get storage pool UUID on %p", priv->handle);
137 }
132138 }
133139 }
134140
151157 G_PARAM_READABLE |
152158 G_PARAM_WRITABLE |
153159 G_PARAM_CONSTRUCT_ONLY |
154 G_PARAM_STATIC_NAME |
155 G_PARAM_STATIC_NICK |
156 G_PARAM_STATIC_BLURB));
160 G_PARAM_STATIC_STRINGS));
161
157162
158163 g_type_class_add_private(klass, sizeof(GVirStoragePoolPrivate));
159164 }
209214 const char *name;
210215
211216 if (!(name = virStoragePoolGetName(priv->handle))) {
212 g_error("Failed to get storage_pool name on %p", priv->handle);
217 g_warning("Failed to get storage_pool name on %p", priv->handle);
218 return NULL;
213219 }
214220
215221 return name;
385391
386392 volume = GVIR_STORAGE_VOL(g_object_new(GVIR_TYPE_STORAGE_VOL,
387393 "handle", vvolume,
394 "pool", pool,
388395 NULL));
389396
390397 g_hash_table_insert(vol_hash, g_strdup(volumes[i]), volume);
499506 *
500507 * Return value: (transfer full): the #GVirStorageVol, or NULL
501508 */
502 GVirStoragePool *gvir_storage_pool_get_volume(GVirStoragePool *pool,
503 const gchar *name)
504 {
505 GVirStoragePoolPrivate *priv = pool->priv;
506 GVirStoragePool *volume;
509 GVirStorageVol *gvir_storage_pool_get_volume(GVirStoragePool *pool,
510 const gchar *name)
511 {
512 GVirStoragePoolPrivate *priv = pool->priv;
513 GVirStorageVol *volume;
507514
508515 g_mutex_lock(priv->lock);
509516 volume = g_hash_table_lookup(priv->volumes, name);
541548 }
542549
543550 GVirStorageVol *volume;
551 const char *name;
544552
545553 volume = GVIR_STORAGE_VOL(g_object_new(GVIR_TYPE_STORAGE_VOL,
546554 "handle", handle,
555 "pool", pool,
547556 NULL));
557 name = gvir_storage_vol_get_name(volume);
558 if (name == NULL) {
559 g_object_unref(G_OBJECT(volume));
560 return NULL;
561 }
548562
549563 g_mutex_lock(priv->lock);
550 g_hash_table_insert(priv->volumes,
551 g_strdup(gvir_storage_vol_get_name(volume)),
552 volume);
564 g_hash_table_insert(priv->volumes, g_strdup(name), volume);
553565 g_mutex_unlock(priv->lock);
554566
555567 return g_object_ref(volume);
101101 GError **err);
102102
103103 GList *gvir_storage_pool_get_volumes(GVirStoragePool *pool);
104 GVirStoragePool *gvir_storage_pool_get_volume(GVirStoragePool *pool,
105 const gchar *name);
104 GVirStorageVol *gvir_storage_pool_get_volume(GVirStoragePool *pool,
105 const gchar *name);
106106 GVirStorageVol *gvir_storage_pool_create_volume
107107 (GVirStoragePool *pool,
108108 GVirConfigStorageVol *conf,
3535 struct _GVirStorageVolPrivate
3636 {
3737 virStorageVolPtr handle;
38
39 GVirStoragePool *pool;
3840 };
3941
4042 G_DEFINE_TYPE(GVirStorageVol, gvir_storage_vol, G_TYPE_OBJECT);
4345 enum {
4446 PROP_0,
4547 PROP_HANDLE,
48 PROP_POOL,
4649 };
4750
4851
6669 switch (prop_id) {
6770 case PROP_HANDLE:
6871 g_value_set_boxed(value, priv->handle);
72 break;
73
74 case PROP_POOL:
75 g_value_set_object(value, priv->pool);
6976 break;
7077
7178 default:
8794 if (priv->handle)
8895 virStorageVolFree(priv->handle);
8996 priv->handle = g_value_dup_boxed(value);
97 break;
98 case PROP_POOL:
99 priv->pool = g_value_get_object(value);
90100 break;
91101
92102 default:
125135 G_PARAM_READABLE |
126136 G_PARAM_WRITABLE |
127137 G_PARAM_CONSTRUCT_ONLY |
128 G_PARAM_STATIC_NAME |
129 G_PARAM_STATIC_NICK |
130 G_PARAM_STATIC_BLURB));
138 G_PARAM_STATIC_STRINGS));
139
140 g_object_class_install_property(object_class,
141 PROP_POOL,
142 g_param_spec_object("pool",
143 "Pool",
144 "The containing storage pool",
145 GVIR_TYPE_STORAGE_POOL,
146 G_PARAM_READABLE |
147 G_PARAM_WRITABLE |
148 G_PARAM_CONSTRUCT_ONLY |
149 G_PARAM_STATIC_STRINGS));
131150
132151 g_type_class_add_private(klass, sizeof(GVirStorageVolPrivate));
133152 }
179198 const char *name;
180199
181200 if (!(name = virStorageVolGetName(priv->handle))) {
182 g_error("Failed to get storage_vol name on %p", priv->handle);
201 g_warning("Failed to get storage_vol name on %p", priv->handle);
202 return NULL;
183203 }
184204
185205 return name;
186206 }
187207
188 const gchar *gvir_storage_vol_get_path(GVirStorageVol *vol)
208 const gchar *gvir_storage_vol_get_path(GVirStorageVol *vol, GError **error)
189209 {
190210 GVirStorageVolPrivate *priv = vol->priv;
191211 const char *path;
192212
193213 if (!(path = virStorageVolGetPath(priv->handle))) {
194 g_error("Failed to get storage_vol path on %p", priv->handle);
214 gvir_set_error(error, GVIR_STORAGE_VOL_ERROR, 0,
215 "Failed to get storage_vol path on %p",
216 priv->handle);
217 return NULL;
195218 }
196219
197220 return path;
275298
276299 return TRUE;
277300 }
301
302 /**
303 * gvir_storage_vol_resize:
304 * @vol: the storage volume to resize
305 * @capacity: the new capacity of the volume
306 * @flags: (type GVirStorageVolResizeFlags): the flags
307 * @err: Return location for errors, or NULL
308 *
309 * Changes the capacity of the storage volume @vol to @capacity.
310 *
311 * Returns: #TRUE success, #FALSE otherwise
312 */
313 gboolean gvir_storage_vol_resize(GVirStorageVol *vol,
314 guint64 capacity,
315 guint flags,
316 GError **err)
317 {
318 if (virStorageVolResize(vol->priv->handle, capacity, flags) < 0) {
319 gvir_set_error_literal(err,
320 GVIR_STORAGE_VOL_ERROR,
321 0,
322 "Unable to resize volume storage");
323 return FALSE;
324 }
325
326 return TRUE;
327 }
2222 #if !defined(__LIBVIRT_GOBJECT_H__) && !defined(LIBVIRT_GOBJECT_BUILD)
2323 #error "Only <libvirt-gobject/libvirt-gobject.h> can be included directly."
2424 #endif
25 #include <libvirt/libvirt.h>
2526
2627 #ifndef __LIBVIRT_GOBJECT_STORAGE_VOL_H__
2728 #define __LIBVIRT_GOBJECT_STORAGE_VOL_H__
6465 GVIR_STORAGE_VOL_STATE_DIR = 2, /* Directory-passthrough based volume */
6566 } GVirStorageVolType;
6667
68 /**
69 * GVirStorageVolResizeFlags:
70 * @GVIR_STORAGE_VOL_RESIZE_NONE: No flags
71 * @GVIR_STORAGE_VOL_RESIZE_ALLOCATE: force allocation of new size
72 * @GVIR_STORAGE_VOL_RESIZE_DELTA: size is relative to current
73 * @GVIR_STORAGE_VOL_RESIZE_SHRINK: allow decrease in capacity. This combined
74 * with #GVIR_STORAGE_VOL_RESIZE_DELTA, implies a negative delta.
75 */
76 typedef enum {
77 GVIR_STORAGE_VOL_RESIZE_NONE = 0,
78 GVIR_STORAGE_VOL_RESIZE_ALLOCATE = VIR_STORAGE_VOL_RESIZE_ALLOCATE,
79 GVIR_STORAGE_VOL_RESIZE_DELTA = VIR_STORAGE_VOL_RESIZE_DELTA,
80 GVIR_STORAGE_VOL_RESIZE_SHRINK = VIR_STORAGE_VOL_RESIZE_SHRINK,
81 } GVirStorageVolResizeFlags;
82
6783 typedef struct _GVirStorageVolInfo GVirStorageVolInfo;
6884 struct _GVirStorageVolInfo
6985 {
7793 GType gvir_storage_vol_handle_get_type(void);
7894
7995 const gchar *gvir_storage_vol_get_name(GVirStorageVol *vol);
80 const gchar *gvir_storage_vol_get_path(GVirStorageVol *vol);
96 const gchar *gvir_storage_vol_get_path(GVirStorageVol *vol, GError **error);
8197
8298 gboolean gvir_storage_vol_delete(GVirStorageVol *vol,
8399 guint flags,
88104 GError **err);
89105 GVirStorageVolInfo *gvir_storage_vol_get_info(GVirStorageVol *vol,
90106 GError **err);
107 gboolean gvir_storage_vol_resize(GVirStorageVol *vol,
108 guint64 capacity,
109 guint flags,
110 GError **err);
91111
92112 G_END_DECLS
93113
246246 G_PARAM_READABLE |
247247 G_PARAM_WRITABLE |
248248 G_PARAM_CONSTRUCT_ONLY |
249 G_PARAM_STATIC_NAME |
250 G_PARAM_STATIC_NICK |
251 G_PARAM_STATIC_BLURB));
249 G_PARAM_STATIC_STRINGS));
252250
253251 g_type_class_add_private(klass, sizeof(GVirStreamPrivate));
254252 }
33 gvir_init_object_check;
44
55 gvir_connection_get_type;
6 gvir_node_info_get_type;
67 gvir_connection_new;
78 gvir_connection_open;
89 gvir_connection_open_async;
2829 gvir_connection_create_domain;
2930 gvir_connection_create_storage_pool;
3031 gvir_connection_start_domain;
32 gvir_connection_get_node_info;
3133
3234 gvir_domain_device_get_type;
3335
4446 gvir_domain_info_get_type;
4547 gvir_domain_state_get_type;
4648 gvir_domain_start_flags_get_type;
49 gvir_domain_delete_flags_get_type;
4750 gvir_domain_get_name;
4851 gvir_domain_get_uuid;
4952 gvir_domain_get_id;
6366 gvir_domain_set_config;
6467 gvir_domain_get_info;
6568 gvir_domain_get_persistent;
69 gvir_domain_get_saved;
6670 gvir_domain_screenshot;
6771
6872 gvir_domain_snapshot_get_type;
125129 gvir_storage_vol_get_config;
126130 gvir_storage_vol_get_info;
127131 gvir_storage_vol_delete;
132 gvir_storage_vol_resize;
128133
129134 gvir_connection_handle_get_type;
130135
0 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1 #
2 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
3 # 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
4 # Inc.
5 # Written by Gordon Matzigkeit, 1996
6 #
7 # This file is free software; the Free Software Foundation gives
8 # unlimited permission to copy and/or distribute it, with or without
9 # modifications, as long as this notice is preserved.
10
11 m4_define([_LT_COPYING], [dnl
12 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
13 # 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
14 # Inc.
15 # Written by Gordon Matzigkeit, 1996
16 #
17 # This file is part of GNU Libtool.
18 #
19 # GNU Libtool is free software; you can redistribute it and/or
20 # modify it under the terms of the GNU General Public License as
21 # published by the Free Software Foundation; either version 2 of
22 # the License, or (at your option) any later version.
23 #
24 # As a special exception to the GNU General Public License,
25 # if you distribute this file as part of a program or library that
26 # is built using GNU Libtool, you may include this file under the
27 # same distribution terms that you use for the rest of that program.
28 #
29 # GNU Libtool is distributed in the hope that it will be useful,
30 # but WITHOUT ANY WARRANTY; without even the implied warranty of
31 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
32 # GNU General Public License for more details.
33 #
34 # You should have received a copy of the GNU General Public License
35 # along with GNU Libtool; see the file COPYING. If not, a copy
36 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
37 # obtained by writing to the Free Software Foundation, Inc.,
38 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
39 ])
40
41 # serial 57 LT_INIT
42
43
44 # LT_PREREQ(VERSION)
45 # ------------------
46 # Complain and exit if this libtool version is less that VERSION.
47 m4_defun([LT_PREREQ],
48 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
49 [m4_default([$3],
50 [m4_fatal([Libtool version $1 or higher is required],
51 63)])],
52 [$2])])
53
54
55 # _LT_CHECK_BUILDDIR
56 # ------------------
57 # Complain if the absolute build directory name contains unusual characters
58 m4_defun([_LT_CHECK_BUILDDIR],
59 [case `pwd` in
60 *\ * | *\ *)
61 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
62 esac
63 ])
64
65
66 # LT_INIT([OPTIONS])
67 # ------------------
68 AC_DEFUN([LT_INIT],
69 [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
70 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
71 AC_BEFORE([$0], [LT_LANG])dnl
72 AC_BEFORE([$0], [LT_OUTPUT])dnl
73 AC_BEFORE([$0], [LTDL_INIT])dnl
74 m4_require([_LT_CHECK_BUILDDIR])dnl
75
76 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
77 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
78 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
79 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
80 dnl unless we require an AC_DEFUNed macro:
81 AC_REQUIRE([LTOPTIONS_VERSION])dnl
82 AC_REQUIRE([LTSUGAR_VERSION])dnl
83 AC_REQUIRE([LTVERSION_VERSION])dnl
84 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
85 m4_require([_LT_PROG_LTMAIN])dnl
86
87 _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
88
89 dnl Parse OPTIONS
90 _LT_SET_OPTIONS([$0], [$1])
91
92 # This can be used to rebuild libtool when needed
93 LIBTOOL_DEPS="$ltmain"
94
95 # Always use our own libtool.
96 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
97 AC_SUBST(LIBTOOL)dnl
98
99 _LT_SETUP
100
101 # Only expand once:
102 m4_define([LT_INIT])
103 ])# LT_INIT
104
105 # Old names:
106 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
107 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
108 dnl aclocal-1.4 backwards compatibility:
109 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
110 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
111
112
113 # _LT_CC_BASENAME(CC)
114 # -------------------
115 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
116 m4_defun([_LT_CC_BASENAME],
117 [for cc_temp in $1""; do
118 case $cc_temp in
119 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
120 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
121 \-*) ;;
122 *) break;;
123 esac
124 done
125 cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
126 ])
127
128
129 # _LT_FILEUTILS_DEFAULTS
130 # ----------------------
131 # It is okay to use these file commands and assume they have been set
132 # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
133 m4_defun([_LT_FILEUTILS_DEFAULTS],
134 [: ${CP="cp -f"}
135 : ${MV="mv -f"}
136 : ${RM="rm -f"}
137 ])# _LT_FILEUTILS_DEFAULTS
138
139
140 # _LT_SETUP
141 # ---------
142 m4_defun([_LT_SETUP],
143 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
144 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
145 AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
146 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
147
148 _LT_DECL([], [host_alias], [0], [The host system])dnl
149 _LT_DECL([], [host], [0])dnl
150 _LT_DECL([], [host_os], [0])dnl
151 dnl
152 _LT_DECL([], [build_alias], [0], [The build system])dnl
153 _LT_DECL([], [build], [0])dnl
154 _LT_DECL([], [build_os], [0])dnl
155 dnl
156 AC_REQUIRE([AC_PROG_CC])dnl
157 AC_REQUIRE([LT_PATH_LD])dnl
158 AC_REQUIRE([LT_PATH_NM])dnl
159 dnl
160 AC_REQUIRE([AC_PROG_LN_S])dnl
161 test -z "$LN_S" && LN_S="ln -s"
162 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
163 dnl
164 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
165 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
166 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
167 dnl
168 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
169 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
170 m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
171 m4_require([_LT_CMD_RELOAD])dnl
172 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
173 m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
174 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
175 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
176 m4_require([_LT_WITH_SYSROOT])dnl
177
178 _LT_CONFIG_LIBTOOL_INIT([
179 # See if we are running on zsh, and set the options which allow our
180 # commands through without removal of \ escapes INIT.
181 if test -n "\${ZSH_VERSION+set}" ; then
182 setopt NO_GLOB_SUBST
183 fi
184 ])
185 if test -n "${ZSH_VERSION+set}" ; then
186 setopt NO_GLOB_SUBST
187 fi
188
189 _LT_CHECK_OBJDIR
190
191 m4_require([_LT_TAG_COMPILER])dnl
192
193 case $host_os in
194 aix3*)
195 # AIX sometimes has problems with the GCC collect2 program. For some
196 # reason, if we set the COLLECT_NAMES environment variable, the problems
197 # vanish in a puff of smoke.
198 if test "X${COLLECT_NAMES+set}" != Xset; then
199 COLLECT_NAMES=
200 export COLLECT_NAMES
201 fi
202 ;;
203 esac
204
205 # Global variables:
206 ofile=libtool
207 can_build_shared=yes
208
209 # All known linkers require a `.a' archive for static linking (except MSVC,
210 # which needs '.lib').
211 libext=a
212
213 with_gnu_ld="$lt_cv_prog_gnu_ld"
214
215 old_CC="$CC"
216 old_CFLAGS="$CFLAGS"
217
218 # Set sane defaults for various variables
219 test -z "$CC" && CC=cc
220 test -z "$LTCC" && LTCC=$CC
221 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
222 test -z "$LD" && LD=ld
223 test -z "$ac_objext" && ac_objext=o
224
225 _LT_CC_BASENAME([$compiler])
226
227 # Only perform the check for file, if the check method requires it
228 test -z "$MAGIC_CMD" && MAGIC_CMD=file
229 case $deplibs_check_method in
230 file_magic*)
231 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
232 _LT_PATH_MAGIC
233 fi
234 ;;
235 esac
236
237 # Use C for the default configuration in the libtool script
238 LT_SUPPORTED_TAG([CC])
239 _LT_LANG_C_CONFIG
240 _LT_LANG_DEFAULT_CONFIG
241 _LT_CONFIG_COMMANDS
242 ])# _LT_SETUP
243
244
245 # _LT_PREPARE_SED_QUOTE_VARS
246 # --------------------------
247 # Define a few sed substitution that help us do robust quoting.
248 m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
249 [# Backslashify metacharacters that are still active within
250 # double-quoted strings.
251 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
252
253 # Same as above, but do not quote variable references.
254 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
255
256 # Sed substitution to delay expansion of an escaped shell variable in a
257 # double_quote_subst'ed string.
258 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
259
260 # Sed substitution to delay expansion of an escaped single quote.
261 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
262
263 # Sed substitution to avoid accidental globbing in evaled expressions
264 no_glob_subst='s/\*/\\\*/g'
265 ])
266
267 # _LT_PROG_LTMAIN
268 # ---------------
269 # Note that this code is called both from `configure', and `config.status'
270 # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
271 # `config.status' has no value for ac_aux_dir unless we are using Automake,
272 # so we pass a copy along to make sure it has a sensible value anyway.
273 m4_defun([_LT_PROG_LTMAIN],
274 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
275 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
276 ltmain="$ac_aux_dir/ltmain.sh"
277 ])# _LT_PROG_LTMAIN
278
279
280 ## ------------------------------------- ##
281 ## Accumulate code for creating libtool. ##
282 ## ------------------------------------- ##
283
284 # So that we can recreate a full libtool script including additional
285 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
286 # in macros and then make a single call at the end using the `libtool'
287 # label.
288
289
290 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
291 # ----------------------------------------
292 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
293 m4_define([_LT_CONFIG_LIBTOOL_INIT],
294 [m4_ifval([$1],
295 [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
296 [$1
297 ])])])
298
299 # Initialize.
300 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
301
302
303 # _LT_CONFIG_LIBTOOL([COMMANDS])
304 # ------------------------------
305 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
306 m4_define([_LT_CONFIG_LIBTOOL],
307 [m4_ifval([$1],
308 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
309 [$1
310 ])])])
311
312 # Initialize.
313 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
314
315
316 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
317 # -----------------------------------------------------
318 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
319 [_LT_CONFIG_LIBTOOL([$1])
320 _LT_CONFIG_LIBTOOL_INIT([$2])
321 ])
322
323
324 # _LT_FORMAT_COMMENT([COMMENT])
325 # -----------------------------
326 # Add leading comment marks to the start of each line, and a trailing
327 # full-stop to the whole comment if one is not present already.
328 m4_define([_LT_FORMAT_COMMENT],
329 [m4_ifval([$1], [
330 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
331 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
332 )])
333
334
335
336 ## ------------------------ ##
337 ## FIXME: Eliminate VARNAME ##
338 ## ------------------------ ##
339
340
341 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
342 # -------------------------------------------------------------------
343 # CONFIGNAME is the name given to the value in the libtool script.
344 # VARNAME is the (base) name used in the configure script.
345 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
346 # VARNAME. Any other value will be used directly.
347 m4_define([_LT_DECL],
348 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
349 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
350 [m4_ifval([$1], [$1], [$2])])
351 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
352 m4_ifval([$4],
353 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
354 lt_dict_add_subkey([lt_decl_dict], [$2],
355 [tagged?], [m4_ifval([$5], [yes], [no])])])
356 ])
357
358
359 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
360 # --------------------------------------------------------
361 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
362
363
364 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
365 # ------------------------------------------------
366 m4_define([lt_decl_tag_varnames],
367 [_lt_decl_filter([tagged?], [yes], $@)])
368
369
370 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
371 # ---------------------------------------------------------
372 m4_define([_lt_decl_filter],
373 [m4_case([$#],
374 [0], [m4_fatal([$0: too few arguments: $#])],
375 [1], [m4_fatal([$0: too few arguments: $#: $1])],
376 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
377 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
378 [lt_dict_filter([lt_decl_dict], $@)])[]dnl
379 ])
380
381
382 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
383 # --------------------------------------------------
384 m4_define([lt_decl_quote_varnames],
385 [_lt_decl_filter([value], [1], $@)])
386
387
388 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
389 # ---------------------------------------------------
390 m4_define([lt_decl_dquote_varnames],
391 [_lt_decl_filter([value], [2], $@)])
392
393
394 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
395 # ---------------------------------------------------
396 m4_define([lt_decl_varnames_tagged],
397 [m4_assert([$# <= 2])dnl
398 _$0(m4_quote(m4_default([$1], [[, ]])),
399 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
400 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
401 m4_define([_lt_decl_varnames_tagged],
402 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
403
404
405 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
406 # ------------------------------------------------
407 m4_define([lt_decl_all_varnames],
408 [_$0(m4_quote(m4_default([$1], [[, ]])),
409 m4_if([$2], [],
410 m4_quote(lt_decl_varnames),
411 m4_quote(m4_shift($@))))[]dnl
412 ])
413 m4_define([_lt_decl_all_varnames],
414 [lt_join($@, lt_decl_varnames_tagged([$1],
415 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
416 ])
417
418
419 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
420 # ------------------------------------
421 # Quote a variable value, and forward it to `config.status' so that its
422 # declaration there will have the same value as in `configure'. VARNAME
423 # must have a single quote delimited value for this to work.
424 m4_define([_LT_CONFIG_STATUS_DECLARE],
425 [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
426
427
428 # _LT_CONFIG_STATUS_DECLARATIONS
429 # ------------------------------
430 # We delimit libtool config variables with single quotes, so when
431 # we write them to config.status, we have to be sure to quote all
432 # embedded single quotes properly. In configure, this macro expands
433 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
434 #
435 # <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
436 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
437 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
438 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
439
440
441 # _LT_LIBTOOL_TAGS
442 # ----------------
443 # Output comment and list of tags supported by the script
444 m4_defun([_LT_LIBTOOL_TAGS],
445 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
446 available_tags="_LT_TAGS"dnl
447 ])
448
449
450 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
451 # -----------------------------------
452 # Extract the dictionary values for VARNAME (optionally with TAG) and
453 # expand to a commented shell variable setting:
454 #
455 # # Some comment about what VAR is for.
456 # visible_name=$lt_internal_name
457 m4_define([_LT_LIBTOOL_DECLARE],
458 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
459 [description])))[]dnl
460 m4_pushdef([_libtool_name],
461 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
462 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
463 [0], [_libtool_name=[$]$1],
464 [1], [_libtool_name=$lt_[]$1],
465 [2], [_libtool_name=$lt_[]$1],
466 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
467 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
468 ])
469
470
471 # _LT_LIBTOOL_CONFIG_VARS
472 # -----------------------
473 # Produce commented declarations of non-tagged libtool config variables
474 # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
475 # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
476 # section) are produced by _LT_LIBTOOL_TAG_VARS.
477 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
478 [m4_foreach([_lt_var],
479 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
480 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
481
482
483 # _LT_LIBTOOL_TAG_VARS(TAG)
484 # -------------------------
485 m4_define([_LT_LIBTOOL_TAG_VARS],
486 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
487 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
488
489
490 # _LT_TAGVAR(VARNAME, [TAGNAME])
491 # ------------------------------
492 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
493
494
495 # _LT_CONFIG_COMMANDS
496 # -------------------
497 # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
498 # variables for single and double quote escaping we saved from calls
499 # to _LT_DECL, we can put quote escaped variables declarations
500 # into `config.status', and then the shell code to quote escape them in
501 # for loops in `config.status'. Finally, any additional code accumulated
502 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
503 m4_defun([_LT_CONFIG_COMMANDS],
504 [AC_PROVIDE_IFELSE([LT_OUTPUT],
505 dnl If the libtool generation code has been placed in $CONFIG_LT,
506 dnl instead of duplicating it all over again into config.status,
507 dnl then we will have config.status run $CONFIG_LT later, so it
508 dnl needs to know what name is stored there:
509 [AC_CONFIG_COMMANDS([libtool],
510 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
511 dnl If the libtool generation code is destined for config.status,
512 dnl expand the accumulated commands and init code now:
513 [AC_CONFIG_COMMANDS([libtool],
514 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
515 ])#_LT_CONFIG_COMMANDS
516
517
518 # Initialize.
519 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
520 [
521
522 # The HP-UX ksh and POSIX shell print the target directory to stdout
523 # if CDPATH is set.
524 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
525
526 sed_quote_subst='$sed_quote_subst'
527 double_quote_subst='$double_quote_subst'
528 delay_variable_subst='$delay_variable_subst'
529 _LT_CONFIG_STATUS_DECLARATIONS
530 LTCC='$LTCC'
531 LTCFLAGS='$LTCFLAGS'
532 compiler='$compiler_DEFAULT'
533
534 # A function that is used when there is no print builtin or printf.
535 func_fallback_echo ()
536 {
537 eval 'cat <<_LTECHO_EOF
538 \$[]1
539 _LTECHO_EOF'
540 }
541
542 # Quote evaled strings.
543 for var in lt_decl_all_varnames([[ \
544 ]], lt_decl_quote_varnames); do
545 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
546 *[[\\\\\\\`\\"\\\$]]*)
547 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
548 ;;
549 *)
550 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
551 ;;
552 esac
553 done
554
555 # Double-quote double-evaled strings.
556 for var in lt_decl_all_varnames([[ \
557 ]], lt_decl_dquote_varnames); do
558 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
559 *[[\\\\\\\`\\"\\\$]]*)
560 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
561 ;;
562 *)
563 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
564 ;;
565 esac
566 done
567
568 _LT_OUTPUT_LIBTOOL_INIT
569 ])
570
571 # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
572 # ------------------------------------
573 # Generate a child script FILE with all initialization necessary to
574 # reuse the environment learned by the parent script, and make the
575 # file executable. If COMMENT is supplied, it is inserted after the
576 # `#!' sequence but before initialization text begins. After this
577 # macro, additional text can be appended to FILE to form the body of
578 # the child script. The macro ends with non-zero status if the
579 # file could not be fully written (such as if the disk is full).
580 m4_ifdef([AS_INIT_GENERATED],
581 [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
582 [m4_defun([_LT_GENERATED_FILE_INIT],
583 [m4_require([AS_PREPARE])]dnl
584 [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
585 [lt_write_fail=0
586 cat >$1 <<_ASEOF || lt_write_fail=1
587 #! $SHELL
588 # Generated by $as_me.
589 $2
590 SHELL=\${CONFIG_SHELL-$SHELL}
591 export SHELL
592 _ASEOF
593 cat >>$1 <<\_ASEOF || lt_write_fail=1
594 AS_SHELL_SANITIZE
595 _AS_PREPARE
596 exec AS_MESSAGE_FD>&1
597 _ASEOF
598 test $lt_write_fail = 0 && chmod +x $1[]dnl
599 m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
600
601 # LT_OUTPUT
602 # ---------
603 # This macro allows early generation of the libtool script (before
604 # AC_OUTPUT is called), incase it is used in configure for compilation
605 # tests.
606 AC_DEFUN([LT_OUTPUT],
607 [: ${CONFIG_LT=./config.lt}
608 AC_MSG_NOTICE([creating $CONFIG_LT])
609 _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
610 [# Run this file to recreate a libtool stub with the current configuration.])
611
612 cat >>"$CONFIG_LT" <<\_LTEOF
613 lt_cl_silent=false
614 exec AS_MESSAGE_LOG_FD>>config.log
615 {
616 echo
617 AS_BOX([Running $as_me.])
618 } >&AS_MESSAGE_LOG_FD
619
620 lt_cl_help="\
621 \`$as_me' creates a local libtool stub from the current configuration,
622 for use in further configure time tests before the real libtool is
623 generated.
624
625 Usage: $[0] [[OPTIONS]]
626
627 -h, --help print this help, then exit
628 -V, --version print version number, then exit
629 -q, --quiet do not print progress messages
630 -d, --debug don't remove temporary files
631
632 Report bugs to <bug-libtool@gnu.org>."
633
634 lt_cl_version="\
635 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
636 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
637 configured by $[0], generated by m4_PACKAGE_STRING.
638
639 Copyright (C) 2010 Free Software Foundation, Inc.
640 This config.lt script is free software; the Free Software Foundation
641 gives unlimited permision to copy, distribute and modify it."
642
643 while test $[#] != 0
644 do
645 case $[1] in
646 --version | --v* | -V )
647 echo "$lt_cl_version"; exit 0 ;;
648 --help | --h* | -h )
649 echo "$lt_cl_help"; exit 0 ;;
650 --debug | --d* | -d )
651 debug=: ;;
652 --quiet | --q* | --silent | --s* | -q )
653 lt_cl_silent=: ;;
654
655 -*) AC_MSG_ERROR([unrecognized option: $[1]
656 Try \`$[0] --help' for more information.]) ;;
657
658 *) AC_MSG_ERROR([unrecognized argument: $[1]
659 Try \`$[0] --help' for more information.]) ;;
660 esac
661 shift
662 done
663
664 if $lt_cl_silent; then
665 exec AS_MESSAGE_FD>/dev/null
666 fi
667 _LTEOF
668
669 cat >>"$CONFIG_LT" <<_LTEOF
670 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
671 _LTEOF
672
673 cat >>"$CONFIG_LT" <<\_LTEOF
674 AC_MSG_NOTICE([creating $ofile])
675 _LT_OUTPUT_LIBTOOL_COMMANDS
676 AS_EXIT(0)
677 _LTEOF
678 chmod +x "$CONFIG_LT"
679
680 # configure is writing to config.log, but config.lt does its own redirection,
681 # appending to config.log, which fails on DOS, as config.log is still kept
682 # open by configure. Here we exec the FD to /dev/null, effectively closing
683 # config.log, so it can be properly (re)opened and appended to by config.lt.
684 lt_cl_success=:
685 test "$silent" = yes &&
686 lt_config_lt_args="$lt_config_lt_args --quiet"
687 exec AS_MESSAGE_LOG_FD>/dev/null
688 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
689 exec AS_MESSAGE_LOG_FD>>config.log
690 $lt_cl_success || AS_EXIT(1)
691 ])# LT_OUTPUT
692
693
694 # _LT_CONFIG(TAG)
695 # ---------------
696 # If TAG is the built-in tag, create an initial libtool script with a
697 # default configuration from the untagged config vars. Otherwise add code
698 # to config.status for appending the configuration named by TAG from the
699 # matching tagged config vars.
700 m4_defun([_LT_CONFIG],
701 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
702 _LT_CONFIG_SAVE_COMMANDS([
703 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
704 m4_if(_LT_TAG, [C], [
705 # See if we are running on zsh, and set the options which allow our
706 # commands through without removal of \ escapes.
707 if test -n "${ZSH_VERSION+set}" ; then
708 setopt NO_GLOB_SUBST
709 fi
710
711 cfgfile="${ofile}T"
712 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
713 $RM "$cfgfile"
714
715 cat <<_LT_EOF >> "$cfgfile"
716 #! $SHELL
717
718 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
719 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
720 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
721 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
722 #
723 _LT_COPYING
724 _LT_LIBTOOL_TAGS
725
726 # ### BEGIN LIBTOOL CONFIG
727 _LT_LIBTOOL_CONFIG_VARS
728 _LT_LIBTOOL_TAG_VARS
729 # ### END LIBTOOL CONFIG
730
731 _LT_EOF
732
733 case $host_os in
734 aix3*)
735 cat <<\_LT_EOF >> "$cfgfile"
736 # AIX sometimes has problems with the GCC collect2 program. For some
737 # reason, if we set the COLLECT_NAMES environment variable, the problems
738 # vanish in a puff of smoke.
739 if test "X${COLLECT_NAMES+set}" != Xset; then
740 COLLECT_NAMES=
741 export COLLECT_NAMES
742 fi
743 _LT_EOF
744 ;;
745 esac
746
747 _LT_PROG_LTMAIN
748
749 # We use sed instead of cat because bash on DJGPP gets confused if
750 # if finds mixed CR/LF and LF-only lines. Since sed operates in
751 # text mode, it properly converts lines to CR/LF. This bash problem
752 # is reportedly fixed, but why not run on old versions too?
753 sed '$q' "$ltmain" >> "$cfgfile" \
754 || (rm -f "$cfgfile"; exit 1)
755
756 _LT_PROG_REPLACE_SHELLFNS
757
758 mv -f "$cfgfile" "$ofile" ||
759 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
760 chmod +x "$ofile"
761 ],
762 [cat <<_LT_EOF >> "$ofile"
763
764 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
765 dnl in a comment (ie after a #).
766 # ### BEGIN LIBTOOL TAG CONFIG: $1
767 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
768 # ### END LIBTOOL TAG CONFIG: $1
769 _LT_EOF
770 ])dnl /m4_if
771 ],
772 [m4_if([$1], [], [
773 PACKAGE='$PACKAGE'
774 VERSION='$VERSION'
775 TIMESTAMP='$TIMESTAMP'
776 RM='$RM'
777 ofile='$ofile'], [])
778 ])dnl /_LT_CONFIG_SAVE_COMMANDS
779 ])# _LT_CONFIG
780
781
782 # LT_SUPPORTED_TAG(TAG)
783 # ---------------------
784 # Trace this macro to discover what tags are supported by the libtool
785 # --tag option, using:
786 # autoconf --trace 'LT_SUPPORTED_TAG:$1'
787 AC_DEFUN([LT_SUPPORTED_TAG], [])
788
789
790 # C support is built-in for now
791 m4_define([_LT_LANG_C_enabled], [])
792 m4_define([_LT_TAGS], [])
793
794
795 # LT_LANG(LANG)
796 # -------------
797 # Enable libtool support for the given language if not already enabled.
798 AC_DEFUN([LT_LANG],
799 [AC_BEFORE([$0], [LT_OUTPUT])dnl
800 m4_case([$1],
801 [C], [_LT_LANG(C)],
802 [C++], [_LT_LANG(CXX)],
803 [Java], [_LT_LANG(GCJ)],
804 [Fortran 77], [_LT_LANG(F77)],
805 [Fortran], [_LT_LANG(FC)],
806 [Windows Resource], [_LT_LANG(RC)],
807 [m4_ifdef([_LT_LANG_]$1[_CONFIG],
808 [_LT_LANG($1)],
809 [m4_fatal([$0: unsupported language: "$1"])])])dnl
810 ])# LT_LANG
811
812
813 # _LT_LANG(LANGNAME)
814 # ------------------
815 m4_defun([_LT_LANG],
816 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
817 [LT_SUPPORTED_TAG([$1])dnl
818 m4_append([_LT_TAGS], [$1 ])dnl
819 m4_define([_LT_LANG_]$1[_enabled], [])dnl
820 _LT_LANG_$1_CONFIG($1)])dnl
821 ])# _LT_LANG
822
823
824 # _LT_LANG_DEFAULT_CONFIG
825 # -----------------------
826 m4_defun([_LT_LANG_DEFAULT_CONFIG],
827 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
828 [LT_LANG(CXX)],
829 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
830
831 AC_PROVIDE_IFELSE([AC_PROG_F77],
832 [LT_LANG(F77)],
833 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
834
835 AC_PROVIDE_IFELSE([AC_PROG_FC],
836 [LT_LANG(FC)],
837 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
838
839 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
840 dnl pulling things in needlessly.
841 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
842 [LT_LANG(GCJ)],
843 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
844 [LT_LANG(GCJ)],
845 [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
846 [LT_LANG(GCJ)],
847 [m4_ifdef([AC_PROG_GCJ],
848 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
849 m4_ifdef([A][M_PROG_GCJ],
850 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
851 m4_ifdef([LT_PROG_GCJ],
852 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
853
854 AC_PROVIDE_IFELSE([LT_PROG_RC],
855 [LT_LANG(RC)],
856 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
857 ])# _LT_LANG_DEFAULT_CONFIG
858
859 # Obsolete macros:
860 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
861 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
862 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
863 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
864 AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
865 dnl aclocal-1.4 backwards compatibility:
866 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
867 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
868 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
869 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
870 dnl AC_DEFUN([AC_LIBTOOL_RC], [])
871
872
873 # _LT_TAG_COMPILER
874 # ----------------
875 m4_defun([_LT_TAG_COMPILER],
876 [AC_REQUIRE([AC_PROG_CC])dnl
877
878 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
879 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
880 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
881 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
882
883 # If no C compiler was specified, use CC.
884 LTCC=${LTCC-"$CC"}
885
886 # If no C compiler flags were specified, use CFLAGS.
887 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
888
889 # Allow CC to be a program name with arguments.
890 compiler=$CC
891 ])# _LT_TAG_COMPILER
892
893
894 # _LT_COMPILER_BOILERPLATE
895 # ------------------------
896 # Check for compiler boilerplate output or warnings with
897 # the simple compiler test code.
898 m4_defun([_LT_COMPILER_BOILERPLATE],
899 [m4_require([_LT_DECL_SED])dnl
900 ac_outfile=conftest.$ac_objext
901 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
902 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
903 _lt_compiler_boilerplate=`cat conftest.err`
904 $RM conftest*
905 ])# _LT_COMPILER_BOILERPLATE
906
907
908 # _LT_LINKER_BOILERPLATE
909 # ----------------------
910 # Check for linker boilerplate output or warnings with
911 # the simple link test code.
912 m4_defun([_LT_LINKER_BOILERPLATE],
913 [m4_require([_LT_DECL_SED])dnl
914 ac_outfile=conftest.$ac_objext
915 echo "$lt_simple_link_test_code" >conftest.$ac_ext
916 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
917 _lt_linker_boilerplate=`cat conftest.err`
918 $RM -r conftest*
919 ])# _LT_LINKER_BOILERPLATE
920
921 # _LT_REQUIRED_DARWIN_CHECKS
922 # -------------------------
923 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
924 case $host_os in
925 rhapsody* | darwin*)
926 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
927 AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
928 AC_CHECK_TOOL([LIPO], [lipo], [:])
929 AC_CHECK_TOOL([OTOOL], [otool], [:])
930 AC_CHECK_TOOL([OTOOL64], [otool64], [:])
931 _LT_DECL([], [DSYMUTIL], [1],
932 [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
933 _LT_DECL([], [NMEDIT], [1],
934 [Tool to change global to local symbols on Mac OS X])
935 _LT_DECL([], [LIPO], [1],
936 [Tool to manipulate fat objects and archives on Mac OS X])
937 _LT_DECL([], [OTOOL], [1],
938 [ldd/readelf like tool for Mach-O binaries on Mac OS X])
939 _LT_DECL([], [OTOOL64], [1],
940 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
941
942 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
943 [lt_cv_apple_cc_single_mod=no
944 if test -z "${LT_MULTI_MODULE}"; then
945 # By default we will add the -single_module flag. You can override
946 # by either setting the environment variable LT_MULTI_MODULE
947 # non-empty at configure time, or by adding -multi_module to the
948 # link flags.
949 rm -rf libconftest.dylib*
950 echo "int foo(void){return 1;}" > conftest.c
951 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
952 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
953 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
954 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
955 _lt_result=$?
956 if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
957 lt_cv_apple_cc_single_mod=yes
958 else
959 cat conftest.err >&AS_MESSAGE_LOG_FD
960 fi
961 rm -rf libconftest.dylib*
962 rm -f conftest.*
963 fi])
964 AC_CACHE_CHECK([for -exported_symbols_list linker flag],
965 [lt_cv_ld_exported_symbols_list],
966 [lt_cv_ld_exported_symbols_list=no
967 save_LDFLAGS=$LDFLAGS
968 echo "_main" > conftest.sym
969 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
970 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
971 [lt_cv_ld_exported_symbols_list=yes],
972 [lt_cv_ld_exported_symbols_list=no])
973 LDFLAGS="$save_LDFLAGS"
974 ])
975 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
976 [lt_cv_ld_force_load=no
977 cat > conftest.c << _LT_EOF
978 int forced_loaded() { return 2;}
979 _LT_EOF
980 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
981 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
982 echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
983 $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
984 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
985 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
986 cat > conftest.c << _LT_EOF
987 int main() { return 0;}
988 _LT_EOF
989 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
990 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
991 _lt_result=$?
992 if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
993 lt_cv_ld_force_load=yes
994 else
995 cat conftest.err >&AS_MESSAGE_LOG_FD
996 fi
997 rm -f conftest.err libconftest.a conftest conftest.c
998 rm -rf conftest.dSYM
999 ])
1000 case $host_os in
1001 rhapsody* | darwin1.[[012]])
1002 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
1003 darwin1.*)
1004 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1005 darwin*) # darwin 5.x on
1006 # if running on 10.5 or later, the deployment target defaults
1007 # to the OS version, if on x86, and 10.4, the deployment
1008 # target defaults to 10.4. Don't you love it?
1009 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
1010 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
1011 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1012 10.[[012]]*)
1013 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1014 10.*)
1015 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1016 esac
1017 ;;
1018 esac
1019 if test "$lt_cv_apple_cc_single_mod" = "yes"; then
1020 _lt_dar_single_mod='$single_module'
1021 fi
1022 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
1023 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
1024 else
1025 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
1026 fi
1027 if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
1028 _lt_dsymutil='~$DSYMUTIL $lib || :'
1029 else
1030 _lt_dsymutil=
1031 fi
1032 ;;
1033 esac
1034 ])
1035
1036
1037 # _LT_DARWIN_LINKER_FEATURES
1038 # --------------------------
1039 # Checks for linker and compiler features on darwin
1040 m4_defun([_LT_DARWIN_LINKER_FEATURES],
1041 [
1042 m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1043 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1044 _LT_TAGVAR(hardcode_direct, $1)=no
1045 _LT_TAGVAR(hardcode_automatic, $1)=yes
1046 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1047 if test "$lt_cv_ld_force_load" = "yes"; then
1048 _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
1049 else
1050 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1051 fi
1052 _LT_TAGVAR(link_all_deplibs, $1)=yes
1053 _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
1054 case $cc_basename in
1055 ifort*) _lt_dar_can_shared=yes ;;
1056 *) _lt_dar_can_shared=$GCC ;;
1057 esac
1058 if test "$_lt_dar_can_shared" = "yes"; then
1059 output_verbose_link_cmd=func_echo_all
1060 _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
1061 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
1062 _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
1063 _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
1064 m4_if([$1], [CXX],
1065 [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
1066 _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
1067 _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
1068 fi
1069 ],[])
1070 else
1071 _LT_TAGVAR(ld_shlibs, $1)=no
1072 fi
1073 ])
1074
1075 # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
1076 # ----------------------------------
1077 # Links a minimal program and checks the executable
1078 # for the system default hardcoded library path. In most cases,
1079 # this is /usr/lib:/lib, but when the MPI compilers are used
1080 # the location of the communication and MPI libs are included too.
1081 # If we don't find anything, use the default library path according
1082 # to the aix ld manual.
1083 # Store the results from the different compilers for each TAGNAME.
1084 # Allow to override them for all tags through lt_cv_aix_libpath.
1085 m4_defun([_LT_SYS_MODULE_PATH_AIX],
1086 [m4_require([_LT_DECL_SED])dnl
1087 if test "${lt_cv_aix_libpath+set}" = set; then
1088 aix_libpath=$lt_cv_aix_libpath
1089 else
1090 AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
1091 [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
1092 lt_aix_libpath_sed='[
1093 /Import File Strings/,/^$/ {
1094 /^0/ {
1095 s/^0 *\([^ ]*\) *$/\1/
1096 p
1097 }
1098 }]'
1099 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1100 # Check for a 64-bit object if we didn't find anything.
1101 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1102 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1103 fi],[])
1104 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1105 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
1106 fi
1107 ])
1108 aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
1109 fi
1110 ])# _LT_SYS_MODULE_PATH_AIX
1111
1112
1113 # _LT_SHELL_INIT(ARG)
1114 # -------------------
1115 m4_define([_LT_SHELL_INIT],
1116 [m4_divert_text([M4SH-INIT], [$1
1117 ])])# _LT_SHELL_INIT
1118
1119
1120
1121 # _LT_PROG_ECHO_BACKSLASH
1122 # -----------------------
1123 # Find how we can fake an echo command that does not interpret backslash.
1124 # In particular, with Autoconf 2.60 or later we add some code to the start
1125 # of the generated configure script which will find a shell with a builtin
1126 # printf (which we can use as an echo command).
1127 m4_defun([_LT_PROG_ECHO_BACKSLASH],
1128 [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1129 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1130 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1131
1132 AC_MSG_CHECKING([how to print strings])
1133 # Test print first, because it will be a builtin if present.
1134 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
1135 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
1136 ECHO='print -r --'
1137 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
1138 ECHO='printf %s\n'
1139 else
1140 # Use this function as a fallback that always works.
1141 func_fallback_echo ()
1142 {
1143 eval 'cat <<_LTECHO_EOF
1144 $[]1
1145 _LTECHO_EOF'
1146 }
1147 ECHO='func_fallback_echo'
1148 fi
1149
1150 # func_echo_all arg...
1151 # Invoke $ECHO with all args, space-separated.
1152 func_echo_all ()
1153 {
1154 $ECHO "$*"
1155 }
1156
1157 case "$ECHO" in
1158 printf*) AC_MSG_RESULT([printf]) ;;
1159 print*) AC_MSG_RESULT([print -r]) ;;
1160 *) AC_MSG_RESULT([cat]) ;;
1161 esac
1162
1163 m4_ifdef([_AS_DETECT_SUGGESTED],
1164 [_AS_DETECT_SUGGESTED([
1165 test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
1166 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1167 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1168 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1169 PATH=/empty FPATH=/empty; export PATH FPATH
1170 test "X`printf %s $ECHO`" = "X$ECHO" \
1171 || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
1172
1173 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1174 _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
1175 ])# _LT_PROG_ECHO_BACKSLASH
1176
1177
1178 # _LT_WITH_SYSROOT
1179 # ----------------
1180 AC_DEFUN([_LT_WITH_SYSROOT],
1181 [AC_MSG_CHECKING([for sysroot])
1182 AC_ARG_WITH([sysroot],
1183 [ --with-sysroot[=DIR] Search for dependent libraries within DIR
1184 (or the compiler's sysroot if not specified).],
1185 [], [with_sysroot=no])
1186
1187 dnl lt_sysroot will always be passed unquoted. We quote it here
1188 dnl in case the user passed a directory name.
1189 lt_sysroot=
1190 case ${with_sysroot} in #(
1191 yes)
1192 if test "$GCC" = yes; then
1193 lt_sysroot=`$CC --print-sysroot 2>/dev/null`
1194 fi
1195 ;; #(
1196 /*)
1197 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
1198 ;; #(
1199 no|'')
1200 ;; #(
1201 *)
1202 AC_MSG_RESULT([${with_sysroot}])
1203 AC_MSG_ERROR([The sysroot must be an absolute path.])
1204 ;;
1205 esac
1206
1207 AC_MSG_RESULT([${lt_sysroot:-no}])
1208 _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
1209 [dependent libraries, and in which our libraries should be installed.])])
1210
1211 # _LT_ENABLE_LOCK
1212 # ---------------
1213 m4_defun([_LT_ENABLE_LOCK],
1214 [AC_ARG_ENABLE([libtool-lock],
1215 [AS_HELP_STRING([--disable-libtool-lock],
1216 [avoid locking (might break parallel builds)])])
1217 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1218
1219 # Some flags need to be propagated to the compiler or linker for good
1220 # libtool support.
1221 case $host in
1222 ia64-*-hpux*)
1223 # Find out which ABI we are using.
1224 echo 'int i;' > conftest.$ac_ext
1225 if AC_TRY_EVAL(ac_compile); then
1226 case `/usr/bin/file conftest.$ac_objext` in
1227 *ELF-32*)
1228 HPUX_IA64_MODE="32"
1229 ;;
1230 *ELF-64*)
1231 HPUX_IA64_MODE="64"
1232 ;;
1233 esac
1234 fi
1235 rm -rf conftest*
1236 ;;
1237 *-*-irix6*)
1238 # Find out which ABI we are using.
1239 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
1240 if AC_TRY_EVAL(ac_compile); then
1241 if test "$lt_cv_prog_gnu_ld" = yes; then
1242 case `/usr/bin/file conftest.$ac_objext` in
1243 *32-bit*)
1244 LD="${LD-ld} -melf32bsmip"
1245 ;;
1246 *N32*)
1247 LD="${LD-ld} -melf32bmipn32"
1248 ;;
1249 *64-bit*)
1250 LD="${LD-ld} -melf64bmip"
1251 ;;
1252 esac
1253 else
1254 case `/usr/bin/file conftest.$ac_objext` in
1255 *32-bit*)
1256 LD="${LD-ld} -32"
1257 ;;
1258 *N32*)
1259 LD="${LD-ld} -n32"
1260 ;;
1261 *64-bit*)
1262 LD="${LD-ld} -64"
1263 ;;
1264 esac
1265 fi
1266 fi
1267 rm -rf conftest*
1268 ;;
1269
1270 x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
1271 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1272 # Find out which ABI we are using.
1273 echo 'int i;' > conftest.$ac_ext
1274 if AC_TRY_EVAL(ac_compile); then
1275 case `/usr/bin/file conftest.o` in
1276 *32-bit*)
1277 case $host in
1278 x86_64-*kfreebsd*-gnu)
1279 LD="${LD-ld} -m elf_i386_fbsd"
1280 ;;
1281 x86_64-*linux*)
1282 LD="${LD-ld} -m elf_i386"
1283 ;;
1284 ppc64-*linux*|powerpc64-*linux*)
1285 LD="${LD-ld} -m elf32ppclinux"
1286 ;;
1287 s390x-*linux*)
1288 LD="${LD-ld} -m elf_s390"
1289 ;;
1290 sparc64-*linux*)
1291 LD="${LD-ld} -m elf32_sparc"
1292 ;;
1293 esac
1294 ;;
1295 *64-bit*)
1296 case $host in
1297 x86_64-*kfreebsd*-gnu)
1298 LD="${LD-ld} -m elf_x86_64_fbsd"
1299 ;;
1300 x86_64-*linux*)
1301 LD="${LD-ld} -m elf_x86_64"
1302 ;;
1303 ppc*-*linux*|powerpc*-*linux*)
1304 LD="${LD-ld} -m elf64ppc"
1305 ;;
1306 s390*-*linux*|s390*-*tpf*)
1307 LD="${LD-ld} -m elf64_s390"
1308 ;;
1309 sparc*-*linux*)
1310 LD="${LD-ld} -m elf64_sparc"
1311 ;;
1312 esac
1313 ;;
1314 esac
1315 fi
1316 rm -rf conftest*
1317 ;;
1318
1319 *-*-sco3.2v5*)
1320 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1321 SAVE_CFLAGS="$CFLAGS"
1322 CFLAGS="$CFLAGS -belf"
1323 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1324 [AC_LANG_PUSH(C)
1325 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1326 AC_LANG_POP])
1327 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1328 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1329 CFLAGS="$SAVE_CFLAGS"
1330 fi
1331 ;;
1332 sparc*-*solaris*)
1333 # Find out which ABI we are using.
1334 echo 'int i;' > conftest.$ac_ext
1335 if AC_TRY_EVAL(ac_compile); then
1336 case `/usr/bin/file conftest.o` in
1337 *64-bit*)
1338 case $lt_cv_prog_gnu_ld in
1339 yes*) LD="${LD-ld} -m elf64_sparc" ;;
1340 *)
1341 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1342 LD="${LD-ld} -64"
1343 fi
1344 ;;
1345 esac
1346 ;;
1347 esac
1348 fi
1349 rm -rf conftest*
1350 ;;
1351 esac
1352
1353 need_locks="$enable_libtool_lock"
1354 ])# _LT_ENABLE_LOCK
1355
1356
1357 # _LT_PROG_AR
1358 # -----------
1359 m4_defun([_LT_PROG_AR],
1360 [AC_CHECK_TOOLS(AR, [ar], false)
1361 : ${AR=ar}
1362 : ${AR_FLAGS=cru}
1363 _LT_DECL([], [AR], [1], [The archiver])
1364 _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
1365
1366 AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
1367 [lt_cv_ar_at_file=no
1368 AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
1369 [echo conftest.$ac_objext > conftest.lst
1370 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
1371 AC_TRY_EVAL([lt_ar_try])
1372 if test "$ac_status" -eq 0; then
1373 # Ensure the archiver fails upon bogus file names.
1374 rm -f conftest.$ac_objext libconftest.a
1375 AC_TRY_EVAL([lt_ar_try])
1376 if test "$ac_status" -ne 0; then
1377 lt_cv_ar_at_file=@
1378 fi
1379 fi
1380 rm -f conftest.* libconftest.a
1381 ])
1382 ])
1383
1384 if test "x$lt_cv_ar_at_file" = xno; then
1385 archiver_list_spec=
1386 else
1387 archiver_list_spec=$lt_cv_ar_at_file
1388 fi
1389 _LT_DECL([], [archiver_list_spec], [1],
1390 [How to feed a file listing to the archiver])
1391 ])# _LT_PROG_AR
1392
1393
1394 # _LT_CMD_OLD_ARCHIVE
1395 # -------------------
1396 m4_defun([_LT_CMD_OLD_ARCHIVE],
1397 [_LT_PROG_AR
1398
1399 AC_CHECK_TOOL(STRIP, strip, :)
1400 test -z "$STRIP" && STRIP=:
1401 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
1402
1403 AC_CHECK_TOOL(RANLIB, ranlib, :)
1404 test -z "$RANLIB" && RANLIB=:
1405 _LT_DECL([], [RANLIB], [1],
1406 [Commands used to install an old-style archive])
1407
1408 # Determine commands to create old-style static archives.
1409 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1410 old_postinstall_cmds='chmod 644 $oldlib'
1411 old_postuninstall_cmds=
1412
1413 if test -n "$RANLIB"; then
1414 case $host_os in
1415 openbsd*)
1416 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
1417 ;;
1418 *)
1419 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
1420 ;;
1421 esac
1422 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1423 fi
1424
1425 case $host_os in
1426 darwin*)
1427 lock_old_archive_extraction=yes ;;
1428 *)
1429 lock_old_archive_extraction=no ;;
1430 esac
1431 _LT_DECL([], [old_postinstall_cmds], [2])
1432 _LT_DECL([], [old_postuninstall_cmds], [2])
1433 _LT_TAGDECL([], [old_archive_cmds], [2],
1434 [Commands used to build an old-style archive])
1435 _LT_DECL([], [lock_old_archive_extraction], [0],
1436 [Whether to use a lock for old archive extraction])
1437 ])# _LT_CMD_OLD_ARCHIVE
1438
1439
1440 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1441 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1442 # ----------------------------------------------------------------
1443 # Check whether the given compiler option works
1444 AC_DEFUN([_LT_COMPILER_OPTION],
1445 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1446 m4_require([_LT_DECL_SED])dnl
1447 AC_CACHE_CHECK([$1], [$2],
1448 [$2=no
1449 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1450 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1451 lt_compiler_flag="$3"
1452 # Insert the option either (1) after the last *FLAGS variable, or
1453 # (2) before a word containing "conftest.", or (3) at the end.
1454 # Note that $ac_compile itself does not contain backslashes and begins
1455 # with a dollar sign (not a hyphen), so the echo should work correctly.
1456 # The option is referenced via a variable to avoid confusing sed.
1457 lt_compile=`echo "$ac_compile" | $SED \
1458 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1459 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1460 -e 's:$: $lt_compiler_flag:'`
1461 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1462 (eval "$lt_compile" 2>conftest.err)
1463 ac_status=$?
1464 cat conftest.err >&AS_MESSAGE_LOG_FD
1465 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1466 if (exit $ac_status) && test -s "$ac_outfile"; then
1467 # The compiler can only warn and ignore the option if not recognized
1468 # So say no if there are warnings other than the usual output.
1469 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
1470 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1471 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1472 $2=yes
1473 fi
1474 fi
1475 $RM conftest*
1476 ])
1477
1478 if test x"[$]$2" = xyes; then
1479 m4_if([$5], , :, [$5])
1480 else
1481 m4_if([$6], , :, [$6])
1482 fi
1483 ])# _LT_COMPILER_OPTION
1484
1485 # Old name:
1486 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
1487 dnl aclocal-1.4 backwards compatibility:
1488 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
1489
1490
1491 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1492 # [ACTION-SUCCESS], [ACTION-FAILURE])
1493 # ----------------------------------------------------
1494 # Check whether the given linker option works
1495 AC_DEFUN([_LT_LINKER_OPTION],
1496 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1497 m4_require([_LT_DECL_SED])dnl
1498 AC_CACHE_CHECK([$1], [$2],
1499 [$2=no
1500 save_LDFLAGS="$LDFLAGS"
1501 LDFLAGS="$LDFLAGS $3"
1502 echo "$lt_simple_link_test_code" > conftest.$ac_ext
1503 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1504 # The linker can only warn and ignore the option if not recognized
1505 # So say no if there are warnings
1506 if test -s conftest.err; then
1507 # Append any errors to the config.log.
1508 cat conftest.err 1>&AS_MESSAGE_LOG_FD
1509 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
1510 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1511 if diff conftest.exp conftest.er2 >/dev/null; then
1512 $2=yes
1513 fi
1514 else
1515 $2=yes
1516 fi
1517 fi
1518 $RM -r conftest*
1519 LDFLAGS="$save_LDFLAGS"
1520 ])
1521
1522 if test x"[$]$2" = xyes; then
1523 m4_if([$4], , :, [$4])
1524 else
1525 m4_if([$5], , :, [$5])
1526 fi
1527 ])# _LT_LINKER_OPTION
1528
1529 # Old name:
1530 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
1531 dnl aclocal-1.4 backwards compatibility:
1532 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
1533
1534
1535 # LT_CMD_MAX_LEN
1536 #---------------
1537 AC_DEFUN([LT_CMD_MAX_LEN],
1538 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1539 # find the maximum length of command line arguments
1540 AC_MSG_CHECKING([the maximum length of command line arguments])
1541 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1542 i=0
1543 teststring="ABCD"
1544
1545 case $build_os in
1546 msdosdjgpp*)
1547 # On DJGPP, this test can blow up pretty badly due to problems in libc
1548 # (any single argument exceeding 2000 bytes causes a buffer overrun
1549 # during glob expansion). Even if it were fixed, the result of this
1550 # check would be larger than it should be.
1551 lt_cv_sys_max_cmd_len=12288; # 12K is about right
1552 ;;
1553
1554 gnu*)
1555 # Under GNU Hurd, this test is not required because there is
1556 # no limit to the length of command line arguments.
1557 # Libtool will interpret -1 as no limit whatsoever
1558 lt_cv_sys_max_cmd_len=-1;
1559 ;;
1560
1561 cygwin* | mingw* | cegcc*)
1562 # On Win9x/ME, this test blows up -- it succeeds, but takes
1563 # about 5 minutes as the teststring grows exponentially.
1564 # Worse, since 9x/ME are not pre-emptively multitasking,
1565 # you end up with a "frozen" computer, even though with patience
1566 # the test eventually succeeds (with a max line length of 256k).
1567 # Instead, let's just punt: use the minimum linelength reported by
1568 # all of the supported platforms: 8192 (on NT/2K/XP).
1569 lt_cv_sys_max_cmd_len=8192;
1570 ;;
1571
1572 mint*)
1573 # On MiNT this can take a long time and run out of memory.
1574 lt_cv_sys_max_cmd_len=8192;
1575 ;;
1576
1577 amigaos*)
1578 # On AmigaOS with pdksh, this test takes hours, literally.
1579 # So we just punt and use a minimum line length of 8192.
1580 lt_cv_sys_max_cmd_len=8192;
1581 ;;
1582
1583 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
1584 # This has been around since 386BSD, at least. Likely further.
1585 if test -x /sbin/sysctl; then
1586 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1587 elif test -x /usr/sbin/sysctl; then
1588 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1589 else
1590 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
1591 fi
1592 # And add a safety zone
1593 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1594 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1595 ;;
1596
1597 interix*)
1598 # We know the value 262144 and hardcode it with a safety zone (like BSD)
1599 lt_cv_sys_max_cmd_len=196608
1600 ;;
1601
1602 osf*)
1603 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1604 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1605 # nice to cause kernel panics so lets avoid the loop below.
1606 # First set a reasonable default.
1607 lt_cv_sys_max_cmd_len=16384
1608 #
1609 if test -x /sbin/sysconfig; then
1610 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1611 *1*) lt_cv_sys_max_cmd_len=-1 ;;
1612 esac
1613 fi
1614 ;;
1615 sco3.2v5*)
1616 lt_cv_sys_max_cmd_len=102400
1617 ;;
1618 sysv5* | sco5v6* | sysv4.2uw2*)
1619 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1620 if test -n "$kargmax"; then
1621 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
1622 else
1623 lt_cv_sys_max_cmd_len=32768
1624 fi
1625 ;;
1626 *)
1627 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
1628 if test -n "$lt_cv_sys_max_cmd_len"; then
1629 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1630 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1631 else
1632 # Make teststring a little bigger before we do anything with it.
1633 # a 1K string should be a reasonable start.
1634 for i in 1 2 3 4 5 6 7 8 ; do
1635 teststring=$teststring$teststring
1636 done
1637 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1638 # If test is not a shell built-in, we'll probably end up computing a
1639 # maximum length that is only half of the actual maximum length, but
1640 # we can't tell.
1641 while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
1642 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
1643 test $i != 17 # 1/2 MB should be enough
1644 do
1645 i=`expr $i + 1`
1646 teststring=$teststring$teststring
1647 done
1648 # Only check the string length outside the loop.
1649 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1650 teststring=
1651 # Add a significant safety factor because C++ compilers can tack on
1652 # massive amounts of additional arguments before passing them to the
1653 # linker. It appears as though 1/2 is a usable value.
1654 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1655 fi
1656 ;;
1657 esac
1658 ])
1659 if test -n $lt_cv_sys_max_cmd_len ; then
1660 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1661 else
1662 AC_MSG_RESULT(none)
1663 fi
1664 max_cmd_len=$lt_cv_sys_max_cmd_len
1665 _LT_DECL([], [max_cmd_len], [0],
1666 [What is the maximum length of a command?])
1667 ])# LT_CMD_MAX_LEN
1668
1669 # Old name:
1670 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
1671 dnl aclocal-1.4 backwards compatibility:
1672 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
1673
1674
1675 # _LT_HEADER_DLFCN
1676 # ----------------
1677 m4_defun([_LT_HEADER_DLFCN],
1678 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
1679 ])# _LT_HEADER_DLFCN
1680
1681
1682 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1683 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1684 # ----------------------------------------------------------------
1685 m4_defun([_LT_TRY_DLOPEN_SELF],
1686 [m4_require([_LT_HEADER_DLFCN])dnl
1687 if test "$cross_compiling" = yes; then :
1688 [$4]
1689 else
1690 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1691 lt_status=$lt_dlunknown
1692 cat > conftest.$ac_ext <<_LT_EOF
1693 [#line $LINENO "configure"
1694 #include "confdefs.h"
1695
1696 #if HAVE_DLFCN_H
1697 #include <dlfcn.h>
1698 #endif
1699
1700 #include <stdio.h>
1701
1702 #ifdef RTLD_GLOBAL
1703 # define LT_DLGLOBAL RTLD_GLOBAL
1704 #else
1705 # ifdef DL_GLOBAL
1706 # define LT_DLGLOBAL DL_GLOBAL
1707 # else
1708 # define LT_DLGLOBAL 0
1709 # endif
1710 #endif
1711
1712 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1713 find out it does not work in some platform. */
1714 #ifndef LT_DLLAZY_OR_NOW
1715 # ifdef RTLD_LAZY
1716 # define LT_DLLAZY_OR_NOW RTLD_LAZY
1717 # else
1718 # ifdef DL_LAZY
1719 # define LT_DLLAZY_OR_NOW DL_LAZY
1720 # else
1721 # ifdef RTLD_NOW
1722 # define LT_DLLAZY_OR_NOW RTLD_NOW
1723 # else
1724 # ifdef DL_NOW
1725 # define LT_DLLAZY_OR_NOW DL_NOW
1726 # else
1727 # define LT_DLLAZY_OR_NOW 0
1728 # endif
1729 # endif
1730 # endif
1731 # endif
1732 #endif
1733
1734 /* When -fvisbility=hidden is used, assume the code has been annotated
1735 correspondingly for the symbols needed. */
1736 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
1737 int fnord () __attribute__((visibility("default")));
1738 #endif
1739
1740 int fnord () { return 42; }
1741 int main ()
1742 {
1743 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1744 int status = $lt_dlunknown;
1745
1746 if (self)
1747 {
1748 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1749 else
1750 {
1751 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1752 else puts (dlerror ());
1753 }
1754 /* dlclose (self); */
1755 }
1756 else
1757 puts (dlerror ());
1758
1759 return status;
1760 }]
1761 _LT_EOF
1762 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1763 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1764 lt_status=$?
1765 case x$lt_status in
1766 x$lt_dlno_uscore) $1 ;;
1767 x$lt_dlneed_uscore) $2 ;;
1768 x$lt_dlunknown|x*) $3 ;;
1769 esac
1770 else :
1771 # compilation failed
1772 $3
1773 fi
1774 fi
1775 rm -fr conftest*
1776 ])# _LT_TRY_DLOPEN_SELF
1777
1778
1779 # LT_SYS_DLOPEN_SELF
1780 # ------------------
1781 AC_DEFUN([LT_SYS_DLOPEN_SELF],
1782 [m4_require([_LT_HEADER_DLFCN])dnl
1783 if test "x$enable_dlopen" != xyes; then
1784 enable_dlopen=unknown
1785 enable_dlopen_self=unknown
1786 enable_dlopen_self_static=unknown
1787 else
1788 lt_cv_dlopen=no
1789 lt_cv_dlopen_libs=
1790
1791 case $host_os in
1792 beos*)
1793 lt_cv_dlopen="load_add_on"
1794 lt_cv_dlopen_libs=
1795 lt_cv_dlopen_self=yes
1796 ;;
1797
1798 mingw* | pw32* | cegcc*)
1799 lt_cv_dlopen="LoadLibrary"
1800 lt_cv_dlopen_libs=
1801 ;;
1802
1803 cygwin*)
1804 lt_cv_dlopen="dlopen"
1805 lt_cv_dlopen_libs=
1806 ;;
1807
1808 darwin*)
1809 # if libdl is installed we need to link against it
1810 AC_CHECK_LIB([dl], [dlopen],
1811 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1812 lt_cv_dlopen="dyld"
1813 lt_cv_dlopen_libs=
1814 lt_cv_dlopen_self=yes
1815 ])
1816 ;;
1817
1818 *)
1819 AC_CHECK_FUNC([shl_load],
1820 [lt_cv_dlopen="shl_load"],
1821 [AC_CHECK_LIB([dld], [shl_load],
1822 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
1823 [AC_CHECK_FUNC([dlopen],
1824 [lt_cv_dlopen="dlopen"],
1825 [AC_CHECK_LIB([dl], [dlopen],
1826 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1827 [AC_CHECK_LIB([svld], [dlopen],
1828 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1829 [AC_CHECK_LIB([dld], [dld_link],
1830 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
1831 ])
1832 ])
1833 ])
1834 ])
1835 ])
1836 ;;
1837 esac
1838
1839 if test "x$lt_cv_dlopen" != xno; then
1840 enable_dlopen=yes
1841 else
1842 enable_dlopen=no
1843 fi
1844
1845 case $lt_cv_dlopen in
1846 dlopen)
1847 save_CPPFLAGS="$CPPFLAGS"
1848 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1849
1850 save_LDFLAGS="$LDFLAGS"
1851 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1852
1853 save_LIBS="$LIBS"
1854 LIBS="$lt_cv_dlopen_libs $LIBS"
1855
1856 AC_CACHE_CHECK([whether a program can dlopen itself],
1857 lt_cv_dlopen_self, [dnl
1858 _LT_TRY_DLOPEN_SELF(
1859 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1860 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1861 ])
1862
1863 if test "x$lt_cv_dlopen_self" = xyes; then
1864 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
1865 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1866 lt_cv_dlopen_self_static, [dnl
1867 _LT_TRY_DLOPEN_SELF(
1868 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1869 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1870 ])
1871 fi
1872
1873 CPPFLAGS="$save_CPPFLAGS"
1874 LDFLAGS="$save_LDFLAGS"
1875 LIBS="$save_LIBS"
1876 ;;
1877 esac
1878
1879 case $lt_cv_dlopen_self in
1880 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1881 *) enable_dlopen_self=unknown ;;
1882 esac
1883
1884 case $lt_cv_dlopen_self_static in
1885 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1886 *) enable_dlopen_self_static=unknown ;;
1887 esac
1888 fi
1889 _LT_DECL([dlopen_support], [enable_dlopen], [0],
1890 [Whether dlopen is supported])
1891 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
1892 [Whether dlopen of programs is supported])
1893 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
1894 [Whether dlopen of statically linked programs is supported])
1895 ])# LT_SYS_DLOPEN_SELF
1896
1897 # Old name:
1898 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
1899 dnl aclocal-1.4 backwards compatibility:
1900 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
1901
1902
1903 # _LT_COMPILER_C_O([TAGNAME])
1904 # ---------------------------
1905 # Check to see if options -c and -o are simultaneously supported by compiler.
1906 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
1907 m4_defun([_LT_COMPILER_C_O],
1908 [m4_require([_LT_DECL_SED])dnl
1909 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1910 m4_require([_LT_TAG_COMPILER])dnl
1911 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1912 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1913 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1914 $RM -r conftest 2>/dev/null
1915 mkdir conftest
1916 cd conftest
1917 mkdir out
1918 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1919
1920 lt_compiler_flag="-o out/conftest2.$ac_objext"
1921 # Insert the option either (1) after the last *FLAGS variable, or
1922 # (2) before a word containing "conftest.", or (3) at the end.
1923 # Note that $ac_compile itself does not contain backslashes and begins
1924 # with a dollar sign (not a hyphen), so the echo should work correctly.
1925 lt_compile=`echo "$ac_compile" | $SED \
1926 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1927 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1928 -e 's:$: $lt_compiler_flag:'`
1929 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1930 (eval "$lt_compile" 2>out/conftest.err)
1931 ac_status=$?
1932 cat out/conftest.err >&AS_MESSAGE_LOG_FD
1933 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1934 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1935 then
1936 # The compiler can only warn and ignore the option if not recognized
1937 # So say no if there are warnings
1938 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
1939 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
1940 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1941 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1942 fi
1943 fi
1944 chmod u+w . 2>&AS_MESSAGE_LOG_FD
1945 $RM conftest*
1946 # SGI C++ compiler will create directory out/ii_files/ for
1947 # template instantiation
1948 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
1949 $RM out/* && rmdir out
1950 cd ..
1951 $RM -r conftest
1952 $RM conftest*
1953 ])
1954 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
1955 [Does compiler simultaneously support -c and -o options?])
1956 ])# _LT_COMPILER_C_O
1957
1958
1959 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
1960 # ----------------------------------
1961 # Check to see if we can do hard links to lock some files if needed
1962 m4_defun([_LT_COMPILER_FILE_LOCKS],
1963 [m4_require([_LT_ENABLE_LOCK])dnl
1964 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1965 _LT_COMPILER_C_O([$1])
1966
1967 hard_links="nottested"
1968 if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1969 # do not overwrite the value of need_locks provided by the user
1970 AC_MSG_CHECKING([if we can lock with hard links])
1971 hard_links=yes
1972 $RM conftest*
1973 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1974 touch conftest.a
1975 ln conftest.a conftest.b 2>&5 || hard_links=no
1976 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1977 AC_MSG_RESULT([$hard_links])
1978 if test "$hard_links" = no; then
1979 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1980 need_locks=warn
1981 fi
1982 else
1983 need_locks=no
1984 fi
1985 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
1986 ])# _LT_COMPILER_FILE_LOCKS
1987
1988
1989 # _LT_CHECK_OBJDIR
1990 # ----------------
1991 m4_defun([_LT_CHECK_OBJDIR],
1992 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1993 [rm -f .libs 2>/dev/null
1994 mkdir .libs 2>/dev/null
1995 if test -d .libs; then
1996 lt_cv_objdir=.libs
1997 else
1998 # MS-DOS does not allow filenames that begin with a dot.
1999 lt_cv_objdir=_libs
2000 fi
2001 rmdir .libs 2>/dev/null])
2002 objdir=$lt_cv_objdir
2003 _LT_DECL([], [objdir], [0],
2004 [The name of the directory that contains temporary libtool files])dnl
2005 m4_pattern_allow([LT_OBJDIR])dnl
2006 AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
2007 [Define to the sub-directory in which libtool stores uninstalled libraries.])
2008 ])# _LT_CHECK_OBJDIR
2009
2010
2011 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
2012 # --------------------------------------
2013 # Check hardcoding attributes.
2014 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
2015 [AC_MSG_CHECKING([how to hardcode library paths into programs])
2016 _LT_TAGVAR(hardcode_action, $1)=
2017 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
2018 test -n "$_LT_TAGVAR(runpath_var, $1)" ||
2019 test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2020
2021 # We can hardcode non-existent directories.
2022 if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
2023 # If the only mechanism to avoid hardcoding is shlibpath_var, we
2024 # have to relink, otherwise we might link with an installed library
2025 # when we should be linking with a yet-to-be-installed one
2026 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2027 test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
2028 # Linking always hardcodes the temporary library directory.
2029 _LT_TAGVAR(hardcode_action, $1)=relink
2030 else
2031 # We can link without hardcoding, and we can hardcode nonexisting dirs.
2032 _LT_TAGVAR(hardcode_action, $1)=immediate
2033 fi
2034 else
2035 # We cannot hardcode anything, or else we can only hardcode existing
2036 # directories.
2037 _LT_TAGVAR(hardcode_action, $1)=unsupported
2038 fi
2039 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
2040
2041 if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
2042 test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
2043 # Fast installation is not supported
2044 enable_fast_install=no
2045 elif test "$shlibpath_overrides_runpath" = yes ||
2046 test "$enable_shared" = no; then
2047 # Fast installation is not necessary
2048 enable_fast_install=needless
2049 fi
2050 _LT_TAGDECL([], [hardcode_action], [0],
2051 [How to hardcode a shared library path into an executable])
2052 ])# _LT_LINKER_HARDCODE_LIBPATH
2053
2054
2055 # _LT_CMD_STRIPLIB
2056 # ----------------
2057 m4_defun([_LT_CMD_STRIPLIB],
2058 [m4_require([_LT_DECL_EGREP])
2059 striplib=
2060 old_striplib=
2061 AC_MSG_CHECKING([whether stripping libraries is possible])
2062 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2063 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2064 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2065 AC_MSG_RESULT([yes])
2066 else
2067 # FIXME - insert some real tests, host_os isn't really good enough
2068 case $host_os in
2069 darwin*)
2070 if test -n "$STRIP" ; then
2071 striplib="$STRIP -x"
2072 old_striplib="$STRIP -S"
2073 AC_MSG_RESULT([yes])
2074 else
2075 AC_MSG_RESULT([no])
2076 fi
2077 ;;
2078 *)
2079 AC_MSG_RESULT([no])
2080 ;;
2081 esac
2082 fi
2083 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2084 _LT_DECL([], [striplib], [1])
2085 ])# _LT_CMD_STRIPLIB
2086
2087
2088 # _LT_SYS_DYNAMIC_LINKER([TAG])
2089 # -----------------------------
2090 # PORTME Fill in your ld.so characteristics
2091 m4_defun([_LT_SYS_DYNAMIC_LINKER],
2092 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2093 m4_require([_LT_DECL_EGREP])dnl
2094 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2095 m4_require([_LT_DECL_OBJDUMP])dnl
2096 m4_require([_LT_DECL_SED])dnl
2097 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
2098 AC_MSG_CHECKING([dynamic linker characteristics])
2099 m4_if([$1],
2100 [], [
2101 if test "$GCC" = yes; then
2102 case $host_os in
2103 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2104 *) lt_awk_arg="/^libraries:/" ;;
2105 esac
2106 case $host_os in
2107 mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
2108 *) lt_sed_strip_eq="s,=/,/,g" ;;
2109 esac
2110 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
2111 case $lt_search_path_spec in
2112 *\;*)
2113 # if the path contains ";" then we assume it to be the separator
2114 # otherwise default to the standard path separator (i.e. ":") - it is
2115 # assumed that no part of a normal pathname contains ";" but that should
2116 # okay in the real world where ";" in dirpaths is itself problematic.
2117 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
2118 ;;
2119 *)
2120 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
2121 ;;
2122 esac
2123 # Ok, now we have the path, separated by spaces, we can step through it
2124 # and add multilib dir if necessary.
2125 lt_tmp_lt_search_path_spec=
2126 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2127 for lt_sys_path in $lt_search_path_spec; do
2128 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
2129 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
2130 else
2131 test -d "$lt_sys_path" && \
2132 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2133 fi
2134 done
2135 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
2136 BEGIN {RS=" "; FS="/|\n";} {
2137 lt_foo="";
2138 lt_count=0;
2139 for (lt_i = NF; lt_i > 0; lt_i--) {
2140 if ($lt_i != "" && $lt_i != ".") {
2141 if ($lt_i == "..") {
2142 lt_count++;
2143 } else {
2144 if (lt_count == 0) {
2145 lt_foo="/" $lt_i lt_foo;
2146 } else {
2147 lt_count--;
2148 }
2149 }
2150 }
2151 }
2152 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2153 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2154 }'`
2155 # AWK program above erroneously prepends '/' to C:/dos/paths
2156 # for these hosts.
2157 case $host_os in
2158 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
2159 $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
2160 esac
2161 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
2162 else
2163 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2164 fi])
2165 library_names_spec=
2166 libname_spec='lib$name'
2167 soname_spec=
2168 shrext_cmds=".so"
2169 postinstall_cmds=
2170 postuninstall_cmds=
2171 finish_cmds=
2172 finish_eval=
2173 shlibpath_var=
2174 shlibpath_overrides_runpath=unknown
2175 version_type=none
2176 dynamic_linker="$host_os ld.so"
2177 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2178 need_lib_prefix=unknown
2179 hardcode_into_libs=no
2180
2181 # when you set need_version to no, make sure it does not cause -set_version
2182 # flags to be left without arguments
2183 need_version=unknown
2184
2185 case $host_os in
2186 aix3*)
2187 version_type=linux
2188 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2189 shlibpath_var=LIBPATH
2190
2191 # AIX 3 has no versioning support, so we append a major version to the name.
2192 soname_spec='${libname}${release}${shared_ext}$major'
2193 ;;
2194
2195 aix[[4-9]]*)
2196 version_type=linux
2197 need_lib_prefix=no
2198 need_version=no
2199 hardcode_into_libs=yes
2200 if test "$host_cpu" = ia64; then
2201 # AIX 5 supports IA64
2202 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2203 shlibpath_var=LD_LIBRARY_PATH
2204 else
2205 # With GCC up to 2.95.x, collect2 would create an import file
2206 # for dependence libraries. The import file would start with
2207 # the line `#! .'. This would cause the generated library to
2208 # depend on `.', always an invalid library. This was fixed in
2209 # development snapshots of GCC prior to 3.0.
2210 case $host_os in
2211 aix4 | aix4.[[01]] | aix4.[[01]].*)
2212 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2213 echo ' yes '
2214 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
2215 :
2216 else
2217 can_build_shared=no
2218 fi
2219 ;;
2220 esac
2221 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2222 # soname into executable. Probably we can add versioning support to
2223 # collect2, so additional links can be useful in future.
2224 if test "$aix_use_runtimelinking" = yes; then
2225 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2226 # instead of lib<name>.a to let people know that these are not
2227 # typical AIX shared libraries.
2228 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2229 else
2230 # We preserve .a as extension for shared libraries through AIX4.2
2231 # and later when we are not doing run time linking.
2232 library_names_spec='${libname}${release}.a $libname.a'
2233 soname_spec='${libname}${release}${shared_ext}$major'
2234 fi
2235 shlibpath_var=LIBPATH
2236 fi
2237 ;;
2238
2239 amigaos*)
2240 case $host_cpu in
2241 powerpc)
2242 # Since July 2007 AmigaOS4 officially supports .so libraries.
2243 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2244 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2245 ;;
2246 m68k)
2247 library_names_spec='$libname.ixlibrary $libname.a'
2248 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2249 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
2250 ;;
2251 esac
2252 ;;
2253
2254 beos*)
2255 library_names_spec='${libname}${shared_ext}'
2256 dynamic_linker="$host_os ld.so"
2257 shlibpath_var=LIBRARY_PATH
2258 ;;
2259
2260 bsdi[[45]]*)
2261 version_type=linux
2262 need_version=no
2263 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2264 soname_spec='${libname}${release}${shared_ext}$major'
2265 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2266 shlibpath_var=LD_LIBRARY_PATH
2267 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2268 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2269 # the default ld.so.conf also contains /usr/contrib/lib and
2270 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2271 # libtool to hard-code these into programs
2272 ;;
2273
2274 cygwin* | mingw* | pw32* | cegcc*)
2275 version_type=windows
2276 shrext_cmds=".dll"
2277 need_version=no
2278 need_lib_prefix=no
2279
2280 case $GCC,$cc_basename in
2281 yes,*)
2282 # gcc
2283 library_names_spec='$libname.dll.a'
2284 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2285 postinstall_cmds='base_file=`basename \${file}`~
2286 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2287 dldir=$destdir/`dirname \$dlpath`~
2288 test -d \$dldir || mkdir -p \$dldir~
2289 $install_prog $dir/$dlname \$dldir/$dlname~
2290 chmod a+x \$dldir/$dlname~
2291 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2292 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2293 fi'
2294 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2295 dlpath=$dir/\$dldll~
2296 $RM \$dlpath'
2297 shlibpath_overrides_runpath=yes
2298
2299 case $host_os in
2300 cygwin*)
2301 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2302 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2303 m4_if([$1], [],[
2304 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
2305 ;;
2306 mingw* | cegcc*)
2307 # MinGW DLLs use traditional 'lib' prefix
2308 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2309 ;;
2310 pw32*)
2311 # pw32 DLLs use 'pw' prefix rather than 'lib'
2312 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2313 ;;
2314 esac
2315 dynamic_linker='Win32 ld.exe'
2316 ;;
2317
2318 *,cl*)
2319 # Native MSVC
2320 libname_spec='$name'
2321 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2322 library_names_spec='${libname}.dll.lib'
2323
2324 case $build_os in
2325 mingw*)
2326 sys_lib_search_path_spec=
2327 lt_save_ifs=$IFS
2328 IFS=';'
2329 for lt_path in $LIB
2330 do
2331 IFS=$lt_save_ifs
2332 # Let DOS variable expansion print the short 8.3 style file name.
2333 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
2334 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
2335 done
2336 IFS=$lt_save_ifs
2337 # Convert to MSYS style.
2338 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
2339 ;;
2340 cygwin*)
2341 # Convert to unix form, then to dos form, then back to unix form
2342 # but this time dos style (no spaces!) so that the unix form looks
2343 # like /cygdrive/c/PROGRA~1:/cygdr...
2344 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
2345 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
2346 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2347 ;;
2348 *)
2349 sys_lib_search_path_spec="$LIB"
2350 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2351 # It is most probably a Windows format PATH.
2352 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2353 else
2354 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2355 fi
2356 # FIXME: find the short name or the path components, as spaces are
2357 # common. (e.g. "Program Files" -> "PROGRA~1")
2358 ;;
2359 esac
2360
2361 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2362 postinstall_cmds='base_file=`basename \${file}`~
2363 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2364 dldir=$destdir/`dirname \$dlpath`~
2365 test -d \$dldir || mkdir -p \$dldir~
2366 $install_prog $dir/$dlname \$dldir/$dlname'
2367 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2368 dlpath=$dir/\$dldll~
2369 $RM \$dlpath'
2370 shlibpath_overrides_runpath=yes
2371 dynamic_linker='Win32 link.exe'
2372 ;;
2373
2374 *)
2375 # Assume MSVC wrapper
2376 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2377 dynamic_linker='Win32 ld.exe'
2378 ;;
2379 esac
2380 # FIXME: first we should search . and the directory the executable is in
2381 shlibpath_var=PATH
2382 ;;
2383
2384 darwin* | rhapsody*)
2385 dynamic_linker="$host_os dyld"
2386 version_type=darwin
2387 need_lib_prefix=no
2388 need_version=no
2389 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2390 soname_spec='${libname}${release}${major}$shared_ext'
2391 shlibpath_overrides_runpath=yes
2392 shlibpath_var=DYLD_LIBRARY_PATH
2393 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2394 m4_if([$1], [],[
2395 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2396 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2397 ;;
2398
2399 dgux*)
2400 version_type=linux
2401 need_lib_prefix=no
2402 need_version=no
2403 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2404 soname_spec='${libname}${release}${shared_ext}$major'
2405 shlibpath_var=LD_LIBRARY_PATH
2406 ;;
2407
2408 freebsd1*)
2409 dynamic_linker=no
2410 ;;
2411
2412 freebsd* | dragonfly*)
2413 # DragonFly does not have aout. When/if they implement a new
2414 # versioning mechanism, adjust this.
2415 if test -x /usr/bin/objformat; then
2416 objformat=`/usr/bin/objformat`
2417 else
2418 case $host_os in
2419 freebsd[[123]]*) objformat=aout ;;
2420 *) objformat=elf ;;
2421 esac
2422 fi
2423 version_type=freebsd-$objformat
2424 case $version_type in
2425 freebsd-elf*)
2426 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2427 need_version=no
2428 need_lib_prefix=no
2429 ;;
2430 freebsd-*)
2431 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2432 need_version=yes
2433 ;;
2434 esac
2435 shlibpath_var=LD_LIBRARY_PATH
2436 case $host_os in
2437 freebsd2*)
2438 shlibpath_overrides_runpath=yes
2439 ;;
2440 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2441 shlibpath_overrides_runpath=yes
2442 hardcode_into_libs=yes
2443 ;;
2444 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2445 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2446 shlibpath_overrides_runpath=no
2447 hardcode_into_libs=yes
2448 ;;
2449 *) # from 4.6 on, and DragonFly
2450 shlibpath_overrides_runpath=yes
2451 hardcode_into_libs=yes
2452 ;;
2453 esac
2454 ;;
2455
2456 gnu*)
2457 version_type=linux
2458 need_lib_prefix=no
2459 need_version=no
2460 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2461 soname_spec='${libname}${release}${shared_ext}$major'
2462 shlibpath_var=LD_LIBRARY_PATH
2463 hardcode_into_libs=yes
2464 ;;
2465
2466 haiku*)
2467 version_type=linux
2468 need_lib_prefix=no
2469 need_version=no
2470 dynamic_linker="$host_os runtime_loader"
2471 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2472 soname_spec='${libname}${release}${shared_ext}$major'
2473 shlibpath_var=LIBRARY_PATH
2474 shlibpath_overrides_runpath=yes
2475 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
2476 hardcode_into_libs=yes
2477 ;;
2478
2479 hpux9* | hpux10* | hpux11*)
2480 # Give a soname corresponding to the major version so that dld.sl refuses to
2481 # link against other versions.
2482 version_type=sunos
2483 need_lib_prefix=no
2484 need_version=no
2485 case $host_cpu in
2486 ia64*)
2487 shrext_cmds='.so'
2488 hardcode_into_libs=yes
2489 dynamic_linker="$host_os dld.so"
2490 shlibpath_var=LD_LIBRARY_PATH
2491 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2492 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2493 soname_spec='${libname}${release}${shared_ext}$major'
2494 if test "X$HPUX_IA64_MODE" = X32; then
2495 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2496 else
2497 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2498 fi
2499 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2500 ;;
2501 hppa*64*)
2502 shrext_cmds='.sl'
2503 hardcode_into_libs=yes
2504 dynamic_linker="$host_os dld.sl"
2505 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2506 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2507 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2508 soname_spec='${libname}${release}${shared_ext}$major'
2509 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2510 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2511 ;;
2512 *)
2513 shrext_cmds='.sl'
2514 dynamic_linker="$host_os dld.sl"
2515 shlibpath_var=SHLIB_PATH
2516 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2517 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2518 soname_spec='${libname}${release}${shared_ext}$major'
2519 ;;
2520 esac
2521 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
2522 postinstall_cmds='chmod 555 $lib'
2523 # or fails outright, so override atomically:
2524 install_override_mode=555
2525 ;;
2526
2527 interix[[3-9]]*)
2528 version_type=linux
2529 need_lib_prefix=no
2530 need_version=no
2531 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2532 soname_spec='${libname}${release}${shared_ext}$major'
2533 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2534 shlibpath_var=LD_LIBRARY_PATH
2535 shlibpath_overrides_runpath=no
2536 hardcode_into_libs=yes
2537 ;;
2538
2539 irix5* | irix6* | nonstopux*)
2540 case $host_os in
2541 nonstopux*) version_type=nonstopux ;;
2542 *)
2543 if test "$lt_cv_prog_gnu_ld" = yes; then
2544 version_type=linux
2545 else
2546 version_type=irix
2547 fi ;;
2548 esac
2549 need_lib_prefix=no
2550 need_version=no
2551 soname_spec='${libname}${release}${shared_ext}$major'
2552 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2553 case $host_os in
2554 irix5* | nonstopux*)
2555 libsuff= shlibsuff=
2556 ;;
2557 *)
2558 case $LD in # libtool.m4 will add one of these switches to LD
2559 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2560 libsuff= shlibsuff= libmagic=32-bit;;
2561 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2562 libsuff=32 shlibsuff=N32 libmagic=N32;;
2563 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2564 libsuff=64 shlibsuff=64 libmagic=64-bit;;
2565 *) libsuff= shlibsuff= libmagic=never-match;;
2566 esac
2567 ;;
2568 esac
2569 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2570 shlibpath_overrides_runpath=no
2571 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2572 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2573 hardcode_into_libs=yes
2574 ;;
2575
2576 # No shared lib support for Linux oldld, aout, or coff.
2577 linux*oldld* | linux*aout* | linux*coff*)
2578 dynamic_linker=no
2579 ;;
2580
2581 # This must be Linux ELF.
2582 linux* | k*bsd*-gnu | kopensolaris*-gnu)
2583 version_type=linux
2584 need_lib_prefix=no
2585 need_version=no
2586 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2587 soname_spec='${libname}${release}${shared_ext}$major'
2588 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2589 shlibpath_var=LD_LIBRARY_PATH
2590 shlibpath_overrides_runpath=no
2591
2592 # Some binutils ld are patched to set DT_RUNPATH
2593 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
2594 [lt_cv_shlibpath_overrides_runpath=no
2595 save_LDFLAGS=$LDFLAGS
2596 save_libdir=$libdir
2597 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
2598 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
2599 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2600 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
2601 [lt_cv_shlibpath_overrides_runpath=yes])])
2602 LDFLAGS=$save_LDFLAGS
2603 libdir=$save_libdir
2604 ])
2605 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
2606
2607 # This implies no fast_install, which is unacceptable.
2608 # Some rework will be needed to allow for fast_install
2609 # before this can be enabled.
2610 hardcode_into_libs=yes
2611
2612 # Add ABI-specific directories to the system library path.
2613 sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
2614
2615 # Append ld.so.conf contents to the search path
2616 if test -f /etc/ld.so.conf; then
2617 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
2618 sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
2619
2620 fi
2621
2622 # We used to test for /lib/ld.so.1 and disable shared libraries on
2623 # powerpc, because MkLinux only supported shared libraries with the
2624 # GNU dynamic linker. Since this was broken with cross compilers,
2625 # most powerpc-linux boxes support dynamic linking these days and
2626 # people can always --disable-shared, the test was removed, and we
2627 # assume the GNU/Linux dynamic linker is in use.
2628 dynamic_linker='GNU/Linux ld.so'
2629 ;;
2630
2631 netbsd*)
2632 version_type=sunos
2633 need_lib_prefix=no
2634 need_version=no
2635 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
2636 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2637 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2638 dynamic_linker='NetBSD (a.out) ld.so'
2639 else
2640 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2641 soname_spec='${libname}${release}${shared_ext}$major'
2642 dynamic_linker='NetBSD ld.elf_so'
2643 fi
2644 shlibpath_var=LD_LIBRARY_PATH
2645 shlibpath_overrides_runpath=yes
2646 hardcode_into_libs=yes
2647 ;;
2648
2649 newsos6)
2650 version_type=linux
2651 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2652 shlibpath_var=LD_LIBRARY_PATH
2653 shlibpath_overrides_runpath=yes
2654 ;;
2655
2656 *nto* | *qnx*)
2657 version_type=qnx
2658 need_lib_prefix=no
2659 need_version=no
2660 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2661 soname_spec='${libname}${release}${shared_ext}$major'
2662 shlibpath_var=LD_LIBRARY_PATH
2663 shlibpath_overrides_runpath=no
2664 hardcode_into_libs=yes
2665 dynamic_linker='ldqnx.so'
2666 ;;
2667
2668 openbsd*)
2669 version_type=sunos
2670 sys_lib_dlsearch_path_spec="/usr/lib"
2671 need_lib_prefix=no
2672 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
2673 case $host_os in
2674 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
2675 *) need_version=no ;;
2676 esac
2677 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2678 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2679 shlibpath_var=LD_LIBRARY_PATH
2680 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2681 case $host_os in
2682 openbsd2.[[89]] | openbsd2.[[89]].*)
2683 shlibpath_overrides_runpath=no
2684 ;;
2685 *)
2686 shlibpath_overrides_runpath=yes
2687 ;;
2688 esac
2689 else
2690 shlibpath_overrides_runpath=yes
2691 fi
2692 ;;
2693
2694 os2*)
2695 libname_spec='$name'
2696 shrext_cmds=".dll"
2697 need_lib_prefix=no
2698 library_names_spec='$libname${shared_ext} $libname.a'
2699 dynamic_linker='OS/2 ld.exe'
2700 shlibpath_var=LIBPATH
2701 ;;
2702
2703 osf3* | osf4* | osf5*)
2704 version_type=osf
2705 need_lib_prefix=no
2706 need_version=no
2707 soname_spec='${libname}${release}${shared_ext}$major'
2708 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2709 shlibpath_var=LD_LIBRARY_PATH
2710 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2711 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2712 ;;
2713
2714 rdos*)
2715 dynamic_linker=no
2716 ;;
2717
2718 solaris*)
2719 version_type=linux
2720 need_lib_prefix=no
2721 need_version=no
2722 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2723 soname_spec='${libname}${release}${shared_ext}$major'
2724 shlibpath_var=LD_LIBRARY_PATH
2725 shlibpath_overrides_runpath=yes
2726 hardcode_into_libs=yes
2727 # ldd complains unless libraries are executable
2728 postinstall_cmds='chmod +x $lib'
2729 ;;
2730
2731 sunos4*)
2732 version_type=sunos
2733 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2734 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2735 shlibpath_var=LD_LIBRARY_PATH
2736 shlibpath_overrides_runpath=yes
2737 if test "$with_gnu_ld" = yes; then
2738 need_lib_prefix=no
2739 fi
2740 need_version=yes
2741 ;;
2742
2743 sysv4 | sysv4.3*)
2744 version_type=linux
2745 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2746 soname_spec='${libname}${release}${shared_ext}$major'
2747 shlibpath_var=LD_LIBRARY_PATH
2748 case $host_vendor in
2749 sni)
2750 shlibpath_overrides_runpath=no
2751 need_lib_prefix=no
2752 runpath_var=LD_RUN_PATH
2753 ;;
2754 siemens)
2755 need_lib_prefix=no
2756 ;;
2757 motorola)
2758 need_lib_prefix=no
2759 need_version=no
2760 shlibpath_overrides_runpath=no
2761 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2762 ;;
2763 esac
2764 ;;
2765
2766 sysv4*MP*)
2767 if test -d /usr/nec ;then
2768 version_type=linux
2769 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2770 soname_spec='$libname${shared_ext}.$major'
2771 shlibpath_var=LD_LIBRARY_PATH
2772 fi
2773 ;;
2774
2775 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2776 version_type=freebsd-elf
2777 need_lib_prefix=no
2778 need_version=no
2779 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2780 soname_spec='${libname}${release}${shared_ext}$major'
2781 shlibpath_var=LD_LIBRARY_PATH
2782 shlibpath_overrides_runpath=yes
2783 hardcode_into_libs=yes
2784 if test "$with_gnu_ld" = yes; then
2785 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
2786 else
2787 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
2788 case $host_os in
2789 sco3.2v5*)
2790 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
2791 ;;
2792 esac
2793 fi
2794 sys_lib_dlsearch_path_spec='/usr/lib'
2795 ;;
2796
2797 tpf*)
2798 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
2799 version_type=linux
2800 need_lib_prefix=no
2801 need_version=no
2802 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2803 shlibpath_var=LD_LIBRARY_PATH
2804 shlibpath_overrides_runpath=no
2805 hardcode_into_libs=yes
2806 ;;
2807
2808 uts4*)
2809 version_type=linux
2810 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2811 soname_spec='${libname}${release}${shared_ext}$major'
2812 shlibpath_var=LD_LIBRARY_PATH
2813 ;;
2814
2815 *)
2816 dynamic_linker=no
2817 ;;
2818 esac
2819 AC_MSG_RESULT([$dynamic_linker])
2820 test "$dynamic_linker" = no && can_build_shared=no
2821
2822 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2823 if test "$GCC" = yes; then
2824 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2825 fi
2826
2827 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
2828 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
2829 fi
2830 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
2831 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
2832 fi
2833
2834 _LT_DECL([], [variables_saved_for_relink], [1],
2835 [Variables whose values should be saved in libtool wrapper scripts and
2836 restored at link time])
2837 _LT_DECL([], [need_lib_prefix], [0],
2838 [Do we need the "lib" prefix for modules?])
2839 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
2840 _LT_DECL([], [version_type], [0], [Library versioning type])
2841 _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
2842 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
2843 _LT_DECL([], [shlibpath_overrides_runpath], [0],
2844 [Is shlibpath searched before the hard-coded library search path?])
2845 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
2846 _LT_DECL([], [library_names_spec], [1],
2847 [[List of archive names. First name is the real one, the rest are links.
2848 The last name is the one that the linker finds with -lNAME]])
2849 _LT_DECL([], [soname_spec], [1],
2850 [[The coded name of the library, if different from the real name]])
2851 _LT_DECL([], [install_override_mode], [1],
2852 [Permission mode override for installation of shared libraries])
2853 _LT_DECL([], [postinstall_cmds], [2],
2854 [Command to use after installation of a shared archive])
2855 _LT_DECL([], [postuninstall_cmds], [2],
2856 [Command to use after uninstallation of a shared archive])
2857 _LT_DECL([], [finish_cmds], [2],
2858 [Commands used to finish a libtool library installation in a directory])
2859 _LT_DECL([], [finish_eval], [1],
2860 [[As "finish_cmds", except a single script fragment to be evaled but
2861 not shown]])
2862 _LT_DECL([], [hardcode_into_libs], [0],
2863 [Whether we should hardcode library paths into libraries])
2864 _LT_DECL([], [sys_lib_search_path_spec], [2],
2865 [Compile-time system search path for libraries])
2866 _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
2867 [Run-time system search path for libraries])
2868 ])# _LT_SYS_DYNAMIC_LINKER
2869
2870
2871 # _LT_PATH_TOOL_PREFIX(TOOL)
2872 # --------------------------
2873 # find a file program which can recognize shared library
2874 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
2875 [m4_require([_LT_DECL_EGREP])dnl
2876 AC_MSG_CHECKING([for $1])
2877 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2878 [case $MAGIC_CMD in
2879 [[\\/*] | ?:[\\/]*])
2880 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2881 ;;
2882 *)
2883 lt_save_MAGIC_CMD="$MAGIC_CMD"
2884 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2885 dnl $ac_dummy forces splitting on constant user-supplied paths.
2886 dnl POSIX.2 word splitting is done only on the output of word expansions,
2887 dnl not every word. This closes a longstanding sh security hole.
2888 ac_dummy="m4_if([$2], , $PATH, [$2])"
2889 for ac_dir in $ac_dummy; do
2890 IFS="$lt_save_ifs"
2891 test -z "$ac_dir" && ac_dir=.
2892 if test -f $ac_dir/$1; then
2893 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2894 if test -n "$file_magic_test_file"; then
2895 case $deplibs_check_method in
2896 "file_magic "*)
2897 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2898 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2899 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2900 $EGREP "$file_magic_regex" > /dev/null; then
2901 :
2902 else
2903 cat <<_LT_EOF 1>&2
2904
2905 *** Warning: the command libtool uses to detect shared libraries,
2906 *** $file_magic_cmd, produces output that libtool cannot recognize.
2907 *** The result is that libtool may fail to recognize shared libraries
2908 *** as such. This will affect the creation of libtool libraries that
2909 *** depend on shared libraries, but programs linked with such libtool
2910 *** libraries will work regardless of this problem. Nevertheless, you
2911 *** may want to report the problem to your system manager and/or to
2912 *** bug-libtool@gnu.org
2913
2914 _LT_EOF
2915 fi ;;
2916 esac
2917 fi
2918 break
2919 fi
2920 done
2921 IFS="$lt_save_ifs"
2922 MAGIC_CMD="$lt_save_MAGIC_CMD"
2923 ;;
2924 esac])
2925 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2926 if test -n "$MAGIC_CMD"; then
2927 AC_MSG_RESULT($MAGIC_CMD)
2928 else
2929 AC_MSG_RESULT(no)
2930 fi
2931 _LT_DECL([], [MAGIC_CMD], [0],
2932 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
2933 ])# _LT_PATH_TOOL_PREFIX
2934
2935 # Old name:
2936 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
2937 dnl aclocal-1.4 backwards compatibility:
2938 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
2939
2940
2941 # _LT_PATH_MAGIC
2942 # --------------
2943 # find a file program which can recognize a shared library
2944 m4_defun([_LT_PATH_MAGIC],
2945 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2946 if test -z "$lt_cv_path_MAGIC_CMD"; then
2947 if test -n "$ac_tool_prefix"; then
2948 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2949 else
2950 MAGIC_CMD=:
2951 fi
2952 fi
2953 ])# _LT_PATH_MAGIC
2954
2955
2956 # LT_PATH_LD
2957 # ----------
2958 # find the pathname to the GNU or non-GNU linker
2959 AC_DEFUN([LT_PATH_LD],
2960 [AC_REQUIRE([AC_PROG_CC])dnl
2961 AC_REQUIRE([AC_CANONICAL_HOST])dnl
2962 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2963 m4_require([_LT_DECL_SED])dnl
2964 m4_require([_LT_DECL_EGREP])dnl
2965 m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
2966
2967 AC_ARG_WITH([gnu-ld],
2968 [AS_HELP_STRING([--with-gnu-ld],
2969 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
2970 [test "$withval" = no || with_gnu_ld=yes],
2971 [with_gnu_ld=no])dnl
2972
2973 ac_prog=ld
2974 if test "$GCC" = yes; then
2975 # Check if gcc -print-prog-name=ld gives a path.
2976 AC_MSG_CHECKING([for ld used by $CC])
2977 case $host in
2978 *-*-mingw*)
2979 # gcc leaves a trailing carriage return which upsets mingw
2980 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2981 *)
2982 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2983 esac
2984 case $ac_prog in
2985 # Accept absolute paths.
2986 [[\\/]]* | ?:[[\\/]]*)
2987 re_direlt='/[[^/]][[^/]]*/\.\./'
2988 # Canonicalize the pathname of ld
2989 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
2990 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
2991 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
2992 done
2993 test -z "$LD" && LD="$ac_prog"
2994 ;;
2995 "")
2996 # If it fails, then pretend we aren't using GCC.
2997 ac_prog=ld
2998 ;;
2999 *)
3000 # If it is relative, then search for the first ld in PATH.
3001 with_gnu_ld=unknown
3002 ;;
3003 esac
3004 elif test "$with_gnu_ld" = yes; then
3005 AC_MSG_CHECKING([for GNU ld])
3006 else
3007 AC_MSG_CHECKING([for non-GNU ld])
3008 fi
3009 AC_CACHE_VAL(lt_cv_path_LD,
3010 [if test -z "$LD"; then
3011 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3012 for ac_dir in $PATH; do
3013 IFS="$lt_save_ifs"
3014 test -z "$ac_dir" && ac_dir=.
3015 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3016 lt_cv_path_LD="$ac_dir/$ac_prog"
3017 # Check to see if the program is GNU ld. I'd rather use --version,
3018 # but apparently some variants of GNU ld only accept -v.
3019 # Break only if it was the GNU/non-GNU ld that we prefer.
3020 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3021 *GNU* | *'with BFD'*)
3022 test "$with_gnu_ld" != no && break
3023 ;;
3024 *)
3025 test "$with_gnu_ld" != yes && break
3026 ;;
3027 esac
3028 fi
3029 done
3030 IFS="$lt_save_ifs"
3031 else
3032 lt_cv_path_LD="$LD" # Let the user override the test with a path.
3033 fi])
3034 LD="$lt_cv_path_LD"
3035 if test -n "$LD"; then
3036 AC_MSG_RESULT($LD)
3037 else
3038 AC_MSG_RESULT(no)
3039 fi
3040 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3041 _LT_PATH_LD_GNU
3042 AC_SUBST([LD])
3043
3044 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
3045 ])# LT_PATH_LD
3046
3047 # Old names:
3048 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
3049 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
3050 dnl aclocal-1.4 backwards compatibility:
3051 dnl AC_DEFUN([AM_PROG_LD], [])
3052 dnl AC_DEFUN([AC_PROG_LD], [])
3053
3054
3055 # _LT_PATH_LD_GNU
3056 #- --------------
3057 m4_defun([_LT_PATH_LD_GNU],
3058 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3059 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
3060 case `$LD -v 2>&1 </dev/null` in
3061 *GNU* | *'with BFD'*)
3062 lt_cv_prog_gnu_ld=yes
3063 ;;
3064 *)
3065 lt_cv_prog_gnu_ld=no
3066 ;;
3067 esac])
3068 with_gnu_ld=$lt_cv_prog_gnu_ld
3069 ])# _LT_PATH_LD_GNU
3070
3071
3072 # _LT_CMD_RELOAD
3073 # --------------
3074 # find reload flag for linker
3075 # -- PORTME Some linkers may need a different reload flag.
3076 m4_defun([_LT_CMD_RELOAD],
3077 [AC_CACHE_CHECK([for $LD option to reload object files],
3078 lt_cv_ld_reload_flag,
3079 [lt_cv_ld_reload_flag='-r'])
3080 reload_flag=$lt_cv_ld_reload_flag
3081 case $reload_flag in
3082 "" | " "*) ;;
3083 *) reload_flag=" $reload_flag" ;;
3084 esac
3085 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3086 case $host_os in
3087 cygwin* | mingw* | pw32* | cegcc*)
3088 if test "$GCC" != yes; then
3089 reload_cmds=false
3090 fi
3091 ;;
3092 darwin*)
3093 if test "$GCC" = yes; then
3094 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
3095 else
3096 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3097 fi
3098 ;;
3099 esac
3100 _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
3101 _LT_TAGDECL([], [reload_cmds], [2])dnl
3102 ])# _LT_CMD_RELOAD
3103
3104
3105 # _LT_CHECK_MAGIC_METHOD
3106 # ----------------------
3107 # how to check for library dependencies
3108 # -- PORTME fill in with the dynamic library characteristics
3109 m4_defun([_LT_CHECK_MAGIC_METHOD],
3110 [m4_require([_LT_DECL_EGREP])
3111 m4_require([_LT_DECL_OBJDUMP])
3112 AC_CACHE_CHECK([how to recognize dependent libraries],
3113 lt_cv_deplibs_check_method,
3114 [lt_cv_file_magic_cmd='$MAGIC_CMD'
3115 lt_cv_file_magic_test_file=
3116 lt_cv_deplibs_check_method='unknown'
3117 # Need to set the preceding variable on all platforms that support
3118 # interlibrary dependencies.
3119 # 'none' -- dependencies not supported.
3120 # `unknown' -- same as none, but documents that we really don't know.
3121 # 'pass_all' -- all dependencies passed with no checks.
3122 # 'test_compile' -- check by making test program.
3123 # 'file_magic [[regex]]' -- check by looking for files in library path
3124 # which responds to the $file_magic_cmd with a given extended regex.
3125 # If you have `file' or equivalent on your system and you're not sure
3126 # whether `pass_all' will *always* work, you probably want this one.
3127
3128 case $host_os in
3129 aix[[4-9]]*)
3130 lt_cv_deplibs_check_method=pass_all
3131 ;;
3132
3133 beos*)
3134 lt_cv_deplibs_check_method=pass_all
3135 ;;
3136
3137 bsdi[[45]]*)
3138 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3139 lt_cv_file_magic_cmd='/usr/bin/file -L'
3140 lt_cv_file_magic_test_file=/shlib/libc.so
3141 ;;
3142
3143 cygwin*)
3144 # func_win32_libid is a shell function defined in ltmain.sh
3145 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3146 lt_cv_file_magic_cmd='func_win32_libid'
3147 ;;
3148
3149 mingw* | pw32*)
3150 # Base MSYS/MinGW do not provide the 'file' command needed by
3151 # func_win32_libid shell function, so use a weaker test based on 'objdump',
3152 # unless we find 'file', for example because we are cross-compiling.
3153 # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
3154 if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
3155 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3156 lt_cv_file_magic_cmd='func_win32_libid'
3157 else
3158 # Keep this pattern in sync with the one in func_win32_libid.
3159 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
3160 lt_cv_file_magic_cmd='$OBJDUMP -f'
3161 fi
3162 ;;
3163
3164 cegcc*)
3165 # use the weaker test based on 'objdump'. See mingw*.
3166 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3167 lt_cv_file_magic_cmd='$OBJDUMP -f'
3168 ;;
3169
3170 darwin* | rhapsody*)
3171 lt_cv_deplibs_check_method=pass_all
3172 ;;
3173
3174 freebsd* | dragonfly*)
3175 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3176 case $host_cpu in
3177 i*86 )
3178 # Not sure whether the presence of OpenBSD here was a mistake.
3179 # Let's accept both of them until this is cleared up.
3180 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3181 lt_cv_file_magic_cmd=/usr/bin/file
3182 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3183 ;;
3184 esac
3185 else
3186 lt_cv_deplibs_check_method=pass_all
3187 fi
3188 ;;
3189
3190 gnu*)
3191 lt_cv_deplibs_check_method=pass_all
3192 ;;
3193
3194 haiku*)
3195 lt_cv_deplibs_check_method=pass_all
3196 ;;
3197
3198 hpux10.20* | hpux11*)
3199 lt_cv_file_magic_cmd=/usr/bin/file
3200 case $host_cpu in
3201 ia64*)
3202 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3203 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3204 ;;
3205 hppa*64*)
3206 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
3207 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3208 ;;
3209 *)
3210 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
3211 lt_cv_file_magic_test_file=/usr/lib/libc.sl
3212 ;;
3213 esac
3214 ;;
3215
3216 interix[[3-9]]*)
3217 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3218 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3219 ;;
3220
3221 irix5* | irix6* | nonstopux*)
3222 case $LD in
3223 *-32|*"-32 ") libmagic=32-bit;;
3224 *-n32|*"-n32 ") libmagic=N32;;
3225 *-64|*"-64 ") libmagic=64-bit;;
3226 *) libmagic=never-match;;
3227 esac
3228 lt_cv_deplibs_check_method=pass_all
3229 ;;
3230
3231 # This must be Linux ELF.
3232 linux* | k*bsd*-gnu | kopensolaris*-gnu)
3233 lt_cv_deplibs_check_method=pass_all
3234 ;;
3235
3236 netbsd*)
3237 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3238 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3239 else
3240 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3241 fi
3242 ;;
3243
3244 newos6*)
3245 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3246 lt_cv_file_magic_cmd=/usr/bin/file
3247 lt_cv_file_magic_test_file=/usr/lib/libnls.so
3248 ;;
3249
3250 *nto* | *qnx*)
3251 lt_cv_deplibs_check_method=pass_all
3252 ;;
3253
3254 openbsd*)
3255 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3256 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3257 else
3258 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3259 fi
3260 ;;
3261
3262 osf3* | osf4* | osf5*)
3263 lt_cv_deplibs_check_method=pass_all
3264 ;;
3265
3266 rdos*)
3267 lt_cv_deplibs_check_method=pass_all
3268 ;;
3269
3270 solaris*)
3271 lt_cv_deplibs_check_method=pass_all
3272 ;;
3273
3274 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3275 lt_cv_deplibs_check_method=pass_all
3276 ;;
3277
3278 sysv4 | sysv4.3*)
3279 case $host_vendor in
3280 motorola)
3281 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
3282 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3283 ;;
3284 ncr)
3285 lt_cv_deplibs_check_method=pass_all
3286 ;;
3287 sequent)
3288 lt_cv_file_magic_cmd='/bin/file'
3289 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3290 ;;
3291 sni)
3292 lt_cv_file_magic_cmd='/bin/file'
3293 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3294 lt_cv_file_magic_test_file=/lib/libc.so
3295 ;;
3296 siemens)
3297 lt_cv_deplibs_check_method=pass_all
3298 ;;
3299 pc)
3300 lt_cv_deplibs_check_method=pass_all
3301 ;;
3302 esac
3303 ;;
3304
3305 tpf*)
3306 lt_cv_deplibs_check_method=pass_all
3307 ;;
3308 esac
3309 ])
3310
3311 file_magic_glob=
3312 want_nocaseglob=no
3313 if test "$build" = "$host"; then
3314 case $host_os in
3315 mingw* | pw32*)
3316 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
3317 want_nocaseglob=yes
3318 else
3319 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
3320 fi
3321 ;;
3322 esac
3323 fi
3324
3325 file_magic_cmd=$lt_cv_file_magic_cmd
3326 deplibs_check_method=$lt_cv_deplibs_check_method
3327 test -z "$deplibs_check_method" && deplibs_check_method=unknown
3328
3329 _LT_DECL([], [deplibs_check_method], [1],
3330 [Method to check whether dependent libraries are shared objects])
3331 _LT_DECL([], [file_magic_cmd], [1],
3332 [Command to use when deplibs_check_method = "file_magic"])
3333 _LT_DECL([], [file_magic_glob], [1],
3334 [How to find potential files when deplibs_check_method = "file_magic"])
3335 _LT_DECL([], [want_nocaseglob], [1],
3336 [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
3337 ])# _LT_CHECK_MAGIC_METHOD
3338
3339
3340 # LT_PATH_NM
3341 # ----------
3342 # find the pathname to a BSD- or MS-compatible name lister
3343 AC_DEFUN([LT_PATH_NM],
3344 [AC_REQUIRE([AC_PROG_CC])dnl
3345 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
3346 [if test -n "$NM"; then
3347 # Let the user override the test.
3348 lt_cv_path_NM="$NM"
3349 else
3350 lt_nm_to_check="${ac_tool_prefix}nm"
3351 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3352 lt_nm_to_check="$lt_nm_to_check nm"
3353 fi
3354 for lt_tmp_nm in $lt_nm_to_check; do
3355 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3356 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3357 IFS="$lt_save_ifs"
3358 test -z "$ac_dir" && ac_dir=.
3359 tmp_nm="$ac_dir/$lt_tmp_nm"
3360 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3361 # Check to see if the nm accepts a BSD-compat flag.
3362 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3363 # nm: unknown option "B" ignored
3364 # Tru64's nm complains that /dev/null is an invalid object file
3365 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3366 */dev/null* | *'Invalid file or object type'*)
3367 lt_cv_path_NM="$tmp_nm -B"
3368 break
3369 ;;
3370 *)
3371 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3372 */dev/null*)
3373 lt_cv_path_NM="$tmp_nm -p"
3374 break
3375 ;;
3376 *)
3377 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3378 continue # so that we can try to find one that supports BSD flags
3379 ;;
3380 esac
3381 ;;
3382 esac
3383 fi
3384 done
3385 IFS="$lt_save_ifs"
3386 done
3387 : ${lt_cv_path_NM=no}
3388 fi])
3389 if test "$lt_cv_path_NM" != "no"; then
3390 NM="$lt_cv_path_NM"
3391 else
3392 # Didn't find any BSD compatible name lister, look for dumpbin.
3393 if test -n "$DUMPBIN"; then :
3394 # Let the user override the test.
3395 else
3396 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
3397 case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
3398 *COFF*)
3399 DUMPBIN="$DUMPBIN -symbols"
3400 ;;
3401 *)
3402 DUMPBIN=:
3403 ;;
3404 esac
3405 fi
3406 AC_SUBST([DUMPBIN])
3407 if test "$DUMPBIN" != ":"; then
3408 NM="$DUMPBIN"
3409 fi
3410 fi
3411 test -z "$NM" && NM=nm
3412 AC_SUBST([NM])
3413 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3414
3415 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3416 [lt_cv_nm_interface="BSD nm"
3417 echo "int some_variable = 0;" > conftest.$ac_ext
3418 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3419 (eval "$ac_compile" 2>conftest.err)
3420 cat conftest.err >&AS_MESSAGE_LOG_FD
3421 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3422 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3423 cat conftest.err >&AS_MESSAGE_LOG_FD
3424 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
3425 cat conftest.out >&AS_MESSAGE_LOG_FD
3426 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3427 lt_cv_nm_interface="MS dumpbin"
3428 fi
3429 rm -f conftest*])
3430 ])# LT_PATH_NM
3431
3432 # Old names:
3433 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3434 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3435 dnl aclocal-1.4 backwards compatibility:
3436 dnl AC_DEFUN([AM_PROG_NM], [])
3437 dnl AC_DEFUN([AC_PROG_NM], [])
3438
3439 # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3440 # --------------------------------
3441 # how to determine the name of the shared library
3442 # associated with a specific link library.
3443 # -- PORTME fill in with the dynamic library characteristics
3444 m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
3445 [m4_require([_LT_DECL_EGREP])
3446 m4_require([_LT_DECL_OBJDUMP])
3447 m4_require([_LT_DECL_DLLTOOL])
3448 AC_CACHE_CHECK([how to associate runtime and link libraries],
3449 lt_cv_sharedlib_from_linklib_cmd,
3450 [lt_cv_sharedlib_from_linklib_cmd='unknown'
3451
3452 case $host_os in
3453 cygwin* | mingw* | pw32* | cegcc*)
3454 # two different shell functions defined in ltmain.sh
3455 # decide which to use based on capabilities of $DLLTOOL
3456 case `$DLLTOOL --help 2>&1` in
3457 *--identify-strict*)
3458 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
3459 ;;
3460 *)
3461 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
3462 ;;
3463 esac
3464 ;;
3465 *)
3466 # fallback: assume linklib IS sharedlib
3467 lt_cv_sharedlib_from_linklib_cmd="$ECHO"
3468 ;;
3469 esac
3470 ])
3471 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
3472 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
3473
3474 _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
3475 [Command to associate shared and link libraries])
3476 ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3477
3478
3479 # _LT_PATH_MANIFEST_TOOL
3480 # ----------------------
3481 # locate the manifest tool
3482 m4_defun([_LT_PATH_MANIFEST_TOOL],
3483 [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
3484 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
3485 AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
3486 [lt_cv_path_mainfest_tool=no
3487 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
3488 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
3489 cat conftest.err >&AS_MESSAGE_LOG_FD
3490 if $GREP 'Manifest Tool' conftest.out > /dev/null; then
3491 lt_cv_path_mainfest_tool=yes
3492 fi
3493 rm -f conftest*])
3494 if test "x$lt_cv_path_mainfest_tool" != xyes; then
3495 MANIFEST_TOOL=:
3496 fi
3497 _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
3498 ])# _LT_PATH_MANIFEST_TOOL
3499
3500
3501 # LT_LIB_M
3502 # --------
3503 # check for math library
3504 AC_DEFUN([LT_LIB_M],
3505 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3506 LIBM=
3507 case $host in
3508 *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
3509 # These system don't have libm, or don't need it
3510 ;;
3511 *-ncr-sysv4.3*)
3512 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3513 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3514 ;;
3515 *)
3516 AC_CHECK_LIB(m, cos, LIBM="-lm")
3517 ;;
3518 esac
3519 AC_SUBST([LIBM])
3520 ])# LT_LIB_M
3521
3522 # Old name:
3523 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
3524 dnl aclocal-1.4 backwards compatibility:
3525 dnl AC_DEFUN([AC_CHECK_LIBM], [])
3526
3527
3528 # _LT_COMPILER_NO_RTTI([TAGNAME])
3529 # -------------------------------
3530 m4_defun([_LT_COMPILER_NO_RTTI],
3531 [m4_require([_LT_TAG_COMPILER])dnl
3532
3533 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3534
3535 if test "$GCC" = yes; then
3536 case $cc_basename in
3537 nvcc*)
3538 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
3539 *)
3540 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
3541 esac
3542
3543 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3544 lt_cv_prog_compiler_rtti_exceptions,
3545 [-fno-rtti -fno-exceptions], [],
3546 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3547 fi
3548 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
3549 [Compiler flag to turn off builtin functions])
3550 ])# _LT_COMPILER_NO_RTTI
3551
3552
3553 # _LT_CMD_GLOBAL_SYMBOLS
3554 # ----------------------
3555 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
3556 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3557 AC_REQUIRE([AC_PROG_CC])dnl
3558 AC_REQUIRE([AC_PROG_AWK])dnl
3559 AC_REQUIRE([LT_PATH_NM])dnl
3560 AC_REQUIRE([LT_PATH_LD])dnl
3561 m4_require([_LT_DECL_SED])dnl
3562 m4_require([_LT_DECL_EGREP])dnl
3563 m4_require([_LT_TAG_COMPILER])dnl
3564
3565 # Check for command to grab the raw symbol name followed by C symbol from nm.
3566 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
3567 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
3568 [
3569 # These are sane defaults that work on at least a few old systems.
3570 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
3571
3572 # Character class describing NM global symbol codes.
3573 symcode='[[BCDEGRST]]'
3574
3575 # Regexp to match symbols that can be accessed directly from C.
3576 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
3577
3578 # Define system-specific variables.
3579 case $host_os in
3580 aix*)
3581 symcode='[[BCDT]]'
3582 ;;
3583 cygwin* | mingw* | pw32* | cegcc*)
3584 symcode='[[ABCDGISTW]]'
3585 ;;
3586 hpux*)
3587 if test "$host_cpu" = ia64; then
3588 symcode='[[ABCDEGRST]]'
3589 fi
3590 ;;
3591 irix* | nonstopux*)
3592 symcode='[[BCDEGRST]]'
3593 ;;
3594 osf*)
3595 symcode='[[BCDEGQRST]]'
3596 ;;
3597 solaris*)
3598 symcode='[[BDRT]]'
3599 ;;
3600 sco3.2v5*)
3601 symcode='[[DT]]'
3602 ;;
3603 sysv4.2uw2*)
3604 symcode='[[DT]]'
3605 ;;
3606 sysv5* | sco5v6* | unixware* | OpenUNIX*)
3607 symcode='[[ABDT]]'
3608 ;;
3609 sysv4)
3610 symcode='[[DFNSTU]]'
3611 ;;
3612 esac
3613
3614 # If we're using GNU nm, then use its standard symbol codes.
3615 case `$NM -V 2>&1` in
3616 *GNU* | *'with BFD'*)
3617 symcode='[[ABCDGIRSTW]]' ;;
3618 esac
3619
3620 # Transform an extracted symbol line into a proper C declaration.
3621 # Some systems (esp. on ia64) link data and code symbols differently,
3622 # so use this general approach.
3623 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3624
3625 # Transform an extracted symbol line into symbol name and symbol address
3626 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
3627 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
3628
3629 # Handle CRLF in mingw tool chain
3630 opt_cr=
3631 case $build_os in
3632 mingw*)
3633 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3634 ;;
3635 esac
3636
3637 # Try without a prefix underscore, then with it.
3638 for ac_symprfx in "" "_"; do
3639
3640 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
3641 symxfrm="\\1 $ac_symprfx\\2 \\2"
3642
3643 # Write the raw and C identifiers.
3644 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3645 # Fake it for dumpbin and say T for any non-static function
3646 # and D for any global variable.
3647 # Also find C++ and __fastcall symbols from MSVC++,
3648 # which start with @ or ?.
3649 lt_cv_sys_global_symbol_pipe="$AWK ['"\
3650 " {last_section=section; section=\$ 3};"\
3651 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
3652 " \$ 0!~/External *\|/{next};"\
3653 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
3654 " {if(hide[section]) next};"\
3655 " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
3656 " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
3657 " s[1]~/^[@?]/{print s[1], s[1]; next};"\
3658 " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
3659 " ' prfx=^$ac_symprfx]"
3660 else
3661 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
3662 fi
3663 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
3664
3665 # Check to see that the pipe works correctly.
3666 pipe_works=no
3667
3668 rm -f conftest*
3669 cat > conftest.$ac_ext <<_LT_EOF
3670 #ifdef __cplusplus
3671 extern "C" {
3672 #endif
3673 char nm_test_var;
3674 void nm_test_func(void);
3675 void nm_test_func(void){}
3676 #ifdef __cplusplus
3677 }
3678 #endif
3679 int main(){nm_test_var='a';nm_test_func();return(0);}
3680 _LT_EOF
3681
3682 if AC_TRY_EVAL(ac_compile); then
3683 # Now try to grab the symbols.
3684 nlist=conftest.nm
3685 if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
3686 # Try sorting and uniquifying the output.
3687 if sort "$nlist" | uniq > "$nlist"T; then
3688 mv -f "$nlist"T "$nlist"
3689 else
3690 rm -f "$nlist"T
3691 fi
3692
3693 # Make sure that we snagged all the symbols we need.
3694 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
3695 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
3696 cat <<_LT_EOF > conftest.$ac_ext
3697 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
3698 #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
3699 /* DATA imports from DLLs on WIN32 con't be const, because runtime
3700 relocations are performed -- see ld's documentation on pseudo-relocs. */
3701 # define LT@&t@_DLSYM_CONST
3702 #elif defined(__osf__)
3703 /* This system does not cope well with relocations in const data. */
3704 # define LT@&t@_DLSYM_CONST
3705 #else
3706 # define LT@&t@_DLSYM_CONST const
3707 #endif
3708
3709 #ifdef __cplusplus
3710 extern "C" {
3711 #endif
3712
3713 _LT_EOF
3714 # Now generate the symbol file.
3715 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
3716
3717 cat <<_LT_EOF >> conftest.$ac_ext
3718
3719 /* The mapping between symbol names and symbols. */
3720 LT@&t@_DLSYM_CONST struct {
3721 const char *name;
3722 void *address;
3723 }
3724 lt__PROGRAM__LTX_preloaded_symbols[[]] =
3725 {
3726 { "@PROGRAM@", (void *) 0 },
3727 _LT_EOF
3728 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
3729 cat <<\_LT_EOF >> conftest.$ac_ext
3730 {0, (void *) 0}
3731 };
3732
3733 /* This works around a problem in FreeBSD linker */
3734 #ifdef FREEBSD_WORKAROUND
3735 static const void *lt_preloaded_setup() {
3736 return lt__PROGRAM__LTX_preloaded_symbols;
3737 }
3738 #endif
3739
3740 #ifdef __cplusplus
3741 }
3742 #endif
3743 _LT_EOF
3744 # Now try linking the two files.
3745 mv conftest.$ac_objext conftstm.$ac_objext
3746 lt_globsym_save_LIBS=$LIBS
3747 lt_globsym_save_CFLAGS=$CFLAGS
3748 LIBS="conftstm.$ac_objext"
3749 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
3750 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
3751 pipe_works=yes
3752 fi
3753 LIBS=$lt_globsym_save_LIBS
3754 CFLAGS=$lt_globsym_save_CFLAGS
3755 else
3756 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
3757 fi
3758 else
3759 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
3760 fi
3761 else
3762 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
3763 fi
3764 else
3765 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
3766 cat conftest.$ac_ext >&5
3767 fi
3768 rm -rf conftest* conftst*
3769
3770 # Do not use the global_symbol_pipe unless it works.
3771 if test "$pipe_works" = yes; then
3772 break
3773 else
3774 lt_cv_sys_global_symbol_pipe=
3775 fi
3776 done
3777 ])
3778 if test -z "$lt_cv_sys_global_symbol_pipe"; then
3779 lt_cv_sys_global_symbol_to_cdecl=
3780 fi
3781 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
3782 AC_MSG_RESULT(failed)
3783 else
3784 AC_MSG_RESULT(ok)
3785 fi
3786
3787 # Response file support.
3788 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3789 nm_file_list_spec='@'
3790 elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
3791 nm_file_list_spec='@'
3792 fi
3793
3794 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
3795 [Take the output of nm and produce a listing of raw symbols and C names])
3796 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
3797 [Transform the output of nm in a proper C declaration])
3798 _LT_DECL([global_symbol_to_c_name_address],
3799 [lt_cv_sys_global_symbol_to_c_name_address], [1],
3800 [Transform the output of nm in a C name address pair])
3801 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
3802 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
3803 [Transform the output of nm in a C name address pair when lib prefix is needed])
3804 _LT_DECL([], [nm_file_list_spec], [1],
3805 [Specify filename containing input files for $NM])
3806 ]) # _LT_CMD_GLOBAL_SYMBOLS
3807
3808
3809 # _LT_COMPILER_PIC([TAGNAME])
3810 # ---------------------------
3811 m4_defun([_LT_COMPILER_PIC],
3812 [m4_require([_LT_TAG_COMPILER])dnl
3813 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
3814 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3815 _LT_TAGVAR(lt_prog_compiler_static, $1)=
3816
3817 m4_if([$1], [CXX], [
3818 # C++ specific cases for pic, static, wl, etc.
3819 if test "$GXX" = yes; then
3820 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3821 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3822
3823 case $host_os in
3824 aix*)
3825 # All AIX code is PIC.
3826 if test "$host_cpu" = ia64; then
3827 # AIX 5 now supports IA64 processor
3828 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3829 fi
3830 ;;
3831
3832 amigaos*)
3833 case $host_cpu in
3834 powerpc)
3835 # see comment about AmigaOS4 .so support
3836 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3837 ;;
3838 m68k)
3839 # FIXME: we need at least 68020 code to build shared libraries, but
3840 # adding the `-m68020' flag to GCC prevents building anything better,
3841 # like `-m68040'.
3842 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3843 ;;
3844 esac
3845 ;;
3846
3847 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3848 # PIC is the default for these OSes.
3849 ;;
3850 mingw* | cygwin* | os2* | pw32* | cegcc*)
3851 # This hack is so that the source file can tell whether it is being
3852 # built for inclusion in a dll (and should export symbols for example).
3853 # Although the cygwin gcc ignores -fPIC, still need this for old-style
3854 # (--disable-auto-import) libraries
3855 m4_if([$1], [GCJ], [],
3856 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3857 ;;
3858 darwin* | rhapsody*)
3859 # PIC is the default on this platform
3860 # Common symbols not allowed in MH_DYLIB files
3861 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
3862 ;;
3863 *djgpp*)
3864 # DJGPP does not support shared libraries at all
3865 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3866 ;;
3867 haiku*)
3868 # PIC is the default for Haiku.
3869 # The "-static" flag exists, but is broken.
3870 _LT_TAGVAR(lt_prog_compiler_static, $1)=
3871 ;;
3872 interix[[3-9]]*)
3873 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
3874 # Instead, we relocate shared libraries at runtime.
3875 ;;
3876 sysv4*MP*)
3877 if test -d /usr/nec; then
3878 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
3879 fi
3880 ;;
3881 hpux*)
3882 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
3883 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
3884 # sets the default TLS model and affects inlining.
3885 case $host_cpu in
3886 hppa*64*)
3887 ;;
3888 *)
3889 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3890 ;;
3891 esac
3892 ;;
3893 *qnx* | *nto*)
3894 # QNX uses GNU C++, but need to define -shared option too, otherwise
3895 # it will coredump.
3896 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3897 ;;
3898 *)
3899 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3900 ;;
3901 esac
3902 else
3903 case $host_os in
3904 aix[[4-9]]*)
3905 # All AIX code is PIC.
3906 if test "$host_cpu" = ia64; then
3907 # AIX 5 now supports IA64 processor
3908 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3909 else
3910 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
3911 fi
3912 ;;
3913 chorus*)
3914 case $cc_basename in
3915 cxch68*)
3916 # Green Hills C++ Compiler
3917 # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
3918 ;;
3919 esac
3920 ;;
3921 mingw* | cygwin* | os2* | pw32* | cegcc*)
3922 # This hack is so that the source file can tell whether it is being
3923 # built for inclusion in a dll (and should export symbols for example).
3924 m4_if([$1], [GCJ], [],
3925 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3926 ;;
3927 dgux*)
3928 case $cc_basename in
3929 ec++*)
3930 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3931 ;;
3932 ghcx*)
3933 # Green Hills C++ Compiler
3934 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3935 ;;
3936 *)
3937 ;;
3938 esac
3939 ;;
3940 freebsd* | dragonfly*)
3941 # FreeBSD uses GNU C++
3942 ;;
3943 hpux9* | hpux10* | hpux11*)
3944 case $cc_basename in
3945 CC*)
3946 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3947 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3948 if test "$host_cpu" != ia64; then
3949 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3950 fi
3951 ;;
3952 aCC*)
3953 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3954 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3955 case $host_cpu in
3956 hppa*64*|ia64*)
3957 # +Z the default
3958 ;;
3959 *)
3960 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3961 ;;
3962 esac
3963 ;;
3964 *)
3965 ;;
3966 esac
3967 ;;
3968 interix*)
3969 # This is c89, which is MS Visual C++ (no shared libs)
3970 # Anyone wants to do a port?
3971 ;;
3972 irix5* | irix6* | nonstopux*)
3973 case $cc_basename in
3974 CC*)
3975 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3976 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3977 # CC pic flag -KPIC is the default.
3978 ;;
3979 *)
3980 ;;
3981 esac
3982 ;;
3983 linux* | k*bsd*-gnu | kopensolaris*-gnu)
3984 case $cc_basename in
3985 KCC*)
3986 # KAI C++ Compiler
3987 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
3988 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3989 ;;
3990 ecpc* )
3991 # old Intel C++ for x86_64 which still supported -KPIC.
3992 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3993 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3994 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3995 ;;
3996 icpc* )
3997 # Intel C++, used to be incompatible with GCC.
3998 # ICC 10 doesn't accept -KPIC any more.
3999 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4000 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4001 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4002 ;;
4003 pgCC* | pgcpp*)
4004 # Portland Group C++ compiler
4005 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4006 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4007 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4008 ;;
4009 cxx*)
4010 # Compaq C++
4011 # Make sure the PIC flag is empty. It appears that all Alpha
4012 # Linux and Compaq Tru64 Unix objects are PIC.
4013 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4014 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4015 ;;
4016 xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
4017 # IBM XL 8.0, 9.0 on PPC and BlueGene
4018 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4019 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4020 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4021 ;;
4022 *)
4023 case `$CC -V 2>&1 | sed 5q` in
4024 *Sun\ C*)
4025 # Sun C++ 5.9
4026 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4027 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4028 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4029 ;;
4030 esac
4031 ;;
4032 esac
4033 ;;
4034 lynxos*)
4035 ;;
4036 m88k*)
4037 ;;
4038 mvs*)
4039 case $cc_basename in
4040 cxx*)
4041 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4042 ;;
4043 *)
4044 ;;
4045 esac
4046 ;;
4047 netbsd*)
4048 ;;
4049 *qnx* | *nto*)
4050 # QNX uses GNU C++, but need to define -shared option too, otherwise
4051 # it will coredump.
4052 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4053 ;;
4054 osf3* | osf4* | osf5*)
4055 case $cc_basename in
4056 KCC*)
4057 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4058 ;;
4059 RCC*)
4060 # Rational C++ 2.4.1
4061 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4062 ;;
4063 cxx*)
4064 # Digital/Compaq C++
4065 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4066 # Make sure the PIC flag is empty. It appears that all Alpha
4067 # Linux and Compaq Tru64 Unix objects are PIC.
4068 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4069 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4070 ;;
4071 *)
4072 ;;
4073 esac
4074 ;;
4075 psos*)
4076 ;;
4077 solaris*)
4078 case $cc_basename in
4079 CC* | sunCC*)
4080 # Sun C++ 4.2, 5.x and Centerline C++
4081 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4082 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4083 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4084 ;;
4085 gcx*)
4086 # Green Hills C++ Compiler
4087 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4088 ;;
4089 *)
4090 ;;
4091 esac
4092 ;;
4093 sunos4*)
4094 case $cc_basename in
4095 CC*)
4096 # Sun C++ 4.x
4097 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4098 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4099 ;;
4100 lcc*)
4101 # Lucid
4102 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4103 ;;
4104 *)
4105 ;;
4106 esac
4107 ;;
4108 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4109 case $cc_basename in
4110 CC*)
4111 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4112 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4113 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4114 ;;
4115 esac
4116 ;;
4117 tandem*)
4118 case $cc_basename in
4119 NCC*)
4120 # NonStop-UX NCC 3.20
4121 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4122 ;;
4123 *)
4124 ;;
4125 esac
4126 ;;
4127 vxworks*)
4128 ;;
4129 *)
4130 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4131 ;;
4132 esac
4133 fi
4134 ],
4135 [
4136 if test "$GCC" = yes; then
4137 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4138 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4139
4140 case $host_os in
4141 aix*)
4142 # All AIX code is PIC.
4143 if test "$host_cpu" = ia64; then
4144 # AIX 5 now supports IA64 processor
4145 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4146 fi
4147 ;;
4148
4149 amigaos*)
4150 case $host_cpu in
4151 powerpc)
4152 # see comment about AmigaOS4 .so support
4153 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4154 ;;
4155 m68k)
4156 # FIXME: we need at least 68020 code to build shared libraries, but
4157 # adding the `-m68020' flag to GCC prevents building anything better,
4158 # like `-m68040'.
4159 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4160 ;;
4161 esac
4162 ;;
4163
4164 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4165 # PIC is the default for these OSes.
4166 ;;
4167
4168 mingw* | cygwin* | pw32* | os2* | cegcc*)
4169 # This hack is so that the source file can tell whether it is being
4170 # built for inclusion in a dll (and should export symbols for example).
4171 # Although the cygwin gcc ignores -fPIC, still need this for old-style
4172 # (--disable-auto-import) libraries
4173 m4_if([$1], [GCJ], [],
4174 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4175 ;;
4176
4177 darwin* | rhapsody*)
4178 # PIC is the default on this platform
4179 # Common symbols not allowed in MH_DYLIB files
4180 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4181 ;;
4182
4183 haiku*)
4184 # PIC is the default for Haiku.
4185 # The "-static" flag exists, but is broken.
4186 _LT_TAGVAR(lt_prog_compiler_static, $1)=
4187 ;;
4188
4189 hpux*)
4190 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4191 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
4192 # sets the default TLS model and affects inlining.
4193 case $host_cpu in
4194 hppa*64*)
4195 # +Z the default
4196 ;;
4197 *)
4198 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4199 ;;
4200 esac
4201 ;;
4202
4203 interix[[3-9]]*)
4204 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4205 # Instead, we relocate shared libraries at runtime.
4206 ;;
4207
4208 msdosdjgpp*)
4209 # Just because we use GCC doesn't mean we suddenly get shared libraries
4210 # on systems that don't support them.
4211 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4212 enable_shared=no
4213 ;;
4214
4215 *nto* | *qnx*)
4216 # QNX uses GNU C++, but need to define -shared option too, otherwise
4217 # it will coredump.
4218 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4219 ;;
4220
4221 sysv4*MP*)
4222 if test -d /usr/nec; then
4223 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4224 fi
4225 ;;
4226
4227 *)
4228 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4229 ;;
4230 esac
4231
4232 case $cc_basename in
4233 nvcc*) # Cuda Compiler Driver 2.2
4234 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
4235 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC'
4236 ;;
4237 esac
4238 else
4239 # PORTME Check for flag to pass linker flags through the system compiler.
4240 case $host_os in
4241 aix*)
4242 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4243 if test "$host_cpu" = ia64; then
4244 # AIX 5 now supports IA64 processor
4245 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4246 else
4247 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4248 fi
4249 ;;
4250
4251 mingw* | cygwin* | pw32* | os2* | cegcc*)
4252 # This hack is so that the source file can tell whether it is being
4253 # built for inclusion in a dll (and should export symbols for example).
4254 m4_if([$1], [GCJ], [],
4255 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4256 ;;
4257
4258 hpux9* | hpux10* | hpux11*)
4259 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4260 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4261 # not for PA HP-UX.
4262 case $host_cpu in
4263 hppa*64*|ia64*)
4264 # +Z the default
4265 ;;
4266 *)
4267 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4268 ;;
4269 esac
4270 # Is there a better lt_prog_compiler_static that works with the bundled CC?
4271 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4272 ;;
4273
4274 irix5* | irix6* | nonstopux*)
4275 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4276 # PIC (with -KPIC) is the default.
4277 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4278 ;;
4279
4280 linux* | k*bsd*-gnu | kopensolaris*-gnu)
4281 case $cc_basename in
4282 # old Intel for x86_64 which still supported -KPIC.
4283 ecc*)
4284 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4285 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4286 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4287 ;;
4288 # icc used to be incompatible with GCC.
4289 # ICC 10 doesn't accept -KPIC any more.
4290 icc* | ifort*)
4291 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4292 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4293 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4294 ;;
4295 # Lahey Fortran 8.1.
4296 lf95*)
4297 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4298 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4299 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4300 ;;
4301 nagfor*)
4302 # NAG Fortran compiler
4303 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
4304 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4305 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4306 ;;
4307 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
4308 # Portland Group compilers (*not* the Pentium gcc compiler,
4309 # which looks to be a dead project)
4310 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4311 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4312 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4313 ;;
4314 ccc*)
4315 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4316 # All Alpha code is PIC.
4317 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4318 ;;
4319 xl* | bgxl* | bgf* | mpixl*)
4320 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
4321 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4322 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4323 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4324 ;;
4325 *)
4326 case `$CC -V 2>&1 | sed 5q` in
4327 *Sun\ F* | *Sun*Fortran*)
4328 # Sun Fortran 8.3 passes all unrecognized flags to the linker
4329 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4330 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4331 _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4332 ;;
4333 *Sun\ C*)
4334 # Sun C 5.9
4335 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4336 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4337 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4338 ;;
4339 esac
4340 ;;
4341 esac
4342 ;;
4343
4344 newsos6)
4345 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4346 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4347 ;;
4348
4349 *nto* | *qnx*)
4350 # QNX uses GNU C++, but need to define -shared option too, otherwise
4351 # it will coredump.
4352 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4353 ;;
4354
4355 osf3* | osf4* | osf5*)
4356 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4357 # All OSF/1 code is PIC.
4358 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4359 ;;
4360
4361 rdos*)
4362 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4363 ;;
4364
4365 solaris*)
4366 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4367 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4368 case $cc_basename in
4369 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
4370 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
4371 *)
4372 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
4373 esac
4374 ;;
4375
4376 sunos4*)
4377 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4378 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4379 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4380 ;;
4381
4382 sysv4 | sysv4.2uw2* | sysv4.3*)
4383 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4384 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4385 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4386 ;;
4387
4388 sysv4*MP*)
4389 if test -d /usr/nec ;then
4390 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4391 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4392 fi
4393 ;;
4394
4395 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4396 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4397 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4398 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4399 ;;
4400
4401 unicos*)
4402 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4403 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4404 ;;
4405
4406 uts4*)
4407 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4408 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4409 ;;
4410
4411 *)
4412 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4413 ;;
4414 esac
4415 fi
4416 ])
4417 case $host_os in
4418 # For platforms which do not support PIC, -DPIC is meaningless:
4419 *djgpp*)
4420 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4421 ;;
4422 *)
4423 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
4424 ;;
4425 esac
4426
4427 AC_CACHE_CHECK([for $compiler option to produce PIC],
4428 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
4429 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4430 _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
4431
4432 #
4433 # Check to make sure the PIC flag actually works.
4434 #
4435 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4436 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
4437 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
4438 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
4439 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
4440 "" | " "*) ;;
4441 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4442 esac],
4443 [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4444 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4445 fi
4446 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4447 [Additional compiler flags for building library objects])
4448
4449 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4450 [How to pass a linker flag through the compiler])
4451 #
4452 # Check to make sure the static flag actually works.
4453 #
4454 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
4455 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
4456 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
4457 $lt_tmp_static_flag,
4458 [],
4459 [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
4460 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
4461 [Compiler flag to prevent dynamic linking])
4462 ])# _LT_COMPILER_PIC
4463
4464
4465 # _LT_LINKER_SHLIBS([TAGNAME])
4466 # ----------------------------
4467 # See if the linker supports building shared libraries.
4468 m4_defun([_LT_LINKER_SHLIBS],
4469 [AC_REQUIRE([LT_PATH_LD])dnl
4470 AC_REQUIRE([LT_PATH_NM])dnl
4471 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
4472 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4473 m4_require([_LT_DECL_EGREP])dnl
4474 m4_require([_LT_DECL_SED])dnl
4475 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
4476 m4_require([_LT_TAG_COMPILER])dnl
4477 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4478 m4_if([$1], [CXX], [
4479 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4480 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4481 case $host_os in
4482 aix[[4-9]]*)
4483 # If we're using GNU nm, then we don't want the "-C" option.
4484 # -C means demangle to AIX nm, but means don't demangle with GNU nm
4485 # Also, AIX nm treats weak defined symbols like other global defined
4486 # symbols, whereas GNU nm marks them as "W".
4487 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4488 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4489 else
4490 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4491 fi
4492 ;;
4493 pw32*)
4494 _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
4495 ;;
4496 cygwin* | mingw* | cegcc*)
4497 case $cc_basename in
4498 cl*) ;;
4499 *)
4500 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
4501 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
4502 ;;
4503 esac
4504 ;;
4505 *)
4506 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4507 ;;
4508 esac
4509 ], [
4510 runpath_var=
4511 _LT_TAGVAR(allow_undefined_flag, $1)=
4512 _LT_TAGVAR(always_export_symbols, $1)=no
4513 _LT_TAGVAR(archive_cmds, $1)=
4514 _LT_TAGVAR(archive_expsym_cmds, $1)=
4515 _LT_TAGVAR(compiler_needs_object, $1)=no
4516 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4517 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4518 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4519 _LT_TAGVAR(hardcode_automatic, $1)=no
4520 _LT_TAGVAR(hardcode_direct, $1)=no
4521 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
4522 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4523 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4524 _LT_TAGVAR(hardcode_libdir_separator, $1)=
4525 _LT_TAGVAR(hardcode_minus_L, $1)=no
4526 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4527 _LT_TAGVAR(inherit_rpath, $1)=no
4528 _LT_TAGVAR(link_all_deplibs, $1)=unknown
4529 _LT_TAGVAR(module_cmds, $1)=
4530 _LT_TAGVAR(module_expsym_cmds, $1)=
4531 _LT_TAGVAR(old_archive_from_new_cmds, $1)=
4532 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4533 _LT_TAGVAR(thread_safe_flag_spec, $1)=
4534 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4535 # include_expsyms should be a list of space-separated symbols to be *always*
4536 # included in the symbol list
4537 _LT_TAGVAR(include_expsyms, $1)=
4538 # exclude_expsyms can be an extended regexp of symbols to exclude
4539 # it will be wrapped by ` (' and `)$', so one must not match beginning or
4540 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
4541 # as well as any symbol that contains `d'.
4542 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4543 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4544 # platforms (ab)use it in PIC code, but their linkers get confused if
4545 # the symbol is explicitly referenced. Since portable code cannot
4546 # rely on this symbol name, it's probably fine to never include it in
4547 # preloaded symbol tables.
4548 # Exclude shared library initialization/finalization symbols.
4549 dnl Note also adjust exclude_expsyms for C++ above.
4550 extract_expsyms_cmds=
4551
4552 case $host_os in
4553 cygwin* | mingw* | pw32* | cegcc*)
4554 # FIXME: the MSVC++ port hasn't been tested in a loooong time
4555 # When not using gcc, we currently assume that we are using
4556 # Microsoft Visual C++.
4557 if test "$GCC" != yes; then
4558 with_gnu_ld=no
4559 fi
4560 ;;
4561 interix*)
4562 # we just hope/assume this is gcc and not c89 (= MSVC++)
4563 with_gnu_ld=yes
4564 ;;
4565 openbsd*)
4566 with_gnu_ld=no
4567 ;;
4568 esac
4569
4570 _LT_TAGVAR(ld_shlibs, $1)=yes
4571
4572 # On some targets, GNU ld is compatible enough with the native linker
4573 # that we're better off using the native interface for both.
4574 lt_use_gnu_ld_interface=no
4575 if test "$with_gnu_ld" = yes; then
4576 case $host_os in
4577 aix*)
4578 # The AIX port of GNU ld has always aspired to compatibility
4579 # with the native linker. However, as the warning in the GNU ld
4580 # block says, versions before 2.19.5* couldn't really create working
4581 # shared libraries, regardless of the interface used.
4582 case `$LD -v 2>&1` in
4583 *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
4584 *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
4585 *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
4586 *)
4587 lt_use_gnu_ld_interface=yes
4588 ;;
4589 esac
4590 ;;
4591 *)
4592 lt_use_gnu_ld_interface=yes
4593 ;;
4594 esac
4595 fi
4596
4597 if test "$lt_use_gnu_ld_interface" = yes; then
4598 # If archive_cmds runs LD, not CC, wlarc should be empty
4599 wlarc='${wl}'
4600
4601 # Set some defaults for GNU ld with shared library support. These
4602 # are reset later if shared libraries are not supported. Putting them
4603 # here allows them to be overridden if necessary.
4604 runpath_var=LD_RUN_PATH
4605 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4606 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4607 # ancient GNU ld didn't support --whole-archive et. al.
4608 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
4609 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4610 else
4611 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4612 fi
4613 supports_anon_versioning=no
4614 case `$LD -v 2>&1` in
4615 *GNU\ gold*) supports_anon_versioning=yes ;;
4616 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
4617 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
4618 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
4619 *\ 2.11.*) ;; # other 2.11 versions
4620 *) supports_anon_versioning=yes ;;
4621 esac
4622
4623 # See if GNU ld supports shared libraries.
4624 case $host_os in
4625 aix[[3-9]]*)
4626 # On AIX/PPC, the GNU linker is very broken
4627 if test "$host_cpu" != ia64; then
4628 _LT_TAGVAR(ld_shlibs, $1)=no
4629 cat <<_LT_EOF 1>&2
4630
4631 *** Warning: the GNU linker, at least up to release 2.19, is reported
4632 *** to be unable to reliably create shared libraries on AIX.
4633 *** Therefore, libtool is disabling shared libraries support. If you
4634 *** really care for shared libraries, you may want to install binutils
4635 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
4636 *** You will then need to restart the configuration process.
4637
4638 _LT_EOF
4639 fi
4640 ;;
4641
4642 amigaos*)
4643 case $host_cpu in
4644 powerpc)
4645 # see comment about AmigaOS4 .so support
4646 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4647 _LT_TAGVAR(archive_expsym_cmds, $1)=''
4648 ;;
4649 m68k)
4650 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
4651 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4652 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4653 ;;
4654 esac
4655 ;;
4656
4657 beos*)
4658 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4659 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4660 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
4661 # support --undefined. This deserves some investigation. FIXME
4662 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4663 else
4664 _LT_TAGVAR(ld_shlibs, $1)=no
4665 fi
4666 ;;
4667
4668 cygwin* | mingw* | pw32* | cegcc*)
4669 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4670 # as there is no search path for DLLs.
4671 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4672 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
4673 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4674 _LT_TAGVAR(always_export_symbols, $1)=no
4675 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4676 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
4677 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
4678
4679 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
4680 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4681 # If the export-symbols file already is a .def file (1st line
4682 # is EXPORTS), use it as is; otherwise, prepend...
4683 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
4684 cp $export_symbols $output_objdir/$soname.def;
4685 else
4686 echo EXPORTS > $output_objdir/$soname.def;
4687 cat $export_symbols >> $output_objdir/$soname.def;
4688 fi~
4689 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4690 else
4691 _LT_TAGVAR(ld_shlibs, $1)=no
4692 fi
4693 ;;
4694
4695 haiku*)
4696 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4697 _LT_TAGVAR(link_all_deplibs, $1)=yes
4698 ;;
4699
4700 interix[[3-9]]*)
4701 _LT_TAGVAR(hardcode_direct, $1)=no
4702 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4703 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4704 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4705 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
4706 # Instead, shared libraries are loaded at an image base (0x10000000 by
4707 # default) and relocated if they conflict, which is a slow very memory
4708 # consuming and fragmenting process. To avoid this, we pick a random,
4709 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
4710 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
4711 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
4712 _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
4713 ;;
4714
4715 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
4716 tmp_diet=no
4717 if test "$host_os" = linux-dietlibc; then
4718 case $cc_basename in
4719 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
4720 esac
4721 fi
4722 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
4723 && test "$tmp_diet" = no
4724 then
4725 tmp_addflag=' $pic_flag'
4726 tmp_sharedflag='-shared'
4727 case $cc_basename,$host_cpu in
4728 pgcc*) # Portland Group C compiler
4729 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
4730 tmp_addflag=' $pic_flag'
4731 ;;
4732 pgf77* | pgf90* | pgf95* | pgfortran*)
4733 # Portland Group f77 and f90 compilers
4734 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
4735 tmp_addflag=' $pic_flag -Mnomain' ;;
4736 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
4737 tmp_addflag=' -i_dynamic' ;;
4738 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
4739 tmp_addflag=' -i_dynamic -nofor_main' ;;
4740 ifc* | ifort*) # Intel Fortran compiler
4741 tmp_addflag=' -nofor_main' ;;
4742 lf95*) # Lahey Fortran 8.1
4743 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4744 tmp_sharedflag='--shared' ;;
4745 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
4746 tmp_sharedflag='-qmkshrobj'
4747 tmp_addflag= ;;
4748 nvcc*) # Cuda Compiler Driver 2.2
4749 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
4750 _LT_TAGVAR(compiler_needs_object, $1)=yes
4751 ;;
4752 esac
4753 case `$CC -V 2>&1 | sed 5q` in
4754 *Sun\ C*) # Sun C 5.9
4755 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
4756 _LT_TAGVAR(compiler_needs_object, $1)=yes
4757 tmp_sharedflag='-G' ;;
4758 *Sun\ F*) # Sun Fortran 8.3
4759 tmp_sharedflag='-G' ;;
4760 esac
4761 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4762
4763 if test "x$supports_anon_versioning" = xyes; then
4764 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4765 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4766 echo "local: *; };" >> $output_objdir/$libname.ver~
4767 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
4768 fi
4769
4770 case $cc_basename in
4771 xlf* | bgf* | bgxlf* | mpixlf*)
4772 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
4773 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
4774 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4775 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
4776 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
4777 if test "x$supports_anon_versioning" = xyes; then
4778 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4779 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4780 echo "local: *; };" >> $output_objdir/$libname.ver~
4781 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
4782 fi
4783 ;;
4784 esac
4785 else
4786 _LT_TAGVAR(ld_shlibs, $1)=no
4787 fi
4788 ;;
4789
4790 netbsd*)
4791 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4792 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
4793 wlarc=
4794 else
4795 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4796 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4797 fi
4798 ;;
4799
4800 solaris*)
4801 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
4802 _LT_TAGVAR(ld_shlibs, $1)=no
4803 cat <<_LT_EOF 1>&2
4804
4805 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
4806 *** create shared libraries on Solaris systems. Therefore, libtool
4807 *** is disabling shared libraries support. We urge you to upgrade GNU
4808 *** binutils to release 2.9.1 or newer. Another option is to modify
4809 *** your PATH or compiler configuration so that the native linker is
4810 *** used, and then restart.
4811
4812 _LT_EOF
4813 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4814 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4815 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4816 else
4817 _LT_TAGVAR(ld_shlibs, $1)=no
4818 fi
4819 ;;
4820
4821 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
4822 case `$LD -v 2>&1` in
4823 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
4824 _LT_TAGVAR(ld_shlibs, $1)=no
4825 cat <<_LT_EOF 1>&2
4826
4827 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
4828 *** reliably create shared libraries on SCO systems. Therefore, libtool
4829 *** is disabling shared libraries support. We urge you to upgrade GNU
4830 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
4831 *** your PATH or compiler configuration so that the native linker is
4832 *** used, and then restart.
4833
4834 _LT_EOF
4835 ;;
4836 *)
4837 # For security reasons, it is highly recommended that you always
4838 # use absolute paths for naming shared libraries, and exclude the
4839 # DT_RUNPATH tag from executables and libraries. But doing so
4840 # requires that you compile everything twice, which is a pain.
4841 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4842 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4843 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4844 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4845 else
4846 _LT_TAGVAR(ld_shlibs, $1)=no
4847 fi
4848 ;;
4849 esac
4850 ;;
4851
4852 sunos4*)
4853 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4854 wlarc=
4855 _LT_TAGVAR(hardcode_direct, $1)=yes
4856 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4857 ;;
4858
4859 *)
4860 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4861 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4862 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4863 else
4864 _LT_TAGVAR(ld_shlibs, $1)=no
4865 fi
4866 ;;
4867 esac
4868
4869 if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
4870 runpath_var=
4871 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4872 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4873 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4874 fi
4875 else
4876 # PORTME fill in a description of your system's linker (not GNU ld)
4877 case $host_os in
4878 aix3*)
4879 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4880 _LT_TAGVAR(always_export_symbols, $1)=yes
4881 _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
4882 # Note: this linker hardcodes the directories in LIBPATH if there
4883 # are no directories specified by -L.
4884 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4885 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
4886 # Neither direct hardcoding nor static linking is supported with a
4887 # broken collect2.
4888 _LT_TAGVAR(hardcode_direct, $1)=unsupported
4889 fi
4890 ;;
4891
4892 aix[[4-9]]*)
4893 if test "$host_cpu" = ia64; then
4894 # On IA64, the linker does run time linking by default, so we don't
4895 # have to do anything special.
4896 aix_use_runtimelinking=no
4897 exp_sym_flag='-Bexport'
4898 no_entry_flag=""
4899 else
4900 # If we're using GNU nm, then we don't want the "-C" option.
4901 # -C means demangle to AIX nm, but means don't demangle with GNU nm
4902 # Also, AIX nm treats weak defined symbols like other global
4903 # defined symbols, whereas GNU nm marks them as "W".
4904 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4905 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4906 else
4907 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4908 fi
4909 aix_use_runtimelinking=no
4910
4911 # Test if we are trying to use run time linking or normal
4912 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
4913 # need to do runtime linking.
4914 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
4915 for ld_flag in $LDFLAGS; do
4916 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
4917 aix_use_runtimelinking=yes
4918 break
4919 fi
4920 done
4921 ;;
4922 esac
4923
4924 exp_sym_flag='-bexport'
4925 no_entry_flag='-bnoentry'
4926 fi
4927
4928 # When large executables or shared objects are built, AIX ld can
4929 # have problems creating the table of contents. If linking a library
4930 # or program results in "error TOC overflow" add -mminimal-toc to
4931 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
4932 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
4933
4934 _LT_TAGVAR(archive_cmds, $1)=''
4935 _LT_TAGVAR(hardcode_direct, $1)=yes
4936 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4937 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
4938 _LT_TAGVAR(link_all_deplibs, $1)=yes
4939 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
4940
4941 if test "$GCC" = yes; then
4942 case $host_os in aix4.[[012]]|aix4.[[012]].*)
4943 # We only want to do this on AIX 4.2 and lower, the check
4944 # below for broken collect2 doesn't work under 4.3+
4945 collect2name=`${CC} -print-prog-name=collect2`
4946 if test -f "$collect2name" &&
4947 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
4948 then
4949 # We have reworked collect2
4950 :
4951 else
4952 # We have old collect2
4953 _LT_TAGVAR(hardcode_direct, $1)=unsupported
4954 # It fails to find uninstalled libraries when the uninstalled
4955 # path is not listed in the libpath. Setting hardcode_minus_L
4956 # to unsupported forces relinking
4957 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4958 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4959 _LT_TAGVAR(hardcode_libdir_separator, $1)=
4960 fi
4961 ;;
4962 esac
4963 shared_flag='-shared'
4964 if test "$aix_use_runtimelinking" = yes; then
4965 shared_flag="$shared_flag "'${wl}-G'
4966 fi
4967 else
4968 # not using gcc
4969 if test "$host_cpu" = ia64; then
4970 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
4971 # chokes on -Wl,-G. The following line is correct:
4972 shared_flag='-G'
4973 else
4974 if test "$aix_use_runtimelinking" = yes; then
4975 shared_flag='${wl}-G'
4976 else
4977 shared_flag='${wl}-bM:SRE'
4978 fi
4979 fi
4980 fi
4981
4982 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
4983 # It seems that -bexpall does not export symbols beginning with
4984 # underscore (_), so it is better to generate a list of symbols to export.
4985 _LT_TAGVAR(always_export_symbols, $1)=yes
4986 if test "$aix_use_runtimelinking" = yes; then
4987 # Warning - without using the other runtime loading flags (-brtl),
4988 # -berok will link without error, but may produce a broken library.
4989 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
4990 # Determine the default libpath from the value encoded in an
4991 # empty executable.
4992 _LT_SYS_MODULE_PATH_AIX([$1])
4993 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4994 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
4995 else
4996 if test "$host_cpu" = ia64; then
4997 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
4998 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
4999 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
5000 else
5001 # Determine the default libpath from the value encoded in an
5002 # empty executable.
5003 _LT_SYS_MODULE_PATH_AIX([$1])
5004 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5005 # Warning - without using the other run time loading flags,
5006 # -berok will link without error, but may produce a broken library.
5007 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5008 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5009 if test "$with_gnu_ld" = yes; then
5010 # We only use this code for GNU lds that support --whole-archive.
5011 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
5012 else
5013 # Exported symbols can be pulled into shared objects from archives
5014 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5015 fi
5016 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5017 # This is similar to how AIX traditionally builds its shared libraries.
5018 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
5019 fi
5020 fi
5021 ;;
5022
5023 amigaos*)
5024 case $host_cpu in
5025 powerpc)
5026 # see comment about AmigaOS4 .so support
5027 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5028 _LT_TAGVAR(archive_expsym_cmds, $1)=''
5029 ;;
5030 m68k)
5031 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
5032 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5033 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5034 ;;
5035 esac
5036 ;;
5037
5038 bsdi[[45]]*)
5039 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5040 ;;
5041
5042 cygwin* | mingw* | pw32* | cegcc*)
5043 # When not using gcc, we currently assume that we are using
5044 # Microsoft Visual C++.
5045 # hardcode_libdir_flag_spec is actually meaningless, as there is
5046 # no search path for DLLs.
5047 case $cc_basename in
5048 cl*)
5049 # Native MSVC
5050 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5051 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5052 _LT_TAGVAR(always_export_symbols, $1)=yes
5053 _LT_TAGVAR(file_list_spec, $1)='@'
5054 # Tell ltmain to make .lib files, not .a files.
5055 libext=lib
5056 # Tell ltmain to make .dll files, not .so files.
5057 shrext_cmds=".dll"
5058 # FIXME: Setting linknames here is a bad hack.
5059 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
5060 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5061 sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
5062 else
5063 sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
5064 fi~
5065 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
5066 linknames='
5067 # The linker will not automatically build a static lib if we build a DLL.
5068 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5069 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5070 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
5071 # Don't use ranlib
5072 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
5073 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
5074 lt_tool_outputfile="@TOOL_OUTPUT@"~
5075 case $lt_outputfile in
5076 *.exe|*.EXE) ;;
5077 *)
5078 lt_outputfile="$lt_outputfile.exe"
5079 lt_tool_outputfile="$lt_tool_outputfile.exe"
5080 ;;
5081 esac~
5082 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
5083 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
5084 $RM "$lt_outputfile.manifest";
5085 fi'
5086 ;;
5087 *)
5088 # Assume MSVC wrapper
5089 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5090 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5091 # Tell ltmain to make .lib files, not .a files.
5092 libext=lib
5093 # Tell ltmain to make .dll files, not .so files.
5094 shrext_cmds=".dll"
5095 # FIXME: Setting linknames here is a bad hack.
5096 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
5097 # The linker will automatically build a .lib file if we build a DLL.
5098 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5099 # FIXME: Should let the user specify the lib program.
5100 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5101 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5102 ;;
5103 esac
5104 ;;
5105
5106 darwin* | rhapsody*)
5107 _LT_DARWIN_LINKER_FEATURES($1)
5108 ;;
5109
5110 dgux*)
5111 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5112 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5113 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5114 ;;
5115
5116 freebsd1*)
5117 _LT_TAGVAR(ld_shlibs, $1)=no
5118 ;;
5119
5120 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5121 # support. Future versions do this automatically, but an explicit c++rt0.o
5122 # does not break anything, and helps significantly (at the cost of a little
5123 # extra space).
5124 freebsd2.2*)
5125 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5126 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5127 _LT_TAGVAR(hardcode_direct, $1)=yes
5128 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5129 ;;
5130
5131 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5132 freebsd2*)
5133 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5134 _LT_TAGVAR(hardcode_direct, $1)=yes
5135 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5136 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5137 ;;
5138
5139 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5140 freebsd* | dragonfly*)
5141 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5142 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5143 _LT_TAGVAR(hardcode_direct, $1)=yes
5144 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5145 ;;
5146
5147 hpux9*)
5148 if test "$GCC" = yes; then
5149 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5150 else
5151 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5152 fi
5153 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5154 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5155 _LT_TAGVAR(hardcode_direct, $1)=yes
5156
5157 # hardcode_minus_L: Not really in the search PATH,
5158 # but as the default location of the library.
5159 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5160 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5161 ;;
5162
5163 hpux10*)
5164 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
5165 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5166 else
5167 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5168 fi
5169 if test "$with_gnu_ld" = no; then
5170 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5171 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
5172 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5173 _LT_TAGVAR(hardcode_direct, $1)=yes
5174 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5175 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5176 # hardcode_minus_L: Not really in the search PATH,
5177 # but as the default location of the library.
5178 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5179 fi
5180 ;;
5181
5182 hpux11*)
5183 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
5184 case $host_cpu in
5185 hppa*64*)
5186 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5187 ;;
5188 ia64*)
5189 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5190 ;;
5191 *)
5192 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5193 ;;
5194 esac
5195 else
5196 case $host_cpu in
5197 hppa*64*)
5198 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5199 ;;
5200 ia64*)
5201 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5202 ;;
5203 *)
5204 m4_if($1, [], [
5205 # Older versions of the 11.00 compiler do not understand -b yet
5206 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
5207 _LT_LINKER_OPTION([if $CC understands -b],
5208 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
5209 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
5210 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
5211 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
5212 ;;
5213 esac
5214 fi
5215 if test "$with_gnu_ld" = no; then
5216 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5217 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5218
5219 case $host_cpu in
5220 hppa*64*|ia64*)
5221 _LT_TAGVAR(hardcode_direct, $1)=no
5222 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5223 ;;
5224 *)
5225 _LT_TAGVAR(hardcode_direct, $1)=yes
5226 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5227 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5228
5229 # hardcode_minus_L: Not really in the search PATH,
5230 # but as the default location of the library.
5231 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5232 ;;
5233 esac
5234 fi
5235 ;;
5236
5237 irix5* | irix6* | nonstopux*)
5238 if test "$GCC" = yes; then
5239 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5240 # Try to use the -exported_symbol ld option, if it does not
5241 # work, assume that -exports_file does not work either and
5242 # implicitly export all symbols.
5243 # This should be the same for all languages, so no per-tag cache variable.
5244 AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
5245 [lt_cv_irix_exported_symbol],
5246 [save_LDFLAGS="$LDFLAGS"
5247 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
5248 AC_LINK_IFELSE(
5249 [AC_LANG_SOURCE(
5250 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
5251 [C++], [[int foo (void) { return 0; }]],
5252 [Fortran 77], [[
5253 subroutine foo
5254 end]],
5255 [Fortran], [[
5256 subroutine foo
5257 end]])])],
5258 [lt_cv_irix_exported_symbol=yes],
5259 [lt_cv_irix_exported_symbol=no])
5260 LDFLAGS="$save_LDFLAGS"])
5261 if test "$lt_cv_irix_exported_symbol" = yes; then
5262 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
5263 fi
5264 else
5265 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
5266 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
5267 fi
5268 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5269 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5270 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5271 _LT_TAGVAR(inherit_rpath, $1)=yes
5272 _LT_TAGVAR(link_all_deplibs, $1)=yes
5273 ;;
5274
5275 netbsd*)
5276 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5277 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
5278 else
5279 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
5280 fi
5281 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5282 _LT_TAGVAR(hardcode_direct, $1)=yes
5283 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5284 ;;
5285
5286 newsos6)
5287 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5288 _LT_TAGVAR(hardcode_direct, $1)=yes
5289 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5290 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5291 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5292 ;;
5293
5294 *nto* | *qnx*)
5295 ;;
5296
5297 openbsd*)
5298 if test -f /usr/libexec/ld.so; then
5299 _LT_TAGVAR(hardcode_direct, $1)=yes
5300 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5301 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5302 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5303 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5304 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
5305 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5306 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5307 else
5308 case $host_os in
5309 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
5310 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5311 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5312 ;;
5313 *)
5314 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5315 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5316 ;;
5317 esac
5318 fi
5319 else
5320 _LT_TAGVAR(ld_shlibs, $1)=no
5321 fi
5322 ;;
5323
5324 os2*)
5325 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5326 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5327 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5328 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
5329 _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5330 ;;
5331
5332 osf3*)
5333 if test "$GCC" = yes; then
5334 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5335 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5336 else
5337 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5338 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
5339 fi
5340 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5341 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5342 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5343 ;;
5344
5345 osf4* | osf5*) # as osf3* with the addition of -msym flag
5346 if test "$GCC" = yes; then
5347 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5348 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5349 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5350 else
5351 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5352 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
5353 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
5354 $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
5355
5356 # Both c and cxx compiler support -rpath directly
5357 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5358 fi
5359 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5360 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5361 ;;
5362
5363 solaris*)
5364 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
5365 if test "$GCC" = yes; then
5366 wlarc='${wl}'
5367 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5368 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5369 $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5370 else
5371 case `$CC -V 2>&1` in
5372 *"Compilers 5.0"*)
5373 wlarc=''
5374 _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5375 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5376 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
5377 ;;
5378 *)
5379 wlarc='${wl}'
5380 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
5381 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5382 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5383 ;;
5384 esac
5385 fi
5386 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5387 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5388 case $host_os in
5389 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5390 *)
5391 # The compiler driver will combine and reorder linker options,
5392 # but understands `-z linker_flag'. GCC discards it without `$wl',
5393 # but is careful enough not to reorder.
5394 # Supported since Solaris 2.6 (maybe 2.5.1?)
5395 if test "$GCC" = yes; then
5396 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
5397 else
5398 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
5399 fi
5400 ;;
5401 esac
5402 _LT_TAGVAR(link_all_deplibs, $1)=yes
5403 ;;
5404
5405 sunos4*)
5406 if test "x$host_vendor" = xsequent; then
5407 # Use $CC to link under sequent, because it throws in some extra .o
5408 # files that make .init and .fini sections work.
5409 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5410 else
5411 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5412 fi
5413 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5414 _LT_TAGVAR(hardcode_direct, $1)=yes
5415 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5416 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5417 ;;
5418
5419 sysv4)
5420 case $host_vendor in
5421 sni)
5422 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5423 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5424 ;;
5425 siemens)
5426 ## LD is ld it makes a PLAMLIB
5427 ## CC just makes a GrossModule.
5428 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5429 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5430 _LT_TAGVAR(hardcode_direct, $1)=no
5431 ;;
5432 motorola)
5433 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5434 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5435 ;;
5436 esac
5437 runpath_var='LD_RUN_PATH'
5438 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5439 ;;
5440
5441 sysv4.3*)
5442 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5443 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5444 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
5445 ;;
5446
5447 sysv4*MP*)
5448 if test -d /usr/nec; then
5449 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5450 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5451 runpath_var=LD_RUN_PATH
5452 hardcode_runpath_var=yes
5453 _LT_TAGVAR(ld_shlibs, $1)=yes
5454 fi
5455 ;;
5456
5457 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
5458 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5459 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5460 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5461 runpath_var='LD_RUN_PATH'
5462
5463 if test "$GCC" = yes; then
5464 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5465 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5466 else
5467 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5468 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5469 fi
5470 ;;
5471
5472 sysv5* | sco3.2v5* | sco5v6*)
5473 # Note: We can NOT use -z defs as we might desire, because we do not
5474 # link with -lc, and that would cause any symbols used from libc to
5475 # always be unresolved, which means just about no library would
5476 # ever link correctly. If we're not using GNU ld we use -z text
5477 # though, which does catch some bad symbols but isn't as heavy-handed
5478 # as -z defs.
5479 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5480 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
5481 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5482 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5483 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
5484 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5485 _LT_TAGVAR(link_all_deplibs, $1)=yes
5486 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5487 runpath_var='LD_RUN_PATH'
5488
5489 if test "$GCC" = yes; then
5490 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5491 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5492 else
5493 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5494 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5495 fi
5496 ;;
5497
5498 uts4*)
5499 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5500 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5501 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5502 ;;
5503
5504 *)
5505 _LT_TAGVAR(ld_shlibs, $1)=no
5506 ;;
5507 esac
5508
5509 if test x$host_vendor = xsni; then
5510 case $host in
5511 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5512 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
5513 ;;
5514 esac
5515 fi
5516 fi
5517 ])
5518 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
5519 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5520
5521 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
5522
5523 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
5524 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
5525 _LT_DECL([], [extract_expsyms_cmds], [2],
5526 [The commands to extract the exported symbol list from a shared archive])
5527
5528 #
5529 # Do we need to explicitly link libc?
5530 #
5531 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
5532 x|xyes)
5533 # Assume -lc should be added
5534 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5535
5536 if test "$enable_shared" = yes && test "$GCC" = yes; then
5537 case $_LT_TAGVAR(archive_cmds, $1) in
5538 *'~'*)
5539 # FIXME: we may have to deal with multi-command sequences.
5540 ;;
5541 '$CC '*)
5542 # Test whether the compiler implicitly links with -lc since on some
5543 # systems, -lgcc has to come before -lc. If gcc already passes -lc
5544 # to ld, don't add -lc before -lgcc.
5545 AC_CACHE_CHECK([whether -lc should be explicitly linked in],
5546 [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
5547 [$RM conftest*
5548 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
5549
5550 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5551 soname=conftest
5552 lib=conftest
5553 libobjs=conftest.$ac_objext
5554 deplibs=
5555 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
5556 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
5557 compiler_flags=-v
5558 linker_flags=-v
5559 verstring=
5560 output_objdir=.
5561 libname=conftest
5562 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
5563 _LT_TAGVAR(allow_undefined_flag, $1)=
5564 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
5565 then
5566 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
5567 else
5568 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5569 fi
5570 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5571 else
5572 cat conftest.err 1>&5
5573 fi
5574 $RM conftest*
5575 ])
5576 _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
5577 ;;
5578 esac
5579 fi
5580 ;;
5581 esac
5582
5583 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
5584 [Whether or not to add -lc for building shared libraries])
5585 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
5586 [enable_shared_with_static_runtimes], [0],
5587 [Whether or not to disallow shared libs when runtime libs are static])
5588 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
5589 [Compiler flag to allow reflexive dlopens])
5590 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
5591 [Compiler flag to generate shared objects directly from archives])
5592 _LT_TAGDECL([], [compiler_needs_object], [1],
5593 [Whether the compiler copes with passing no objects directly])
5594 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
5595 [Create an old-style archive from a shared archive])
5596 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
5597 [Create a temporary old-style archive to link instead of a shared archive])
5598 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
5599 _LT_TAGDECL([], [archive_expsym_cmds], [2])
5600 _LT_TAGDECL([], [module_cmds], [2],
5601 [Commands used to build a loadable module if different from building
5602 a shared archive.])
5603 _LT_TAGDECL([], [module_expsym_cmds], [2])
5604 _LT_TAGDECL([], [with_gnu_ld], [1],
5605 [Whether we are building with GNU ld or not])
5606 _LT_TAGDECL([], [allow_undefined_flag], [1],
5607 [Flag that allows shared libraries with undefined symbols to be built])
5608 _LT_TAGDECL([], [no_undefined_flag], [1],
5609 [Flag that enforces no undefined symbols])
5610 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
5611 [Flag to hardcode $libdir into a binary during linking.
5612 This must work even if $libdir does not exist])
5613 _LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
5614 [[If ld is used when linking, flag to hardcode $libdir into a binary
5615 during linking. This must work even if $libdir does not exist]])
5616 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
5617 [Whether we need a single "-rpath" flag with a separated argument])
5618 _LT_TAGDECL([], [hardcode_direct], [0],
5619 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5620 DIR into the resulting binary])
5621 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
5622 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5623 DIR into the resulting binary and the resulting library dependency is
5624 "absolute", i.e impossible to change by setting ${shlibpath_var} if the
5625 library is relocated])
5626 _LT_TAGDECL([], [hardcode_minus_L], [0],
5627 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
5628 into the resulting binary])
5629 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
5630 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
5631 into the resulting binary])
5632 _LT_TAGDECL([], [hardcode_automatic], [0],
5633 [Set to "yes" if building a shared library automatically hardcodes DIR
5634 into the library and all subsequent libraries and executables linked
5635 against it])
5636 _LT_TAGDECL([], [inherit_rpath], [0],
5637 [Set to yes if linker adds runtime paths of dependent libraries
5638 to runtime path list])
5639 _LT_TAGDECL([], [link_all_deplibs], [0],
5640 [Whether libtool must link a program against all its dependency libraries])
5641 _LT_TAGDECL([], [always_export_symbols], [0],
5642 [Set to "yes" if exported symbols are required])
5643 _LT_TAGDECL([], [export_symbols_cmds], [2],
5644 [The commands to list exported symbols])
5645 _LT_TAGDECL([], [exclude_expsyms], [1],
5646 [Symbols that should not be listed in the preloaded symbols])
5647 _LT_TAGDECL([], [include_expsyms], [1],
5648 [Symbols that must always be exported])
5649 _LT_TAGDECL([], [prelink_cmds], [2],
5650 [Commands necessary for linking programs (against libraries) with templates])
5651 _LT_TAGDECL([], [postlink_cmds], [2],
5652 [Commands necessary for finishing linking programs])
5653 _LT_TAGDECL([], [file_list_spec], [1],
5654 [Specify filename containing input files])
5655 dnl FIXME: Not yet implemented
5656 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
5657 dnl [Compiler flag to generate thread safe objects])
5658 ])# _LT_LINKER_SHLIBS
5659
5660
5661 # _LT_LANG_C_CONFIG([TAG])
5662 # ------------------------
5663 # Ensure that the configuration variables for a C compiler are suitably
5664 # defined. These variables are subsequently used by _LT_CONFIG to write
5665 # the compiler configuration to `libtool'.
5666 m4_defun([_LT_LANG_C_CONFIG],
5667 [m4_require([_LT_DECL_EGREP])dnl
5668 lt_save_CC="$CC"
5669 AC_LANG_PUSH(C)
5670
5671 # Source file extension for C test sources.
5672 ac_ext=c
5673
5674 # Object file extension for compiled C test sources.
5675 objext=o
5676 _LT_TAGVAR(objext, $1)=$objext
5677
5678 # Code to be used in simple compile tests
5679 lt_simple_compile_test_code="int some_variable = 0;"
5680
5681 # Code to be used in simple link tests
5682 lt_simple_link_test_code='int main(){return(0);}'
5683
5684 _LT_TAG_COMPILER
5685 # Save the default compiler, since it gets overwritten when the other
5686 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
5687 compiler_DEFAULT=$CC
5688
5689 # save warnings/boilerplate of simple test code
5690 _LT_COMPILER_BOILERPLATE
5691 _LT_LINKER_BOILERPLATE
5692
5693 ## CAVEAT EMPTOR:
5694 ## There is no encapsulation within the following macros, do not change
5695 ## the running order or otherwise move them around unless you know exactly
5696 ## what you are doing...
5697 if test -n "$compiler"; then
5698 _LT_COMPILER_NO_RTTI($1)
5699 _LT_COMPILER_PIC($1)
5700 _LT_COMPILER_C_O($1)
5701 _LT_COMPILER_FILE_LOCKS($1)
5702 _LT_LINKER_SHLIBS($1)
5703 _LT_SYS_DYNAMIC_LINKER($1)
5704 _LT_LINKER_HARDCODE_LIBPATH($1)
5705 LT_SYS_DLOPEN_SELF
5706 _LT_CMD_STRIPLIB
5707
5708 # Report which library types will actually be built
5709 AC_MSG_CHECKING([if libtool supports shared libraries])
5710 AC_MSG_RESULT([$can_build_shared])
5711
5712 AC_MSG_CHECKING([whether to build shared libraries])
5713 test "$can_build_shared" = "no" && enable_shared=no
5714
5715 # On AIX, shared libraries and static libraries use the same namespace, and
5716 # are all built from PIC.
5717 case $host_os in
5718 aix3*)
5719 test "$enable_shared" = yes && enable_static=no
5720 if test -n "$RANLIB"; then
5721 archive_cmds="$archive_cmds~\$RANLIB \$lib"
5722 postinstall_cmds='$RANLIB $lib'
5723 fi
5724 ;;
5725
5726 aix[[4-9]]*)
5727 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
5728 test "$enable_shared" = yes && enable_static=no
5729 fi
5730 ;;
5731 esac
5732 AC_MSG_RESULT([$enable_shared])
5733
5734 AC_MSG_CHECKING([whether to build static libraries])
5735 # Make sure either enable_shared or enable_static is yes.
5736 test "$enable_shared" = yes || enable_static=yes
5737 AC_MSG_RESULT([$enable_static])
5738
5739 _LT_CONFIG($1)
5740 fi
5741 AC_LANG_POP
5742 CC="$lt_save_CC"
5743 ])# _LT_LANG_C_CONFIG
5744
5745
5746 # _LT_LANG_CXX_CONFIG([TAG])
5747 # --------------------------
5748 # Ensure that the configuration variables for a C++ compiler are suitably
5749 # defined. These variables are subsequently used by _LT_CONFIG to write
5750 # the compiler configuration to `libtool'.
5751 m4_defun([_LT_LANG_CXX_CONFIG],
5752 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5753 m4_require([_LT_DECL_EGREP])dnl
5754 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
5755 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
5756 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
5757 (test "X$CXX" != "Xg++"))) ; then
5758 AC_PROG_CXXCPP
5759 else
5760 _lt_caught_CXX_error=yes
5761 fi
5762
5763 AC_LANG_PUSH(C++)
5764 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5765 _LT_TAGVAR(allow_undefined_flag, $1)=
5766 _LT_TAGVAR(always_export_symbols, $1)=no
5767 _LT_TAGVAR(archive_expsym_cmds, $1)=
5768 _LT_TAGVAR(compiler_needs_object, $1)=no
5769 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5770 _LT_TAGVAR(hardcode_direct, $1)=no
5771 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5772 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5773 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5774 _LT_TAGVAR(hardcode_libdir_separator, $1)=
5775 _LT_TAGVAR(hardcode_minus_L, $1)=no
5776 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5777 _LT_TAGVAR(hardcode_automatic, $1)=no
5778 _LT_TAGVAR(inherit_rpath, $1)=no
5779 _LT_TAGVAR(module_cmds, $1)=
5780 _LT_TAGVAR(module_expsym_cmds, $1)=
5781 _LT_TAGVAR(link_all_deplibs, $1)=unknown
5782 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5783 _LT_TAGVAR(reload_flag, $1)=$reload_flag
5784 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
5785 _LT_TAGVAR(no_undefined_flag, $1)=
5786 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5787 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5788
5789 # Source file extension for C++ test sources.
5790 ac_ext=cpp
5791
5792 # Object file extension for compiled C++ test sources.
5793 objext=o
5794 _LT_TAGVAR(objext, $1)=$objext
5795
5796 # No sense in running all these tests if we already determined that
5797 # the CXX compiler isn't working. Some variables (like enable_shared)
5798 # are currently assumed to apply to all compilers on this platform,
5799 # and will be corrupted by setting them based on a non-working compiler.
5800 if test "$_lt_caught_CXX_error" != yes; then
5801 # Code to be used in simple compile tests
5802 lt_simple_compile_test_code="int some_variable = 0;"
5803
5804 # Code to be used in simple link tests
5805 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
5806
5807 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5808 _LT_TAG_COMPILER
5809
5810 # save warnings/boilerplate of simple test code
5811 _LT_COMPILER_BOILERPLATE
5812 _LT_LINKER_BOILERPLATE
5813
5814 # Allow CC to be a program name with arguments.
5815 lt_save_CC=$CC
5816 lt_save_CFLAGS=$CFLAGS
5817 lt_save_LD=$LD
5818 lt_save_GCC=$GCC
5819 GCC=$GXX
5820 lt_save_with_gnu_ld=$with_gnu_ld
5821 lt_save_path_LD=$lt_cv_path_LD
5822 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
5823 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
5824 else
5825 $as_unset lt_cv_prog_gnu_ld
5826 fi
5827 if test -n "${lt_cv_path_LDCXX+set}"; then
5828 lt_cv_path_LD=$lt_cv_path_LDCXX
5829 else
5830 $as_unset lt_cv_path_LD
5831 fi
5832 test -z "${LDCXX+set}" || LD=$LDCXX
5833 CC=${CXX-"c++"}
5834 CFLAGS=$CXXFLAGS
5835 compiler=$CC
5836 _LT_TAGVAR(compiler, $1)=$CC
5837 _LT_CC_BASENAME([$compiler])
5838
5839 if test -n "$compiler"; then
5840 # We don't want -fno-exception when compiling C++ code, so set the
5841 # no_builtin_flag separately
5842 if test "$GXX" = yes; then
5843 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5844 else
5845 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5846 fi
5847
5848 if test "$GXX" = yes; then
5849 # Set up default GNU C++ configuration
5850
5851 LT_PATH_LD
5852
5853 # Check if GNU C++ uses GNU ld as the underlying linker, since the
5854 # archiving commands below assume that GNU ld is being used.
5855 if test "$with_gnu_ld" = yes; then
5856 _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5857 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5858
5859 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5860 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5861
5862 # If archive_cmds runs LD, not CC, wlarc should be empty
5863 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
5864 # investigate it a little bit more. (MM)
5865 wlarc='${wl}'
5866
5867 # ancient GNU ld didn't support --whole-archive et. al.
5868 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
5869 $GREP 'no-whole-archive' > /dev/null; then
5870 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5871 else
5872 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5873 fi
5874 else
5875 with_gnu_ld=no
5876 wlarc=
5877
5878 # A generic and very simple default shared library creation
5879 # command for GNU C++ for the case where it uses the native
5880 # linker, instead of GNU ld. If possible, this setting should
5881 # overridden to take advantage of the native linker features on
5882 # the platform it is being used on.
5883 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
5884 fi
5885
5886 # Commands to make compiler produce verbose output that lists
5887 # what "hidden" libraries, object files and flags are used when
5888 # linking a shared library.
5889 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
5890
5891 else
5892 GXX=no
5893 with_gnu_ld=no
5894 wlarc=
5895 fi
5896
5897 # PORTME: fill in a description of your system's C++ link characteristics
5898 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5899 _LT_TAGVAR(ld_shlibs, $1)=yes
5900 case $host_os in
5901 aix3*)
5902 # FIXME: insert proper C++ library support
5903 _LT_TAGVAR(ld_shlibs, $1)=no
5904 ;;
5905 aix[[4-9]]*)
5906 if test "$host_cpu" = ia64; then
5907 # On IA64, the linker does run time linking by default, so we don't
5908 # have to do anything special.
5909 aix_use_runtimelinking=no
5910 exp_sym_flag='-Bexport'
5911 no_entry_flag=""
5912 else
5913 aix_use_runtimelinking=no
5914
5915 # Test if we are trying to use run time linking or normal
5916 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5917 # need to do runtime linking.
5918 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5919 for ld_flag in $LDFLAGS; do
5920 case $ld_flag in
5921 *-brtl*)
5922 aix_use_runtimelinking=yes
5923 break
5924 ;;
5925 esac
5926 done
5927 ;;
5928 esac
5929
5930 exp_sym_flag='-bexport'
5931 no_entry_flag='-bnoentry'
5932 fi
5933
5934 # When large executables or shared objects are built, AIX ld can
5935 # have problems creating the table of contents. If linking a library
5936 # or program results in "error TOC overflow" add -mminimal-toc to
5937 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5938 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5939
5940 _LT_TAGVAR(archive_cmds, $1)=''
5941 _LT_TAGVAR(hardcode_direct, $1)=yes
5942 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5943 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5944 _LT_TAGVAR(link_all_deplibs, $1)=yes
5945 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
5946
5947 if test "$GXX" = yes; then
5948 case $host_os in aix4.[[012]]|aix4.[[012]].*)
5949 # We only want to do this on AIX 4.2 and lower, the check
5950 # below for broken collect2 doesn't work under 4.3+
5951 collect2name=`${CC} -print-prog-name=collect2`
5952 if test -f "$collect2name" &&
5953 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5954 then
5955 # We have reworked collect2
5956 :
5957 else
5958 # We have old collect2
5959 _LT_TAGVAR(hardcode_direct, $1)=unsupported
5960 # It fails to find uninstalled libraries when the uninstalled
5961 # path is not listed in the libpath. Setting hardcode_minus_L
5962 # to unsupported forces relinking
5963 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5964 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5965 _LT_TAGVAR(hardcode_libdir_separator, $1)=
5966 fi
5967 esac
5968 shared_flag='-shared'
5969 if test "$aix_use_runtimelinking" = yes; then
5970 shared_flag="$shared_flag "'${wl}-G'
5971 fi
5972 else
5973 # not using gcc
5974 if test "$host_cpu" = ia64; then
5975 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5976 # chokes on -Wl,-G. The following line is correct:
5977 shared_flag='-G'
5978 else
5979 if test "$aix_use_runtimelinking" = yes; then
5980 shared_flag='${wl}-G'
5981 else
5982 shared_flag='${wl}-bM:SRE'
5983 fi
5984 fi
5985 fi
5986
5987 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
5988 # It seems that -bexpall does not export symbols beginning with
5989 # underscore (_), so it is better to generate a list of symbols to
5990 # export.
5991 _LT_TAGVAR(always_export_symbols, $1)=yes
5992 if test "$aix_use_runtimelinking" = yes; then
5993 # Warning - without using the other runtime loading flags (-brtl),
5994 # -berok will link without error, but may produce a broken library.
5995 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5996 # Determine the default libpath from the value encoded in an empty
5997 # executable.
5998 _LT_SYS_MODULE_PATH_AIX([$1])
5999 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6000
6001 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
6002 else
6003 if test "$host_cpu" = ia64; then
6004 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6005 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6006 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
6007 else
6008 # Determine the default libpath from the value encoded in an
6009 # empty executable.
6010 _LT_SYS_MODULE_PATH_AIX([$1])
6011 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6012 # Warning - without using the other run time loading flags,
6013 # -berok will link without error, but may produce a broken library.
6014 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6015 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6016 if test "$with_gnu_ld" = yes; then
6017 # We only use this code for GNU lds that support --whole-archive.
6018 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6019 else
6020 # Exported symbols can be pulled into shared objects from archives
6021 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6022 fi
6023 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6024 # This is similar to how AIX traditionally builds its shared
6025 # libraries.
6026 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
6027 fi
6028 fi
6029 ;;
6030
6031 beos*)
6032 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6033 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6034 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6035 # support --undefined. This deserves some investigation. FIXME
6036 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6037 else
6038 _LT_TAGVAR(ld_shlibs, $1)=no
6039 fi
6040 ;;
6041
6042 chorus*)
6043 case $cc_basename in
6044 *)
6045 # FIXME: insert proper C++ library support
6046 _LT_TAGVAR(ld_shlibs, $1)=no
6047 ;;
6048 esac
6049 ;;
6050
6051 cygwin* | mingw* | pw32* | cegcc*)
6052 case $GXX,$cc_basename in
6053 ,cl* | no,cl*)
6054 # Native MSVC
6055 # hardcode_libdir_flag_spec is actually meaningless, as there is
6056 # no search path for DLLs.
6057 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6058 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6059 _LT_TAGVAR(always_export_symbols, $1)=yes
6060 _LT_TAGVAR(file_list_spec, $1)='@'
6061 # Tell ltmain to make .lib files, not .a files.
6062 libext=lib
6063 # Tell ltmain to make .dll files, not .so files.
6064 shrext_cmds=".dll"
6065 # FIXME: Setting linknames here is a bad hack.
6066 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
6067 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6068 $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
6069 else
6070 $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
6071 fi~
6072 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6073 linknames='
6074 # The linker will not automatically build a static lib if we build a DLL.
6075 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6076 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6077 # Don't use ranlib
6078 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6079 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6080 lt_tool_outputfile="@TOOL_OUTPUT@"~
6081 case $lt_outputfile in
6082 *.exe|*.EXE) ;;
6083 *)
6084 lt_outputfile="$lt_outputfile.exe"
6085 lt_tool_outputfile="$lt_tool_outputfile.exe"
6086 ;;
6087 esac~
6088 func_to_tool_file "$lt_outputfile"~
6089 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
6090 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6091 $RM "$lt_outputfile.manifest";
6092 fi'
6093 ;;
6094 *)
6095 # g++
6096 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6097 # as there is no search path for DLLs.
6098 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6099 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
6100 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6101 _LT_TAGVAR(always_export_symbols, $1)=no
6102 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6103
6104 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6105 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6106 # If the export-symbols file already is a .def file (1st line
6107 # is EXPORTS), use it as is; otherwise, prepend...
6108 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6109 cp $export_symbols $output_objdir/$soname.def;
6110 else
6111 echo EXPORTS > $output_objdir/$soname.def;
6112 cat $export_symbols >> $output_objdir/$soname.def;
6113 fi~
6114 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6115 else
6116 _LT_TAGVAR(ld_shlibs, $1)=no
6117 fi
6118 ;;
6119 esac
6120 ;;
6121 darwin* | rhapsody*)
6122 _LT_DARWIN_LINKER_FEATURES($1)
6123 ;;
6124
6125 dgux*)
6126 case $cc_basename in
6127 ec++*)
6128 # FIXME: insert proper C++ library support
6129 _LT_TAGVAR(ld_shlibs, $1)=no
6130 ;;
6131 ghcx*)
6132 # Green Hills C++ Compiler
6133 # FIXME: insert proper C++ library support
6134 _LT_TAGVAR(ld_shlibs, $1)=no
6135 ;;
6136 *)
6137 # FIXME: insert proper C++ library support
6138 _LT_TAGVAR(ld_shlibs, $1)=no
6139 ;;
6140 esac
6141 ;;
6142
6143 freebsd[[12]]*)
6144 # C++ shared libraries reported to be fairly broken before
6145 # switch to ELF
6146 _LT_TAGVAR(ld_shlibs, $1)=no
6147 ;;
6148
6149 freebsd-elf*)
6150 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6151 ;;
6152
6153 freebsd* | dragonfly*)
6154 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
6155 # conventions
6156 _LT_TAGVAR(ld_shlibs, $1)=yes
6157 ;;
6158
6159 gnu*)
6160 ;;
6161
6162 haiku*)
6163 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6164 _LT_TAGVAR(link_all_deplibs, $1)=yes
6165 ;;
6166
6167 hpux9*)
6168 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6169 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6170 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6171 _LT_TAGVAR(hardcode_direct, $1)=yes
6172 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6173 # but as the default
6174 # location of the library.
6175
6176 case $cc_basename in
6177 CC*)
6178 # FIXME: insert proper C++ library support
6179 _LT_TAGVAR(ld_shlibs, $1)=no
6180 ;;
6181 aCC*)
6182 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6183 # Commands to make compiler produce verbose output that lists
6184 # what "hidden" libraries, object files and flags are used when
6185 # linking a shared library.
6186 #
6187 # There doesn't appear to be a way to prevent this compiler from
6188 # explicitly linking system object files so we need to strip them
6189 # from the output so that they don't get included in the library
6190 # dependencies.
6191 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
6192 ;;
6193 *)
6194 if test "$GXX" = yes; then
6195 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6196 else
6197 # FIXME: insert proper C++ library support
6198 _LT_TAGVAR(ld_shlibs, $1)=no
6199 fi
6200 ;;
6201 esac
6202 ;;
6203
6204 hpux10*|hpux11*)
6205 if test $with_gnu_ld = no; then
6206 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6207 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6208
6209 case $host_cpu in
6210 hppa*64*|ia64*)
6211 ;;
6212 *)
6213 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6214 ;;
6215 esac
6216 fi
6217 case $host_cpu in
6218 hppa*64*|ia64*)
6219 _LT_TAGVAR(hardcode_direct, $1)=no
6220 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6221 ;;
6222 *)
6223 _LT_TAGVAR(hardcode_direct, $1)=yes
6224 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6225 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6226 # but as the default
6227 # location of the library.
6228 ;;
6229 esac
6230
6231 case $cc_basename in
6232 CC*)
6233 # FIXME: insert proper C++ library support
6234 _LT_TAGVAR(ld_shlibs, $1)=no
6235 ;;
6236 aCC*)
6237 case $host_cpu in
6238 hppa*64*)
6239 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6240 ;;
6241 ia64*)
6242 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6243 ;;
6244 *)
6245 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6246 ;;
6247 esac
6248 # Commands to make compiler produce verbose output that lists
6249 # what "hidden" libraries, object files and flags are used when
6250 # linking a shared library.
6251 #
6252 # There doesn't appear to be a way to prevent this compiler from
6253 # explicitly linking system object files so we need to strip them
6254 # from the output so that they don't get included in the library
6255 # dependencies.
6256 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
6257 ;;
6258 *)
6259 if test "$GXX" = yes; then
6260 if test $with_gnu_ld = no; then
6261 case $host_cpu in
6262 hppa*64*)
6263 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6264 ;;
6265 ia64*)
6266 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6267 ;;
6268 *)
6269 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6270 ;;
6271 esac
6272 fi
6273 else
6274 # FIXME: insert proper C++ library support
6275 _LT_TAGVAR(ld_shlibs, $1)=no
6276 fi
6277 ;;
6278 esac
6279 ;;
6280
6281 interix[[3-9]]*)
6282 _LT_TAGVAR(hardcode_direct, $1)=no
6283 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6284 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6285 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6286 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6287 # Instead, shared libraries are loaded at an image base (0x10000000 by
6288 # default) and relocated if they conflict, which is a slow very memory
6289 # consuming and fragmenting process. To avoid this, we pick a random,
6290 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6291 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
6292 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
6293 _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
6294 ;;
6295 irix5* | irix6*)
6296 case $cc_basename in
6297 CC*)
6298 # SGI C++
6299 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6300
6301 # Archives containing C++ object files must be created using
6302 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
6303 # necessary to make sure instantiated templates are included
6304 # in the archive.
6305 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
6306 ;;
6307 *)
6308 if test "$GXX" = yes; then
6309 if test "$with_gnu_ld" = no; then
6310 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6311 else
6312 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
6313 fi
6314 fi
6315 _LT_TAGVAR(link_all_deplibs, $1)=yes
6316 ;;
6317 esac
6318 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6319 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6320 _LT_TAGVAR(inherit_rpath, $1)=yes
6321 ;;
6322
6323 linux* | k*bsd*-gnu | kopensolaris*-gnu)
6324 case $cc_basename in
6325 KCC*)
6326 # Kuck and Associates, Inc. (KAI) C++ Compiler
6327
6328 # KCC will only create a shared library if the output file
6329 # ends with ".so" (or ".sl" for HP-UX), so rename the library
6330 # to its proper name (with version) after linking.
6331 _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
6332 _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
6333 # Commands to make compiler produce verbose output that lists
6334 # what "hidden" libraries, object files and flags are used when
6335 # linking a shared library.
6336 #
6337 # There doesn't appear to be a way to prevent this compiler from
6338 # explicitly linking system object files so we need to strip them
6339 # from the output so that they don't get included in the library
6340 # dependencies.
6341 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
6342
6343 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6344 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6345
6346 # Archives containing C++ object files must be created using
6347 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
6348 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
6349 ;;
6350 icpc* | ecpc* )
6351 # Intel C++
6352 with_gnu_ld=yes
6353 # version 8.0 and above of icpc choke on multiply defined symbols
6354 # if we add $predep_objects and $postdep_objects, however 7.1 and
6355 # earlier do not add the objects themselves.
6356 case `$CC -V 2>&1` in
6357 *"Version 7."*)
6358 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6359 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6360 ;;
6361 *) # Version 8.0 or newer
6362 tmp_idyn=
6363 case $host_cpu in
6364 ia64*) tmp_idyn=' -i_dynamic';;
6365 esac
6366 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6367 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6368 ;;
6369 esac
6370 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6371 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6372 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6373 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6374 ;;
6375 pgCC* | pgcpp*)
6376 # Portland Group C++ compiler
6377 case `$CC -V` in
6378 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
6379 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
6380 rm -rf $tpldir~
6381 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
6382 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
6383 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
6384 rm -rf $tpldir~
6385 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
6386 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
6387 $RANLIB $oldlib'
6388 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
6389 rm -rf $tpldir~
6390 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6391 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6392 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
6393 rm -rf $tpldir~
6394 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6395 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
6396 ;;
6397 *) # Version 6 and above use weak symbols
6398 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6399 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
6400 ;;
6401 esac
6402
6403 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6404 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6405 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
6406 ;;
6407 cxx*)
6408 # Compaq C++
6409 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6410 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
6411
6412 runpath_var=LD_RUN_PATH
6413 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6414 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6415
6416 # Commands to make compiler produce verbose output that lists
6417 # what "hidden" libraries, object files and flags are used when
6418 # linking a shared library.
6419 #
6420 # There doesn't appear to be a way to prevent this compiler from
6421 # explicitly linking system object files so we need to strip them
6422 # from the output so that they don't get included in the library
6423 # dependencies.
6424 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
6425 ;;
6426 xl* | mpixl* | bgxl*)
6427 # IBM XL 8.0 on PPC, with GNU ld
6428 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6429 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6430 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6431 if test "x$supports_anon_versioning" = xyes; then
6432 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6433 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6434 echo "local: *; };" >> $output_objdir/$libname.ver~
6435 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6436 fi
6437 ;;
6438 *)
6439 case `$CC -V 2>&1 | sed 5q` in
6440 *Sun\ C*)
6441 # Sun C++ 5.9
6442 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6443 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6444 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
6445 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6446 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
6447 _LT_TAGVAR(compiler_needs_object, $1)=yes
6448
6449 # Not sure whether something based on
6450 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
6451 # would be better.
6452 output_verbose_link_cmd='func_echo_all'
6453
6454 # Archives containing C++ object files must be created using
6455 # "CC -xar", where "CC" is the Sun C++ compiler. This is
6456 # necessary to make sure instantiated templates are included
6457 # in the archive.
6458 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6459 ;;
6460 esac
6461 ;;
6462 esac
6463 ;;
6464
6465 lynxos*)
6466 # FIXME: insert proper C++ library support
6467 _LT_TAGVAR(ld_shlibs, $1)=no
6468 ;;
6469
6470 m88k*)
6471 # FIXME: insert proper C++ library support
6472 _LT_TAGVAR(ld_shlibs, $1)=no
6473 ;;
6474
6475 mvs*)
6476 case $cc_basename in
6477 cxx*)
6478 # FIXME: insert proper C++ library support
6479 _LT_TAGVAR(ld_shlibs, $1)=no
6480 ;;
6481 *)
6482 # FIXME: insert proper C++ library support
6483 _LT_TAGVAR(ld_shlibs, $1)=no
6484 ;;
6485 esac
6486 ;;
6487
6488 netbsd*)
6489 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6490 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
6491 wlarc=
6492 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6493 _LT_TAGVAR(hardcode_direct, $1)=yes
6494 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6495 fi
6496 # Workaround some broken pre-1.5 toolchains
6497 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
6498 ;;
6499
6500 *nto* | *qnx*)
6501 _LT_TAGVAR(ld_shlibs, $1)=yes
6502 ;;
6503
6504 openbsd2*)
6505 # C++ shared libraries are fairly broken
6506 _LT_TAGVAR(ld_shlibs, $1)=no
6507 ;;
6508
6509 openbsd*)
6510 if test -f /usr/libexec/ld.so; then
6511 _LT_TAGVAR(hardcode_direct, $1)=yes
6512 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6513 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6514 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6515 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6516 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6517 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
6518 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6519 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6520 fi
6521 output_verbose_link_cmd=func_echo_all
6522 else
6523 _LT_TAGVAR(ld_shlibs, $1)=no
6524 fi
6525 ;;
6526
6527 osf3* | osf4* | osf5*)
6528 case $cc_basename in
6529 KCC*)
6530 # Kuck and Associates, Inc. (KAI) C++ Compiler
6531
6532 # KCC will only create a shared library if the output file
6533 # ends with ".so" (or ".sl" for HP-UX), so rename the library
6534 # to its proper name (with version) after linking.
6535 _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
6536
6537 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6538 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6539
6540 # Archives containing C++ object files must be created using
6541 # the KAI C++ compiler.
6542 case $host in
6543 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
6544 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
6545 esac
6546 ;;
6547 RCC*)
6548 # Rational C++ 2.4.1
6549 # FIXME: insert proper C++ library support
6550 _LT_TAGVAR(ld_shlibs, $1)=no
6551 ;;
6552 cxx*)
6553 case $host in
6554 osf3*)
6555 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6556 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6557 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6558 ;;
6559 *)
6560 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6561 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6562 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
6563 echo "-hidden">> $lib.exp~
6564 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~
6565 $RM $lib.exp'
6566 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6567 ;;
6568 esac
6569
6570 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6571
6572 # Commands to make compiler produce verbose output that lists
6573 # what "hidden" libraries, object files and flags are used when
6574 # linking a shared library.
6575 #
6576 # There doesn't appear to be a way to prevent this compiler from
6577 # explicitly linking system object files so we need to strip them
6578 # from the output so that they don't get included in the library
6579 # dependencies.
6580 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
6581 ;;
6582 *)
6583 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6584 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6585 case $host in
6586 osf3*)
6587 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6588 ;;
6589 *)
6590 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6591 ;;
6592 esac
6593
6594 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6595 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6596
6597 # Commands to make compiler produce verbose output that lists
6598 # what "hidden" libraries, object files and flags are used when
6599 # linking a shared library.
6600 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6601
6602 else
6603 # FIXME: insert proper C++ library support
6604 _LT_TAGVAR(ld_shlibs, $1)=no
6605 fi
6606 ;;
6607 esac
6608 ;;
6609
6610 psos*)
6611 # FIXME: insert proper C++ library support
6612 _LT_TAGVAR(ld_shlibs, $1)=no
6613 ;;
6614
6615 sunos4*)
6616 case $cc_basename in
6617 CC*)
6618 # Sun C++ 4.x
6619 # FIXME: insert proper C++ library support
6620 _LT_TAGVAR(ld_shlibs, $1)=no
6621 ;;
6622 lcc*)
6623 # Lucid
6624 # FIXME: insert proper C++ library support
6625 _LT_TAGVAR(ld_shlibs, $1)=no
6626 ;;
6627 *)
6628 # FIXME: insert proper C++ library support
6629 _LT_TAGVAR(ld_shlibs, $1)=no
6630 ;;
6631 esac
6632 ;;
6633
6634 solaris*)
6635 case $cc_basename in
6636 CC* | sunCC*)
6637 # Sun C++ 4.2, 5.x and Centerline C++
6638 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
6639 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6640 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6641 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6642 $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6643
6644 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6645 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6646 case $host_os in
6647 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6648 *)
6649 # The compiler driver will combine and reorder linker options,
6650 # but understands `-z linker_flag'.
6651 # Supported since Solaris 2.6 (maybe 2.5.1?)
6652 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6653 ;;
6654 esac
6655 _LT_TAGVAR(link_all_deplibs, $1)=yes
6656
6657 output_verbose_link_cmd='func_echo_all'
6658
6659 # Archives containing C++ object files must be created using
6660 # "CC -xar", where "CC" is the Sun C++ compiler. This is
6661 # necessary to make sure instantiated templates are included
6662 # in the archive.
6663 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6664 ;;
6665 gcx*)
6666 # Green Hills C++ Compiler
6667 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6668
6669 # The C++ compiler must be used to create the archive.
6670 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
6671 ;;
6672 *)
6673 # GNU C++ compiler with Solaris linker
6674 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6675 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
6676 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
6677 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6678 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6679 $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6680
6681 # Commands to make compiler produce verbose output that lists
6682 # what "hidden" libraries, object files and flags are used when
6683 # linking a shared library.
6684 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6685 else
6686 # g++ 2.7 appears to require `-G' NOT `-shared' on this
6687 # platform.
6688 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6689 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6690 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6691
6692 # Commands to make compiler produce verbose output that lists
6693 # what "hidden" libraries, object files and flags are used when
6694 # linking a shared library.
6695 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6696 fi
6697
6698 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
6699 case $host_os in
6700 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6701 *)
6702 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6703 ;;
6704 esac
6705 fi
6706 ;;
6707 esac
6708 ;;
6709
6710 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6711 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6712 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6713 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6714 runpath_var='LD_RUN_PATH'
6715
6716 case $cc_basename in
6717 CC*)
6718 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6719 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6720 ;;
6721 *)
6722 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6723 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6724 ;;
6725 esac
6726 ;;
6727
6728 sysv5* | sco3.2v5* | sco5v6*)
6729 # Note: We can NOT use -z defs as we might desire, because we do not
6730 # link with -lc, and that would cause any symbols used from libc to
6731 # always be unresolved, which means just about no library would
6732 # ever link correctly. If we're not using GNU ld we use -z text
6733 # though, which does catch some bad symbols but isn't as heavy-handed
6734 # as -z defs.
6735 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6736 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6737 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6738 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6739 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6740 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6741 _LT_TAGVAR(link_all_deplibs, $1)=yes
6742 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6743 runpath_var='LD_RUN_PATH'
6744
6745 case $cc_basename in
6746 CC*)
6747 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6748 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6749 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
6750 '"$_LT_TAGVAR(old_archive_cmds, $1)"
6751 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
6752 '"$_LT_TAGVAR(reload_cmds, $1)"
6753 ;;
6754 *)
6755 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6756 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6757 ;;
6758 esac
6759 ;;
6760
6761 tandem*)
6762 case $cc_basename in
6763 NCC*)
6764 # NonStop-UX NCC 3.20
6765 # FIXME: insert proper C++ library support
6766 _LT_TAGVAR(ld_shlibs, $1)=no
6767 ;;
6768 *)
6769 # FIXME: insert proper C++ library support
6770 _LT_TAGVAR(ld_shlibs, $1)=no
6771 ;;
6772 esac
6773 ;;
6774
6775 vxworks*)
6776 # FIXME: insert proper C++ library support
6777 _LT_TAGVAR(ld_shlibs, $1)=no
6778 ;;
6779
6780 *)
6781 # FIXME: insert proper C++ library support
6782 _LT_TAGVAR(ld_shlibs, $1)=no
6783 ;;
6784 esac
6785
6786 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6787 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6788
6789 _LT_TAGVAR(GCC, $1)="$GXX"
6790 _LT_TAGVAR(LD, $1)="$LD"
6791
6792 ## CAVEAT EMPTOR:
6793 ## There is no encapsulation within the following macros, do not change
6794 ## the running order or otherwise move them around unless you know exactly
6795 ## what you are doing...
6796 _LT_SYS_HIDDEN_LIBDEPS($1)
6797 _LT_COMPILER_PIC($1)
6798 _LT_COMPILER_C_O($1)
6799 _LT_COMPILER_FILE_LOCKS($1)
6800 _LT_LINKER_SHLIBS($1)
6801 _LT_SYS_DYNAMIC_LINKER($1)
6802 _LT_LINKER_HARDCODE_LIBPATH($1)
6803
6804 _LT_CONFIG($1)
6805 fi # test -n "$compiler"
6806
6807 CC=$lt_save_CC
6808 CFLAGS=$lt_save_CFLAGS
6809 LDCXX=$LD
6810 LD=$lt_save_LD
6811 GCC=$lt_save_GCC
6812 with_gnu_ld=$lt_save_with_gnu_ld
6813 lt_cv_path_LDCXX=$lt_cv_path_LD
6814 lt_cv_path_LD=$lt_save_path_LD
6815 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
6816 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
6817 fi # test "$_lt_caught_CXX_error" != yes
6818
6819 AC_LANG_POP
6820 ])# _LT_LANG_CXX_CONFIG
6821
6822
6823 # _LT_FUNC_STRIPNAME_CNF
6824 # ----------------------
6825 # func_stripname_cnf prefix suffix name
6826 # strip PREFIX and SUFFIX off of NAME.
6827 # PREFIX and SUFFIX must not contain globbing or regex special
6828 # characters, hashes, percent signs, but SUFFIX may contain a leading
6829 # dot (in which case that matches only a dot).
6830 #
6831 # This function is identical to the (non-XSI) version of func_stripname,
6832 # except this one can be used by m4 code that may be executed by configure,
6833 # rather than the libtool script.
6834 m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
6835 AC_REQUIRE([_LT_DECL_SED])
6836 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
6837 func_stripname_cnf ()
6838 {
6839 case ${2} in
6840 .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
6841 *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
6842 esac
6843 } # func_stripname_cnf
6844 ])# _LT_FUNC_STRIPNAME_CNF
6845
6846 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
6847 # ---------------------------------
6848 # Figure out "hidden" library dependencies from verbose
6849 # compiler output when linking a shared library.
6850 # Parse the compiler output and extract the necessary
6851 # objects, libraries and library flags.
6852 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
6853 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6854 AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
6855 # Dependencies to place before and after the object being linked:
6856 _LT_TAGVAR(predep_objects, $1)=
6857 _LT_TAGVAR(postdep_objects, $1)=
6858 _LT_TAGVAR(predeps, $1)=
6859 _LT_TAGVAR(postdeps, $1)=
6860 _LT_TAGVAR(compiler_lib_search_path, $1)=
6861
6862 dnl we can't use the lt_simple_compile_test_code here,
6863 dnl because it contains code intended for an executable,
6864 dnl not a library. It's possible we should let each
6865 dnl tag define a new lt_????_link_test_code variable,
6866 dnl but it's only used here...
6867 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
6868 int a;
6869 void foo (void) { a = 0; }
6870 _LT_EOF
6871 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
6872 class Foo
6873 {
6874 public:
6875 Foo (void) { a = 0; }
6876 private:
6877 int a;
6878 };
6879 _LT_EOF
6880 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
6881 subroutine foo
6882 implicit none
6883 integer*4 a
6884 a=0
6885 return
6886 end
6887 _LT_EOF
6888 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
6889 subroutine foo
6890 implicit none
6891 integer a
6892 a=0
6893 return
6894 end
6895 _LT_EOF
6896 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
6897 public class foo {
6898 private int a;
6899 public void bar (void) {
6900 a = 0;
6901 }
6902 };
6903 _LT_EOF
6904 ])
6905
6906 _lt_libdeps_save_CFLAGS=$CFLAGS
6907 case "$CC $CFLAGS " in #(
6908 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
6909 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
6910 esac
6911
6912 dnl Parse the compiler output and extract the necessary
6913 dnl objects, libraries and library flags.
6914 if AC_TRY_EVAL(ac_compile); then
6915 # Parse the compiler output and extract the necessary
6916 # objects, libraries and library flags.
6917
6918 # Sentinel used to keep track of whether or not we are before
6919 # the conftest object file.
6920 pre_test_object_deps_done=no
6921
6922 for p in `eval "$output_verbose_link_cmd"`; do
6923 case ${prev}${p} in
6924
6925 -L* | -R* | -l*)
6926 # Some compilers place space between "-{L,R}" and the path.
6927 # Remove the space.
6928 if test $p = "-L" ||
6929 test $p = "-R"; then
6930 prev=$p
6931 continue
6932 fi
6933
6934 # Expand the sysroot to ease extracting the directories later.
6935 if test -z "$prev"; then
6936 case $p in
6937 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
6938 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
6939 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
6940 esac
6941 fi
6942 case $p in
6943 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
6944 esac
6945 if test "$pre_test_object_deps_done" = no; then
6946 case ${prev} in
6947 -L | -R)
6948 # Internal compiler library paths should come after those
6949 # provided the user. The postdeps already come after the
6950 # user supplied libs so there is no need to process them.
6951 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
6952 _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
6953 else
6954 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
6955 fi
6956 ;;
6957 # The "-l" case would never come before the object being
6958 # linked, so don't bother handling this case.
6959 esac
6960 else
6961 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
6962 _LT_TAGVAR(postdeps, $1)="${prev}${p}"
6963 else
6964 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
6965 fi
6966 fi
6967 prev=
6968 ;;
6969
6970 *.lto.$objext) ;; # Ignore GCC LTO objects
6971 *.$objext)
6972 # This assumes that the test object file only shows up
6973 # once in the compiler output.
6974 if test "$p" = "conftest.$objext"; then
6975 pre_test_object_deps_done=yes
6976 continue
6977 fi
6978
6979 if test "$pre_test_object_deps_done" = no; then
6980 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
6981 _LT_TAGVAR(predep_objects, $1)="$p"
6982 else
6983 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
6984 fi
6985 else
6986 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
6987 _LT_TAGVAR(postdep_objects, $1)="$p"
6988 else
6989 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
6990 fi
6991 fi
6992 ;;
6993
6994 *) ;; # Ignore the rest.
6995
6996 esac
6997 done
6998
6999 # Clean up.
7000 rm -f a.out a.exe
7001 else
7002 echo "libtool.m4: error: problem compiling $1 test program"
7003 fi
7004
7005 $RM -f confest.$objext
7006 CFLAGS=$_lt_libdeps_save_CFLAGS
7007
7008 # PORTME: override above test on systems where it is broken
7009 m4_if([$1], [CXX],
7010 [case $host_os in
7011 interix[[3-9]]*)
7012 # Interix 3.5 installs completely hosed .la files for C++, so rather than
7013 # hack all around it, let's just trust "g++" to DTRT.
7014 _LT_TAGVAR(predep_objects,$1)=
7015 _LT_TAGVAR(postdep_objects,$1)=
7016 _LT_TAGVAR(postdeps,$1)=
7017 ;;
7018
7019 linux*)
7020 case `$CC -V 2>&1 | sed 5q` in
7021 *Sun\ C*)
7022 # Sun C++ 5.9
7023
7024 # The more standards-conforming stlport4 library is
7025 # incompatible with the Cstd library. Avoid specifying
7026 # it if it's in CXXFLAGS. Ignore libCrun as
7027 # -library=stlport4 depends on it.
7028 case " $CXX $CXXFLAGS " in
7029 *" -library=stlport4 "*)
7030 solaris_use_stlport4=yes
7031 ;;
7032 esac
7033
7034 if test "$solaris_use_stlport4" != yes; then
7035 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7036 fi
7037 ;;
7038 esac
7039 ;;
7040
7041 solaris*)
7042 case $cc_basename in
7043 CC* | sunCC*)
7044 # The more standards-conforming stlport4 library is
7045 # incompatible with the Cstd library. Avoid specifying
7046 # it if it's in CXXFLAGS. Ignore libCrun as
7047 # -library=stlport4 depends on it.
7048 case " $CXX $CXXFLAGS " in
7049 *" -library=stlport4 "*)
7050 solaris_use_stlport4=yes
7051 ;;
7052 esac
7053
7054 # Adding this requires a known-good setup of shared libraries for
7055 # Sun compiler versions before 5.6, else PIC objects from an old
7056 # archive will be linked into the output, leading to subtle bugs.
7057 if test "$solaris_use_stlport4" != yes; then
7058 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7059 fi
7060 ;;
7061 esac
7062 ;;
7063 esac
7064 ])
7065
7066 case " $_LT_TAGVAR(postdeps, $1) " in
7067 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
7068 esac
7069 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
7070 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
7071 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
7072 fi
7073 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
7074 [The directories searched by this compiler when creating a shared library])
7075 _LT_TAGDECL([], [predep_objects], [1],
7076 [Dependencies to place before and after the objects being linked to
7077 create a shared library])
7078 _LT_TAGDECL([], [postdep_objects], [1])
7079 _LT_TAGDECL([], [predeps], [1])
7080 _LT_TAGDECL([], [postdeps], [1])
7081 _LT_TAGDECL([], [compiler_lib_search_path], [1],
7082 [The library search path used internally by the compiler when linking
7083 a shared library])
7084 ])# _LT_SYS_HIDDEN_LIBDEPS
7085
7086
7087 # _LT_LANG_F77_CONFIG([TAG])
7088 # --------------------------
7089 # Ensure that the configuration variables for a Fortran 77 compiler are
7090 # suitably defined. These variables are subsequently used by _LT_CONFIG
7091 # to write the compiler configuration to `libtool'.
7092 m4_defun([_LT_LANG_F77_CONFIG],
7093 [AC_LANG_PUSH(Fortran 77)
7094 if test -z "$F77" || test "X$F77" = "Xno"; then
7095 _lt_disable_F77=yes
7096 fi
7097
7098 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7099 _LT_TAGVAR(allow_undefined_flag, $1)=
7100 _LT_TAGVAR(always_export_symbols, $1)=no
7101 _LT_TAGVAR(archive_expsym_cmds, $1)=
7102 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7103 _LT_TAGVAR(hardcode_direct, $1)=no
7104 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7105 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7106 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7107 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7108 _LT_TAGVAR(hardcode_minus_L, $1)=no
7109 _LT_TAGVAR(hardcode_automatic, $1)=no
7110 _LT_TAGVAR(inherit_rpath, $1)=no
7111 _LT_TAGVAR(module_cmds, $1)=
7112 _LT_TAGVAR(module_expsym_cmds, $1)=
7113 _LT_TAGVAR(link_all_deplibs, $1)=unknown
7114 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7115 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7116 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7117 _LT_TAGVAR(no_undefined_flag, $1)=
7118 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7119 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7120
7121 # Source file extension for f77 test sources.
7122 ac_ext=f
7123
7124 # Object file extension for compiled f77 test sources.
7125 objext=o
7126 _LT_TAGVAR(objext, $1)=$objext
7127
7128 # No sense in running all these tests if we already determined that
7129 # the F77 compiler isn't working. Some variables (like enable_shared)
7130 # are currently assumed to apply to all compilers on this platform,
7131 # and will be corrupted by setting them based on a non-working compiler.
7132 if test "$_lt_disable_F77" != yes; then
7133 # Code to be used in simple compile tests
7134 lt_simple_compile_test_code="\
7135 subroutine t
7136 return
7137 end
7138 "
7139
7140 # Code to be used in simple link tests
7141 lt_simple_link_test_code="\
7142 program t
7143 end
7144 "
7145
7146 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7147 _LT_TAG_COMPILER
7148
7149 # save warnings/boilerplate of simple test code
7150 _LT_COMPILER_BOILERPLATE
7151 _LT_LINKER_BOILERPLATE
7152
7153 # Allow CC to be a program name with arguments.
7154 lt_save_CC="$CC"
7155 lt_save_GCC=$GCC
7156 lt_save_CFLAGS=$CFLAGS
7157 CC=${F77-"f77"}
7158 CFLAGS=$FFLAGS
7159 compiler=$CC
7160 _LT_TAGVAR(compiler, $1)=$CC
7161 _LT_CC_BASENAME([$compiler])
7162 GCC=$G77
7163 if test -n "$compiler"; then
7164 AC_MSG_CHECKING([if libtool supports shared libraries])
7165 AC_MSG_RESULT([$can_build_shared])
7166
7167 AC_MSG_CHECKING([whether to build shared libraries])
7168 test "$can_build_shared" = "no" && enable_shared=no
7169
7170 # On AIX, shared libraries and static libraries use the same namespace, and
7171 # are all built from PIC.
7172 case $host_os in
7173 aix3*)
7174 test "$enable_shared" = yes && enable_static=no
7175 if test -n "$RANLIB"; then
7176 archive_cmds="$archive_cmds~\$RANLIB \$lib"
7177 postinstall_cmds='$RANLIB $lib'
7178 fi
7179 ;;
7180 aix[[4-9]]*)
7181 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7182 test "$enable_shared" = yes && enable_static=no
7183 fi
7184 ;;
7185 esac
7186 AC_MSG_RESULT([$enable_shared])
7187
7188 AC_MSG_CHECKING([whether to build static libraries])
7189 # Make sure either enable_shared or enable_static is yes.
7190 test "$enable_shared" = yes || enable_static=yes
7191 AC_MSG_RESULT([$enable_static])
7192
7193 _LT_TAGVAR(GCC, $1)="$G77"
7194 _LT_TAGVAR(LD, $1)="$LD"
7195
7196 ## CAVEAT EMPTOR:
7197 ## There is no encapsulation within the following macros, do not change
7198 ## the running order or otherwise move them around unless you know exactly
7199 ## what you are doing...
7200 _LT_COMPILER_PIC($1)
7201 _LT_COMPILER_C_O($1)
7202 _LT_COMPILER_FILE_LOCKS($1)
7203 _LT_LINKER_SHLIBS($1)
7204 _LT_SYS_DYNAMIC_LINKER($1)
7205 _LT_LINKER_HARDCODE_LIBPATH($1)
7206
7207 _LT_CONFIG($1)
7208 fi # test -n "$compiler"
7209
7210 GCC=$lt_save_GCC
7211 CC="$lt_save_CC"
7212 CFLAGS="$lt_save_CFLAGS"
7213 fi # test "$_lt_disable_F77" != yes
7214
7215 AC_LANG_POP
7216 ])# _LT_LANG_F77_CONFIG
7217
7218
7219 # _LT_LANG_FC_CONFIG([TAG])
7220 # -------------------------
7221 # Ensure that the configuration variables for a Fortran compiler are
7222 # suitably defined. These variables are subsequently used by _LT_CONFIG
7223 # to write the compiler configuration to `libtool'.
7224 m4_defun([_LT_LANG_FC_CONFIG],
7225 [AC_LANG_PUSH(Fortran)
7226
7227 if test -z "$FC" || test "X$FC" = "Xno"; then
7228 _lt_disable_FC=yes
7229 fi
7230
7231 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7232 _LT_TAGVAR(allow_undefined_flag, $1)=
7233 _LT_TAGVAR(always_export_symbols, $1)=no
7234 _LT_TAGVAR(archive_expsym_cmds, $1)=
7235 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7236 _LT_TAGVAR(hardcode_direct, $1)=no
7237 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7238 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7239 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7240 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7241 _LT_TAGVAR(hardcode_minus_L, $1)=no
7242 _LT_TAGVAR(hardcode_automatic, $1)=no
7243 _LT_TAGVAR(inherit_rpath, $1)=no
7244 _LT_TAGVAR(module_cmds, $1)=
7245 _LT_TAGVAR(module_expsym_cmds, $1)=
7246 _LT_TAGVAR(link_all_deplibs, $1)=unknown
7247 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7248 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7249 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7250 _LT_TAGVAR(no_undefined_flag, $1)=
7251 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7252 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7253
7254 # Source file extension for fc test sources.
7255 ac_ext=${ac_fc_srcext-f}
7256
7257 # Object file extension for compiled fc test sources.
7258 objext=o
7259 _LT_TAGVAR(objext, $1)=$objext
7260
7261 # No sense in running all these tests if we already determined that
7262 # the FC compiler isn't working. Some variables (like enable_shared)
7263 # are currently assumed to apply to all compilers on this platform,
7264 # and will be corrupted by setting them based on a non-working compiler.
7265 if test "$_lt_disable_FC" != yes; then
7266 # Code to be used in simple compile tests
7267 lt_simple_compile_test_code="\
7268 subroutine t
7269 return
7270 end
7271 "
7272
7273 # Code to be used in simple link tests
7274 lt_simple_link_test_code="\
7275 program t
7276 end
7277 "
7278
7279 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7280 _LT_TAG_COMPILER
7281
7282 # save warnings/boilerplate of simple test code
7283 _LT_COMPILER_BOILERPLATE
7284 _LT_LINKER_BOILERPLATE
7285
7286 # Allow CC to be a program name with arguments.
7287 lt_save_CC="$CC"
7288 lt_save_GCC=$GCC
7289 lt_save_CFLAGS=$CFLAGS
7290 CC=${FC-"f95"}
7291 CFLAGS=$FCFLAGS
7292 compiler=$CC
7293 GCC=$ac_cv_fc_compiler_gnu
7294
7295 _LT_TAGVAR(compiler, $1)=$CC
7296 _LT_CC_BASENAME([$compiler])
7297
7298 if test -n "$compiler"; then
7299 AC_MSG_CHECKING([if libtool supports shared libraries])
7300 AC_MSG_RESULT([$can_build_shared])
7301
7302 AC_MSG_CHECKING([whether to build shared libraries])
7303 test "$can_build_shared" = "no" && enable_shared=no
7304
7305 # On AIX, shared libraries and static libraries use the same namespace, and
7306 # are all built from PIC.
7307 case $host_os in
7308 aix3*)
7309 test "$enable_shared" = yes && enable_static=no
7310 if test -n "$RANLIB"; then
7311 archive_cmds="$archive_cmds~\$RANLIB \$lib"
7312 postinstall_cmds='$RANLIB $lib'
7313 fi
7314 ;;
7315 aix[[4-9]]*)
7316 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7317 test "$enable_shared" = yes && enable_static=no
7318 fi
7319 ;;
7320 esac
7321 AC_MSG_RESULT([$enable_shared])
7322
7323 AC_MSG_CHECKING([whether to build static libraries])
7324 # Make sure either enable_shared or enable_static is yes.
7325 test "$enable_shared" = yes || enable_static=yes
7326 AC_MSG_RESULT([$enable_static])
7327
7328 _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
7329 _LT_TAGVAR(LD, $1)="$LD"
7330
7331 ## CAVEAT EMPTOR:
7332 ## There is no encapsulation within the following macros, do not change
7333 ## the running order or otherwise move them around unless you know exactly
7334 ## what you are doing...
7335 _LT_SYS_HIDDEN_LIBDEPS($1)
7336 _LT_COMPILER_PIC($1)
7337 _LT_COMPILER_C_O($1)
7338 _LT_COMPILER_FILE_LOCKS($1)
7339 _LT_LINKER_SHLIBS($1)
7340 _LT_SYS_DYNAMIC_LINKER($1)
7341 _LT_LINKER_HARDCODE_LIBPATH($1)
7342
7343 _LT_CONFIG($1)
7344 fi # test -n "$compiler"
7345
7346 GCC=$lt_save_GCC
7347 CC=$lt_save_CC
7348 CFLAGS=$lt_save_CFLAGS
7349 fi # test "$_lt_disable_FC" != yes
7350
7351 AC_LANG_POP
7352 ])# _LT_LANG_FC_CONFIG
7353
7354
7355 # _LT_LANG_GCJ_CONFIG([TAG])
7356 # --------------------------
7357 # Ensure that the configuration variables for the GNU Java Compiler compiler
7358 # are suitably defined. These variables are subsequently used by _LT_CONFIG
7359 # to write the compiler configuration to `libtool'.
7360 m4_defun([_LT_LANG_GCJ_CONFIG],
7361 [AC_REQUIRE([LT_PROG_GCJ])dnl
7362 AC_LANG_SAVE
7363
7364 # Source file extension for Java test sources.
7365 ac_ext=java
7366
7367 # Object file extension for compiled Java test sources.
7368 objext=o
7369 _LT_TAGVAR(objext, $1)=$objext
7370
7371 # Code to be used in simple compile tests
7372 lt_simple_compile_test_code="class foo {}"
7373
7374 # Code to be used in simple link tests
7375 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
7376
7377 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7378 _LT_TAG_COMPILER
7379
7380 # save warnings/boilerplate of simple test code
7381 _LT_COMPILER_BOILERPLATE
7382 _LT_LINKER_BOILERPLATE
7383
7384 # Allow CC to be a program name with arguments.
7385 lt_save_CC=$CC
7386 lt_save_CFLAGS=$CFLAGS
7387 lt_save_GCC=$GCC
7388 GCC=yes
7389 CC=${GCJ-"gcj"}
7390 CFLAGS=$GCJFLAGS
7391 compiler=$CC
7392 _LT_TAGVAR(compiler, $1)=$CC
7393 _LT_TAGVAR(LD, $1)="$LD"
7394 _LT_CC_BASENAME([$compiler])
7395
7396 # GCJ did not exist at the time GCC didn't implicitly link libc in.
7397 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7398
7399 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7400 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7401 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7402
7403 ## CAVEAT EMPTOR:
7404 ## There is no encapsulation within the following macros, do not change
7405 ## the running order or otherwise move them around unless you know exactly
7406 ## what you are doing...
7407 if test -n "$compiler"; then
7408 _LT_COMPILER_NO_RTTI($1)
7409 _LT_COMPILER_PIC($1)
7410 _LT_COMPILER_C_O($1)
7411 _LT_COMPILER_FILE_LOCKS($1)
7412 _LT_LINKER_SHLIBS($1)
7413 _LT_LINKER_HARDCODE_LIBPATH($1)
7414
7415 _LT_CONFIG($1)
7416 fi
7417
7418 AC_LANG_RESTORE
7419
7420 GCC=$lt_save_GCC
7421 CC=$lt_save_CC
7422 CFLAGS=$lt_save_CFLAGS
7423 ])# _LT_LANG_GCJ_CONFIG
7424
7425
7426 # _LT_LANG_RC_CONFIG([TAG])
7427 # -------------------------
7428 # Ensure that the configuration variables for the Windows resource compiler
7429 # are suitably defined. These variables are subsequently used by _LT_CONFIG
7430 # to write the compiler configuration to `libtool'.
7431 m4_defun([_LT_LANG_RC_CONFIG],
7432 [AC_REQUIRE([LT_PROG_RC])dnl
7433 AC_LANG_SAVE
7434
7435 # Source file extension for RC test sources.
7436 ac_ext=rc
7437
7438 # Object file extension for compiled RC test sources.
7439 objext=o
7440 _LT_TAGVAR(objext, $1)=$objext
7441
7442 # Code to be used in simple compile tests
7443 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
7444
7445 # Code to be used in simple link tests
7446 lt_simple_link_test_code="$lt_simple_compile_test_code"
7447
7448 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7449 _LT_TAG_COMPILER
7450
7451 # save warnings/boilerplate of simple test code
7452 _LT_COMPILER_BOILERPLATE
7453 _LT_LINKER_BOILERPLATE
7454
7455 # Allow CC to be a program name with arguments.
7456 lt_save_CC="$CC"
7457 lt_save_CFLAGS=$CFLAGS
7458 lt_save_GCC=$GCC
7459 GCC=
7460 CC=${RC-"windres"}
7461 CFLAGS=
7462 compiler=$CC
7463 _LT_TAGVAR(compiler, $1)=$CC
7464 _LT_CC_BASENAME([$compiler])
7465 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
7466
7467 if test -n "$compiler"; then
7468 :
7469 _LT_CONFIG($1)
7470 fi
7471
7472 GCC=$lt_save_GCC
7473 AC_LANG_RESTORE
7474 CC=$lt_save_CC
7475 CFLAGS=$lt_save_CFLAGS
7476 ])# _LT_LANG_RC_CONFIG
7477
7478
7479 # LT_PROG_GCJ
7480 # -----------
7481 AC_DEFUN([LT_PROG_GCJ],
7482 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
7483 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
7484 [AC_CHECK_TOOL(GCJ, gcj,)
7485 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
7486 AC_SUBST(GCJFLAGS)])])[]dnl
7487 ])
7488
7489 # Old name:
7490 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
7491 dnl aclocal-1.4 backwards compatibility:
7492 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
7493
7494
7495 # LT_PROG_RC
7496 # ----------
7497 AC_DEFUN([LT_PROG_RC],
7498 [AC_CHECK_TOOL(RC, windres,)
7499 ])
7500
7501 # Old name:
7502 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
7503 dnl aclocal-1.4 backwards compatibility:
7504 dnl AC_DEFUN([LT_AC_PROG_RC], [])
7505
7506
7507 # _LT_DECL_EGREP
7508 # --------------
7509 # If we don't have a new enough Autoconf to choose the best grep
7510 # available, choose the one first in the user's PATH.
7511 m4_defun([_LT_DECL_EGREP],
7512 [AC_REQUIRE([AC_PROG_EGREP])dnl
7513 AC_REQUIRE([AC_PROG_FGREP])dnl
7514 test -z "$GREP" && GREP=grep
7515 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
7516 _LT_DECL([], [EGREP], [1], [An ERE matcher])
7517 _LT_DECL([], [FGREP], [1], [A literal string matcher])
7518 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
7519 AC_SUBST([GREP])
7520 ])
7521
7522
7523 # _LT_DECL_OBJDUMP
7524 # --------------
7525 # If we don't have a new enough Autoconf to choose the best objdump
7526 # available, choose the one first in the user's PATH.
7527 m4_defun([_LT_DECL_OBJDUMP],
7528 [AC_CHECK_TOOL(OBJDUMP, objdump, false)
7529 test -z "$OBJDUMP" && OBJDUMP=objdump
7530 _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
7531 AC_SUBST([OBJDUMP])
7532 ])
7533
7534 # _LT_DECL_DLLTOOL
7535 # ----------------
7536 # Ensure DLLTOOL variable is set.
7537 m4_defun([_LT_DECL_DLLTOOL],
7538 [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
7539 test -z "$DLLTOOL" && DLLTOOL=dlltool
7540 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
7541 AC_SUBST([DLLTOOL])
7542 ])
7543
7544 # _LT_DECL_SED
7545 # ------------
7546 # Check for a fully-functional sed program, that truncates
7547 # as few characters as possible. Prefer GNU sed if found.
7548 m4_defun([_LT_DECL_SED],
7549 [AC_PROG_SED
7550 test -z "$SED" && SED=sed
7551 Xsed="$SED -e 1s/^X//"
7552 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
7553 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
7554 [Sed that helps us avoid accidentally triggering echo(1) options like -n])
7555 ])# _LT_DECL_SED
7556
7557 m4_ifndef([AC_PROG_SED], [
7558 ############################################################
7559 # NOTE: This macro has been submitted for inclusion into #
7560 # GNU Autoconf as AC_PROG_SED. When it is available in #
7561 # a released version of Autoconf we should remove this #
7562 # macro and use it instead. #
7563 ############################################################
7564
7565 m4_defun([AC_PROG_SED],
7566 [AC_MSG_CHECKING([for a sed that does not truncate output])
7567 AC_CACHE_VAL(lt_cv_path_SED,
7568 [# Loop through the user's path and test for sed and gsed.
7569 # Then use that list of sed's as ones to test for truncation.
7570 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7571 for as_dir in $PATH
7572 do
7573 IFS=$as_save_IFS
7574 test -z "$as_dir" && as_dir=.
7575 for lt_ac_prog in sed gsed; do
7576 for ac_exec_ext in '' $ac_executable_extensions; do
7577 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
7578 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
7579 fi
7580 done
7581 done
7582 done
7583 IFS=$as_save_IFS
7584 lt_ac_max=0
7585 lt_ac_count=0
7586 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
7587 # along with /bin/sed that truncates output.
7588 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
7589 test ! -f $lt_ac_sed && continue
7590 cat /dev/null > conftest.in
7591 lt_ac_count=0
7592 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
7593 # Check for GNU sed and select it if it is found.
7594 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
7595 lt_cv_path_SED=$lt_ac_sed
7596 break
7597 fi
7598 while true; do
7599 cat conftest.in conftest.in >conftest.tmp
7600 mv conftest.tmp conftest.in
7601 cp conftest.in conftest.nl
7602 echo >>conftest.nl
7603 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
7604 cmp -s conftest.out conftest.nl || break
7605 # 10000 chars as input seems more than enough
7606 test $lt_ac_count -gt 10 && break
7607 lt_ac_count=`expr $lt_ac_count + 1`
7608 if test $lt_ac_count -gt $lt_ac_max; then
7609 lt_ac_max=$lt_ac_count
7610 lt_cv_path_SED=$lt_ac_sed
7611 fi
7612 done
7613 done
7614 ])
7615 SED=$lt_cv_path_SED
7616 AC_SUBST([SED])
7617 AC_MSG_RESULT([$SED])
7618 ])#AC_PROG_SED
7619 ])#m4_ifndef
7620
7621 # Old name:
7622 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
7623 dnl aclocal-1.4 backwards compatibility:
7624 dnl AC_DEFUN([LT_AC_PROG_SED], [])
7625
7626
7627 # _LT_CHECK_SHELL_FEATURES
7628 # ------------------------
7629 # Find out whether the shell is Bourne or XSI compatible,
7630 # or has some other useful features.
7631 m4_defun([_LT_CHECK_SHELL_FEATURES],
7632 [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
7633 # Try some XSI features
7634 xsi_shell=no
7635 ( _lt_dummy="a/b/c"
7636 test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
7637 = c,a/b,b/c, \
7638 && eval 'test $(( 1 + 1 )) -eq 2 \
7639 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
7640 && xsi_shell=yes
7641 AC_MSG_RESULT([$xsi_shell])
7642 _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
7643
7644 AC_MSG_CHECKING([whether the shell understands "+="])
7645 lt_shell_append=no
7646 ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
7647 >/dev/null 2>&1 \
7648 && lt_shell_append=yes
7649 AC_MSG_RESULT([$lt_shell_append])
7650 _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
7651
7652 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7653 lt_unset=unset
7654 else
7655 lt_unset=false
7656 fi
7657 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
7658
7659 # test EBCDIC or ASCII
7660 case `echo X|tr X '\101'` in
7661 A) # ASCII based system
7662 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7663 lt_SP2NL='tr \040 \012'
7664 lt_NL2SP='tr \015\012 \040\040'
7665 ;;
7666 *) # EBCDIC based system
7667 lt_SP2NL='tr \100 \n'
7668 lt_NL2SP='tr \r\n \100\100'
7669 ;;
7670 esac
7671 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
7672 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
7673 ])# _LT_CHECK_SHELL_FEATURES
7674
7675
7676 # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
7677 # ------------------------------------------------------
7678 # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
7679 # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
7680 m4_defun([_LT_PROG_FUNCTION_REPLACE],
7681 [dnl {
7682 sed -e '/^$1 ()$/,/^} # $1 /c\
7683 $1 ()\
7684 {\
7685 m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1])
7686 } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
7687 && mv -f "$cfgfile.tmp" "$cfgfile" \
7688 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7689 test 0 -eq $? || _lt_function_replace_fail=:
7690 ])
7691
7692
7693 # _LT_PROG_REPLACE_SHELLFNS
7694 # -------------------------
7695 # Replace existing portable implementations of several shell functions with
7696 # equivalent extended shell implementations where those features are available..
7697 m4_defun([_LT_PROG_REPLACE_SHELLFNS],
7698 [if test x"$xsi_shell" = xyes; then
7699 _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
7700 case ${1} in
7701 */*) func_dirname_result="${1%/*}${2}" ;;
7702 * ) func_dirname_result="${3}" ;;
7703 esac])
7704
7705 _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
7706 func_basename_result="${1##*/}"])
7707
7708 _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
7709 case ${1} in
7710 */*) func_dirname_result="${1%/*}${2}" ;;
7711 * ) func_dirname_result="${3}" ;;
7712 esac
7713 func_basename_result="${1##*/}"])
7714
7715 _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
7716 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
7717 # positional parameters, so assign one to ordinary parameter first.
7718 func_stripname_result=${3}
7719 func_stripname_result=${func_stripname_result#"${1}"}
7720 func_stripname_result=${func_stripname_result%"${2}"}])
7721
7722 _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
7723 func_split_long_opt_name=${1%%=*}
7724 func_split_long_opt_arg=${1#*=}])
7725
7726 _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
7727 func_split_short_opt_arg=${1#??}
7728 func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
7729
7730 _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
7731 case ${1} in
7732 *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
7733 *) func_lo2o_result=${1} ;;
7734 esac])
7735
7736 _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo])
7737
7738 _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))])
7739
7740 _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}])
7741 fi
7742
7743 if test x"$lt_shell_append" = xyes; then
7744 _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"])
7745
7746 _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
7747 func_quote_for_eval "${2}"
7748 dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
7749 eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
7750
7751 # Save a `func_append' function call where possible by direct use of '+='
7752 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
7753 && mv -f "$cfgfile.tmp" "$cfgfile" \
7754 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7755 test 0 -eq $? || _lt_function_replace_fail=:
7756 else
7757 # Save a `func_append' function call even when '+=' is not available
7758 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
7759 && mv -f "$cfgfile.tmp" "$cfgfile" \
7760 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7761 test 0 -eq $? || _lt_function_replace_fail=:
7762 fi
7763
7764 if test x"$_lt_function_replace_fail" = x":"; then
7765 AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
7766 fi
7767 ])
7768
7769 # _LT_PATH_CONVERSION_FUNCTIONS
7770 # -----------------------------
7771 # Determine which file name conversion functions should be used by
7772 # func_to_host_file (and, implicitly, by func_to_host_path). These are needed
7773 # for certain cross-compile configurations and native mingw.
7774 m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
7775 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
7776 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
7777 AC_MSG_CHECKING([how to convert $build file names to $host format])
7778 AC_CACHE_VAL(lt_cv_to_host_file_cmd,
7779 [case $host in
7780 *-*-mingw* )
7781 case $build in
7782 *-*-mingw* ) # actually msys
7783 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
7784 ;;
7785 *-*-cygwin* )
7786 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
7787 ;;
7788 * ) # otherwise, assume *nix
7789 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
7790 ;;
7791 esac
7792 ;;
7793 *-*-cygwin* )
7794 case $build in
7795 *-*-mingw* ) # actually msys
7796 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
7797 ;;
7798 *-*-cygwin* )
7799 lt_cv_to_host_file_cmd=func_convert_file_noop
7800 ;;
7801 * ) # otherwise, assume *nix
7802 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
7803 ;;
7804 esac
7805 ;;
7806 * ) # unhandled hosts (and "normal" native builds)
7807 lt_cv_to_host_file_cmd=func_convert_file_noop
7808 ;;
7809 esac
7810 ])
7811 to_host_file_cmd=$lt_cv_to_host_file_cmd
7812 AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
7813 _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
7814 [0], [convert $build file names to $host format])dnl
7815
7816 AC_MSG_CHECKING([how to convert $build file names to toolchain format])
7817 AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
7818 [#assume ordinary cross tools, or native build.
7819 lt_cv_to_tool_file_cmd=func_convert_file_noop
7820 case $host in
7821 *-*-mingw* )
7822 case $build in
7823 *-*-mingw* ) # actually msys
7824 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
7825 ;;
7826 esac
7827 ;;
7828 esac
7829 ])
7830 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
7831 AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
7832 _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
7833 [0], [convert $build files to toolchain format])dnl
7834 ])# _LT_PATH_CONVERSION_FUNCTIONS
0 # Helper functions for option handling. -*- Autoconf -*-
1 #
2 # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
3 # Inc.
4 # Written by Gary V. Vaughan, 2004
5 #
6 # This file is free software; the Free Software Foundation gives
7 # unlimited permission to copy and/or distribute it, with or without
8 # modifications, as long as this notice is preserved.
9
10 # serial 7 ltoptions.m4
11
12 # This is to help aclocal find these macros, as it can't see m4_define.
13 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
14
15
16 # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
17 # ------------------------------------------
18 m4_define([_LT_MANGLE_OPTION],
19 [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
20
21
22 # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
23 # ---------------------------------------
24 # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
25 # matching handler defined, dispatch to it. Other OPTION-NAMEs are
26 # saved as a flag.
27 m4_define([_LT_SET_OPTION],
28 [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
29 m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
30 _LT_MANGLE_DEFUN([$1], [$2]),
31 [m4_warning([Unknown $1 option `$2'])])[]dnl
32 ])
33
34
35 # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
36 # ------------------------------------------------------------
37 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
38 m4_define([_LT_IF_OPTION],
39 [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
40
41
42 # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
43 # -------------------------------------------------------
44 # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
45 # are set.
46 m4_define([_LT_UNLESS_OPTIONS],
47 [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
48 [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
49 [m4_define([$0_found])])])[]dnl
50 m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
51 ])[]dnl
52 ])
53
54
55 # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
56 # ----------------------------------------
57 # OPTION-LIST is a space-separated list of Libtool options associated
58 # with MACRO-NAME. If any OPTION has a matching handler declared with
59 # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
60 # the unknown option and exit.
61 m4_defun([_LT_SET_OPTIONS],
62 [# Set options
63 m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
64 [_LT_SET_OPTION([$1], _LT_Option)])
65
66 m4_if([$1],[LT_INIT],[
67 dnl
68 dnl Simply set some default values (i.e off) if boolean options were not
69 dnl specified:
70 _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
71 ])
72 _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
73 ])
74 dnl
75 dnl If no reference was made to various pairs of opposing options, then
76 dnl we run the default mode handler for the pair. For example, if neither
77 dnl `shared' nor `disable-shared' was passed, we enable building of shared
78 dnl archives by default:
79 _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
80 _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
81 _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
82 _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
83 [_LT_ENABLE_FAST_INSTALL])
84 ])
85 ])# _LT_SET_OPTIONS
86
87
88 ## --------------------------------- ##
89 ## Macros to handle LT_INIT options. ##
90 ## --------------------------------- ##
91
92 # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
93 # -----------------------------------------
94 m4_define([_LT_MANGLE_DEFUN],
95 [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
96
97
98 # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
99 # -----------------------------------------------
100 m4_define([LT_OPTION_DEFINE],
101 [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
102 ])# LT_OPTION_DEFINE
103
104
105 # dlopen
106 # ------
107 LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
108 ])
109
110 AU_DEFUN([AC_LIBTOOL_DLOPEN],
111 [_LT_SET_OPTION([LT_INIT], [dlopen])
112 AC_DIAGNOSE([obsolete],
113 [$0: Remove this warning and the call to _LT_SET_OPTION when you
114 put the `dlopen' option into LT_INIT's first parameter.])
115 ])
116
117 dnl aclocal-1.4 backwards compatibility:
118 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
119
120
121 # win32-dll
122 # ---------
123 # Declare package support for building win32 dll's.
124 LT_OPTION_DEFINE([LT_INIT], [win32-dll],
125 [enable_win32_dll=yes
126
127 case $host in
128 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
129 AC_CHECK_TOOL(AS, as, false)
130 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
131 AC_CHECK_TOOL(OBJDUMP, objdump, false)
132 ;;
133 esac
134
135 test -z "$AS" && AS=as
136 _LT_DECL([], [AS], [1], [Assembler program])dnl
137
138 test -z "$DLLTOOL" && DLLTOOL=dlltool
139 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
140
141 test -z "$OBJDUMP" && OBJDUMP=objdump
142 _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
143 ])# win32-dll
144
145 AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
146 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
147 _LT_SET_OPTION([LT_INIT], [win32-dll])
148 AC_DIAGNOSE([obsolete],
149 [$0: Remove this warning and the call to _LT_SET_OPTION when you
150 put the `win32-dll' option into LT_INIT's first parameter.])
151 ])
152
153 dnl aclocal-1.4 backwards compatibility:
154 dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
155
156
157 # _LT_ENABLE_SHARED([DEFAULT])
158 # ----------------------------
159 # implement the --enable-shared flag, and supports the `shared' and
160 # `disable-shared' LT_INIT options.
161 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
162 m4_define([_LT_ENABLE_SHARED],
163 [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
164 AC_ARG_ENABLE([shared],
165 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
166 [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
167 [p=${PACKAGE-default}
168 case $enableval in
169 yes) enable_shared=yes ;;
170 no) enable_shared=no ;;
171 *)
172 enable_shared=no
173 # Look at the argument we got. We use all the common list separators.
174 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
175 for pkg in $enableval; do
176 IFS="$lt_save_ifs"
177 if test "X$pkg" = "X$p"; then
178 enable_shared=yes
179 fi
180 done
181 IFS="$lt_save_ifs"
182 ;;
183 esac],
184 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
185
186 _LT_DECL([build_libtool_libs], [enable_shared], [0],
187 [Whether or not to build shared libraries])
188 ])# _LT_ENABLE_SHARED
189
190 LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
191 LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
192
193 # Old names:
194 AC_DEFUN([AC_ENABLE_SHARED],
195 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
196 ])
197
198 AC_DEFUN([AC_DISABLE_SHARED],
199 [_LT_SET_OPTION([LT_INIT], [disable-shared])
200 ])
201
202 AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
203 AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
204
205 dnl aclocal-1.4 backwards compatibility:
206 dnl AC_DEFUN([AM_ENABLE_SHARED], [])
207 dnl AC_DEFUN([AM_DISABLE_SHARED], [])
208
209
210
211 # _LT_ENABLE_STATIC([DEFAULT])
212 # ----------------------------
213 # implement the --enable-static flag, and support the `static' and
214 # `disable-static' LT_INIT options.
215 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
216 m4_define([_LT_ENABLE_STATIC],
217 [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
218 AC_ARG_ENABLE([static],
219 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
220 [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
221 [p=${PACKAGE-default}
222 case $enableval in
223 yes) enable_static=yes ;;
224 no) enable_static=no ;;
225 *)
226 enable_static=no
227 # Look at the argument we got. We use all the common list separators.
228 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
229 for pkg in $enableval; do
230 IFS="$lt_save_ifs"
231 if test "X$pkg" = "X$p"; then
232 enable_static=yes
233 fi
234 done
235 IFS="$lt_save_ifs"
236 ;;
237 esac],
238 [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
239
240 _LT_DECL([build_old_libs], [enable_static], [0],
241 [Whether or not to build static libraries])
242 ])# _LT_ENABLE_STATIC
243
244 LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
245 LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
246
247 # Old names:
248 AC_DEFUN([AC_ENABLE_STATIC],
249 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
250 ])
251
252 AC_DEFUN([AC_DISABLE_STATIC],
253 [_LT_SET_OPTION([LT_INIT], [disable-static])
254 ])
255
256 AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
257 AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
258
259 dnl aclocal-1.4 backwards compatibility:
260 dnl AC_DEFUN([AM_ENABLE_STATIC], [])
261 dnl AC_DEFUN([AM_DISABLE_STATIC], [])
262
263
264
265 # _LT_ENABLE_FAST_INSTALL([DEFAULT])
266 # ----------------------------------
267 # implement the --enable-fast-install flag, and support the `fast-install'
268 # and `disable-fast-install' LT_INIT options.
269 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
270 m4_define([_LT_ENABLE_FAST_INSTALL],
271 [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
272 AC_ARG_ENABLE([fast-install],
273 [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
274 [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
275 [p=${PACKAGE-default}
276 case $enableval in
277 yes) enable_fast_install=yes ;;
278 no) enable_fast_install=no ;;
279 *)
280 enable_fast_install=no
281 # Look at the argument we got. We use all the common list separators.
282 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
283 for pkg in $enableval; do
284 IFS="$lt_save_ifs"
285 if test "X$pkg" = "X$p"; then
286 enable_fast_install=yes
287 fi
288 done
289 IFS="$lt_save_ifs"
290 ;;
291 esac],
292 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
293
294 _LT_DECL([fast_install], [enable_fast_install], [0],
295 [Whether or not to optimize for fast installation])dnl
296 ])# _LT_ENABLE_FAST_INSTALL
297
298 LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
299 LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
300
301 # Old names:
302 AU_DEFUN([AC_ENABLE_FAST_INSTALL],
303 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
304 AC_DIAGNOSE([obsolete],
305 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
306 the `fast-install' option into LT_INIT's first parameter.])
307 ])
308
309 AU_DEFUN([AC_DISABLE_FAST_INSTALL],
310 [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
311 AC_DIAGNOSE([obsolete],
312 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
313 the `disable-fast-install' option into LT_INIT's first parameter.])
314 ])
315
316 dnl aclocal-1.4 backwards compatibility:
317 dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
318 dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
319
320
321 # _LT_WITH_PIC([MODE])
322 # --------------------
323 # implement the --with-pic flag, and support the `pic-only' and `no-pic'
324 # LT_INIT options.
325 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
326 m4_define([_LT_WITH_PIC],
327 [AC_ARG_WITH([pic],
328 [AS_HELP_STRING([--with-pic],
329 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
330 [pic_mode="$withval"],
331 [pic_mode=default])
332
333 test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
334
335 _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
336 ])# _LT_WITH_PIC
337
338 LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
339 LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
340
341 # Old name:
342 AU_DEFUN([AC_LIBTOOL_PICMODE],
343 [_LT_SET_OPTION([LT_INIT], [pic-only])
344 AC_DIAGNOSE([obsolete],
345 [$0: Remove this warning and the call to _LT_SET_OPTION when you
346 put the `pic-only' option into LT_INIT's first parameter.])
347 ])
348
349 dnl aclocal-1.4 backwards compatibility:
350 dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
351
352 ## ----------------- ##
353 ## LTDL_INIT Options ##
354 ## ----------------- ##
355
356 m4_define([_LTDL_MODE], [])
357 LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
358 [m4_define([_LTDL_MODE], [nonrecursive])])
359 LT_OPTION_DEFINE([LTDL_INIT], [recursive],
360 [m4_define([_LTDL_MODE], [recursive])])
361 LT_OPTION_DEFINE([LTDL_INIT], [subproject],
362 [m4_define([_LTDL_MODE], [subproject])])
363
364 m4_define([_LTDL_TYPE], [])
365 LT_OPTION_DEFINE([LTDL_INIT], [installable],
366 [m4_define([_LTDL_TYPE], [installable])])
367 LT_OPTION_DEFINE([LTDL_INIT], [convenience],
368 [m4_define([_LTDL_TYPE], [convenience])])
0 # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
1 #
2 # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
3 # Written by Gary V. Vaughan, 2004
4 #
5 # This file is free software; the Free Software Foundation gives
6 # unlimited permission to copy and/or distribute it, with or without
7 # modifications, as long as this notice is preserved.
8
9 # serial 6 ltsugar.m4
10
11 # This is to help aclocal find these macros, as it can't see m4_define.
12 AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
13
14
15 # lt_join(SEP, ARG1, [ARG2...])
16 # -----------------------------
17 # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
18 # associated separator.
19 # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
20 # versions in m4sugar had bugs.
21 m4_define([lt_join],
22 [m4_if([$#], [1], [],
23 [$#], [2], [[$2]],
24 [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
25 m4_define([_lt_join],
26 [m4_if([$#$2], [2], [],
27 [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
28
29
30 # lt_car(LIST)
31 # lt_cdr(LIST)
32 # ------------
33 # Manipulate m4 lists.
34 # These macros are necessary as long as will still need to support
35 # Autoconf-2.59 which quotes differently.
36 m4_define([lt_car], [[$1]])
37 m4_define([lt_cdr],
38 [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
39 [$#], 1, [],
40 [m4_dquote(m4_shift($@))])])
41 m4_define([lt_unquote], $1)
42
43
44 # lt_append(MACRO-NAME, STRING, [SEPARATOR])
45 # ------------------------------------------
46 # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
47 # Note that neither SEPARATOR nor STRING are expanded; they are appended
48 # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
49 # No SEPARATOR is output if MACRO-NAME was previously undefined (different
50 # than defined and empty).
51 #
52 # This macro is needed until we can rely on Autoconf 2.62, since earlier
53 # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
54 m4_define([lt_append],
55 [m4_define([$1],
56 m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
57
58
59
60 # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
61 # ----------------------------------------------------------
62 # Produce a SEP delimited list of all paired combinations of elements of
63 # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
64 # has the form PREFIXmINFIXSUFFIXn.
65 # Needed until we can rely on m4_combine added in Autoconf 2.62.
66 m4_define([lt_combine],
67 [m4_if(m4_eval([$# > 3]), [1],
68 [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
69 [[m4_foreach([_Lt_prefix], [$2],
70 [m4_foreach([_Lt_suffix],
71 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
72 [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
73
74
75 # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
76 # -----------------------------------------------------------------------
77 # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
78 # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
79 m4_define([lt_if_append_uniq],
80 [m4_ifdef([$1],
81 [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
82 [lt_append([$1], [$2], [$3])$4],
83 [$5])],
84 [lt_append([$1], [$2], [$3])$4])])
85
86
87 # lt_dict_add(DICT, KEY, VALUE)
88 # -----------------------------
89 m4_define([lt_dict_add],
90 [m4_define([$1($2)], [$3])])
91
92
93 # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
94 # --------------------------------------------
95 m4_define([lt_dict_add_subkey],
96 [m4_define([$1($2:$3)], [$4])])
97
98
99 # lt_dict_fetch(DICT, KEY, [SUBKEY])
100 # ----------------------------------
101 m4_define([lt_dict_fetch],
102 [m4_ifval([$3],
103 m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
104 m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
105
106
107 # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
108 # -----------------------------------------------------------------
109 m4_define([lt_if_dict_fetch],
110 [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
111 [$5],
112 [$6])])
113
114
115 # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
116 # --------------------------------------------------------------
117 m4_define([lt_dict_filter],
118 [m4_if([$5], [], [],
119 [lt_join(m4_quote(m4_default([$4], [[, ]])),
120 lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
121 [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
122 ])
0 # ltversion.m4 -- version numbers -*- Autoconf -*-
1 #
2 # Copyright (C) 2004 Free Software Foundation, Inc.
3 # Written by Scott James Remnant, 2004
4 #
5 # This file is free software; the Free Software Foundation gives
6 # unlimited permission to copy and/or distribute it, with or without
7 # modifications, as long as this notice is preserved.
8
9 # @configure_input@
10
11 # serial 3293 ltversion.m4
12 # This file is part of GNU Libtool
13
14 m4_define([LT_PACKAGE_VERSION], [2.4])
15 m4_define([LT_PACKAGE_REVISION], [1.3293])
16
17 AC_DEFUN([LTVERSION_VERSION],
18 [macro_version='2.4'
19 macro_revision='1.3293'
20 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
21 _LT_DECL(, macro_revision, 0)
22 ])
0 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
1 #
2 # Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
3 # Written by Scott James Remnant, 2004.
4 #
5 # This file is free software; the Free Software Foundation gives
6 # unlimited permission to copy and/or distribute it, with or without
7 # modifications, as long as this notice is preserved.
8
9 # serial 5 lt~obsolete.m4
10
11 # These exist entirely to fool aclocal when bootstrapping libtool.
12 #
13 # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
14 # which have later been changed to m4_define as they aren't part of the
15 # exported API, or moved to Autoconf or Automake where they belong.
16 #
17 # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
18 # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
19 # using a macro with the same name in our local m4/libtool.m4 it'll
20 # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
21 # and doesn't know about Autoconf macros at all.)
22 #
23 # So we provide this file, which has a silly filename so it's always
24 # included after everything else. This provides aclocal with the
25 # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
26 # because those macros already exist, or will be overwritten later.
27 # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
28 #
29 # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
30 # Yes, that means every name once taken will need to remain here until
31 # we give up compatibility with versions before 1.7, at which point
32 # we need to keep only those names which we still refer to.
33
34 # This is to help aclocal find these macros, as it can't see m4_define.
35 AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
36
37 m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
38 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
39 m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
40 m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
41 m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
42 m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
43 m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
44 m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
45 m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
46 m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
47 m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
48 m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
49 m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
50 m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
51 m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
52 m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
53 m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
54 m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
55 m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
56 m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
57 m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
58 m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
59 m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
60 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
61 m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
62 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
63 m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
64 m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
65 m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
66 m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
67 m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
68 m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
69 m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
70 m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
71 m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
72 m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
73 m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
74 m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
75 m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
76 m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
77 m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
78 m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
79 m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
80 m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
81 m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
82 m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
83 m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
84 m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
85 m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
86 m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
87 m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
88 m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
89 m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
90 m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
91 m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
92 m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
93 m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
94 m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
95 m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
96 m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
97 m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
0 # manywarnings.m4 serial 3
1 dnl Copyright (C) 2008-2012 Free Software Foundation, Inc.
2 dnl This file is free software; the Free Software Foundation
3 dnl gives unlimited permission to copy and/or distribute it,
4 dnl with or without modifications, as long as this notice is preserved.
5
6 dnl From Simon Josefsson
7
8 # gl_MANYWARN_COMPLEMENT(OUTVAR, LISTVAR, REMOVEVAR)
9 # --------------------------------------------------
10 # Copy LISTVAR to OUTVAR except for the entries in REMOVEVAR.
11 # Elements separated by whitespace. In set logic terms, the function
12 # does OUTVAR = LISTVAR \ REMOVEVAR.
13 AC_DEFUN([gl_MANYWARN_COMPLEMENT],
14 [
15 gl_warn_set=
16 set x $2; shift
17 for gl_warn_item
18 do
19 case " $3 " in
20 *" $gl_warn_item "*)
21 ;;
22 *)
23 gl_warn_set="$gl_warn_set $gl_warn_item"
24 ;;
25 esac
26 done
27 $1=$gl_warn_set
28 ])
29
30 # gl_MANYWARN_ALL_GCC(VARIABLE)
31 # -----------------------------
32 # Add all documented GCC warning parameters to variable VARIABLE.
33 # Note that you need to test them using gl_WARN_ADD if you want to
34 # make sure your gcc understands it.
35 AC_DEFUN([gl_MANYWARN_ALL_GCC],
36 [
37 dnl First, check if -Wno-missing-field-initializers is needed.
38 dnl -Wmissing-field-initializers is implied by -W, but that issues
39 dnl warnings with GCC version before 4.7, for the common idiom
40 dnl of initializing types on the stack to zero, using { 0, }
41 AC_REQUIRE([AC_PROG_CC])
42 if test -n "$GCC"; then
43
44 dnl First, check -W -Werror -Wno-missing-field-initializers is supported
45 dnl with the current $CC $CFLAGS $CPPFLAGS.
46 AC_MSG_CHECKING([whether -Wno-missing-field-initializers is supported])
47 AC_CACHE_VAL([gl_cv_cc_nomfi_supported], [
48 gl_save_CFLAGS="$CFLAGS"
49 CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers"
50 AC_COMPILE_IFELSE(
51 [AC_LANG_PROGRAM([[]], [[]])],
52 [gl_cv_cc_nomfi_supported=yes],
53 [gl_cv_cc_nomfi_supported=no])
54 CFLAGS="$gl_save_CFLAGS"])
55 AC_MSG_RESULT([$gl_cv_cc_nomfi_supported])
56
57 if test "$gl_cv_cc_nomfi_supported" = yes; then
58 dnl Now check whether -Wno-missing-field-initializers is needed
59 dnl for the { 0, } construct.
60 AC_MSG_CHECKING([whether -Wno-missing-field-initializers is needed])
61 AC_CACHE_VAL([gl_cv_cc_nomfi_needed], [
62 gl_save_CFLAGS="$CFLAGS"
63 CFLAGS="$CFLAGS -W -Werror"
64 AC_COMPILE_IFELSE(
65 [AC_LANG_PROGRAM(
66 [[void f (void)
67 {
68 typedef struct { int a; int b; } s_t;
69 s_t s1 = { 0, };
70 }
71 ]],
72 [[]])],
73 [gl_cv_cc_nomfi_needed=no],
74 [gl_cv_cc_nomfi_needed=yes])
75 CFLAGS="$gl_save_CFLAGS"
76 ])
77 AC_MSG_RESULT([$gl_cv_cc_nomfi_needed])
78 fi
79 fi
80
81 gl_manywarn_set=
82 for gl_manywarn_item in \
83 -Wall \
84 -W \
85 -Wformat-y2k \
86 -Wformat-nonliteral \
87 -Wformat-security \
88 -Winit-self \
89 -Wmissing-include-dirs \
90 -Wswitch-default \
91 -Wswitch-enum \
92 -Wunused \
93 -Wunknown-pragmas \
94 -Wstrict-aliasing \
95 -Wstrict-overflow \
96 -Wsystem-headers \
97 -Wfloat-equal \
98 -Wtraditional \
99 -Wtraditional-conversion \
100 -Wdeclaration-after-statement \
101 -Wundef \
102 -Wshadow \
103 -Wunsafe-loop-optimizations \
104 -Wpointer-arith \
105 -Wbad-function-cast \
106 -Wc++-compat \
107 -Wcast-qual \
108 -Wcast-align \
109 -Wwrite-strings \
110 -Wconversion \
111 -Wsign-conversion \
112 -Wlogical-op \
113 -Waggregate-return \
114 -Wstrict-prototypes \
115 -Wold-style-definition \
116 -Wmissing-prototypes \
117 -Wmissing-declarations \
118 -Wmissing-noreturn \
119 -Wmissing-format-attribute \
120 -Wpacked \
121 -Wpadded \
122 -Wredundant-decls \
123 -Wnested-externs \
124 -Wunreachable-code \
125 -Winline \
126 -Winvalid-pch \
127 -Wlong-long \
128 -Wvla \
129 -Wvolatile-register-var \
130 -Wdisabled-optimization \
131 -Wstack-protector \
132 -Woverlength-strings \
133 -Wbuiltin-macro-redefined \
134 -Wmudflap \
135 -Wpacked-bitfield-compat \
136 -Wsync-nand \
137 ; do
138 gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
139 done
140 # The following are not documented in the manual but are included in
141 # output from gcc --help=warnings.
142 for gl_manywarn_item in \
143 -Wattributes \
144 -Wcoverage-mismatch \
145 -Wmultichar \
146 -Wunused-macros \
147 ; do
148 gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
149 done
150 # More warnings from gcc 4.6.2 --help=warnings.
151 for gl_manywarn_item in \
152 -Wabi \
153 -Wcpp \
154 -Wdeprecated \
155 -Wdeprecated-declarations \
156 -Wdiv-by-zero \
157 -Wdouble-promotion \
158 -Wendif-labels \
159 -Wextra \
160 -Wformat-contains-nul \
161 -Wformat-extra-args \
162 -Wformat-zero-length \
163 -Wformat=2 \
164 -Wmultichar \
165 -Wnormalized=nfc \
166 -Woverflow \
167 -Wpointer-to-int-cast \
168 -Wpragmas \
169 -Wsuggest-attribute=const \
170 -Wsuggest-attribute=noreturn \
171 -Wsuggest-attribute=pure \
172 -Wtrampolines \
173 ; do
174 gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
175 done
176
177 # Disable the missing-field-initializers warning if needed
178 if test "$gl_cv_cc_nomfi_needed" = yes; then
179 gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
180 fi
181
182 $1=$gl_manywarn_set
183 ])
0 dnl
1 dnl Enable all known GCC compiler warnings, except for those
2 dnl we can't yet cope with
3 dnl
4 AC_DEFUN([LIBVIRT_GLIB_COMPILE_WARNINGS],[
5 dnl ******************************
6 dnl More compiler warnings
7 dnl ******************************
8
9 AC_ARG_ENABLE([werror],
10 AS_HELP_STRING([--enable-werror], [Use -Werror (if supported)]),
11 [set_werror="$enableval"],
12 [if test -d $srcdir/.git; then
13 is_git_version=true
14 set_werror=yes
15 else
16 set_werror=no
17 fi])
18
19 # List of warnings that are not relevant / wanted
20
21 # Don't care about C++ compiler compat
22 dontwarn="$dontwarn -Wc++-compat"
23 dontwarn="$dontwarn -Wabi"
24 dontwarn="$dontwarn -Wdeprecated"
25 # Don't care about ancient C standard compat
26 dontwarn="$dontwarn -Wtraditional"
27 # Don't care about ancient C standard compat
28 dontwarn="$dontwarn -Wtraditional-conversion"
29 # Ignore warnings in /usr/include
30 dontwarn="$dontwarn -Wsystem-headers"
31 # Happy for compiler to add struct padding
32 dontwarn="$dontwarn -Wpadded"
33 # GCC very confused with -O2
34 dontwarn="$dontwarn -Wunreachable-code"
35 # We explicitly need to remove const sometimes
36 dontwarn="$dontwarn -Wcast-qual"
37 # Allow vars decl in the middle of blocks
38 dontwarn="$dontwarn -Wdeclaration-after-statement"
39 # Using long long is fine
40 dontwarn="$dontwarn -Wlong-long"
41 # Unused macros are ok
42 dontwarn="$dontwarn -Wunused-macros"
43
44
45 # g_clear_object & G_ATOMIC_OP_USE_GCC_BUILTINS causes
46 # violations with this. XXX Fix glib ?
47 dontwarn="$dontwarn -Wbad-function-cast"
48
49 # Get all possible GCC warnings
50 gl_MANYWARN_ALL_GCC([maybewarn])
51
52 # Remove the ones we don't want, blacklisted earlier
53 gl_MANYWARN_COMPLEMENT([wantwarn], [$maybewarn], [$dontwarn])
54
55 # Check for $CC support of each warning
56 for w in $wantwarn; do
57 gl_WARN_ADD([$w])
58 done
59
60 # GNULIB uses '-W' (aka -Wextra) which includes a bunch of stuff.
61 # Unfortunately, this means you can't simply use '-Wsign-compare'
62 # with gl_MANYWARN_COMPLEMENT
63 # So we have -W enabled, and then have to explicitly turn off...
64 gl_WARN_ADD([-Wno-sign-compare])
65
66 # Due to gutils.h bug in g_bit_storage
67 gl_WARN_ADD([-Wno-sign-conversion])
68 gl_WARN_ADD([-Wno-conversion])
69 gl_WARN_ADD([-Wno-unused-parameter])
70 # We can't enable this due to horrible spice_usb_device_get_description
71 # signature
72 gl_WARN_ADD([-Wno-format-nonliteral])
73
74
75
76 # GNULIB expects this to be part of -Wc++-compat, but we turn
77 # that one off, so we need to manually enable this again
78 gl_WARN_ADD([-Wjump-misses-init])
79
80 # This should be < 256 really. Currently we're down to 4096,
81 # but using 1024 bytes sized buffers (mostly for virStrerror)
82 # stops us from going down further
83 gl_WARN_ADD([-Wframe-larger-than=4096])
84
85 # Use improved glibc headers
86 AC_DEFINE([_FORTIFY_SOURCE], [2],
87 [enable compile-time and run-time bounds-checking, and some warnings])
88
89 # Extra special flags
90 dnl -fstack-protector stuff passes gl_WARN_ADD with gcc
91 dnl on Mingw32, but fails when actually used
92 case $host in
93 *-*-linux*)
94 dnl Fedora only uses -fstack-protector, but doesn't seem to
95 dnl be great overhead in adding -fstack-protector-all instead
96 dnl gl_WARN_ADD([-fstack-protector])
97 gl_WARN_ADD([-fstack-protector-all])
98 gl_WARN_ADD([--param=ssp-buffer-size=4])
99 ;;
100 esac
101 gl_WARN_ADD([-fexceptions])
102 gl_WARN_ADD([-fasynchronous-unwind-tables])
103 gl_WARN_ADD([-fdiagnostics-show-option])
104 gl_WARN_ADD([-funit-at-a-time])
105
106 # Need -fipa-pure-const in order to make -Wsuggest-attribute=pure
107 # fire even without -O.
108 gl_WARN_ADD([-fipa-pure-const])
109
110 # We should eventually enable this, but right now there are at
111 # least 75 functions triggering warnings.
112 gl_WARN_ADD([-Wno-suggest-attribute=pure])
113 gl_WARN_ADD([-Wno-suggest-attribute=const])
114
115
116 if test "$set_werror" = "yes"
117 then
118 gl_WARN_ADD([-Werror])
119 fi
120
121 WARN_LDFLAGS=$WARN_CFLAGS
122 AC_SUBST([WARN_CFLAGS])
123 AC_SUBST([WARN_LDFLAGS])
124 ])
0 # warnings.m4 serial 5
1 dnl Copyright (C) 2008-2012 Free Software Foundation, Inc.
2 dnl This file is free software; the Free Software Foundation
3 dnl gives unlimited permission to copy and/or distribute it,
4 dnl with or without modifications, as long as this notice is preserved.
5
6 dnl From Simon Josefsson
7
8 # gl_AS_VAR_APPEND(VAR, VALUE)
9 # ----------------------------
10 # Provide the functionality of AS_VAR_APPEND if Autoconf does not have it.
11 m4_ifdef([AS_VAR_APPEND],
12 [m4_copy([AS_VAR_APPEND], [gl_AS_VAR_APPEND])],
13 [m4_define([gl_AS_VAR_APPEND],
14 [AS_VAR_SET([$1], [AS_VAR_GET([$1])$2])])])
15
16 # gl_WARN_ADD(PARAMETER, [VARIABLE = WARN_CFLAGS])
17 # ------------------------------------------------
18 # Adds parameter to WARN_CFLAGS if the compiler supports it. For example,
19 # gl_WARN_ADD([-Wparentheses]).
20 AC_DEFUN([gl_WARN_ADD],
21 dnl FIXME: gl_Warn must be used unquoted until we can assume
22 dnl autoconf 2.64 or newer.
23 [AS_VAR_PUSHDEF([gl_Warn], [gl_cv_warn_$1])dnl
24 AC_CACHE_CHECK([whether compiler handles $1], m4_defn([gl_Warn]), [
25 gl_save_CPPFLAGS="$CPPFLAGS"
26 CPPFLAGS="${CPPFLAGS} $1"
27 AC_PREPROC_IFELSE([AC_LANG_PROGRAM([])],
28 [AS_VAR_SET(gl_Warn, [yes])],
29 [AS_VAR_SET(gl_Warn, [no])])
30 CPPFLAGS="$gl_save_CPPFLAGS"
31 ])
32 AS_VAR_IF(gl_Warn, [yes],
33 [gl_AS_VAR_APPEND(m4_if([$2], [], [[WARN_CFLAGS]], [[$2]]), [" $1"])])
34 AS_VAR_POPDEF([gl_Warn])dnl
35 m4_ifval([$2], [AS_LITERAL_IF([$2], [AC_SUBST([$2])], [])])dnl
36 ])
3838 subdir = python
3939 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
4040 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
41 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
42 $(top_srcdir)/configure.ac
41 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
42 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
43 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
44 $(top_srcdir)/m4/manywarnings.m4 \
45 $(top_srcdir)/m4/virt-compile-warnings.m4 \
46 $(top_srcdir)/m4/warnings.m4 $(top_srcdir)/configure.ac
4347 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
4448 $(ACLOCAL_M4)
4549 mkinstalldirs = $(install_sh) -d
126130 CC = @CC@
127131 CCDEPMODE = @CCDEPMODE@
128132 CFLAGS = @CFLAGS@
129 COMPILER_FLAGS = @COMPILER_FLAGS@
130133 COVERAGE_CFLAGS = @COVERAGE_CFLAGS@
131134 COVERAGE_LDFLAGS = @COVERAGE_LDFLAGS@
135 COV_FLAGS = @COV_FLAGS@
132136 CPP = @CPP@
133137 CPPFLAGS = @CPPFLAGS@
134138 CYGPATH_W = @CYGPATH_W@
222226 VAPIGEN = @VAPIGEN@
223227 VERSION = @VERSION@
224228 WARN_CFLAGS = @WARN_CFLAGS@
229 WARN_LDFLAGS = @WARN_LDFLAGS@
225230 abs_builddir = @abs_builddir@
226231 abs_srcdir = @abs_srcdir@
227232 abs_top_builddir = @abs_top_builddir@
3636 subdir = vapi
3737 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
3838 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
39 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
40 $(top_srcdir)/configure.ac
39 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
40 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
41 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
42 $(top_srcdir)/m4/manywarnings.m4 \
43 $(top_srcdir)/m4/virt-compile-warnings.m4 \
44 $(top_srcdir)/m4/warnings.m4 $(top_srcdir)/configure.ac
4145 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
4246 $(ACLOCAL_M4)
4347 mkinstalldirs = $(install_sh) -d
8892 CC = @CC@
8993 CCDEPMODE = @CCDEPMODE@
9094 CFLAGS = @CFLAGS@
91 COMPILER_FLAGS = @COMPILER_FLAGS@
9295 COVERAGE_CFLAGS = @COVERAGE_CFLAGS@
9396 COVERAGE_LDFLAGS = @COVERAGE_LDFLAGS@
97 COV_FLAGS = @COV_FLAGS@
9498 CPP = @CPP@
9599 CPPFLAGS = @CPPFLAGS@
96100 CYGPATH_W = @CYGPATH_W@
184188 VAPIGEN = @VAPIGEN@
185189 VERSION = @VERSION@
186190 WARN_CFLAGS = @WARN_CFLAGS@
191 WARN_LDFLAGS = @WARN_LDFLAGS@
187192 abs_builddir = @abs_builddir@
188193 abs_srcdir = @abs_srcdir@
189194 abs_top_builddir = @abs_top_builddir@