Mercurial > mxe-octave
comparison src/gl2ps-1-configure.patch @ 3834:291c610413cd
use autotools for building gl2ps on Linux systems
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 04 Mar 2015 17:25:01 -0500 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
3833:d89f1be9f644 | 3834:291c610413cd |
---|---|
1 diff -uNr a/aclocal.m4 b/aclocal.m4 | |
2 --- a/aclocal.m4 1969-12-31 19:00:00.000000000 -0500 | |
3 +++ b/aclocal.m4 2014-12-12 15:37:48.132166030 -0500 | |
4 @@ -0,0 +1,9751 @@ | |
5 +# generated automatically by aclocal 1.14.1 -*- Autoconf -*- | |
6 + | |
7 +# Copyright (C) 1996-2013 Free Software Foundation, Inc. | |
8 + | |
9 +# This file is free software; the Free Software Foundation | |
10 +# gives unlimited permission to copy and/or distribute it, | |
11 +# with or without modifications, as long as this notice is preserved. | |
12 + | |
13 +# This program is distributed in the hope that it will be useful, | |
14 +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without | |
15 +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A | |
16 +# PARTICULAR PURPOSE. | |
17 + | |
18 +m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) | |
19 +m4_ifndef([AC_AUTOCONF_VERSION], | |
20 + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl | |
21 +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, | |
22 +[m4_warning([this file was generated for autoconf 2.69. | |
23 +You have another version of autoconf. It may work, but is not guaranteed to. | |
24 +If you have problems, you may need to regenerate the build system entirely. | |
25 +To do so, use the procedure documented by the package, typically 'autoreconf'.])]) | |
26 + | |
27 +# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- | |
28 +# | |
29 +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, | |
30 +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software | |
31 +# Foundation, Inc. | |
32 +# Written by Gordon Matzigkeit, 1996 | |
33 +# | |
34 +# This file is free software; the Free Software Foundation gives | |
35 +# unlimited permission to copy and/or distribute it, with or without | |
36 +# modifications, as long as this notice is preserved. | |
37 + | |
38 +m4_define([_LT_COPYING], [dnl | |
39 +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, | |
40 +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software | |
41 +# Foundation, Inc. | |
42 +# Written by Gordon Matzigkeit, 1996 | |
43 +# | |
44 +# This file is part of GNU Libtool. | |
45 +# | |
46 +# GNU Libtool is free software; you can redistribute it and/or | |
47 +# modify it under the terms of the GNU General Public License as | |
48 +# published by the Free Software Foundation; either version 2 of | |
49 +# the License, or (at your option) any later version. | |
50 +# | |
51 +# As a special exception to the GNU General Public License, | |
52 +# if you distribute this file as part of a program or library that | |
53 +# is built using GNU Libtool, you may include this file under the | |
54 +# same distribution terms that you use for the rest of that program. | |
55 +# | |
56 +# GNU Libtool is distributed in the hope that it will be useful, | |
57 +# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
58 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
59 +# GNU General Public License for more details. | |
60 +# | |
61 +# You should have received a copy of the GNU General Public License | |
62 +# along with GNU Libtool; see the file COPYING. If not, a copy | |
63 +# can be downloaded from http://www.gnu.org/licenses/gpl.html, or | |
64 +# obtained by writing to the Free Software Foundation, Inc., | |
65 +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |
66 +]) | |
67 + | |
68 +# serial 57 LT_INIT | |
69 + | |
70 + | |
71 +# LT_PREREQ(VERSION) | |
72 +# ------------------ | |
73 +# Complain and exit if this libtool version is less that VERSION. | |
74 +m4_defun([LT_PREREQ], | |
75 +[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, | |
76 + [m4_default([$3], | |
77 + [m4_fatal([Libtool version $1 or higher is required], | |
78 + 63)])], | |
79 + [$2])]) | |
80 + | |
81 + | |
82 +# _LT_CHECK_BUILDDIR | |
83 +# ------------------ | |
84 +# Complain if the absolute build directory name contains unusual characters | |
85 +m4_defun([_LT_CHECK_BUILDDIR], | |
86 +[case `pwd` in | |
87 + *\ * | *\ *) | |
88 + AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; | |
89 +esac | |
90 +]) | |
91 + | |
92 + | |
93 +# LT_INIT([OPTIONS]) | |
94 +# ------------------ | |
95 +AC_DEFUN([LT_INIT], | |
96 +[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT | |
97 +AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl | |
98 +AC_BEFORE([$0], [LT_LANG])dnl | |
99 +AC_BEFORE([$0], [LT_OUTPUT])dnl | |
100 +AC_BEFORE([$0], [LTDL_INIT])dnl | |
101 +m4_require([_LT_CHECK_BUILDDIR])dnl | |
102 + | |
103 +dnl Autoconf doesn't catch unexpanded LT_ macros by default: | |
104 +m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl | |
105 +m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl | |
106 +dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 | |
107 +dnl unless we require an AC_DEFUNed macro: | |
108 +AC_REQUIRE([LTOPTIONS_VERSION])dnl | |
109 +AC_REQUIRE([LTSUGAR_VERSION])dnl | |
110 +AC_REQUIRE([LTVERSION_VERSION])dnl | |
111 +AC_REQUIRE([LTOBSOLETE_VERSION])dnl | |
112 +m4_require([_LT_PROG_LTMAIN])dnl | |
113 + | |
114 +_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) | |
115 + | |
116 +dnl Parse OPTIONS | |
117 +_LT_SET_OPTIONS([$0], [$1]) | |
118 + | |
119 +# This can be used to rebuild libtool when needed | |
120 +LIBTOOL_DEPS="$ltmain" | |
121 + | |
122 +# Always use our own libtool. | |
123 +LIBTOOL='$(SHELL) $(top_builddir)/libtool' | |
124 +AC_SUBST(LIBTOOL)dnl | |
125 + | |
126 +_LT_SETUP | |
127 + | |
128 +# Only expand once: | |
129 +m4_define([LT_INIT]) | |
130 +])# LT_INIT | |
131 + | |
132 +# Old names: | |
133 +AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) | |
134 +AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) | |
135 +dnl aclocal-1.4 backwards compatibility: | |
136 +dnl AC_DEFUN([AC_PROG_LIBTOOL], []) | |
137 +dnl AC_DEFUN([AM_PROG_LIBTOOL], []) | |
138 + | |
139 + | |
140 +# _LT_CC_BASENAME(CC) | |
141 +# ------------------- | |
142 +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. | |
143 +m4_defun([_LT_CC_BASENAME], | |
144 +[for cc_temp in $1""; do | |
145 + case $cc_temp in | |
146 + compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; | |
147 + distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; | |
148 + \-*) ;; | |
149 + *) break;; | |
150 + esac | |
151 +done | |
152 +cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` | |
153 +]) | |
154 + | |
155 + | |
156 +# _LT_FILEUTILS_DEFAULTS | |
157 +# ---------------------- | |
158 +# It is okay to use these file commands and assume they have been set | |
159 +# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. | |
160 +m4_defun([_LT_FILEUTILS_DEFAULTS], | |
161 +[: ${CP="cp -f"} | |
162 +: ${MV="mv -f"} | |
163 +: ${RM="rm -f"} | |
164 +])# _LT_FILEUTILS_DEFAULTS | |
165 + | |
166 + | |
167 +# _LT_SETUP | |
168 +# --------- | |
169 +m4_defun([_LT_SETUP], | |
170 +[AC_REQUIRE([AC_CANONICAL_HOST])dnl | |
171 +AC_REQUIRE([AC_CANONICAL_BUILD])dnl | |
172 +AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl | |
173 +AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl | |
174 + | |
175 +_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl | |
176 +dnl | |
177 +_LT_DECL([], [host_alias], [0], [The host system])dnl | |
178 +_LT_DECL([], [host], [0])dnl | |
179 +_LT_DECL([], [host_os], [0])dnl | |
180 +dnl | |
181 +_LT_DECL([], [build_alias], [0], [The build system])dnl | |
182 +_LT_DECL([], [build], [0])dnl | |
183 +_LT_DECL([], [build_os], [0])dnl | |
184 +dnl | |
185 +AC_REQUIRE([AC_PROG_CC])dnl | |
186 +AC_REQUIRE([LT_PATH_LD])dnl | |
187 +AC_REQUIRE([LT_PATH_NM])dnl | |
188 +dnl | |
189 +AC_REQUIRE([AC_PROG_LN_S])dnl | |
190 +test -z "$LN_S" && LN_S="ln -s" | |
191 +_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl | |
192 +dnl | |
193 +AC_REQUIRE([LT_CMD_MAX_LEN])dnl | |
194 +_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl | |
195 +_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl | |
196 +dnl | |
197 +m4_require([_LT_FILEUTILS_DEFAULTS])dnl | |
198 +m4_require([_LT_CHECK_SHELL_FEATURES])dnl | |
199 +m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl | |
200 +m4_require([_LT_CMD_RELOAD])dnl | |
201 +m4_require([_LT_CHECK_MAGIC_METHOD])dnl | |
202 +m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl | |
203 +m4_require([_LT_CMD_OLD_ARCHIVE])dnl | |
204 +m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl | |
205 +m4_require([_LT_WITH_SYSROOT])dnl | |
206 + | |
207 +_LT_CONFIG_LIBTOOL_INIT([ | |
208 +# See if we are running on zsh, and set the options which allow our | |
209 +# commands through without removal of \ escapes INIT. | |
210 +if test -n "\${ZSH_VERSION+set}" ; then | |
211 + setopt NO_GLOB_SUBST | |
212 +fi | |
213 +]) | |
214 +if test -n "${ZSH_VERSION+set}" ; then | |
215 + setopt NO_GLOB_SUBST | |
216 +fi | |
217 + | |
218 +_LT_CHECK_OBJDIR | |
219 + | |
220 +m4_require([_LT_TAG_COMPILER])dnl | |
221 + | |
222 +case $host_os in | |
223 +aix3*) | |
224 + # AIX sometimes has problems with the GCC collect2 program. For some | |
225 + # reason, if we set the COLLECT_NAMES environment variable, the problems | |
226 + # vanish in a puff of smoke. | |
227 + if test "X${COLLECT_NAMES+set}" != Xset; then | |
228 + COLLECT_NAMES= | |
229 + export COLLECT_NAMES | |
230 + fi | |
231 + ;; | |
232 +esac | |
233 + | |
234 +# Global variables: | |
235 +ofile=libtool | |
236 +can_build_shared=yes | |
237 + | |
238 +# All known linkers require a `.a' archive for static linking (except MSVC, | |
239 +# which needs '.lib'). | |
240 +libext=a | |
241 + | |
242 +with_gnu_ld="$lt_cv_prog_gnu_ld" | |
243 + | |
244 +old_CC="$CC" | |
245 +old_CFLAGS="$CFLAGS" | |
246 + | |
247 +# Set sane defaults for various variables | |
248 +test -z "$CC" && CC=cc | |
249 +test -z "$LTCC" && LTCC=$CC | |
250 +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS | |
251 +test -z "$LD" && LD=ld | |
252 +test -z "$ac_objext" && ac_objext=o | |
253 + | |
254 +_LT_CC_BASENAME([$compiler]) | |
255 + | |
256 +# Only perform the check for file, if the check method requires it | |
257 +test -z "$MAGIC_CMD" && MAGIC_CMD=file | |
258 +case $deplibs_check_method in | |
259 +file_magic*) | |
260 + if test "$file_magic_cmd" = '$MAGIC_CMD'; then | |
261 + _LT_PATH_MAGIC | |
262 + fi | |
263 + ;; | |
264 +esac | |
265 + | |
266 +# Use C for the default configuration in the libtool script | |
267 +LT_SUPPORTED_TAG([CC]) | |
268 +_LT_LANG_C_CONFIG | |
269 +_LT_LANG_DEFAULT_CONFIG | |
270 +_LT_CONFIG_COMMANDS | |
271 +])# _LT_SETUP | |
272 + | |
273 + | |
274 +# _LT_PREPARE_SED_QUOTE_VARS | |
275 +# -------------------------- | |
276 +# Define a few sed substitution that help us do robust quoting. | |
277 +m4_defun([_LT_PREPARE_SED_QUOTE_VARS], | |
278 +[# Backslashify metacharacters that are still active within | |
279 +# double-quoted strings. | |
280 +sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' | |
281 + | |
282 +# Same as above, but do not quote variable references. | |
283 +double_quote_subst='s/\([["`\\]]\)/\\\1/g' | |
284 + | |
285 +# Sed substitution to delay expansion of an escaped shell variable in a | |
286 +# double_quote_subst'ed string. | |
287 +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' | |
288 + | |
289 +# Sed substitution to delay expansion of an escaped single quote. | |
290 +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' | |
291 + | |
292 +# Sed substitution to avoid accidental globbing in evaled expressions | |
293 +no_glob_subst='s/\*/\\\*/g' | |
294 +]) | |
295 + | |
296 +# _LT_PROG_LTMAIN | |
297 +# --------------- | |
298 +# Note that this code is called both from `configure', and `config.status' | |
299 +# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, | |
300 +# `config.status' has no value for ac_aux_dir unless we are using Automake, | |
301 +# so we pass a copy along to make sure it has a sensible value anyway. | |
302 +m4_defun([_LT_PROG_LTMAIN], | |
303 +[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl | |
304 +_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) | |
305 +ltmain="$ac_aux_dir/ltmain.sh" | |
306 +])# _LT_PROG_LTMAIN | |
307 + | |
308 + | |
309 + | |
310 +# So that we can recreate a full libtool script including additional | |
311 +# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS | |
312 +# in macros and then make a single call at the end using the `libtool' | |
313 +# label. | |
314 + | |
315 + | |
316 +# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) | |
317 +# ---------------------------------------- | |
318 +# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. | |
319 +m4_define([_LT_CONFIG_LIBTOOL_INIT], | |
320 +[m4_ifval([$1], | |
321 + [m4_append([_LT_OUTPUT_LIBTOOL_INIT], | |
322 + [$1 | |
323 +])])]) | |
324 + | |
325 +# Initialize. | |
326 +m4_define([_LT_OUTPUT_LIBTOOL_INIT]) | |
327 + | |
328 + | |
329 +# _LT_CONFIG_LIBTOOL([COMMANDS]) | |
330 +# ------------------------------ | |
331 +# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. | |
332 +m4_define([_LT_CONFIG_LIBTOOL], | |
333 +[m4_ifval([$1], | |
334 + [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], | |
335 + [$1 | |
336 +])])]) | |
337 + | |
338 +# Initialize. | |
339 +m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) | |
340 + | |
341 + | |
342 +# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) | |
343 +# ----------------------------------------------------- | |
344 +m4_defun([_LT_CONFIG_SAVE_COMMANDS], | |
345 +[_LT_CONFIG_LIBTOOL([$1]) | |
346 +_LT_CONFIG_LIBTOOL_INIT([$2]) | |
347 +]) | |
348 + | |
349 + | |
350 +# _LT_FORMAT_COMMENT([COMMENT]) | |
351 +# ----------------------------- | |
352 +# Add leading comment marks to the start of each line, and a trailing | |
353 +# full-stop to the whole comment if one is not present already. | |
354 +m4_define([_LT_FORMAT_COMMENT], | |
355 +[m4_ifval([$1], [ | |
356 +m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], | |
357 + [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) | |
358 +)]) | |
359 + | |
360 + | |
361 + | |
362 + | |
363 + | |
364 +# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) | |
365 +# ------------------------------------------------------------------- | |
366 +# CONFIGNAME is the name given to the value in the libtool script. | |
367 +# VARNAME is the (base) name used in the configure script. | |
368 +# VALUE may be 0, 1 or 2 for a computed quote escaped value based on | |
369 +# VARNAME. Any other value will be used directly. | |
370 +m4_define([_LT_DECL], | |
371 +[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], | |
372 + [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], | |
373 + [m4_ifval([$1], [$1], [$2])]) | |
374 + lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) | |
375 + m4_ifval([$4], | |
376 + [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) | |
377 + lt_dict_add_subkey([lt_decl_dict], [$2], | |
378 + [tagged?], [m4_ifval([$5], [yes], [no])])]) | |
379 +]) | |
380 + | |
381 + | |
382 +# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) | |
383 +# -------------------------------------------------------- | |
384 +m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) | |
385 + | |
386 + | |
387 +# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) | |
388 +# ------------------------------------------------ | |
389 +m4_define([lt_decl_tag_varnames], | |
390 +[_lt_decl_filter([tagged?], [yes], $@)]) | |
391 + | |
392 + | |
393 +# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) | |
394 +# --------------------------------------------------------- | |
395 +m4_define([_lt_decl_filter], | |
396 +[m4_case([$#], | |
397 + [0], [m4_fatal([$0: too few arguments: $#])], | |
398 + [1], [m4_fatal([$0: too few arguments: $#: $1])], | |
399 + [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], | |
400 + [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], | |
401 + [lt_dict_filter([lt_decl_dict], $@)])[]dnl | |
402 +]) | |
403 + | |
404 + | |
405 +# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) | |
406 +# -------------------------------------------------- | |
407 +m4_define([lt_decl_quote_varnames], | |
408 +[_lt_decl_filter([value], [1], $@)]) | |
409 + | |
410 + | |
411 +# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) | |
412 +# --------------------------------------------------- | |
413 +m4_define([lt_decl_dquote_varnames], | |
414 +[_lt_decl_filter([value], [2], $@)]) | |
415 + | |
416 + | |
417 +# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) | |
418 +# --------------------------------------------------- | |
419 +m4_define([lt_decl_varnames_tagged], | |
420 +[m4_assert([$# <= 2])dnl | |
421 +_$0(m4_quote(m4_default([$1], [[, ]])), | |
422 + m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), | |
423 + m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) | |
424 +m4_define([_lt_decl_varnames_tagged], | |
425 +[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) | |
426 + | |
427 + | |
428 +# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) | |
429 +# ------------------------------------------------ | |
430 +m4_define([lt_decl_all_varnames], | |
431 +[_$0(m4_quote(m4_default([$1], [[, ]])), | |
432 + m4_if([$2], [], | |
433 + m4_quote(lt_decl_varnames), | |
434 + m4_quote(m4_shift($@))))[]dnl | |
435 +]) | |
436 +m4_define([_lt_decl_all_varnames], | |
437 +[lt_join($@, lt_decl_varnames_tagged([$1], | |
438 + lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl | |
439 +]) | |
440 + | |
441 + | |
442 +# _LT_CONFIG_STATUS_DECLARE([VARNAME]) | |
443 +# ------------------------------------ | |
444 +# Quote a variable value, and forward it to `config.status' so that its | |
445 +# declaration there will have the same value as in `configure'. VARNAME | |
446 +# must have a single quote delimited value for this to work. | |
447 +m4_define([_LT_CONFIG_STATUS_DECLARE], | |
448 +[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) | |
449 + | |
450 + | |
451 +# _LT_CONFIG_STATUS_DECLARATIONS | |
452 +# ------------------------------ | |
453 +# We delimit libtool config variables with single quotes, so when | |
454 +# we write them to config.status, we have to be sure to quote all | |
455 +# embedded single quotes properly. In configure, this macro expands | |
456 +# each variable declared with _LT_DECL (and _LT_TAGDECL) into: | |
457 +# | |
458 +# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' | |
459 +m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], | |
460 +[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), | |
461 + [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) | |
462 + | |
463 + | |
464 +# _LT_LIBTOOL_TAGS | |
465 +# ---------------- | |
466 +# Output comment and list of tags supported by the script | |
467 +m4_defun([_LT_LIBTOOL_TAGS], | |
468 +[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl | |
469 +available_tags="_LT_TAGS"dnl | |
470 +]) | |
471 + | |
472 + | |
473 +# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) | |
474 +# ----------------------------------- | |
475 +# Extract the dictionary values for VARNAME (optionally with TAG) and | |
476 +# expand to a commented shell variable setting: | |
477 +# | |
478 +# # Some comment about what VAR is for. | |
479 +# visible_name=$lt_internal_name | |
480 +m4_define([_LT_LIBTOOL_DECLARE], | |
481 +[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], | |
482 + [description])))[]dnl | |
483 +m4_pushdef([_libtool_name], | |
484 + m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl | |
485 +m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), | |
486 + [0], [_libtool_name=[$]$1], | |
487 + [1], [_libtool_name=$lt_[]$1], | |
488 + [2], [_libtool_name=$lt_[]$1], | |
489 + [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl | |
490 +m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl | |
491 +]) | |
492 + | |
493 + | |
494 +# _LT_LIBTOOL_CONFIG_VARS | |
495 +# ----------------------- | |
496 +# Produce commented declarations of non-tagged libtool config variables | |
497 +# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' | |
498 +# script. Tagged libtool config variables (even for the LIBTOOL CONFIG | |
499 +# section) are produced by _LT_LIBTOOL_TAG_VARS. | |
500 +m4_defun([_LT_LIBTOOL_CONFIG_VARS], | |
501 +[m4_foreach([_lt_var], | |
502 + m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), | |
503 + [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) | |
504 + | |
505 + | |
506 +# _LT_LIBTOOL_TAG_VARS(TAG) | |
507 +# ------------------------- | |
508 +m4_define([_LT_LIBTOOL_TAG_VARS], | |
509 +[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), | |
510 + [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) | |
511 + | |
512 + | |
513 +# _LT_TAGVAR(VARNAME, [TAGNAME]) | |
514 +# ------------------------------ | |
515 +m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) | |
516 + | |
517 + | |
518 +# _LT_CONFIG_COMMANDS | |
519 +# ------------------- | |
520 +# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of | |
521 +# variables for single and double quote escaping we saved from calls | |
522 +# to _LT_DECL, we can put quote escaped variables declarations | |
523 +# into `config.status', and then the shell code to quote escape them in | |
524 +# for loops in `config.status'. Finally, any additional code accumulated | |
525 +# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. | |
526 +m4_defun([_LT_CONFIG_COMMANDS], | |
527 +[AC_PROVIDE_IFELSE([LT_OUTPUT], | |
528 + dnl If the libtool generation code has been placed in $CONFIG_LT, | |
529 + dnl instead of duplicating it all over again into config.status, | |
530 + dnl then we will have config.status run $CONFIG_LT later, so it | |
531 + dnl needs to know what name is stored there: | |
532 + [AC_CONFIG_COMMANDS([libtool], | |
533 + [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], | |
534 + dnl If the libtool generation code is destined for config.status, | |
535 + dnl expand the accumulated commands and init code now: | |
536 + [AC_CONFIG_COMMANDS([libtool], | |
537 + [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) | |
538 +])#_LT_CONFIG_COMMANDS | |
539 + | |
540 + | |
541 +# Initialize. | |
542 +m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], | |
543 +[ | |
544 + | |
545 +# The HP-UX ksh and POSIX shell print the target directory to stdout | |
546 +# if CDPATH is set. | |
547 +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
548 + | |
549 +sed_quote_subst='$sed_quote_subst' | |
550 +double_quote_subst='$double_quote_subst' | |
551 +delay_variable_subst='$delay_variable_subst' | |
552 +_LT_CONFIG_STATUS_DECLARATIONS | |
553 +LTCC='$LTCC' | |
554 +LTCFLAGS='$LTCFLAGS' | |
555 +compiler='$compiler_DEFAULT' | |
556 + | |
557 +# A function that is used when there is no print builtin or printf. | |
558 +func_fallback_echo () | |
559 +{ | |
560 + eval 'cat <<_LTECHO_EOF | |
561 +\$[]1 | |
562 +_LTECHO_EOF' | |
563 +} | |
564 + | |
565 +# Quote evaled strings. | |
566 +for var in lt_decl_all_varnames([[ \ | |
567 +]], lt_decl_quote_varnames); do | |
568 + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in | |
569 + *[[\\\\\\\`\\"\\\$]]*) | |
570 + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" | |
571 + ;; | |
572 + *) | |
573 + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" | |
574 + ;; | |
575 + esac | |
576 +done | |
577 + | |
578 +# Double-quote double-evaled strings. | |
579 +for var in lt_decl_all_varnames([[ \ | |
580 +]], lt_decl_dquote_varnames); do | |
581 + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in | |
582 + *[[\\\\\\\`\\"\\\$]]*) | |
583 + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" | |
584 + ;; | |
585 + *) | |
586 + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" | |
587 + ;; | |
588 + esac | |
589 +done | |
590 + | |
591 +_LT_OUTPUT_LIBTOOL_INIT | |
592 +]) | |
593 + | |
594 +# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) | |
595 +# ------------------------------------ | |
596 +# Generate a child script FILE with all initialization necessary to | |
597 +# reuse the environment learned by the parent script, and make the | |
598 +# file executable. If COMMENT is supplied, it is inserted after the | |
599 +# `#!' sequence but before initialization text begins. After this | |
600 +# macro, additional text can be appended to FILE to form the body of | |
601 +# the child script. The macro ends with non-zero status if the | |
602 +# file could not be fully written (such as if the disk is full). | |
603 +m4_ifdef([AS_INIT_GENERATED], | |
604 +[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], | |
605 +[m4_defun([_LT_GENERATED_FILE_INIT], | |
606 +[m4_require([AS_PREPARE])]dnl | |
607 +[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl | |
608 +[lt_write_fail=0 | |
609 +cat >$1 <<_ASEOF || lt_write_fail=1 | |
610 +#! $SHELL | |
611 +# Generated by $as_me. | |
612 +$2 | |
613 +SHELL=\${CONFIG_SHELL-$SHELL} | |
614 +export SHELL | |
615 +_ASEOF | |
616 +cat >>$1 <<\_ASEOF || lt_write_fail=1 | |
617 +AS_SHELL_SANITIZE | |
618 +_AS_PREPARE | |
619 +exec AS_MESSAGE_FD>&1 | |
620 +_ASEOF | |
621 +test $lt_write_fail = 0 && chmod +x $1[]dnl | |
622 +m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT | |
623 + | |
624 +# LT_OUTPUT | |
625 +# --------- | |
626 +# This macro allows early generation of the libtool script (before | |
627 +# AC_OUTPUT is called), incase it is used in configure for compilation | |
628 +# tests. | |
629 +AC_DEFUN([LT_OUTPUT], | |
630 +[: ${CONFIG_LT=./config.lt} | |
631 +AC_MSG_NOTICE([creating $CONFIG_LT]) | |
632 +_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], | |
633 +[# Run this file to recreate a libtool stub with the current configuration.]) | |
634 + | |
635 +cat >>"$CONFIG_LT" <<\_LTEOF | |
636 +lt_cl_silent=false | |
637 +exec AS_MESSAGE_LOG_FD>>config.log | |
638 +{ | |
639 + echo | |
640 + AS_BOX([Running $as_me.]) | |
641 +} >&AS_MESSAGE_LOG_FD | |
642 + | |
643 +lt_cl_help="\ | |
644 +\`$as_me' creates a local libtool stub from the current configuration, | |
645 +for use in further configure time tests before the real libtool is | |
646 +generated. | |
647 + | |
648 +Usage: $[0] [[OPTIONS]] | |
649 + | |
650 + -h, --help print this help, then exit | |
651 + -V, --version print version number, then exit | |
652 + -q, --quiet do not print progress messages | |
653 + -d, --debug don't remove temporary files | |
654 + | |
655 +Report bugs to <bug-libtool@gnu.org>." | |
656 + | |
657 +lt_cl_version="\ | |
658 +m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl | |
659 +m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) | |
660 +configured by $[0], generated by m4_PACKAGE_STRING. | |
661 + | |
662 +Copyright (C) 2011 Free Software Foundation, Inc. | |
663 +This config.lt script is free software; the Free Software Foundation | |
664 +gives unlimited permision to copy, distribute and modify it." | |
665 + | |
666 +while test $[#] != 0 | |
667 +do | |
668 + case $[1] in | |
669 + --version | --v* | -V ) | |
670 + echo "$lt_cl_version"; exit 0 ;; | |
671 + --help | --h* | -h ) | |
672 + echo "$lt_cl_help"; exit 0 ;; | |
673 + --debug | --d* | -d ) | |
674 + debug=: ;; | |
675 + --quiet | --q* | --silent | --s* | -q ) | |
676 + lt_cl_silent=: ;; | |
677 + | |
678 + -*) AC_MSG_ERROR([unrecognized option: $[1] | |
679 +Try \`$[0] --help' for more information.]) ;; | |
680 + | |
681 + *) AC_MSG_ERROR([unrecognized argument: $[1] | |
682 +Try \`$[0] --help' for more information.]) ;; | |
683 + esac | |
684 + shift | |
685 +done | |
686 + | |
687 +if $lt_cl_silent; then | |
688 + exec AS_MESSAGE_FD>/dev/null | |
689 +fi | |
690 +_LTEOF | |
691 + | |
692 +cat >>"$CONFIG_LT" <<_LTEOF | |
693 +_LT_OUTPUT_LIBTOOL_COMMANDS_INIT | |
694 +_LTEOF | |
695 + | |
696 +cat >>"$CONFIG_LT" <<\_LTEOF | |
697 +AC_MSG_NOTICE([creating $ofile]) | |
698 +_LT_OUTPUT_LIBTOOL_COMMANDS | |
699 +AS_EXIT(0) | |
700 +_LTEOF | |
701 +chmod +x "$CONFIG_LT" | |
702 + | |
703 +# configure is writing to config.log, but config.lt does its own redirection, | |
704 +# appending to config.log, which fails on DOS, as config.log is still kept | |
705 +# open by configure. Here we exec the FD to /dev/null, effectively closing | |
706 +# config.log, so it can be properly (re)opened and appended to by config.lt. | |
707 +lt_cl_success=: | |
708 +test "$silent" = yes && | |
709 + lt_config_lt_args="$lt_config_lt_args --quiet" | |
710 +exec AS_MESSAGE_LOG_FD>/dev/null | |
711 +$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false | |
712 +exec AS_MESSAGE_LOG_FD>>config.log | |
713 +$lt_cl_success || AS_EXIT(1) | |
714 +])# LT_OUTPUT | |
715 + | |
716 + | |
717 +# _LT_CONFIG(TAG) | |
718 +# --------------- | |
719 +# If TAG is the built-in tag, create an initial libtool script with a | |
720 +# default configuration from the untagged config vars. Otherwise add code | |
721 +# to config.status for appending the configuration named by TAG from the | |
722 +# matching tagged config vars. | |
723 +m4_defun([_LT_CONFIG], | |
724 +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl | |
725 +_LT_CONFIG_SAVE_COMMANDS([ | |
726 + m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl | |
727 + m4_if(_LT_TAG, [C], [ | |
728 + # See if we are running on zsh, and set the options which allow our | |
729 + # commands through without removal of \ escapes. | |
730 + if test -n "${ZSH_VERSION+set}" ; then | |
731 + setopt NO_GLOB_SUBST | |
732 + fi | |
733 + | |
734 + cfgfile="${ofile}T" | |
735 + trap "$RM \"$cfgfile\"; exit 1" 1 2 15 | |
736 + $RM "$cfgfile" | |
737 + | |
738 + cat <<_LT_EOF >> "$cfgfile" | |
739 +#! $SHELL | |
740 + | |
741 +# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. | |
742 +# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION | |
743 +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
744 +# NOTE: Changes made to this file will be lost: look at ltmain.sh. | |
745 +# | |
746 +_LT_COPYING | |
747 +_LT_LIBTOOL_TAGS | |
748 + | |
749 +# ### BEGIN LIBTOOL CONFIG | |
750 +_LT_LIBTOOL_CONFIG_VARS | |
751 +_LT_LIBTOOL_TAG_VARS | |
752 +# ### END LIBTOOL CONFIG | |
753 + | |
754 +_LT_EOF | |
755 + | |
756 + case $host_os in | |
757 + aix3*) | |
758 + cat <<\_LT_EOF >> "$cfgfile" | |
759 +# AIX sometimes has problems with the GCC collect2 program. For some | |
760 +# reason, if we set the COLLECT_NAMES environment variable, the problems | |
761 +# vanish in a puff of smoke. | |
762 +if test "X${COLLECT_NAMES+set}" != Xset; then | |
763 + COLLECT_NAMES= | |
764 + export COLLECT_NAMES | |
765 +fi | |
766 +_LT_EOF | |
767 + ;; | |
768 + esac | |
769 + | |
770 + _LT_PROG_LTMAIN | |
771 + | |
772 + # We use sed instead of cat because bash on DJGPP gets confused if | |
773 + # if finds mixed CR/LF and LF-only lines. Since sed operates in | |
774 + # text mode, it properly converts lines to CR/LF. This bash problem | |
775 + # is reportedly fixed, but why not run on old versions too? | |
776 + sed '$q' "$ltmain" >> "$cfgfile" \ | |
777 + || (rm -f "$cfgfile"; exit 1) | |
778 + | |
779 + _LT_PROG_REPLACE_SHELLFNS | |
780 + | |
781 + mv -f "$cfgfile" "$ofile" || | |
782 + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") | |
783 + chmod +x "$ofile" | |
784 +], | |
785 +[cat <<_LT_EOF >> "$ofile" | |
786 + | |
787 +dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded | |
788 +dnl in a comment (ie after a #). | |
789 +# ### BEGIN LIBTOOL TAG CONFIG: $1 | |
790 +_LT_LIBTOOL_TAG_VARS(_LT_TAG) | |
791 +# ### END LIBTOOL TAG CONFIG: $1 | |
792 +_LT_EOF | |
793 +])dnl /m4_if | |
794 +], | |
795 +[m4_if([$1], [], [ | |
796 + PACKAGE='$PACKAGE' | |
797 + VERSION='$VERSION' | |
798 + TIMESTAMP='$TIMESTAMP' | |
799 + RM='$RM' | |
800 + ofile='$ofile'], []) | |
801 +])dnl /_LT_CONFIG_SAVE_COMMANDS | |
802 +])# _LT_CONFIG | |
803 + | |
804 + | |
805 +# LT_SUPPORTED_TAG(TAG) | |
806 +# --------------------- | |
807 +# Trace this macro to discover what tags are supported by the libtool | |
808 +# --tag option, using: | |
809 +# autoconf --trace 'LT_SUPPORTED_TAG:$1' | |
810 +AC_DEFUN([LT_SUPPORTED_TAG], []) | |
811 + | |
812 + | |
813 +# C support is built-in for now | |
814 +m4_define([_LT_LANG_C_enabled], []) | |
815 +m4_define([_LT_TAGS], []) | |
816 + | |
817 + | |
818 +# LT_LANG(LANG) | |
819 +# ------------- | |
820 +# Enable libtool support for the given language if not already enabled. | |
821 +AC_DEFUN([LT_LANG], | |
822 +[AC_BEFORE([$0], [LT_OUTPUT])dnl | |
823 +m4_case([$1], | |
824 + [C], [_LT_LANG(C)], | |
825 + [C++], [_LT_LANG(CXX)], | |
826 + [Go], [_LT_LANG(GO)], | |
827 + [Java], [_LT_LANG(GCJ)], | |
828 + [Fortran 77], [_LT_LANG(F77)], | |
829 + [Fortran], [_LT_LANG(FC)], | |
830 + [Windows Resource], [_LT_LANG(RC)], | |
831 + [m4_ifdef([_LT_LANG_]$1[_CONFIG], | |
832 + [_LT_LANG($1)], | |
833 + [m4_fatal([$0: unsupported language: "$1"])])])dnl | |
834 +])# LT_LANG | |
835 + | |
836 + | |
837 +# _LT_LANG(LANGNAME) | |
838 +# ------------------ | |
839 +m4_defun([_LT_LANG], | |
840 +[m4_ifdef([_LT_LANG_]$1[_enabled], [], | |
841 + [LT_SUPPORTED_TAG([$1])dnl | |
842 + m4_append([_LT_TAGS], [$1 ])dnl | |
843 + m4_define([_LT_LANG_]$1[_enabled], [])dnl | |
844 + _LT_LANG_$1_CONFIG($1)])dnl | |
845 +])# _LT_LANG | |
846 + | |
847 + | |
848 +m4_ifndef([AC_PROG_GO], [ | |
849 +# NOTE: This macro has been submitted for inclusion into # | |
850 +# GNU Autoconf as AC_PROG_GO. When it is available in # | |
851 +# a released version of Autoconf we should remove this # | |
852 +# macro and use it instead. # | |
853 +m4_defun([AC_PROG_GO], | |
854 +[AC_LANG_PUSH(Go)dnl | |
855 +AC_ARG_VAR([GOC], [Go compiler command])dnl | |
856 +AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl | |
857 +_AC_ARG_VAR_LDFLAGS()dnl | |
858 +AC_CHECK_TOOL(GOC, gccgo) | |
859 +if test -z "$GOC"; then | |
860 + if test -n "$ac_tool_prefix"; then | |
861 + AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) | |
862 + fi | |
863 +fi | |
864 +if test -z "$GOC"; then | |
865 + AC_CHECK_PROG(GOC, gccgo, gccgo, false) | |
866 +fi | |
867 +])#m4_defun | |
868 +])#m4_ifndef | |
869 + | |
870 + | |
871 +# _LT_LANG_DEFAULT_CONFIG | |
872 +# ----------------------- | |
873 +m4_defun([_LT_LANG_DEFAULT_CONFIG], | |
874 +[AC_PROVIDE_IFELSE([AC_PROG_CXX], | |
875 + [LT_LANG(CXX)], | |
876 + [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) | |
877 + | |
878 +AC_PROVIDE_IFELSE([AC_PROG_F77], | |
879 + [LT_LANG(F77)], | |
880 + [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) | |
881 + | |
882 +AC_PROVIDE_IFELSE([AC_PROG_FC], | |
883 + [LT_LANG(FC)], | |
884 + [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) | |
885 + | |
886 +dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal | |
887 +dnl pulling things in needlessly. | |
888 +AC_PROVIDE_IFELSE([AC_PROG_GCJ], | |
889 + [LT_LANG(GCJ)], | |
890 + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], | |
891 + [LT_LANG(GCJ)], | |
892 + [AC_PROVIDE_IFELSE([LT_PROG_GCJ], | |
893 + [LT_LANG(GCJ)], | |
894 + [m4_ifdef([AC_PROG_GCJ], | |
895 + [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) | |
896 + m4_ifdef([A][M_PROG_GCJ], | |
897 + [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) | |
898 + m4_ifdef([LT_PROG_GCJ], | |
899 + [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) | |
900 + | |
901 +AC_PROVIDE_IFELSE([AC_PROG_GO], | |
902 + [LT_LANG(GO)], | |
903 + [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) | |
904 + | |
905 +AC_PROVIDE_IFELSE([LT_PROG_RC], | |
906 + [LT_LANG(RC)], | |
907 + [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) | |
908 +])# _LT_LANG_DEFAULT_CONFIG | |
909 + | |
910 +# Obsolete macros: | |
911 +AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) | |
912 +AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) | |
913 +AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) | |
914 +AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) | |
915 +AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) | |
916 +dnl aclocal-1.4 backwards compatibility: | |
917 +dnl AC_DEFUN([AC_LIBTOOL_CXX], []) | |
918 +dnl AC_DEFUN([AC_LIBTOOL_F77], []) | |
919 +dnl AC_DEFUN([AC_LIBTOOL_FC], []) | |
920 +dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) | |
921 +dnl AC_DEFUN([AC_LIBTOOL_RC], []) | |
922 + | |
923 + | |
924 +# _LT_TAG_COMPILER | |
925 +# ---------------- | |
926 +m4_defun([_LT_TAG_COMPILER], | |
927 +[AC_REQUIRE([AC_PROG_CC])dnl | |
928 + | |
929 +_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl | |
930 +_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl | |
931 +_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl | |
932 +_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl | |
933 + | |
934 +# If no C compiler was specified, use CC. | |
935 +LTCC=${LTCC-"$CC"} | |
936 + | |
937 +# If no C compiler flags were specified, use CFLAGS. | |
938 +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} | |
939 + | |
940 +# Allow CC to be a program name with arguments. | |
941 +compiler=$CC | |
942 +])# _LT_TAG_COMPILER | |
943 + | |
944 + | |
945 +# _LT_COMPILER_BOILERPLATE | |
946 +# ------------------------ | |
947 +# Check for compiler boilerplate output or warnings with | |
948 +# the simple compiler test code. | |
949 +m4_defun([_LT_COMPILER_BOILERPLATE], | |
950 +[m4_require([_LT_DECL_SED])dnl | |
951 +ac_outfile=conftest.$ac_objext | |
952 +echo "$lt_simple_compile_test_code" >conftest.$ac_ext | |
953 +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err | |
954 +_lt_compiler_boilerplate=`cat conftest.err` | |
955 +$RM conftest* | |
956 +])# _LT_COMPILER_BOILERPLATE | |
957 + | |
958 + | |
959 +# _LT_LINKER_BOILERPLATE | |
960 +# ---------------------- | |
961 +# Check for linker boilerplate output or warnings with | |
962 +# the simple link test code. | |
963 +m4_defun([_LT_LINKER_BOILERPLATE], | |
964 +[m4_require([_LT_DECL_SED])dnl | |
965 +ac_outfile=conftest.$ac_objext | |
966 +echo "$lt_simple_link_test_code" >conftest.$ac_ext | |
967 +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err | |
968 +_lt_linker_boilerplate=`cat conftest.err` | |
969 +$RM -r conftest* | |
970 +])# _LT_LINKER_BOILERPLATE | |
971 + | |
972 +# _LT_REQUIRED_DARWIN_CHECKS | |
973 +# ------------------------- | |
974 +m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ | |
975 + case $host_os in | |
976 + rhapsody* | darwin*) | |
977 + AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) | |
978 + AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) | |
979 + AC_CHECK_TOOL([LIPO], [lipo], [:]) | |
980 + AC_CHECK_TOOL([OTOOL], [otool], [:]) | |
981 + AC_CHECK_TOOL([OTOOL64], [otool64], [:]) | |
982 + _LT_DECL([], [DSYMUTIL], [1], | |
983 + [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) | |
984 + _LT_DECL([], [NMEDIT], [1], | |
985 + [Tool to change global to local symbols on Mac OS X]) | |
986 + _LT_DECL([], [LIPO], [1], | |
987 + [Tool to manipulate fat objects and archives on Mac OS X]) | |
988 + _LT_DECL([], [OTOOL], [1], | |
989 + [ldd/readelf like tool for Mach-O binaries on Mac OS X]) | |
990 + _LT_DECL([], [OTOOL64], [1], | |
991 + [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) | |
992 + | |
993 + AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], | |
994 + [lt_cv_apple_cc_single_mod=no | |
995 + if test -z "${LT_MULTI_MODULE}"; then | |
996 + # By default we will add the -single_module flag. You can override | |
997 + # by either setting the environment variable LT_MULTI_MODULE | |
998 + # non-empty at configure time, or by adding -multi_module to the | |
999 + # link flags. | |
1000 + rm -rf libconftest.dylib* | |
1001 + echo "int foo(void){return 1;}" > conftest.c | |
1002 + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ | |
1003 +-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD | |
1004 + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ | |
1005 + -dynamiclib -Wl,-single_module conftest.c 2>conftest.err | |
1006 + _lt_result=$? | |
1007 + # If there is a non-empty error log, and "single_module" | |
1008 + # appears in it, assume the flag caused a linker warning | |
1009 + if test -s conftest.err && $GREP single_module conftest.err; then | |
1010 + cat conftest.err >&AS_MESSAGE_LOG_FD | |
1011 + # Otherwise, if the output was created with a 0 exit code from | |
1012 + # the compiler, it worked. | |
1013 + elif test -f libconftest.dylib && test $_lt_result -eq 0; then | |
1014 + lt_cv_apple_cc_single_mod=yes | |
1015 + else | |
1016 + cat conftest.err >&AS_MESSAGE_LOG_FD | |
1017 + fi | |
1018 + rm -rf libconftest.dylib* | |
1019 + rm -f conftest.* | |
1020 + fi]) | |
1021 + | |
1022 + AC_CACHE_CHECK([for -exported_symbols_list linker flag], | |
1023 + [lt_cv_ld_exported_symbols_list], | |
1024 + [lt_cv_ld_exported_symbols_list=no | |
1025 + save_LDFLAGS=$LDFLAGS | |
1026 + echo "_main" > conftest.sym | |
1027 + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" | |
1028 + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], | |
1029 + [lt_cv_ld_exported_symbols_list=yes], | |
1030 + [lt_cv_ld_exported_symbols_list=no]) | |
1031 + LDFLAGS="$save_LDFLAGS" | |
1032 + ]) | |
1033 + | |
1034 + AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], | |
1035 + [lt_cv_ld_force_load=no | |
1036 + cat > conftest.c << _LT_EOF | |
1037 +int forced_loaded() { return 2;} | |
1038 +_LT_EOF | |
1039 + echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD | |
1040 + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD | |
1041 + echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD | |
1042 + $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD | |
1043 + echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD | |
1044 + $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD | |
1045 + cat > conftest.c << _LT_EOF | |
1046 +int main() { return 0;} | |
1047 +_LT_EOF | |
1048 + echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD | |
1049 + $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err | |
1050 + _lt_result=$? | |
1051 + if test -s conftest.err && $GREP force_load conftest.err; then | |
1052 + cat conftest.err >&AS_MESSAGE_LOG_FD | |
1053 + elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then | |
1054 + lt_cv_ld_force_load=yes | |
1055 + else | |
1056 + cat conftest.err >&AS_MESSAGE_LOG_FD | |
1057 + fi | |
1058 + rm -f conftest.err libconftest.a conftest conftest.c | |
1059 + rm -rf conftest.dSYM | |
1060 + ]) | |
1061 + case $host_os in | |
1062 + rhapsody* | darwin1.[[012]]) | |
1063 + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; | |
1064 + darwin1.*) | |
1065 + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; | |
1066 + darwin*) # darwin 5.x on | |
1067 + # if running on 10.5 or later, the deployment target defaults | |
1068 + # to the OS version, if on x86, and 10.4, the deployment | |
1069 + # target defaults to 10.4. Don't you love it? | |
1070 + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in | |
1071 + 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) | |
1072 + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; | |
1073 + 10.[[012]]*) | |
1074 + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; | |
1075 + 10.*) | |
1076 + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; | |
1077 + esac | |
1078 + ;; | |
1079 + esac | |
1080 + if test "$lt_cv_apple_cc_single_mod" = "yes"; then | |
1081 + _lt_dar_single_mod='$single_module' | |
1082 + fi | |
1083 + if test "$lt_cv_ld_exported_symbols_list" = "yes"; then | |
1084 + _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' | |
1085 + else | |
1086 + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' | |
1087 + fi | |
1088 + if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then | |
1089 + _lt_dsymutil='~$DSYMUTIL $lib || :' | |
1090 + else | |
1091 + _lt_dsymutil= | |
1092 + fi | |
1093 + ;; | |
1094 + esac | |
1095 +]) | |
1096 + | |
1097 + | |
1098 +# _LT_DARWIN_LINKER_FEATURES([TAG]) | |
1099 +# --------------------------------- | |
1100 +# Checks for linker and compiler features on darwin | |
1101 +m4_defun([_LT_DARWIN_LINKER_FEATURES], | |
1102 +[ | |
1103 + m4_require([_LT_REQUIRED_DARWIN_CHECKS]) | |
1104 + _LT_TAGVAR(archive_cmds_need_lc, $1)=no | |
1105 + _LT_TAGVAR(hardcode_direct, $1)=no | |
1106 + _LT_TAGVAR(hardcode_automatic, $1)=yes | |
1107 + _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported | |
1108 + if test "$lt_cv_ld_force_load" = "yes"; then | |
1109 + _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\"`' | |
1110 + m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], | |
1111 + [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) | |
1112 + else | |
1113 + _LT_TAGVAR(whole_archive_flag_spec, $1)='' | |
1114 + fi | |
1115 + _LT_TAGVAR(link_all_deplibs, $1)=yes | |
1116 + _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" | |
1117 + case $cc_basename in | |
1118 + ifort*) _lt_dar_can_shared=yes ;; | |
1119 + *) _lt_dar_can_shared=$GCC ;; | |
1120 + esac | |
1121 + if test "$_lt_dar_can_shared" = "yes"; then | |
1122 + output_verbose_link_cmd=func_echo_all | |
1123 + _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}" | |
1124 + _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" | |
1125 + _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}" | |
1126 + _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}" | |
1127 + m4_if([$1], [CXX], | |
1128 +[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then | |
1129 + _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}" | |
1130 + _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}" | |
1131 + fi | |
1132 +],[]) | |
1133 + else | |
1134 + _LT_TAGVAR(ld_shlibs, $1)=no | |
1135 + fi | |
1136 +]) | |
1137 + | |
1138 +# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) | |
1139 +# ---------------------------------- | |
1140 +# Links a minimal program and checks the executable | |
1141 +# for the system default hardcoded library path. In most cases, | |
1142 +# this is /usr/lib:/lib, but when the MPI compilers are used | |
1143 +# the location of the communication and MPI libs are included too. | |
1144 +# If we don't find anything, use the default library path according | |
1145 +# to the aix ld manual. | |
1146 +# Store the results from the different compilers for each TAGNAME. | |
1147 +# Allow to override them for all tags through lt_cv_aix_libpath. | |
1148 +m4_defun([_LT_SYS_MODULE_PATH_AIX], | |
1149 +[m4_require([_LT_DECL_SED])dnl | |
1150 +if test "${lt_cv_aix_libpath+set}" = set; then | |
1151 + aix_libpath=$lt_cv_aix_libpath | |
1152 +else | |
1153 + AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], | |
1154 + [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ | |
1155 + lt_aix_libpath_sed='[ | |
1156 + /Import File Strings/,/^$/ { | |
1157 + /^0/ { | |
1158 + s/^0 *\([^ ]*\) *$/\1/ | |
1159 + p | |
1160 + } | |
1161 + }]' | |
1162 + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | |
1163 + # Check for a 64-bit object if we didn't find anything. | |
1164 + if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then | |
1165 + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | |
1166 + fi],[]) | |
1167 + if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then | |
1168 + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" | |
1169 + fi | |
1170 + ]) | |
1171 + aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) | |
1172 +fi | |
1173 +])# _LT_SYS_MODULE_PATH_AIX | |
1174 + | |
1175 + | |
1176 +# _LT_SHELL_INIT(ARG) | |
1177 +# ------------------- | |
1178 +m4_define([_LT_SHELL_INIT], | |
1179 +[m4_divert_text([M4SH-INIT], [$1 | |
1180 +])])# _LT_SHELL_INIT | |
1181 + | |
1182 + | |
1183 + | |
1184 +# _LT_PROG_ECHO_BACKSLASH | |
1185 +# ----------------------- | |
1186 +# Find how we can fake an echo command that does not interpret backslash. | |
1187 +# In particular, with Autoconf 2.60 or later we add some code to the start | |
1188 +# of the generated configure script which will find a shell with a builtin | |
1189 +# printf (which we can use as an echo command). | |
1190 +m4_defun([_LT_PROG_ECHO_BACKSLASH], | |
1191 +[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
1192 +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO | |
1193 +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO | |
1194 + | |
1195 +AC_MSG_CHECKING([how to print strings]) | |
1196 +# Test print first, because it will be a builtin if present. | |
1197 +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ | |
1198 + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then | |
1199 + ECHO='print -r --' | |
1200 +elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then | |
1201 + ECHO='printf %s\n' | |
1202 +else | |
1203 + # Use this function as a fallback that always works. | |
1204 + func_fallback_echo () | |
1205 + { | |
1206 + eval 'cat <<_LTECHO_EOF | |
1207 +$[]1 | |
1208 +_LTECHO_EOF' | |
1209 + } | |
1210 + ECHO='func_fallback_echo' | |
1211 +fi | |
1212 + | |
1213 +# func_echo_all arg... | |
1214 +# Invoke $ECHO with all args, space-separated. | |
1215 +func_echo_all () | |
1216 +{ | |
1217 + $ECHO "$*" | |
1218 +} | |
1219 + | |
1220 +case "$ECHO" in | |
1221 + printf*) AC_MSG_RESULT([printf]) ;; | |
1222 + print*) AC_MSG_RESULT([print -r]) ;; | |
1223 + *) AC_MSG_RESULT([cat]) ;; | |
1224 +esac | |
1225 + | |
1226 +m4_ifdef([_AS_DETECT_SUGGESTED], | |
1227 +[_AS_DETECT_SUGGESTED([ | |
1228 + test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( | |
1229 + ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | |
1230 + ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO | |
1231 + ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO | |
1232 + PATH=/empty FPATH=/empty; export PATH FPATH | |
1233 + test "X`printf %s $ECHO`" = "X$ECHO" \ | |
1234 + || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) | |
1235 + | |
1236 +_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) | |
1237 +_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) | |
1238 +])# _LT_PROG_ECHO_BACKSLASH | |
1239 + | |
1240 + | |
1241 +# _LT_WITH_SYSROOT | |
1242 +# ---------------- | |
1243 +AC_DEFUN([_LT_WITH_SYSROOT], | |
1244 +[AC_MSG_CHECKING([for sysroot]) | |
1245 +AC_ARG_WITH([sysroot], | |
1246 +[ --with-sysroot[=DIR] Search for dependent libraries within DIR | |
1247 + (or the compiler's sysroot if not specified).], | |
1248 +[], [with_sysroot=no]) | |
1249 + | |
1250 +dnl lt_sysroot will always be passed unquoted. We quote it here | |
1251 +dnl in case the user passed a directory name. | |
1252 +lt_sysroot= | |
1253 +case ${with_sysroot} in #( | |
1254 + yes) | |
1255 + if test "$GCC" = yes; then | |
1256 + lt_sysroot=`$CC --print-sysroot 2>/dev/null` | |
1257 + fi | |
1258 + ;; #( | |
1259 + /*) | |
1260 + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` | |
1261 + ;; #( | |
1262 + no|'') | |
1263 + ;; #( | |
1264 + *) | |
1265 + AC_MSG_RESULT([${with_sysroot}]) | |
1266 + AC_MSG_ERROR([The sysroot must be an absolute path.]) | |
1267 + ;; | |
1268 +esac | |
1269 + | |
1270 + AC_MSG_RESULT([${lt_sysroot:-no}]) | |
1271 +_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl | |
1272 +[dependent libraries, and in which our libraries should be installed.])]) | |
1273 + | |
1274 +# _LT_ENABLE_LOCK | |
1275 +# --------------- | |
1276 +m4_defun([_LT_ENABLE_LOCK], | |
1277 +[AC_ARG_ENABLE([libtool-lock], | |
1278 + [AS_HELP_STRING([--disable-libtool-lock], | |
1279 + [avoid locking (might break parallel builds)])]) | |
1280 +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes | |
1281 + | |
1282 +# Some flags need to be propagated to the compiler or linker for good | |
1283 +# libtool support. | |
1284 +case $host in | |
1285 +ia64-*-hpux*) | |
1286 + # Find out which ABI we are using. | |
1287 + echo 'int i;' > conftest.$ac_ext | |
1288 + if AC_TRY_EVAL(ac_compile); then | |
1289 + case `/usr/bin/file conftest.$ac_objext` in | |
1290 + *ELF-32*) | |
1291 + HPUX_IA64_MODE="32" | |
1292 + ;; | |
1293 + *ELF-64*) | |
1294 + HPUX_IA64_MODE="64" | |
1295 + ;; | |
1296 + esac | |
1297 + fi | |
1298 + rm -rf conftest* | |
1299 + ;; | |
1300 +*-*-irix6*) | |
1301 + # Find out which ABI we are using. | |
1302 + echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext | |
1303 + if AC_TRY_EVAL(ac_compile); then | |
1304 + if test "$lt_cv_prog_gnu_ld" = yes; then | |
1305 + case `/usr/bin/file conftest.$ac_objext` in | |
1306 + *32-bit*) | |
1307 + LD="${LD-ld} -melf32bsmip" | |
1308 + ;; | |
1309 + *N32*) | |
1310 + LD="${LD-ld} -melf32bmipn32" | |
1311 + ;; | |
1312 + *64-bit*) | |
1313 + LD="${LD-ld} -melf64bmip" | |
1314 + ;; | |
1315 + esac | |
1316 + else | |
1317 + case `/usr/bin/file conftest.$ac_objext` in | |
1318 + *32-bit*) | |
1319 + LD="${LD-ld} -32" | |
1320 + ;; | |
1321 + *N32*) | |
1322 + LD="${LD-ld} -n32" | |
1323 + ;; | |
1324 + *64-bit*) | |
1325 + LD="${LD-ld} -64" | |
1326 + ;; | |
1327 + esac | |
1328 + fi | |
1329 + fi | |
1330 + rm -rf conftest* | |
1331 + ;; | |
1332 + | |
1333 +x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ | |
1334 +s390*-*linux*|s390*-*tpf*|sparc*-*linux*) | |
1335 + # Find out which ABI we are using. | |
1336 + echo 'int i;' > conftest.$ac_ext | |
1337 + if AC_TRY_EVAL(ac_compile); then | |
1338 + case `/usr/bin/file conftest.o` in | |
1339 + *32-bit*) | |
1340 + case $host in | |
1341 + x86_64-*kfreebsd*-gnu) | |
1342 + LD="${LD-ld} -m elf_i386_fbsd" | |
1343 + ;; | |
1344 + x86_64-*linux*) | |
1345 + case `/usr/bin/file conftest.o` in | |
1346 + *x86-64*) | |
1347 + LD="${LD-ld} -m elf32_x86_64" | |
1348 + ;; | |
1349 + *) | |
1350 + LD="${LD-ld} -m elf_i386" | |
1351 + ;; | |
1352 + esac | |
1353 + ;; | |
1354 + powerpc64le-*) | |
1355 + LD="${LD-ld} -m elf32lppclinux" | |
1356 + ;; | |
1357 + powerpc64-*) | |
1358 + LD="${LD-ld} -m elf32ppclinux" | |
1359 + ;; | |
1360 + s390x-*linux*) | |
1361 + LD="${LD-ld} -m elf_s390" | |
1362 + ;; | |
1363 + sparc64-*linux*) | |
1364 + LD="${LD-ld} -m elf32_sparc" | |
1365 + ;; | |
1366 + esac | |
1367 + ;; | |
1368 + *64-bit*) | |
1369 + case $host in | |
1370 + x86_64-*kfreebsd*-gnu) | |
1371 + LD="${LD-ld} -m elf_x86_64_fbsd" | |
1372 + ;; | |
1373 + x86_64-*linux*) | |
1374 + LD="${LD-ld} -m elf_x86_64" | |
1375 + ;; | |
1376 + powerpcle-*) | |
1377 + LD="${LD-ld} -m elf64lppc" | |
1378 + ;; | |
1379 + powerpc-*) | |
1380 + LD="${LD-ld} -m elf64ppc" | |
1381 + ;; | |
1382 + s390*-*linux*|s390*-*tpf*) | |
1383 + LD="${LD-ld} -m elf64_s390" | |
1384 + ;; | |
1385 + sparc*-*linux*) | |
1386 + LD="${LD-ld} -m elf64_sparc" | |
1387 + ;; | |
1388 + esac | |
1389 + ;; | |
1390 + esac | |
1391 + fi | |
1392 + rm -rf conftest* | |
1393 + ;; | |
1394 + | |
1395 +*-*-sco3.2v5*) | |
1396 + # On SCO OpenServer 5, we need -belf to get full-featured binaries. | |
1397 + SAVE_CFLAGS="$CFLAGS" | |
1398 + CFLAGS="$CFLAGS -belf" | |
1399 + AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, | |
1400 + [AC_LANG_PUSH(C) | |
1401 + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) | |
1402 + AC_LANG_POP]) | |
1403 + if test x"$lt_cv_cc_needs_belf" != x"yes"; then | |
1404 + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf | |
1405 + CFLAGS="$SAVE_CFLAGS" | |
1406 + fi | |
1407 + ;; | |
1408 +*-*solaris*) | |
1409 + # Find out which ABI we are using. | |
1410 + echo 'int i;' > conftest.$ac_ext | |
1411 + if AC_TRY_EVAL(ac_compile); then | |
1412 + case `/usr/bin/file conftest.o` in | |
1413 + *64-bit*) | |
1414 + case $lt_cv_prog_gnu_ld in | |
1415 + yes*) | |
1416 + case $host in | |
1417 + i?86-*-solaris*) | |
1418 + LD="${LD-ld} -m elf_x86_64" | |
1419 + ;; | |
1420 + sparc*-*-solaris*) | |
1421 + LD="${LD-ld} -m elf64_sparc" | |
1422 + ;; | |
1423 + esac | |
1424 + # GNU ld 2.21 introduced _sol2 emulations. Use them if available. | |
1425 + if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then | |
1426 + LD="${LD-ld}_sol2" | |
1427 + fi | |
1428 + ;; | |
1429 + *) | |
1430 + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then | |
1431 + LD="${LD-ld} -64" | |
1432 + fi | |
1433 + ;; | |
1434 + esac | |
1435 + ;; | |
1436 + esac | |
1437 + fi | |
1438 + rm -rf conftest* | |
1439 + ;; | |
1440 +esac | |
1441 + | |
1442 +need_locks="$enable_libtool_lock" | |
1443 +])# _LT_ENABLE_LOCK | |
1444 + | |
1445 + | |
1446 +# _LT_PROG_AR | |
1447 +# ----------- | |
1448 +m4_defun([_LT_PROG_AR], | |
1449 +[AC_CHECK_TOOLS(AR, [ar], false) | |
1450 +: ${AR=ar} | |
1451 +: ${AR_FLAGS=cru} | |
1452 +_LT_DECL([], [AR], [1], [The archiver]) | |
1453 +_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) | |
1454 + | |
1455 +AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], | |
1456 + [lt_cv_ar_at_file=no | |
1457 + AC_COMPILE_IFELSE([AC_LANG_PROGRAM], | |
1458 + [echo conftest.$ac_objext > conftest.lst | |
1459 + lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' | |
1460 + AC_TRY_EVAL([lt_ar_try]) | |
1461 + if test "$ac_status" -eq 0; then | |
1462 + # Ensure the archiver fails upon bogus file names. | |
1463 + rm -f conftest.$ac_objext libconftest.a | |
1464 + AC_TRY_EVAL([lt_ar_try]) | |
1465 + if test "$ac_status" -ne 0; then | |
1466 + lt_cv_ar_at_file=@ | |
1467 + fi | |
1468 + fi | |
1469 + rm -f conftest.* libconftest.a | |
1470 + ]) | |
1471 + ]) | |
1472 + | |
1473 +if test "x$lt_cv_ar_at_file" = xno; then | |
1474 + archiver_list_spec= | |
1475 +else | |
1476 + archiver_list_spec=$lt_cv_ar_at_file | |
1477 +fi | |
1478 +_LT_DECL([], [archiver_list_spec], [1], | |
1479 + [How to feed a file listing to the archiver]) | |
1480 +])# _LT_PROG_AR | |
1481 + | |
1482 + | |
1483 +# _LT_CMD_OLD_ARCHIVE | |
1484 +# ------------------- | |
1485 +m4_defun([_LT_CMD_OLD_ARCHIVE], | |
1486 +[_LT_PROG_AR | |
1487 + | |
1488 +AC_CHECK_TOOL(STRIP, strip, :) | |
1489 +test -z "$STRIP" && STRIP=: | |
1490 +_LT_DECL([], [STRIP], [1], [A symbol stripping program]) | |
1491 + | |
1492 +AC_CHECK_TOOL(RANLIB, ranlib, :) | |
1493 +test -z "$RANLIB" && RANLIB=: | |
1494 +_LT_DECL([], [RANLIB], [1], | |
1495 + [Commands used to install an old-style archive]) | |
1496 + | |
1497 +# Determine commands to create old-style static archives. | |
1498 +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' | |
1499 +old_postinstall_cmds='chmod 644 $oldlib' | |
1500 +old_postuninstall_cmds= | |
1501 + | |
1502 +if test -n "$RANLIB"; then | |
1503 + case $host_os in | |
1504 + openbsd*) | |
1505 + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" | |
1506 + ;; | |
1507 + *) | |
1508 + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" | |
1509 + ;; | |
1510 + esac | |
1511 + old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" | |
1512 +fi | |
1513 + | |
1514 +case $host_os in | |
1515 + darwin*) | |
1516 + lock_old_archive_extraction=yes ;; | |
1517 + *) | |
1518 + lock_old_archive_extraction=no ;; | |
1519 +esac | |
1520 +_LT_DECL([], [old_postinstall_cmds], [2]) | |
1521 +_LT_DECL([], [old_postuninstall_cmds], [2]) | |
1522 +_LT_TAGDECL([], [old_archive_cmds], [2], | |
1523 + [Commands used to build an old-style archive]) | |
1524 +_LT_DECL([], [lock_old_archive_extraction], [0], | |
1525 + [Whether to use a lock for old archive extraction]) | |
1526 +])# _LT_CMD_OLD_ARCHIVE | |
1527 + | |
1528 + | |
1529 +# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, | |
1530 +# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) | |
1531 +# ---------------------------------------------------------------- | |
1532 +# Check whether the given compiler option works | |
1533 +AC_DEFUN([_LT_COMPILER_OPTION], | |
1534 +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl | |
1535 +m4_require([_LT_DECL_SED])dnl | |
1536 +AC_CACHE_CHECK([$1], [$2], | |
1537 + [$2=no | |
1538 + m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) | |
1539 + echo "$lt_simple_compile_test_code" > conftest.$ac_ext | |
1540 + lt_compiler_flag="$3" | |
1541 + # Insert the option either (1) after the last *FLAGS variable, or | |
1542 + # (2) before a word containing "conftest.", or (3) at the end. | |
1543 + # Note that $ac_compile itself does not contain backslashes and begins | |
1544 + # with a dollar sign (not a hyphen), so the echo should work correctly. | |
1545 + # The option is referenced via a variable to avoid confusing sed. | |
1546 + lt_compile=`echo "$ac_compile" | $SED \ | |
1547 + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ | |
1548 + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ | |
1549 + -e 's:$: $lt_compiler_flag:'` | |
1550 + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) | |
1551 + (eval "$lt_compile" 2>conftest.err) | |
1552 + ac_status=$? | |
1553 + cat conftest.err >&AS_MESSAGE_LOG_FD | |
1554 + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD | |
1555 + if (exit $ac_status) && test -s "$ac_outfile"; then | |
1556 + # The compiler can only warn and ignore the option if not recognized | |
1557 + # So say no if there are warnings other than the usual output. | |
1558 + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp | |
1559 + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 | |
1560 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then | |
1561 + $2=yes | |
1562 + fi | |
1563 + fi | |
1564 + $RM conftest* | |
1565 +]) | |
1566 + | |
1567 +if test x"[$]$2" = xyes; then | |
1568 + m4_if([$5], , :, [$5]) | |
1569 +else | |
1570 + m4_if([$6], , :, [$6]) | |
1571 +fi | |
1572 +])# _LT_COMPILER_OPTION | |
1573 + | |
1574 +# Old name: | |
1575 +AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) | |
1576 +dnl aclocal-1.4 backwards compatibility: | |
1577 +dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) | |
1578 + | |
1579 + | |
1580 +# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, | |
1581 +# [ACTION-SUCCESS], [ACTION-FAILURE]) | |
1582 +# ---------------------------------------------------- | |
1583 +# Check whether the given linker option works | |
1584 +AC_DEFUN([_LT_LINKER_OPTION], | |
1585 +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl | |
1586 +m4_require([_LT_DECL_SED])dnl | |
1587 +AC_CACHE_CHECK([$1], [$2], | |
1588 + [$2=no | |
1589 + save_LDFLAGS="$LDFLAGS" | |
1590 + LDFLAGS="$LDFLAGS $3" | |
1591 + echo "$lt_simple_link_test_code" > conftest.$ac_ext | |
1592 + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then | |
1593 + # The linker can only warn and ignore the option if not recognized | |
1594 + # So say no if there are warnings | |
1595 + if test -s conftest.err; then | |
1596 + # Append any errors to the config.log. | |
1597 + cat conftest.err 1>&AS_MESSAGE_LOG_FD | |
1598 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp | |
1599 + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 | |
1600 + if diff conftest.exp conftest.er2 >/dev/null; then | |
1601 + $2=yes | |
1602 + fi | |
1603 + else | |
1604 + $2=yes | |
1605 + fi | |
1606 + fi | |
1607 + $RM -r conftest* | |
1608 + LDFLAGS="$save_LDFLAGS" | |
1609 +]) | |
1610 + | |
1611 +if test x"[$]$2" = xyes; then | |
1612 + m4_if([$4], , :, [$4]) | |
1613 +else | |
1614 + m4_if([$5], , :, [$5]) | |
1615 +fi | |
1616 +])# _LT_LINKER_OPTION | |
1617 + | |
1618 +# Old name: | |
1619 +AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) | |
1620 +dnl aclocal-1.4 backwards compatibility: | |
1621 +dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) | |
1622 + | |
1623 + | |
1624 +# LT_CMD_MAX_LEN | |
1625 +#--------------- | |
1626 +AC_DEFUN([LT_CMD_MAX_LEN], | |
1627 +[AC_REQUIRE([AC_CANONICAL_HOST])dnl | |
1628 +# find the maximum length of command line arguments | |
1629 +AC_MSG_CHECKING([the maximum length of command line arguments]) | |
1630 +AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl | |
1631 + i=0 | |
1632 + teststring="ABCD" | |
1633 + | |
1634 + case $build_os in | |
1635 + msdosdjgpp*) | |
1636 + # On DJGPP, this test can blow up pretty badly due to problems in libc | |
1637 + # (any single argument exceeding 2000 bytes causes a buffer overrun | |
1638 + # during glob expansion). Even if it were fixed, the result of this | |
1639 + # check would be larger than it should be. | |
1640 + lt_cv_sys_max_cmd_len=12288; # 12K is about right | |
1641 + ;; | |
1642 + | |
1643 + gnu*) | |
1644 + # Under GNU Hurd, this test is not required because there is | |
1645 + # no limit to the length of command line arguments. | |
1646 + # Libtool will interpret -1 as no limit whatsoever | |
1647 + lt_cv_sys_max_cmd_len=-1; | |
1648 + ;; | |
1649 + | |
1650 + cygwin* | mingw* | cegcc*) | |
1651 + # On Win9x/ME, this test blows up -- it succeeds, but takes | |
1652 + # about 5 minutes as the teststring grows exponentially. | |
1653 + # Worse, since 9x/ME are not pre-emptively multitasking, | |
1654 + # you end up with a "frozen" computer, even though with patience | |
1655 + # the test eventually succeeds (with a max line length of 256k). | |
1656 + # Instead, let's just punt: use the minimum linelength reported by | |
1657 + # all of the supported platforms: 8192 (on NT/2K/XP). | |
1658 + lt_cv_sys_max_cmd_len=8192; | |
1659 + ;; | |
1660 + | |
1661 + mint*) | |
1662 + # On MiNT this can take a long time and run out of memory. | |
1663 + lt_cv_sys_max_cmd_len=8192; | |
1664 + ;; | |
1665 + | |
1666 + amigaos*) | |
1667 + # On AmigaOS with pdksh, this test takes hours, literally. | |
1668 + # So we just punt and use a minimum line length of 8192. | |
1669 + lt_cv_sys_max_cmd_len=8192; | |
1670 + ;; | |
1671 + | |
1672 + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) | |
1673 + # This has been around since 386BSD, at least. Likely further. | |
1674 + if test -x /sbin/sysctl; then | |
1675 + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` | |
1676 + elif test -x /usr/sbin/sysctl; then | |
1677 + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` | |
1678 + else | |
1679 + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs | |
1680 + fi | |
1681 + # And add a safety zone | |
1682 + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` | |
1683 + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` | |
1684 + ;; | |
1685 + | |
1686 + interix*) | |
1687 + # We know the value 262144 and hardcode it with a safety zone (like BSD) | |
1688 + lt_cv_sys_max_cmd_len=196608 | |
1689 + ;; | |
1690 + | |
1691 + os2*) | |
1692 + # The test takes a long time on OS/2. | |
1693 + lt_cv_sys_max_cmd_len=8192 | |
1694 + ;; | |
1695 + | |
1696 + osf*) | |
1697 + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure | |
1698 + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not | |
1699 + # nice to cause kernel panics so lets avoid the loop below. | |
1700 + # First set a reasonable default. | |
1701 + lt_cv_sys_max_cmd_len=16384 | |
1702 + # | |
1703 + if test -x /sbin/sysconfig; then | |
1704 + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in | |
1705 + *1*) lt_cv_sys_max_cmd_len=-1 ;; | |
1706 + esac | |
1707 + fi | |
1708 + ;; | |
1709 + sco3.2v5*) | |
1710 + lt_cv_sys_max_cmd_len=102400 | |
1711 + ;; | |
1712 + sysv5* | sco5v6* | sysv4.2uw2*) | |
1713 + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` | |
1714 + if test -n "$kargmax"; then | |
1715 + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` | |
1716 + else | |
1717 + lt_cv_sys_max_cmd_len=32768 | |
1718 + fi | |
1719 + ;; | |
1720 + *) | |
1721 + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` | |
1722 + if test -n "$lt_cv_sys_max_cmd_len" && \ | |
1723 + test undefined != "$lt_cv_sys_max_cmd_len"; then | |
1724 + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` | |
1725 + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` | |
1726 + else | |
1727 + # Make teststring a little bigger before we do anything with it. | |
1728 + # a 1K string should be a reasonable start. | |
1729 + for i in 1 2 3 4 5 6 7 8 ; do | |
1730 + teststring=$teststring$teststring | |
1731 + done | |
1732 + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} | |
1733 + # If test is not a shell built-in, we'll probably end up computing a | |
1734 + # maximum length that is only half of the actual maximum length, but | |
1735 + # we can't tell. | |
1736 + while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ | |
1737 + = "X$teststring$teststring"; } >/dev/null 2>&1 && | |
1738 + test $i != 17 # 1/2 MB should be enough | |
1739 + do | |
1740 + i=`expr $i + 1` | |
1741 + teststring=$teststring$teststring | |
1742 + done | |
1743 + # Only check the string length outside the loop. | |
1744 + lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` | |
1745 + teststring= | |
1746 + # Add a significant safety factor because C++ compilers can tack on | |
1747 + # massive amounts of additional arguments before passing them to the | |
1748 + # linker. It appears as though 1/2 is a usable value. | |
1749 + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` | |
1750 + fi | |
1751 + ;; | |
1752 + esac | |
1753 +]) | |
1754 +if test -n $lt_cv_sys_max_cmd_len ; then | |
1755 + AC_MSG_RESULT($lt_cv_sys_max_cmd_len) | |
1756 +else | |
1757 + AC_MSG_RESULT(none) | |
1758 +fi | |
1759 +max_cmd_len=$lt_cv_sys_max_cmd_len | |
1760 +_LT_DECL([], [max_cmd_len], [0], | |
1761 + [What is the maximum length of a command?]) | |
1762 +])# LT_CMD_MAX_LEN | |
1763 + | |
1764 +# Old name: | |
1765 +AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) | |
1766 +dnl aclocal-1.4 backwards compatibility: | |
1767 +dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) | |
1768 + | |
1769 + | |
1770 +# _LT_HEADER_DLFCN | |
1771 +# ---------------- | |
1772 +m4_defun([_LT_HEADER_DLFCN], | |
1773 +[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl | |
1774 +])# _LT_HEADER_DLFCN | |
1775 + | |
1776 + | |
1777 +# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, | |
1778 +# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) | |
1779 +# ---------------------------------------------------------------- | |
1780 +m4_defun([_LT_TRY_DLOPEN_SELF], | |
1781 +[m4_require([_LT_HEADER_DLFCN])dnl | |
1782 +if test "$cross_compiling" = yes; then : | |
1783 + [$4] | |
1784 +else | |
1785 + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 | |
1786 + lt_status=$lt_dlunknown | |
1787 + cat > conftest.$ac_ext <<_LT_EOF | |
1788 +[#line $LINENO "configure" | |
1789 +#include "confdefs.h" | |
1790 + | |
1791 +#if HAVE_DLFCN_H | |
1792 +#include <dlfcn.h> | |
1793 +#endif | |
1794 + | |
1795 +#include <stdio.h> | |
1796 + | |
1797 +#ifdef RTLD_GLOBAL | |
1798 +# define LT_DLGLOBAL RTLD_GLOBAL | |
1799 +#else | |
1800 +# ifdef DL_GLOBAL | |
1801 +# define LT_DLGLOBAL DL_GLOBAL | |
1802 +# else | |
1803 +# define LT_DLGLOBAL 0 | |
1804 +# endif | |
1805 +#endif | |
1806 + | |
1807 +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we | |
1808 + find out it does not work in some platform. */ | |
1809 +#ifndef LT_DLLAZY_OR_NOW | |
1810 +# ifdef RTLD_LAZY | |
1811 +# define LT_DLLAZY_OR_NOW RTLD_LAZY | |
1812 +# else | |
1813 +# ifdef DL_LAZY | |
1814 +# define LT_DLLAZY_OR_NOW DL_LAZY | |
1815 +# else | |
1816 +# ifdef RTLD_NOW | |
1817 +# define LT_DLLAZY_OR_NOW RTLD_NOW | |
1818 +# else | |
1819 +# ifdef DL_NOW | |
1820 +# define LT_DLLAZY_OR_NOW DL_NOW | |
1821 +# else | |
1822 +# define LT_DLLAZY_OR_NOW 0 | |
1823 +# endif | |
1824 +# endif | |
1825 +# endif | |
1826 +# endif | |
1827 +#endif | |
1828 + | |
1829 +/* When -fvisbility=hidden is used, assume the code has been annotated | |
1830 + correspondingly for the symbols needed. */ | |
1831 +#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) | |
1832 +int fnord () __attribute__((visibility("default"))); | |
1833 +#endif | |
1834 + | |
1835 +int fnord () { return 42; } | |
1836 +int main () | |
1837 +{ | |
1838 + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); | |
1839 + int status = $lt_dlunknown; | |
1840 + | |
1841 + if (self) | |
1842 + { | |
1843 + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; | |
1844 + else | |
1845 + { | |
1846 + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; | |
1847 + else puts (dlerror ()); | |
1848 + } | |
1849 + /* dlclose (self); */ | |
1850 + } | |
1851 + else | |
1852 + puts (dlerror ()); | |
1853 + | |
1854 + return status; | |
1855 +}] | |
1856 +_LT_EOF | |
1857 + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then | |
1858 + (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null | |
1859 + lt_status=$? | |
1860 + case x$lt_status in | |
1861 + x$lt_dlno_uscore) $1 ;; | |
1862 + x$lt_dlneed_uscore) $2 ;; | |
1863 + x$lt_dlunknown|x*) $3 ;; | |
1864 + esac | |
1865 + else : | |
1866 + # compilation failed | |
1867 + $3 | |
1868 + fi | |
1869 +fi | |
1870 +rm -fr conftest* | |
1871 +])# _LT_TRY_DLOPEN_SELF | |
1872 + | |
1873 + | |
1874 +# LT_SYS_DLOPEN_SELF | |
1875 +# ------------------ | |
1876 +AC_DEFUN([LT_SYS_DLOPEN_SELF], | |
1877 +[m4_require([_LT_HEADER_DLFCN])dnl | |
1878 +if test "x$enable_dlopen" != xyes; then | |
1879 + enable_dlopen=unknown | |
1880 + enable_dlopen_self=unknown | |
1881 + enable_dlopen_self_static=unknown | |
1882 +else | |
1883 + lt_cv_dlopen=no | |
1884 + lt_cv_dlopen_libs= | |
1885 + | |
1886 + case $host_os in | |
1887 + beos*) | |
1888 + lt_cv_dlopen="load_add_on" | |
1889 + lt_cv_dlopen_libs= | |
1890 + lt_cv_dlopen_self=yes | |
1891 + ;; | |
1892 + | |
1893 + mingw* | pw32* | cegcc*) | |
1894 + lt_cv_dlopen="LoadLibrary" | |
1895 + lt_cv_dlopen_libs= | |
1896 + ;; | |
1897 + | |
1898 + cygwin*) | |
1899 + lt_cv_dlopen="dlopen" | |
1900 + lt_cv_dlopen_libs= | |
1901 + ;; | |
1902 + | |
1903 + darwin*) | |
1904 + # if libdl is installed we need to link against it | |
1905 + AC_CHECK_LIB([dl], [dlopen], | |
1906 + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ | |
1907 + lt_cv_dlopen="dyld" | |
1908 + lt_cv_dlopen_libs= | |
1909 + lt_cv_dlopen_self=yes | |
1910 + ]) | |
1911 + ;; | |
1912 + | |
1913 + *) | |
1914 + AC_CHECK_FUNC([shl_load], | |
1915 + [lt_cv_dlopen="shl_load"], | |
1916 + [AC_CHECK_LIB([dld], [shl_load], | |
1917 + [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], | |
1918 + [AC_CHECK_FUNC([dlopen], | |
1919 + [lt_cv_dlopen="dlopen"], | |
1920 + [AC_CHECK_LIB([dl], [dlopen], | |
1921 + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], | |
1922 + [AC_CHECK_LIB([svld], [dlopen], | |
1923 + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], | |
1924 + [AC_CHECK_LIB([dld], [dld_link], | |
1925 + [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) | |
1926 + ]) | |
1927 + ]) | |
1928 + ]) | |
1929 + ]) | |
1930 + ]) | |
1931 + ;; | |
1932 + esac | |
1933 + | |
1934 + if test "x$lt_cv_dlopen" != xno; then | |
1935 + enable_dlopen=yes | |
1936 + else | |
1937 + enable_dlopen=no | |
1938 + fi | |
1939 + | |
1940 + case $lt_cv_dlopen in | |
1941 + dlopen) | |
1942 + save_CPPFLAGS="$CPPFLAGS" | |
1943 + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" | |
1944 + | |
1945 + save_LDFLAGS="$LDFLAGS" | |
1946 + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" | |
1947 + | |
1948 + save_LIBS="$LIBS" | |
1949 + LIBS="$lt_cv_dlopen_libs $LIBS" | |
1950 + | |
1951 + AC_CACHE_CHECK([whether a program can dlopen itself], | |
1952 + lt_cv_dlopen_self, [dnl | |
1953 + _LT_TRY_DLOPEN_SELF( | |
1954 + lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, | |
1955 + lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) | |
1956 + ]) | |
1957 + | |
1958 + if test "x$lt_cv_dlopen_self" = xyes; then | |
1959 + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" | |
1960 + AC_CACHE_CHECK([whether a statically linked program can dlopen itself], | |
1961 + lt_cv_dlopen_self_static, [dnl | |
1962 + _LT_TRY_DLOPEN_SELF( | |
1963 + lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, | |
1964 + lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) | |
1965 + ]) | |
1966 + fi | |
1967 + | |
1968 + CPPFLAGS="$save_CPPFLAGS" | |
1969 + LDFLAGS="$save_LDFLAGS" | |
1970 + LIBS="$save_LIBS" | |
1971 + ;; | |
1972 + esac | |
1973 + | |
1974 + case $lt_cv_dlopen_self in | |
1975 + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; | |
1976 + *) enable_dlopen_self=unknown ;; | |
1977 + esac | |
1978 + | |
1979 + case $lt_cv_dlopen_self_static in | |
1980 + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; | |
1981 + *) enable_dlopen_self_static=unknown ;; | |
1982 + esac | |
1983 +fi | |
1984 +_LT_DECL([dlopen_support], [enable_dlopen], [0], | |
1985 + [Whether dlopen is supported]) | |
1986 +_LT_DECL([dlopen_self], [enable_dlopen_self], [0], | |
1987 + [Whether dlopen of programs is supported]) | |
1988 +_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], | |
1989 + [Whether dlopen of statically linked programs is supported]) | |
1990 +])# LT_SYS_DLOPEN_SELF | |
1991 + | |
1992 +# Old name: | |
1993 +AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) | |
1994 +dnl aclocal-1.4 backwards compatibility: | |
1995 +dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) | |
1996 + | |
1997 + | |
1998 +# _LT_COMPILER_C_O([TAGNAME]) | |
1999 +# --------------------------- | |
2000 +# Check to see if options -c and -o are simultaneously supported by compiler. | |
2001 +# This macro does not hard code the compiler like AC_PROG_CC_C_O. | |
2002 +m4_defun([_LT_COMPILER_C_O], | |
2003 +[m4_require([_LT_DECL_SED])dnl | |
2004 +m4_require([_LT_FILEUTILS_DEFAULTS])dnl | |
2005 +m4_require([_LT_TAG_COMPILER])dnl | |
2006 +AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], | |
2007 + [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], | |
2008 + [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no | |
2009 + $RM -r conftest 2>/dev/null | |
2010 + mkdir conftest | |
2011 + cd conftest | |
2012 + mkdir out | |
2013 + echo "$lt_simple_compile_test_code" > conftest.$ac_ext | |
2014 + | |
2015 + lt_compiler_flag="-o out/conftest2.$ac_objext" | |
2016 + # Insert the option either (1) after the last *FLAGS variable, or | |
2017 + # (2) before a word containing "conftest.", or (3) at the end. | |
2018 + # Note that $ac_compile itself does not contain backslashes and begins | |
2019 + # with a dollar sign (not a hyphen), so the echo should work correctly. | |
2020 + lt_compile=`echo "$ac_compile" | $SED \ | |
2021 + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ | |
2022 + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ | |
2023 + -e 's:$: $lt_compiler_flag:'` | |
2024 + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) | |
2025 + (eval "$lt_compile" 2>out/conftest.err) | |
2026 + ac_status=$? | |
2027 + cat out/conftest.err >&AS_MESSAGE_LOG_FD | |
2028 + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD | |
2029 + if (exit $ac_status) && test -s out/conftest2.$ac_objext | |
2030 + then | |
2031 + # The compiler can only warn and ignore the option if not recognized | |
2032 + # So say no if there are warnings | |
2033 + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp | |
2034 + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 | |
2035 + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then | |
2036 + _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes | |
2037 + fi | |
2038 + fi | |
2039 + chmod u+w . 2>&AS_MESSAGE_LOG_FD | |
2040 + $RM conftest* | |
2041 + # SGI C++ compiler will create directory out/ii_files/ for | |
2042 + # template instantiation | |
2043 + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files | |
2044 + $RM out/* && rmdir out | |
2045 + cd .. | |
2046 + $RM -r conftest | |
2047 + $RM conftest* | |
2048 +]) | |
2049 +_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], | |
2050 + [Does compiler simultaneously support -c and -o options?]) | |
2051 +])# _LT_COMPILER_C_O | |
2052 + | |
2053 + | |
2054 +# _LT_COMPILER_FILE_LOCKS([TAGNAME]) | |
2055 +# ---------------------------------- | |
2056 +# Check to see if we can do hard links to lock some files if needed | |
2057 +m4_defun([_LT_COMPILER_FILE_LOCKS], | |
2058 +[m4_require([_LT_ENABLE_LOCK])dnl | |
2059 +m4_require([_LT_FILEUTILS_DEFAULTS])dnl | |
2060 +_LT_COMPILER_C_O([$1]) | |
2061 + | |
2062 +hard_links="nottested" | |
2063 +if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then | |
2064 + # do not overwrite the value of need_locks provided by the user | |
2065 + AC_MSG_CHECKING([if we can lock with hard links]) | |
2066 + hard_links=yes | |
2067 + $RM conftest* | |
2068 + ln conftest.a conftest.b 2>/dev/null && hard_links=no | |
2069 + touch conftest.a | |
2070 + ln conftest.a conftest.b 2>&5 || hard_links=no | |
2071 + ln conftest.a conftest.b 2>/dev/null && hard_links=no | |
2072 + AC_MSG_RESULT([$hard_links]) | |
2073 + if test "$hard_links" = no; then | |
2074 + AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) | |
2075 + need_locks=warn | |
2076 + fi | |
2077 +else | |
2078 + need_locks=no | |
2079 +fi | |
2080 +_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) | |
2081 +])# _LT_COMPILER_FILE_LOCKS | |
2082 + | |
2083 + | |
2084 +# _LT_CHECK_OBJDIR | |
2085 +# ---------------- | |
2086 +m4_defun([_LT_CHECK_OBJDIR], | |
2087 +[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], | |
2088 +[rm -f .libs 2>/dev/null | |
2089 +mkdir .libs 2>/dev/null | |
2090 +if test -d .libs; then | |
2091 + lt_cv_objdir=.libs | |
2092 +else | |
2093 + # MS-DOS does not allow filenames that begin with a dot. | |
2094 + lt_cv_objdir=_libs | |
2095 +fi | |
2096 +rmdir .libs 2>/dev/null]) | |
2097 +objdir=$lt_cv_objdir | |
2098 +_LT_DECL([], [objdir], [0], | |
2099 + [The name of the directory that contains temporary libtool files])dnl | |
2100 +m4_pattern_allow([LT_OBJDIR])dnl | |
2101 +AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", | |
2102 + [Define to the sub-directory in which libtool stores uninstalled libraries.]) | |
2103 +])# _LT_CHECK_OBJDIR | |
2104 + | |
2105 + | |
2106 +# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) | |
2107 +# -------------------------------------- | |
2108 +# Check hardcoding attributes. | |
2109 +m4_defun([_LT_LINKER_HARDCODE_LIBPATH], | |
2110 +[AC_MSG_CHECKING([how to hardcode library paths into programs]) | |
2111 +_LT_TAGVAR(hardcode_action, $1)= | |
2112 +if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || | |
2113 + test -n "$_LT_TAGVAR(runpath_var, $1)" || | |
2114 + test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then | |
2115 + | |
2116 + # We can hardcode non-existent directories. | |
2117 + if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && | |
2118 + # If the only mechanism to avoid hardcoding is shlibpath_var, we | |
2119 + # have to relink, otherwise we might link with an installed library | |
2120 + # when we should be linking with a yet-to-be-installed one | |
2121 + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && | |
2122 + test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then | |
2123 + # Linking always hardcodes the temporary library directory. | |
2124 + _LT_TAGVAR(hardcode_action, $1)=relink | |
2125 + else | |
2126 + # We can link without hardcoding, and we can hardcode nonexisting dirs. | |
2127 + _LT_TAGVAR(hardcode_action, $1)=immediate | |
2128 + fi | |
2129 +else | |
2130 + # We cannot hardcode anything, or else we can only hardcode existing | |
2131 + # directories. | |
2132 + _LT_TAGVAR(hardcode_action, $1)=unsupported | |
2133 +fi | |
2134 +AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) | |
2135 + | |
2136 +if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || | |
2137 + test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then | |
2138 + # Fast installation is not supported | |
2139 + enable_fast_install=no | |
2140 +elif test "$shlibpath_overrides_runpath" = yes || | |
2141 + test "$enable_shared" = no; then | |
2142 + # Fast installation is not necessary | |
2143 + enable_fast_install=needless | |
2144 +fi | |
2145 +_LT_TAGDECL([], [hardcode_action], [0], | |
2146 + [How to hardcode a shared library path into an executable]) | |
2147 +])# _LT_LINKER_HARDCODE_LIBPATH | |
2148 + | |
2149 + | |
2150 +# _LT_CMD_STRIPLIB | |
2151 +# ---------------- | |
2152 +m4_defun([_LT_CMD_STRIPLIB], | |
2153 +[m4_require([_LT_DECL_EGREP]) | |
2154 +striplib= | |
2155 +old_striplib= | |
2156 +AC_MSG_CHECKING([whether stripping libraries is possible]) | |
2157 +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then | |
2158 + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" | |
2159 + test -z "$striplib" && striplib="$STRIP --strip-unneeded" | |
2160 + AC_MSG_RESULT([yes]) | |
2161 +else | |
2162 +# FIXME - insert some real tests, host_os isn't really good enough | |
2163 + case $host_os in | |
2164 + darwin*) | |
2165 + if test -n "$STRIP" ; then | |
2166 + striplib="$STRIP -x" | |
2167 + old_striplib="$STRIP -S" | |
2168 + AC_MSG_RESULT([yes]) | |
2169 + else | |
2170 + AC_MSG_RESULT([no]) | |
2171 + fi | |
2172 + ;; | |
2173 + *) | |
2174 + AC_MSG_RESULT([no]) | |
2175 + ;; | |
2176 + esac | |
2177 +fi | |
2178 +_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) | |
2179 +_LT_DECL([], [striplib], [1]) | |
2180 +])# _LT_CMD_STRIPLIB | |
2181 + | |
2182 + | |
2183 +# _LT_SYS_DYNAMIC_LINKER([TAG]) | |
2184 +# ----------------------------- | |
2185 +# PORTME Fill in your ld.so characteristics | |
2186 +m4_defun([_LT_SYS_DYNAMIC_LINKER], | |
2187 +[AC_REQUIRE([AC_CANONICAL_HOST])dnl | |
2188 +m4_require([_LT_DECL_EGREP])dnl | |
2189 +m4_require([_LT_FILEUTILS_DEFAULTS])dnl | |
2190 +m4_require([_LT_DECL_OBJDUMP])dnl | |
2191 +m4_require([_LT_DECL_SED])dnl | |
2192 +m4_require([_LT_CHECK_SHELL_FEATURES])dnl | |
2193 +AC_MSG_CHECKING([dynamic linker characteristics]) | |
2194 +m4_if([$1], | |
2195 + [], [ | |
2196 +if test "$GCC" = yes; then | |
2197 + case $host_os in | |
2198 + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; | |
2199 + *) lt_awk_arg="/^libraries:/" ;; | |
2200 + esac | |
2201 + case $host_os in | |
2202 + mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; | |
2203 + *) lt_sed_strip_eq="s,=/,/,g" ;; | |
2204 + esac | |
2205 + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` | |
2206 + case $lt_search_path_spec in | |
2207 + *\;*) | |
2208 + # if the path contains ";" then we assume it to be the separator | |
2209 + # otherwise default to the standard path separator (i.e. ":") - it is | |
2210 + # assumed that no part of a normal pathname contains ";" but that should | |
2211 + # okay in the real world where ";" in dirpaths is itself problematic. | |
2212 + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` | |
2213 + ;; | |
2214 + *) | |
2215 + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` | |
2216 + ;; | |
2217 + esac | |
2218 + # Ok, now we have the path, separated by spaces, we can step through it | |
2219 + # and add multilib dir if necessary. | |
2220 + lt_tmp_lt_search_path_spec= | |
2221 + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` | |
2222 + for lt_sys_path in $lt_search_path_spec; do | |
2223 + if test -d "$lt_sys_path/$lt_multi_os_dir"; then | |
2224 + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" | |
2225 + else | |
2226 + test -d "$lt_sys_path" && \ | |
2227 + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" | |
2228 + fi | |
2229 + done | |
2230 + lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' | |
2231 +BEGIN {RS=" "; FS="/|\n";} { | |
2232 + lt_foo=""; | |
2233 + lt_count=0; | |
2234 + for (lt_i = NF; lt_i > 0; lt_i--) { | |
2235 + if ($lt_i != "" && $lt_i != ".") { | |
2236 + if ($lt_i == "..") { | |
2237 + lt_count++; | |
2238 + } else { | |
2239 + if (lt_count == 0) { | |
2240 + lt_foo="/" $lt_i lt_foo; | |
2241 + } else { | |
2242 + lt_count--; | |
2243 + } | |
2244 + } | |
2245 + } | |
2246 + } | |
2247 + if (lt_foo != "") { lt_freq[[lt_foo]]++; } | |
2248 + if (lt_freq[[lt_foo]] == 1) { print lt_foo; } | |
2249 +}'` | |
2250 + # AWK program above erroneously prepends '/' to C:/dos/paths | |
2251 + # for these hosts. | |
2252 + case $host_os in | |
2253 + mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ | |
2254 + $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; | |
2255 + esac | |
2256 + sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` | |
2257 +else | |
2258 + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" | |
2259 +fi]) | |
2260 +library_names_spec= | |
2261 +libname_spec='lib$name' | |
2262 +soname_spec= | |
2263 +shrext_cmds=".so" | |
2264 +postinstall_cmds= | |
2265 +postuninstall_cmds= | |
2266 +finish_cmds= | |
2267 +finish_eval= | |
2268 +shlibpath_var= | |
2269 +shlibpath_overrides_runpath=unknown | |
2270 +version_type=none | |
2271 +dynamic_linker="$host_os ld.so" | |
2272 +sys_lib_dlsearch_path_spec="/lib /usr/lib" | |
2273 +need_lib_prefix=unknown | |
2274 +hardcode_into_libs=no | |
2275 + | |
2276 +# when you set need_version to no, make sure it does not cause -set_version | |
2277 +# flags to be left without arguments | |
2278 +need_version=unknown | |
2279 + | |
2280 +case $host_os in | |
2281 +aix3*) | |
2282 + version_type=linux # correct to gnu/linux during the next big refactor | |
2283 + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' | |
2284 + shlibpath_var=LIBPATH | |
2285 + | |
2286 + # AIX 3 has no versioning support, so we append a major version to the name. | |
2287 + soname_spec='${libname}${release}${shared_ext}$major' | |
2288 + ;; | |
2289 + | |
2290 +aix[[4-9]]*) | |
2291 + version_type=linux # correct to gnu/linux during the next big refactor | |
2292 + need_lib_prefix=no | |
2293 + need_version=no | |
2294 + hardcode_into_libs=yes | |
2295 + if test "$host_cpu" = ia64; then | |
2296 + # AIX 5 supports IA64 | |
2297 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' | |
2298 + shlibpath_var=LD_LIBRARY_PATH | |
2299 + else | |
2300 + # With GCC up to 2.95.x, collect2 would create an import file | |
2301 + # for dependence libraries. The import file would start with | |
2302 + # the line `#! .'. This would cause the generated library to | |
2303 + # depend on `.', always an invalid library. This was fixed in | |
2304 + # development snapshots of GCC prior to 3.0. | |
2305 + case $host_os in | |
2306 + aix4 | aix4.[[01]] | aix4.[[01]].*) | |
2307 + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' | |
2308 + echo ' yes ' | |
2309 + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then | |
2310 + : | |
2311 + else | |
2312 + can_build_shared=no | |
2313 + fi | |
2314 + ;; | |
2315 + esac | |
2316 + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct | |
2317 + # soname into executable. Probably we can add versioning support to | |
2318 + # collect2, so additional links can be useful in future. | |
2319 + if test "$aix_use_runtimelinking" = yes; then | |
2320 + # If using run time linking (on AIX 4.2 or later) use lib<name>.so | |
2321 + # instead of lib<name>.a to let people know that these are not | |
2322 + # typical AIX shared libraries. | |
2323 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
2324 + else | |
2325 + # We preserve .a as extension for shared libraries through AIX4.2 | |
2326 + # and later when we are not doing run time linking. | |
2327 + library_names_spec='${libname}${release}.a $libname.a' | |
2328 + soname_spec='${libname}${release}${shared_ext}$major' | |
2329 + fi | |
2330 + shlibpath_var=LIBPATH | |
2331 + fi | |
2332 + ;; | |
2333 + | |
2334 +amigaos*) | |
2335 + case $host_cpu in | |
2336 + powerpc) | |
2337 + # Since July 2007 AmigaOS4 officially supports .so libraries. | |
2338 + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. | |
2339 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
2340 + ;; | |
2341 + m68k) | |
2342 + library_names_spec='$libname.ixlibrary $libname.a' | |
2343 + # Create ${libname}_ixlibrary.a entries in /sys/libs. | |
2344 + 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' | |
2345 + ;; | |
2346 + esac | |
2347 + ;; | |
2348 + | |
2349 +beos*) | |
2350 + library_names_spec='${libname}${shared_ext}' | |
2351 + dynamic_linker="$host_os ld.so" | |
2352 + shlibpath_var=LIBRARY_PATH | |
2353 + ;; | |
2354 + | |
2355 +bsdi[[45]]*) | |
2356 + version_type=linux # correct to gnu/linux during the next big refactor | |
2357 + need_version=no | |
2358 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
2359 + soname_spec='${libname}${release}${shared_ext}$major' | |
2360 + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' | |
2361 + shlibpath_var=LD_LIBRARY_PATH | |
2362 + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" | |
2363 + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" | |
2364 + # the default ld.so.conf also contains /usr/contrib/lib and | |
2365 + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow | |
2366 + # libtool to hard-code these into programs | |
2367 + ;; | |
2368 + | |
2369 +cygwin* | mingw* | pw32* | cegcc*) | |
2370 + version_type=windows | |
2371 + shrext_cmds=".dll" | |
2372 + need_version=no | |
2373 + need_lib_prefix=no | |
2374 + | |
2375 + case $GCC,$cc_basename in | |
2376 + yes,*) | |
2377 + # gcc | |
2378 + library_names_spec='$libname.dll.a' | |
2379 + # DLL is installed to $(libdir)/../bin by postinstall_cmds | |
2380 + postinstall_cmds='base_file=`basename \${file}`~ | |
2381 + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ | |
2382 + dldir=$destdir/`dirname \$dlpath`~ | |
2383 + test -d \$dldir || mkdir -p \$dldir~ | |
2384 + $install_prog $dir/$dlname \$dldir/$dlname~ | |
2385 + chmod a+x \$dldir/$dlname~ | |
2386 + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then | |
2387 + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; | |
2388 + fi' | |
2389 + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ | |
2390 + dlpath=$dir/\$dldll~ | |
2391 + $RM \$dlpath' | |
2392 + shlibpath_overrides_runpath=yes | |
2393 + | |
2394 + case $host_os in | |
2395 + cygwin*) | |
2396 + # Cygwin DLLs use 'cyg' prefix rather than 'lib' | |
2397 + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' | |
2398 +m4_if([$1], [],[ | |
2399 + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) | |
2400 + ;; | |
2401 + mingw* | cegcc*) | |
2402 + # MinGW DLLs use traditional 'lib' prefix | |
2403 + soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' | |
2404 + ;; | |
2405 + pw32*) | |
2406 + # pw32 DLLs use 'pw' prefix rather than 'lib' | |
2407 + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' | |
2408 + ;; | |
2409 + esac | |
2410 + dynamic_linker='Win32 ld.exe' | |
2411 + ;; | |
2412 + | |
2413 + *,cl*) | |
2414 + # Native MSVC | |
2415 + libname_spec='$name' | |
2416 + soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' | |
2417 + library_names_spec='${libname}.dll.lib' | |
2418 + | |
2419 + case $build_os in | |
2420 + mingw*) | |
2421 + sys_lib_search_path_spec= | |
2422 + lt_save_ifs=$IFS | |
2423 + IFS=';' | |
2424 + for lt_path in $LIB | |
2425 + do | |
2426 + IFS=$lt_save_ifs | |
2427 + # Let DOS variable expansion print the short 8.3 style file name. | |
2428 + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` | |
2429 + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" | |
2430 + done | |
2431 + IFS=$lt_save_ifs | |
2432 + # Convert to MSYS style. | |
2433 + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` | |
2434 + ;; | |
2435 + cygwin*) | |
2436 + # Convert to unix form, then to dos form, then back to unix form | |
2437 + # but this time dos style (no spaces!) so that the unix form looks | |
2438 + # like /cygdrive/c/PROGRA~1:/cygdr... | |
2439 + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` | |
2440 + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` | |
2441 + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` | |
2442 + ;; | |
2443 + *) | |
2444 + sys_lib_search_path_spec="$LIB" | |
2445 + if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then | |
2446 + # It is most probably a Windows format PATH. | |
2447 + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` | |
2448 + else | |
2449 + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` | |
2450 + fi | |
2451 + # FIXME: find the short name or the path components, as spaces are | |
2452 + # common. (e.g. "Program Files" -> "PROGRA~1") | |
2453 + ;; | |
2454 + esac | |
2455 + | |
2456 + # DLL is installed to $(libdir)/../bin by postinstall_cmds | |
2457 + postinstall_cmds='base_file=`basename \${file}`~ | |
2458 + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ | |
2459 + dldir=$destdir/`dirname \$dlpath`~ | |
2460 + test -d \$dldir || mkdir -p \$dldir~ | |
2461 + $install_prog $dir/$dlname \$dldir/$dlname' | |
2462 + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ | |
2463 + dlpath=$dir/\$dldll~ | |
2464 + $RM \$dlpath' | |
2465 + shlibpath_overrides_runpath=yes | |
2466 + dynamic_linker='Win32 link.exe' | |
2467 + ;; | |
2468 + | |
2469 + *) | |
2470 + # Assume MSVC wrapper | |
2471 + library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' | |
2472 + dynamic_linker='Win32 ld.exe' | |
2473 + ;; | |
2474 + esac | |
2475 + # FIXME: first we should search . and the directory the executable is in | |
2476 + shlibpath_var=PATH | |
2477 + ;; | |
2478 + | |
2479 +darwin* | rhapsody*) | |
2480 + dynamic_linker="$host_os dyld" | |
2481 + version_type=darwin | |
2482 + need_lib_prefix=no | |
2483 + need_version=no | |
2484 + library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' | |
2485 + soname_spec='${libname}${release}${major}$shared_ext' | |
2486 + shlibpath_overrides_runpath=yes | |
2487 + shlibpath_var=DYLD_LIBRARY_PATH | |
2488 + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' | |
2489 +m4_if([$1], [],[ | |
2490 + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) | |
2491 + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' | |
2492 + ;; | |
2493 + | |
2494 +dgux*) | |
2495 + version_type=linux # correct to gnu/linux during the next big refactor | |
2496 + need_lib_prefix=no | |
2497 + need_version=no | |
2498 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' | |
2499 + soname_spec='${libname}${release}${shared_ext}$major' | |
2500 + shlibpath_var=LD_LIBRARY_PATH | |
2501 + ;; | |
2502 + | |
2503 +freebsd* | dragonfly*) | |
2504 + # DragonFly does not have aout. When/if they implement a new | |
2505 + # versioning mechanism, adjust this. | |
2506 + if test -x /usr/bin/objformat; then | |
2507 + objformat=`/usr/bin/objformat` | |
2508 + else | |
2509 + case $host_os in | |
2510 + freebsd[[23]].*) objformat=aout ;; | |
2511 + *) objformat=elf ;; | |
2512 + esac | |
2513 + fi | |
2514 + version_type=freebsd-$objformat | |
2515 + case $version_type in | |
2516 + freebsd-elf*) | |
2517 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' | |
2518 + need_version=no | |
2519 + need_lib_prefix=no | |
2520 + ;; | |
2521 + freebsd-*) | |
2522 + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' | |
2523 + need_version=yes | |
2524 + ;; | |
2525 + esac | |
2526 + shlibpath_var=LD_LIBRARY_PATH | |
2527 + case $host_os in | |
2528 + freebsd2.*) | |
2529 + shlibpath_overrides_runpath=yes | |
2530 + ;; | |
2531 + freebsd3.[[01]]* | freebsdelf3.[[01]]*) | |
2532 + shlibpath_overrides_runpath=yes | |
2533 + hardcode_into_libs=yes | |
2534 + ;; | |
2535 + freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ | |
2536 + freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) | |
2537 + shlibpath_overrides_runpath=no | |
2538 + hardcode_into_libs=yes | |
2539 + ;; | |
2540 + *) # from 4.6 on, and DragonFly | |
2541 + shlibpath_overrides_runpath=yes | |
2542 + hardcode_into_libs=yes | |
2543 + ;; | |
2544 + esac | |
2545 + ;; | |
2546 + | |
2547 +haiku*) | |
2548 + version_type=linux # correct to gnu/linux during the next big refactor | |
2549 + need_lib_prefix=no | |
2550 + need_version=no | |
2551 + dynamic_linker="$host_os runtime_loader" | |
2552 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' | |
2553 + soname_spec='${libname}${release}${shared_ext}$major' | |
2554 + shlibpath_var=LIBRARY_PATH | |
2555 + shlibpath_overrides_runpath=yes | |
2556 + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' | |
2557 + hardcode_into_libs=yes | |
2558 + ;; | |
2559 + | |
2560 +hpux9* | hpux10* | hpux11*) | |
2561 + # Give a soname corresponding to the major version so that dld.sl refuses to | |
2562 + # link against other versions. | |
2563 + version_type=sunos | |
2564 + need_lib_prefix=no | |
2565 + need_version=no | |
2566 + case $host_cpu in | |
2567 + ia64*) | |
2568 + shrext_cmds='.so' | |
2569 + hardcode_into_libs=yes | |
2570 + dynamic_linker="$host_os dld.so" | |
2571 + shlibpath_var=LD_LIBRARY_PATH | |
2572 + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. | |
2573 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
2574 + soname_spec='${libname}${release}${shared_ext}$major' | |
2575 + if test "X$HPUX_IA64_MODE" = X32; then | |
2576 + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" | |
2577 + else | |
2578 + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" | |
2579 + fi | |
2580 + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec | |
2581 + ;; | |
2582 + hppa*64*) | |
2583 + shrext_cmds='.sl' | |
2584 + hardcode_into_libs=yes | |
2585 + dynamic_linker="$host_os dld.sl" | |
2586 + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH | |
2587 + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. | |
2588 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
2589 + soname_spec='${libname}${release}${shared_ext}$major' | |
2590 + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" | |
2591 + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec | |
2592 + ;; | |
2593 + *) | |
2594 + shrext_cmds='.sl' | |
2595 + dynamic_linker="$host_os dld.sl" | |
2596 + shlibpath_var=SHLIB_PATH | |
2597 + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH | |
2598 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
2599 + soname_spec='${libname}${release}${shared_ext}$major' | |
2600 + ;; | |
2601 + esac | |
2602 + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... | |
2603 + postinstall_cmds='chmod 555 $lib' | |
2604 + # or fails outright, so override atomically: | |
2605 + install_override_mode=555 | |
2606 + ;; | |
2607 + | |
2608 +interix[[3-9]]*) | |
2609 + version_type=linux # correct to gnu/linux during the next big refactor | |
2610 + need_lib_prefix=no | |
2611 + need_version=no | |
2612 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' | |
2613 + soname_spec='${libname}${release}${shared_ext}$major' | |
2614 + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' | |
2615 + shlibpath_var=LD_LIBRARY_PATH | |
2616 + shlibpath_overrides_runpath=no | |
2617 + hardcode_into_libs=yes | |
2618 + ;; | |
2619 + | |
2620 +irix5* | irix6* | nonstopux*) | |
2621 + case $host_os in | |
2622 + nonstopux*) version_type=nonstopux ;; | |
2623 + *) | |
2624 + if test "$lt_cv_prog_gnu_ld" = yes; then | |
2625 + version_type=linux # correct to gnu/linux during the next big refactor | |
2626 + else | |
2627 + version_type=irix | |
2628 + fi ;; | |
2629 + esac | |
2630 + need_lib_prefix=no | |
2631 + need_version=no | |
2632 + soname_spec='${libname}${release}${shared_ext}$major' | |
2633 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' | |
2634 + case $host_os in | |
2635 + irix5* | nonstopux*) | |
2636 + libsuff= shlibsuff= | |
2637 + ;; | |
2638 + *) | |
2639 + case $LD in # libtool.m4 will add one of these switches to LD | |
2640 + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") | |
2641 + libsuff= shlibsuff= libmagic=32-bit;; | |
2642 + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") | |
2643 + libsuff=32 shlibsuff=N32 libmagic=N32;; | |
2644 + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") | |
2645 + libsuff=64 shlibsuff=64 libmagic=64-bit;; | |
2646 + *) libsuff= shlibsuff= libmagic=never-match;; | |
2647 + esac | |
2648 + ;; | |
2649 + esac | |
2650 + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH | |
2651 + shlibpath_overrides_runpath=no | |
2652 + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" | |
2653 + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" | |
2654 + hardcode_into_libs=yes | |
2655 + ;; | |
2656 + | |
2657 +# No shared lib support for Linux oldld, aout, or coff. | |
2658 +linux*oldld* | linux*aout* | linux*coff*) | |
2659 + dynamic_linker=no | |
2660 + ;; | |
2661 + | |
2662 +# This must be glibc/ELF. | |
2663 +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) | |
2664 + version_type=linux # correct to gnu/linux during the next big refactor | |
2665 + need_lib_prefix=no | |
2666 + need_version=no | |
2667 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
2668 + soname_spec='${libname}${release}${shared_ext}$major' | |
2669 + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' | |
2670 + shlibpath_var=LD_LIBRARY_PATH | |
2671 + shlibpath_overrides_runpath=no | |
2672 + | |
2673 + # Some binutils ld are patched to set DT_RUNPATH | |
2674 + AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], | |
2675 + [lt_cv_shlibpath_overrides_runpath=no | |
2676 + save_LDFLAGS=$LDFLAGS | |
2677 + save_libdir=$libdir | |
2678 + eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ | |
2679 + LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" | |
2680 + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], | |
2681 + [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], | |
2682 + [lt_cv_shlibpath_overrides_runpath=yes])]) | |
2683 + LDFLAGS=$save_LDFLAGS | |
2684 + libdir=$save_libdir | |
2685 + ]) | |
2686 + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath | |
2687 + | |
2688 + # This implies no fast_install, which is unacceptable. | |
2689 + # Some rework will be needed to allow for fast_install | |
2690 + # before this can be enabled. | |
2691 + hardcode_into_libs=yes | |
2692 + | |
2693 + # Append ld.so.conf contents to the search path | |
2694 + if test -f /etc/ld.so.conf; then | |
2695 + 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' ' '` | |
2696 + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" | |
2697 + fi | |
2698 + | |
2699 + # We used to test for /lib/ld.so.1 and disable shared libraries on | |
2700 + # powerpc, because MkLinux only supported shared libraries with the | |
2701 + # GNU dynamic linker. Since this was broken with cross compilers, | |
2702 + # most powerpc-linux boxes support dynamic linking these days and | |
2703 + # people can always --disable-shared, the test was removed, and we | |
2704 + # assume the GNU/Linux dynamic linker is in use. | |
2705 + dynamic_linker='GNU/Linux ld.so' | |
2706 + ;; | |
2707 + | |
2708 +netbsdelf*-gnu) | |
2709 + version_type=linux | |
2710 + need_lib_prefix=no | |
2711 + need_version=no | |
2712 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' | |
2713 + soname_spec='${libname}${release}${shared_ext}$major' | |
2714 + shlibpath_var=LD_LIBRARY_PATH | |
2715 + shlibpath_overrides_runpath=no | |
2716 + hardcode_into_libs=yes | |
2717 + dynamic_linker='NetBSD ld.elf_so' | |
2718 + ;; | |
2719 + | |
2720 +netbsd*) | |
2721 + version_type=sunos | |
2722 + need_lib_prefix=no | |
2723 + need_version=no | |
2724 + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then | |
2725 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' | |
2726 + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' | |
2727 + dynamic_linker='NetBSD (a.out) ld.so' | |
2728 + else | |
2729 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' | |
2730 + soname_spec='${libname}${release}${shared_ext}$major' | |
2731 + dynamic_linker='NetBSD ld.elf_so' | |
2732 + fi | |
2733 + shlibpath_var=LD_LIBRARY_PATH | |
2734 + shlibpath_overrides_runpath=yes | |
2735 + hardcode_into_libs=yes | |
2736 + ;; | |
2737 + | |
2738 +newsos6) | |
2739 + version_type=linux # correct to gnu/linux during the next big refactor | |
2740 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
2741 + shlibpath_var=LD_LIBRARY_PATH | |
2742 + shlibpath_overrides_runpath=yes | |
2743 + ;; | |
2744 + | |
2745 +*nto* | *qnx*) | |
2746 + version_type=qnx | |
2747 + need_lib_prefix=no | |
2748 + need_version=no | |
2749 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
2750 + soname_spec='${libname}${release}${shared_ext}$major' | |
2751 + shlibpath_var=LD_LIBRARY_PATH | |
2752 + shlibpath_overrides_runpath=no | |
2753 + hardcode_into_libs=yes | |
2754 + dynamic_linker='ldqnx.so' | |
2755 + ;; | |
2756 + | |
2757 +openbsd*) | |
2758 + version_type=sunos | |
2759 + sys_lib_dlsearch_path_spec="/usr/lib" | |
2760 + need_lib_prefix=no | |
2761 + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. | |
2762 + case $host_os in | |
2763 + openbsd3.3 | openbsd3.3.*) need_version=yes ;; | |
2764 + *) need_version=no ;; | |
2765 + esac | |
2766 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' | |
2767 + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' | |
2768 + shlibpath_var=LD_LIBRARY_PATH | |
2769 + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then | |
2770 + case $host_os in | |
2771 + openbsd2.[[89]] | openbsd2.[[89]].*) | |
2772 + shlibpath_overrides_runpath=no | |
2773 + ;; | |
2774 + *) | |
2775 + shlibpath_overrides_runpath=yes | |
2776 + ;; | |
2777 + esac | |
2778 + else | |
2779 + shlibpath_overrides_runpath=yes | |
2780 + fi | |
2781 + ;; | |
2782 + | |
2783 +os2*) | |
2784 + libname_spec='$name' | |
2785 + shrext_cmds=".dll" | |
2786 + need_lib_prefix=no | |
2787 + library_names_spec='$libname${shared_ext} $libname.a' | |
2788 + dynamic_linker='OS/2 ld.exe' | |
2789 + shlibpath_var=LIBPATH | |
2790 + ;; | |
2791 + | |
2792 +osf3* | osf4* | osf5*) | |
2793 + version_type=osf | |
2794 + need_lib_prefix=no | |
2795 + need_version=no | |
2796 + soname_spec='${libname}${release}${shared_ext}$major' | |
2797 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
2798 + shlibpath_var=LD_LIBRARY_PATH | |
2799 + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" | |
2800 + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" | |
2801 + ;; | |
2802 + | |
2803 +rdos*) | |
2804 + dynamic_linker=no | |
2805 + ;; | |
2806 + | |
2807 +solaris*) | |
2808 + version_type=linux # correct to gnu/linux during the next big refactor | |
2809 + need_lib_prefix=no | |
2810 + need_version=no | |
2811 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
2812 + soname_spec='${libname}${release}${shared_ext}$major' | |
2813 + shlibpath_var=LD_LIBRARY_PATH | |
2814 + shlibpath_overrides_runpath=yes | |
2815 + hardcode_into_libs=yes | |
2816 + # ldd complains unless libraries are executable | |
2817 + postinstall_cmds='chmod +x $lib' | |
2818 + ;; | |
2819 + | |
2820 +sunos4*) | |
2821 + version_type=sunos | |
2822 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' | |
2823 + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' | |
2824 + shlibpath_var=LD_LIBRARY_PATH | |
2825 + shlibpath_overrides_runpath=yes | |
2826 + if test "$with_gnu_ld" = yes; then | |
2827 + need_lib_prefix=no | |
2828 + fi | |
2829 + need_version=yes | |
2830 + ;; | |
2831 + | |
2832 +sysv4 | sysv4.3*) | |
2833 + version_type=linux # correct to gnu/linux during the next big refactor | |
2834 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
2835 + soname_spec='${libname}${release}${shared_ext}$major' | |
2836 + shlibpath_var=LD_LIBRARY_PATH | |
2837 + case $host_vendor in | |
2838 + sni) | |
2839 + shlibpath_overrides_runpath=no | |
2840 + need_lib_prefix=no | |
2841 + runpath_var=LD_RUN_PATH | |
2842 + ;; | |
2843 + siemens) | |
2844 + need_lib_prefix=no | |
2845 + ;; | |
2846 + motorola) | |
2847 + need_lib_prefix=no | |
2848 + need_version=no | |
2849 + shlibpath_overrides_runpath=no | |
2850 + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' | |
2851 + ;; | |
2852 + esac | |
2853 + ;; | |
2854 + | |
2855 +sysv4*MP*) | |
2856 + if test -d /usr/nec ;then | |
2857 + version_type=linux # correct to gnu/linux during the next big refactor | |
2858 + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' | |
2859 + soname_spec='$libname${shared_ext}.$major' | |
2860 + shlibpath_var=LD_LIBRARY_PATH | |
2861 + fi | |
2862 + ;; | |
2863 + | |
2864 +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) | |
2865 + version_type=freebsd-elf | |
2866 + need_lib_prefix=no | |
2867 + need_version=no | |
2868 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' | |
2869 + soname_spec='${libname}${release}${shared_ext}$major' | |
2870 + shlibpath_var=LD_LIBRARY_PATH | |
2871 + shlibpath_overrides_runpath=yes | |
2872 + hardcode_into_libs=yes | |
2873 + if test "$with_gnu_ld" = yes; then | |
2874 + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' | |
2875 + else | |
2876 + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' | |
2877 + case $host_os in | |
2878 + sco3.2v5*) | |
2879 + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" | |
2880 + ;; | |
2881 + esac | |
2882 + fi | |
2883 + sys_lib_dlsearch_path_spec='/usr/lib' | |
2884 + ;; | |
2885 + | |
2886 +tpf*) | |
2887 + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. | |
2888 + version_type=linux # correct to gnu/linux during the next big refactor | |
2889 + need_lib_prefix=no | |
2890 + need_version=no | |
2891 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
2892 + shlibpath_var=LD_LIBRARY_PATH | |
2893 + shlibpath_overrides_runpath=no | |
2894 + hardcode_into_libs=yes | |
2895 + ;; | |
2896 + | |
2897 +uts4*) | |
2898 + version_type=linux # correct to gnu/linux during the next big refactor | |
2899 + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | |
2900 + soname_spec='${libname}${release}${shared_ext}$major' | |
2901 + shlibpath_var=LD_LIBRARY_PATH | |
2902 + ;; | |
2903 + | |
2904 +*) | |
2905 + dynamic_linker=no | |
2906 + ;; | |
2907 +esac | |
2908 +AC_MSG_RESULT([$dynamic_linker]) | |
2909 +test "$dynamic_linker" = no && can_build_shared=no | |
2910 + | |
2911 +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" | |
2912 +if test "$GCC" = yes; then | |
2913 + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" | |
2914 +fi | |
2915 + | |
2916 +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then | |
2917 + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" | |
2918 +fi | |
2919 +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then | |
2920 + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" | |
2921 +fi | |
2922 + | |
2923 +_LT_DECL([], [variables_saved_for_relink], [1], | |
2924 + [Variables whose values should be saved in libtool wrapper scripts and | |
2925 + restored at link time]) | |
2926 +_LT_DECL([], [need_lib_prefix], [0], | |
2927 + [Do we need the "lib" prefix for modules?]) | |
2928 +_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) | |
2929 +_LT_DECL([], [version_type], [0], [Library versioning type]) | |
2930 +_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) | |
2931 +_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) | |
2932 +_LT_DECL([], [shlibpath_overrides_runpath], [0], | |
2933 + [Is shlibpath searched before the hard-coded library search path?]) | |
2934 +_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) | |
2935 +_LT_DECL([], [library_names_spec], [1], | |
2936 + [[List of archive names. First name is the real one, the rest are links. | |
2937 + The last name is the one that the linker finds with -lNAME]]) | |
2938 +_LT_DECL([], [soname_spec], [1], | |
2939 + [[The coded name of the library, if different from the real name]]) | |
2940 +_LT_DECL([], [install_override_mode], [1], | |
2941 + [Permission mode override for installation of shared libraries]) | |
2942 +_LT_DECL([], [postinstall_cmds], [2], | |
2943 + [Command to use after installation of a shared archive]) | |
2944 +_LT_DECL([], [postuninstall_cmds], [2], | |
2945 + [Command to use after uninstallation of a shared archive]) | |
2946 +_LT_DECL([], [finish_cmds], [2], | |
2947 + [Commands used to finish a libtool library installation in a directory]) | |
2948 +_LT_DECL([], [finish_eval], [1], | |
2949 + [[As "finish_cmds", except a single script fragment to be evaled but | |
2950 + not shown]]) | |
2951 +_LT_DECL([], [hardcode_into_libs], [0], | |
2952 + [Whether we should hardcode library paths into libraries]) | |
2953 +_LT_DECL([], [sys_lib_search_path_spec], [2], | |
2954 + [Compile-time system search path for libraries]) | |
2955 +_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], | |
2956 + [Run-time system search path for libraries]) | |
2957 +])# _LT_SYS_DYNAMIC_LINKER | |
2958 + | |
2959 + | |
2960 +# _LT_PATH_TOOL_PREFIX(TOOL) | |
2961 +# -------------------------- | |
2962 +# find a file program which can recognize shared library | |
2963 +AC_DEFUN([_LT_PATH_TOOL_PREFIX], | |
2964 +[m4_require([_LT_DECL_EGREP])dnl | |
2965 +AC_MSG_CHECKING([for $1]) | |
2966 +AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, | |
2967 +[case $MAGIC_CMD in | |
2968 +[[\\/*] | ?:[\\/]*]) | |
2969 + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. | |
2970 + ;; | |
2971 +*) | |
2972 + lt_save_MAGIC_CMD="$MAGIC_CMD" | |
2973 + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR | |
2974 +dnl $ac_dummy forces splitting on constant user-supplied paths. | |
2975 +dnl POSIX.2 word splitting is done only on the output of word expansions, | |
2976 +dnl not every word. This closes a longstanding sh security hole. | |
2977 + ac_dummy="m4_if([$2], , $PATH, [$2])" | |
2978 + for ac_dir in $ac_dummy; do | |
2979 + IFS="$lt_save_ifs" | |
2980 + test -z "$ac_dir" && ac_dir=. | |
2981 + if test -f $ac_dir/$1; then | |
2982 + lt_cv_path_MAGIC_CMD="$ac_dir/$1" | |
2983 + if test -n "$file_magic_test_file"; then | |
2984 + case $deplibs_check_method in | |
2985 + "file_magic "*) | |
2986 + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` | |
2987 + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" | |
2988 + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | | |
2989 + $EGREP "$file_magic_regex" > /dev/null; then | |
2990 + : | |
2991 + else | |
2992 + cat <<_LT_EOF 1>&2 | |
2993 + | |
2994 +*** Warning: the command libtool uses to detect shared libraries, | |
2995 +*** $file_magic_cmd, produces output that libtool cannot recognize. | |
2996 +*** The result is that libtool may fail to recognize shared libraries | |
2997 +*** as such. This will affect the creation of libtool libraries that | |
2998 +*** depend on shared libraries, but programs linked with such libtool | |
2999 +*** libraries will work regardless of this problem. Nevertheless, you | |
3000 +*** may want to report the problem to your system manager and/or to | |
3001 +*** bug-libtool@gnu.org | |
3002 + | |
3003 +_LT_EOF | |
3004 + fi ;; | |
3005 + esac | |
3006 + fi | |
3007 + break | |
3008 + fi | |
3009 + done | |
3010 + IFS="$lt_save_ifs" | |
3011 + MAGIC_CMD="$lt_save_MAGIC_CMD" | |
3012 + ;; | |
3013 +esac]) | |
3014 +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" | |
3015 +if test -n "$MAGIC_CMD"; then | |
3016 + AC_MSG_RESULT($MAGIC_CMD) | |
3017 +else | |
3018 + AC_MSG_RESULT(no) | |
3019 +fi | |
3020 +_LT_DECL([], [MAGIC_CMD], [0], | |
3021 + [Used to examine libraries when file_magic_cmd begins with "file"])dnl | |
3022 +])# _LT_PATH_TOOL_PREFIX | |
3023 + | |
3024 +# Old name: | |
3025 +AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) | |
3026 +dnl aclocal-1.4 backwards compatibility: | |
3027 +dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) | |
3028 + | |
3029 + | |
3030 +# _LT_PATH_MAGIC | |
3031 +# -------------- | |
3032 +# find a file program which can recognize a shared library | |
3033 +m4_defun([_LT_PATH_MAGIC], | |
3034 +[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) | |
3035 +if test -z "$lt_cv_path_MAGIC_CMD"; then | |
3036 + if test -n "$ac_tool_prefix"; then | |
3037 + _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) | |
3038 + else | |
3039 + MAGIC_CMD=: | |
3040 + fi | |
3041 +fi | |
3042 +])# _LT_PATH_MAGIC | |
3043 + | |
3044 + | |
3045 +# LT_PATH_LD | |
3046 +# ---------- | |
3047 +# find the pathname to the GNU or non-GNU linker | |
3048 +AC_DEFUN([LT_PATH_LD], | |
3049 +[AC_REQUIRE([AC_PROG_CC])dnl | |
3050 +AC_REQUIRE([AC_CANONICAL_HOST])dnl | |
3051 +AC_REQUIRE([AC_CANONICAL_BUILD])dnl | |
3052 +m4_require([_LT_DECL_SED])dnl | |
3053 +m4_require([_LT_DECL_EGREP])dnl | |
3054 +m4_require([_LT_PROG_ECHO_BACKSLASH])dnl | |
3055 + | |
3056 +AC_ARG_WITH([gnu-ld], | |
3057 + [AS_HELP_STRING([--with-gnu-ld], | |
3058 + [assume the C compiler uses GNU ld @<:@default=no@:>@])], | |
3059 + [test "$withval" = no || with_gnu_ld=yes], | |
3060 + [with_gnu_ld=no])dnl | |
3061 + | |
3062 +ac_prog=ld | |
3063 +if test "$GCC" = yes; then | |
3064 + # Check if gcc -print-prog-name=ld gives a path. | |
3065 + AC_MSG_CHECKING([for ld used by $CC]) | |
3066 + case $host in | |
3067 + *-*-mingw*) | |
3068 + # gcc leaves a trailing carriage return which upsets mingw | |
3069 + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
3070 + *) | |
3071 + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | |
3072 + esac | |
3073 + case $ac_prog in | |
3074 + # Accept absolute paths. | |
3075 + [[\\/]]* | ?:[[\\/]]*) | |
3076 + re_direlt='/[[^/]][[^/]]*/\.\./' | |
3077 + # Canonicalize the pathname of ld | |
3078 + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` | |
3079 + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do | |
3080 + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` | |
3081 + done | |
3082 + test -z "$LD" && LD="$ac_prog" | |
3083 + ;; | |
3084 + "") | |
3085 + # If it fails, then pretend we aren't using GCC. | |
3086 + ac_prog=ld | |
3087 + ;; | |
3088 + *) | |
3089 + # If it is relative, then search for the first ld in PATH. | |
3090 + with_gnu_ld=unknown | |
3091 + ;; | |
3092 + esac | |
3093 +elif test "$with_gnu_ld" = yes; then | |
3094 + AC_MSG_CHECKING([for GNU ld]) | |
3095 +else | |
3096 + AC_MSG_CHECKING([for non-GNU ld]) | |
3097 +fi | |
3098 +AC_CACHE_VAL(lt_cv_path_LD, | |
3099 +[if test -z "$LD"; then | |
3100 + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR | |
3101 + for ac_dir in $PATH; do | |
3102 + IFS="$lt_save_ifs" | |
3103 + test -z "$ac_dir" && ac_dir=. | |
3104 + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | |
3105 + lt_cv_path_LD="$ac_dir/$ac_prog" | |
3106 + # Check to see if the program is GNU ld. I'd rather use --version, | |
3107 + # but apparently some variants of GNU ld only accept -v. | |
3108 + # Break only if it was the GNU/non-GNU ld that we prefer. | |
3109 + case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in | |
3110 + *GNU* | *'with BFD'*) | |
3111 + test "$with_gnu_ld" != no && break | |
3112 + ;; | |
3113 + *) | |
3114 + test "$with_gnu_ld" != yes && break | |
3115 + ;; | |
3116 + esac | |
3117 + fi | |
3118 + done | |
3119 + IFS="$lt_save_ifs" | |
3120 +else | |
3121 + lt_cv_path_LD="$LD" # Let the user override the test with a path. | |
3122 +fi]) | |
3123 +LD="$lt_cv_path_LD" | |
3124 +if test -n "$LD"; then | |
3125 + AC_MSG_RESULT($LD) | |
3126 +else | |
3127 + AC_MSG_RESULT(no) | |
3128 +fi | |
3129 +test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) | |
3130 +_LT_PATH_LD_GNU | |
3131 +AC_SUBST([LD]) | |
3132 + | |
3133 +_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) | |
3134 +])# LT_PATH_LD | |
3135 + | |
3136 +# Old names: | |
3137 +AU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) | |
3138 +AU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) | |
3139 +dnl aclocal-1.4 backwards compatibility: | |
3140 +dnl AC_DEFUN([AM_PROG_LD], []) | |
3141 +dnl AC_DEFUN([AC_PROG_LD], []) | |
3142 + | |
3143 + | |
3144 +# _LT_PATH_LD_GNU | |
3145 +#- -------------- | |
3146 +m4_defun([_LT_PATH_LD_GNU], | |
3147 +[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, | |
3148 +[# I'd rather use --version here, but apparently some GNU lds only accept -v. | |
3149 +case `$LD -v 2>&1 </dev/null` in | |
3150 +*GNU* | *'with BFD'*) | |
3151 + lt_cv_prog_gnu_ld=yes | |
3152 + ;; | |
3153 +*) | |
3154 + lt_cv_prog_gnu_ld=no | |
3155 + ;; | |
3156 +esac]) | |
3157 +with_gnu_ld=$lt_cv_prog_gnu_ld | |
3158 +])# _LT_PATH_LD_GNU | |
3159 + | |
3160 + | |
3161 +# _LT_CMD_RELOAD | |
3162 +# -------------- | |
3163 +# find reload flag for linker | |
3164 +# -- PORTME Some linkers may need a different reload flag. | |
3165 +m4_defun([_LT_CMD_RELOAD], | |
3166 +[AC_CACHE_CHECK([for $LD option to reload object files], | |
3167 + lt_cv_ld_reload_flag, | |
3168 + [lt_cv_ld_reload_flag='-r']) | |
3169 +reload_flag=$lt_cv_ld_reload_flag | |
3170 +case $reload_flag in | |
3171 +"" | " "*) ;; | |
3172 +*) reload_flag=" $reload_flag" ;; | |
3173 +esac | |
3174 +reload_cmds='$LD$reload_flag -o $output$reload_objs' | |
3175 +case $host_os in | |
3176 + cygwin* | mingw* | pw32* | cegcc*) | |
3177 + if test "$GCC" != yes; then | |
3178 + reload_cmds=false | |
3179 + fi | |
3180 + ;; | |
3181 + darwin*) | |
3182 + if test "$GCC" = yes; then | |
3183 + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' | |
3184 + else | |
3185 + reload_cmds='$LD$reload_flag -o $output$reload_objs' | |
3186 + fi | |
3187 + ;; | |
3188 +esac | |
3189 +_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl | |
3190 +_LT_TAGDECL([], [reload_cmds], [2])dnl | |
3191 +])# _LT_CMD_RELOAD | |
3192 + | |
3193 + | |
3194 +# _LT_CHECK_MAGIC_METHOD | |
3195 +# ---------------------- | |
3196 +# how to check for library dependencies | |
3197 +# -- PORTME fill in with the dynamic library characteristics | |
3198 +m4_defun([_LT_CHECK_MAGIC_METHOD], | |
3199 +[m4_require([_LT_DECL_EGREP]) | |
3200 +m4_require([_LT_DECL_OBJDUMP]) | |
3201 +AC_CACHE_CHECK([how to recognize dependent libraries], | |
3202 +lt_cv_deplibs_check_method, | |
3203 +[lt_cv_file_magic_cmd='$MAGIC_CMD' | |
3204 +lt_cv_file_magic_test_file= | |
3205 +lt_cv_deplibs_check_method='unknown' | |
3206 +# Need to set the preceding variable on all platforms that support | |
3207 +# interlibrary dependencies. | |
3208 +# 'none' -- dependencies not supported. | |
3209 +# `unknown' -- same as none, but documents that we really don't know. | |
3210 +# 'pass_all' -- all dependencies passed with no checks. | |
3211 +# 'test_compile' -- check by making test program. | |
3212 +# 'file_magic [[regex]]' -- check by looking for files in library path | |
3213 +# which responds to the $file_magic_cmd with a given extended regex. | |
3214 +# If you have `file' or equivalent on your system and you're not sure | |
3215 +# whether `pass_all' will *always* work, you probably want this one. | |
3216 + | |
3217 +case $host_os in | |
3218 +aix[[4-9]]*) | |
3219 + lt_cv_deplibs_check_method=pass_all | |
3220 + ;; | |
3221 + | |
3222 +beos*) | |
3223 + lt_cv_deplibs_check_method=pass_all | |
3224 + ;; | |
3225 + | |
3226 +bsdi[[45]]*) | |
3227 + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' | |
3228 + lt_cv_file_magic_cmd='/usr/bin/file -L' | |
3229 + lt_cv_file_magic_test_file=/shlib/libc.so | |
3230 + ;; | |
3231 + | |
3232 +cygwin*) | |
3233 + # func_win32_libid is a shell function defined in ltmain.sh | |
3234 + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' | |
3235 + lt_cv_file_magic_cmd='func_win32_libid' | |
3236 + ;; | |
3237 + | |
3238 +mingw* | pw32*) | |
3239 + # Base MSYS/MinGW do not provide the 'file' command needed by | |
3240 + # func_win32_libid shell function, so use a weaker test based on 'objdump', | |
3241 + # unless we find 'file', for example because we are cross-compiling. | |
3242 + # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. | |
3243 + if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then | |
3244 + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' | |
3245 + lt_cv_file_magic_cmd='func_win32_libid' | |
3246 + else | |
3247 + # Keep this pattern in sync with the one in func_win32_libid. | |
3248 + lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' | |
3249 + lt_cv_file_magic_cmd='$OBJDUMP -f' | |
3250 + fi | |
3251 + ;; | |
3252 + | |
3253 +cegcc*) | |
3254 + # use the weaker test based on 'objdump'. See mingw*. | |
3255 + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' | |
3256 + lt_cv_file_magic_cmd='$OBJDUMP -f' | |
3257 + ;; | |
3258 + | |
3259 +darwin* | rhapsody*) | |
3260 + lt_cv_deplibs_check_method=pass_all | |
3261 + ;; | |
3262 + | |
3263 +freebsd* | dragonfly*) | |
3264 + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then | |
3265 + case $host_cpu in | |
3266 + i*86 ) | |
3267 + # Not sure whether the presence of OpenBSD here was a mistake. | |
3268 + # Let's accept both of them until this is cleared up. | |
3269 + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' | |
3270 + lt_cv_file_magic_cmd=/usr/bin/file | |
3271 + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` | |
3272 + ;; | |
3273 + esac | |
3274 + else | |
3275 + lt_cv_deplibs_check_method=pass_all | |
3276 + fi | |
3277 + ;; | |
3278 + | |
3279 +haiku*) | |
3280 + lt_cv_deplibs_check_method=pass_all | |
3281 + ;; | |
3282 + | |
3283 +hpux10.20* | hpux11*) | |
3284 + lt_cv_file_magic_cmd=/usr/bin/file | |
3285 + case $host_cpu in | |
3286 + ia64*) | |
3287 + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' | |
3288 + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so | |
3289 + ;; | |
3290 + hppa*64*) | |
3291 + [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]'] | |
3292 + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl | |
3293 + ;; | |
3294 + *) | |
3295 + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' | |
3296 + lt_cv_file_magic_test_file=/usr/lib/libc.sl | |
3297 + ;; | |
3298 + esac | |
3299 + ;; | |
3300 + | |
3301 +interix[[3-9]]*) | |
3302 + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here | |
3303 + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' | |
3304 + ;; | |
3305 + | |
3306 +irix5* | irix6* | nonstopux*) | |
3307 + case $LD in | |
3308 + *-32|*"-32 ") libmagic=32-bit;; | |
3309 + *-n32|*"-n32 ") libmagic=N32;; | |
3310 + *-64|*"-64 ") libmagic=64-bit;; | |
3311 + *) libmagic=never-match;; | |
3312 + esac | |
3313 + lt_cv_deplibs_check_method=pass_all | |
3314 + ;; | |
3315 + | |
3316 +# This must be glibc/ELF. | |
3317 +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) | |
3318 + lt_cv_deplibs_check_method=pass_all | |
3319 + ;; | |
3320 + | |
3321 +netbsd* | netbsdelf*-gnu) | |
3322 + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then | |
3323 + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' | |
3324 + else | |
3325 + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' | |
3326 + fi | |
3327 + ;; | |
3328 + | |
3329 +newos6*) | |
3330 + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' | |
3331 + lt_cv_file_magic_cmd=/usr/bin/file | |
3332 + lt_cv_file_magic_test_file=/usr/lib/libnls.so | |
3333 + ;; | |
3334 + | |
3335 +*nto* | *qnx*) | |
3336 + lt_cv_deplibs_check_method=pass_all | |
3337 + ;; | |
3338 + | |
3339 +openbsd*) | |
3340 + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then | |
3341 + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' | |
3342 + else | |
3343 + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' | |
3344 + fi | |
3345 + ;; | |
3346 + | |
3347 +osf3* | osf4* | osf5*) | |
3348 + lt_cv_deplibs_check_method=pass_all | |
3349 + ;; | |
3350 + | |
3351 +rdos*) | |
3352 + lt_cv_deplibs_check_method=pass_all | |
3353 + ;; | |
3354 + | |
3355 +solaris*) | |
3356 + lt_cv_deplibs_check_method=pass_all | |
3357 + ;; | |
3358 + | |
3359 +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) | |
3360 + lt_cv_deplibs_check_method=pass_all | |
3361 + ;; | |
3362 + | |
3363 +sysv4 | sysv4.3*) | |
3364 + case $host_vendor in | |
3365 + motorola) | |
3366 + 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]]' | |
3367 + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` | |
3368 + ;; | |
3369 + ncr) | |
3370 + lt_cv_deplibs_check_method=pass_all | |
3371 + ;; | |
3372 + sequent) | |
3373 + lt_cv_file_magic_cmd='/bin/file' | |
3374 + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' | |
3375 + ;; | |
3376 + sni) | |
3377 + lt_cv_file_magic_cmd='/bin/file' | |
3378 + lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" | |
3379 + lt_cv_file_magic_test_file=/lib/libc.so | |
3380 + ;; | |
3381 + siemens) | |
3382 + lt_cv_deplibs_check_method=pass_all | |
3383 + ;; | |
3384 + pc) | |
3385 + lt_cv_deplibs_check_method=pass_all | |
3386 + ;; | |
3387 + esac | |
3388 + ;; | |
3389 + | |
3390 +tpf*) | |
3391 + lt_cv_deplibs_check_method=pass_all | |
3392 + ;; | |
3393 +esac | |
3394 +]) | |
3395 + | |
3396 +file_magic_glob= | |
3397 +want_nocaseglob=no | |
3398 +if test "$build" = "$host"; then | |
3399 + case $host_os in | |
3400 + mingw* | pw32*) | |
3401 + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then | |
3402 + want_nocaseglob=yes | |
3403 + else | |
3404 + file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` | |
3405 + fi | |
3406 + ;; | |
3407 + esac | |
3408 +fi | |
3409 + | |
3410 +file_magic_cmd=$lt_cv_file_magic_cmd | |
3411 +deplibs_check_method=$lt_cv_deplibs_check_method | |
3412 +test -z "$deplibs_check_method" && deplibs_check_method=unknown | |
3413 + | |
3414 +_LT_DECL([], [deplibs_check_method], [1], | |
3415 + [Method to check whether dependent libraries are shared objects]) | |
3416 +_LT_DECL([], [file_magic_cmd], [1], | |
3417 + [Command to use when deplibs_check_method = "file_magic"]) | |
3418 +_LT_DECL([], [file_magic_glob], [1], | |
3419 + [How to find potential files when deplibs_check_method = "file_magic"]) | |
3420 +_LT_DECL([], [want_nocaseglob], [1], | |
3421 + [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) | |
3422 +])# _LT_CHECK_MAGIC_METHOD | |
3423 + | |
3424 + | |
3425 +# LT_PATH_NM | |
3426 +# ---------- | |
3427 +# find the pathname to a BSD- or MS-compatible name lister | |
3428 +AC_DEFUN([LT_PATH_NM], | |
3429 +[AC_REQUIRE([AC_PROG_CC])dnl | |
3430 +AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, | |
3431 +[if test -n "$NM"; then | |
3432 + # Let the user override the test. | |
3433 + lt_cv_path_NM="$NM" | |
3434 +else | |
3435 + lt_nm_to_check="${ac_tool_prefix}nm" | |
3436 + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then | |
3437 + lt_nm_to_check="$lt_nm_to_check nm" | |
3438 + fi | |
3439 + for lt_tmp_nm in $lt_nm_to_check; do | |
3440 + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR | |
3441 + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do | |
3442 + IFS="$lt_save_ifs" | |
3443 + test -z "$ac_dir" && ac_dir=. | |
3444 + tmp_nm="$ac_dir/$lt_tmp_nm" | |
3445 + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then | |
3446 + # Check to see if the nm accepts a BSD-compat flag. | |
3447 + # Adding the `sed 1q' prevents false positives on HP-UX, which says: | |
3448 + # nm: unknown option "B" ignored | |
3449 + # Tru64's nm complains that /dev/null is an invalid object file | |
3450 + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in | |
3451 + */dev/null* | *'Invalid file or object type'*) | |
3452 + lt_cv_path_NM="$tmp_nm -B" | |
3453 + break | |
3454 + ;; | |
3455 + *) | |
3456 + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in | |
3457 + */dev/null*) | |
3458 + lt_cv_path_NM="$tmp_nm -p" | |
3459 + break | |
3460 + ;; | |
3461 + *) | |
3462 + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but | |
3463 + continue # so that we can try to find one that supports BSD flags | |
3464 + ;; | |
3465 + esac | |
3466 + ;; | |
3467 + esac | |
3468 + fi | |
3469 + done | |
3470 + IFS="$lt_save_ifs" | |
3471 + done | |
3472 + : ${lt_cv_path_NM=no} | |
3473 +fi]) | |
3474 +if test "$lt_cv_path_NM" != "no"; then | |
3475 + NM="$lt_cv_path_NM" | |
3476 +else | |
3477 + # Didn't find any BSD compatible name lister, look for dumpbin. | |
3478 + if test -n "$DUMPBIN"; then : | |
3479 + # Let the user override the test. | |
3480 + else | |
3481 + AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) | |
3482 + case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in | |
3483 + *COFF*) | |
3484 + DUMPBIN="$DUMPBIN -symbols" | |
3485 + ;; | |
3486 + *) | |
3487 + DUMPBIN=: | |
3488 + ;; | |
3489 + esac | |
3490 + fi | |
3491 + AC_SUBST([DUMPBIN]) | |
3492 + if test "$DUMPBIN" != ":"; then | |
3493 + NM="$DUMPBIN" | |
3494 + fi | |
3495 +fi | |
3496 +test -z "$NM" && NM=nm | |
3497 +AC_SUBST([NM]) | |
3498 +_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl | |
3499 + | |
3500 +AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], | |
3501 + [lt_cv_nm_interface="BSD nm" | |
3502 + echo "int some_variable = 0;" > conftest.$ac_ext | |
3503 + (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) | |
3504 + (eval "$ac_compile" 2>conftest.err) | |
3505 + cat conftest.err >&AS_MESSAGE_LOG_FD | |
3506 + (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) | |
3507 + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) | |
3508 + cat conftest.err >&AS_MESSAGE_LOG_FD | |
3509 + (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) | |
3510 + cat conftest.out >&AS_MESSAGE_LOG_FD | |
3511 + if $GREP 'External.*some_variable' conftest.out > /dev/null; then | |
3512 + lt_cv_nm_interface="MS dumpbin" | |
3513 + fi | |
3514 + rm -f conftest*]) | |
3515 +])# LT_PATH_NM | |
3516 + | |
3517 +# Old names: | |
3518 +AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) | |
3519 +AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) | |
3520 +dnl aclocal-1.4 backwards compatibility: | |
3521 +dnl AC_DEFUN([AM_PROG_NM], []) | |
3522 +dnl AC_DEFUN([AC_PROG_NM], []) | |
3523 + | |
3524 +# _LT_CHECK_SHAREDLIB_FROM_LINKLIB | |
3525 +# -------------------------------- | |
3526 +# how to determine the name of the shared library | |
3527 +# associated with a specific link library. | |
3528 +# -- PORTME fill in with the dynamic library characteristics | |
3529 +m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], | |
3530 +[m4_require([_LT_DECL_EGREP]) | |
3531 +m4_require([_LT_DECL_OBJDUMP]) | |
3532 +m4_require([_LT_DECL_DLLTOOL]) | |
3533 +AC_CACHE_CHECK([how to associate runtime and link libraries], | |
3534 +lt_cv_sharedlib_from_linklib_cmd, | |
3535 +[lt_cv_sharedlib_from_linklib_cmd='unknown' | |
3536 + | |
3537 +case $host_os in | |
3538 +cygwin* | mingw* | pw32* | cegcc*) | |
3539 + # two different shell functions defined in ltmain.sh | |
3540 + # decide which to use based on capabilities of $DLLTOOL | |
3541 + case `$DLLTOOL --help 2>&1` in | |
3542 + *--identify-strict*) | |
3543 + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib | |
3544 + ;; | |
3545 + *) | |
3546 + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback | |
3547 + ;; | |
3548 + esac | |
3549 + ;; | |
3550 +*) | |
3551 + # fallback: assume linklib IS sharedlib | |
3552 + lt_cv_sharedlib_from_linklib_cmd="$ECHO" | |
3553 + ;; | |
3554 +esac | |
3555 +]) | |
3556 +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd | |
3557 +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO | |
3558 + | |
3559 +_LT_DECL([], [sharedlib_from_linklib_cmd], [1], | |
3560 + [Command to associate shared and link libraries]) | |
3561 +])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB | |
3562 + | |
3563 + | |
3564 +# _LT_PATH_MANIFEST_TOOL | |
3565 +# ---------------------- | |
3566 +# locate the manifest tool | |
3567 +m4_defun([_LT_PATH_MANIFEST_TOOL], | |
3568 +[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) | |
3569 +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt | |
3570 +AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], | |
3571 + [lt_cv_path_mainfest_tool=no | |
3572 + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD | |
3573 + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out | |
3574 + cat conftest.err >&AS_MESSAGE_LOG_FD | |
3575 + if $GREP 'Manifest Tool' conftest.out > /dev/null; then | |
3576 + lt_cv_path_mainfest_tool=yes | |
3577 + fi | |
3578 + rm -f conftest*]) | |
3579 +if test "x$lt_cv_path_mainfest_tool" != xyes; then | |
3580 + MANIFEST_TOOL=: | |
3581 +fi | |
3582 +_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl | |
3583 +])# _LT_PATH_MANIFEST_TOOL | |
3584 + | |
3585 + | |
3586 +# LT_LIB_M | |
3587 +# -------- | |
3588 +# check for math library | |
3589 +AC_DEFUN([LT_LIB_M], | |
3590 +[AC_REQUIRE([AC_CANONICAL_HOST])dnl | |
3591 +LIBM= | |
3592 +case $host in | |
3593 +*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) | |
3594 + # These system don't have libm, or don't need it | |
3595 + ;; | |
3596 +*-ncr-sysv4.3*) | |
3597 + AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") | |
3598 + AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") | |
3599 + ;; | |
3600 +*) | |
3601 + AC_CHECK_LIB(m, cos, LIBM="-lm") | |
3602 + ;; | |
3603 +esac | |
3604 +AC_SUBST([LIBM]) | |
3605 +])# LT_LIB_M | |
3606 + | |
3607 +# Old name: | |
3608 +AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) | |
3609 +dnl aclocal-1.4 backwards compatibility: | |
3610 +dnl AC_DEFUN([AC_CHECK_LIBM], []) | |
3611 + | |
3612 + | |
3613 +# _LT_COMPILER_NO_RTTI([TAGNAME]) | |
3614 +# ------------------------------- | |
3615 +m4_defun([_LT_COMPILER_NO_RTTI], | |
3616 +[m4_require([_LT_TAG_COMPILER])dnl | |
3617 + | |
3618 +_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= | |
3619 + | |
3620 +if test "$GCC" = yes; then | |
3621 + case $cc_basename in | |
3622 + nvcc*) | |
3623 + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; | |
3624 + *) | |
3625 + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; | |
3626 + esac | |
3627 + | |
3628 + _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], | |
3629 + lt_cv_prog_compiler_rtti_exceptions, | |
3630 + [-fno-rtti -fno-exceptions], [], | |
3631 + [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) | |
3632 +fi | |
3633 +_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], | |
3634 + [Compiler flag to turn off builtin functions]) | |
3635 +])# _LT_COMPILER_NO_RTTI | |
3636 + | |
3637 + | |
3638 +# _LT_CMD_GLOBAL_SYMBOLS | |
3639 +# ---------------------- | |
3640 +m4_defun([_LT_CMD_GLOBAL_SYMBOLS], | |
3641 +[AC_REQUIRE([AC_CANONICAL_HOST])dnl | |
3642 +AC_REQUIRE([AC_PROG_CC])dnl | |
3643 +AC_REQUIRE([AC_PROG_AWK])dnl | |
3644 +AC_REQUIRE([LT_PATH_NM])dnl | |
3645 +AC_REQUIRE([LT_PATH_LD])dnl | |
3646 +m4_require([_LT_DECL_SED])dnl | |
3647 +m4_require([_LT_DECL_EGREP])dnl | |
3648 +m4_require([_LT_TAG_COMPILER])dnl | |
3649 + | |
3650 +# Check for command to grab the raw symbol name followed by C symbol from nm. | |
3651 +AC_MSG_CHECKING([command to parse $NM output from $compiler object]) | |
3652 +AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], | |
3653 +[ | |
3654 +# These are sane defaults that work on at least a few old systems. | |
3655 +# [They come from Ultrix. What could be older than Ultrix?!! ;)] | |
3656 + | |
3657 +# Character class describing NM global symbol codes. | |
3658 +symcode='[[BCDEGRST]]' | |
3659 + | |
3660 +# Regexp to match symbols that can be accessed directly from C. | |
3661 +sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' | |
3662 + | |
3663 +# Define system-specific variables. | |
3664 +case $host_os in | |
3665 +aix*) | |
3666 + symcode='[[BCDT]]' | |
3667 + ;; | |
3668 +cygwin* | mingw* | pw32* | cegcc*) | |
3669 + symcode='[[ABCDGISTW]]' | |
3670 + ;; | |
3671 +hpux*) | |
3672 + if test "$host_cpu" = ia64; then | |
3673 + symcode='[[ABCDEGRST]]' | |
3674 + fi | |
3675 + ;; | |
3676 +irix* | nonstopux*) | |
3677 + symcode='[[BCDEGRST]]' | |
3678 + ;; | |
3679 +osf*) | |
3680 + symcode='[[BCDEGQRST]]' | |
3681 + ;; | |
3682 +solaris*) | |
3683 + symcode='[[BDRT]]' | |
3684 + ;; | |
3685 +sco3.2v5*) | |
3686 + symcode='[[DT]]' | |
3687 + ;; | |
3688 +sysv4.2uw2*) | |
3689 + symcode='[[DT]]' | |
3690 + ;; | |
3691 +sysv5* | sco5v6* | unixware* | OpenUNIX*) | |
3692 + symcode='[[ABDT]]' | |
3693 + ;; | |
3694 +sysv4) | |
3695 + symcode='[[DFNSTU]]' | |
3696 + ;; | |
3697 +esac | |
3698 + | |
3699 +# If we're using GNU nm, then use its standard symbol codes. | |
3700 +case `$NM -V 2>&1` in | |
3701 +*GNU* | *'with BFD'*) | |
3702 + symcode='[[ABCDGIRSTW]]' ;; | |
3703 +esac | |
3704 + | |
3705 +# Transform an extracted symbol line into a proper C declaration. | |
3706 +# Some systems (esp. on ia64) link data and code symbols differently, | |
3707 +# so use this general approach. | |
3708 +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" | |
3709 + | |
3710 +# Transform an extracted symbol line into symbol name and symbol address | |
3711 +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" | |
3712 +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'" | |
3713 + | |
3714 +# Handle CRLF in mingw tool chain | |
3715 +opt_cr= | |
3716 +case $build_os in | |
3717 +mingw*) | |
3718 + opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp | |
3719 + ;; | |
3720 +esac | |
3721 + | |
3722 +# Try without a prefix underscore, then with it. | |
3723 +for ac_symprfx in "" "_"; do | |
3724 + | |
3725 + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. | |
3726 + symxfrm="\\1 $ac_symprfx\\2 \\2" | |
3727 + | |
3728 + # Write the raw and C identifiers. | |
3729 + if test "$lt_cv_nm_interface" = "MS dumpbin"; then | |
3730 + # Fake it for dumpbin and say T for any non-static function | |
3731 + # and D for any global variable. | |
3732 + # Also find C++ and __fastcall symbols from MSVC++, | |
3733 + # which start with @ or ?. | |
3734 + lt_cv_sys_global_symbol_pipe="$AWK ['"\ | |
3735 +" {last_section=section; section=\$ 3};"\ | |
3736 +" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ | |
3737 +" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ | |
3738 +" \$ 0!~/External *\|/{next};"\ | |
3739 +" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ | |
3740 +" {if(hide[section]) next};"\ | |
3741 +" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ | |
3742 +" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ | |
3743 +" s[1]~/^[@?]/{print s[1], s[1]; next};"\ | |
3744 +" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ | |
3745 +" ' prfx=^$ac_symprfx]" | |
3746 + else | |
3747 + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" | |
3748 + fi | |
3749 + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" | |
3750 + | |
3751 + # Check to see that the pipe works correctly. | |
3752 + pipe_works=no | |
3753 + | |
3754 + rm -f conftest* | |
3755 + cat > conftest.$ac_ext <<_LT_EOF | |
3756 +#ifdef __cplusplus | |
3757 +extern "C" { | |
3758 +#endif | |
3759 +char nm_test_var; | |
3760 +void nm_test_func(void); | |
3761 +void nm_test_func(void){} | |
3762 +#ifdef __cplusplus | |
3763 +} | |
3764 +#endif | |
3765 +int main(){nm_test_var='a';nm_test_func();return(0);} | |
3766 +_LT_EOF | |
3767 + | |
3768 + if AC_TRY_EVAL(ac_compile); then | |
3769 + # Now try to grab the symbols. | |
3770 + nlist=conftest.nm | |
3771 + if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then | |
3772 + # Try sorting and uniquifying the output. | |
3773 + if sort "$nlist" | uniq > "$nlist"T; then | |
3774 + mv -f "$nlist"T "$nlist" | |
3775 + else | |
3776 + rm -f "$nlist"T | |
3777 + fi | |
3778 + | |
3779 + # Make sure that we snagged all the symbols we need. | |
3780 + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then | |
3781 + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then | |
3782 + cat <<_LT_EOF > conftest.$ac_ext | |
3783 +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ | |
3784 +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) | |
3785 +/* DATA imports from DLLs on WIN32 con't be const, because runtime | |
3786 + relocations are performed -- see ld's documentation on pseudo-relocs. */ | |
3787 +# define LT@&t@_DLSYM_CONST | |
3788 +#elif defined(__osf__) | |
3789 +/* This system does not cope well with relocations in const data. */ | |
3790 +# define LT@&t@_DLSYM_CONST | |
3791 +#else | |
3792 +# define LT@&t@_DLSYM_CONST const | |
3793 +#endif | |
3794 + | |
3795 +#ifdef __cplusplus | |
3796 +extern "C" { | |
3797 +#endif | |
3798 + | |
3799 +_LT_EOF | |
3800 + # Now generate the symbol file. | |
3801 + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' | |
3802 + | |
3803 + cat <<_LT_EOF >> conftest.$ac_ext | |
3804 + | |
3805 +/* The mapping between symbol names and symbols. */ | |
3806 +LT@&t@_DLSYM_CONST struct { | |
3807 + const char *name; | |
3808 + void *address; | |
3809 +} | |
3810 +lt__PROGRAM__LTX_preloaded_symbols[[]] = | |
3811 +{ | |
3812 + { "@PROGRAM@", (void *) 0 }, | |
3813 +_LT_EOF | |
3814 + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext | |
3815 + cat <<\_LT_EOF >> conftest.$ac_ext | |
3816 + {0, (void *) 0} | |
3817 +}; | |
3818 + | |
3819 +/* This works around a problem in FreeBSD linker */ | |
3820 +#ifdef FREEBSD_WORKAROUND | |
3821 +static const void *lt_preloaded_setup() { | |
3822 + return lt__PROGRAM__LTX_preloaded_symbols; | |
3823 +} | |
3824 +#endif | |
3825 + | |
3826 +#ifdef __cplusplus | |
3827 +} | |
3828 +#endif | |
3829 +_LT_EOF | |
3830 + # Now try linking the two files. | |
3831 + mv conftest.$ac_objext conftstm.$ac_objext | |
3832 + lt_globsym_save_LIBS=$LIBS | |
3833 + lt_globsym_save_CFLAGS=$CFLAGS | |
3834 + LIBS="conftstm.$ac_objext" | |
3835 + CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" | |
3836 + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then | |
3837 + pipe_works=yes | |
3838 + fi | |
3839 + LIBS=$lt_globsym_save_LIBS | |
3840 + CFLAGS=$lt_globsym_save_CFLAGS | |
3841 + else | |
3842 + echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD | |
3843 + fi | |
3844 + else | |
3845 + echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD | |
3846 + fi | |
3847 + else | |
3848 + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD | |
3849 + fi | |
3850 + else | |
3851 + echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD | |
3852 + cat conftest.$ac_ext >&5 | |
3853 + fi | |
3854 + rm -rf conftest* conftst* | |
3855 + | |
3856 + # Do not use the global_symbol_pipe unless it works. | |
3857 + if test "$pipe_works" = yes; then | |
3858 + break | |
3859 + else | |
3860 + lt_cv_sys_global_symbol_pipe= | |
3861 + fi | |
3862 +done | |
3863 +]) | |
3864 +if test -z "$lt_cv_sys_global_symbol_pipe"; then | |
3865 + lt_cv_sys_global_symbol_to_cdecl= | |
3866 +fi | |
3867 +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then | |
3868 + AC_MSG_RESULT(failed) | |
3869 +else | |
3870 + AC_MSG_RESULT(ok) | |
3871 +fi | |
3872 + | |
3873 +# Response file support. | |
3874 +if test "$lt_cv_nm_interface" = "MS dumpbin"; then | |
3875 + nm_file_list_spec='@' | |
3876 +elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then | |
3877 + nm_file_list_spec='@' | |
3878 +fi | |
3879 + | |
3880 +_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], | |
3881 + [Take the output of nm and produce a listing of raw symbols and C names]) | |
3882 +_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], | |
3883 + [Transform the output of nm in a proper C declaration]) | |
3884 +_LT_DECL([global_symbol_to_c_name_address], | |
3885 + [lt_cv_sys_global_symbol_to_c_name_address], [1], | |
3886 + [Transform the output of nm in a C name address pair]) | |
3887 +_LT_DECL([global_symbol_to_c_name_address_lib_prefix], | |
3888 + [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], | |
3889 + [Transform the output of nm in a C name address pair when lib prefix is needed]) | |
3890 +_LT_DECL([], [nm_file_list_spec], [1], | |
3891 + [Specify filename containing input files for $NM]) | |
3892 +]) # _LT_CMD_GLOBAL_SYMBOLS | |
3893 + | |
3894 + | |
3895 +# _LT_COMPILER_PIC([TAGNAME]) | |
3896 +# --------------------------- | |
3897 +m4_defun([_LT_COMPILER_PIC], | |
3898 +[m4_require([_LT_TAG_COMPILER])dnl | |
3899 +_LT_TAGVAR(lt_prog_compiler_wl, $1)= | |
3900 +_LT_TAGVAR(lt_prog_compiler_pic, $1)= | |
3901 +_LT_TAGVAR(lt_prog_compiler_static, $1)= | |
3902 + | |
3903 +m4_if([$1], [CXX], [ | |
3904 + # C++ specific cases for pic, static, wl, etc. | |
3905 + if test "$GXX" = yes; then | |
3906 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
3907 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' | |
3908 + | |
3909 + case $host_os in | |
3910 + aix*) | |
3911 + # All AIX code is PIC. | |
3912 + if test "$host_cpu" = ia64; then | |
3913 + # AIX 5 now supports IA64 processor | |
3914 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
3915 + fi | |
3916 + ;; | |
3917 + | |
3918 + amigaos*) | |
3919 + case $host_cpu in | |
3920 + powerpc) | |
3921 + # see comment about AmigaOS4 .so support | |
3922 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' | |
3923 + ;; | |
3924 + m68k) | |
3925 + # FIXME: we need at least 68020 code to build shared libraries, but | |
3926 + # adding the `-m68020' flag to GCC prevents building anything better, | |
3927 + # like `-m68040'. | |
3928 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' | |
3929 + ;; | |
3930 + esac | |
3931 + ;; | |
3932 + | |
3933 + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) | |
3934 + # PIC is the default for these OSes. | |
3935 + ;; | |
3936 + mingw* | cygwin* | os2* | pw32* | cegcc*) | |
3937 + # This hack is so that the source file can tell whether it is being | |
3938 + # built for inclusion in a dll (and should export symbols for example). | |
3939 + # Although the cygwin gcc ignores -fPIC, still need this for old-style | |
3940 + # (--disable-auto-import) libraries | |
3941 + m4_if([$1], [GCJ], [], | |
3942 + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) | |
3943 + ;; | |
3944 + darwin* | rhapsody*) | |
3945 + # PIC is the default on this platform | |
3946 + # Common symbols not allowed in MH_DYLIB files | |
3947 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' | |
3948 + ;; | |
3949 + *djgpp*) | |
3950 + # DJGPP does not support shared libraries at all | |
3951 + _LT_TAGVAR(lt_prog_compiler_pic, $1)= | |
3952 + ;; | |
3953 + haiku*) | |
3954 + # PIC is the default for Haiku. | |
3955 + # The "-static" flag exists, but is broken. | |
3956 + _LT_TAGVAR(lt_prog_compiler_static, $1)= | |
3957 + ;; | |
3958 + interix[[3-9]]*) | |
3959 + # Interix 3.x gcc -fpic/-fPIC options generate broken code. | |
3960 + # Instead, we relocate shared libraries at runtime. | |
3961 + ;; | |
3962 + sysv4*MP*) | |
3963 + if test -d /usr/nec; then | |
3964 + _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic | |
3965 + fi | |
3966 + ;; | |
3967 + hpux*) | |
3968 + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit | |
3969 + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag | |
3970 + # sets the default TLS model and affects inlining. | |
3971 + case $host_cpu in | |
3972 + hppa*64*) | |
3973 + ;; | |
3974 + *) | |
3975 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' | |
3976 + ;; | |
3977 + esac | |
3978 + ;; | |
3979 + *qnx* | *nto*) | |
3980 + # QNX uses GNU C++, but need to define -shared option too, otherwise | |
3981 + # it will coredump. | |
3982 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' | |
3983 + ;; | |
3984 + *) | |
3985 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' | |
3986 + ;; | |
3987 + esac | |
3988 + else | |
3989 + case $host_os in | |
3990 + aix[[4-9]]*) | |
3991 + # All AIX code is PIC. | |
3992 + if test "$host_cpu" = ia64; then | |
3993 + # AIX 5 now supports IA64 processor | |
3994 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
3995 + else | |
3996 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' | |
3997 + fi | |
3998 + ;; | |
3999 + chorus*) | |
4000 + case $cc_basename in | |
4001 + cxch68*) | |
4002 + # Green Hills C++ Compiler | |
4003 + # _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" | |
4004 + ;; | |
4005 + esac | |
4006 + ;; | |
4007 + mingw* | cygwin* | os2* | pw32* | cegcc*) | |
4008 + # This hack is so that the source file can tell whether it is being | |
4009 + # built for inclusion in a dll (and should export symbols for example). | |
4010 + m4_if([$1], [GCJ], [], | |
4011 + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) | |
4012 + ;; | |
4013 + dgux*) | |
4014 + case $cc_basename in | |
4015 + ec++*) | |
4016 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | |
4017 + ;; | |
4018 + ghcx*) | |
4019 + # Green Hills C++ Compiler | |
4020 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' | |
4021 + ;; | |
4022 + *) | |
4023 + ;; | |
4024 + esac | |
4025 + ;; | |
4026 + freebsd* | dragonfly*) | |
4027 + # FreeBSD uses GNU C++ | |
4028 + ;; | |
4029 + hpux9* | hpux10* | hpux11*) | |
4030 + case $cc_basename in | |
4031 + CC*) | |
4032 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
4033 + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' | |
4034 + if test "$host_cpu" != ia64; then | |
4035 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' | |
4036 + fi | |
4037 + ;; | |
4038 + aCC*) | |
4039 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
4040 + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' | |
4041 + case $host_cpu in | |
4042 + hppa*64*|ia64*) | |
4043 + # +Z the default | |
4044 + ;; | |
4045 + *) | |
4046 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' | |
4047 + ;; | |
4048 + esac | |
4049 + ;; | |
4050 + *) | |
4051 + ;; | |
4052 + esac | |
4053 + ;; | |
4054 + interix*) | |
4055 + # This is c89, which is MS Visual C++ (no shared libs) | |
4056 + # Anyone wants to do a port? | |
4057 + ;; | |
4058 + irix5* | irix6* | nonstopux*) | |
4059 + case $cc_basename in | |
4060 + CC*) | |
4061 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
4062 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' | |
4063 + # CC pic flag -KPIC is the default. | |
4064 + ;; | |
4065 + *) | |
4066 + ;; | |
4067 + esac | |
4068 + ;; | |
4069 + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) | |
4070 + case $cc_basename in | |
4071 + KCC*) | |
4072 + # KAI C++ Compiler | |
4073 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' | |
4074 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' | |
4075 + ;; | |
4076 + ecpc* ) | |
4077 + # old Intel C++ for x86_64 which still supported -KPIC. | |
4078 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
4079 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | |
4080 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' | |
4081 + ;; | |
4082 + icpc* ) | |
4083 + # Intel C++, used to be incompatible with GCC. | |
4084 + # ICC 10 doesn't accept -KPIC any more. | |
4085 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
4086 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' | |
4087 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' | |
4088 + ;; | |
4089 + pgCC* | pgcpp*) | |
4090 + # Portland Group C++ compiler | |
4091 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
4092 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' | |
4093 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
4094 + ;; | |
4095 + cxx*) | |
4096 + # Compaq C++ | |
4097 + # Make sure the PIC flag is empty. It appears that all Alpha | |
4098 + # Linux and Compaq Tru64 Unix objects are PIC. | |
4099 + _LT_TAGVAR(lt_prog_compiler_pic, $1)= | |
4100 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' | |
4101 + ;; | |
4102 + xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) | |
4103 + # IBM XL 8.0, 9.0 on PPC and BlueGene | |
4104 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
4105 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' | |
4106 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' | |
4107 + ;; | |
4108 + *) | |
4109 + case `$CC -V 2>&1 | sed 5q` in | |
4110 + *Sun\ C*) | |
4111 + # Sun C++ 5.9 | |
4112 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | |
4113 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
4114 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' | |
4115 + ;; | |
4116 + esac | |
4117 + ;; | |
4118 + esac | |
4119 + ;; | |
4120 + lynxos*) | |
4121 + ;; | |
4122 + m88k*) | |
4123 + ;; | |
4124 + mvs*) | |
4125 + case $cc_basename in | |
4126 + cxx*) | |
4127 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' | |
4128 + ;; | |
4129 + *) | |
4130 + ;; | |
4131 + esac | |
4132 + ;; | |
4133 + netbsd* | netbsdelf*-gnu) | |
4134 + ;; | |
4135 + *qnx* | *nto*) | |
4136 + # QNX uses GNU C++, but need to define -shared option too, otherwise | |
4137 + # it will coredump. | |
4138 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' | |
4139 + ;; | |
4140 + osf3* | osf4* | osf5*) | |
4141 + case $cc_basename in | |
4142 + KCC*) | |
4143 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' | |
4144 + ;; | |
4145 + RCC*) | |
4146 + # Rational C++ 2.4.1 | |
4147 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' | |
4148 + ;; | |
4149 + cxx*) | |
4150 + # Digital/Compaq C++ | |
4151 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
4152 + # Make sure the PIC flag is empty. It appears that all Alpha | |
4153 + # Linux and Compaq Tru64 Unix objects are PIC. | |
4154 + _LT_TAGVAR(lt_prog_compiler_pic, $1)= | |
4155 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' | |
4156 + ;; | |
4157 + *) | |
4158 + ;; | |
4159 + esac | |
4160 + ;; | |
4161 + psos*) | |
4162 + ;; | |
4163 + solaris*) | |
4164 + case $cc_basename in | |
4165 + CC* | sunCC*) | |
4166 + # Sun C++ 4.2, 5.x and Centerline C++ | |
4167 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | |
4168 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
4169 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' | |
4170 + ;; | |
4171 + gcx*) | |
4172 + # Green Hills C++ Compiler | |
4173 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' | |
4174 + ;; | |
4175 + *) | |
4176 + ;; | |
4177 + esac | |
4178 + ;; | |
4179 + sunos4*) | |
4180 + case $cc_basename in | |
4181 + CC*) | |
4182 + # Sun C++ 4.x | |
4183 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' | |
4184 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
4185 + ;; | |
4186 + lcc*) | |
4187 + # Lucid | |
4188 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' | |
4189 + ;; | |
4190 + *) | |
4191 + ;; | |
4192 + esac | |
4193 + ;; | |
4194 + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) | |
4195 + case $cc_basename in | |
4196 + CC*) | |
4197 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
4198 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | |
4199 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
4200 + ;; | |
4201 + esac | |
4202 + ;; | |
4203 + tandem*) | |
4204 + case $cc_basename in | |
4205 + NCC*) | |
4206 + # NonStop-UX NCC 3.20 | |
4207 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | |
4208 + ;; | |
4209 + *) | |
4210 + ;; | |
4211 + esac | |
4212 + ;; | |
4213 + vxworks*) | |
4214 + ;; | |
4215 + *) | |
4216 + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no | |
4217 + ;; | |
4218 + esac | |
4219 + fi | |
4220 +], | |
4221 +[ | |
4222 + if test "$GCC" = yes; then | |
4223 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
4224 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' | |
4225 + | |
4226 + case $host_os in | |
4227 + aix*) | |
4228 + # All AIX code is PIC. | |
4229 + if test "$host_cpu" = ia64; then | |
4230 + # AIX 5 now supports IA64 processor | |
4231 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
4232 + fi | |
4233 + ;; | |
4234 + | |
4235 + amigaos*) | |
4236 + case $host_cpu in | |
4237 + powerpc) | |
4238 + # see comment about AmigaOS4 .so support | |
4239 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' | |
4240 + ;; | |
4241 + m68k) | |
4242 + # FIXME: we need at least 68020 code to build shared libraries, but | |
4243 + # adding the `-m68020' flag to GCC prevents building anything better, | |
4244 + # like `-m68040'. | |
4245 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' | |
4246 + ;; | |
4247 + esac | |
4248 + ;; | |
4249 + | |
4250 + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) | |
4251 + # PIC is the default for these OSes. | |
4252 + ;; | |
4253 + | |
4254 + mingw* | cygwin* | pw32* | os2* | cegcc*) | |
4255 + # This hack is so that the source file can tell whether it is being | |
4256 + # built for inclusion in a dll (and should export symbols for example). | |
4257 + # Although the cygwin gcc ignores -fPIC, still need this for old-style | |
4258 + # (--disable-auto-import) libraries | |
4259 + m4_if([$1], [GCJ], [], | |
4260 + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) | |
4261 + ;; | |
4262 + | |
4263 + darwin* | rhapsody*) | |
4264 + # PIC is the default on this platform | |
4265 + # Common symbols not allowed in MH_DYLIB files | |
4266 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' | |
4267 + ;; | |
4268 + | |
4269 + haiku*) | |
4270 + # PIC is the default for Haiku. | |
4271 + # The "-static" flag exists, but is broken. | |
4272 + _LT_TAGVAR(lt_prog_compiler_static, $1)= | |
4273 + ;; | |
4274 + | |
4275 + hpux*) | |
4276 + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit | |
4277 + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag | |
4278 + # sets the default TLS model and affects inlining. | |
4279 + case $host_cpu in | |
4280 + hppa*64*) | |
4281 + # +Z the default | |
4282 + ;; | |
4283 + *) | |
4284 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' | |
4285 + ;; | |
4286 + esac | |
4287 + ;; | |
4288 + | |
4289 + interix[[3-9]]*) | |
4290 + # Interix 3.x gcc -fpic/-fPIC options generate broken code. | |
4291 + # Instead, we relocate shared libraries at runtime. | |
4292 + ;; | |
4293 + | |
4294 + msdosdjgpp*) | |
4295 + # Just because we use GCC doesn't mean we suddenly get shared libraries | |
4296 + # on systems that don't support them. | |
4297 + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no | |
4298 + enable_shared=no | |
4299 + ;; | |
4300 + | |
4301 + *nto* | *qnx*) | |
4302 + # QNX uses GNU C++, but need to define -shared option too, otherwise | |
4303 + # it will coredump. | |
4304 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' | |
4305 + ;; | |
4306 + | |
4307 + sysv4*MP*) | |
4308 + if test -d /usr/nec; then | |
4309 + _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic | |
4310 + fi | |
4311 + ;; | |
4312 + | |
4313 + *) | |
4314 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' | |
4315 + ;; | |
4316 + esac | |
4317 + | |
4318 + case $cc_basename in | |
4319 + nvcc*) # Cuda Compiler Driver 2.2 | |
4320 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' | |
4321 + if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then | |
4322 + _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" | |
4323 + fi | |
4324 + ;; | |
4325 + esac | |
4326 + else | |
4327 + # PORTME Check for flag to pass linker flags through the system compiler. | |
4328 + case $host_os in | |
4329 + aix*) | |
4330 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
4331 + if test "$host_cpu" = ia64; then | |
4332 + # AIX 5 now supports IA64 processor | |
4333 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
4334 + else | |
4335 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' | |
4336 + fi | |
4337 + ;; | |
4338 + | |
4339 + mingw* | cygwin* | pw32* | os2* | cegcc*) | |
4340 + # This hack is so that the source file can tell whether it is being | |
4341 + # built for inclusion in a dll (and should export symbols for example). | |
4342 + m4_if([$1], [GCJ], [], | |
4343 + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) | |
4344 + ;; | |
4345 + | |
4346 + hpux9* | hpux10* | hpux11*) | |
4347 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
4348 + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but | |
4349 + # not for PA HP-UX. | |
4350 + case $host_cpu in | |
4351 + hppa*64*|ia64*) | |
4352 + # +Z the default | |
4353 + ;; | |
4354 + *) | |
4355 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' | |
4356 + ;; | |
4357 + esac | |
4358 + # Is there a better lt_prog_compiler_static that works with the bundled CC? | |
4359 + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' | |
4360 + ;; | |
4361 + | |
4362 + irix5* | irix6* | nonstopux*) | |
4363 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
4364 + # PIC (with -KPIC) is the default. | |
4365 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' | |
4366 + ;; | |
4367 + | |
4368 + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) | |
4369 + case $cc_basename in | |
4370 + # old Intel for x86_64 which still supported -KPIC. | |
4371 + ecc*) | |
4372 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
4373 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | |
4374 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' | |
4375 + ;; | |
4376 + # icc used to be incompatible with GCC. | |
4377 + # ICC 10 doesn't accept -KPIC any more. | |
4378 + icc* | ifort*) | |
4379 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
4380 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' | |
4381 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' | |
4382 + ;; | |
4383 + # Lahey Fortran 8.1. | |
4384 + lf95*) | |
4385 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
4386 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' | |
4387 + _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' | |
4388 + ;; | |
4389 + nagfor*) | |
4390 + # NAG Fortran compiler | |
4391 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' | |
4392 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' | |
4393 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
4394 + ;; | |
4395 + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) | |
4396 + # Portland Group compilers (*not* the Pentium gcc compiler, | |
4397 + # which looks to be a dead project) | |
4398 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
4399 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' | |
4400 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
4401 + ;; | |
4402 + ccc*) | |
4403 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
4404 + # All Alpha code is PIC. | |
4405 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' | |
4406 + ;; | |
4407 + xl* | bgxl* | bgf* | mpixl*) | |
4408 + # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene | |
4409 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
4410 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' | |
4411 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' | |
4412 + ;; | |
4413 + *) | |
4414 + case `$CC -V 2>&1 | sed 5q` in | |
4415 + *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) | |
4416 + # Sun Fortran 8.3 passes all unrecognized flags to the linker | |
4417 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | |
4418 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
4419 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='' | |
4420 + ;; | |
4421 + *Sun\ F* | *Sun*Fortran*) | |
4422 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | |
4423 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
4424 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' | |
4425 + ;; | |
4426 + *Sun\ C*) | |
4427 + # Sun C 5.9 | |
4428 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | |
4429 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
4430 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
4431 + ;; | |
4432 + *Intel*\ [[CF]]*Compiler*) | |
4433 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
4434 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' | |
4435 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' | |
4436 + ;; | |
4437 + *Portland\ Group*) | |
4438 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
4439 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' | |
4440 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
4441 + ;; | |
4442 + esac | |
4443 + ;; | |
4444 + esac | |
4445 + ;; | |
4446 + | |
4447 + newsos6) | |
4448 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | |
4449 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
4450 + ;; | |
4451 + | |
4452 + *nto* | *qnx*) | |
4453 + # QNX uses GNU C++, but need to define -shared option too, otherwise | |
4454 + # it will coredump. | |
4455 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' | |
4456 + ;; | |
4457 + | |
4458 + osf3* | osf4* | osf5*) | |
4459 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
4460 + # All OSF/1 code is PIC. | |
4461 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' | |
4462 + ;; | |
4463 + | |
4464 + rdos*) | |
4465 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' | |
4466 + ;; | |
4467 + | |
4468 + solaris*) | |
4469 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | |
4470 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
4471 + case $cc_basename in | |
4472 + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) | |
4473 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; | |
4474 + *) | |
4475 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; | |
4476 + esac | |
4477 + ;; | |
4478 + | |
4479 + sunos4*) | |
4480 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' | |
4481 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' | |
4482 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
4483 + ;; | |
4484 + | |
4485 + sysv4 | sysv4.2uw2* | sysv4.3*) | |
4486 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
4487 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | |
4488 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
4489 + ;; | |
4490 + | |
4491 + sysv4*MP*) | |
4492 + if test -d /usr/nec ;then | |
4493 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' | |
4494 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
4495 + fi | |
4496 + ;; | |
4497 + | |
4498 + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) | |
4499 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
4500 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | |
4501 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
4502 + ;; | |
4503 + | |
4504 + unicos*) | |
4505 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | |
4506 + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no | |
4507 + ;; | |
4508 + | |
4509 + uts4*) | |
4510 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' | |
4511 + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | |
4512 + ;; | |
4513 + | |
4514 + *) | |
4515 + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no | |
4516 + ;; | |
4517 + esac | |
4518 + fi | |
4519 +]) | |
4520 +case $host_os in | |
4521 + # For platforms which do not support PIC, -DPIC is meaningless: | |
4522 + *djgpp*) | |
4523 + _LT_TAGVAR(lt_prog_compiler_pic, $1)= | |
4524 + ;; | |
4525 + *) | |
4526 + _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" | |
4527 + ;; | |
4528 +esac | |
4529 + | |
4530 +AC_CACHE_CHECK([for $compiler option to produce PIC], | |
4531 + [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], | |
4532 + [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) | |
4533 +_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) | |
4534 + | |
4535 +# | |
4536 +# Check to make sure the PIC flag actually works. | |
4537 +# | |
4538 +if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then | |
4539 + _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], | |
4540 + [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], | |
4541 + [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], | |
4542 + [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in | |
4543 + "" | " "*) ;; | |
4544 + *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; | |
4545 + esac], | |
4546 + [_LT_TAGVAR(lt_prog_compiler_pic, $1)= | |
4547 + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) | |
4548 +fi | |
4549 +_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], | |
4550 + [Additional compiler flags for building library objects]) | |
4551 + | |
4552 +_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], | |
4553 + [How to pass a linker flag through the compiler]) | |
4554 +# | |
4555 +# Check to make sure the static flag actually works. | |
4556 +# | |
4557 +wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" | |
4558 +_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], | |
4559 + _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), | |
4560 + $lt_tmp_static_flag, | |
4561 + [], | |
4562 + [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) | |
4563 +_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], | |
4564 + [Compiler flag to prevent dynamic linking]) | |
4565 +])# _LT_COMPILER_PIC | |
4566 + | |
4567 + | |
4568 +# _LT_LINKER_SHLIBS([TAGNAME]) | |
4569 +# ---------------------------- | |
4570 +# See if the linker supports building shared libraries. | |
4571 +m4_defun([_LT_LINKER_SHLIBS], | |
4572 +[AC_REQUIRE([LT_PATH_LD])dnl | |
4573 +AC_REQUIRE([LT_PATH_NM])dnl | |
4574 +m4_require([_LT_PATH_MANIFEST_TOOL])dnl | |
4575 +m4_require([_LT_FILEUTILS_DEFAULTS])dnl | |
4576 +m4_require([_LT_DECL_EGREP])dnl | |
4577 +m4_require([_LT_DECL_SED])dnl | |
4578 +m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl | |
4579 +m4_require([_LT_TAG_COMPILER])dnl | |
4580 +AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) | |
4581 +m4_if([$1], [CXX], [ | |
4582 + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' | |
4583 + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] | |
4584 + case $host_os in | |
4585 + aix[[4-9]]*) | |
4586 + # If we're using GNU nm, then we don't want the "-C" option. | |
4587 + # -C means demangle to AIX nm, but means don't demangle with GNU nm | |
4588 + # Also, AIX nm treats weak defined symbols like other global defined | |
4589 + # symbols, whereas GNU nm marks them as "W". | |
4590 + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then | |
4591 + _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' | |
4592 + else | |
4593 + _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' | |
4594 + fi | |
4595 + ;; | |
4596 + pw32*) | |
4597 + _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" | |
4598 + ;; | |
4599 + cygwin* | mingw* | cegcc*) | |
4600 + case $cc_basename in | |
4601 + cl*) | |
4602 + _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' | |
4603 + ;; | |
4604 + *) | |
4605 + _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' | |
4606 + _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] | |
4607 + ;; | |
4608 + esac | |
4609 + ;; | |
4610 + linux* | k*bsd*-gnu | gnu*) | |
4611 + _LT_TAGVAR(link_all_deplibs, $1)=no | |
4612 + ;; | |
4613 + *) | |
4614 + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' | |
4615 + ;; | |
4616 + esac | |
4617 +], [ | |
4618 + runpath_var= | |
4619 + _LT_TAGVAR(allow_undefined_flag, $1)= | |
4620 + _LT_TAGVAR(always_export_symbols, $1)=no | |
4621 + _LT_TAGVAR(archive_cmds, $1)= | |
4622 + _LT_TAGVAR(archive_expsym_cmds, $1)= | |
4623 + _LT_TAGVAR(compiler_needs_object, $1)=no | |
4624 + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no | |
4625 + _LT_TAGVAR(export_dynamic_flag_spec, $1)= | |
4626 + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' | |
4627 + _LT_TAGVAR(hardcode_automatic, $1)=no | |
4628 + _LT_TAGVAR(hardcode_direct, $1)=no | |
4629 + _LT_TAGVAR(hardcode_direct_absolute, $1)=no | |
4630 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= | |
4631 + _LT_TAGVAR(hardcode_libdir_separator, $1)= | |
4632 + _LT_TAGVAR(hardcode_minus_L, $1)=no | |
4633 + _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported | |
4634 + _LT_TAGVAR(inherit_rpath, $1)=no | |
4635 + _LT_TAGVAR(link_all_deplibs, $1)=unknown | |
4636 + _LT_TAGVAR(module_cmds, $1)= | |
4637 + _LT_TAGVAR(module_expsym_cmds, $1)= | |
4638 + _LT_TAGVAR(old_archive_from_new_cmds, $1)= | |
4639 + _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= | |
4640 + _LT_TAGVAR(thread_safe_flag_spec, $1)= | |
4641 + _LT_TAGVAR(whole_archive_flag_spec, $1)= | |
4642 + # include_expsyms should be a list of space-separated symbols to be *always* | |
4643 + # included in the symbol list | |
4644 + _LT_TAGVAR(include_expsyms, $1)= | |
4645 + # exclude_expsyms can be an extended regexp of symbols to exclude | |
4646 + # it will be wrapped by ` (' and `)$', so one must not match beginning or | |
4647 + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', | |
4648 + # as well as any symbol that contains `d'. | |
4649 + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] | |
4650 + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out | |
4651 + # platforms (ab)use it in PIC code, but their linkers get confused if | |
4652 + # the symbol is explicitly referenced. Since portable code cannot | |
4653 + # rely on this symbol name, it's probably fine to never include it in | |
4654 + # preloaded symbol tables. | |
4655 + # Exclude shared library initialization/finalization symbols. | |
4656 +dnl Note also adjust exclude_expsyms for C++ above. | |
4657 + extract_expsyms_cmds= | |
4658 + | |
4659 + case $host_os in | |
4660 + cygwin* | mingw* | pw32* | cegcc*) | |
4661 + # FIXME: the MSVC++ port hasn't been tested in a loooong time | |
4662 + # When not using gcc, we currently assume that we are using | |
4663 + # Microsoft Visual C++. | |
4664 + if test "$GCC" != yes; then | |
4665 + with_gnu_ld=no | |
4666 + fi | |
4667 + ;; | |
4668 + interix*) | |
4669 + # we just hope/assume this is gcc and not c89 (= MSVC++) | |
4670 + with_gnu_ld=yes | |
4671 + ;; | |
4672 + openbsd*) | |
4673 + with_gnu_ld=no | |
4674 + ;; | |
4675 + linux* | k*bsd*-gnu | gnu*) | |
4676 + _LT_TAGVAR(link_all_deplibs, $1)=no | |
4677 + ;; | |
4678 + esac | |
4679 + | |
4680 + _LT_TAGVAR(ld_shlibs, $1)=yes | |
4681 + | |
4682 + # On some targets, GNU ld is compatible enough with the native linker | |
4683 + # that we're better off using the native interface for both. | |
4684 + lt_use_gnu_ld_interface=no | |
4685 + if test "$with_gnu_ld" = yes; then | |
4686 + case $host_os in | |
4687 + aix*) | |
4688 + # The AIX port of GNU ld has always aspired to compatibility | |
4689 + # with the native linker. However, as the warning in the GNU ld | |
4690 + # block says, versions before 2.19.5* couldn't really create working | |
4691 + # shared libraries, regardless of the interface used. | |
4692 + case `$LD -v 2>&1` in | |
4693 + *\ \(GNU\ Binutils\)\ 2.19.5*) ;; | |
4694 + *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; | |
4695 + *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; | |
4696 + *) | |
4697 + lt_use_gnu_ld_interface=yes | |
4698 + ;; | |
4699 + esac | |
4700 + ;; | |
4701 + *) | |
4702 + lt_use_gnu_ld_interface=yes | |
4703 + ;; | |
4704 + esac | |
4705 + fi | |
4706 + | |
4707 + if test "$lt_use_gnu_ld_interface" = yes; then | |
4708 + # If archive_cmds runs LD, not CC, wlarc should be empty | |
4709 + wlarc='${wl}' | |
4710 + | |
4711 + # Set some defaults for GNU ld with shared library support. These | |
4712 + # are reset later if shared libraries are not supported. Putting them | |
4713 + # here allows them to be overridden if necessary. | |
4714 + runpath_var=LD_RUN_PATH | |
4715 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' | |
4716 + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' | |
4717 + # ancient GNU ld didn't support --whole-archive et. al. | |
4718 + if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then | |
4719 + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' | |
4720 + else | |
4721 + _LT_TAGVAR(whole_archive_flag_spec, $1)= | |
4722 + fi | |
4723 + supports_anon_versioning=no | |
4724 + case `$LD -v 2>&1` in | |
4725 + *GNU\ gold*) supports_anon_versioning=yes ;; | |
4726 + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 | |
4727 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... | |
4728 + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... | |
4729 + *\ 2.11.*) ;; # other 2.11 versions | |
4730 + *) supports_anon_versioning=yes ;; | |
4731 + esac | |
4732 + | |
4733 + # See if GNU ld supports shared libraries. | |
4734 + case $host_os in | |
4735 + aix[[3-9]]*) | |
4736 + # On AIX/PPC, the GNU linker is very broken | |
4737 + if test "$host_cpu" != ia64; then | |
4738 + _LT_TAGVAR(ld_shlibs, $1)=no | |
4739 + cat <<_LT_EOF 1>&2 | |
4740 + | |
4741 +*** Warning: the GNU linker, at least up to release 2.19, is reported | |
4742 +*** to be unable to reliably create shared libraries on AIX. | |
4743 +*** Therefore, libtool is disabling shared libraries support. If you | |
4744 +*** really care for shared libraries, you may want to install binutils | |
4745 +*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. | |
4746 +*** You will then need to restart the configuration process. | |
4747 + | |
4748 +_LT_EOF | |
4749 + fi | |
4750 + ;; | |
4751 + | |
4752 + amigaos*) | |
4753 + case $host_cpu in | |
4754 + powerpc) | |
4755 + # see comment about AmigaOS4 .so support | |
4756 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
4757 + _LT_TAGVAR(archive_expsym_cmds, $1)='' | |
4758 + ;; | |
4759 + m68k) | |
4760 + _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)' | |
4761 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | |
4762 + _LT_TAGVAR(hardcode_minus_L, $1)=yes | |
4763 + ;; | |
4764 + esac | |
4765 + ;; | |
4766 + | |
4767 + beos*) | |
4768 + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then | |
4769 + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported | |
4770 + # Joseph Beckenbach <jrb3@best.com> says some releases of gcc | |
4771 + # support --undefined. This deserves some investigation. FIXME | |
4772 + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
4773 + else | |
4774 + _LT_TAGVAR(ld_shlibs, $1)=no | |
4775 + fi | |
4776 + ;; | |
4777 + | |
4778 + cygwin* | mingw* | pw32* | cegcc*) | |
4779 + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, | |
4780 + # as there is no search path for DLLs. | |
4781 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | |
4782 + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' | |
4783 + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported | |
4784 + _LT_TAGVAR(always_export_symbols, $1)=no | |
4785 + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes | |
4786 + _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' | |
4787 + _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] | |
4788 + | |
4789 + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then | |
4790 + _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' | |
4791 + # If the export-symbols file already is a .def file (1st line | |
4792 + # is EXPORTS), use it as is; otherwise, prepend... | |
4793 + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then | |
4794 + cp $export_symbols $output_objdir/$soname.def; | |
4795 + else | |
4796 + echo EXPORTS > $output_objdir/$soname.def; | |
4797 + cat $export_symbols >> $output_objdir/$soname.def; | |
4798 + fi~ | |
4799 + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' | |
4800 + else | |
4801 + _LT_TAGVAR(ld_shlibs, $1)=no | |
4802 + fi | |
4803 + ;; | |
4804 + | |
4805 + haiku*) | |
4806 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
4807 + _LT_TAGVAR(link_all_deplibs, $1)=yes | |
4808 + ;; | |
4809 + | |
4810 + interix[[3-9]]*) | |
4811 + _LT_TAGVAR(hardcode_direct, $1)=no | |
4812 + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | |
4813 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' | |
4814 + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' | |
4815 + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. | |
4816 + # Instead, shared libraries are loaded at an image base (0x10000000 by | |
4817 + # default) and relocated if they conflict, which is a slow very memory | |
4818 + # consuming and fragmenting process. To avoid this, we pick a random, | |
4819 + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link | |
4820 + # time. Moving up from 0x10000000 also allows more sbrk(2) space. | |
4821 + _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' | |
4822 + _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' | |
4823 + ;; | |
4824 + | |
4825 + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) | |
4826 + tmp_diet=no | |
4827 + if test "$host_os" = linux-dietlibc; then | |
4828 + case $cc_basename in | |
4829 + diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) | |
4830 + esac | |
4831 + fi | |
4832 + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ | |
4833 + && test "$tmp_diet" = no | |
4834 + then | |
4835 + tmp_addflag=' $pic_flag' | |
4836 + tmp_sharedflag='-shared' | |
4837 + case $cc_basename,$host_cpu in | |
4838 + pgcc*) # Portland Group C compiler | |
4839 + _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' | |
4840 + tmp_addflag=' $pic_flag' | |
4841 + ;; | |
4842 + pgf77* | pgf90* | pgf95* | pgfortran*) | |
4843 + # Portland Group f77 and f90 compilers | |
4844 + _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' | |
4845 + tmp_addflag=' $pic_flag -Mnomain' ;; | |
4846 + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 | |
4847 + tmp_addflag=' -i_dynamic' ;; | |
4848 + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 | |
4849 + tmp_addflag=' -i_dynamic -nofor_main' ;; | |
4850 + ifc* | ifort*) # Intel Fortran compiler | |
4851 + tmp_addflag=' -nofor_main' ;; | |
4852 + lf95*) # Lahey Fortran 8.1 | |
4853 + _LT_TAGVAR(whole_archive_flag_spec, $1)= | |
4854 + tmp_sharedflag='--shared' ;; | |
4855 + xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) | |
4856 + tmp_sharedflag='-qmkshrobj' | |
4857 + tmp_addflag= ;; | |
4858 + nvcc*) # Cuda Compiler Driver 2.2 | |
4859 + _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' | |
4860 + _LT_TAGVAR(compiler_needs_object, $1)=yes | |
4861 + ;; | |
4862 + esac | |
4863 + case `$CC -V 2>&1 | sed 5q` in | |
4864 + *Sun\ C*) # Sun C 5.9 | |
4865 + _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' | |
4866 + _LT_TAGVAR(compiler_needs_object, $1)=yes | |
4867 + tmp_sharedflag='-G' ;; | |
4868 + *Sun\ F*) # Sun Fortran 8.3 | |
4869 + tmp_sharedflag='-G' ;; | |
4870 + esac | |
4871 + _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
4872 + | |
4873 + if test "x$supports_anon_versioning" = xyes; then | |
4874 + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ | |
4875 + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ | |
4876 + echo "local: *; };" >> $output_objdir/$libname.ver~ | |
4877 + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' | |
4878 + fi | |
4879 + | |
4880 + case $cc_basename in | |
4881 + xlf* | bgf* | bgxlf* | mpixlf*) | |
4882 + # IBM XL Fortran 10.1 on PPC cannot create shared libs itself | |
4883 + _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' | |
4884 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' | |
4885 + _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' | |
4886 + if test "x$supports_anon_versioning" = xyes; then | |
4887 + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ | |
4888 + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ | |
4889 + echo "local: *; };" >> $output_objdir/$libname.ver~ | |
4890 + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' | |
4891 + fi | |
4892 + ;; | |
4893 + esac | |
4894 + else | |
4895 + _LT_TAGVAR(ld_shlibs, $1)=no | |
4896 + fi | |
4897 + ;; | |
4898 + | |
4899 + netbsd* | netbsdelf*-gnu) | |
4900 + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then | |
4901 + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' | |
4902 + wlarc= | |
4903 + else | |
4904 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
4905 + _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' | |
4906 + fi | |
4907 + ;; | |
4908 + | |
4909 + solaris*) | |
4910 + if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then | |
4911 + _LT_TAGVAR(ld_shlibs, $1)=no | |
4912 + cat <<_LT_EOF 1>&2 | |
4913 + | |
4914 +*** Warning: The releases 2.8.* of the GNU linker cannot reliably | |
4915 +*** create shared libraries on Solaris systems. Therefore, libtool | |
4916 +*** is disabling shared libraries support. We urge you to upgrade GNU | |
4917 +*** binutils to release 2.9.1 or newer. Another option is to modify | |
4918 +*** your PATH or compiler configuration so that the native linker is | |
4919 +*** used, and then restart. | |
4920 + | |
4921 +_LT_EOF | |
4922 + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then | |
4923 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
4924 + _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' | |
4925 + else | |
4926 + _LT_TAGVAR(ld_shlibs, $1)=no | |
4927 + fi | |
4928 + ;; | |
4929 + | |
4930 + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) | |
4931 + case `$LD -v 2>&1` in | |
4932 + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) | |
4933 + _LT_TAGVAR(ld_shlibs, $1)=no | |
4934 + cat <<_LT_EOF 1>&2 | |
4935 + | |
4936 +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not | |
4937 +*** reliably create shared libraries on SCO systems. Therefore, libtool | |
4938 +*** is disabling shared libraries support. We urge you to upgrade GNU | |
4939 +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify | |
4940 +*** your PATH or compiler configuration so that the native linker is | |
4941 +*** used, and then restart. | |
4942 + | |
4943 +_LT_EOF | |
4944 + ;; | |
4945 + *) | |
4946 + # For security reasons, it is highly recommended that you always | |
4947 + # use absolute paths for naming shared libraries, and exclude the | |
4948 + # DT_RUNPATH tag from executables and libraries. But doing so | |
4949 + # requires that you compile everything twice, which is a pain. | |
4950 + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then | |
4951 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' | |
4952 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
4953 + _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' | |
4954 + else | |
4955 + _LT_TAGVAR(ld_shlibs, $1)=no | |
4956 + fi | |
4957 + ;; | |
4958 + esac | |
4959 + ;; | |
4960 + | |
4961 + sunos4*) | |
4962 + _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' | |
4963 + wlarc= | |
4964 + _LT_TAGVAR(hardcode_direct, $1)=yes | |
4965 + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | |
4966 + ;; | |
4967 + | |
4968 + *) | |
4969 + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then | |
4970 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
4971 + _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' | |
4972 + else | |
4973 + _LT_TAGVAR(ld_shlibs, $1)=no | |
4974 + fi | |
4975 + ;; | |
4976 + esac | |
4977 + | |
4978 + if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then | |
4979 + runpath_var= | |
4980 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= | |
4981 + _LT_TAGVAR(export_dynamic_flag_spec, $1)= | |
4982 + _LT_TAGVAR(whole_archive_flag_spec, $1)= | |
4983 + fi | |
4984 + else | |
4985 + # PORTME fill in a description of your system's linker (not GNU ld) | |
4986 + case $host_os in | |
4987 + aix3*) | |
4988 + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported | |
4989 + _LT_TAGVAR(always_export_symbols, $1)=yes | |
4990 + _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' | |
4991 + # Note: this linker hardcodes the directories in LIBPATH if there | |
4992 + # are no directories specified by -L. | |
4993 + _LT_TAGVAR(hardcode_minus_L, $1)=yes | |
4994 + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then | |
4995 + # Neither direct hardcoding nor static linking is supported with a | |
4996 + # broken collect2. | |
4997 + _LT_TAGVAR(hardcode_direct, $1)=unsupported | |
4998 + fi | |
4999 + ;; | |
5000 + | |
5001 + aix[[4-9]]*) | |
5002 + if test "$host_cpu" = ia64; then | |
5003 + # On IA64, the linker does run time linking by default, so we don't | |
5004 + # have to do anything special. | |
5005 + aix_use_runtimelinking=no | |
5006 + exp_sym_flag='-Bexport' | |
5007 + no_entry_flag="" | |
5008 + else | |
5009 + # If we're using GNU nm, then we don't want the "-C" option. | |
5010 + # -C means demangle to AIX nm, but means don't demangle with GNU nm | |
5011 + # Also, AIX nm treats weak defined symbols like other global | |
5012 + # defined symbols, whereas GNU nm marks them as "W". | |
5013 + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then | |
5014 + _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' | |
5015 + else | |
5016 + _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' | |
5017 + fi | |
5018 + aix_use_runtimelinking=no | |
5019 + | |
5020 + # Test if we are trying to use run time linking or normal | |
5021 + # AIX style linking. If -brtl is somewhere in LDFLAGS, we | |
5022 + # need to do runtime linking. | |
5023 + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) | |
5024 + for ld_flag in $LDFLAGS; do | |
5025 + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then | |
5026 + aix_use_runtimelinking=yes | |
5027 + break | |
5028 + fi | |
5029 + done | |
5030 + ;; | |
5031 + esac | |
5032 + | |
5033 + exp_sym_flag='-bexport' | |
5034 + no_entry_flag='-bnoentry' | |
5035 + fi | |
5036 + | |
5037 + # When large executables or shared objects are built, AIX ld can | |
5038 + # have problems creating the table of contents. If linking a library | |
5039 + # or program results in "error TOC overflow" add -mminimal-toc to | |
5040 + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not | |
5041 + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. | |
5042 + | |
5043 + _LT_TAGVAR(archive_cmds, $1)='' | |
5044 + _LT_TAGVAR(hardcode_direct, $1)=yes | |
5045 + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes | |
5046 + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' | |
5047 + _LT_TAGVAR(link_all_deplibs, $1)=yes | |
5048 + _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' | |
5049 + | |
5050 + if test "$GCC" = yes; then | |
5051 + case $host_os in aix4.[[012]]|aix4.[[012]].*) | |
5052 + # We only want to do this on AIX 4.2 and lower, the check | |
5053 + # below for broken collect2 doesn't work under 4.3+ | |
5054 + collect2name=`${CC} -print-prog-name=collect2` | |
5055 + if test -f "$collect2name" && | |
5056 + strings "$collect2name" | $GREP resolve_lib_name >/dev/null | |
5057 + then | |
5058 + # We have reworked collect2 | |
5059 + : | |
5060 + else | |
5061 + # We have old collect2 | |
5062 + _LT_TAGVAR(hardcode_direct, $1)=unsupported | |
5063 + # It fails to find uninstalled libraries when the uninstalled | |
5064 + # path is not listed in the libpath. Setting hardcode_minus_L | |
5065 + # to unsupported forces relinking | |
5066 + _LT_TAGVAR(hardcode_minus_L, $1)=yes | |
5067 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | |
5068 + _LT_TAGVAR(hardcode_libdir_separator, $1)= | |
5069 + fi | |
5070 + ;; | |
5071 + esac | |
5072 + shared_flag='-shared' | |
5073 + if test "$aix_use_runtimelinking" = yes; then | |
5074 + shared_flag="$shared_flag "'${wl}-G' | |
5075 + fi | |
5076 + _LT_TAGVAR(link_all_deplibs, $1)=no | |
5077 + else | |
5078 + # not using gcc | |
5079 + if test "$host_cpu" = ia64; then | |
5080 + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release | |
5081 + # chokes on -Wl,-G. The following line is correct: | |
5082 + shared_flag='-G' | |
5083 + else | |
5084 + if test "$aix_use_runtimelinking" = yes; then | |
5085 + shared_flag='${wl}-G' | |
5086 + else | |
5087 + shared_flag='${wl}-bM:SRE' | |
5088 + fi | |
5089 + fi | |
5090 + fi | |
5091 + | |
5092 + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' | |
5093 + # It seems that -bexpall does not export symbols beginning with | |
5094 + # underscore (_), so it is better to generate a list of symbols to export. | |
5095 + _LT_TAGVAR(always_export_symbols, $1)=yes | |
5096 + if test "$aix_use_runtimelinking" = yes; then | |
5097 + # Warning - without using the other runtime loading flags (-brtl), | |
5098 + # -berok will link without error, but may produce a broken library. | |
5099 + _LT_TAGVAR(allow_undefined_flag, $1)='-berok' | |
5100 + # Determine the default libpath from the value encoded in an | |
5101 + # empty executable. | |
5102 + _LT_SYS_MODULE_PATH_AIX([$1]) | |
5103 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" | |
5104 + _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" | |
5105 + else | |
5106 + if test "$host_cpu" = ia64; then | |
5107 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' | |
5108 + _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" | |
5109 + _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" | |
5110 + else | |
5111 + # Determine the default libpath from the value encoded in an | |
5112 + # empty executable. | |
5113 + _LT_SYS_MODULE_PATH_AIX([$1]) | |
5114 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" | |
5115 + # Warning - without using the other run time loading flags, | |
5116 + # -berok will link without error, but may produce a broken library. | |
5117 + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' | |
5118 + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' | |
5119 + if test "$with_gnu_ld" = yes; then | |
5120 + # We only use this code for GNU lds that support --whole-archive. | |
5121 + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' | |
5122 + else | |
5123 + # Exported symbols can be pulled into shared objects from archives | |
5124 + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' | |
5125 + fi | |
5126 + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes | |
5127 + # This is similar to how AIX traditionally builds its shared libraries. | |
5128 + _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' | |
5129 + fi | |
5130 + fi | |
5131 + ;; | |
5132 + | |
5133 + amigaos*) | |
5134 + case $host_cpu in | |
5135 + powerpc) | |
5136 + # see comment about AmigaOS4 .so support | |
5137 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
5138 + _LT_TAGVAR(archive_expsym_cmds, $1)='' | |
5139 + ;; | |
5140 + m68k) | |
5141 + _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)' | |
5142 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | |
5143 + _LT_TAGVAR(hardcode_minus_L, $1)=yes | |
5144 + ;; | |
5145 + esac | |
5146 + ;; | |
5147 + | |
5148 + bsdi[[45]]*) | |
5149 + _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic | |
5150 + ;; | |
5151 + | |
5152 + cygwin* | mingw* | pw32* | cegcc*) | |
5153 + # When not using gcc, we currently assume that we are using | |
5154 + # Microsoft Visual C++. | |
5155 + # hardcode_libdir_flag_spec is actually meaningless, as there is | |
5156 + # no search path for DLLs. | |
5157 + case $cc_basename in | |
5158 + cl*) | |
5159 + # Native MSVC | |
5160 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' | |
5161 + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported | |
5162 + _LT_TAGVAR(always_export_symbols, $1)=yes | |
5163 + _LT_TAGVAR(file_list_spec, $1)='@' | |
5164 + # Tell ltmain to make .lib files, not .a files. | |
5165 + libext=lib | |
5166 + # Tell ltmain to make .dll files, not .so files. | |
5167 + shrext_cmds=".dll" | |
5168 + # FIXME: Setting linknames here is a bad hack. | |
5169 + _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' | |
5170 + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then | |
5171 + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; | |
5172 + else | |
5173 + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; | |
5174 + fi~ | |
5175 + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ | |
5176 + linknames=' | |
5177 + # The linker will not automatically build a static lib if we build a DLL. | |
5178 + # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' | |
5179 + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes | |
5180 + _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' | |
5181 + _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' | |
5182 + # Don't use ranlib | |
5183 + _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' | |
5184 + _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ | |
5185 + lt_tool_outputfile="@TOOL_OUTPUT@"~ | |
5186 + case $lt_outputfile in | |
5187 + *.exe|*.EXE) ;; | |
5188 + *) | |
5189 + lt_outputfile="$lt_outputfile.exe" | |
5190 + lt_tool_outputfile="$lt_tool_outputfile.exe" | |
5191 + ;; | |
5192 + esac~ | |
5193 + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then | |
5194 + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; | |
5195 + $RM "$lt_outputfile.manifest"; | |
5196 + fi' | |
5197 + ;; | |
5198 + *) | |
5199 + # Assume MSVC wrapper | |
5200 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' | |
5201 + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported | |
5202 + # Tell ltmain to make .lib files, not .a files. | |
5203 + libext=lib | |
5204 + # Tell ltmain to make .dll files, not .so files. | |
5205 + shrext_cmds=".dll" | |
5206 + # FIXME: Setting linknames here is a bad hack. | |
5207 + _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' | |
5208 + # The linker will automatically build a .lib file if we build a DLL. | |
5209 + _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' | |
5210 + # FIXME: Should let the user specify the lib program. | |
5211 + _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' | |
5212 + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes | |
5213 + ;; | |
5214 + esac | |
5215 + ;; | |
5216 + | |
5217 + darwin* | rhapsody*) | |
5218 + _LT_DARWIN_LINKER_FEATURES($1) | |
5219 + ;; | |
5220 + | |
5221 + dgux*) | |
5222 + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
5223 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | |
5224 + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | |
5225 + ;; | |
5226 + | |
5227 + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor | |
5228 + # support. Future versions do this automatically, but an explicit c++rt0.o | |
5229 + # does not break anything, and helps significantly (at the cost of a little | |
5230 + # extra space). | |
5231 + freebsd2.2*) | |
5232 + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' | |
5233 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' | |
5234 + _LT_TAGVAR(hardcode_direct, $1)=yes | |
5235 + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | |
5236 + ;; | |
5237 + | |
5238 + # Unfortunately, older versions of FreeBSD 2 do not have this feature. | |
5239 + freebsd2.*) | |
5240 + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' | |
5241 + _LT_TAGVAR(hardcode_direct, $1)=yes | |
5242 + _LT_TAGVAR(hardcode_minus_L, $1)=yes | |
5243 + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | |
5244 + ;; | |
5245 + | |
5246 + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. | |
5247 + freebsd* | dragonfly*) | |
5248 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' | |
5249 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' | |
5250 + _LT_TAGVAR(hardcode_direct, $1)=yes | |
5251 + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | |
5252 + ;; | |
5253 + | |
5254 + hpux9*) | |
5255 + if test "$GCC" = yes; then | |
5256 + _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' | |
5257 + else | |
5258 + _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' | |
5259 + fi | |
5260 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' | |
5261 + _LT_TAGVAR(hardcode_libdir_separator, $1)=: | |
5262 + _LT_TAGVAR(hardcode_direct, $1)=yes | |
5263 + | |
5264 + # hardcode_minus_L: Not really in the search PATH, | |
5265 + # but as the default location of the library. | |
5266 + _LT_TAGVAR(hardcode_minus_L, $1)=yes | |
5267 + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' | |
5268 + ;; | |
5269 + | |
5270 + hpux10*) | |
5271 + if test "$GCC" = yes && test "$with_gnu_ld" = no; then | |
5272 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' | |
5273 + else | |
5274 + _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' | |
5275 + fi | |
5276 + if test "$with_gnu_ld" = no; then | |
5277 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' | |
5278 + _LT_TAGVAR(hardcode_libdir_separator, $1)=: | |
5279 + _LT_TAGVAR(hardcode_direct, $1)=yes | |
5280 + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes | |
5281 + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' | |
5282 + # hardcode_minus_L: Not really in the search PATH, | |
5283 + # but as the default location of the library. | |
5284 + _LT_TAGVAR(hardcode_minus_L, $1)=yes | |
5285 + fi | |
5286 + ;; | |
5287 + | |
5288 + hpux11*) | |
5289 + if test "$GCC" = yes && test "$with_gnu_ld" = no; then | |
5290 + case $host_cpu in | |
5291 + hppa*64*) | |
5292 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' | |
5293 + ;; | |
5294 + ia64*) | |
5295 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' | |
5296 + ;; | |
5297 + *) | |
5298 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' | |
5299 + ;; | |
5300 + esac | |
5301 + else | |
5302 + case $host_cpu in | |
5303 + hppa*64*) | |
5304 + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' | |
5305 + ;; | |
5306 + ia64*) | |
5307 + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' | |
5308 + ;; | |
5309 + *) | |
5310 + m4_if($1, [], [ | |
5311 + # Older versions of the 11.00 compiler do not understand -b yet | |
5312 + # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) | |
5313 + _LT_LINKER_OPTION([if $CC understands -b], | |
5314 + _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], | |
5315 + [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], | |
5316 + [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], | |
5317 + [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) | |
5318 + ;; | |
5319 + esac | |
5320 + fi | |
5321 + if test "$with_gnu_ld" = no; then | |
5322 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' | |
5323 + _LT_TAGVAR(hardcode_libdir_separator, $1)=: | |
5324 + | |
5325 + case $host_cpu in | |
5326 + hppa*64*|ia64*) | |
5327 + _LT_TAGVAR(hardcode_direct, $1)=no | |
5328 + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | |
5329 + ;; | |
5330 + *) | |
5331 + _LT_TAGVAR(hardcode_direct, $1)=yes | |
5332 + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes | |
5333 + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' | |
5334 + | |
5335 + # hardcode_minus_L: Not really in the search PATH, | |
5336 + # but as the default location of the library. | |
5337 + _LT_TAGVAR(hardcode_minus_L, $1)=yes | |
5338 + ;; | |
5339 + esac | |
5340 + fi | |
5341 + ;; | |
5342 + | |
5343 + irix5* | irix6* | nonstopux*) | |
5344 + if test "$GCC" = yes; then | |
5345 + _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' | |
5346 + # Try to use the -exported_symbol ld option, if it does not | |
5347 + # work, assume that -exports_file does not work either and | |
5348 + # implicitly export all symbols. | |
5349 + # This should be the same for all languages, so no per-tag cache variable. | |
5350 + AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], | |
5351 + [lt_cv_irix_exported_symbol], | |
5352 + [save_LDFLAGS="$LDFLAGS" | |
5353 + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" | |
5354 + AC_LINK_IFELSE( | |
5355 + [AC_LANG_SOURCE( | |
5356 + [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], | |
5357 + [C++], [[int foo (void) { return 0; }]], | |
5358 + [Fortran 77], [[ | |
5359 + subroutine foo | |
5360 + end]], | |
5361 + [Fortran], [[ | |
5362 + subroutine foo | |
5363 + end]])])], | |
5364 + [lt_cv_irix_exported_symbol=yes], | |
5365 + [lt_cv_irix_exported_symbol=no]) | |
5366 + LDFLAGS="$save_LDFLAGS"]) | |
5367 + if test "$lt_cv_irix_exported_symbol" = yes; then | |
5368 + _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' | |
5369 + fi | |
5370 + else | |
5371 + _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' | |
5372 + _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' | |
5373 + fi | |
5374 + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' | |
5375 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' | |
5376 + _LT_TAGVAR(hardcode_libdir_separator, $1)=: | |
5377 + _LT_TAGVAR(inherit_rpath, $1)=yes | |
5378 + _LT_TAGVAR(link_all_deplibs, $1)=yes | |
5379 + ;; | |
5380 + | |
5381 + netbsd* | netbsdelf*-gnu) | |
5382 + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then | |
5383 + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out | |
5384 + else | |
5385 + _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF | |
5386 + fi | |
5387 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' | |
5388 + _LT_TAGVAR(hardcode_direct, $1)=yes | |
5389 + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | |
5390 + ;; | |
5391 + | |
5392 + newsos6) | |
5393 + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
5394 + _LT_TAGVAR(hardcode_direct, $1)=yes | |
5395 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' | |
5396 + _LT_TAGVAR(hardcode_libdir_separator, $1)=: | |
5397 + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | |
5398 + ;; | |
5399 + | |
5400 + *nto* | *qnx*) | |
5401 + ;; | |
5402 + | |
5403 + openbsd*) | |
5404 + if test -f /usr/libexec/ld.so; then | |
5405 + _LT_TAGVAR(hardcode_direct, $1)=yes | |
5406 + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | |
5407 + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes | |
5408 + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then | |
5409 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' | |
5410 + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' | |
5411 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' | |
5412 + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' | |
5413 + else | |
5414 + case $host_os in | |
5415 + openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) | |
5416 + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' | |
5417 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' | |
5418 + ;; | |
5419 + *) | |
5420 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' | |
5421 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' | |
5422 + ;; | |
5423 + esac | |
5424 + fi | |
5425 + else | |
5426 + _LT_TAGVAR(ld_shlibs, $1)=no | |
5427 + fi | |
5428 + ;; | |
5429 + | |
5430 + os2*) | |
5431 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | |
5432 + _LT_TAGVAR(hardcode_minus_L, $1)=yes | |
5433 + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported | |
5434 + _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' | |
5435 + _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' | |
5436 + ;; | |
5437 + | |
5438 + osf3*) | |
5439 + if test "$GCC" = yes; then | |
5440 + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' | |
5441 + _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' | |
5442 + else | |
5443 + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' | |
5444 + _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' | |
5445 + fi | |
5446 + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' | |
5447 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' | |
5448 + _LT_TAGVAR(hardcode_libdir_separator, $1)=: | |
5449 + ;; | |
5450 + | |
5451 + osf4* | osf5*) # as osf3* with the addition of -msym flag | |
5452 + if test "$GCC" = yes; then | |
5453 + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' | |
5454 + _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' | |
5455 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' | |
5456 + else | |
5457 + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' | |
5458 + _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' | |
5459 + _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~ | |
5460 + $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' | |
5461 + | |
5462 + # Both c and cxx compiler support -rpath directly | |
5463 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' | |
5464 + fi | |
5465 + _LT_TAGVAR(archive_cmds_need_lc, $1)='no' | |
5466 + _LT_TAGVAR(hardcode_libdir_separator, $1)=: | |
5467 + ;; | |
5468 + | |
5469 + solaris*) | |
5470 + _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' | |
5471 + if test "$GCC" = yes; then | |
5472 + wlarc='${wl}' | |
5473 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' | |
5474 + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ | |
5475 + $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' | |
5476 + else | |
5477 + case `$CC -V 2>&1` in | |
5478 + *"Compilers 5.0"*) | |
5479 + wlarc='' | |
5480 + _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
5481 + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ | |
5482 + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' | |
5483 + ;; | |
5484 + *) | |
5485 + wlarc='${wl}' | |
5486 + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' | |
5487 + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ | |
5488 + $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' | |
5489 + ;; | |
5490 + esac | |
5491 + fi | |
5492 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' | |
5493 + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | |
5494 + case $host_os in | |
5495 + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; | |
5496 + *) | |
5497 + # The compiler driver will combine and reorder linker options, | |
5498 + # but understands `-z linker_flag'. GCC discards it without `$wl', | |
5499 + # but is careful enough not to reorder. | |
5500 + # Supported since Solaris 2.6 (maybe 2.5.1?) | |
5501 + if test "$GCC" = yes; then | |
5502 + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' | |
5503 + else | |
5504 + _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' | |
5505 + fi | |
5506 + ;; | |
5507 + esac | |
5508 + _LT_TAGVAR(link_all_deplibs, $1)=yes | |
5509 + ;; | |
5510 + | |
5511 + sunos4*) | |
5512 + if test "x$host_vendor" = xsequent; then | |
5513 + # Use $CC to link under sequent, because it throws in some extra .o | |
5514 + # files that make .init and .fini sections work. | |
5515 + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' | |
5516 + else | |
5517 + _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' | |
5518 + fi | |
5519 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | |
5520 + _LT_TAGVAR(hardcode_direct, $1)=yes | |
5521 + _LT_TAGVAR(hardcode_minus_L, $1)=yes | |
5522 + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | |
5523 + ;; | |
5524 + | |
5525 + sysv4) | |
5526 + case $host_vendor in | |
5527 + sni) | |
5528 + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
5529 + _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? | |
5530 + ;; | |
5531 + siemens) | |
5532 + ## LD is ld it makes a PLAMLIB | |
5533 + ## CC just makes a GrossModule. | |
5534 + _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' | |
5535 + _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' | |
5536 + _LT_TAGVAR(hardcode_direct, $1)=no | |
5537 + ;; | |
5538 + motorola) | |
5539 + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
5540 + _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie | |
5541 + ;; | |
5542 + esac | |
5543 + runpath_var='LD_RUN_PATH' | |
5544 + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | |
5545 + ;; | |
5546 + | |
5547 + sysv4.3*) | |
5548 + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
5549 + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | |
5550 + _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' | |
5551 + ;; | |
5552 + | |
5553 + sysv4*MP*) | |
5554 + if test -d /usr/nec; then | |
5555 + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
5556 + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | |
5557 + runpath_var=LD_RUN_PATH | |
5558 + hardcode_runpath_var=yes | |
5559 + _LT_TAGVAR(ld_shlibs, $1)=yes | |
5560 + fi | |
5561 + ;; | |
5562 + | |
5563 + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) | |
5564 + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' | |
5565 + _LT_TAGVAR(archive_cmds_need_lc, $1)=no | |
5566 + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | |
5567 + runpath_var='LD_RUN_PATH' | |
5568 + | |
5569 + if test "$GCC" = yes; then | |
5570 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
5571 + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
5572 + else | |
5573 + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
5574 + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
5575 + fi | |
5576 + ;; | |
5577 + | |
5578 + sysv5* | sco3.2v5* | sco5v6*) | |
5579 + # Note: We can NOT use -z defs as we might desire, because we do not | |
5580 + # link with -lc, and that would cause any symbols used from libc to | |
5581 + # always be unresolved, which means just about no library would | |
5582 + # ever link correctly. If we're not using GNU ld we use -z text | |
5583 + # though, which does catch some bad symbols but isn't as heavy-handed | |
5584 + # as -z defs. | |
5585 + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' | |
5586 + _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' | |
5587 + _LT_TAGVAR(archive_cmds_need_lc, $1)=no | |
5588 + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | |
5589 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' | |
5590 + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' | |
5591 + _LT_TAGVAR(link_all_deplibs, $1)=yes | |
5592 + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' | |
5593 + runpath_var='LD_RUN_PATH' | |
5594 + | |
5595 + if test "$GCC" = yes; then | |
5596 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
5597 + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
5598 + else | |
5599 + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
5600 + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
5601 + fi | |
5602 + ;; | |
5603 + | |
5604 + uts4*) | |
5605 + _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
5606 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | |
5607 + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | |
5608 + ;; | |
5609 + | |
5610 + *) | |
5611 + _LT_TAGVAR(ld_shlibs, $1)=no | |
5612 + ;; | |
5613 + esac | |
5614 + | |
5615 + if test x$host_vendor = xsni; then | |
5616 + case $host in | |
5617 + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) | |
5618 + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' | |
5619 + ;; | |
5620 + esac | |
5621 + fi | |
5622 + fi | |
5623 +]) | |
5624 +AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) | |
5625 +test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no | |
5626 + | |
5627 +_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld | |
5628 + | |
5629 +_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl | |
5630 +_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl | |
5631 +_LT_DECL([], [extract_expsyms_cmds], [2], | |
5632 + [The commands to extract the exported symbol list from a shared archive]) | |
5633 + | |
5634 +# | |
5635 +# Do we need to explicitly link libc? | |
5636 +# | |
5637 +case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in | |
5638 +x|xyes) | |
5639 + # Assume -lc should be added | |
5640 + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes | |
5641 + | |
5642 + if test "$enable_shared" = yes && test "$GCC" = yes; then | |
5643 + case $_LT_TAGVAR(archive_cmds, $1) in | |
5644 + *'~'*) | |
5645 + # FIXME: we may have to deal with multi-command sequences. | |
5646 + ;; | |
5647 + '$CC '*) | |
5648 + # Test whether the compiler implicitly links with -lc since on some | |
5649 + # systems, -lgcc has to come before -lc. If gcc already passes -lc | |
5650 + # to ld, don't add -lc before -lgcc. | |
5651 + AC_CACHE_CHECK([whether -lc should be explicitly linked in], | |
5652 + [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), | |
5653 + [$RM conftest* | |
5654 + echo "$lt_simple_compile_test_code" > conftest.$ac_ext | |
5655 + | |
5656 + if AC_TRY_EVAL(ac_compile) 2>conftest.err; then | |
5657 + soname=conftest | |
5658 + lib=conftest | |
5659 + libobjs=conftest.$ac_objext | |
5660 + deplibs= | |
5661 + wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) | |
5662 + pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) | |
5663 + compiler_flags=-v | |
5664 + linker_flags=-v | |
5665 + verstring= | |
5666 + output_objdir=. | |
5667 + libname=conftest | |
5668 + lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) | |
5669 + _LT_TAGVAR(allow_undefined_flag, $1)= | |
5670 + if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) | |
5671 + then | |
5672 + lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no | |
5673 + else | |
5674 + lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes | |
5675 + fi | |
5676 + _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag | |
5677 + else | |
5678 + cat conftest.err 1>&5 | |
5679 + fi | |
5680 + $RM conftest* | |
5681 + ]) | |
5682 + _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) | |
5683 + ;; | |
5684 + esac | |
5685 + fi | |
5686 + ;; | |
5687 +esac | |
5688 + | |
5689 +_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], | |
5690 + [Whether or not to add -lc for building shared libraries]) | |
5691 +_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], | |
5692 + [enable_shared_with_static_runtimes], [0], | |
5693 + [Whether or not to disallow shared libs when runtime libs are static]) | |
5694 +_LT_TAGDECL([], [export_dynamic_flag_spec], [1], | |
5695 + [Compiler flag to allow reflexive dlopens]) | |
5696 +_LT_TAGDECL([], [whole_archive_flag_spec], [1], | |
5697 + [Compiler flag to generate shared objects directly from archives]) | |
5698 +_LT_TAGDECL([], [compiler_needs_object], [1], | |
5699 + [Whether the compiler copes with passing no objects directly]) | |
5700 +_LT_TAGDECL([], [old_archive_from_new_cmds], [2], | |
5701 + [Create an old-style archive from a shared archive]) | |
5702 +_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], | |
5703 + [Create a temporary old-style archive to link instead of a shared archive]) | |
5704 +_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) | |
5705 +_LT_TAGDECL([], [archive_expsym_cmds], [2]) | |
5706 +_LT_TAGDECL([], [module_cmds], [2], | |
5707 + [Commands used to build a loadable module if different from building | |
5708 + a shared archive.]) | |
5709 +_LT_TAGDECL([], [module_expsym_cmds], [2]) | |
5710 +_LT_TAGDECL([], [with_gnu_ld], [1], | |
5711 + [Whether we are building with GNU ld or not]) | |
5712 +_LT_TAGDECL([], [allow_undefined_flag], [1], | |
5713 + [Flag that allows shared libraries with undefined symbols to be built]) | |
5714 +_LT_TAGDECL([], [no_undefined_flag], [1], | |
5715 + [Flag that enforces no undefined symbols]) | |
5716 +_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], | |
5717 + [Flag to hardcode $libdir into a binary during linking. | |
5718 + This must work even if $libdir does not exist]) | |
5719 +_LT_TAGDECL([], [hardcode_libdir_separator], [1], | |
5720 + [Whether we need a single "-rpath" flag with a separated argument]) | |
5721 +_LT_TAGDECL([], [hardcode_direct], [0], | |
5722 + [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes | |
5723 + DIR into the resulting binary]) | |
5724 +_LT_TAGDECL([], [hardcode_direct_absolute], [0], | |
5725 + [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes | |
5726 + DIR into the resulting binary and the resulting library dependency is | |
5727 + "absolute", i.e impossible to change by setting ${shlibpath_var} if the | |
5728 + library is relocated]) | |
5729 +_LT_TAGDECL([], [hardcode_minus_L], [0], | |
5730 + [Set to "yes" if using the -LDIR flag during linking hardcodes DIR | |
5731 + into the resulting binary]) | |
5732 +_LT_TAGDECL([], [hardcode_shlibpath_var], [0], | |
5733 + [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR | |
5734 + into the resulting binary]) | |
5735 +_LT_TAGDECL([], [hardcode_automatic], [0], | |
5736 + [Set to "yes" if building a shared library automatically hardcodes DIR | |
5737 + into the library and all subsequent libraries and executables linked | |
5738 + against it]) | |
5739 +_LT_TAGDECL([], [inherit_rpath], [0], | |
5740 + [Set to yes if linker adds runtime paths of dependent libraries | |
5741 + to runtime path list]) | |
5742 +_LT_TAGDECL([], [link_all_deplibs], [0], | |
5743 + [Whether libtool must link a program against all its dependency libraries]) | |
5744 +_LT_TAGDECL([], [always_export_symbols], [0], | |
5745 + [Set to "yes" if exported symbols are required]) | |
5746 +_LT_TAGDECL([], [export_symbols_cmds], [2], | |
5747 + [The commands to list exported symbols]) | |
5748 +_LT_TAGDECL([], [exclude_expsyms], [1], | |
5749 + [Symbols that should not be listed in the preloaded symbols]) | |
5750 +_LT_TAGDECL([], [include_expsyms], [1], | |
5751 + [Symbols that must always be exported]) | |
5752 +_LT_TAGDECL([], [prelink_cmds], [2], | |
5753 + [Commands necessary for linking programs (against libraries) with templates]) | |
5754 +_LT_TAGDECL([], [postlink_cmds], [2], | |
5755 + [Commands necessary for finishing linking programs]) | |
5756 +_LT_TAGDECL([], [file_list_spec], [1], | |
5757 + [Specify filename containing input files]) | |
5758 +dnl FIXME: Not yet implemented | |
5759 +dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], | |
5760 +dnl [Compiler flag to generate thread safe objects]) | |
5761 +])# _LT_LINKER_SHLIBS | |
5762 + | |
5763 + | |
5764 +# _LT_LANG_C_CONFIG([TAG]) | |
5765 +# ------------------------ | |
5766 +# Ensure that the configuration variables for a C compiler are suitably | |
5767 +# defined. These variables are subsequently used by _LT_CONFIG to write | |
5768 +# the compiler configuration to `libtool'. | |
5769 +m4_defun([_LT_LANG_C_CONFIG], | |
5770 +[m4_require([_LT_DECL_EGREP])dnl | |
5771 +lt_save_CC="$CC" | |
5772 +AC_LANG_PUSH(C) | |
5773 + | |
5774 +# Source file extension for C test sources. | |
5775 +ac_ext=c | |
5776 + | |
5777 +# Object file extension for compiled C test sources. | |
5778 +objext=o | |
5779 +_LT_TAGVAR(objext, $1)=$objext | |
5780 + | |
5781 +# Code to be used in simple compile tests | |
5782 +lt_simple_compile_test_code="int some_variable = 0;" | |
5783 + | |
5784 +# Code to be used in simple link tests | |
5785 +lt_simple_link_test_code='int main(){return(0);}' | |
5786 + | |
5787 +_LT_TAG_COMPILER | |
5788 +# Save the default compiler, since it gets overwritten when the other | |
5789 +# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. | |
5790 +compiler_DEFAULT=$CC | |
5791 + | |
5792 +# save warnings/boilerplate of simple test code | |
5793 +_LT_COMPILER_BOILERPLATE | |
5794 +_LT_LINKER_BOILERPLATE | |
5795 + | |
5796 +if test -n "$compiler"; then | |
5797 + _LT_COMPILER_NO_RTTI($1) | |
5798 + _LT_COMPILER_PIC($1) | |
5799 + _LT_COMPILER_C_O($1) | |
5800 + _LT_COMPILER_FILE_LOCKS($1) | |
5801 + _LT_LINKER_SHLIBS($1) | |
5802 + _LT_SYS_DYNAMIC_LINKER($1) | |
5803 + _LT_LINKER_HARDCODE_LIBPATH($1) | |
5804 + LT_SYS_DLOPEN_SELF | |
5805 + _LT_CMD_STRIPLIB | |
5806 + | |
5807 + # Report which library types will actually be built | |
5808 + AC_MSG_CHECKING([if libtool supports shared libraries]) | |
5809 + AC_MSG_RESULT([$can_build_shared]) | |
5810 + | |
5811 + AC_MSG_CHECKING([whether to build shared libraries]) | |
5812 + test "$can_build_shared" = "no" && enable_shared=no | |
5813 + | |
5814 + # On AIX, shared libraries and static libraries use the same namespace, and | |
5815 + # are all built from PIC. | |
5816 + case $host_os in | |
5817 + aix3*) | |
5818 + test "$enable_shared" = yes && enable_static=no | |
5819 + if test -n "$RANLIB"; then | |
5820 + archive_cmds="$archive_cmds~\$RANLIB \$lib" | |
5821 + postinstall_cmds='$RANLIB $lib' | |
5822 + fi | |
5823 + ;; | |
5824 + | |
5825 + aix[[4-9]]*) | |
5826 + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then | |
5827 + test "$enable_shared" = yes && enable_static=no | |
5828 + fi | |
5829 + ;; | |
5830 + esac | |
5831 + AC_MSG_RESULT([$enable_shared]) | |
5832 + | |
5833 + AC_MSG_CHECKING([whether to build static libraries]) | |
5834 + # Make sure either enable_shared or enable_static is yes. | |
5835 + test "$enable_shared" = yes || enable_static=yes | |
5836 + AC_MSG_RESULT([$enable_static]) | |
5837 + | |
5838 + _LT_CONFIG($1) | |
5839 +fi | |
5840 +AC_LANG_POP | |
5841 +CC="$lt_save_CC" | |
5842 +])# _LT_LANG_C_CONFIG | |
5843 + | |
5844 + | |
5845 +# _LT_LANG_CXX_CONFIG([TAG]) | |
5846 +# -------------------------- | |
5847 +# Ensure that the configuration variables for a C++ compiler are suitably | |
5848 +# defined. These variables are subsequently used by _LT_CONFIG to write | |
5849 +# the compiler configuration to `libtool'. | |
5850 +m4_defun([_LT_LANG_CXX_CONFIG], | |
5851 +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl | |
5852 +m4_require([_LT_DECL_EGREP])dnl | |
5853 +m4_require([_LT_PATH_MANIFEST_TOOL])dnl | |
5854 +if test -n "$CXX" && ( test "X$CXX" != "Xno" && | |
5855 + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || | |
5856 + (test "X$CXX" != "Xg++"))) ; then | |
5857 + AC_PROG_CXXCPP | |
5858 +else | |
5859 + _lt_caught_CXX_error=yes | |
5860 +fi | |
5861 + | |
5862 +AC_LANG_PUSH(C++) | |
5863 +_LT_TAGVAR(archive_cmds_need_lc, $1)=no | |
5864 +_LT_TAGVAR(allow_undefined_flag, $1)= | |
5865 +_LT_TAGVAR(always_export_symbols, $1)=no | |
5866 +_LT_TAGVAR(archive_expsym_cmds, $1)= | |
5867 +_LT_TAGVAR(compiler_needs_object, $1)=no | |
5868 +_LT_TAGVAR(export_dynamic_flag_spec, $1)= | |
5869 +_LT_TAGVAR(hardcode_direct, $1)=no | |
5870 +_LT_TAGVAR(hardcode_direct_absolute, $1)=no | |
5871 +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= | |
5872 +_LT_TAGVAR(hardcode_libdir_separator, $1)= | |
5873 +_LT_TAGVAR(hardcode_minus_L, $1)=no | |
5874 +_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported | |
5875 +_LT_TAGVAR(hardcode_automatic, $1)=no | |
5876 +_LT_TAGVAR(inherit_rpath, $1)=no | |
5877 +_LT_TAGVAR(module_cmds, $1)= | |
5878 +_LT_TAGVAR(module_expsym_cmds, $1)= | |
5879 +_LT_TAGVAR(link_all_deplibs, $1)=unknown | |
5880 +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds | |
5881 +_LT_TAGVAR(reload_flag, $1)=$reload_flag | |
5882 +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds | |
5883 +_LT_TAGVAR(no_undefined_flag, $1)= | |
5884 +_LT_TAGVAR(whole_archive_flag_spec, $1)= | |
5885 +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no | |
5886 + | |
5887 +# Source file extension for C++ test sources. | |
5888 +ac_ext=cpp | |
5889 + | |
5890 +# Object file extension for compiled C++ test sources. | |
5891 +objext=o | |
5892 +_LT_TAGVAR(objext, $1)=$objext | |
5893 + | |
5894 +# No sense in running all these tests if we already determined that | |
5895 +# the CXX compiler isn't working. Some variables (like enable_shared) | |
5896 +# are currently assumed to apply to all compilers on this platform, | |
5897 +# and will be corrupted by setting them based on a non-working compiler. | |
5898 +if test "$_lt_caught_CXX_error" != yes; then | |
5899 + # Code to be used in simple compile tests | |
5900 + lt_simple_compile_test_code="int some_variable = 0;" | |
5901 + | |
5902 + # Code to be used in simple link tests | |
5903 + lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' | |
5904 + | |
5905 + # ltmain only uses $CC for tagged configurations so make sure $CC is set. | |
5906 + _LT_TAG_COMPILER | |
5907 + | |
5908 + # save warnings/boilerplate of simple test code | |
5909 + _LT_COMPILER_BOILERPLATE | |
5910 + _LT_LINKER_BOILERPLATE | |
5911 + | |
5912 + # Allow CC to be a program name with arguments. | |
5913 + lt_save_CC=$CC | |
5914 + lt_save_CFLAGS=$CFLAGS | |
5915 + lt_save_LD=$LD | |
5916 + lt_save_GCC=$GCC | |
5917 + GCC=$GXX | |
5918 + lt_save_with_gnu_ld=$with_gnu_ld | |
5919 + lt_save_path_LD=$lt_cv_path_LD | |
5920 + if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then | |
5921 + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx | |
5922 + else | |
5923 + $as_unset lt_cv_prog_gnu_ld | |
5924 + fi | |
5925 + if test -n "${lt_cv_path_LDCXX+set}"; then | |
5926 + lt_cv_path_LD=$lt_cv_path_LDCXX | |
5927 + else | |
5928 + $as_unset lt_cv_path_LD | |
5929 + fi | |
5930 + test -z "${LDCXX+set}" || LD=$LDCXX | |
5931 + CC=${CXX-"c++"} | |
5932 + CFLAGS=$CXXFLAGS | |
5933 + compiler=$CC | |
5934 + _LT_TAGVAR(compiler, $1)=$CC | |
5935 + _LT_CC_BASENAME([$compiler]) | |
5936 + | |
5937 + if test -n "$compiler"; then | |
5938 + # We don't want -fno-exception when compiling C++ code, so set the | |
5939 + # no_builtin_flag separately | |
5940 + if test "$GXX" = yes; then | |
5941 + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' | |
5942 + else | |
5943 + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= | |
5944 + fi | |
5945 + | |
5946 + if test "$GXX" = yes; then | |
5947 + # Set up default GNU C++ configuration | |
5948 + | |
5949 + LT_PATH_LD | |
5950 + | |
5951 + # Check if GNU C++ uses GNU ld as the underlying linker, since the | |
5952 + # archiving commands below assume that GNU ld is being used. | |
5953 + if test "$with_gnu_ld" = yes; then | |
5954 + _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
5955 + _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' | |
5956 + | |
5957 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' | |
5958 + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' | |
5959 + | |
5960 + # If archive_cmds runs LD, not CC, wlarc should be empty | |
5961 + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to | |
5962 + # investigate it a little bit more. (MM) | |
5963 + wlarc='${wl}' | |
5964 + | |
5965 + # ancient GNU ld didn't support --whole-archive et. al. | |
5966 + if eval "`$CC -print-prog-name=ld` --help 2>&1" | | |
5967 + $GREP 'no-whole-archive' > /dev/null; then | |
5968 + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' | |
5969 + else | |
5970 + _LT_TAGVAR(whole_archive_flag_spec, $1)= | |
5971 + fi | |
5972 + else | |
5973 + with_gnu_ld=no | |
5974 + wlarc= | |
5975 + | |
5976 + # A generic and very simple default shared library creation | |
5977 + # command for GNU C++ for the case where it uses the native | |
5978 + # linker, instead of GNU ld. If possible, this setting should | |
5979 + # overridden to take advantage of the native linker features on | |
5980 + # the platform it is being used on. | |
5981 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' | |
5982 + fi | |
5983 + | |
5984 + # Commands to make compiler produce verbose output that lists | |
5985 + # what "hidden" libraries, object files and flags are used when | |
5986 + # linking a shared library. | |
5987 + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' | |
5988 + | |
5989 + else | |
5990 + GXX=no | |
5991 + with_gnu_ld=no | |
5992 + wlarc= | |
5993 + fi | |
5994 + | |
5995 + # PORTME: fill in a description of your system's C++ link characteristics | |
5996 + AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) | |
5997 + _LT_TAGVAR(ld_shlibs, $1)=yes | |
5998 + case $host_os in | |
5999 + aix3*) | |
6000 + # FIXME: insert proper C++ library support | |
6001 + _LT_TAGVAR(ld_shlibs, $1)=no | |
6002 + ;; | |
6003 + aix[[4-9]]*) | |
6004 + if test "$host_cpu" = ia64; then | |
6005 + # On IA64, the linker does run time linking by default, so we don't | |
6006 + # have to do anything special. | |
6007 + aix_use_runtimelinking=no | |
6008 + exp_sym_flag='-Bexport' | |
6009 + no_entry_flag="" | |
6010 + else | |
6011 + aix_use_runtimelinking=no | |
6012 + | |
6013 + # Test if we are trying to use run time linking or normal | |
6014 + # AIX style linking. If -brtl is somewhere in LDFLAGS, we | |
6015 + # need to do runtime linking. | |
6016 + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) | |
6017 + for ld_flag in $LDFLAGS; do | |
6018 + case $ld_flag in | |
6019 + *-brtl*) | |
6020 + aix_use_runtimelinking=yes | |
6021 + break | |
6022 + ;; | |
6023 + esac | |
6024 + done | |
6025 + ;; | |
6026 + esac | |
6027 + | |
6028 + exp_sym_flag='-bexport' | |
6029 + no_entry_flag='-bnoentry' | |
6030 + fi | |
6031 + | |
6032 + # When large executables or shared objects are built, AIX ld can | |
6033 + # have problems creating the table of contents. If linking a library | |
6034 + # or program results in "error TOC overflow" add -mminimal-toc to | |
6035 + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not | |
6036 + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. | |
6037 + | |
6038 + _LT_TAGVAR(archive_cmds, $1)='' | |
6039 + _LT_TAGVAR(hardcode_direct, $1)=yes | |
6040 + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes | |
6041 + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' | |
6042 + _LT_TAGVAR(link_all_deplibs, $1)=yes | |
6043 + _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' | |
6044 + | |
6045 + if test "$GXX" = yes; then | |
6046 + case $host_os in aix4.[[012]]|aix4.[[012]].*) | |
6047 + # We only want to do this on AIX 4.2 and lower, the check | |
6048 + # below for broken collect2 doesn't work under 4.3+ | |
6049 + collect2name=`${CC} -print-prog-name=collect2` | |
6050 + if test -f "$collect2name" && | |
6051 + strings "$collect2name" | $GREP resolve_lib_name >/dev/null | |
6052 + then | |
6053 + # We have reworked collect2 | |
6054 + : | |
6055 + else | |
6056 + # We have old collect2 | |
6057 + _LT_TAGVAR(hardcode_direct, $1)=unsupported | |
6058 + # It fails to find uninstalled libraries when the uninstalled | |
6059 + # path is not listed in the libpath. Setting hardcode_minus_L | |
6060 + # to unsupported forces relinking | |
6061 + _LT_TAGVAR(hardcode_minus_L, $1)=yes | |
6062 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | |
6063 + _LT_TAGVAR(hardcode_libdir_separator, $1)= | |
6064 + fi | |
6065 + esac | |
6066 + shared_flag='-shared' | |
6067 + if test "$aix_use_runtimelinking" = yes; then | |
6068 + shared_flag="$shared_flag "'${wl}-G' | |
6069 + fi | |
6070 + else | |
6071 + # not using gcc | |
6072 + if test "$host_cpu" = ia64; then | |
6073 + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release | |
6074 + # chokes on -Wl,-G. The following line is correct: | |
6075 + shared_flag='-G' | |
6076 + else | |
6077 + if test "$aix_use_runtimelinking" = yes; then | |
6078 + shared_flag='${wl}-G' | |
6079 + else | |
6080 + shared_flag='${wl}-bM:SRE' | |
6081 + fi | |
6082 + fi | |
6083 + fi | |
6084 + | |
6085 + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' | |
6086 + # It seems that -bexpall does not export symbols beginning with | |
6087 + # underscore (_), so it is better to generate a list of symbols to | |
6088 + # export. | |
6089 + _LT_TAGVAR(always_export_symbols, $1)=yes | |
6090 + if test "$aix_use_runtimelinking" = yes; then | |
6091 + # Warning - without using the other runtime loading flags (-brtl), | |
6092 + # -berok will link without error, but may produce a broken library. | |
6093 + _LT_TAGVAR(allow_undefined_flag, $1)='-berok' | |
6094 + # Determine the default libpath from the value encoded in an empty | |
6095 + # executable. | |
6096 + _LT_SYS_MODULE_PATH_AIX([$1]) | |
6097 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" | |
6098 + | |
6099 + _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" | |
6100 + else | |
6101 + if test "$host_cpu" = ia64; then | |
6102 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' | |
6103 + _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" | |
6104 + _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" | |
6105 + else | |
6106 + # Determine the default libpath from the value encoded in an | |
6107 + # empty executable. | |
6108 + _LT_SYS_MODULE_PATH_AIX([$1]) | |
6109 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" | |
6110 + # Warning - without using the other run time loading flags, | |
6111 + # -berok will link without error, but may produce a broken library. | |
6112 + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' | |
6113 + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' | |
6114 + if test "$with_gnu_ld" = yes; then | |
6115 + # We only use this code for GNU lds that support --whole-archive. | |
6116 + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' | |
6117 + else | |
6118 + # Exported symbols can be pulled into shared objects from archives | |
6119 + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' | |
6120 + fi | |
6121 + _LT_TAGVAR(archive_cmds_need_lc, $1)=yes | |
6122 + # This is similar to how AIX traditionally builds its shared | |
6123 + # libraries. | |
6124 + _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' | |
6125 + fi | |
6126 + fi | |
6127 + ;; | |
6128 + | |
6129 + beos*) | |
6130 + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then | |
6131 + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported | |
6132 + # Joseph Beckenbach <jrb3@best.com> says some releases of gcc | |
6133 + # support --undefined. This deserves some investigation. FIXME | |
6134 + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
6135 + else | |
6136 + _LT_TAGVAR(ld_shlibs, $1)=no | |
6137 + fi | |
6138 + ;; | |
6139 + | |
6140 + chorus*) | |
6141 + case $cc_basename in | |
6142 + *) | |
6143 + # FIXME: insert proper C++ library support | |
6144 + _LT_TAGVAR(ld_shlibs, $1)=no | |
6145 + ;; | |
6146 + esac | |
6147 + ;; | |
6148 + | |
6149 + cygwin* | mingw* | pw32* | cegcc*) | |
6150 + case $GXX,$cc_basename in | |
6151 + ,cl* | no,cl*) | |
6152 + # Native MSVC | |
6153 + # hardcode_libdir_flag_spec is actually meaningless, as there is | |
6154 + # no search path for DLLs. | |
6155 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' | |
6156 + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported | |
6157 + _LT_TAGVAR(always_export_symbols, $1)=yes | |
6158 + _LT_TAGVAR(file_list_spec, $1)='@' | |
6159 + # Tell ltmain to make .lib files, not .a files. | |
6160 + libext=lib | |
6161 + # Tell ltmain to make .dll files, not .so files. | |
6162 + shrext_cmds=".dll" | |
6163 + # FIXME: Setting linknames here is a bad hack. | |
6164 + _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' | |
6165 + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then | |
6166 + $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; | |
6167 + else | |
6168 + $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; | |
6169 + fi~ | |
6170 + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ | |
6171 + linknames=' | |
6172 + # The linker will not automatically build a static lib if we build a DLL. | |
6173 + # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' | |
6174 + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes | |
6175 + # Don't use ranlib | |
6176 + _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' | |
6177 + _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ | |
6178 + lt_tool_outputfile="@TOOL_OUTPUT@"~ | |
6179 + case $lt_outputfile in | |
6180 + *.exe|*.EXE) ;; | |
6181 + *) | |
6182 + lt_outputfile="$lt_outputfile.exe" | |
6183 + lt_tool_outputfile="$lt_tool_outputfile.exe" | |
6184 + ;; | |
6185 + esac~ | |
6186 + func_to_tool_file "$lt_outputfile"~ | |
6187 + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then | |
6188 + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; | |
6189 + $RM "$lt_outputfile.manifest"; | |
6190 + fi' | |
6191 + ;; | |
6192 + *) | |
6193 + # g++ | |
6194 + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, | |
6195 + # as there is no search path for DLLs. | |
6196 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | |
6197 + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' | |
6198 + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported | |
6199 + _LT_TAGVAR(always_export_symbols, $1)=no | |
6200 + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes | |
6201 + | |
6202 + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then | |
6203 + _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' | |
6204 + # If the export-symbols file already is a .def file (1st line | |
6205 + # is EXPORTS), use it as is; otherwise, prepend... | |
6206 + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then | |
6207 + cp $export_symbols $output_objdir/$soname.def; | |
6208 + else | |
6209 + echo EXPORTS > $output_objdir/$soname.def; | |
6210 + cat $export_symbols >> $output_objdir/$soname.def; | |
6211 + fi~ | |
6212 + $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' | |
6213 + else | |
6214 + _LT_TAGVAR(ld_shlibs, $1)=no | |
6215 + fi | |
6216 + ;; | |
6217 + esac | |
6218 + ;; | |
6219 + darwin* | rhapsody*) | |
6220 + _LT_DARWIN_LINKER_FEATURES($1) | |
6221 + ;; | |
6222 + | |
6223 + dgux*) | |
6224 + case $cc_basename in | |
6225 + ec++*) | |
6226 + # FIXME: insert proper C++ library support | |
6227 + _LT_TAGVAR(ld_shlibs, $1)=no | |
6228 + ;; | |
6229 + ghcx*) | |
6230 + # Green Hills C++ Compiler | |
6231 + # FIXME: insert proper C++ library support | |
6232 + _LT_TAGVAR(ld_shlibs, $1)=no | |
6233 + ;; | |
6234 + *) | |
6235 + # FIXME: insert proper C++ library support | |
6236 + _LT_TAGVAR(ld_shlibs, $1)=no | |
6237 + ;; | |
6238 + esac | |
6239 + ;; | |
6240 + | |
6241 + freebsd2.*) | |
6242 + # C++ shared libraries reported to be fairly broken before | |
6243 + # switch to ELF | |
6244 + _LT_TAGVAR(ld_shlibs, $1)=no | |
6245 + ;; | |
6246 + | |
6247 + freebsd-elf*) | |
6248 + _LT_TAGVAR(archive_cmds_need_lc, $1)=no | |
6249 + ;; | |
6250 + | |
6251 + freebsd* | dragonfly*) | |
6252 + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF | |
6253 + # conventions | |
6254 + _LT_TAGVAR(ld_shlibs, $1)=yes | |
6255 + ;; | |
6256 + | |
6257 + haiku*) | |
6258 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
6259 + _LT_TAGVAR(link_all_deplibs, $1)=yes | |
6260 + ;; | |
6261 + | |
6262 + hpux9*) | |
6263 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' | |
6264 + _LT_TAGVAR(hardcode_libdir_separator, $1)=: | |
6265 + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' | |
6266 + _LT_TAGVAR(hardcode_direct, $1)=yes | |
6267 + _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, | |
6268 + # but as the default | |
6269 + # location of the library. | |
6270 + | |
6271 + case $cc_basename in | |
6272 + CC*) | |
6273 + # FIXME: insert proper C++ library support | |
6274 + _LT_TAGVAR(ld_shlibs, $1)=no | |
6275 + ;; | |
6276 + aCC*) | |
6277 + _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' | |
6278 + # Commands to make compiler produce verbose output that lists | |
6279 + # what "hidden" libraries, object files and flags are used when | |
6280 + # linking a shared library. | |
6281 + # | |
6282 + # There doesn't appear to be a way to prevent this compiler from | |
6283 + # explicitly linking system object files so we need to strip them | |
6284 + # from the output so that they don't get included in the library | |
6285 + # dependencies. | |
6286 + 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"' | |
6287 + ;; | |
6288 + *) | |
6289 + if test "$GXX" = yes; then | |
6290 + _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' | |
6291 + else | |
6292 + # FIXME: insert proper C++ library support | |
6293 + _LT_TAGVAR(ld_shlibs, $1)=no | |
6294 + fi | |
6295 + ;; | |
6296 + esac | |
6297 + ;; | |
6298 + | |
6299 + hpux10*|hpux11*) | |
6300 + if test $with_gnu_ld = no; then | |
6301 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' | |
6302 + _LT_TAGVAR(hardcode_libdir_separator, $1)=: | |
6303 + | |
6304 + case $host_cpu in | |
6305 + hppa*64*|ia64*) | |
6306 + ;; | |
6307 + *) | |
6308 + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' | |
6309 + ;; | |
6310 + esac | |
6311 + fi | |
6312 + case $host_cpu in | |
6313 + hppa*64*|ia64*) | |
6314 + _LT_TAGVAR(hardcode_direct, $1)=no | |
6315 + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | |
6316 + ;; | |
6317 + *) | |
6318 + _LT_TAGVAR(hardcode_direct, $1)=yes | |
6319 + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes | |
6320 + _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, | |
6321 + # but as the default | |
6322 + # location of the library. | |
6323 + ;; | |
6324 + esac | |
6325 + | |
6326 + case $cc_basename in | |
6327 + CC*) | |
6328 + # FIXME: insert proper C++ library support | |
6329 + _LT_TAGVAR(ld_shlibs, $1)=no | |
6330 + ;; | |
6331 + aCC*) | |
6332 + case $host_cpu in | |
6333 + hppa*64*) | |
6334 + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | |
6335 + ;; | |
6336 + ia64*) | |
6337 + _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | |
6338 + ;; | |
6339 + *) | |
6340 + _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' | |
6341 + ;; | |
6342 + esac | |
6343 + # Commands to make compiler produce verbose output that lists | |
6344 + # what "hidden" libraries, object files and flags are used when | |
6345 + # linking a shared library. | |
6346 + # | |
6347 + # There doesn't appear to be a way to prevent this compiler from | |
6348 + # explicitly linking system object files so we need to strip them | |
6349 + # from the output so that they don't get included in the library | |
6350 + # dependencies. | |
6351 + 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"' | |
6352 + ;; | |
6353 + *) | |
6354 + if test "$GXX" = yes; then | |
6355 + if test $with_gnu_ld = no; then | |
6356 + case $host_cpu in | |
6357 + hppa*64*) | |
6358 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | |
6359 + ;; | |
6360 + ia64*) | |
6361 + _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' | |
6362 + ;; | |
6363 + *) | |
6364 + _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' | |
6365 + ;; | |
6366 + esac | |
6367 + fi | |
6368 + else | |
6369 + # FIXME: insert proper C++ library support | |
6370 + _LT_TAGVAR(ld_shlibs, $1)=no | |
6371 + fi | |
6372 + ;; | |
6373 + esac | |
6374 + ;; | |
6375 + | |
6376 + interix[[3-9]]*) | |
6377 + _LT_TAGVAR(hardcode_direct, $1)=no | |
6378 + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | |
6379 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' | |
6380 + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' | |
6381 + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. | |
6382 + # Instead, shared libraries are loaded at an image base (0x10000000 by | |
6383 + # default) and relocated if they conflict, which is a slow very memory | |
6384 + # consuming and fragmenting process. To avoid this, we pick a random, | |
6385 + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link | |
6386 + # time. Moving up from 0x10000000 also allows more sbrk(2) space. | |
6387 + _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' | |
6388 + _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' | |
6389 + ;; | |
6390 + irix5* | irix6*) | |
6391 + case $cc_basename in | |
6392 + CC*) | |
6393 + # SGI C++ | |
6394 + _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' | |
6395 + | |
6396 + # Archives containing C++ object files must be created using | |
6397 + # "CC -ar", where "CC" is the IRIX C++ compiler. This is | |
6398 + # necessary to make sure instantiated templates are included | |
6399 + # in the archive. | |
6400 + _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' | |
6401 + ;; | |
6402 + *) | |
6403 + if test "$GXX" = yes; then | |
6404 + if test "$with_gnu_ld" = no; then | |
6405 + _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' | |
6406 + else | |
6407 + _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' | |
6408 + fi | |
6409 + fi | |
6410 + _LT_TAGVAR(link_all_deplibs, $1)=yes | |
6411 + ;; | |
6412 + esac | |
6413 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' | |
6414 + _LT_TAGVAR(hardcode_libdir_separator, $1)=: | |
6415 + _LT_TAGVAR(inherit_rpath, $1)=yes | |
6416 + ;; | |
6417 + | |
6418 + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) | |
6419 + case $cc_basename in | |
6420 + KCC*) | |
6421 + # Kuck and Associates, Inc. (KAI) C++ Compiler | |
6422 + | |
6423 + # KCC will only create a shared library if the output file | |
6424 + # ends with ".so" (or ".sl" for HP-UX), so rename the library | |
6425 + # to its proper name (with version) after linking. | |
6426 + _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' | |
6427 + _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' | |
6428 + # Commands to make compiler produce verbose output that lists | |
6429 + # what "hidden" libraries, object files and flags are used when | |
6430 + # linking a shared library. | |
6431 + # | |
6432 + # There doesn't appear to be a way to prevent this compiler from | |
6433 + # explicitly linking system object files so we need to strip them | |
6434 + # from the output so that they don't get included in the library | |
6435 + # dependencies. | |
6436 + 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"' | |
6437 + | |
6438 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' | |
6439 + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' | |
6440 + | |
6441 + # Archives containing C++ object files must be created using | |
6442 + # "CC -Bstatic", where "CC" is the KAI C++ compiler. | |
6443 + _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' | |
6444 + ;; | |
6445 + icpc* | ecpc* ) | |
6446 + # Intel C++ | |
6447 + with_gnu_ld=yes | |
6448 + # version 8.0 and above of icpc choke on multiply defined symbols | |
6449 + # if we add $predep_objects and $postdep_objects, however 7.1 and | |
6450 + # earlier do not add the objects themselves. | |
6451 + case `$CC -V 2>&1` in | |
6452 + *"Version 7."*) | |
6453 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
6454 + _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' | |
6455 + ;; | |
6456 + *) # Version 8.0 or newer | |
6457 + tmp_idyn= | |
6458 + case $host_cpu in | |
6459 + ia64*) tmp_idyn=' -i_dynamic';; | |
6460 + esac | |
6461 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
6462 + _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' | |
6463 + ;; | |
6464 + esac | |
6465 + _LT_TAGVAR(archive_cmds_need_lc, $1)=no | |
6466 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' | |
6467 + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' | |
6468 + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' | |
6469 + ;; | |
6470 + pgCC* | pgcpp*) | |
6471 + # Portland Group C++ compiler | |
6472 + case `$CC -V` in | |
6473 + *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) | |
6474 + _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ | |
6475 + rm -rf $tpldir~ | |
6476 + $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ | |
6477 + compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' | |
6478 + _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ | |
6479 + rm -rf $tpldir~ | |
6480 + $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ | |
6481 + $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ | |
6482 + $RANLIB $oldlib' | |
6483 + _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ | |
6484 + rm -rf $tpldir~ | |
6485 + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ | |
6486 + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' | |
6487 + _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ | |
6488 + rm -rf $tpldir~ | |
6489 + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ | |
6490 + $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' | |
6491 + ;; | |
6492 + *) # Version 6 and above use weak symbols | |
6493 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' | |
6494 + _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' | |
6495 + ;; | |
6496 + esac | |
6497 + | |
6498 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' | |
6499 + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' | |
6500 + _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' | |
6501 + ;; | |
6502 + cxx*) | |
6503 + # Compaq C++ | |
6504 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
6505 + _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' | |
6506 + | |
6507 + runpath_var=LD_RUN_PATH | |
6508 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' | |
6509 + _LT_TAGVAR(hardcode_libdir_separator, $1)=: | |
6510 + | |
6511 + # Commands to make compiler produce verbose output that lists | |
6512 + # what "hidden" libraries, object files and flags are used when | |
6513 + # linking a shared library. | |
6514 + # | |
6515 + # There doesn't appear to be a way to prevent this compiler from | |
6516 + # explicitly linking system object files so we need to strip them | |
6517 + # from the output so that they don't get included in the library | |
6518 + # dependencies. | |
6519 + 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' | |
6520 + ;; | |
6521 + xl* | mpixl* | bgxl*) | |
6522 + # IBM XL 8.0 on PPC, with GNU ld | |
6523 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' | |
6524 + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' | |
6525 + _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
6526 + if test "x$supports_anon_versioning" = xyes; then | |
6527 + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ | |
6528 + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ | |
6529 + echo "local: *; };" >> $output_objdir/$libname.ver~ | |
6530 + $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' | |
6531 + fi | |
6532 + ;; | |
6533 + *) | |
6534 + case `$CC -V 2>&1 | sed 5q` in | |
6535 + *Sun\ C*) | |
6536 + # Sun C++ 5.9 | |
6537 + _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' | |
6538 + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | |
6539 + _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' | |
6540 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' | |
6541 + _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' | |
6542 + _LT_TAGVAR(compiler_needs_object, $1)=yes | |
6543 + | |
6544 + # Not sure whether something based on | |
6545 + # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | |
6546 + # would be better. | |
6547 + output_verbose_link_cmd='func_echo_all' | |
6548 + | |
6549 + # Archives containing C++ object files must be created using | |
6550 + # "CC -xar", where "CC" is the Sun C++ compiler. This is | |
6551 + # necessary to make sure instantiated templates are included | |
6552 + # in the archive. | |
6553 + _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' | |
6554 + ;; | |
6555 + esac | |
6556 + ;; | |
6557 + esac | |
6558 + ;; | |
6559 + | |
6560 + lynxos*) | |
6561 + # FIXME: insert proper C++ library support | |
6562 + _LT_TAGVAR(ld_shlibs, $1)=no | |
6563 + ;; | |
6564 + | |
6565 + m88k*) | |
6566 + # FIXME: insert proper C++ library support | |
6567 + _LT_TAGVAR(ld_shlibs, $1)=no | |
6568 + ;; | |
6569 + | |
6570 + mvs*) | |
6571 + case $cc_basename in | |
6572 + cxx*) | |
6573 + # FIXME: insert proper C++ library support | |
6574 + _LT_TAGVAR(ld_shlibs, $1)=no | |
6575 + ;; | |
6576 + *) | |
6577 + # FIXME: insert proper C++ library support | |
6578 + _LT_TAGVAR(ld_shlibs, $1)=no | |
6579 + ;; | |
6580 + esac | |
6581 + ;; | |
6582 + | |
6583 + netbsd*) | |
6584 + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then | |
6585 + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' | |
6586 + wlarc= | |
6587 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' | |
6588 + _LT_TAGVAR(hardcode_direct, $1)=yes | |
6589 + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | |
6590 + fi | |
6591 + # Workaround some broken pre-1.5 toolchains | |
6592 + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' | |
6593 + ;; | |
6594 + | |
6595 + *nto* | *qnx*) | |
6596 + _LT_TAGVAR(ld_shlibs, $1)=yes | |
6597 + ;; | |
6598 + | |
6599 + openbsd2*) | |
6600 + # C++ shared libraries are fairly broken | |
6601 + _LT_TAGVAR(ld_shlibs, $1)=no | |
6602 + ;; | |
6603 + | |
6604 + openbsd*) | |
6605 + if test -f /usr/libexec/ld.so; then | |
6606 + _LT_TAGVAR(hardcode_direct, $1)=yes | |
6607 + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | |
6608 + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes | |
6609 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' | |
6610 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' | |
6611 + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then | |
6612 + _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' | |
6613 + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' | |
6614 + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' | |
6615 + fi | |
6616 + output_verbose_link_cmd=func_echo_all | |
6617 + else | |
6618 + _LT_TAGVAR(ld_shlibs, $1)=no | |
6619 + fi | |
6620 + ;; | |
6621 + | |
6622 + osf3* | osf4* | osf5*) | |
6623 + case $cc_basename in | |
6624 + KCC*) | |
6625 + # Kuck and Associates, Inc. (KAI) C++ Compiler | |
6626 + | |
6627 + # KCC will only create a shared library if the output file | |
6628 + # ends with ".so" (or ".sl" for HP-UX), so rename the library | |
6629 + # to its proper name (with version) after linking. | |
6630 + _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' | |
6631 + | |
6632 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' | |
6633 + _LT_TAGVAR(hardcode_libdir_separator, $1)=: | |
6634 + | |
6635 + # Archives containing C++ object files must be created using | |
6636 + # the KAI C++ compiler. | |
6637 + case $host in | |
6638 + osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; | |
6639 + *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; | |
6640 + esac | |
6641 + ;; | |
6642 + RCC*) | |
6643 + # Rational C++ 2.4.1 | |
6644 + # FIXME: insert proper C++ library support | |
6645 + _LT_TAGVAR(ld_shlibs, $1)=no | |
6646 + ;; | |
6647 + cxx*) | |
6648 + case $host in | |
6649 + osf3*) | |
6650 + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' | |
6651 + _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' | |
6652 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' | |
6653 + ;; | |
6654 + *) | |
6655 + _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' | |
6656 + _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' | |
6657 + _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ | |
6658 + echo "-hidden">> $lib.exp~ | |
6659 + $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~ | |
6660 + $RM $lib.exp' | |
6661 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' | |
6662 + ;; | |
6663 + esac | |
6664 + | |
6665 + _LT_TAGVAR(hardcode_libdir_separator, $1)=: | |
6666 + | |
6667 + # Commands to make compiler produce verbose output that lists | |
6668 + # what "hidden" libraries, object files and flags are used when | |
6669 + # linking a shared library. | |
6670 + # | |
6671 + # There doesn't appear to be a way to prevent this compiler from | |
6672 + # explicitly linking system object files so we need to strip them | |
6673 + # from the output so that they don't get included in the library | |
6674 + # dependencies. | |
6675 + 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"' | |
6676 + ;; | |
6677 + *) | |
6678 + if test "$GXX" = yes && test "$with_gnu_ld" = no; then | |
6679 + _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' | |
6680 + case $host in | |
6681 + osf3*) | |
6682 + _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' | |
6683 + ;; | |
6684 + *) | |
6685 + _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' | |
6686 + ;; | |
6687 + esac | |
6688 + | |
6689 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' | |
6690 + _LT_TAGVAR(hardcode_libdir_separator, $1)=: | |
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 -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' | |
6696 + | |
6697 + else | |
6698 + # FIXME: insert proper C++ library support | |
6699 + _LT_TAGVAR(ld_shlibs, $1)=no | |
6700 + fi | |
6701 + ;; | |
6702 + esac | |
6703 + ;; | |
6704 + | |
6705 + psos*) | |
6706 + # FIXME: insert proper C++ library support | |
6707 + _LT_TAGVAR(ld_shlibs, $1)=no | |
6708 + ;; | |
6709 + | |
6710 + sunos4*) | |
6711 + case $cc_basename in | |
6712 + CC*) | |
6713 + # Sun C++ 4.x | |
6714 + # FIXME: insert proper C++ library support | |
6715 + _LT_TAGVAR(ld_shlibs, $1)=no | |
6716 + ;; | |
6717 + lcc*) | |
6718 + # Lucid | |
6719 + # FIXME: insert proper C++ library support | |
6720 + _LT_TAGVAR(ld_shlibs, $1)=no | |
6721 + ;; | |
6722 + *) | |
6723 + # FIXME: insert proper C++ library support | |
6724 + _LT_TAGVAR(ld_shlibs, $1)=no | |
6725 + ;; | |
6726 + esac | |
6727 + ;; | |
6728 + | |
6729 + solaris*) | |
6730 + case $cc_basename in | |
6731 + CC* | sunCC*) | |
6732 + # Sun C++ 4.2, 5.x and Centerline C++ | |
6733 + _LT_TAGVAR(archive_cmds_need_lc,$1)=yes | |
6734 + _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' | |
6735 + _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | |
6736 + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ | |
6737 + $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' | |
6738 + | |
6739 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' | |
6740 + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | |
6741 + case $host_os in | |
6742 + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; | |
6743 + *) | |
6744 + # The compiler driver will combine and reorder linker options, | |
6745 + # but understands `-z linker_flag'. | |
6746 + # Supported since Solaris 2.6 (maybe 2.5.1?) | |
6747 + _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' | |
6748 + ;; | |
6749 + esac | |
6750 + _LT_TAGVAR(link_all_deplibs, $1)=yes | |
6751 + | |
6752 + output_verbose_link_cmd='func_echo_all' | |
6753 + | |
6754 + # Archives containing C++ object files must be created using | |
6755 + # "CC -xar", where "CC" is the Sun C++ compiler. This is | |
6756 + # necessary to make sure instantiated templates are included | |
6757 + # in the archive. | |
6758 + _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' | |
6759 + ;; | |
6760 + gcx*) | |
6761 + # Green Hills C++ Compiler | |
6762 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' | |
6763 + | |
6764 + # The C++ compiler must be used to create the archive. | |
6765 + _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' | |
6766 + ;; | |
6767 + *) | |
6768 + # GNU C++ compiler with Solaris linker | |
6769 + if test "$GXX" = yes && test "$with_gnu_ld" = no; then | |
6770 + _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' | |
6771 + if $CC --version | $GREP -v '^2\.7' > /dev/null; then | |
6772 + _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' | |
6773 + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ | |
6774 + $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' | |
6775 + | |
6776 + # Commands to make compiler produce verbose output that lists | |
6777 + # what "hidden" libraries, object files and flags are used when | |
6778 + # linking a shared library. | |
6779 + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' | |
6780 + else | |
6781 + # g++ 2.7 appears to require `-G' NOT `-shared' on this | |
6782 + # platform. | |
6783 + _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' | |
6784 + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ | |
6785 + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' | |
6786 + | |
6787 + # Commands to make compiler produce verbose output that lists | |
6788 + # what "hidden" libraries, object files and flags are used when | |
6789 + # linking a shared library. | |
6790 + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' | |
6791 + fi | |
6792 + | |
6793 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' | |
6794 + case $host_os in | |
6795 + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; | |
6796 + *) | |
6797 + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' | |
6798 + ;; | |
6799 + esac | |
6800 + fi | |
6801 + ;; | |
6802 + esac | |
6803 + ;; | |
6804 + | |
6805 + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) | |
6806 + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' | |
6807 + _LT_TAGVAR(archive_cmds_need_lc, $1)=no | |
6808 + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | |
6809 + runpath_var='LD_RUN_PATH' | |
6810 + | |
6811 + case $cc_basename in | |
6812 + CC*) | |
6813 + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
6814 + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
6815 + ;; | |
6816 + *) | |
6817 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
6818 + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
6819 + ;; | |
6820 + esac | |
6821 + ;; | |
6822 + | |
6823 + sysv5* | sco3.2v5* | sco5v6*) | |
6824 + # Note: We can NOT use -z defs as we might desire, because we do not | |
6825 + # link with -lc, and that would cause any symbols used from libc to | |
6826 + # always be unresolved, which means just about no library would | |
6827 + # ever link correctly. If we're not using GNU ld we use -z text | |
6828 + # though, which does catch some bad symbols but isn't as heavy-handed | |
6829 + # as -z defs. | |
6830 + _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' | |
6831 + _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' | |
6832 + _LT_TAGVAR(archive_cmds_need_lc, $1)=no | |
6833 + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | |
6834 + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' | |
6835 + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' | |
6836 + _LT_TAGVAR(link_all_deplibs, $1)=yes | |
6837 + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' | |
6838 + runpath_var='LD_RUN_PATH' | |
6839 + | |
6840 + case $cc_basename in | |
6841 + CC*) | |
6842 + _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
6843 + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
6844 + _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ | |
6845 + '"$_LT_TAGVAR(old_archive_cmds, $1)" | |
6846 + _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ | |
6847 + '"$_LT_TAGVAR(reload_cmds, $1)" | |
6848 + ;; | |
6849 + *) | |
6850 + _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
6851 + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | |
6852 + ;; | |
6853 + esac | |
6854 + ;; | |
6855 + | |
6856 + tandem*) | |
6857 + case $cc_basename in | |
6858 + NCC*) | |
6859 + # NonStop-UX NCC 3.20 | |
6860 + # FIXME: insert proper C++ library support | |
6861 + _LT_TAGVAR(ld_shlibs, $1)=no | |
6862 + ;; | |
6863 + *) | |
6864 + # FIXME: insert proper C++ library support | |
6865 + _LT_TAGVAR(ld_shlibs, $1)=no | |
6866 + ;; | |
6867 + esac | |
6868 + ;; | |
6869 + | |
6870 + vxworks*) | |
6871 + # FIXME: insert proper C++ library support | |
6872 + _LT_TAGVAR(ld_shlibs, $1)=no | |
6873 + ;; | |
6874 + | |
6875 + *) | |
6876 + # FIXME: insert proper C++ library support | |
6877 + _LT_TAGVAR(ld_shlibs, $1)=no | |
6878 + ;; | |
6879 + esac | |
6880 + | |
6881 + AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) | |
6882 + test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no | |
6883 + | |
6884 + _LT_TAGVAR(GCC, $1)="$GXX" | |
6885 + _LT_TAGVAR(LD, $1)="$LD" | |
6886 + | |
6887 + ## CAVEAT EMPTOR: | |
6888 + ## There is no encapsulation within the following macros, do not change | |
6889 + ## the running order or otherwise move them around unless you know exactly | |
6890 + ## what you are doing... | |
6891 + _LT_SYS_HIDDEN_LIBDEPS($1) | |
6892 + _LT_COMPILER_PIC($1) | |
6893 + _LT_COMPILER_C_O($1) | |
6894 + _LT_COMPILER_FILE_LOCKS($1) | |
6895 + _LT_LINKER_SHLIBS($1) | |
6896 + _LT_SYS_DYNAMIC_LINKER($1) | |
6897 + _LT_LINKER_HARDCODE_LIBPATH($1) | |
6898 + | |
6899 + _LT_CONFIG($1) | |
6900 + fi # test -n "$compiler" | |
6901 + | |
6902 + CC=$lt_save_CC | |
6903 + CFLAGS=$lt_save_CFLAGS | |
6904 + LDCXX=$LD | |
6905 + LD=$lt_save_LD | |
6906 + GCC=$lt_save_GCC | |
6907 + with_gnu_ld=$lt_save_with_gnu_ld | |
6908 + lt_cv_path_LDCXX=$lt_cv_path_LD | |
6909 + lt_cv_path_LD=$lt_save_path_LD | |
6910 + lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld | |
6911 + lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld | |
6912 +fi # test "$_lt_caught_CXX_error" != yes | |
6913 + | |
6914 +AC_LANG_POP | |
6915 +])# _LT_LANG_CXX_CONFIG | |
6916 + | |
6917 + | |
6918 +# _LT_FUNC_STRIPNAME_CNF | |
6919 +# ---------------------- | |
6920 +# func_stripname_cnf prefix suffix name | |
6921 +# strip PREFIX and SUFFIX off of NAME. | |
6922 +# PREFIX and SUFFIX must not contain globbing or regex special | |
6923 +# characters, hashes, percent signs, but SUFFIX may contain a leading | |
6924 +# dot (in which case that matches only a dot). | |
6925 +# | |
6926 +# This function is identical to the (non-XSI) version of func_stripname, | |
6927 +# except this one can be used by m4 code that may be executed by configure, | |
6928 +# rather than the libtool script. | |
6929 +m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl | |
6930 +AC_REQUIRE([_LT_DECL_SED]) | |
6931 +AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) | |
6932 +func_stripname_cnf () | |
6933 +{ | |
6934 + case ${2} in | |
6935 + .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; | |
6936 + *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; | |
6937 + esac | |
6938 +} # func_stripname_cnf | |
6939 +])# _LT_FUNC_STRIPNAME_CNF | |
6940 + | |
6941 +# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) | |
6942 +# --------------------------------- | |
6943 +# Figure out "hidden" library dependencies from verbose | |
6944 +# compiler output when linking a shared library. | |
6945 +# Parse the compiler output and extract the necessary | |
6946 +# objects, libraries and library flags. | |
6947 +m4_defun([_LT_SYS_HIDDEN_LIBDEPS], | |
6948 +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl | |
6949 +AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl | |
6950 +# Dependencies to place before and after the object being linked: | |
6951 +_LT_TAGVAR(predep_objects, $1)= | |
6952 +_LT_TAGVAR(postdep_objects, $1)= | |
6953 +_LT_TAGVAR(predeps, $1)= | |
6954 +_LT_TAGVAR(postdeps, $1)= | |
6955 +_LT_TAGVAR(compiler_lib_search_path, $1)= | |
6956 + | |
6957 +dnl we can't use the lt_simple_compile_test_code here, | |
6958 +dnl because it contains code intended for an executable, | |
6959 +dnl not a library. It's possible we should let each | |
6960 +dnl tag define a new lt_????_link_test_code variable, | |
6961 +dnl but it's only used here... | |
6962 +m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF | |
6963 +int a; | |
6964 +void foo (void) { a = 0; } | |
6965 +_LT_EOF | |
6966 +], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF | |
6967 +class Foo | |
6968 +{ | |
6969 +public: | |
6970 + Foo (void) { a = 0; } | |
6971 +private: | |
6972 + int a; | |
6973 +}; | |
6974 +_LT_EOF | |
6975 +], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF | |
6976 + subroutine foo | |
6977 + implicit none | |
6978 + integer*4 a | |
6979 + a=0 | |
6980 + return | |
6981 + end | |
6982 +_LT_EOF | |
6983 +], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF | |
6984 + subroutine foo | |
6985 + implicit none | |
6986 + integer a | |
6987 + a=0 | |
6988 + return | |
6989 + end | |
6990 +_LT_EOF | |
6991 +], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF | |
6992 +public class foo { | |
6993 + private int a; | |
6994 + public void bar (void) { | |
6995 + a = 0; | |
6996 + } | |
6997 +}; | |
6998 +_LT_EOF | |
6999 +], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF | |
7000 +package foo | |
7001 +func foo() { | |
7002 +} | |
7003 +_LT_EOF | |
7004 +]) | |
7005 + | |
7006 +_lt_libdeps_save_CFLAGS=$CFLAGS | |
7007 +case "$CC $CFLAGS " in #( | |
7008 +*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; | |
7009 +*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; | |
7010 +*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; | |
7011 +esac | |
7012 + | |
7013 +dnl Parse the compiler output and extract the necessary | |
7014 +dnl objects, libraries and library flags. | |
7015 +if AC_TRY_EVAL(ac_compile); then | |
7016 + # Parse the compiler output and extract the necessary | |
7017 + # objects, libraries and library flags. | |
7018 + | |
7019 + # Sentinel used to keep track of whether or not we are before | |
7020 + # the conftest object file. | |
7021 + pre_test_object_deps_done=no | |
7022 + | |
7023 + for p in `eval "$output_verbose_link_cmd"`; do | |
7024 + case ${prev}${p} in | |
7025 + | |
7026 + -L* | -R* | -l*) | |
7027 + # Some compilers place space between "-{L,R}" and the path. | |
7028 + # Remove the space. | |
7029 + if test $p = "-L" || | |
7030 + test $p = "-R"; then | |
7031 + prev=$p | |
7032 + continue | |
7033 + fi | |
7034 + | |
7035 + # Expand the sysroot to ease extracting the directories later. | |
7036 + if test -z "$prev"; then | |
7037 + case $p in | |
7038 + -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; | |
7039 + -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; | |
7040 + -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; | |
7041 + esac | |
7042 + fi | |
7043 + case $p in | |
7044 + =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; | |
7045 + esac | |
7046 + if test "$pre_test_object_deps_done" = no; then | |
7047 + case ${prev} in | |
7048 + -L | -R) | |
7049 + # Internal compiler library paths should come after those | |
7050 + # provided the user. The postdeps already come after the | |
7051 + # user supplied libs so there is no need to process them. | |
7052 + if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then | |
7053 + _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" | |
7054 + else | |
7055 + _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" | |
7056 + fi | |
7057 + ;; | |
7058 + # The "-l" case would never come before the object being | |
7059 + # linked, so don't bother handling this case. | |
7060 + esac | |
7061 + else | |
7062 + if test -z "$_LT_TAGVAR(postdeps, $1)"; then | |
7063 + _LT_TAGVAR(postdeps, $1)="${prev}${p}" | |
7064 + else | |
7065 + _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" | |
7066 + fi | |
7067 + fi | |
7068 + prev= | |
7069 + ;; | |
7070 + | |
7071 + *.lto.$objext) ;; # Ignore GCC LTO objects | |
7072 + *.$objext) | |
7073 + # This assumes that the test object file only shows up | |
7074 + # once in the compiler output. | |
7075 + if test "$p" = "conftest.$objext"; then | |
7076 + pre_test_object_deps_done=yes | |
7077 + continue | |
7078 + fi | |
7079 + | |
7080 + if test "$pre_test_object_deps_done" = no; then | |
7081 + if test -z "$_LT_TAGVAR(predep_objects, $1)"; then | |
7082 + _LT_TAGVAR(predep_objects, $1)="$p" | |
7083 + else | |
7084 + _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" | |
7085 + fi | |
7086 + else | |
7087 + if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then | |
7088 + _LT_TAGVAR(postdep_objects, $1)="$p" | |
7089 + else | |
7090 + _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" | |
7091 + fi | |
7092 + fi | |
7093 + ;; | |
7094 + | |
7095 + *) ;; # Ignore the rest. | |
7096 + | |
7097 + esac | |
7098 + done | |
7099 + | |
7100 + # Clean up. | |
7101 + rm -f a.out a.exe | |
7102 +else | |
7103 + echo "libtool.m4: error: problem compiling $1 test program" | |
7104 +fi | |
7105 + | |
7106 +$RM -f confest.$objext | |
7107 +CFLAGS=$_lt_libdeps_save_CFLAGS | |
7108 + | |
7109 +# PORTME: override above test on systems where it is broken | |
7110 +m4_if([$1], [CXX], | |
7111 +[case $host_os in | |
7112 +interix[[3-9]]*) | |
7113 + # Interix 3.5 installs completely hosed .la files for C++, so rather than | |
7114 + # hack all around it, let's just trust "g++" to DTRT. | |
7115 + _LT_TAGVAR(predep_objects,$1)= | |
7116 + _LT_TAGVAR(postdep_objects,$1)= | |
7117 + _LT_TAGVAR(postdeps,$1)= | |
7118 + ;; | |
7119 + | |
7120 +linux*) | |
7121 + case `$CC -V 2>&1 | sed 5q` in | |
7122 + *Sun\ C*) | |
7123 + # Sun C++ 5.9 | |
7124 + | |
7125 + # The more standards-conforming stlport4 library is | |
7126 + # incompatible with the Cstd library. Avoid specifying | |
7127 + # it if it's in CXXFLAGS. Ignore libCrun as | |
7128 + # -library=stlport4 depends on it. | |
7129 + case " $CXX $CXXFLAGS " in | |
7130 + *" -library=stlport4 "*) | |
7131 + solaris_use_stlport4=yes | |
7132 + ;; | |
7133 + esac | |
7134 + | |
7135 + if test "$solaris_use_stlport4" != yes; then | |
7136 + _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' | |
7137 + fi | |
7138 + ;; | |
7139 + esac | |
7140 + ;; | |
7141 + | |
7142 +solaris*) | |
7143 + case $cc_basename in | |
7144 + CC* | sunCC*) | |
7145 + # The more standards-conforming stlport4 library is | |
7146 + # incompatible with the Cstd library. Avoid specifying | |
7147 + # it if it's in CXXFLAGS. Ignore libCrun as | |
7148 + # -library=stlport4 depends on it. | |
7149 + case " $CXX $CXXFLAGS " in | |
7150 + *" -library=stlport4 "*) | |
7151 + solaris_use_stlport4=yes | |
7152 + ;; | |
7153 + esac | |
7154 + | |
7155 + # Adding this requires a known-good setup of shared libraries for | |
7156 + # Sun compiler versions before 5.6, else PIC objects from an old | |
7157 + # archive will be linked into the output, leading to subtle bugs. | |
7158 + if test "$solaris_use_stlport4" != yes; then | |
7159 + _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' | |
7160 + fi | |
7161 + ;; | |
7162 + esac | |
7163 + ;; | |
7164 +esac | |
7165 +]) | |
7166 + | |
7167 +case " $_LT_TAGVAR(postdeps, $1) " in | |
7168 +*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; | |
7169 +esac | |
7170 + _LT_TAGVAR(compiler_lib_search_dirs, $1)= | |
7171 +if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then | |
7172 + _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` | |
7173 +fi | |
7174 +_LT_TAGDECL([], [compiler_lib_search_dirs], [1], | |
7175 + [The directories searched by this compiler when creating a shared library]) | |
7176 +_LT_TAGDECL([], [predep_objects], [1], | |
7177 + [Dependencies to place before and after the objects being linked to | |
7178 + create a shared library]) | |
7179 +_LT_TAGDECL([], [postdep_objects], [1]) | |
7180 +_LT_TAGDECL([], [predeps], [1]) | |
7181 +_LT_TAGDECL([], [postdeps], [1]) | |
7182 +_LT_TAGDECL([], [compiler_lib_search_path], [1], | |
7183 + [The library search path used internally by the compiler when linking | |
7184 + a shared library]) | |
7185 +])# _LT_SYS_HIDDEN_LIBDEPS | |
7186 + | |
7187 + | |
7188 +# _LT_LANG_F77_CONFIG([TAG]) | |
7189 +# -------------------------- | |
7190 +# Ensure that the configuration variables for a Fortran 77 compiler are | |
7191 +# suitably defined. These variables are subsequently used by _LT_CONFIG | |
7192 +# to write the compiler configuration to `libtool'. | |
7193 +m4_defun([_LT_LANG_F77_CONFIG], | |
7194 +[AC_LANG_PUSH(Fortran 77) | |
7195 +if test -z "$F77" || test "X$F77" = "Xno"; then | |
7196 + _lt_disable_F77=yes | |
7197 +fi | |
7198 + | |
7199 +_LT_TAGVAR(archive_cmds_need_lc, $1)=no | |
7200 +_LT_TAGVAR(allow_undefined_flag, $1)= | |
7201 +_LT_TAGVAR(always_export_symbols, $1)=no | |
7202 +_LT_TAGVAR(archive_expsym_cmds, $1)= | |
7203 +_LT_TAGVAR(export_dynamic_flag_spec, $1)= | |
7204 +_LT_TAGVAR(hardcode_direct, $1)=no | |
7205 +_LT_TAGVAR(hardcode_direct_absolute, $1)=no | |
7206 +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= | |
7207 +_LT_TAGVAR(hardcode_libdir_separator, $1)= | |
7208 +_LT_TAGVAR(hardcode_minus_L, $1)=no | |
7209 +_LT_TAGVAR(hardcode_automatic, $1)=no | |
7210 +_LT_TAGVAR(inherit_rpath, $1)=no | |
7211 +_LT_TAGVAR(module_cmds, $1)= | |
7212 +_LT_TAGVAR(module_expsym_cmds, $1)= | |
7213 +_LT_TAGVAR(link_all_deplibs, $1)=unknown | |
7214 +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds | |
7215 +_LT_TAGVAR(reload_flag, $1)=$reload_flag | |
7216 +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds | |
7217 +_LT_TAGVAR(no_undefined_flag, $1)= | |
7218 +_LT_TAGVAR(whole_archive_flag_spec, $1)= | |
7219 +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no | |
7220 + | |
7221 +# Source file extension for f77 test sources. | |
7222 +ac_ext=f | |
7223 + | |
7224 +# Object file extension for compiled f77 test sources. | |
7225 +objext=o | |
7226 +_LT_TAGVAR(objext, $1)=$objext | |
7227 + | |
7228 +# No sense in running all these tests if we already determined that | |
7229 +# the F77 compiler isn't working. Some variables (like enable_shared) | |
7230 +# are currently assumed to apply to all compilers on this platform, | |
7231 +# and will be corrupted by setting them based on a non-working compiler. | |
7232 +if test "$_lt_disable_F77" != yes; then | |
7233 + # Code to be used in simple compile tests | |
7234 + lt_simple_compile_test_code="\ | |
7235 + subroutine t | |
7236 + return | |
7237 + end | |
7238 +" | |
7239 + | |
7240 + # Code to be used in simple link tests | |
7241 + lt_simple_link_test_code="\ | |
7242 + program t | |
7243 + end | |
7244 +" | |
7245 + | |
7246 + # ltmain only uses $CC for tagged configurations so make sure $CC is set. | |
7247 + _LT_TAG_COMPILER | |
7248 + | |
7249 + # save warnings/boilerplate of simple test code | |
7250 + _LT_COMPILER_BOILERPLATE | |
7251 + _LT_LINKER_BOILERPLATE | |
7252 + | |
7253 + # Allow CC to be a program name with arguments. | |
7254 + lt_save_CC="$CC" | |
7255 + lt_save_GCC=$GCC | |
7256 + lt_save_CFLAGS=$CFLAGS | |
7257 + CC=${F77-"f77"} | |
7258 + CFLAGS=$FFLAGS | |
7259 + compiler=$CC | |
7260 + _LT_TAGVAR(compiler, $1)=$CC | |
7261 + _LT_CC_BASENAME([$compiler]) | |
7262 + GCC=$G77 | |
7263 + if test -n "$compiler"; then | |
7264 + AC_MSG_CHECKING([if libtool supports shared libraries]) | |
7265 + AC_MSG_RESULT([$can_build_shared]) | |
7266 + | |
7267 + AC_MSG_CHECKING([whether to build shared libraries]) | |
7268 + test "$can_build_shared" = "no" && enable_shared=no | |
7269 + | |
7270 + # On AIX, shared libraries and static libraries use the same namespace, and | |
7271 + # are all built from PIC. | |
7272 + case $host_os in | |
7273 + aix3*) | |
7274 + test "$enable_shared" = yes && enable_static=no | |
7275 + if test -n "$RANLIB"; then | |
7276 + archive_cmds="$archive_cmds~\$RANLIB \$lib" | |
7277 + postinstall_cmds='$RANLIB $lib' | |
7278 + fi | |
7279 + ;; | |
7280 + aix[[4-9]]*) | |
7281 + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then | |
7282 + test "$enable_shared" = yes && enable_static=no | |
7283 + fi | |
7284 + ;; | |
7285 + esac | |
7286 + AC_MSG_RESULT([$enable_shared]) | |
7287 + | |
7288 + AC_MSG_CHECKING([whether to build static libraries]) | |
7289 + # Make sure either enable_shared or enable_static is yes. | |
7290 + test "$enable_shared" = yes || enable_static=yes | |
7291 + AC_MSG_RESULT([$enable_static]) | |
7292 + | |
7293 + _LT_TAGVAR(GCC, $1)="$G77" | |
7294 + _LT_TAGVAR(LD, $1)="$LD" | |
7295 + | |
7296 + ## CAVEAT EMPTOR: | |
7297 + ## There is no encapsulation within the following macros, do not change | |
7298 + ## the running order or otherwise move them around unless you know exactly | |
7299 + ## what you are doing... | |
7300 + _LT_COMPILER_PIC($1) | |
7301 + _LT_COMPILER_C_O($1) | |
7302 + _LT_COMPILER_FILE_LOCKS($1) | |
7303 + _LT_LINKER_SHLIBS($1) | |
7304 + _LT_SYS_DYNAMIC_LINKER($1) | |
7305 + _LT_LINKER_HARDCODE_LIBPATH($1) | |
7306 + | |
7307 + _LT_CONFIG($1) | |
7308 + fi # test -n "$compiler" | |
7309 + | |
7310 + GCC=$lt_save_GCC | |
7311 + CC="$lt_save_CC" | |
7312 + CFLAGS="$lt_save_CFLAGS" | |
7313 +fi # test "$_lt_disable_F77" != yes | |
7314 + | |
7315 +AC_LANG_POP | |
7316 +])# _LT_LANG_F77_CONFIG | |
7317 + | |
7318 + | |
7319 +# _LT_LANG_FC_CONFIG([TAG]) | |
7320 +# ------------------------- | |
7321 +# Ensure that the configuration variables for a Fortran compiler are | |
7322 +# suitably defined. These variables are subsequently used by _LT_CONFIG | |
7323 +# to write the compiler configuration to `libtool'. | |
7324 +m4_defun([_LT_LANG_FC_CONFIG], | |
7325 +[AC_LANG_PUSH(Fortran) | |
7326 + | |
7327 +if test -z "$FC" || test "X$FC" = "Xno"; then | |
7328 + _lt_disable_FC=yes | |
7329 +fi | |
7330 + | |
7331 +_LT_TAGVAR(archive_cmds_need_lc, $1)=no | |
7332 +_LT_TAGVAR(allow_undefined_flag, $1)= | |
7333 +_LT_TAGVAR(always_export_symbols, $1)=no | |
7334 +_LT_TAGVAR(archive_expsym_cmds, $1)= | |
7335 +_LT_TAGVAR(export_dynamic_flag_spec, $1)= | |
7336 +_LT_TAGVAR(hardcode_direct, $1)=no | |
7337 +_LT_TAGVAR(hardcode_direct_absolute, $1)=no | |
7338 +_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= | |
7339 +_LT_TAGVAR(hardcode_libdir_separator, $1)= | |
7340 +_LT_TAGVAR(hardcode_minus_L, $1)=no | |
7341 +_LT_TAGVAR(hardcode_automatic, $1)=no | |
7342 +_LT_TAGVAR(inherit_rpath, $1)=no | |
7343 +_LT_TAGVAR(module_cmds, $1)= | |
7344 +_LT_TAGVAR(module_expsym_cmds, $1)= | |
7345 +_LT_TAGVAR(link_all_deplibs, $1)=unknown | |
7346 +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds | |
7347 +_LT_TAGVAR(reload_flag, $1)=$reload_flag | |
7348 +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds | |
7349 +_LT_TAGVAR(no_undefined_flag, $1)= | |
7350 +_LT_TAGVAR(whole_archive_flag_spec, $1)= | |
7351 +_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no | |
7352 + | |
7353 +# Source file extension for fc test sources. | |
7354 +ac_ext=${ac_fc_srcext-f} | |
7355 + | |
7356 +# Object file extension for compiled fc test sources. | |
7357 +objext=o | |
7358 +_LT_TAGVAR(objext, $1)=$objext | |
7359 + | |
7360 +# No sense in running all these tests if we already determined that | |
7361 +# the FC compiler isn't working. Some variables (like enable_shared) | |
7362 +# are currently assumed to apply to all compilers on this platform, | |
7363 +# and will be corrupted by setting them based on a non-working compiler. | |
7364 +if test "$_lt_disable_FC" != yes; then | |
7365 + # Code to be used in simple compile tests | |
7366 + lt_simple_compile_test_code="\ | |
7367 + subroutine t | |
7368 + return | |
7369 + end | |
7370 +" | |
7371 + | |
7372 + # Code to be used in simple link tests | |
7373 + lt_simple_link_test_code="\ | |
7374 + program t | |
7375 + end | |
7376 +" | |
7377 + | |
7378 + # ltmain only uses $CC for tagged configurations so make sure $CC is set. | |
7379 + _LT_TAG_COMPILER | |
7380 + | |
7381 + # save warnings/boilerplate of simple test code | |
7382 + _LT_COMPILER_BOILERPLATE | |
7383 + _LT_LINKER_BOILERPLATE | |
7384 + | |
7385 + # Allow CC to be a program name with arguments. | |
7386 + lt_save_CC="$CC" | |
7387 + lt_save_GCC=$GCC | |
7388 + lt_save_CFLAGS=$CFLAGS | |
7389 + CC=${FC-"f95"} | |
7390 + CFLAGS=$FCFLAGS | |
7391 + compiler=$CC | |
7392 + GCC=$ac_cv_fc_compiler_gnu | |
7393 + | |
7394 + _LT_TAGVAR(compiler, $1)=$CC | |
7395 + _LT_CC_BASENAME([$compiler]) | |
7396 + | |
7397 + if test -n "$compiler"; then | |
7398 + AC_MSG_CHECKING([if libtool supports shared libraries]) | |
7399 + AC_MSG_RESULT([$can_build_shared]) | |
7400 + | |
7401 + AC_MSG_CHECKING([whether to build shared libraries]) | |
7402 + test "$can_build_shared" = "no" && enable_shared=no | |
7403 + | |
7404 + # On AIX, shared libraries and static libraries use the same namespace, and | |
7405 + # are all built from PIC. | |
7406 + case $host_os in | |
7407 + aix3*) | |
7408 + test "$enable_shared" = yes && enable_static=no | |
7409 + if test -n "$RANLIB"; then | |
7410 + archive_cmds="$archive_cmds~\$RANLIB \$lib" | |
7411 + postinstall_cmds='$RANLIB $lib' | |
7412 + fi | |
7413 + ;; | |
7414 + aix[[4-9]]*) | |
7415 + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then | |
7416 + test "$enable_shared" = yes && enable_static=no | |
7417 + fi | |
7418 + ;; | |
7419 + esac | |
7420 + AC_MSG_RESULT([$enable_shared]) | |
7421 + | |
7422 + AC_MSG_CHECKING([whether to build static libraries]) | |
7423 + # Make sure either enable_shared or enable_static is yes. | |
7424 + test "$enable_shared" = yes || enable_static=yes | |
7425 + AC_MSG_RESULT([$enable_static]) | |
7426 + | |
7427 + _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" | |
7428 + _LT_TAGVAR(LD, $1)="$LD" | |
7429 + | |
7430 + ## CAVEAT EMPTOR: | |
7431 + ## There is no encapsulation within the following macros, do not change | |
7432 + ## the running order or otherwise move them around unless you know exactly | |
7433 + ## what you are doing... | |
7434 + _LT_SYS_HIDDEN_LIBDEPS($1) | |
7435 + _LT_COMPILER_PIC($1) | |
7436 + _LT_COMPILER_C_O($1) | |
7437 + _LT_COMPILER_FILE_LOCKS($1) | |
7438 + _LT_LINKER_SHLIBS($1) | |
7439 + _LT_SYS_DYNAMIC_LINKER($1) | |
7440 + _LT_LINKER_HARDCODE_LIBPATH($1) | |
7441 + | |
7442 + _LT_CONFIG($1) | |
7443 + fi # test -n "$compiler" | |
7444 + | |
7445 + GCC=$lt_save_GCC | |
7446 + CC=$lt_save_CC | |
7447 + CFLAGS=$lt_save_CFLAGS | |
7448 +fi # test "$_lt_disable_FC" != yes | |
7449 + | |
7450 +AC_LANG_POP | |
7451 +])# _LT_LANG_FC_CONFIG | |
7452 + | |
7453 + | |
7454 +# _LT_LANG_GCJ_CONFIG([TAG]) | |
7455 +# -------------------------- | |
7456 +# Ensure that the configuration variables for the GNU Java Compiler compiler | |
7457 +# are suitably defined. These variables are subsequently used by _LT_CONFIG | |
7458 +# to write the compiler configuration to `libtool'. | |
7459 +m4_defun([_LT_LANG_GCJ_CONFIG], | |
7460 +[AC_REQUIRE([LT_PROG_GCJ])dnl | |
7461 +AC_LANG_SAVE | |
7462 + | |
7463 +# Source file extension for Java test sources. | |
7464 +ac_ext=java | |
7465 + | |
7466 +# Object file extension for compiled Java test sources. | |
7467 +objext=o | |
7468 +_LT_TAGVAR(objext, $1)=$objext | |
7469 + | |
7470 +# Code to be used in simple compile tests | |
7471 +lt_simple_compile_test_code="class foo {}" | |
7472 + | |
7473 +# Code to be used in simple link tests | |
7474 +lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' | |
7475 + | |
7476 +# ltmain only uses $CC for tagged configurations so make sure $CC is set. | |
7477 +_LT_TAG_COMPILER | |
7478 + | |
7479 +# save warnings/boilerplate of simple test code | |
7480 +_LT_COMPILER_BOILERPLATE | |
7481 +_LT_LINKER_BOILERPLATE | |
7482 + | |
7483 +# Allow CC to be a program name with arguments. | |
7484 +lt_save_CC=$CC | |
7485 +lt_save_CFLAGS=$CFLAGS | |
7486 +lt_save_GCC=$GCC | |
7487 +GCC=yes | |
7488 +CC=${GCJ-"gcj"} | |
7489 +CFLAGS=$GCJFLAGS | |
7490 +compiler=$CC | |
7491 +_LT_TAGVAR(compiler, $1)=$CC | |
7492 +_LT_TAGVAR(LD, $1)="$LD" | |
7493 +_LT_CC_BASENAME([$compiler]) | |
7494 + | |
7495 +# GCJ did not exist at the time GCC didn't implicitly link libc in. | |
7496 +_LT_TAGVAR(archive_cmds_need_lc, $1)=no | |
7497 + | |
7498 +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds | |
7499 +_LT_TAGVAR(reload_flag, $1)=$reload_flag | |
7500 +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds | |
7501 + | |
7502 +if test -n "$compiler"; then | |
7503 + _LT_COMPILER_NO_RTTI($1) | |
7504 + _LT_COMPILER_PIC($1) | |
7505 + _LT_COMPILER_C_O($1) | |
7506 + _LT_COMPILER_FILE_LOCKS($1) | |
7507 + _LT_LINKER_SHLIBS($1) | |
7508 + _LT_LINKER_HARDCODE_LIBPATH($1) | |
7509 + | |
7510 + _LT_CONFIG($1) | |
7511 +fi | |
7512 + | |
7513 +AC_LANG_RESTORE | |
7514 + | |
7515 +GCC=$lt_save_GCC | |
7516 +CC=$lt_save_CC | |
7517 +CFLAGS=$lt_save_CFLAGS | |
7518 +])# _LT_LANG_GCJ_CONFIG | |
7519 + | |
7520 + | |
7521 +# _LT_LANG_GO_CONFIG([TAG]) | |
7522 +# -------------------------- | |
7523 +# Ensure that the configuration variables for the GNU Go compiler | |
7524 +# are suitably defined. These variables are subsequently used by _LT_CONFIG | |
7525 +# to write the compiler configuration to `libtool'. | |
7526 +m4_defun([_LT_LANG_GO_CONFIG], | |
7527 +[AC_REQUIRE([LT_PROG_GO])dnl | |
7528 +AC_LANG_SAVE | |
7529 + | |
7530 +# Source file extension for Go test sources. | |
7531 +ac_ext=go | |
7532 + | |
7533 +# Object file extension for compiled Go test sources. | |
7534 +objext=o | |
7535 +_LT_TAGVAR(objext, $1)=$objext | |
7536 + | |
7537 +# Code to be used in simple compile tests | |
7538 +lt_simple_compile_test_code="package main; func main() { }" | |
7539 + | |
7540 +# Code to be used in simple link tests | |
7541 +lt_simple_link_test_code='package main; func main() { }' | |
7542 + | |
7543 +# ltmain only uses $CC for tagged configurations so make sure $CC is set. | |
7544 +_LT_TAG_COMPILER | |
7545 + | |
7546 +# save warnings/boilerplate of simple test code | |
7547 +_LT_COMPILER_BOILERPLATE | |
7548 +_LT_LINKER_BOILERPLATE | |
7549 + | |
7550 +# Allow CC to be a program name with arguments. | |
7551 +lt_save_CC=$CC | |
7552 +lt_save_CFLAGS=$CFLAGS | |
7553 +lt_save_GCC=$GCC | |
7554 +GCC=yes | |
7555 +CC=${GOC-"gccgo"} | |
7556 +CFLAGS=$GOFLAGS | |
7557 +compiler=$CC | |
7558 +_LT_TAGVAR(compiler, $1)=$CC | |
7559 +_LT_TAGVAR(LD, $1)="$LD" | |
7560 +_LT_CC_BASENAME([$compiler]) | |
7561 + | |
7562 +# Go did not exist at the time GCC didn't implicitly link libc in. | |
7563 +_LT_TAGVAR(archive_cmds_need_lc, $1)=no | |
7564 + | |
7565 +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds | |
7566 +_LT_TAGVAR(reload_flag, $1)=$reload_flag | |
7567 +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds | |
7568 + | |
7569 +if test -n "$compiler"; then | |
7570 + _LT_COMPILER_NO_RTTI($1) | |
7571 + _LT_COMPILER_PIC($1) | |
7572 + _LT_COMPILER_C_O($1) | |
7573 + _LT_COMPILER_FILE_LOCKS($1) | |
7574 + _LT_LINKER_SHLIBS($1) | |
7575 + _LT_LINKER_HARDCODE_LIBPATH($1) | |
7576 + | |
7577 + _LT_CONFIG($1) | |
7578 +fi | |
7579 + | |
7580 +AC_LANG_RESTORE | |
7581 + | |
7582 +GCC=$lt_save_GCC | |
7583 +CC=$lt_save_CC | |
7584 +CFLAGS=$lt_save_CFLAGS | |
7585 +])# _LT_LANG_GO_CONFIG | |
7586 + | |
7587 + | |
7588 +# _LT_LANG_RC_CONFIG([TAG]) | |
7589 +# ------------------------- | |
7590 +# Ensure that the configuration variables for the Windows resource compiler | |
7591 +# are suitably defined. These variables are subsequently used by _LT_CONFIG | |
7592 +# to write the compiler configuration to `libtool'. | |
7593 +m4_defun([_LT_LANG_RC_CONFIG], | |
7594 +[AC_REQUIRE([LT_PROG_RC])dnl | |
7595 +AC_LANG_SAVE | |
7596 + | |
7597 +# Source file extension for RC test sources. | |
7598 +ac_ext=rc | |
7599 + | |
7600 +# Object file extension for compiled RC test sources. | |
7601 +objext=o | |
7602 +_LT_TAGVAR(objext, $1)=$objext | |
7603 + | |
7604 +# Code to be used in simple compile tests | |
7605 +lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' | |
7606 + | |
7607 +# Code to be used in simple link tests | |
7608 +lt_simple_link_test_code="$lt_simple_compile_test_code" | |
7609 + | |
7610 +# ltmain only uses $CC for tagged configurations so make sure $CC is set. | |
7611 +_LT_TAG_COMPILER | |
7612 + | |
7613 +# save warnings/boilerplate of simple test code | |
7614 +_LT_COMPILER_BOILERPLATE | |
7615 +_LT_LINKER_BOILERPLATE | |
7616 + | |
7617 +# Allow CC to be a program name with arguments. | |
7618 +lt_save_CC="$CC" | |
7619 +lt_save_CFLAGS=$CFLAGS | |
7620 +lt_save_GCC=$GCC | |
7621 +GCC= | |
7622 +CC=${RC-"windres"} | |
7623 +CFLAGS= | |
7624 +compiler=$CC | |
7625 +_LT_TAGVAR(compiler, $1)=$CC | |
7626 +_LT_CC_BASENAME([$compiler]) | |
7627 +_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes | |
7628 + | |
7629 +if test -n "$compiler"; then | |
7630 + : | |
7631 + _LT_CONFIG($1) | |
7632 +fi | |
7633 + | |
7634 +GCC=$lt_save_GCC | |
7635 +AC_LANG_RESTORE | |
7636 +CC=$lt_save_CC | |
7637 +CFLAGS=$lt_save_CFLAGS | |
7638 +])# _LT_LANG_RC_CONFIG | |
7639 + | |
7640 + | |
7641 +# LT_PROG_GCJ | |
7642 +# ----------- | |
7643 +AC_DEFUN([LT_PROG_GCJ], | |
7644 +[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], | |
7645 + [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], | |
7646 + [AC_CHECK_TOOL(GCJ, gcj,) | |
7647 + test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" | |
7648 + AC_SUBST(GCJFLAGS)])])[]dnl | |
7649 +]) | |
7650 + | |
7651 +# Old name: | |
7652 +AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) | |
7653 +dnl aclocal-1.4 backwards compatibility: | |
7654 +dnl AC_DEFUN([LT_AC_PROG_GCJ], []) | |
7655 + | |
7656 + | |
7657 +# LT_PROG_GO | |
7658 +# ---------- | |
7659 +AC_DEFUN([LT_PROG_GO], | |
7660 +[AC_CHECK_TOOL(GOC, gccgo,) | |
7661 +]) | |
7662 + | |
7663 + | |
7664 +# LT_PROG_RC | |
7665 +# ---------- | |
7666 +AC_DEFUN([LT_PROG_RC], | |
7667 +[AC_CHECK_TOOL(RC, windres,) | |
7668 +]) | |
7669 + | |
7670 +# Old name: | |
7671 +AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) | |
7672 +dnl aclocal-1.4 backwards compatibility: | |
7673 +dnl AC_DEFUN([LT_AC_PROG_RC], []) | |
7674 + | |
7675 + | |
7676 +# _LT_DECL_EGREP | |
7677 +# -------------- | |
7678 +# If we don't have a new enough Autoconf to choose the best grep | |
7679 +# available, choose the one first in the user's PATH. | |
7680 +m4_defun([_LT_DECL_EGREP], | |
7681 +[AC_REQUIRE([AC_PROG_EGREP])dnl | |
7682 +AC_REQUIRE([AC_PROG_FGREP])dnl | |
7683 +test -z "$GREP" && GREP=grep | |
7684 +_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) | |
7685 +_LT_DECL([], [EGREP], [1], [An ERE matcher]) | |
7686 +_LT_DECL([], [FGREP], [1], [A literal string matcher]) | |
7687 +dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too | |
7688 +AC_SUBST([GREP]) | |
7689 +]) | |
7690 + | |
7691 + | |
7692 +# _LT_DECL_OBJDUMP | |
7693 +# -------------- | |
7694 +# If we don't have a new enough Autoconf to choose the best objdump | |
7695 +# available, choose the one first in the user's PATH. | |
7696 +m4_defun([_LT_DECL_OBJDUMP], | |
7697 +[AC_CHECK_TOOL(OBJDUMP, objdump, false) | |
7698 +test -z "$OBJDUMP" && OBJDUMP=objdump | |
7699 +_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) | |
7700 +AC_SUBST([OBJDUMP]) | |
7701 +]) | |
7702 + | |
7703 +# _LT_DECL_DLLTOOL | |
7704 +# ---------------- | |
7705 +# Ensure DLLTOOL variable is set. | |
7706 +m4_defun([_LT_DECL_DLLTOOL], | |
7707 +[AC_CHECK_TOOL(DLLTOOL, dlltool, false) | |
7708 +test -z "$DLLTOOL" && DLLTOOL=dlltool | |
7709 +_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) | |
7710 +AC_SUBST([DLLTOOL]) | |
7711 +]) | |
7712 + | |
7713 +# _LT_DECL_SED | |
7714 +# ------------ | |
7715 +# Check for a fully-functional sed program, that truncates | |
7716 +# as few characters as possible. Prefer GNU sed if found. | |
7717 +m4_defun([_LT_DECL_SED], | |
7718 +[AC_PROG_SED | |
7719 +test -z "$SED" && SED=sed | |
7720 +Xsed="$SED -e 1s/^X//" | |
7721 +_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) | |
7722 +_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], | |
7723 + [Sed that helps us avoid accidentally triggering echo(1) options like -n]) | |
7724 +])# _LT_DECL_SED | |
7725 + | |
7726 +m4_ifndef([AC_PROG_SED], [ | |
7727 +# NOTE: This macro has been submitted for inclusion into # | |
7728 +# GNU Autoconf as AC_PROG_SED. When it is available in # | |
7729 +# a released version of Autoconf we should remove this # | |
7730 +# macro and use it instead. # | |
7731 + | |
7732 +m4_defun([AC_PROG_SED], | |
7733 +[AC_MSG_CHECKING([for a sed that does not truncate output]) | |
7734 +AC_CACHE_VAL(lt_cv_path_SED, | |
7735 +[# Loop through the user's path and test for sed and gsed. | |
7736 +# Then use that list of sed's as ones to test for truncation. | |
7737 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
7738 +for as_dir in $PATH | |
7739 +do | |
7740 + IFS=$as_save_IFS | |
7741 + test -z "$as_dir" && as_dir=. | |
7742 + for lt_ac_prog in sed gsed; do | |
7743 + for ac_exec_ext in '' $ac_executable_extensions; do | |
7744 + if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then | |
7745 + lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" | |
7746 + fi | |
7747 + done | |
7748 + done | |
7749 +done | |
7750 +IFS=$as_save_IFS | |
7751 +lt_ac_max=0 | |
7752 +lt_ac_count=0 | |
7753 +# Add /usr/xpg4/bin/sed as it is typically found on Solaris | |
7754 +# along with /bin/sed that truncates output. | |
7755 +for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do | |
7756 + test ! -f $lt_ac_sed && continue | |
7757 + cat /dev/null > conftest.in | |
7758 + lt_ac_count=0 | |
7759 + echo $ECHO_N "0123456789$ECHO_C" >conftest.in | |
7760 + # Check for GNU sed and select it if it is found. | |
7761 + if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then | |
7762 + lt_cv_path_SED=$lt_ac_sed | |
7763 + break | |
7764 + fi | |
7765 + while true; do | |
7766 + cat conftest.in conftest.in >conftest.tmp | |
7767 + mv conftest.tmp conftest.in | |
7768 + cp conftest.in conftest.nl | |
7769 + echo >>conftest.nl | |
7770 + $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break | |
7771 + cmp -s conftest.out conftest.nl || break | |
7772 + # 10000 chars as input seems more than enough | |
7773 + test $lt_ac_count -gt 10 && break | |
7774 + lt_ac_count=`expr $lt_ac_count + 1` | |
7775 + if test $lt_ac_count -gt $lt_ac_max; then | |
7776 + lt_ac_max=$lt_ac_count | |
7777 + lt_cv_path_SED=$lt_ac_sed | |
7778 + fi | |
7779 + done | |
7780 +done | |
7781 +]) | |
7782 +SED=$lt_cv_path_SED | |
7783 +AC_SUBST([SED]) | |
7784 +AC_MSG_RESULT([$SED]) | |
7785 +])#AC_PROG_SED | |
7786 +])#m4_ifndef | |
7787 + | |
7788 +# Old name: | |
7789 +AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) | |
7790 +dnl aclocal-1.4 backwards compatibility: | |
7791 +dnl AC_DEFUN([LT_AC_PROG_SED], []) | |
7792 + | |
7793 + | |
7794 +# _LT_CHECK_SHELL_FEATURES | |
7795 +# ------------------------ | |
7796 +# Find out whether the shell is Bourne or XSI compatible, | |
7797 +# or has some other useful features. | |
7798 +m4_defun([_LT_CHECK_SHELL_FEATURES], | |
7799 +[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) | |
7800 +# Try some XSI features | |
7801 +xsi_shell=no | |
7802 +( _lt_dummy="a/b/c" | |
7803 + test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ | |
7804 + = c,a/b,b/c, \ | |
7805 + && eval 'test $(( 1 + 1 )) -eq 2 \ | |
7806 + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ | |
7807 + && xsi_shell=yes | |
7808 +AC_MSG_RESULT([$xsi_shell]) | |
7809 +_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) | |
7810 + | |
7811 +AC_MSG_CHECKING([whether the shell understands "+="]) | |
7812 +lt_shell_append=no | |
7813 +( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ | |
7814 + >/dev/null 2>&1 \ | |
7815 + && lt_shell_append=yes | |
7816 +AC_MSG_RESULT([$lt_shell_append]) | |
7817 +_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) | |
7818 + | |
7819 +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then | |
7820 + lt_unset=unset | |
7821 +else | |
7822 + lt_unset=false | |
7823 +fi | |
7824 +_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl | |
7825 + | |
7826 +# test EBCDIC or ASCII | |
7827 +case `echo X|tr X '\101'` in | |
7828 + A) # ASCII based system | |
7829 + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr | |
7830 + lt_SP2NL='tr \040 \012' | |
7831 + lt_NL2SP='tr \015\012 \040\040' | |
7832 + ;; | |
7833 + *) # EBCDIC based system | |
7834 + lt_SP2NL='tr \100 \n' | |
7835 + lt_NL2SP='tr \r\n \100\100' | |
7836 + ;; | |
7837 +esac | |
7838 +_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl | |
7839 +_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl | |
7840 +])# _LT_CHECK_SHELL_FEATURES | |
7841 + | |
7842 + | |
7843 +# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) | |
7844 +# ------------------------------------------------------ | |
7845 +# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and | |
7846 +# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. | |
7847 +m4_defun([_LT_PROG_FUNCTION_REPLACE], | |
7848 +[dnl { | |
7849 +sed -e '/^$1 ()$/,/^} # $1 /c\ | |
7850 +$1 ()\ | |
7851 +{\ | |
7852 +m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) | |
7853 +} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ | |
7854 + && mv -f "$cfgfile.tmp" "$cfgfile" \ | |
7855 + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | |
7856 +test 0 -eq $? || _lt_function_replace_fail=: | |
7857 +]) | |
7858 + | |
7859 + | |
7860 +# _LT_PROG_REPLACE_SHELLFNS | |
7861 +# ------------------------- | |
7862 +# Replace existing portable implementations of several shell functions with | |
7863 +# equivalent extended shell implementations where those features are available.. | |
7864 +m4_defun([_LT_PROG_REPLACE_SHELLFNS], | |
7865 +[if test x"$xsi_shell" = xyes; then | |
7866 + _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl | |
7867 + case ${1} in | |
7868 + */*) func_dirname_result="${1%/*}${2}" ;; | |
7869 + * ) func_dirname_result="${3}" ;; | |
7870 + esac]) | |
7871 + | |
7872 + _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl | |
7873 + func_basename_result="${1##*/}"]) | |
7874 + | |
7875 + _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl | |
7876 + case ${1} in | |
7877 + */*) func_dirname_result="${1%/*}${2}" ;; | |
7878 + * ) func_dirname_result="${3}" ;; | |
7879 + esac | |
7880 + func_basename_result="${1##*/}"]) | |
7881 + | |
7882 + _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl | |
7883 + # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are | |
7884 + # positional parameters, so assign one to ordinary parameter first. | |
7885 + func_stripname_result=${3} | |
7886 + func_stripname_result=${func_stripname_result#"${1}"} | |
7887 + func_stripname_result=${func_stripname_result%"${2}"}]) | |
7888 + | |
7889 + _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl | |
7890 + func_split_long_opt_name=${1%%=*} | |
7891 + func_split_long_opt_arg=${1#*=}]) | |
7892 + | |
7893 + _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl | |
7894 + func_split_short_opt_arg=${1#??} | |
7895 + func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) | |
7896 + | |
7897 + _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl | |
7898 + case ${1} in | |
7899 + *.lo) func_lo2o_result=${1%.lo}.${objext} ;; | |
7900 + *) func_lo2o_result=${1} ;; | |
7901 + esac]) | |
7902 + | |
7903 + _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) | |
7904 + | |
7905 + _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) | |
7906 + | |
7907 + _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) | |
7908 +fi | |
7909 + | |
7910 +if test x"$lt_shell_append" = xyes; then | |
7911 + _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) | |
7912 + | |
7913 + _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl | |
7914 + func_quote_for_eval "${2}" | |
7915 +dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ | |
7916 + eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) | |
7917 + | |
7918 + # Save a `func_append' function call where possible by direct use of '+=' | |
7919 + sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ | |
7920 + && mv -f "$cfgfile.tmp" "$cfgfile" \ | |
7921 + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | |
7922 + test 0 -eq $? || _lt_function_replace_fail=: | |
7923 +else | |
7924 + # Save a `func_append' function call even when '+=' is not available | |
7925 + sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ | |
7926 + && mv -f "$cfgfile.tmp" "$cfgfile" \ | |
7927 + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") | |
7928 + test 0 -eq $? || _lt_function_replace_fail=: | |
7929 +fi | |
7930 + | |
7931 +if test x"$_lt_function_replace_fail" = x":"; then | |
7932 + AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) | |
7933 +fi | |
7934 +]) | |
7935 + | |
7936 +# _LT_PATH_CONVERSION_FUNCTIONS | |
7937 +# ----------------------------- | |
7938 +# Determine which file name conversion functions should be used by | |
7939 +# func_to_host_file (and, implicitly, by func_to_host_path). These are needed | |
7940 +# for certain cross-compile configurations and native mingw. | |
7941 +m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], | |
7942 +[AC_REQUIRE([AC_CANONICAL_HOST])dnl | |
7943 +AC_REQUIRE([AC_CANONICAL_BUILD])dnl | |
7944 +AC_MSG_CHECKING([how to convert $build file names to $host format]) | |
7945 +AC_CACHE_VAL(lt_cv_to_host_file_cmd, | |
7946 +[case $host in | |
7947 + *-*-mingw* ) | |
7948 + case $build in | |
7949 + *-*-mingw* ) # actually msys | |
7950 + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 | |
7951 + ;; | |
7952 + *-*-cygwin* ) | |
7953 + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 | |
7954 + ;; | |
7955 + * ) # otherwise, assume *nix | |
7956 + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 | |
7957 + ;; | |
7958 + esac | |
7959 + ;; | |
7960 + *-*-cygwin* ) | |
7961 + case $build in | |
7962 + *-*-mingw* ) # actually msys | |
7963 + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin | |
7964 + ;; | |
7965 + *-*-cygwin* ) | |
7966 + lt_cv_to_host_file_cmd=func_convert_file_noop | |
7967 + ;; | |
7968 + * ) # otherwise, assume *nix | |
7969 + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin | |
7970 + ;; | |
7971 + esac | |
7972 + ;; | |
7973 + * ) # unhandled hosts (and "normal" native builds) | |
7974 + lt_cv_to_host_file_cmd=func_convert_file_noop | |
7975 + ;; | |
7976 +esac | |
7977 +]) | |
7978 +to_host_file_cmd=$lt_cv_to_host_file_cmd | |
7979 +AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) | |
7980 +_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], | |
7981 + [0], [convert $build file names to $host format])dnl | |
7982 + | |
7983 +AC_MSG_CHECKING([how to convert $build file names to toolchain format]) | |
7984 +AC_CACHE_VAL(lt_cv_to_tool_file_cmd, | |
7985 +[#assume ordinary cross tools, or native build. | |
7986 +lt_cv_to_tool_file_cmd=func_convert_file_noop | |
7987 +case $host in | |
7988 + *-*-mingw* ) | |
7989 + case $build in | |
7990 + *-*-mingw* ) # actually msys | |
7991 + lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 | |
7992 + ;; | |
7993 + esac | |
7994 + ;; | |
7995 +esac | |
7996 +]) | |
7997 +to_tool_file_cmd=$lt_cv_to_tool_file_cmd | |
7998 +AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) | |
7999 +_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], | |
8000 + [0], [convert $build files to toolchain format])dnl | |
8001 +])# _LT_PATH_CONVERSION_FUNCTIONS | |
8002 + | |
8003 +# Helper functions for option handling. -*- Autoconf -*- | |
8004 +# | |
8005 +# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, | |
8006 +# Inc. | |
8007 +# Written by Gary V. Vaughan, 2004 | |
8008 +# | |
8009 +# This file is free software; the Free Software Foundation gives | |
8010 +# unlimited permission to copy and/or distribute it, with or without | |
8011 +# modifications, as long as this notice is preserved. | |
8012 + | |
8013 +# serial 7 ltoptions.m4 | |
8014 + | |
8015 +# This is to help aclocal find these macros, as it can't see m4_define. | |
8016 +AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) | |
8017 + | |
8018 + | |
8019 +# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) | |
8020 +# ------------------------------------------ | |
8021 +m4_define([_LT_MANGLE_OPTION], | |
8022 +[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) | |
8023 + | |
8024 + | |
8025 +# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) | |
8026 +# --------------------------------------- | |
8027 +# Set option OPTION-NAME for macro MACRO-NAME, and if there is a | |
8028 +# matching handler defined, dispatch to it. Other OPTION-NAMEs are | |
8029 +# saved as a flag. | |
8030 +m4_define([_LT_SET_OPTION], | |
8031 +[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl | |
8032 +m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), | |
8033 + _LT_MANGLE_DEFUN([$1], [$2]), | |
8034 + [m4_warning([Unknown $1 option `$2'])])[]dnl | |
8035 +]) | |
8036 + | |
8037 + | |
8038 +# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) | |
8039 +# ------------------------------------------------------------ | |
8040 +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. | |
8041 +m4_define([_LT_IF_OPTION], | |
8042 +[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) | |
8043 + | |
8044 + | |
8045 +# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) | |
8046 +# ------------------------------------------------------- | |
8047 +# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME | |
8048 +# are set. | |
8049 +m4_define([_LT_UNLESS_OPTIONS], | |
8050 +[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), | |
8051 + [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), | |
8052 + [m4_define([$0_found])])])[]dnl | |
8053 +m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 | |
8054 +])[]dnl | |
8055 +]) | |
8056 + | |
8057 + | |
8058 +# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) | |
8059 +# ---------------------------------------- | |
8060 +# OPTION-LIST is a space-separated list of Libtool options associated | |
8061 +# with MACRO-NAME. If any OPTION has a matching handler declared with | |
8062 +# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about | |
8063 +# the unknown option and exit. | |
8064 +m4_defun([_LT_SET_OPTIONS], | |
8065 +[# Set options | |
8066 +m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), | |
8067 + [_LT_SET_OPTION([$1], _LT_Option)]) | |
8068 + | |
8069 +m4_if([$1],[LT_INIT],[ | |
8070 + dnl | |
8071 + dnl Simply set some default values (i.e off) if boolean options were not | |
8072 + dnl specified: | |
8073 + _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no | |
8074 + ]) | |
8075 + _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no | |
8076 + ]) | |
8077 + dnl | |
8078 + dnl If no reference was made to various pairs of opposing options, then | |
8079 + dnl we run the default mode handler for the pair. For example, if neither | |
8080 + dnl `shared' nor `disable-shared' was passed, we enable building of shared | |
8081 + dnl archives by default: | |
8082 + _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) | |
8083 + _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) | |
8084 + _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) | |
8085 + _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], | |
8086 + [_LT_ENABLE_FAST_INSTALL]) | |
8087 + ]) | |
8088 +])# _LT_SET_OPTIONS | |
8089 + | |
8090 + | |
8091 + | |
8092 +# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) | |
8093 +# ----------------------------------------- | |
8094 +m4_define([_LT_MANGLE_DEFUN], | |
8095 +[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) | |
8096 + | |
8097 + | |
8098 +# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) | |
8099 +# ----------------------------------------------- | |
8100 +m4_define([LT_OPTION_DEFINE], | |
8101 +[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl | |
8102 +])# LT_OPTION_DEFINE | |
8103 + | |
8104 + | |
8105 +# dlopen | |
8106 +# ------ | |
8107 +LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes | |
8108 +]) | |
8109 + | |
8110 +AU_DEFUN([AC_LIBTOOL_DLOPEN], | |
8111 +[_LT_SET_OPTION([LT_INIT], [dlopen]) | |
8112 +AC_DIAGNOSE([obsolete], | |
8113 +[$0: Remove this warning and the call to _LT_SET_OPTION when you | |
8114 +put the `dlopen' option into LT_INIT's first parameter.]) | |
8115 +]) | |
8116 + | |
8117 +dnl aclocal-1.4 backwards compatibility: | |
8118 +dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) | |
8119 + | |
8120 + | |
8121 +# win32-dll | |
8122 +# --------- | |
8123 +# Declare package support for building win32 dll's. | |
8124 +LT_OPTION_DEFINE([LT_INIT], [win32-dll], | |
8125 +[enable_win32_dll=yes | |
8126 + | |
8127 +case $host in | |
8128 +*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) | |
8129 + AC_CHECK_TOOL(AS, as, false) | |
8130 + AC_CHECK_TOOL(DLLTOOL, dlltool, false) | |
8131 + AC_CHECK_TOOL(OBJDUMP, objdump, false) | |
8132 + ;; | |
8133 +esac | |
8134 + | |
8135 +test -z "$AS" && AS=as | |
8136 +_LT_DECL([], [AS], [1], [Assembler program])dnl | |
8137 + | |
8138 +test -z "$DLLTOOL" && DLLTOOL=dlltool | |
8139 +_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl | |
8140 + | |
8141 +test -z "$OBJDUMP" && OBJDUMP=objdump | |
8142 +_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl | |
8143 +])# win32-dll | |
8144 + | |
8145 +AU_DEFUN([AC_LIBTOOL_WIN32_DLL], | |
8146 +[AC_REQUIRE([AC_CANONICAL_HOST])dnl | |
8147 +_LT_SET_OPTION([LT_INIT], [win32-dll]) | |
8148 +AC_DIAGNOSE([obsolete], | |
8149 +[$0: Remove this warning and the call to _LT_SET_OPTION when you | |
8150 +put the `win32-dll' option into LT_INIT's first parameter.]) | |
8151 +]) | |
8152 + | |
8153 +dnl aclocal-1.4 backwards compatibility: | |
8154 +dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) | |
8155 + | |
8156 + | |
8157 +# _LT_ENABLE_SHARED([DEFAULT]) | |
8158 +# ---------------------------- | |
8159 +# implement the --enable-shared flag, and supports the `shared' and | |
8160 +# `disable-shared' LT_INIT options. | |
8161 +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. | |
8162 +m4_define([_LT_ENABLE_SHARED], | |
8163 +[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl | |
8164 +AC_ARG_ENABLE([shared], | |
8165 + [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], | |
8166 + [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], | |
8167 + [p=${PACKAGE-default} | |
8168 + case $enableval in | |
8169 + yes) enable_shared=yes ;; | |
8170 + no) enable_shared=no ;; | |
8171 + *) | |
8172 + enable_shared=no | |
8173 + # Look at the argument we got. We use all the common list separators. | |
8174 + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," | |
8175 + for pkg in $enableval; do | |
8176 + IFS="$lt_save_ifs" | |
8177 + if test "X$pkg" = "X$p"; then | |
8178 + enable_shared=yes | |
8179 + fi | |
8180 + done | |
8181 + IFS="$lt_save_ifs" | |
8182 + ;; | |
8183 + esac], | |
8184 + [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) | |
8185 + | |
8186 + _LT_DECL([build_libtool_libs], [enable_shared], [0], | |
8187 + [Whether or not to build shared libraries]) | |
8188 +])# _LT_ENABLE_SHARED | |
8189 + | |
8190 +LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) | |
8191 +LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) | |
8192 + | |
8193 +# Old names: | |
8194 +AC_DEFUN([AC_ENABLE_SHARED], | |
8195 +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) | |
8196 +]) | |
8197 + | |
8198 +AC_DEFUN([AC_DISABLE_SHARED], | |
8199 +[_LT_SET_OPTION([LT_INIT], [disable-shared]) | |
8200 +]) | |
8201 + | |
8202 +AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) | |
8203 +AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) | |
8204 + | |
8205 +dnl aclocal-1.4 backwards compatibility: | |
8206 +dnl AC_DEFUN([AM_ENABLE_SHARED], []) | |
8207 +dnl AC_DEFUN([AM_DISABLE_SHARED], []) | |
8208 + | |
8209 + | |
8210 + | |
8211 +# _LT_ENABLE_STATIC([DEFAULT]) | |
8212 +# ---------------------------- | |
8213 +# implement the --enable-static flag, and support the `static' and | |
8214 +# `disable-static' LT_INIT options. | |
8215 +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. | |
8216 +m4_define([_LT_ENABLE_STATIC], | |
8217 +[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl | |
8218 +AC_ARG_ENABLE([static], | |
8219 + [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], | |
8220 + [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], | |
8221 + [p=${PACKAGE-default} | |
8222 + case $enableval in | |
8223 + yes) enable_static=yes ;; | |
8224 + no) enable_static=no ;; | |
8225 + *) | |
8226 + enable_static=no | |
8227 + # Look at the argument we got. We use all the common list separators. | |
8228 + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," | |
8229 + for pkg in $enableval; do | |
8230 + IFS="$lt_save_ifs" | |
8231 + if test "X$pkg" = "X$p"; then | |
8232 + enable_static=yes | |
8233 + fi | |
8234 + done | |
8235 + IFS="$lt_save_ifs" | |
8236 + ;; | |
8237 + esac], | |
8238 + [enable_static=]_LT_ENABLE_STATIC_DEFAULT) | |
8239 + | |
8240 + _LT_DECL([build_old_libs], [enable_static], [0], | |
8241 + [Whether or not to build static libraries]) | |
8242 +])# _LT_ENABLE_STATIC | |
8243 + | |
8244 +LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) | |
8245 +LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) | |
8246 + | |
8247 +# Old names: | |
8248 +AC_DEFUN([AC_ENABLE_STATIC], | |
8249 +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) | |
8250 +]) | |
8251 + | |
8252 +AC_DEFUN([AC_DISABLE_STATIC], | |
8253 +[_LT_SET_OPTION([LT_INIT], [disable-static]) | |
8254 +]) | |
8255 + | |
8256 +AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) | |
8257 +AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) | |
8258 + | |
8259 +dnl aclocal-1.4 backwards compatibility: | |
8260 +dnl AC_DEFUN([AM_ENABLE_STATIC], []) | |
8261 +dnl AC_DEFUN([AM_DISABLE_STATIC], []) | |
8262 + | |
8263 + | |
8264 + | |
8265 +# _LT_ENABLE_FAST_INSTALL([DEFAULT]) | |
8266 +# ---------------------------------- | |
8267 +# implement the --enable-fast-install flag, and support the `fast-install' | |
8268 +# and `disable-fast-install' LT_INIT options. | |
8269 +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. | |
8270 +m4_define([_LT_ENABLE_FAST_INSTALL], | |
8271 +[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl | |
8272 +AC_ARG_ENABLE([fast-install], | |
8273 + [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], | |
8274 + [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], | |
8275 + [p=${PACKAGE-default} | |
8276 + case $enableval in | |
8277 + yes) enable_fast_install=yes ;; | |
8278 + no) enable_fast_install=no ;; | |
8279 + *) | |
8280 + enable_fast_install=no | |
8281 + # Look at the argument we got. We use all the common list separators. | |
8282 + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," | |
8283 + for pkg in $enableval; do | |
8284 + IFS="$lt_save_ifs" | |
8285 + if test "X$pkg" = "X$p"; then | |
8286 + enable_fast_install=yes | |
8287 + fi | |
8288 + done | |
8289 + IFS="$lt_save_ifs" | |
8290 + ;; | |
8291 + esac], | |
8292 + [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) | |
8293 + | |
8294 +_LT_DECL([fast_install], [enable_fast_install], [0], | |
8295 + [Whether or not to optimize for fast installation])dnl | |
8296 +])# _LT_ENABLE_FAST_INSTALL | |
8297 + | |
8298 +LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) | |
8299 +LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) | |
8300 + | |
8301 +# Old names: | |
8302 +AU_DEFUN([AC_ENABLE_FAST_INSTALL], | |
8303 +[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) | |
8304 +AC_DIAGNOSE([obsolete], | |
8305 +[$0: Remove this warning and the call to _LT_SET_OPTION when you put | |
8306 +the `fast-install' option into LT_INIT's first parameter.]) | |
8307 +]) | |
8308 + | |
8309 +AU_DEFUN([AC_DISABLE_FAST_INSTALL], | |
8310 +[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) | |
8311 +AC_DIAGNOSE([obsolete], | |
8312 +[$0: Remove this warning and the call to _LT_SET_OPTION when you put | |
8313 +the `disable-fast-install' option into LT_INIT's first parameter.]) | |
8314 +]) | |
8315 + | |
8316 +dnl aclocal-1.4 backwards compatibility: | |
8317 +dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) | |
8318 +dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) | |
8319 + | |
8320 + | |
8321 +# _LT_WITH_PIC([MODE]) | |
8322 +# -------------------- | |
8323 +# implement the --with-pic flag, and support the `pic-only' and `no-pic' | |
8324 +# LT_INIT options. | |
8325 +# MODE is either `yes' or `no'. If omitted, it defaults to `both'. | |
8326 +m4_define([_LT_WITH_PIC], | |
8327 +[AC_ARG_WITH([pic], | |
8328 + [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], | |
8329 + [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], | |
8330 + [lt_p=${PACKAGE-default} | |
8331 + case $withval in | |
8332 + yes|no) pic_mode=$withval ;; | |
8333 + *) | |
8334 + pic_mode=default | |
8335 + # Look at the argument we got. We use all the common list separators. | |
8336 + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," | |
8337 + for lt_pkg in $withval; do | |
8338 + IFS="$lt_save_ifs" | |
8339 + if test "X$lt_pkg" = "X$lt_p"; then | |
8340 + pic_mode=yes | |
8341 + fi | |
8342 + done | |
8343 + IFS="$lt_save_ifs" | |
8344 + ;; | |
8345 + esac], | |
8346 + [pic_mode=default]) | |
8347 + | |
8348 +test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) | |
8349 + | |
8350 +_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl | |
8351 +])# _LT_WITH_PIC | |
8352 + | |
8353 +LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) | |
8354 +LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) | |
8355 + | |
8356 +# Old name: | |
8357 +AU_DEFUN([AC_LIBTOOL_PICMODE], | |
8358 +[_LT_SET_OPTION([LT_INIT], [pic-only]) | |
8359 +AC_DIAGNOSE([obsolete], | |
8360 +[$0: Remove this warning and the call to _LT_SET_OPTION when you | |
8361 +put the `pic-only' option into LT_INIT's first parameter.]) | |
8362 +]) | |
8363 + | |
8364 +dnl aclocal-1.4 backwards compatibility: | |
8365 +dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) | |
8366 + | |
8367 + | |
8368 +m4_define([_LTDL_MODE], []) | |
8369 +LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], | |
8370 + [m4_define([_LTDL_MODE], [nonrecursive])]) | |
8371 +LT_OPTION_DEFINE([LTDL_INIT], [recursive], | |
8372 + [m4_define([_LTDL_MODE], [recursive])]) | |
8373 +LT_OPTION_DEFINE([LTDL_INIT], [subproject], | |
8374 + [m4_define([_LTDL_MODE], [subproject])]) | |
8375 + | |
8376 +m4_define([_LTDL_TYPE], []) | |
8377 +LT_OPTION_DEFINE([LTDL_INIT], [installable], | |
8378 + [m4_define([_LTDL_TYPE], [installable])]) | |
8379 +LT_OPTION_DEFINE([LTDL_INIT], [convenience], | |
8380 + [m4_define([_LTDL_TYPE], [convenience])]) | |
8381 + | |
8382 +# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- | |
8383 +# | |
8384 +# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. | |
8385 +# Written by Gary V. Vaughan, 2004 | |
8386 +# | |
8387 +# This file is free software; the Free Software Foundation gives | |
8388 +# unlimited permission to copy and/or distribute it, with or without | |
8389 +# modifications, as long as this notice is preserved. | |
8390 + | |
8391 +# serial 6 ltsugar.m4 | |
8392 + | |
8393 +# This is to help aclocal find these macros, as it can't see m4_define. | |
8394 +AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) | |
8395 + | |
8396 + | |
8397 +# lt_join(SEP, ARG1, [ARG2...]) | |
8398 +# ----------------------------- | |
8399 +# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their | |
8400 +# associated separator. | |
8401 +# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier | |
8402 +# versions in m4sugar had bugs. | |
8403 +m4_define([lt_join], | |
8404 +[m4_if([$#], [1], [], | |
8405 + [$#], [2], [[$2]], | |
8406 + [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) | |
8407 +m4_define([_lt_join], | |
8408 +[m4_if([$#$2], [2], [], | |
8409 + [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) | |
8410 + | |
8411 + | |
8412 +# lt_car(LIST) | |
8413 +# lt_cdr(LIST) | |
8414 +# ------------ | |
8415 +# Manipulate m4 lists. | |
8416 +# These macros are necessary as long as will still need to support | |
8417 +# Autoconf-2.59 which quotes differently. | |
8418 +m4_define([lt_car], [[$1]]) | |
8419 +m4_define([lt_cdr], | |
8420 +[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], | |
8421 + [$#], 1, [], | |
8422 + [m4_dquote(m4_shift($@))])]) | |
8423 +m4_define([lt_unquote], $1) | |
8424 + | |
8425 + | |
8426 +# lt_append(MACRO-NAME, STRING, [SEPARATOR]) | |
8427 +# ------------------------------------------ | |
8428 +# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. | |
8429 +# Note that neither SEPARATOR nor STRING are expanded; they are appended | |
8430 +# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). | |
8431 +# No SEPARATOR is output if MACRO-NAME was previously undefined (different | |
8432 +# than defined and empty). | |
8433 +# | |
8434 +# This macro is needed until we can rely on Autoconf 2.62, since earlier | |
8435 +# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. | |
8436 +m4_define([lt_append], | |
8437 +[m4_define([$1], | |
8438 + m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) | |
8439 + | |
8440 + | |
8441 + | |
8442 +# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) | |
8443 +# ---------------------------------------------------------- | |
8444 +# Produce a SEP delimited list of all paired combinations of elements of | |
8445 +# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list | |
8446 +# has the form PREFIXmINFIXSUFFIXn. | |
8447 +# Needed until we can rely on m4_combine added in Autoconf 2.62. | |
8448 +m4_define([lt_combine], | |
8449 +[m4_if(m4_eval([$# > 3]), [1], | |
8450 + [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl | |
8451 +[[m4_foreach([_Lt_prefix], [$2], | |
8452 + [m4_foreach([_Lt_suffix], | |
8453 + ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, | |
8454 + [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) | |
8455 + | |
8456 + | |
8457 +# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) | |
8458 +# ----------------------------------------------------------------------- | |
8459 +# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited | |
8460 +# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. | |
8461 +m4_define([lt_if_append_uniq], | |
8462 +[m4_ifdef([$1], | |
8463 + [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], | |
8464 + [lt_append([$1], [$2], [$3])$4], | |
8465 + [$5])], | |
8466 + [lt_append([$1], [$2], [$3])$4])]) | |
8467 + | |
8468 + | |
8469 +# lt_dict_add(DICT, KEY, VALUE) | |
8470 +# ----------------------------- | |
8471 +m4_define([lt_dict_add], | |
8472 +[m4_define([$1($2)], [$3])]) | |
8473 + | |
8474 + | |
8475 +# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) | |
8476 +# -------------------------------------------- | |
8477 +m4_define([lt_dict_add_subkey], | |
8478 +[m4_define([$1($2:$3)], [$4])]) | |
8479 + | |
8480 + | |
8481 +# lt_dict_fetch(DICT, KEY, [SUBKEY]) | |
8482 +# ---------------------------------- | |
8483 +m4_define([lt_dict_fetch], | |
8484 +[m4_ifval([$3], | |
8485 + m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), | |
8486 + m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) | |
8487 + | |
8488 + | |
8489 +# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) | |
8490 +# ----------------------------------------------------------------- | |
8491 +m4_define([lt_if_dict_fetch], | |
8492 +[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], | |
8493 + [$5], | |
8494 + [$6])]) | |
8495 + | |
8496 + | |
8497 +# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) | |
8498 +# -------------------------------------------------------------- | |
8499 +m4_define([lt_dict_filter], | |
8500 +[m4_if([$5], [], [], | |
8501 + [lt_join(m4_quote(m4_default([$4], [[, ]])), | |
8502 + lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), | |
8503 + [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl | |
8504 +]) | |
8505 + | |
8506 +# ltversion.m4 -- version numbers -*- Autoconf -*- | |
8507 +# | |
8508 +# Copyright (C) 2004 Free Software Foundation, Inc. | |
8509 +# Written by Scott James Remnant, 2004 | |
8510 +# | |
8511 +# This file is free software; the Free Software Foundation gives | |
8512 +# unlimited permission to copy and/or distribute it, with or without | |
8513 +# modifications, as long as this notice is preserved. | |
8514 + | |
8515 +# @configure_input@ | |
8516 + | |
8517 +# serial 3337 ltversion.m4 | |
8518 +# This file is part of GNU Libtool | |
8519 + | |
8520 +m4_define([LT_PACKAGE_VERSION], [2.4.2]) | |
8521 +m4_define([LT_PACKAGE_REVISION], [1.3337]) | |
8522 + | |
8523 +AC_DEFUN([LTVERSION_VERSION], | |
8524 +[macro_version='2.4.2' | |
8525 +macro_revision='1.3337' | |
8526 +_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) | |
8527 +_LT_DECL(, macro_revision, 0) | |
8528 +]) | |
8529 + | |
8530 +# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- | |
8531 +# | |
8532 +# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. | |
8533 +# Written by Scott James Remnant, 2004. | |
8534 +# | |
8535 +# This file is free software; the Free Software Foundation gives | |
8536 +# unlimited permission to copy and/or distribute it, with or without | |
8537 +# modifications, as long as this notice is preserved. | |
8538 + | |
8539 +# serial 5 lt~obsolete.m4 | |
8540 + | |
8541 +# These exist entirely to fool aclocal when bootstrapping libtool. | |
8542 +# | |
8543 +# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) | |
8544 +# which have later been changed to m4_define as they aren't part of the | |
8545 +# exported API, or moved to Autoconf or Automake where they belong. | |
8546 +# | |
8547 +# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN | |
8548 +# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us | |
8549 +# using a macro with the same name in our local m4/libtool.m4 it'll | |
8550 +# pull the old libtool.m4 in (it doesn't see our shiny new m4_define | |
8551 +# and doesn't know about Autoconf macros at all.) | |
8552 +# | |
8553 +# So we provide this file, which has a silly filename so it's always | |
8554 +# included after everything else. This provides aclocal with the | |
8555 +# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything | |
8556 +# because those macros already exist, or will be overwritten later. | |
8557 +# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. | |
8558 +# | |
8559 +# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. | |
8560 +# Yes, that means every name once taken will need to remain here until | |
8561 +# we give up compatibility with versions before 1.7, at which point | |
8562 +# we need to keep only those names which we still refer to. | |
8563 + | |
8564 +# This is to help aclocal find these macros, as it can't see m4_define. | |
8565 +AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) | |
8566 + | |
8567 +m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) | |
8568 +m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) | |
8569 +m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) | |
8570 +m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) | |
8571 +m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) | |
8572 +m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) | |
8573 +m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) | |
8574 +m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) | |
8575 +m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) | |
8576 +m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) | |
8577 +m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) | |
8578 +m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) | |
8579 +m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) | |
8580 +m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) | |
8581 +m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) | |
8582 +m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) | |
8583 +m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) | |
8584 +m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) | |
8585 +m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) | |
8586 +m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) | |
8587 +m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) | |
8588 +m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) | |
8589 +m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) | |
8590 +m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) | |
8591 +m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) | |
8592 +m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) | |
8593 +m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) | |
8594 +m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) | |
8595 +m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) | |
8596 +m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) | |
8597 +m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) | |
8598 +m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) | |
8599 +m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) | |
8600 +m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) | |
8601 +m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) | |
8602 +m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) | |
8603 +m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) | |
8604 +m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) | |
8605 +m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) | |
8606 +m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) | |
8607 +m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) | |
8608 +m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) | |
8609 +m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) | |
8610 +m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) | |
8611 +m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) | |
8612 +m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) | |
8613 +m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) | |
8614 +m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) | |
8615 +m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) | |
8616 +m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) | |
8617 +m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) | |
8618 +m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) | |
8619 +m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) | |
8620 +m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) | |
8621 +m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) | |
8622 +m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) | |
8623 +m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) | |
8624 +m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) | |
8625 +m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) | |
8626 +m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) | |
8627 +m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) | |
8628 + | |
8629 +# Copyright (C) 2002-2013 Free Software Foundation, Inc. | |
8630 +# | |
8631 +# This file is free software; the Free Software Foundation | |
8632 +# gives unlimited permission to copy and/or distribute it, | |
8633 +# with or without modifications, as long as this notice is preserved. | |
8634 + | |
8635 +# AM_AUTOMAKE_VERSION(VERSION) | |
8636 +# ---------------------------- | |
8637 +# Automake X.Y traces this macro to ensure aclocal.m4 has been | |
8638 +# generated from the m4 files accompanying Automake X.Y. | |
8639 +# (This private macro should not be called outside this file.) | |
8640 +AC_DEFUN([AM_AUTOMAKE_VERSION], | |
8641 +[am__api_version='1.14' | |
8642 +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to | |
8643 +dnl require some minimum version. Point them to the right macro. | |
8644 +m4_if([$1], [1.14.1], [], | |
8645 + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl | |
8646 +]) | |
8647 + | |
8648 +# _AM_AUTOCONF_VERSION(VERSION) | |
8649 +# ----------------------------- | |
8650 +# aclocal traces this macro to find the Autoconf version. | |
8651 +# This is a private macro too. Using m4_define simplifies | |
8652 +# the logic in aclocal, which can simply ignore this definition. | |
8653 +m4_define([_AM_AUTOCONF_VERSION], []) | |
8654 + | |
8655 +# AM_SET_CURRENT_AUTOMAKE_VERSION | |
8656 +# ------------------------------- | |
8657 +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. | |
8658 +# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. | |
8659 +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], | |
8660 +[AM_AUTOMAKE_VERSION([1.14.1])dnl | |
8661 +m4_ifndef([AC_AUTOCONF_VERSION], | |
8662 + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl | |
8663 +_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) | |
8664 + | |
8665 +# AM_AUX_DIR_EXPAND -*- Autoconf -*- | |
8666 + | |
8667 +# Copyright (C) 2001-2013 Free Software Foundation, Inc. | |
8668 +# | |
8669 +# This file is free software; the Free Software Foundation | |
8670 +# gives unlimited permission to copy and/or distribute it, | |
8671 +# with or without modifications, as long as this notice is preserved. | |
8672 + | |
8673 +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets | |
8674 +# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to | |
8675 +# '$srcdir', '$srcdir/..', or '$srcdir/../..'. | |
8676 +# | |
8677 +# Of course, Automake must honor this variable whenever it calls a | |
8678 +# tool from the auxiliary directory. The problem is that $srcdir (and | |
8679 +# therefore $ac_aux_dir as well) can be either absolute or relative, | |
8680 +# depending on how configure is run. This is pretty annoying, since | |
8681 +# it makes $ac_aux_dir quite unusable in subdirectories: in the top | |
8682 +# source directory, any form will work fine, but in subdirectories a | |
8683 +# relative path needs to be adjusted first. | |
8684 +# | |
8685 +# $ac_aux_dir/missing | |
8686 +# fails when called from a subdirectory if $ac_aux_dir is relative | |
8687 +# $top_srcdir/$ac_aux_dir/missing | |
8688 +# fails if $ac_aux_dir is absolute, | |
8689 +# fails when called from a subdirectory in a VPATH build with | |
8690 +# a relative $ac_aux_dir | |
8691 +# | |
8692 +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir | |
8693 +# are both prefixed by $srcdir. In an in-source build this is usually | |
8694 +# harmless because $srcdir is '.', but things will broke when you | |
8695 +# start a VPATH build or use an absolute $srcdir. | |
8696 +# | |
8697 +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, | |
8698 +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: | |
8699 +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` | |
8700 +# and then we would define $MISSING as | |
8701 +# MISSING="\${SHELL} $am_aux_dir/missing" | |
8702 +# This will work as long as MISSING is not called from configure, because | |
8703 +# unfortunately $(top_srcdir) has no meaning in configure. | |
8704 +# However there are other variables, like CC, which are often used in | |
8705 +# configure, and could therefore not use this "fixed" $ac_aux_dir. | |
8706 +# | |
8707 +# Another solution, used here, is to always expand $ac_aux_dir to an | |
8708 +# absolute PATH. The drawback is that using absolute paths prevent a | |
8709 +# configured tree to be moved without reconfiguration. | |
8710 + | |
8711 +AC_DEFUN([AM_AUX_DIR_EXPAND], | |
8712 +[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl | |
8713 +# Expand $ac_aux_dir to an absolute path. | |
8714 +am_aux_dir=`cd "$ac_aux_dir" && pwd` | |
8715 +]) | |
8716 + | |
8717 +# AM_CONDITIONAL -*- Autoconf -*- | |
8718 + | |
8719 +# Copyright (C) 1997-2013 Free Software Foundation, Inc. | |
8720 +# | |
8721 +# This file is free software; the Free Software Foundation | |
8722 +# gives unlimited permission to copy and/or distribute it, | |
8723 +# with or without modifications, as long as this notice is preserved. | |
8724 + | |
8725 +# AM_CONDITIONAL(NAME, SHELL-CONDITION) | |
8726 +# ------------------------------------- | |
8727 +# Define a conditional. | |
8728 +AC_DEFUN([AM_CONDITIONAL], | |
8729 +[AC_PREREQ([2.52])dnl | |
8730 + m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], | |
8731 + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl | |
8732 +AC_SUBST([$1_TRUE])dnl | |
8733 +AC_SUBST([$1_FALSE])dnl | |
8734 +_AM_SUBST_NOTMAKE([$1_TRUE])dnl | |
8735 +_AM_SUBST_NOTMAKE([$1_FALSE])dnl | |
8736 +m4_define([_AM_COND_VALUE_$1], [$2])dnl | |
8737 +if $2; then | |
8738 + $1_TRUE= | |
8739 + $1_FALSE='#' | |
8740 +else | |
8741 + $1_TRUE='#' | |
8742 + $1_FALSE= | |
8743 +fi | |
8744 +AC_CONFIG_COMMANDS_PRE( | |
8745 +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then | |
8746 + AC_MSG_ERROR([[conditional "$1" was never defined. | |
8747 +Usually this means the macro was only invoked conditionally.]]) | |
8748 +fi])]) | |
8749 + | |
8750 +# Copyright (C) 1999-2013 Free Software Foundation, Inc. | |
8751 +# | |
8752 +# This file is free software; the Free Software Foundation | |
8753 +# gives unlimited permission to copy and/or distribute it, | |
8754 +# with or without modifications, as long as this notice is preserved. | |
8755 + | |
8756 + | |
8757 +# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be | |
8758 +# written in clear, in which case automake, when reading aclocal.m4, | |
8759 +# will think it sees a *use*, and therefore will trigger all it's | |
8760 +# C support machinery. Also note that it means that autoscan, seeing | |
8761 +# CC etc. in the Makefile, will ask for an AC_PROG_CC use... | |
8762 + | |
8763 + | |
8764 +# _AM_DEPENDENCIES(NAME) | |
8765 +# ---------------------- | |
8766 +# See how the compiler implements dependency checking. | |
8767 +# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". | |
8768 +# We try a few techniques and use that to set a single cache variable. | |
8769 +# | |
8770 +# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was | |
8771 +# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular | |
8772 +# dependency, and given that the user is not expected to run this macro, | |
8773 +# just rely on AC_PROG_CC. | |
8774 +AC_DEFUN([_AM_DEPENDENCIES], | |
8775 +[AC_REQUIRE([AM_SET_DEPDIR])dnl | |
8776 +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl | |
8777 +AC_REQUIRE([AM_MAKE_INCLUDE])dnl | |
8778 +AC_REQUIRE([AM_DEP_TRACK])dnl | |
8779 + | |
8780 +m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], | |
8781 + [$1], [CXX], [depcc="$CXX" am_compiler_list=], | |
8782 + [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], | |
8783 + [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], | |
8784 + [$1], [UPC], [depcc="$UPC" am_compiler_list=], | |
8785 + [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], | |
8786 + [depcc="$$1" am_compiler_list=]) | |
8787 + | |
8788 +AC_CACHE_CHECK([dependency style of $depcc], | |
8789 + [am_cv_$1_dependencies_compiler_type], | |
8790 +[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then | |
8791 + # We make a subdir and do the tests there. Otherwise we can end up | |
8792 + # making bogus files that we don't know about and never remove. For | |
8793 + # instance it was reported that on HP-UX the gcc test will end up | |
8794 + # making a dummy file named 'D' -- because '-MD' means "put the output | |
8795 + # in D". | |
8796 + rm -rf conftest.dir | |
8797 + mkdir conftest.dir | |
8798 + # Copy depcomp to subdir because otherwise we won't find it if we're | |
8799 + # using a relative directory. | |
8800 + cp "$am_depcomp" conftest.dir | |
8801 + cd conftest.dir | |
8802 + # We will build objects and dependencies in a subdirectory because | |
8803 + # it helps to detect inapplicable dependency modes. For instance | |
8804 + # both Tru64's cc and ICC support -MD to output dependencies as a | |
8805 + # side effect of compilation, but ICC will put the dependencies in | |
8806 + # the current directory while Tru64 will put them in the object | |
8807 + # directory. | |
8808 + mkdir sub | |
8809 + | |
8810 + am_cv_$1_dependencies_compiler_type=none | |
8811 + if test "$am_compiler_list" = ""; then | |
8812 + am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` | |
8813 + fi | |
8814 + am__universal=false | |
8815 + m4_case([$1], [CC], | |
8816 + [case " $depcc " in #( | |
8817 + *\ -arch\ *\ -arch\ *) am__universal=true ;; | |
8818 + esac], | |
8819 + [CXX], | |
8820 + [case " $depcc " in #( | |
8821 + *\ -arch\ *\ -arch\ *) am__universal=true ;; | |
8822 + esac]) | |
8823 + | |
8824 + for depmode in $am_compiler_list; do | |
8825 + # Setup a source with many dependencies, because some compilers | |
8826 + # like to wrap large dependency lists on column 80 (with \), and | |
8827 + # we should not choose a depcomp mode which is confused by this. | |
8828 + # | |
8829 + # We need to recreate these files for each test, as the compiler may | |
8830 + # overwrite some of them when testing with obscure command lines. | |
8831 + # This happens at least with the AIX C compiler. | |
8832 + : > sub/conftest.c | |
8833 + for i in 1 2 3 4 5 6; do | |
8834 + echo '#include "conftst'$i'.h"' >> sub/conftest.c | |
8835 + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with | |
8836 + # Solaris 10 /bin/sh. | |
8837 + echo '/* dummy */' > sub/conftst$i.h | |
8838 + done | |
8839 + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf | |
8840 + | |
8841 + # We check with '-c' and '-o' for the sake of the "dashmstdout" | |
8842 + # mode. It turns out that the SunPro C++ compiler does not properly | |
8843 + # handle '-M -o', and we need to detect this. Also, some Intel | |
8844 + # versions had trouble with output in subdirs. | |
8845 + am__obj=sub/conftest.${OBJEXT-o} | |
8846 + am__minus_obj="-o $am__obj" | |
8847 + case $depmode in | |
8848 + gcc) | |
8849 + # This depmode causes a compiler race in universal mode. | |
8850 + test "$am__universal" = false || continue | |
8851 + ;; | |
8852 + nosideeffect) | |
8853 + # After this tag, mechanisms are not by side-effect, so they'll | |
8854 + # only be used when explicitly requested. | |
8855 + if test "x$enable_dependency_tracking" = xyes; then | |
8856 + continue | |
8857 + else | |
8858 + break | |
8859 + fi | |
8860 + ;; | |
8861 + msvc7 | msvc7msys | msvisualcpp | msvcmsys) | |
8862 + # This compiler won't grok '-c -o', but also, the minuso test has | |
8863 + # not run yet. These depmodes are late enough in the game, and | |
8864 + # so weak that their functioning should not be impacted. | |
8865 + am__obj=conftest.${OBJEXT-o} | |
8866 + am__minus_obj= | |
8867 + ;; | |
8868 + none) break ;; | |
8869 + esac | |
8870 + if depmode=$depmode \ | |
8871 + source=sub/conftest.c object=$am__obj \ | |
8872 + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ | |
8873 + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ | |
8874 + >/dev/null 2>conftest.err && | |
8875 + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && | |
8876 + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && | |
8877 + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && | |
8878 + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then | |
8879 + # icc doesn't choke on unknown options, it will just issue warnings | |
8880 + # or remarks (even with -Werror). So we grep stderr for any message | |
8881 + # that says an option was ignored or not supported. | |
8882 + # When given -MP, icc 7.0 and 7.1 complain thusly: | |
8883 + # icc: Command line warning: ignoring option '-M'; no argument required | |
8884 + # The diagnosis changed in icc 8.0: | |
8885 + # icc: Command line remark: option '-MP' not supported | |
8886 + if (grep 'ignoring option' conftest.err || | |
8887 + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else | |
8888 + am_cv_$1_dependencies_compiler_type=$depmode | |
8889 + break | |
8890 + fi | |
8891 + fi | |
8892 + done | |
8893 + | |
8894 + cd .. | |
8895 + rm -rf conftest.dir | |
8896 +else | |
8897 + am_cv_$1_dependencies_compiler_type=none | |
8898 +fi | |
8899 +]) | |
8900 +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) | |
8901 +AM_CONDITIONAL([am__fastdep$1], [ | |
8902 + test "x$enable_dependency_tracking" != xno \ | |
8903 + && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) | |
8904 +]) | |
8905 + | |
8906 + | |
8907 +# AM_SET_DEPDIR | |
8908 +# ------------- | |
8909 +# Choose a directory name for dependency files. | |
8910 +# This macro is AC_REQUIREd in _AM_DEPENDENCIES. | |
8911 +AC_DEFUN([AM_SET_DEPDIR], | |
8912 +[AC_REQUIRE([AM_SET_LEADING_DOT])dnl | |
8913 +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl | |
8914 +]) | |
8915 + | |
8916 + | |
8917 +# AM_DEP_TRACK | |
8918 +# ------------ | |
8919 +AC_DEFUN([AM_DEP_TRACK], | |
8920 +[AC_ARG_ENABLE([dependency-tracking], [dnl | |
8921 +AS_HELP_STRING( | |
8922 + [--enable-dependency-tracking], | |
8923 + [do not reject slow dependency extractors]) | |
8924 +AS_HELP_STRING( | |
8925 + [--disable-dependency-tracking], | |
8926 + [speeds up one-time build])]) | |
8927 +if test "x$enable_dependency_tracking" != xno; then | |
8928 + am_depcomp="$ac_aux_dir/depcomp" | |
8929 + AMDEPBACKSLASH='\' | |
8930 + am__nodep='_no' | |
8931 +fi | |
8932 +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) | |
8933 +AC_SUBST([AMDEPBACKSLASH])dnl | |
8934 +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl | |
8935 +AC_SUBST([am__nodep])dnl | |
8936 +_AM_SUBST_NOTMAKE([am__nodep])dnl | |
8937 +]) | |
8938 + | |
8939 +# Generate code to set up dependency tracking. -*- Autoconf -*- | |
8940 + | |
8941 +# Copyright (C) 1999-2013 Free Software Foundation, Inc. | |
8942 +# | |
8943 +# This file is free software; the Free Software Foundation | |
8944 +# gives unlimited permission to copy and/or distribute it, | |
8945 +# with or without modifications, as long as this notice is preserved. | |
8946 + | |
8947 + | |
8948 +# _AM_OUTPUT_DEPENDENCY_COMMANDS | |
8949 +# ------------------------------ | |
8950 +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], | |
8951 +[{ | |
8952 + # Older Autoconf quotes --file arguments for eval, but not when files | |
8953 + # are listed without --file. Let's play safe and only enable the eval | |
8954 + # if we detect the quoting. | |
8955 + case $CONFIG_FILES in | |
8956 + *\'*) eval set x "$CONFIG_FILES" ;; | |
8957 + *) set x $CONFIG_FILES ;; | |
8958 + esac | |
8959 + shift | |
8960 + for mf | |
8961 + do | |
8962 + # Strip MF so we end up with the name of the file. | |
8963 + mf=`echo "$mf" | sed -e 's/:.*$//'` | |
8964 + # Check whether this is an Automake generated Makefile or not. | |
8965 + # We used to match only the files named 'Makefile.in', but | |
8966 + # some people rename them; so instead we look at the file content. | |
8967 + # Grep'ing the first line is not enough: some people post-process | |
8968 + # each Makefile.in and add a new line on top of each file to say so. | |
8969 + # Grep'ing the whole file is not good either: AIX grep has a line | |
8970 + # limit of 2048, but all sed's we know have understand at least 4000. | |
8971 + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then | |
8972 + dirpart=`AS_DIRNAME("$mf")` | |
8973 + else | |
8974 + continue | |
8975 + fi | |
8976 + # Extract the definition of DEPDIR, am__include, and am__quote | |
8977 + # from the Makefile without running 'make'. | |
8978 + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` | |
8979 + test -z "$DEPDIR" && continue | |
8980 + am__include=`sed -n 's/^am__include = //p' < "$mf"` | |
8981 + test -z "$am__include" && continue | |
8982 + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` | |
8983 + # Find all dependency output files, they are included files with | |
8984 + # $(DEPDIR) in their names. We invoke sed twice because it is the | |
8985 + # simplest approach to changing $(DEPDIR) to its actual value in the | |
8986 + # expansion. | |
8987 + for file in `sed -n " | |
8988 + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ | |
8989 + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do | |
8990 + # Make sure the directory exists. | |
8991 + test -f "$dirpart/$file" && continue | |
8992 + fdir=`AS_DIRNAME(["$file"])` | |
8993 + AS_MKDIR_P([$dirpart/$fdir]) | |
8994 + # echo "creating $dirpart/$file" | |
8995 + echo '# dummy' > "$dirpart/$file" | |
8996 + done | |
8997 + done | |
8998 +} | |
8999 +])# _AM_OUTPUT_DEPENDENCY_COMMANDS | |
9000 + | |
9001 + | |
9002 +# AM_OUTPUT_DEPENDENCY_COMMANDS | |
9003 +# ----------------------------- | |
9004 +# This macro should only be invoked once -- use via AC_REQUIRE. | |
9005 +# | |
9006 +# This code is only required when automatic dependency tracking | |
9007 +# is enabled. FIXME. This creates each '.P' file that we will | |
9008 +# need in order to bootstrap the dependency handling code. | |
9009 +AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], | |
9010 +[AC_CONFIG_COMMANDS([depfiles], | |
9011 + [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], | |
9012 + [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) | |
9013 +]) | |
9014 + | |
9015 +# Do all the work for Automake. -*- Autoconf -*- | |
9016 + | |
9017 +# Copyright (C) 1996-2013 Free Software Foundation, Inc. | |
9018 +# | |
9019 +# This file is free software; the Free Software Foundation | |
9020 +# gives unlimited permission to copy and/or distribute it, | |
9021 +# with or without modifications, as long as this notice is preserved. | |
9022 + | |
9023 +# This macro actually does too much. Some checks are only needed if | |
9024 +# your package does certain things. But this isn't really a big deal. | |
9025 + | |
9026 +dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. | |
9027 +m4_define([AC_PROG_CC], | |
9028 +m4_defn([AC_PROG_CC]) | |
9029 +[_AM_PROG_CC_C_O | |
9030 +]) | |
9031 + | |
9032 +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) | |
9033 +# AM_INIT_AUTOMAKE([OPTIONS]) | |
9034 +# ----------------------------------------------- | |
9035 +# The call with PACKAGE and VERSION arguments is the old style | |
9036 +# call (pre autoconf-2.50), which is being phased out. PACKAGE | |
9037 +# and VERSION should now be passed to AC_INIT and removed from | |
9038 +# the call to AM_INIT_AUTOMAKE. | |
9039 +# We support both call styles for the transition. After | |
9040 +# the next Automake release, Autoconf can make the AC_INIT | |
9041 +# arguments mandatory, and then we can depend on a new Autoconf | |
9042 +# release and drop the old call support. | |
9043 +AC_DEFUN([AM_INIT_AUTOMAKE], | |
9044 +[AC_PREREQ([2.65])dnl | |
9045 +dnl Autoconf wants to disallow AM_ names. We explicitly allow | |
9046 +dnl the ones we care about. | |
9047 +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl | |
9048 +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl | |
9049 +AC_REQUIRE([AC_PROG_INSTALL])dnl | |
9050 +if test "`cd $srcdir && pwd`" != "`pwd`"; then | |
9051 + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output | |
9052 + # is not polluted with repeated "-I." | |
9053 + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl | |
9054 + # test to see if srcdir already configured | |
9055 + if test -f $srcdir/config.status; then | |
9056 + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) | |
9057 + fi | |
9058 +fi | |
9059 + | |
9060 +# test whether we have cygpath | |
9061 +if test -z "$CYGPATH_W"; then | |
9062 + if (cygpath --version) >/dev/null 2>/dev/null; then | |
9063 + CYGPATH_W='cygpath -w' | |
9064 + else | |
9065 + CYGPATH_W=echo | |
9066 + fi | |
9067 +fi | |
9068 +AC_SUBST([CYGPATH_W]) | |
9069 + | |
9070 +# Define the identity of the package. | |
9071 +dnl Distinguish between old-style and new-style calls. | |
9072 +m4_ifval([$2], | |
9073 +[AC_DIAGNOSE([obsolete], | |
9074 + [$0: two- and three-arguments forms are deprecated.]) | |
9075 +m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl | |
9076 + AC_SUBST([PACKAGE], [$1])dnl | |
9077 + AC_SUBST([VERSION], [$2])], | |
9078 +[_AM_SET_OPTIONS([$1])dnl | |
9079 +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. | |
9080 +m4_if( | |
9081 + m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), | |
9082 + [ok:ok],, | |
9083 + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl | |
9084 + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl | |
9085 + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl | |
9086 + | |
9087 +_AM_IF_OPTION([no-define],, | |
9088 +[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) | |
9089 + AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl | |
9090 + | |
9091 +# Some tools Automake needs. | |
9092 +AC_REQUIRE([AM_SANITY_CHECK])dnl | |
9093 +AC_REQUIRE([AC_ARG_PROGRAM])dnl | |
9094 +AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) | |
9095 +AM_MISSING_PROG([AUTOCONF], [autoconf]) | |
9096 +AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) | |
9097 +AM_MISSING_PROG([AUTOHEADER], [autoheader]) | |
9098 +AM_MISSING_PROG([MAKEINFO], [makeinfo]) | |
9099 +AC_REQUIRE([AM_PROG_INSTALL_SH])dnl | |
9100 +AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl | |
9101 +AC_REQUIRE([AC_PROG_MKDIR_P])dnl | |
9102 +# For better backward compatibility. To be removed once Automake 1.9.x | |
9103 +# dies out for good. For more background, see: | |
9104 +# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> | |
9105 +# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> | |
9106 +AC_SUBST([mkdir_p], ['$(MKDIR_P)']) | |
9107 +# We need awk for the "check" target. The system "awk" is bad on | |
9108 +# some platforms. | |
9109 +AC_REQUIRE([AC_PROG_AWK])dnl | |
9110 +AC_REQUIRE([AC_PROG_MAKE_SET])dnl | |
9111 +AC_REQUIRE([AM_SET_LEADING_DOT])dnl | |
9112 +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], | |
9113 + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], | |
9114 + [_AM_PROG_TAR([v7])])]) | |
9115 +_AM_IF_OPTION([no-dependencies],, | |
9116 +[AC_PROVIDE_IFELSE([AC_PROG_CC], | |
9117 + [_AM_DEPENDENCIES([CC])], | |
9118 + [m4_define([AC_PROG_CC], | |
9119 + m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl | |
9120 +AC_PROVIDE_IFELSE([AC_PROG_CXX], | |
9121 + [_AM_DEPENDENCIES([CXX])], | |
9122 + [m4_define([AC_PROG_CXX], | |
9123 + m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl | |
9124 +AC_PROVIDE_IFELSE([AC_PROG_OBJC], | |
9125 + [_AM_DEPENDENCIES([OBJC])], | |
9126 + [m4_define([AC_PROG_OBJC], | |
9127 + m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl | |
9128 +AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], | |
9129 + [_AM_DEPENDENCIES([OBJCXX])], | |
9130 + [m4_define([AC_PROG_OBJCXX], | |
9131 + m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl | |
9132 +]) | |
9133 +AC_REQUIRE([AM_SILENT_RULES])dnl | |
9134 +dnl The testsuite driver may need to know about EXEEXT, so add the | |
9135 +dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This | |
9136 +dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. | |
9137 +AC_CONFIG_COMMANDS_PRE(dnl | |
9138 +[m4_provide_if([_AM_COMPILER_EXEEXT], | |
9139 + [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl | |
9140 + | |
9141 +# POSIX will say in a future version that running "rm -f" with no argument | |
9142 +# is OK; and we want to be able to make that assumption in our Makefile | |
9143 +# recipes. So use an aggressive probe to check that the usage we want is | |
9144 +# actually supported "in the wild" to an acceptable degree. | |
9145 +# See automake bug#10828. | |
9146 +# To make any issue more visible, cause the running configure to be aborted | |
9147 +# by default if the 'rm' program in use doesn't match our expectations; the | |
9148 +# user can still override this though. | |
9149 +if rm -f && rm -fr && rm -rf; then : OK; else | |
9150 + cat >&2 <<'END' | |
9151 +Oops! | |
9152 + | |
9153 +Your 'rm' program seems unable to run without file operands specified | |
9154 +on the command line, even when the '-f' option is present. This is contrary | |
9155 +to the behaviour of most rm programs out there, and not conforming with | |
9156 +the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> | |
9157 + | |
9158 +Please tell bug-automake@gnu.org about your system, including the value | |
9159 +of your $PATH and any error possibly output before this message. This | |
9160 +can help us improve future automake versions. | |
9161 + | |
9162 +END | |
9163 + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then | |
9164 + echo 'Configuration will proceed anyway, since you have set the' >&2 | |
9165 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 | |
9166 + echo >&2 | |
9167 + else | |
9168 + cat >&2 <<'END' | |
9169 +Aborting the configuration process, to ensure you take notice of the issue. | |
9170 + | |
9171 +You can download and install GNU coreutils to get an 'rm' implementation | |
9172 +that behaves properly: <http://www.gnu.org/software/coreutils/>. | |
9173 + | |
9174 +If you want to complete the configuration process using your problematic | |
9175 +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM | |
9176 +to "yes", and re-run configure. | |
9177 + | |
9178 +END | |
9179 + AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) | |
9180 + fi | |
9181 +fi | |
9182 +]) | |
9183 + | |
9184 +dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not | |
9185 +dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further | |
9186 +dnl mangled by Autoconf and run in a shell conditional statement. | |
9187 +m4_define([_AC_COMPILER_EXEEXT], | |
9188 +m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) | |
9189 + | |
9190 +# When config.status generates a header, we must update the stamp-h file. | |
9191 +# This file resides in the same directory as the config header | |
9192 +# that is generated. The stamp files are numbered to have different names. | |
9193 + | |
9194 +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the | |
9195 +# loop where config.status creates the headers, so we can generate | |
9196 +# our stamp files there. | |
9197 +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], | |
9198 +[# Compute $1's index in $config_headers. | |
9199 +_am_arg=$1 | |
9200 +_am_stamp_count=1 | |
9201 +for _am_header in $config_headers :; do | |
9202 + case $_am_header in | |
9203 + $_am_arg | $_am_arg:* ) | |
9204 + break ;; | |
9205 + * ) | |
9206 + _am_stamp_count=`expr $_am_stamp_count + 1` ;; | |
9207 + esac | |
9208 +done | |
9209 +echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) | |
9210 + | |
9211 +# Copyright (C) 2001-2013 Free Software Foundation, Inc. | |
9212 +# | |
9213 +# This file is free software; the Free Software Foundation | |
9214 +# gives unlimited permission to copy and/or distribute it, | |
9215 +# with or without modifications, as long as this notice is preserved. | |
9216 + | |
9217 +# AM_PROG_INSTALL_SH | |
9218 +# ------------------ | |
9219 +# Define $install_sh. | |
9220 +AC_DEFUN([AM_PROG_INSTALL_SH], | |
9221 +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl | |
9222 +if test x"${install_sh}" != xset; then | |
9223 + case $am_aux_dir in | |
9224 + *\ * | *\ *) | |
9225 + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; | |
9226 + *) | |
9227 + install_sh="\${SHELL} $am_aux_dir/install-sh" | |
9228 + esac | |
9229 +fi | |
9230 +AC_SUBST([install_sh])]) | |
9231 + | |
9232 +# Copyright (C) 2003-2013 Free Software Foundation, Inc. | |
9233 +# | |
9234 +# This file is free software; the Free Software Foundation | |
9235 +# gives unlimited permission to copy and/or distribute it, | |
9236 +# with or without modifications, as long as this notice is preserved. | |
9237 + | |
9238 +# Check whether the underlying file-system supports filenames | |
9239 +# with a leading dot. For instance MS-DOS doesn't. | |
9240 +AC_DEFUN([AM_SET_LEADING_DOT], | |
9241 +[rm -rf .tst 2>/dev/null | |
9242 +mkdir .tst 2>/dev/null | |
9243 +if test -d .tst; then | |
9244 + am__leading_dot=. | |
9245 +else | |
9246 + am__leading_dot=_ | |
9247 +fi | |
9248 +rmdir .tst 2>/dev/null | |
9249 +AC_SUBST([am__leading_dot])]) | |
9250 + | |
9251 +# Check to see how 'make' treats includes. -*- Autoconf -*- | |
9252 + | |
9253 +# Copyright (C) 2001-2013 Free Software Foundation, Inc. | |
9254 +# | |
9255 +# This file is free software; the Free Software Foundation | |
9256 +# gives unlimited permission to copy and/or distribute it, | |
9257 +# with or without modifications, as long as this notice is preserved. | |
9258 + | |
9259 +# AM_MAKE_INCLUDE() | |
9260 +# ----------------- | |
9261 +# Check to see how make treats includes. | |
9262 +AC_DEFUN([AM_MAKE_INCLUDE], | |
9263 +[am_make=${MAKE-make} | |
9264 +cat > confinc << 'END' | |
9265 +am__doit: | |
9266 + @echo this is the am__doit target | |
9267 +.PHONY: am__doit | |
9268 +END | |
9269 +# If we don't find an include directive, just comment out the code. | |
9270 +AC_MSG_CHECKING([for style of include used by $am_make]) | |
9271 +am__include="#" | |
9272 +am__quote= | |
9273 +_am_result=none | |
9274 +# First try GNU make style include. | |
9275 +echo "include confinc" > confmf | |
9276 +# Ignore all kinds of additional output from 'make'. | |
9277 +case `$am_make -s -f confmf 2> /dev/null` in #( | |
9278 +*the\ am__doit\ target*) | |
9279 + am__include=include | |
9280 + am__quote= | |
9281 + _am_result=GNU | |
9282 + ;; | |
9283 +esac | |
9284 +# Now try BSD make style include. | |
9285 +if test "$am__include" = "#"; then | |
9286 + echo '.include "confinc"' > confmf | |
9287 + case `$am_make -s -f confmf 2> /dev/null` in #( | |
9288 + *the\ am__doit\ target*) | |
9289 + am__include=.include | |
9290 + am__quote="\"" | |
9291 + _am_result=BSD | |
9292 + ;; | |
9293 + esac | |
9294 +fi | |
9295 +AC_SUBST([am__include]) | |
9296 +AC_SUBST([am__quote]) | |
9297 +AC_MSG_RESULT([$_am_result]) | |
9298 +rm -f confinc confmf | |
9299 +]) | |
9300 + | |
9301 +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- | |
9302 + | |
9303 +# Copyright (C) 1997-2013 Free Software Foundation, Inc. | |
9304 +# | |
9305 +# This file is free software; the Free Software Foundation | |
9306 +# gives unlimited permission to copy and/or distribute it, | |
9307 +# with or without modifications, as long as this notice is preserved. | |
9308 + | |
9309 +# AM_MISSING_PROG(NAME, PROGRAM) | |
9310 +# ------------------------------ | |
9311 +AC_DEFUN([AM_MISSING_PROG], | |
9312 +[AC_REQUIRE([AM_MISSING_HAS_RUN]) | |
9313 +$1=${$1-"${am_missing_run}$2"} | |
9314 +AC_SUBST($1)]) | |
9315 + | |
9316 +# AM_MISSING_HAS_RUN | |
9317 +# ------------------ | |
9318 +# Define MISSING if not defined so far and test if it is modern enough. | |
9319 +# If it is, set am_missing_run to use it, otherwise, to nothing. | |
9320 +AC_DEFUN([AM_MISSING_HAS_RUN], | |
9321 +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl | |
9322 +AC_REQUIRE_AUX_FILE([missing])dnl | |
9323 +if test x"${MISSING+set}" != xset; then | |
9324 + case $am_aux_dir in | |
9325 + *\ * | *\ *) | |
9326 + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; | |
9327 + *) | |
9328 + MISSING="\${SHELL} $am_aux_dir/missing" ;; | |
9329 + esac | |
9330 +fi | |
9331 +# Use eval to expand $SHELL | |
9332 +if eval "$MISSING --is-lightweight"; then | |
9333 + am_missing_run="$MISSING " | |
9334 +else | |
9335 + am_missing_run= | |
9336 + AC_MSG_WARN(['missing' script is too old or missing]) | |
9337 +fi | |
9338 +]) | |
9339 + | |
9340 +# Helper functions for option handling. -*- Autoconf -*- | |
9341 + | |
9342 +# Copyright (C) 2001-2013 Free Software Foundation, Inc. | |
9343 +# | |
9344 +# This file is free software; the Free Software Foundation | |
9345 +# gives unlimited permission to copy and/or distribute it, | |
9346 +# with or without modifications, as long as this notice is preserved. | |
9347 + | |
9348 +# _AM_MANGLE_OPTION(NAME) | |
9349 +# ----------------------- | |
9350 +AC_DEFUN([_AM_MANGLE_OPTION], | |
9351 +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) | |
9352 + | |
9353 +# _AM_SET_OPTION(NAME) | |
9354 +# -------------------- | |
9355 +# Set option NAME. Presently that only means defining a flag for this option. | |
9356 +AC_DEFUN([_AM_SET_OPTION], | |
9357 +[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) | |
9358 + | |
9359 +# _AM_SET_OPTIONS(OPTIONS) | |
9360 +# ------------------------ | |
9361 +# OPTIONS is a space-separated list of Automake options. | |
9362 +AC_DEFUN([_AM_SET_OPTIONS], | |
9363 +[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) | |
9364 + | |
9365 +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) | |
9366 +# ------------------------------------------- | |
9367 +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. | |
9368 +AC_DEFUN([_AM_IF_OPTION], | |
9369 +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) | |
9370 + | |
9371 +# Copyright (C) 1999-2013 Free Software Foundation, Inc. | |
9372 +# | |
9373 +# This file is free software; the Free Software Foundation | |
9374 +# gives unlimited permission to copy and/or distribute it, | |
9375 +# with or without modifications, as long as this notice is preserved. | |
9376 + | |
9377 +# _AM_PROG_CC_C_O | |
9378 +# --------------- | |
9379 +# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC | |
9380 +# to automatically call this. | |
9381 +AC_DEFUN([_AM_PROG_CC_C_O], | |
9382 +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl | |
9383 +AC_REQUIRE_AUX_FILE([compile])dnl | |
9384 +AC_LANG_PUSH([C])dnl | |
9385 +AC_CACHE_CHECK( | |
9386 + [whether $CC understands -c and -o together], | |
9387 + [am_cv_prog_cc_c_o], | |
9388 + [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) | |
9389 + # Make sure it works both with $CC and with simple cc. | |
9390 + # Following AC_PROG_CC_C_O, we do the test twice because some | |
9391 + # compilers refuse to overwrite an existing .o file with -o, | |
9392 + # though they will create one. | |
9393 + am_cv_prog_cc_c_o=yes | |
9394 + for am_i in 1 2; do | |
9395 + if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ | |
9396 + && test -f conftest2.$ac_objext; then | |
9397 + : OK | |
9398 + else | |
9399 + am_cv_prog_cc_c_o=no | |
9400 + break | |
9401 + fi | |
9402 + done | |
9403 + rm -f core conftest* | |
9404 + unset am_i]) | |
9405 +if test "$am_cv_prog_cc_c_o" != yes; then | |
9406 + # Losing compiler, so override with the script. | |
9407 + # FIXME: It is wrong to rewrite CC. | |
9408 + # But if we don't then we get into trouble of one sort or another. | |
9409 + # A longer-term fix would be to have automake use am__CC in this case, | |
9410 + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" | |
9411 + CC="$am_aux_dir/compile $CC" | |
9412 +fi | |
9413 +AC_LANG_POP([C])]) | |
9414 + | |
9415 +# For backward compatibility. | |
9416 +AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) | |
9417 + | |
9418 +# Copyright (C) 2001-2013 Free Software Foundation, Inc. | |
9419 +# | |
9420 +# This file is free software; the Free Software Foundation | |
9421 +# gives unlimited permission to copy and/or distribute it, | |
9422 +# with or without modifications, as long as this notice is preserved. | |
9423 + | |
9424 +# AM_RUN_LOG(COMMAND) | |
9425 +# ------------------- | |
9426 +# Run COMMAND, save the exit status in ac_status, and log it. | |
9427 +# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) | |
9428 +AC_DEFUN([AM_RUN_LOG], | |
9429 +[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD | |
9430 + ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD | |
9431 + ac_status=$? | |
9432 + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD | |
9433 + (exit $ac_status); }]) | |
9434 + | |
9435 +# Check to make sure that the build environment is sane. -*- Autoconf -*- | |
9436 + | |
9437 +# Copyright (C) 1996-2013 Free Software Foundation, Inc. | |
9438 +# | |
9439 +# This file is free software; the Free Software Foundation | |
9440 +# gives unlimited permission to copy and/or distribute it, | |
9441 +# with or without modifications, as long as this notice is preserved. | |
9442 + | |
9443 +# AM_SANITY_CHECK | |
9444 +# --------------- | |
9445 +AC_DEFUN([AM_SANITY_CHECK], | |
9446 +[AC_MSG_CHECKING([whether build environment is sane]) | |
9447 +# Reject unsafe characters in $srcdir or the absolute working directory | |
9448 +# name. Accept space and tab only in the latter. | |
9449 +am_lf=' | |
9450 +' | |
9451 +case `pwd` in | |
9452 + *[[\\\"\#\$\&\'\`$am_lf]]*) | |
9453 + AC_MSG_ERROR([unsafe absolute working directory name]);; | |
9454 +esac | |
9455 +case $srcdir in | |
9456 + *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) | |
9457 + AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; | |
9458 +esac | |
9459 + | |
9460 +# Do 'set' in a subshell so we don't clobber the current shell's | |
9461 +# arguments. Must try -L first in case configure is actually a | |
9462 +# symlink; some systems play weird games with the mod time of symlinks | |
9463 +# (eg FreeBSD returns the mod time of the symlink's containing | |
9464 +# directory). | |
9465 +if ( | |
9466 + am_has_slept=no | |
9467 + for am_try in 1 2; do | |
9468 + echo "timestamp, slept: $am_has_slept" > conftest.file | |
9469 + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` | |
9470 + if test "$[*]" = "X"; then | |
9471 + # -L didn't work. | |
9472 + set X `ls -t "$srcdir/configure" conftest.file` | |
9473 + fi | |
9474 + if test "$[*]" != "X $srcdir/configure conftest.file" \ | |
9475 + && test "$[*]" != "X conftest.file $srcdir/configure"; then | |
9476 + | |
9477 + # If neither matched, then we have a broken ls. This can happen | |
9478 + # if, for instance, CONFIG_SHELL is bash and it inherits a | |
9479 + # broken ls alias from the environment. This has actually | |
9480 + # happened. Such a system could not be considered "sane". | |
9481 + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken | |
9482 + alias in your environment]) | |
9483 + fi | |
9484 + if test "$[2]" = conftest.file || test $am_try -eq 2; then | |
9485 + break | |
9486 + fi | |
9487 + # Just in case. | |
9488 + sleep 1 | |
9489 + am_has_slept=yes | |
9490 + done | |
9491 + test "$[2]" = conftest.file | |
9492 + ) | |
9493 +then | |
9494 + # Ok. | |
9495 + : | |
9496 +else | |
9497 + AC_MSG_ERROR([newly created file is older than distributed files! | |
9498 +Check your system clock]) | |
9499 +fi | |
9500 +AC_MSG_RESULT([yes]) | |
9501 +# If we didn't sleep, we still need to ensure time stamps of config.status and | |
9502 +# generated files are strictly newer. | |
9503 +am_sleep_pid= | |
9504 +if grep 'slept: no' conftest.file >/dev/null 2>&1; then | |
9505 + ( sleep 1 ) & | |
9506 + am_sleep_pid=$! | |
9507 +fi | |
9508 +AC_CONFIG_COMMANDS_PRE( | |
9509 + [AC_MSG_CHECKING([that generated files are newer than configure]) | |
9510 + if test -n "$am_sleep_pid"; then | |
9511 + # Hide warnings about reused PIDs. | |
9512 + wait $am_sleep_pid 2>/dev/null | |
9513 + fi | |
9514 + AC_MSG_RESULT([done])]) | |
9515 +rm -f conftest.file | |
9516 +]) | |
9517 + | |
9518 +# Copyright (C) 2009-2013 Free Software Foundation, Inc. | |
9519 +# | |
9520 +# This file is free software; the Free Software Foundation | |
9521 +# gives unlimited permission to copy and/or distribute it, | |
9522 +# with or without modifications, as long as this notice is preserved. | |
9523 + | |
9524 +# AM_SILENT_RULES([DEFAULT]) | |
9525 +# -------------------------- | |
9526 +# Enable less verbose build rules; with the default set to DEFAULT | |
9527 +# ("yes" being less verbose, "no" or empty being verbose). | |
9528 +AC_DEFUN([AM_SILENT_RULES], | |
9529 +[AC_ARG_ENABLE([silent-rules], [dnl | |
9530 +AS_HELP_STRING( | |
9531 + [--enable-silent-rules], | |
9532 + [less verbose build output (undo: "make V=1")]) | |
9533 +AS_HELP_STRING( | |
9534 + [--disable-silent-rules], | |
9535 + [verbose build output (undo: "make V=0")])dnl | |
9536 +]) | |
9537 +case $enable_silent_rules in @%:@ ((( | |
9538 + yes) AM_DEFAULT_VERBOSITY=0;; | |
9539 + no) AM_DEFAULT_VERBOSITY=1;; | |
9540 + *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; | |
9541 +esac | |
9542 +dnl | |
9543 +dnl A few 'make' implementations (e.g., NonStop OS and NextStep) | |
9544 +dnl do not support nested variable expansions. | |
9545 +dnl See automake bug#9928 and bug#10237. | |
9546 +am_make=${MAKE-make} | |
9547 +AC_CACHE_CHECK([whether $am_make supports nested variables], | |
9548 + [am_cv_make_support_nested_variables], | |
9549 + [if AS_ECHO([['TRUE=$(BAR$(V)) | |
9550 +BAR0=false | |
9551 +BAR1=true | |
9552 +V=1 | |
9553 +am__doit: | |
9554 + @$(TRUE) | |
9555 +.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then | |
9556 + am_cv_make_support_nested_variables=yes | |
9557 +else | |
9558 + am_cv_make_support_nested_variables=no | |
9559 +fi]) | |
9560 +if test $am_cv_make_support_nested_variables = yes; then | |
9561 + dnl Using '$V' instead of '$(V)' breaks IRIX make. | |
9562 + AM_V='$(V)' | |
9563 + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' | |
9564 +else | |
9565 + AM_V=$AM_DEFAULT_VERBOSITY | |
9566 + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY | |
9567 +fi | |
9568 +AC_SUBST([AM_V])dnl | |
9569 +AM_SUBST_NOTMAKE([AM_V])dnl | |
9570 +AC_SUBST([AM_DEFAULT_V])dnl | |
9571 +AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl | |
9572 +AC_SUBST([AM_DEFAULT_VERBOSITY])dnl | |
9573 +AM_BACKSLASH='\' | |
9574 +AC_SUBST([AM_BACKSLASH])dnl | |
9575 +_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl | |
9576 +]) | |
9577 + | |
9578 +# Copyright (C) 2001-2013 Free Software Foundation, Inc. | |
9579 +# | |
9580 +# This file is free software; the Free Software Foundation | |
9581 +# gives unlimited permission to copy and/or distribute it, | |
9582 +# with or without modifications, as long as this notice is preserved. | |
9583 + | |
9584 +# AM_PROG_INSTALL_STRIP | |
9585 +# --------------------- | |
9586 +# One issue with vendor 'install' (even GNU) is that you can't | |
9587 +# specify the program used to strip binaries. This is especially | |
9588 +# annoying in cross-compiling environments, where the build's strip | |
9589 +# is unlikely to handle the host's binaries. | |
9590 +# Fortunately install-sh will honor a STRIPPROG variable, so we | |
9591 +# always use install-sh in "make install-strip", and initialize | |
9592 +# STRIPPROG with the value of the STRIP variable (set by the user). | |
9593 +AC_DEFUN([AM_PROG_INSTALL_STRIP], | |
9594 +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl | |
9595 +# Installed binaries are usually stripped using 'strip' when the user | |
9596 +# run "make install-strip". However 'strip' might not be the right | |
9597 +# tool to use in cross-compilation environments, therefore Automake | |
9598 +# will honor the 'STRIP' environment variable to overrule this program. | |
9599 +dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. | |
9600 +if test "$cross_compiling" != no; then | |
9601 + AC_CHECK_TOOL([STRIP], [strip], :) | |
9602 +fi | |
9603 +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" | |
9604 +AC_SUBST([INSTALL_STRIP_PROGRAM])]) | |
9605 + | |
9606 +# Copyright (C) 2006-2013 Free Software Foundation, Inc. | |
9607 +# | |
9608 +# This file is free software; the Free Software Foundation | |
9609 +# gives unlimited permission to copy and/or distribute it, | |
9610 +# with or without modifications, as long as this notice is preserved. | |
9611 + | |
9612 +# _AM_SUBST_NOTMAKE(VARIABLE) | |
9613 +# --------------------------- | |
9614 +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. | |
9615 +# This macro is traced by Automake. | |
9616 +AC_DEFUN([_AM_SUBST_NOTMAKE]) | |
9617 + | |
9618 +# AM_SUBST_NOTMAKE(VARIABLE) | |
9619 +# -------------------------- | |
9620 +# Public sister of _AM_SUBST_NOTMAKE. | |
9621 +AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) | |
9622 + | |
9623 +# Check how to create a tarball. -*- Autoconf -*- | |
9624 + | |
9625 +# Copyright (C) 2004-2013 Free Software Foundation, Inc. | |
9626 +# | |
9627 +# This file is free software; the Free Software Foundation | |
9628 +# gives unlimited permission to copy and/or distribute it, | |
9629 +# with or without modifications, as long as this notice is preserved. | |
9630 + | |
9631 +# _AM_PROG_TAR(FORMAT) | |
9632 +# -------------------- | |
9633 +# Check how to create a tarball in format FORMAT. | |
9634 +# FORMAT should be one of 'v7', 'ustar', or 'pax'. | |
9635 +# | |
9636 +# Substitute a variable $(am__tar) that is a command | |
9637 +# writing to stdout a FORMAT-tarball containing the directory | |
9638 +# $tardir. | |
9639 +# tardir=directory && $(am__tar) > result.tar | |
9640 +# | |
9641 +# Substitute a variable $(am__untar) that extract such | |
9642 +# a tarball read from stdin. | |
9643 +# $(am__untar) < result.tar | |
9644 +# | |
9645 +AC_DEFUN([_AM_PROG_TAR], | |
9646 +[# Always define AMTAR for backward compatibility. Yes, it's still used | |
9647 +# in the wild :-( We should find a proper way to deprecate it ... | |
9648 +AC_SUBST([AMTAR], ['$${TAR-tar}']) | |
9649 + | |
9650 +# We'll loop over all known methods to create a tar archive until one works. | |
9651 +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' | |
9652 + | |
9653 +m4_if([$1], [v7], | |
9654 + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], | |
9655 + | |
9656 + [m4_case([$1], | |
9657 + [ustar], | |
9658 + [# The POSIX 1988 'ustar' format is defined with fixed-size fields. | |
9659 + # There is notably a 21 bits limit for the UID and the GID. In fact, | |
9660 + # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 | |
9661 + # and bug#13588). | |
9662 + am_max_uid=2097151 # 2^21 - 1 | |
9663 + am_max_gid=$am_max_uid | |
9664 + # The $UID and $GID variables are not portable, so we need to resort | |
9665 + # to the POSIX-mandated id(1) utility. Errors in the 'id' calls | |
9666 + # below are definitely unexpected, so allow the users to see them | |
9667 + # (that is, avoid stderr redirection). | |
9668 + am_uid=`id -u || echo unknown` | |
9669 + am_gid=`id -g || echo unknown` | |
9670 + AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) | |
9671 + if test $am_uid -le $am_max_uid; then | |
9672 + AC_MSG_RESULT([yes]) | |
9673 + else | |
9674 + AC_MSG_RESULT([no]) | |
9675 + _am_tools=none | |
9676 + fi | |
9677 + AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) | |
9678 + if test $am_gid -le $am_max_gid; then | |
9679 + AC_MSG_RESULT([yes]) | |
9680 + else | |
9681 + AC_MSG_RESULT([no]) | |
9682 + _am_tools=none | |
9683 + fi], | |
9684 + | |
9685 + [pax], | |
9686 + [], | |
9687 + | |
9688 + [m4_fatal([Unknown tar format])]) | |
9689 + | |
9690 + AC_MSG_CHECKING([how to create a $1 tar archive]) | |
9691 + | |
9692 + # Go ahead even if we have the value already cached. We do so because we | |
9693 + # need to set the values for the 'am__tar' and 'am__untar' variables. | |
9694 + _am_tools=${am_cv_prog_tar_$1-$_am_tools} | |
9695 + | |
9696 + for _am_tool in $_am_tools; do | |
9697 + case $_am_tool in | |
9698 + gnutar) | |
9699 + for _am_tar in tar gnutar gtar; do | |
9700 + AM_RUN_LOG([$_am_tar --version]) && break | |
9701 + done | |
9702 + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' | |
9703 + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' | |
9704 + am__untar="$_am_tar -xf -" | |
9705 + ;; | |
9706 + plaintar) | |
9707 + # Must skip GNU tar: if it does not support --format= it doesn't create | |
9708 + # ustar tarball either. | |
9709 + (tar --version) >/dev/null 2>&1 && continue | |
9710 + am__tar='tar chf - "$$tardir"' | |
9711 + am__tar_='tar chf - "$tardir"' | |
9712 + am__untar='tar xf -' | |
9713 + ;; | |
9714 + pax) | |
9715 + am__tar='pax -L -x $1 -w "$$tardir"' | |
9716 + am__tar_='pax -L -x $1 -w "$tardir"' | |
9717 + am__untar='pax -r' | |
9718 + ;; | |
9719 + cpio) | |
9720 + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' | |
9721 + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' | |
9722 + am__untar='cpio -i -H $1 -d' | |
9723 + ;; | |
9724 + none) | |
9725 + am__tar=false | |
9726 + am__tar_=false | |
9727 + am__untar=false | |
9728 + ;; | |
9729 + esac | |
9730 + | |
9731 + # If the value was cached, stop now. We just wanted to have am__tar | |
9732 + # and am__untar set. | |
9733 + test -n "${am_cv_prog_tar_$1}" && break | |
9734 + | |
9735 + # tar/untar a dummy directory, and stop if the command works. | |
9736 + rm -rf conftest.dir | |
9737 + mkdir conftest.dir | |
9738 + echo GrepMe > conftest.dir/file | |
9739 + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) | |
9740 + rm -rf conftest.dir | |
9741 + if test -s conftest.tar; then | |
9742 + AM_RUN_LOG([$am__untar <conftest.tar]) | |
9743 + AM_RUN_LOG([cat conftest.dir/file]) | |
9744 + grep GrepMe conftest.dir/file >/dev/null 2>&1 && break | |
9745 + fi | |
9746 + done | |
9747 + rm -rf conftest.dir | |
9748 + | |
9749 + AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) | |
9750 + AC_MSG_RESULT([$am_cv_prog_tar_$1])]) | |
9751 + | |
9752 +AC_SUBST([am__tar]) | |
9753 +AC_SUBST([am__untar]) | |
9754 +]) # _AM_PROG_TAR | |
9755 + | |
9756 diff -uNr a/AUTHORS b/AUTHORS | |
9757 --- a/AUTHORS 1969-12-31 19:00:00.000000000 -0500 | |
9758 +++ b/AUTHORS 2014-12-12 15:59:32.605606679 -0500 | |
9759 @@ -0,0 +1 @@ | |
9760 + | |
9761 diff -uNr a/ChangeLog b/ChangeLog | |
9762 --- a/ChangeLog 1969-12-31 19:00:00.000000000 -0500 | |
9763 +++ b/ChangeLog 2014-12-12 15:59:32.605606679 -0500 | |
9764 @@ -0,0 +1 @@ | |
9765 + | |
9766 diff -uNr a/compile b/compile | |
9767 --- a/compile 1969-12-31 19:00:00.000000000 -0500 | |
9768 +++ b/compile 2014-12-12 15:22:27.566241255 -0500 | |
9769 @@ -0,0 +1,347 @@ | |
9770 +#! /bin/sh | |
9771 +# Wrapper for compilers which do not understand '-c -o'. | |
9772 + | |
9773 +scriptversion=2012-10-14.11; # UTC | |
9774 + | |
9775 +# Copyright (C) 1999-2013 Free Software Foundation, Inc. | |
9776 +# Written by Tom Tromey <tromey@cygnus.com>. | |
9777 +# | |
9778 +# This program is free software; you can redistribute it and/or modify | |
9779 +# it under the terms of the GNU General Public License as published by | |
9780 +# the Free Software Foundation; either version 2, or (at your option) | |
9781 +# any later version. | |
9782 +# | |
9783 +# This program is distributed in the hope that it will be useful, | |
9784 +# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
9785 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
9786 +# GNU General Public License for more details. | |
9787 +# | |
9788 +# You should have received a copy of the GNU General Public License | |
9789 +# along with this program. If not, see <http://www.gnu.org/licenses/>. | |
9790 + | |
9791 +# As a special exception to the GNU General Public License, if you | |
9792 +# distribute this file as part of a program that contains a | |
9793 +# configuration script generated by Autoconf, you may include it under | |
9794 +# the same distribution terms that you use for the rest of that program. | |
9795 + | |
9796 +# This file is maintained in Automake, please report | |
9797 +# bugs to <bug-automake@gnu.org> or send patches to | |
9798 +# <automake-patches@gnu.org>. | |
9799 + | |
9800 +nl=' | |
9801 +' | |
9802 + | |
9803 +# We need space, tab and new line, in precisely that order. Quoting is | |
9804 +# there to prevent tools from complaining about whitespace usage. | |
9805 +IFS=" "" $nl" | |
9806 + | |
9807 +file_conv= | |
9808 + | |
9809 +# func_file_conv build_file lazy | |
9810 +# Convert a $build file to $host form and store it in $file | |
9811 +# Currently only supports Windows hosts. If the determined conversion | |
9812 +# type is listed in (the comma separated) LAZY, no conversion will | |
9813 +# take place. | |
9814 +func_file_conv () | |
9815 +{ | |
9816 + file=$1 | |
9817 + case $file in | |
9818 + / | /[!/]*) # absolute file, and not a UNC file | |
9819 + if test -z "$file_conv"; then | |
9820 + # lazily determine how to convert abs files | |
9821 + case `uname -s` in | |
9822 + MINGW*) | |
9823 + file_conv=mingw | |
9824 + ;; | |
9825 + CYGWIN*) | |
9826 + file_conv=cygwin | |
9827 + ;; | |
9828 + *) | |
9829 + file_conv=wine | |
9830 + ;; | |
9831 + esac | |
9832 + fi | |
9833 + case $file_conv/,$2, in | |
9834 + *,$file_conv,*) | |
9835 + ;; | |
9836 + mingw/*) | |
9837 + file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` | |
9838 + ;; | |
9839 + cygwin/*) | |
9840 + file=`cygpath -m "$file" || echo "$file"` | |
9841 + ;; | |
9842 + wine/*) | |
9843 + file=`winepath -w "$file" || echo "$file"` | |
9844 + ;; | |
9845 + esac | |
9846 + ;; | |
9847 + esac | |
9848 +} | |
9849 + | |
9850 +# func_cl_dashL linkdir | |
9851 +# Make cl look for libraries in LINKDIR | |
9852 +func_cl_dashL () | |
9853 +{ | |
9854 + func_file_conv "$1" | |
9855 + if test -z "$lib_path"; then | |
9856 + lib_path=$file | |
9857 + else | |
9858 + lib_path="$lib_path;$file" | |
9859 + fi | |
9860 + linker_opts="$linker_opts -LIBPATH:$file" | |
9861 +} | |
9862 + | |
9863 +# func_cl_dashl library | |
9864 +# Do a library search-path lookup for cl | |
9865 +func_cl_dashl () | |
9866 +{ | |
9867 + lib=$1 | |
9868 + found=no | |
9869 + save_IFS=$IFS | |
9870 + IFS=';' | |
9871 + for dir in $lib_path $LIB | |
9872 + do | |
9873 + IFS=$save_IFS | |
9874 + if $shared && test -f "$dir/$lib.dll.lib"; then | |
9875 + found=yes | |
9876 + lib=$dir/$lib.dll.lib | |
9877 + break | |
9878 + fi | |
9879 + if test -f "$dir/$lib.lib"; then | |
9880 + found=yes | |
9881 + lib=$dir/$lib.lib | |
9882 + break | |
9883 + fi | |
9884 + if test -f "$dir/lib$lib.a"; then | |
9885 + found=yes | |
9886 + lib=$dir/lib$lib.a | |
9887 + break | |
9888 + fi | |
9889 + done | |
9890 + IFS=$save_IFS | |
9891 + | |
9892 + if test "$found" != yes; then | |
9893 + lib=$lib.lib | |
9894 + fi | |
9895 +} | |
9896 + | |
9897 +# func_cl_wrapper cl arg... | |
9898 +# Adjust compile command to suit cl | |
9899 +func_cl_wrapper () | |
9900 +{ | |
9901 + # Assume a capable shell | |
9902 + lib_path= | |
9903 + shared=: | |
9904 + linker_opts= | |
9905 + for arg | |
9906 + do | |
9907 + if test -n "$eat"; then | |
9908 + eat= | |
9909 + else | |
9910 + case $1 in | |
9911 + -o) | |
9912 + # configure might choose to run compile as 'compile cc -o foo foo.c'. | |
9913 + eat=1 | |
9914 + case $2 in | |
9915 + *.o | *.[oO][bB][jJ]) | |
9916 + func_file_conv "$2" | |
9917 + set x "$@" -Fo"$file" | |
9918 + shift | |
9919 + ;; | |
9920 + *) | |
9921 + func_file_conv "$2" | |
9922 + set x "$@" -Fe"$file" | |
9923 + shift | |
9924 + ;; | |
9925 + esac | |
9926 + ;; | |
9927 + -I) | |
9928 + eat=1 | |
9929 + func_file_conv "$2" mingw | |
9930 + set x "$@" -I"$file" | |
9931 + shift | |
9932 + ;; | |
9933 + -I*) | |
9934 + func_file_conv "${1#-I}" mingw | |
9935 + set x "$@" -I"$file" | |
9936 + shift | |
9937 + ;; | |
9938 + -l) | |
9939 + eat=1 | |
9940 + func_cl_dashl "$2" | |
9941 + set x "$@" "$lib" | |
9942 + shift | |
9943 + ;; | |
9944 + -l*) | |
9945 + func_cl_dashl "${1#-l}" | |
9946 + set x "$@" "$lib" | |
9947 + shift | |
9948 + ;; | |
9949 + -L) | |
9950 + eat=1 | |
9951 + func_cl_dashL "$2" | |
9952 + ;; | |
9953 + -L*) | |
9954 + func_cl_dashL "${1#-L}" | |
9955 + ;; | |
9956 + -static) | |
9957 + shared=false | |
9958 + ;; | |
9959 + -Wl,*) | |
9960 + arg=${1#-Wl,} | |
9961 + save_ifs="$IFS"; IFS=',' | |
9962 + for flag in $arg; do | |
9963 + IFS="$save_ifs" | |
9964 + linker_opts="$linker_opts $flag" | |
9965 + done | |
9966 + IFS="$save_ifs" | |
9967 + ;; | |
9968 + -Xlinker) | |
9969 + eat=1 | |
9970 + linker_opts="$linker_opts $2" | |
9971 + ;; | |
9972 + -*) | |
9973 + set x "$@" "$1" | |
9974 + shift | |
9975 + ;; | |
9976 + *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) | |
9977 + func_file_conv "$1" | |
9978 + set x "$@" -Tp"$file" | |
9979 + shift | |
9980 + ;; | |
9981 + *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) | |
9982 + func_file_conv "$1" mingw | |
9983 + set x "$@" "$file" | |
9984 + shift | |
9985 + ;; | |
9986 + *) | |
9987 + set x "$@" "$1" | |
9988 + shift | |
9989 + ;; | |
9990 + esac | |
9991 + fi | |
9992 + shift | |
9993 + done | |
9994 + if test -n "$linker_opts"; then | |
9995 + linker_opts="-link$linker_opts" | |
9996 + fi | |
9997 + exec "$@" $linker_opts | |
9998 + exit 1 | |
9999 +} | |
10000 + | |
10001 +eat= | |
10002 + | |
10003 +case $1 in | |
10004 + '') | |
10005 + echo "$0: No command. Try '$0 --help' for more information." 1>&2 | |
10006 + exit 1; | |
10007 + ;; | |
10008 + -h | --h*) | |
10009 + cat <<\EOF | |
10010 +Usage: compile [--help] [--version] PROGRAM [ARGS] | |
10011 + | |
10012 +Wrapper for compilers which do not understand '-c -o'. | |
10013 +Remove '-o dest.o' from ARGS, run PROGRAM with the remaining | |
10014 +arguments, and rename the output as expected. | |
10015 + | |
10016 +If you are trying to build a whole package this is not the | |
10017 +right script to run: please start by reading the file 'INSTALL'. | |
10018 + | |
10019 +Report bugs to <bug-automake@gnu.org>. | |
10020 +EOF | |
10021 + exit $? | |
10022 + ;; | |
10023 + -v | --v*) | |
10024 + echo "compile $scriptversion" | |
10025 + exit $? | |
10026 + ;; | |
10027 + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) | |
10028 + func_cl_wrapper "$@" # Doesn't return... | |
10029 + ;; | |
10030 +esac | |
10031 + | |
10032 +ofile= | |
10033 +cfile= | |
10034 + | |
10035 +for arg | |
10036 +do | |
10037 + if test -n "$eat"; then | |
10038 + eat= | |
10039 + else | |
10040 + case $1 in | |
10041 + -o) | |
10042 + # configure might choose to run compile as 'compile cc -o foo foo.c'. | |
10043 + # So we strip '-o arg' only if arg is an object. | |
10044 + eat=1 | |
10045 + case $2 in | |
10046 + *.o | *.obj) | |
10047 + ofile=$2 | |
10048 + ;; | |
10049 + *) | |
10050 + set x "$@" -o "$2" | |
10051 + shift | |
10052 + ;; | |
10053 + esac | |
10054 + ;; | |
10055 + *.c) | |
10056 + cfile=$1 | |
10057 + set x "$@" "$1" | |
10058 + shift | |
10059 + ;; | |
10060 + *) | |
10061 + set x "$@" "$1" | |
10062 + shift | |
10063 + ;; | |
10064 + esac | |
10065 + fi | |
10066 + shift | |
10067 +done | |
10068 + | |
10069 +if test -z "$ofile" || test -z "$cfile"; then | |
10070 + # If no '-o' option was seen then we might have been invoked from a | |
10071 + # pattern rule where we don't need one. That is ok -- this is a | |
10072 + # normal compilation that the losing compiler can handle. If no | |
10073 + # '.c' file was seen then we are probably linking. That is also | |
10074 + # ok. | |
10075 + exec "$@" | |
10076 +fi | |
10077 + | |
10078 +# Name of file we expect compiler to create. | |
10079 +cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` | |
10080 + | |
10081 +# Create the lock directory. | |
10082 +# Note: use '[/\\:.-]' here to ensure that we don't use the same name | |
10083 +# that we are using for the .o file. Also, base the name on the expected | |
10084 +# object file name, since that is what matters with a parallel build. | |
10085 +lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d | |
10086 +while true; do | |
10087 + if mkdir "$lockdir" >/dev/null 2>&1; then | |
10088 + break | |
10089 + fi | |
10090 + sleep 1 | |
10091 +done | |
10092 +# FIXME: race condition here if user kills between mkdir and trap. | |
10093 +trap "rmdir '$lockdir'; exit 1" 1 2 15 | |
10094 + | |
10095 +# Run the compile. | |
10096 +"$@" | |
10097 +ret=$? | |
10098 + | |
10099 +if test -f "$cofile"; then | |
10100 + test "$cofile" = "$ofile" || mv "$cofile" "$ofile" | |
10101 +elif test -f "${cofile}bj"; then | |
10102 + test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" | |
10103 +fi | |
10104 + | |
10105 +rmdir "$lockdir" | |
10106 +exit $ret | |
10107 + | |
10108 +# Local Variables: | |
10109 +# mode: shell-script | |
10110 +# sh-indentation: 2 | |
10111 +# eval: (add-hook 'write-file-hooks 'time-stamp) | |
10112 +# time-stamp-start: "scriptversion=" | |
10113 +# time-stamp-format: "%:y-%02m-%02d.%02H" | |
10114 +# time-stamp-time-zone: "UTC" | |
10115 +# time-stamp-end: "; # UTC" | |
10116 +# End: | |
10117 diff -uNr a/config.guess b/config.guess | |
10118 --- a/config.guess 1969-12-31 19:00:00.000000000 -0500 | |
10119 +++ b/config.guess 2014-12-12 15:22:27.578240863 -0500 | |
10120 @@ -0,0 +1,1420 @@ | |
10121 +#! /bin/sh | |
10122 +# Attempt to guess a canonical system name. | |
10123 +# Copyright 1992-2014 Free Software Foundation, Inc. | |
10124 + | |
10125 +timestamp='2014-03-23' | |
10126 + | |
10127 +# This file is free software; you can redistribute it and/or modify it | |
10128 +# under the terms of the GNU General Public License as published by | |
10129 +# the Free Software Foundation; either version 3 of the License, or | |
10130 +# (at your option) any later version. | |
10131 +# | |
10132 +# This program is distributed in the hope that it will be useful, but | |
10133 +# WITHOUT ANY WARRANTY; without even the implied warranty of | |
10134 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
10135 +# General Public License for more details. | |
10136 +# | |
10137 +# You should have received a copy of the GNU General Public License | |
10138 +# along with this program; if not, see <http://www.gnu.org/licenses/>. | |
10139 +# | |
10140 +# As a special exception to the GNU General Public License, if you | |
10141 +# distribute this file as part of a program that contains a | |
10142 +# configuration script generated by Autoconf, you may include it under | |
10143 +# the same distribution terms that you use for the rest of that | |
10144 +# program. This Exception is an additional permission under section 7 | |
10145 +# of the GNU General Public License, version 3 ("GPLv3"). | |
10146 +# | |
10147 +# Originally written by Per Bothner. | |
10148 +# | |
10149 +# You can get the latest version of this script from: | |
10150 +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD | |
10151 +# | |
10152 +# Please send patches with a ChangeLog entry to config-patches@gnu.org. | |
10153 + | |
10154 + | |
10155 +me=`echo "$0" | sed -e 's,.*/,,'` | |
10156 + | |
10157 +usage="\ | |
10158 +Usage: $0 [OPTION] | |
10159 + | |
10160 +Output the configuration name of the system \`$me' is run on. | |
10161 + | |
10162 +Operation modes: | |
10163 + -h, --help print this help, then exit | |
10164 + -t, --time-stamp print date of last modification, then exit | |
10165 + -v, --version print version number, then exit | |
10166 + | |
10167 +Report bugs and patches to <config-patches@gnu.org>." | |
10168 + | |
10169 +version="\ | |
10170 +GNU config.guess ($timestamp) | |
10171 + | |
10172 +Originally written by Per Bothner. | |
10173 +Copyright 1992-2014 Free Software Foundation, Inc. | |
10174 + | |
10175 +This is free software; see the source for copying conditions. There is NO | |
10176 +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." | |
10177 + | |
10178 +help=" | |
10179 +Try \`$me --help' for more information." | |
10180 + | |
10181 +# Parse command line | |
10182 +while test $# -gt 0 ; do | |
10183 + case $1 in | |
10184 + --time-stamp | --time* | -t ) | |
10185 + echo "$timestamp" ; exit ;; | |
10186 + --version | -v ) | |
10187 + echo "$version" ; exit ;; | |
10188 + --help | --h* | -h ) | |
10189 + echo "$usage"; exit ;; | |
10190 + -- ) # Stop option processing | |
10191 + shift; break ;; | |
10192 + - ) # Use stdin as input. | |
10193 + break ;; | |
10194 + -* ) | |
10195 + echo "$me: invalid option $1$help" >&2 | |
10196 + exit 1 ;; | |
10197 + * ) | |
10198 + break ;; | |
10199 + esac | |
10200 +done | |
10201 + | |
10202 +if test $# != 0; then | |
10203 + echo "$me: too many arguments$help" >&2 | |
10204 + exit 1 | |
10205 +fi | |
10206 + | |
10207 +trap 'exit 1' 1 2 15 | |
10208 + | |
10209 +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a | |
10210 +# compiler to aid in system detection is discouraged as it requires | |
10211 +# temporary files to be created and, as you can see below, it is a | |
10212 +# headache to deal with in a portable fashion. | |
10213 + | |
10214 +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still | |
10215 +# use `HOST_CC' if defined, but it is deprecated. | |
10216 + | |
10217 +# Portable tmp directory creation inspired by the Autoconf team. | |
10218 + | |
10219 +set_cc_for_build=' | |
10220 +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; | |
10221 +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; | |
10222 +: ${TMPDIR=/tmp} ; | |
10223 + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || | |
10224 + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || | |
10225 + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || | |
10226 + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; | |
10227 +dummy=$tmp/dummy ; | |
10228 +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; | |
10229 +case $CC_FOR_BUILD,$HOST_CC,$CC in | |
10230 + ,,) echo "int x;" > $dummy.c ; | |
10231 + for c in cc gcc c89 c99 ; do | |
10232 + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then | |
10233 + CC_FOR_BUILD="$c"; break ; | |
10234 + fi ; | |
10235 + done ; | |
10236 + if test x"$CC_FOR_BUILD" = x ; then | |
10237 + CC_FOR_BUILD=no_compiler_found ; | |
10238 + fi | |
10239 + ;; | |
10240 + ,,*) CC_FOR_BUILD=$CC ;; | |
10241 + ,*,*) CC_FOR_BUILD=$HOST_CC ;; | |
10242 +esac ; set_cc_for_build= ;' | |
10243 + | |
10244 +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. | |
10245 +# (ghazi@noc.rutgers.edu 1994-08-24) | |
10246 +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then | |
10247 + PATH=$PATH:/.attbin ; export PATH | |
10248 +fi | |
10249 + | |
10250 +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown | |
10251 +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown | |
10252 +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown | |
10253 +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown | |
10254 + | |
10255 +case "${UNAME_SYSTEM}" in | |
10256 +Linux|GNU|GNU/*) | |
10257 + # If the system lacks a compiler, then just pick glibc. | |
10258 + # We could probably try harder. | |
10259 + LIBC=gnu | |
10260 + | |
10261 + eval $set_cc_for_build | |
10262 + cat <<-EOF > $dummy.c | |
10263 + #include <features.h> | |
10264 + #if defined(__UCLIBC__) | |
10265 + LIBC=uclibc | |
10266 + #elif defined(__dietlibc__) | |
10267 + LIBC=dietlibc | |
10268 + #else | |
10269 + LIBC=gnu | |
10270 + #endif | |
10271 + EOF | |
10272 + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` | |
10273 + ;; | |
10274 +esac | |
10275 + | |
10276 +# Note: order is significant - the case branches are not exclusive. | |
10277 + | |
10278 +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in | |
10279 + *:NetBSD:*:*) | |
10280 + # NetBSD (nbsd) targets should (where applicable) match one or | |
10281 + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, | |
10282 + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently | |
10283 + # switched to ELF, *-*-netbsd* would select the old | |
10284 + # object file format. This provides both forward | |
10285 + # compatibility and a consistent mechanism for selecting the | |
10286 + # object file format. | |
10287 + # | |
10288 + # Note: NetBSD doesn't particularly care about the vendor | |
10289 + # portion of the name. We always set it to "unknown". | |
10290 + sysctl="sysctl -n hw.machine_arch" | |
10291 + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ | |
10292 + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` | |
10293 + case "${UNAME_MACHINE_ARCH}" in | |
10294 + armeb) machine=armeb-unknown ;; | |
10295 + arm*) machine=arm-unknown ;; | |
10296 + sh3el) machine=shl-unknown ;; | |
10297 + sh3eb) machine=sh-unknown ;; | |
10298 + sh5el) machine=sh5le-unknown ;; | |
10299 + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; | |
10300 + esac | |
10301 + # The Operating System including object format, if it has switched | |
10302 + # to ELF recently, or will in the future. | |
10303 + case "${UNAME_MACHINE_ARCH}" in | |
10304 + arm*|i386|m68k|ns32k|sh3*|sparc|vax) | |
10305 + eval $set_cc_for_build | |
10306 + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | |
10307 + | grep -q __ELF__ | |
10308 + then | |
10309 + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). | |
10310 + # Return netbsd for either. FIX? | |
10311 + os=netbsd | |
10312 + else | |
10313 + os=netbsdelf | |
10314 + fi | |
10315 + ;; | |
10316 + *) | |
10317 + os=netbsd | |
10318 + ;; | |
10319 + esac | |
10320 + # The OS release | |
10321 + # Debian GNU/NetBSD machines have a different userland, and | |
10322 + # thus, need a distinct triplet. However, they do not need | |
10323 + # kernel version information, so it can be replaced with a | |
10324 + # suitable tag, in the style of linux-gnu. | |
10325 + case "${UNAME_VERSION}" in | |
10326 + Debian*) | |
10327 + release='-gnu' | |
10328 + ;; | |
10329 + *) | |
10330 + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` | |
10331 + ;; | |
10332 + esac | |
10333 + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: | |
10334 + # contains redundant information, the shorter form: | |
10335 + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. | |
10336 + echo "${machine}-${os}${release}" | |
10337 + exit ;; | |
10338 + *:Bitrig:*:*) | |
10339 + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` | |
10340 + echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} | |
10341 + exit ;; | |
10342 + *:OpenBSD:*:*) | |
10343 + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` | |
10344 + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} | |
10345 + exit ;; | |
10346 + *:ekkoBSD:*:*) | |
10347 + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} | |
10348 + exit ;; | |
10349 + *:SolidBSD:*:*) | |
10350 + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} | |
10351 + exit ;; | |
10352 + macppc:MirBSD:*:*) | |
10353 + echo powerpc-unknown-mirbsd${UNAME_RELEASE} | |
10354 + exit ;; | |
10355 + *:MirBSD:*:*) | |
10356 + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} | |
10357 + exit ;; | |
10358 + alpha:OSF1:*:*) | |
10359 + case $UNAME_RELEASE in | |
10360 + *4.0) | |
10361 + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` | |
10362 + ;; | |
10363 + *5.*) | |
10364 + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` | |
10365 + ;; | |
10366 + esac | |
10367 + # According to Compaq, /usr/sbin/psrinfo has been available on | |
10368 + # OSF/1 and Tru64 systems produced since 1995. I hope that | |
10369 + # covers most systems running today. This code pipes the CPU | |
10370 + # types through head -n 1, so we only detect the type of CPU 0. | |
10371 + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` | |
10372 + case "$ALPHA_CPU_TYPE" in | |
10373 + "EV4 (21064)") | |
10374 + UNAME_MACHINE="alpha" ;; | |
10375 + "EV4.5 (21064)") | |
10376 + UNAME_MACHINE="alpha" ;; | |
10377 + "LCA4 (21066/21068)") | |
10378 + UNAME_MACHINE="alpha" ;; | |
10379 + "EV5 (21164)") | |
10380 + UNAME_MACHINE="alphaev5" ;; | |
10381 + "EV5.6 (21164A)") | |
10382 + UNAME_MACHINE="alphaev56" ;; | |
10383 + "EV5.6 (21164PC)") | |
10384 + UNAME_MACHINE="alphapca56" ;; | |
10385 + "EV5.7 (21164PC)") | |
10386 + UNAME_MACHINE="alphapca57" ;; | |
10387 + "EV6 (21264)") | |
10388 + UNAME_MACHINE="alphaev6" ;; | |
10389 + "EV6.7 (21264A)") | |
10390 + UNAME_MACHINE="alphaev67" ;; | |
10391 + "EV6.8CB (21264C)") | |
10392 + UNAME_MACHINE="alphaev68" ;; | |
10393 + "EV6.8AL (21264B)") | |
10394 + UNAME_MACHINE="alphaev68" ;; | |
10395 + "EV6.8CX (21264D)") | |
10396 + UNAME_MACHINE="alphaev68" ;; | |
10397 + "EV6.9A (21264/EV69A)") | |
10398 + UNAME_MACHINE="alphaev69" ;; | |
10399 + "EV7 (21364)") | |
10400 + UNAME_MACHINE="alphaev7" ;; | |
10401 + "EV7.9 (21364A)") | |
10402 + UNAME_MACHINE="alphaev79" ;; | |
10403 + esac | |
10404 + # A Pn.n version is a patched version. | |
10405 + # A Vn.n version is a released version. | |
10406 + # A Tn.n version is a released field test version. | |
10407 + # A Xn.n version is an unreleased experimental baselevel. | |
10408 + # 1.2 uses "1.2" for uname -r. | |
10409 + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` | |
10410 + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. | |
10411 + exitcode=$? | |
10412 + trap '' 0 | |
10413 + exit $exitcode ;; | |
10414 + Alpha\ *:Windows_NT*:*) | |
10415 + # How do we know it's Interix rather than the generic POSIX subsystem? | |
10416 + # Should we change UNAME_MACHINE based on the output of uname instead | |
10417 + # of the specific Alpha model? | |
10418 + echo alpha-pc-interix | |
10419 + exit ;; | |
10420 + 21064:Windows_NT:50:3) | |
10421 + echo alpha-dec-winnt3.5 | |
10422 + exit ;; | |
10423 + Amiga*:UNIX_System_V:4.0:*) | |
10424 + echo m68k-unknown-sysv4 | |
10425 + exit ;; | |
10426 + *:[Aa]miga[Oo][Ss]:*:*) | |
10427 + echo ${UNAME_MACHINE}-unknown-amigaos | |
10428 + exit ;; | |
10429 + *:[Mm]orph[Oo][Ss]:*:*) | |
10430 + echo ${UNAME_MACHINE}-unknown-morphos | |
10431 + exit ;; | |
10432 + *:OS/390:*:*) | |
10433 + echo i370-ibm-openedition | |
10434 + exit ;; | |
10435 + *:z/VM:*:*) | |
10436 + echo s390-ibm-zvmoe | |
10437 + exit ;; | |
10438 + *:OS400:*:*) | |
10439 + echo powerpc-ibm-os400 | |
10440 + exit ;; | |
10441 + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) | |
10442 + echo arm-acorn-riscix${UNAME_RELEASE} | |
10443 + exit ;; | |
10444 + arm*:riscos:*:*|arm*:RISCOS:*:*) | |
10445 + echo arm-unknown-riscos | |
10446 + exit ;; | |
10447 + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) | |
10448 + echo hppa1.1-hitachi-hiuxmpp | |
10449 + exit ;; | |
10450 + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) | |
10451 + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. | |
10452 + if test "`(/bin/universe) 2>/dev/null`" = att ; then | |
10453 + echo pyramid-pyramid-sysv3 | |
10454 + else | |
10455 + echo pyramid-pyramid-bsd | |
10456 + fi | |
10457 + exit ;; | |
10458 + NILE*:*:*:dcosx) | |
10459 + echo pyramid-pyramid-svr4 | |
10460 + exit ;; | |
10461 + DRS?6000:unix:4.0:6*) | |
10462 + echo sparc-icl-nx6 | |
10463 + exit ;; | |
10464 + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) | |
10465 + case `/usr/bin/uname -p` in | |
10466 + sparc) echo sparc-icl-nx7; exit ;; | |
10467 + esac ;; | |
10468 + s390x:SunOS:*:*) | |
10469 + echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` | |
10470 + exit ;; | |
10471 + sun4H:SunOS:5.*:*) | |
10472 + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` | |
10473 + exit ;; | |
10474 + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) | |
10475 + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` | |
10476 + exit ;; | |
10477 + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) | |
10478 + echo i386-pc-auroraux${UNAME_RELEASE} | |
10479 + exit ;; | |
10480 + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) | |
10481 + eval $set_cc_for_build | |
10482 + SUN_ARCH="i386" | |
10483 + # If there is a compiler, see if it is configured for 64-bit objects. | |
10484 + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. | |
10485 + # This test works for both compilers. | |
10486 + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then | |
10487 + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ | |
10488 + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ | |
10489 + grep IS_64BIT_ARCH >/dev/null | |
10490 + then | |
10491 + SUN_ARCH="x86_64" | |
10492 + fi | |
10493 + fi | |
10494 + echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` | |
10495 + exit ;; | |
10496 + sun4*:SunOS:6*:*) | |
10497 + # According to config.sub, this is the proper way to canonicalize | |
10498 + # SunOS6. Hard to guess exactly what SunOS6 will be like, but | |
10499 + # it's likely to be more like Solaris than SunOS4. | |
10500 + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` | |
10501 + exit ;; | |
10502 + sun4*:SunOS:*:*) | |
10503 + case "`/usr/bin/arch -k`" in | |
10504 + Series*|S4*) | |
10505 + UNAME_RELEASE=`uname -v` | |
10506 + ;; | |
10507 + esac | |
10508 + # Japanese Language versions have a version number like `4.1.3-JL'. | |
10509 + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` | |
10510 + exit ;; | |
10511 + sun3*:SunOS:*:*) | |
10512 + echo m68k-sun-sunos${UNAME_RELEASE} | |
10513 + exit ;; | |
10514 + sun*:*:4.2BSD:*) | |
10515 + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` | |
10516 + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 | |
10517 + case "`/bin/arch`" in | |
10518 + sun3) | |
10519 + echo m68k-sun-sunos${UNAME_RELEASE} | |
10520 + ;; | |
10521 + sun4) | |
10522 + echo sparc-sun-sunos${UNAME_RELEASE} | |
10523 + ;; | |
10524 + esac | |
10525 + exit ;; | |
10526 + aushp:SunOS:*:*) | |
10527 + echo sparc-auspex-sunos${UNAME_RELEASE} | |
10528 + exit ;; | |
10529 + # The situation for MiNT is a little confusing. The machine name | |
10530 + # can be virtually everything (everything which is not | |
10531 + # "atarist" or "atariste" at least should have a processor | |
10532 + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" | |
10533 + # to the lowercase version "mint" (or "freemint"). Finally | |
10534 + # the system name "TOS" denotes a system which is actually not | |
10535 + # MiNT. But MiNT is downward compatible to TOS, so this should | |
10536 + # be no problem. | |
10537 + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) | |
10538 + echo m68k-atari-mint${UNAME_RELEASE} | |
10539 + exit ;; | |
10540 + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) | |
10541 + echo m68k-atari-mint${UNAME_RELEASE} | |
10542 + exit ;; | |
10543 + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) | |
10544 + echo m68k-atari-mint${UNAME_RELEASE} | |
10545 + exit ;; | |
10546 + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) | |
10547 + echo m68k-milan-mint${UNAME_RELEASE} | |
10548 + exit ;; | |
10549 + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) | |
10550 + echo m68k-hades-mint${UNAME_RELEASE} | |
10551 + exit ;; | |
10552 + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) | |
10553 + echo m68k-unknown-mint${UNAME_RELEASE} | |
10554 + exit ;; | |
10555 + m68k:machten:*:*) | |
10556 + echo m68k-apple-machten${UNAME_RELEASE} | |
10557 + exit ;; | |
10558 + powerpc:machten:*:*) | |
10559 + echo powerpc-apple-machten${UNAME_RELEASE} | |
10560 + exit ;; | |
10561 + RISC*:Mach:*:*) | |
10562 + echo mips-dec-mach_bsd4.3 | |
10563 + exit ;; | |
10564 + RISC*:ULTRIX:*:*) | |
10565 + echo mips-dec-ultrix${UNAME_RELEASE} | |
10566 + exit ;; | |
10567 + VAX*:ULTRIX*:*:*) | |
10568 + echo vax-dec-ultrix${UNAME_RELEASE} | |
10569 + exit ;; | |
10570 + 2020:CLIX:*:* | 2430:CLIX:*:*) | |
10571 + echo clipper-intergraph-clix${UNAME_RELEASE} | |
10572 + exit ;; | |
10573 + mips:*:*:UMIPS | mips:*:*:RISCos) | |
10574 + eval $set_cc_for_build | |
10575 + sed 's/^ //' << EOF >$dummy.c | |
10576 +#ifdef __cplusplus | |
10577 +#include <stdio.h> /* for printf() prototype */ | |
10578 + int main (int argc, char *argv[]) { | |
10579 +#else | |
10580 + int main (argc, argv) int argc; char *argv[]; { | |
10581 +#endif | |
10582 + #if defined (host_mips) && defined (MIPSEB) | |
10583 + #if defined (SYSTYPE_SYSV) | |
10584 + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); | |
10585 + #endif | |
10586 + #if defined (SYSTYPE_SVR4) | |
10587 + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); | |
10588 + #endif | |
10589 + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) | |
10590 + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); | |
10591 + #endif | |
10592 + #endif | |
10593 + exit (-1); | |
10594 + } | |
10595 +EOF | |
10596 + $CC_FOR_BUILD -o $dummy $dummy.c && | |
10597 + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && | |
10598 + SYSTEM_NAME=`$dummy $dummyarg` && | |
10599 + { echo "$SYSTEM_NAME"; exit; } | |
10600 + echo mips-mips-riscos${UNAME_RELEASE} | |
10601 + exit ;; | |
10602 + Motorola:PowerMAX_OS:*:*) | |
10603 + echo powerpc-motorola-powermax | |
10604 + exit ;; | |
10605 + Motorola:*:4.3:PL8-*) | |
10606 + echo powerpc-harris-powermax | |
10607 + exit ;; | |
10608 + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) | |
10609 + echo powerpc-harris-powermax | |
10610 + exit ;; | |
10611 + Night_Hawk:Power_UNIX:*:*) | |
10612 + echo powerpc-harris-powerunix | |
10613 + exit ;; | |
10614 + m88k:CX/UX:7*:*) | |
10615 + echo m88k-harris-cxux7 | |
10616 + exit ;; | |
10617 + m88k:*:4*:R4*) | |
10618 + echo m88k-motorola-sysv4 | |
10619 + exit ;; | |
10620 + m88k:*:3*:R3*) | |
10621 + echo m88k-motorola-sysv3 | |
10622 + exit ;; | |
10623 + AViiON:dgux:*:*) | |
10624 + # DG/UX returns AViiON for all architectures | |
10625 + UNAME_PROCESSOR=`/usr/bin/uname -p` | |
10626 + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] | |
10627 + then | |
10628 + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ | |
10629 + [ ${TARGET_BINARY_INTERFACE}x = x ] | |
10630 + then | |
10631 + echo m88k-dg-dgux${UNAME_RELEASE} | |
10632 + else | |
10633 + echo m88k-dg-dguxbcs${UNAME_RELEASE} | |
10634 + fi | |
10635 + else | |
10636 + echo i586-dg-dgux${UNAME_RELEASE} | |
10637 + fi | |
10638 + exit ;; | |
10639 + M88*:DolphinOS:*:*) # DolphinOS (SVR3) | |
10640 + echo m88k-dolphin-sysv3 | |
10641 + exit ;; | |
10642 + M88*:*:R3*:*) | |
10643 + # Delta 88k system running SVR3 | |
10644 + echo m88k-motorola-sysv3 | |
10645 + exit ;; | |
10646 + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) | |
10647 + echo m88k-tektronix-sysv3 | |
10648 + exit ;; | |
10649 + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) | |
10650 + echo m68k-tektronix-bsd | |
10651 + exit ;; | |
10652 + *:IRIX*:*:*) | |
10653 + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` | |
10654 + exit ;; | |
10655 + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. | |
10656 + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id | |
10657 + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' | |
10658 + i*86:AIX:*:*) | |
10659 + echo i386-ibm-aix | |
10660 + exit ;; | |
10661 + ia64:AIX:*:*) | |
10662 + if [ -x /usr/bin/oslevel ] ; then | |
10663 + IBM_REV=`/usr/bin/oslevel` | |
10664 + else | |
10665 + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} | |
10666 + fi | |
10667 + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} | |
10668 + exit ;; | |
10669 + *:AIX:2:3) | |
10670 + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then | |
10671 + eval $set_cc_for_build | |
10672 + sed 's/^ //' << EOF >$dummy.c | |
10673 + #include <sys/systemcfg.h> | |
10674 + | |
10675 + main() | |
10676 + { | |
10677 + if (!__power_pc()) | |
10678 + exit(1); | |
10679 + puts("powerpc-ibm-aix3.2.5"); | |
10680 + exit(0); | |
10681 + } | |
10682 +EOF | |
10683 + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` | |
10684 + then | |
10685 + echo "$SYSTEM_NAME" | |
10686 + else | |
10687 + echo rs6000-ibm-aix3.2.5 | |
10688 + fi | |
10689 + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then | |
10690 + echo rs6000-ibm-aix3.2.4 | |
10691 + else | |
10692 + echo rs6000-ibm-aix3.2 | |
10693 + fi | |
10694 + exit ;; | |
10695 + *:AIX:*:[4567]) | |
10696 + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` | |
10697 + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then | |
10698 + IBM_ARCH=rs6000 | |
10699 + else | |
10700 + IBM_ARCH=powerpc | |
10701 + fi | |
10702 + if [ -x /usr/bin/oslevel ] ; then | |
10703 + IBM_REV=`/usr/bin/oslevel` | |
10704 + else | |
10705 + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} | |
10706 + fi | |
10707 + echo ${IBM_ARCH}-ibm-aix${IBM_REV} | |
10708 + exit ;; | |
10709 + *:AIX:*:*) | |
10710 + echo rs6000-ibm-aix | |
10711 + exit ;; | |
10712 + ibmrt:4.4BSD:*|romp-ibm:BSD:*) | |
10713 + echo romp-ibm-bsd4.4 | |
10714 + exit ;; | |
10715 + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and | |
10716 + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to | |
10717 + exit ;; # report: romp-ibm BSD 4.3 | |
10718 + *:BOSX:*:*) | |
10719 + echo rs6000-bull-bosx | |
10720 + exit ;; | |
10721 + DPX/2?00:B.O.S.:*:*) | |
10722 + echo m68k-bull-sysv3 | |
10723 + exit ;; | |
10724 + 9000/[34]??:4.3bsd:1.*:*) | |
10725 + echo m68k-hp-bsd | |
10726 + exit ;; | |
10727 + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) | |
10728 + echo m68k-hp-bsd4.4 | |
10729 + exit ;; | |
10730 + 9000/[34678]??:HP-UX:*:*) | |
10731 + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` | |
10732 + case "${UNAME_MACHINE}" in | |
10733 + 9000/31? ) HP_ARCH=m68000 ;; | |
10734 + 9000/[34]?? ) HP_ARCH=m68k ;; | |
10735 + 9000/[678][0-9][0-9]) | |
10736 + if [ -x /usr/bin/getconf ]; then | |
10737 + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` | |
10738 + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` | |
10739 + case "${sc_cpu_version}" in | |
10740 + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 | |
10741 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 | |
10742 + 532) # CPU_PA_RISC2_0 | |
10743 + case "${sc_kernel_bits}" in | |
10744 + 32) HP_ARCH="hppa2.0n" ;; | |
10745 + 64) HP_ARCH="hppa2.0w" ;; | |
10746 + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 | |
10747 + esac ;; | |
10748 + esac | |
10749 + fi | |
10750 + if [ "${HP_ARCH}" = "" ]; then | |
10751 + eval $set_cc_for_build | |
10752 + sed 's/^ //' << EOF >$dummy.c | |
10753 + | |
10754 + #define _HPUX_SOURCE | |
10755 + #include <stdlib.h> | |
10756 + #include <unistd.h> | |
10757 + | |
10758 + int main () | |
10759 + { | |
10760 + #if defined(_SC_KERNEL_BITS) | |
10761 + long bits = sysconf(_SC_KERNEL_BITS); | |
10762 + #endif | |
10763 + long cpu = sysconf (_SC_CPU_VERSION); | |
10764 + | |
10765 + switch (cpu) | |
10766 + { | |
10767 + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; | |
10768 + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; | |
10769 + case CPU_PA_RISC2_0: | |
10770 + #if defined(_SC_KERNEL_BITS) | |
10771 + switch (bits) | |
10772 + { | |
10773 + case 64: puts ("hppa2.0w"); break; | |
10774 + case 32: puts ("hppa2.0n"); break; | |
10775 + default: puts ("hppa2.0"); break; | |
10776 + } break; | |
10777 + #else /* !defined(_SC_KERNEL_BITS) */ | |
10778 + puts ("hppa2.0"); break; | |
10779 + #endif | |
10780 + default: puts ("hppa1.0"); break; | |
10781 + } | |
10782 + exit (0); | |
10783 + } | |
10784 +EOF | |
10785 + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` | |
10786 + test -z "$HP_ARCH" && HP_ARCH=hppa | |
10787 + fi ;; | |
10788 + esac | |
10789 + if [ ${HP_ARCH} = "hppa2.0w" ] | |
10790 + then | |
10791 + eval $set_cc_for_build | |
10792 + | |
10793 + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating | |
10794 + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler | |
10795 + # generating 64-bit code. GNU and HP use different nomenclature: | |
10796 + # | |
10797 + # $ CC_FOR_BUILD=cc ./config.guess | |
10798 + # => hppa2.0w-hp-hpux11.23 | |
10799 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess | |
10800 + # => hppa64-hp-hpux11.23 | |
10801 + | |
10802 + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | | |
10803 + grep -q __LP64__ | |
10804 + then | |
10805 + HP_ARCH="hppa2.0w" | |
10806 + else | |
10807 + HP_ARCH="hppa64" | |
10808 + fi | |
10809 + fi | |
10810 + echo ${HP_ARCH}-hp-hpux${HPUX_REV} | |
10811 + exit ;; | |
10812 + ia64:HP-UX:*:*) | |
10813 + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` | |
10814 + echo ia64-hp-hpux${HPUX_REV} | |
10815 + exit ;; | |
10816 + 3050*:HI-UX:*:*) | |
10817 + eval $set_cc_for_build | |
10818 + sed 's/^ //' << EOF >$dummy.c | |
10819 + #include <unistd.h> | |
10820 + int | |
10821 + main () | |
10822 + { | |
10823 + long cpu = sysconf (_SC_CPU_VERSION); | |
10824 + /* The order matters, because CPU_IS_HP_MC68K erroneously returns | |
10825 + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct | |
10826 + results, however. */ | |
10827 + if (CPU_IS_PA_RISC (cpu)) | |
10828 + { | |
10829 + switch (cpu) | |
10830 + { | |
10831 + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; | |
10832 + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; | |
10833 + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; | |
10834 + default: puts ("hppa-hitachi-hiuxwe2"); break; | |
10835 + } | |
10836 + } | |
10837 + else if (CPU_IS_HP_MC68K (cpu)) | |
10838 + puts ("m68k-hitachi-hiuxwe2"); | |
10839 + else puts ("unknown-hitachi-hiuxwe2"); | |
10840 + exit (0); | |
10841 + } | |
10842 +EOF | |
10843 + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && | |
10844 + { echo "$SYSTEM_NAME"; exit; } | |
10845 + echo unknown-hitachi-hiuxwe2 | |
10846 + exit ;; | |
10847 + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) | |
10848 + echo hppa1.1-hp-bsd | |
10849 + exit ;; | |
10850 + 9000/8??:4.3bsd:*:*) | |
10851 + echo hppa1.0-hp-bsd | |
10852 + exit ;; | |
10853 + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) | |
10854 + echo hppa1.0-hp-mpeix | |
10855 + exit ;; | |
10856 + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) | |
10857 + echo hppa1.1-hp-osf | |
10858 + exit ;; | |
10859 + hp8??:OSF1:*:*) | |
10860 + echo hppa1.0-hp-osf | |
10861 + exit ;; | |
10862 + i*86:OSF1:*:*) | |
10863 + if [ -x /usr/sbin/sysversion ] ; then | |
10864 + echo ${UNAME_MACHINE}-unknown-osf1mk | |
10865 + else | |
10866 + echo ${UNAME_MACHINE}-unknown-osf1 | |
10867 + fi | |
10868 + exit ;; | |
10869 + parisc*:Lites*:*:*) | |
10870 + echo hppa1.1-hp-lites | |
10871 + exit ;; | |
10872 + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) | |
10873 + echo c1-convex-bsd | |
10874 + exit ;; | |
10875 + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) | |
10876 + if getsysinfo -f scalar_acc | |
10877 + then echo c32-convex-bsd | |
10878 + else echo c2-convex-bsd | |
10879 + fi | |
10880 + exit ;; | |
10881 + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) | |
10882 + echo c34-convex-bsd | |
10883 + exit ;; | |
10884 + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) | |
10885 + echo c38-convex-bsd | |
10886 + exit ;; | |
10887 + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) | |
10888 + echo c4-convex-bsd | |
10889 + exit ;; | |
10890 + CRAY*Y-MP:*:*:*) | |
10891 + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' | |
10892 + exit ;; | |
10893 + CRAY*[A-Z]90:*:*:*) | |
10894 + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | |
10895 + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ | |
10896 + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ | |
10897 + -e 's/\.[^.]*$/.X/' | |
10898 + exit ;; | |
10899 + CRAY*TS:*:*:*) | |
10900 + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' | |
10901 + exit ;; | |
10902 + CRAY*T3E:*:*:*) | |
10903 + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' | |
10904 + exit ;; | |
10905 + CRAY*SV1:*:*:*) | |
10906 + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' | |
10907 + exit ;; | |
10908 + *:UNICOS/mp:*:*) | |
10909 + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' | |
10910 + exit ;; | |
10911 + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) | |
10912 + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` | |
10913 + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` | |
10914 + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` | |
10915 + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" | |
10916 + exit ;; | |
10917 + 5000:UNIX_System_V:4.*:*) | |
10918 + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` | |
10919 + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` | |
10920 + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" | |
10921 + exit ;; | |
10922 + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) | |
10923 + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} | |
10924 + exit ;; | |
10925 + sparc*:BSD/OS:*:*) | |
10926 + echo sparc-unknown-bsdi${UNAME_RELEASE} | |
10927 + exit ;; | |
10928 + *:BSD/OS:*:*) | |
10929 + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} | |
10930 + exit ;; | |
10931 + *:FreeBSD:*:*) | |
10932 + UNAME_PROCESSOR=`/usr/bin/uname -p` | |
10933 + case ${UNAME_PROCESSOR} in | |
10934 + amd64) | |
10935 + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; | |
10936 + *) | |
10937 + echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; | |
10938 + esac | |
10939 + exit ;; | |
10940 + i*:CYGWIN*:*) | |
10941 + echo ${UNAME_MACHINE}-pc-cygwin | |
10942 + exit ;; | |
10943 + *:MINGW64*:*) | |
10944 + echo ${UNAME_MACHINE}-pc-mingw64 | |
10945 + exit ;; | |
10946 + *:MINGW*:*) | |
10947 + echo ${UNAME_MACHINE}-pc-mingw32 | |
10948 + exit ;; | |
10949 + *:MSYS*:*) | |
10950 + echo ${UNAME_MACHINE}-pc-msys | |
10951 + exit ;; | |
10952 + i*:windows32*:*) | |
10953 + # uname -m includes "-pc" on this system. | |
10954 + echo ${UNAME_MACHINE}-mingw32 | |
10955 + exit ;; | |
10956 + i*:PW*:*) | |
10957 + echo ${UNAME_MACHINE}-pc-pw32 | |
10958 + exit ;; | |
10959 + *:Interix*:*) | |
10960 + case ${UNAME_MACHINE} in | |
10961 + x86) | |
10962 + echo i586-pc-interix${UNAME_RELEASE} | |
10963 + exit ;; | |
10964 + authenticamd | genuineintel | EM64T) | |
10965 + echo x86_64-unknown-interix${UNAME_RELEASE} | |
10966 + exit ;; | |
10967 + IA64) | |
10968 + echo ia64-unknown-interix${UNAME_RELEASE} | |
10969 + exit ;; | |
10970 + esac ;; | |
10971 + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) | |
10972 + echo i${UNAME_MACHINE}-pc-mks | |
10973 + exit ;; | |
10974 + 8664:Windows_NT:*) | |
10975 + echo x86_64-pc-mks | |
10976 + exit ;; | |
10977 + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) | |
10978 + # How do we know it's Interix rather than the generic POSIX subsystem? | |
10979 + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we | |
10980 + # UNAME_MACHINE based on the output of uname instead of i386? | |
10981 + echo i586-pc-interix | |
10982 + exit ;; | |
10983 + i*:UWIN*:*) | |
10984 + echo ${UNAME_MACHINE}-pc-uwin | |
10985 + exit ;; | |
10986 + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) | |
10987 + echo x86_64-unknown-cygwin | |
10988 + exit ;; | |
10989 + p*:CYGWIN*:*) | |
10990 + echo powerpcle-unknown-cygwin | |
10991 + exit ;; | |
10992 + prep*:SunOS:5.*:*) | |
10993 + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` | |
10994 + exit ;; | |
10995 + *:GNU:*:*) | |
10996 + # the GNU system | |
10997 + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` | |
10998 + exit ;; | |
10999 + *:GNU/*:*:*) | |
11000 + # other systems with GNU libc and userland | |
11001 + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} | |
11002 + exit ;; | |
11003 + i*86:Minix:*:*) | |
11004 + echo ${UNAME_MACHINE}-pc-minix | |
11005 + exit ;; | |
11006 + aarch64:Linux:*:*) | |
11007 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
11008 + exit ;; | |
11009 + aarch64_be:Linux:*:*) | |
11010 + UNAME_MACHINE=aarch64_be | |
11011 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
11012 + exit ;; | |
11013 + alpha:Linux:*:*) | |
11014 + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in | |
11015 + EV5) UNAME_MACHINE=alphaev5 ;; | |
11016 + EV56) UNAME_MACHINE=alphaev56 ;; | |
11017 + PCA56) UNAME_MACHINE=alphapca56 ;; | |
11018 + PCA57) UNAME_MACHINE=alphapca56 ;; | |
11019 + EV6) UNAME_MACHINE=alphaev6 ;; | |
11020 + EV67) UNAME_MACHINE=alphaev67 ;; | |
11021 + EV68*) UNAME_MACHINE=alphaev68 ;; | |
11022 + esac | |
11023 + objdump --private-headers /bin/sh | grep -q ld.so.1 | |
11024 + if test "$?" = 0 ; then LIBC="gnulibc1" ; fi | |
11025 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
11026 + exit ;; | |
11027 + arc:Linux:*:* | arceb:Linux:*:*) | |
11028 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
11029 + exit ;; | |
11030 + arm*:Linux:*:*) | |
11031 + eval $set_cc_for_build | |
11032 + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | |
11033 + | grep -q __ARM_EABI__ | |
11034 + then | |
11035 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
11036 + else | |
11037 + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | |
11038 + | grep -q __ARM_PCS_VFP | |
11039 + then | |
11040 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi | |
11041 + else | |
11042 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf | |
11043 + fi | |
11044 + fi | |
11045 + exit ;; | |
11046 + avr32*:Linux:*:*) | |
11047 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
11048 + exit ;; | |
11049 + cris:Linux:*:*) | |
11050 + echo ${UNAME_MACHINE}-axis-linux-${LIBC} | |
11051 + exit ;; | |
11052 + crisv32:Linux:*:*) | |
11053 + echo ${UNAME_MACHINE}-axis-linux-${LIBC} | |
11054 + exit ;; | |
11055 + frv:Linux:*:*) | |
11056 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
11057 + exit ;; | |
11058 + hexagon:Linux:*:*) | |
11059 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
11060 + exit ;; | |
11061 + i*86:Linux:*:*) | |
11062 + echo ${UNAME_MACHINE}-pc-linux-${LIBC} | |
11063 + exit ;; | |
11064 + ia64:Linux:*:*) | |
11065 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
11066 + exit ;; | |
11067 + m32r*:Linux:*:*) | |
11068 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
11069 + exit ;; | |
11070 + m68*:Linux:*:*) | |
11071 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
11072 + exit ;; | |
11073 + mips:Linux:*:* | mips64:Linux:*:*) | |
11074 + eval $set_cc_for_build | |
11075 + sed 's/^ //' << EOF >$dummy.c | |
11076 + #undef CPU | |
11077 + #undef ${UNAME_MACHINE} | |
11078 + #undef ${UNAME_MACHINE}el | |
11079 + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) | |
11080 + CPU=${UNAME_MACHINE}el | |
11081 + #else | |
11082 + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) | |
11083 + CPU=${UNAME_MACHINE} | |
11084 + #else | |
11085 + CPU= | |
11086 + #endif | |
11087 + #endif | |
11088 +EOF | |
11089 + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` | |
11090 + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } | |
11091 + ;; | |
11092 + openrisc*:Linux:*:*) | |
11093 + echo or1k-unknown-linux-${LIBC} | |
11094 + exit ;; | |
11095 + or32:Linux:*:* | or1k*:Linux:*:*) | |
11096 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
11097 + exit ;; | |
11098 + padre:Linux:*:*) | |
11099 + echo sparc-unknown-linux-${LIBC} | |
11100 + exit ;; | |
11101 + parisc64:Linux:*:* | hppa64:Linux:*:*) | |
11102 + echo hppa64-unknown-linux-${LIBC} | |
11103 + exit ;; | |
11104 + parisc:Linux:*:* | hppa:Linux:*:*) | |
11105 + # Look for CPU level | |
11106 + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in | |
11107 + PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; | |
11108 + PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; | |
11109 + *) echo hppa-unknown-linux-${LIBC} ;; | |
11110 + esac | |
11111 + exit ;; | |
11112 + ppc64:Linux:*:*) | |
11113 + echo powerpc64-unknown-linux-${LIBC} | |
11114 + exit ;; | |
11115 + ppc:Linux:*:*) | |
11116 + echo powerpc-unknown-linux-${LIBC} | |
11117 + exit ;; | |
11118 + ppc64le:Linux:*:*) | |
11119 + echo powerpc64le-unknown-linux-${LIBC} | |
11120 + exit ;; | |
11121 + ppcle:Linux:*:*) | |
11122 + echo powerpcle-unknown-linux-${LIBC} | |
11123 + exit ;; | |
11124 + s390:Linux:*:* | s390x:Linux:*:*) | |
11125 + echo ${UNAME_MACHINE}-ibm-linux-${LIBC} | |
11126 + exit ;; | |
11127 + sh64*:Linux:*:*) | |
11128 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
11129 + exit ;; | |
11130 + sh*:Linux:*:*) | |
11131 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
11132 + exit ;; | |
11133 + sparc:Linux:*:* | sparc64:Linux:*:*) | |
11134 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
11135 + exit ;; | |
11136 + tile*:Linux:*:*) | |
11137 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
11138 + exit ;; | |
11139 + vax:Linux:*:*) | |
11140 + echo ${UNAME_MACHINE}-dec-linux-${LIBC} | |
11141 + exit ;; | |
11142 + x86_64:Linux:*:*) | |
11143 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
11144 + exit ;; | |
11145 + xtensa*:Linux:*:*) | |
11146 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} | |
11147 + exit ;; | |
11148 + i*86:DYNIX/ptx:4*:*) | |
11149 + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. | |
11150 + # earlier versions are messed up and put the nodename in both | |
11151 + # sysname and nodename. | |
11152 + echo i386-sequent-sysv4 | |
11153 + exit ;; | |
11154 + i*86:UNIX_SV:4.2MP:2.*) | |
11155 + # Unixware is an offshoot of SVR4, but it has its own version | |
11156 + # number series starting with 2... | |
11157 + # I am not positive that other SVR4 systems won't match this, | |
11158 + # I just have to hope. -- rms. | |
11159 + # Use sysv4.2uw... so that sysv4* matches it. | |
11160 + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} | |
11161 + exit ;; | |
11162 + i*86:OS/2:*:*) | |
11163 + # If we were able to find `uname', then EMX Unix compatibility | |
11164 + # is probably installed. | |
11165 + echo ${UNAME_MACHINE}-pc-os2-emx | |
11166 + exit ;; | |
11167 + i*86:XTS-300:*:STOP) | |
11168 + echo ${UNAME_MACHINE}-unknown-stop | |
11169 + exit ;; | |
11170 + i*86:atheos:*:*) | |
11171 + echo ${UNAME_MACHINE}-unknown-atheos | |
11172 + exit ;; | |
11173 + i*86:syllable:*:*) | |
11174 + echo ${UNAME_MACHINE}-pc-syllable | |
11175 + exit ;; | |
11176 + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) | |
11177 + echo i386-unknown-lynxos${UNAME_RELEASE} | |
11178 + exit ;; | |
11179 + i*86:*DOS:*:*) | |
11180 + echo ${UNAME_MACHINE}-pc-msdosdjgpp | |
11181 + exit ;; | |
11182 + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) | |
11183 + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` | |
11184 + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then | |
11185 + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} | |
11186 + else | |
11187 + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} | |
11188 + fi | |
11189 + exit ;; | |
11190 + i*86:*:5:[678]*) | |
11191 + # UnixWare 7.x, OpenUNIX and OpenServer 6. | |
11192 + case `/bin/uname -X | grep "^Machine"` in | |
11193 + *486*) UNAME_MACHINE=i486 ;; | |
11194 + *Pentium) UNAME_MACHINE=i586 ;; | |
11195 + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; | |
11196 + esac | |
11197 + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} | |
11198 + exit ;; | |
11199 + i*86:*:3.2:*) | |
11200 + if test -f /usr/options/cb.name; then | |
11201 + UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` | |
11202 + echo ${UNAME_MACHINE}-pc-isc$UNAME_REL | |
11203 + elif /bin/uname -X 2>/dev/null >/dev/null ; then | |
11204 + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` | |
11205 + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 | |
11206 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ | |
11207 + && UNAME_MACHINE=i586 | |
11208 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ | |
11209 + && UNAME_MACHINE=i686 | |
11210 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ | |
11211 + && UNAME_MACHINE=i686 | |
11212 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL | |
11213 + else | |
11214 + echo ${UNAME_MACHINE}-pc-sysv32 | |
11215 + fi | |
11216 + exit ;; | |
11217 + pc:*:*:*) | |
11218 + # Left here for compatibility: | |
11219 + # uname -m prints for DJGPP always 'pc', but it prints nothing about | |
11220 + # the processor, so we play safe by assuming i586. | |
11221 + # Note: whatever this is, it MUST be the same as what config.sub | |
11222 + # prints for the "djgpp" host, or else GDB configury will decide that | |
11223 + # this is a cross-build. | |
11224 + echo i586-pc-msdosdjgpp | |
11225 + exit ;; | |
11226 + Intel:Mach:3*:*) | |
11227 + echo i386-pc-mach3 | |
11228 + exit ;; | |
11229 + paragon:*:*:*) | |
11230 + echo i860-intel-osf1 | |
11231 + exit ;; | |
11232 + i860:*:4.*:*) # i860-SVR4 | |
11233 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then | |
11234 + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 | |
11235 + else # Add other i860-SVR4 vendors below as they are discovered. | |
11236 + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 | |
11237 + fi | |
11238 + exit ;; | |
11239 + mini*:CTIX:SYS*5:*) | |
11240 + # "miniframe" | |
11241 + echo m68010-convergent-sysv | |
11242 + exit ;; | |
11243 + mc68k:UNIX:SYSTEM5:3.51m) | |
11244 + echo m68k-convergent-sysv | |
11245 + exit ;; | |
11246 + M680?0:D-NIX:5.3:*) | |
11247 + echo m68k-diab-dnix | |
11248 + exit ;; | |
11249 + M68*:*:R3V[5678]*:*) | |
11250 + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; | |
11251 + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) | |
11252 + OS_REL='' | |
11253 + test -r /etc/.relid \ | |
11254 + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` | |
11255 + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ | |
11256 + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } | |
11257 + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ | |
11258 + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; | |
11259 + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) | |
11260 + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ | |
11261 + && { echo i486-ncr-sysv4; exit; } ;; | |
11262 + NCR*:*:4.2:* | MPRAS*:*:4.2:*) | |
11263 + OS_REL='.3' | |
11264 + test -r /etc/.relid \ | |
11265 + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` | |
11266 + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ | |
11267 + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } | |
11268 + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ | |
11269 + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } | |
11270 + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ | |
11271 + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; | |
11272 + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) | |
11273 + echo m68k-unknown-lynxos${UNAME_RELEASE} | |
11274 + exit ;; | |
11275 + mc68030:UNIX_System_V:4.*:*) | |
11276 + echo m68k-atari-sysv4 | |
11277 + exit ;; | |
11278 + TSUNAMI:LynxOS:2.*:*) | |
11279 + echo sparc-unknown-lynxos${UNAME_RELEASE} | |
11280 + exit ;; | |
11281 + rs6000:LynxOS:2.*:*) | |
11282 + echo rs6000-unknown-lynxos${UNAME_RELEASE} | |
11283 + exit ;; | |
11284 + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) | |
11285 + echo powerpc-unknown-lynxos${UNAME_RELEASE} | |
11286 + exit ;; | |
11287 + SM[BE]S:UNIX_SV:*:*) | |
11288 + echo mips-dde-sysv${UNAME_RELEASE} | |
11289 + exit ;; | |
11290 + RM*:ReliantUNIX-*:*:*) | |
11291 + echo mips-sni-sysv4 | |
11292 + exit ;; | |
11293 + RM*:SINIX-*:*:*) | |
11294 + echo mips-sni-sysv4 | |
11295 + exit ;; | |
11296 + *:SINIX-*:*:*) | |
11297 + if uname -p 2>/dev/null >/dev/null ; then | |
11298 + UNAME_MACHINE=`(uname -p) 2>/dev/null` | |
11299 + echo ${UNAME_MACHINE}-sni-sysv4 | |
11300 + else | |
11301 + echo ns32k-sni-sysv | |
11302 + fi | |
11303 + exit ;; | |
11304 + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort | |
11305 + # says <Richard.M.Bartel@ccMail.Census.GOV> | |
11306 + echo i586-unisys-sysv4 | |
11307 + exit ;; | |
11308 + *:UNIX_System_V:4*:FTX*) | |
11309 + # From Gerald Hewes <hewes@openmarket.com>. | |
11310 + # How about differentiating between stratus architectures? -djm | |
11311 + echo hppa1.1-stratus-sysv4 | |
11312 + exit ;; | |
11313 + *:*:*:FTX*) | |
11314 + # From seanf@swdc.stratus.com. | |
11315 + echo i860-stratus-sysv4 | |
11316 + exit ;; | |
11317 + i*86:VOS:*:*) | |
11318 + # From Paul.Green@stratus.com. | |
11319 + echo ${UNAME_MACHINE}-stratus-vos | |
11320 + exit ;; | |
11321 + *:VOS:*:*) | |
11322 + # From Paul.Green@stratus.com. | |
11323 + echo hppa1.1-stratus-vos | |
11324 + exit ;; | |
11325 + mc68*:A/UX:*:*) | |
11326 + echo m68k-apple-aux${UNAME_RELEASE} | |
11327 + exit ;; | |
11328 + news*:NEWS-OS:6*:*) | |
11329 + echo mips-sony-newsos6 | |
11330 + exit ;; | |
11331 + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) | |
11332 + if [ -d /usr/nec ]; then | |
11333 + echo mips-nec-sysv${UNAME_RELEASE} | |
11334 + else | |
11335 + echo mips-unknown-sysv${UNAME_RELEASE} | |
11336 + fi | |
11337 + exit ;; | |
11338 + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. | |
11339 + echo powerpc-be-beos | |
11340 + exit ;; | |
11341 + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. | |
11342 + echo powerpc-apple-beos | |
11343 + exit ;; | |
11344 + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. | |
11345 + echo i586-pc-beos | |
11346 + exit ;; | |
11347 + BePC:Haiku:*:*) # Haiku running on Intel PC compatible. | |
11348 + echo i586-pc-haiku | |
11349 + exit ;; | |
11350 + x86_64:Haiku:*:*) | |
11351 + echo x86_64-unknown-haiku | |
11352 + exit ;; | |
11353 + SX-4:SUPER-UX:*:*) | |
11354 + echo sx4-nec-superux${UNAME_RELEASE} | |
11355 + exit ;; | |
11356 + SX-5:SUPER-UX:*:*) | |
11357 + echo sx5-nec-superux${UNAME_RELEASE} | |
11358 + exit ;; | |
11359 + SX-6:SUPER-UX:*:*) | |
11360 + echo sx6-nec-superux${UNAME_RELEASE} | |
11361 + exit ;; | |
11362 + SX-7:SUPER-UX:*:*) | |
11363 + echo sx7-nec-superux${UNAME_RELEASE} | |
11364 + exit ;; | |
11365 + SX-8:SUPER-UX:*:*) | |
11366 + echo sx8-nec-superux${UNAME_RELEASE} | |
11367 + exit ;; | |
11368 + SX-8R:SUPER-UX:*:*) | |
11369 + echo sx8r-nec-superux${UNAME_RELEASE} | |
11370 + exit ;; | |
11371 + Power*:Rhapsody:*:*) | |
11372 + echo powerpc-apple-rhapsody${UNAME_RELEASE} | |
11373 + exit ;; | |
11374 + *:Rhapsody:*:*) | |
11375 + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} | |
11376 + exit ;; | |
11377 + *:Darwin:*:*) | |
11378 + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown | |
11379 + eval $set_cc_for_build | |
11380 + if test "$UNAME_PROCESSOR" = unknown ; then | |
11381 + UNAME_PROCESSOR=powerpc | |
11382 + fi | |
11383 + if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then | |
11384 + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then | |
11385 + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ | |
11386 + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ | |
11387 + grep IS_64BIT_ARCH >/dev/null | |
11388 + then | |
11389 + case $UNAME_PROCESSOR in | |
11390 + i386) UNAME_PROCESSOR=x86_64 ;; | |
11391 + powerpc) UNAME_PROCESSOR=powerpc64 ;; | |
11392 + esac | |
11393 + fi | |
11394 + fi | |
11395 + elif test "$UNAME_PROCESSOR" = i386 ; then | |
11396 + # Avoid executing cc on OS X 10.9, as it ships with a stub | |
11397 + # that puts up a graphical alert prompting to install | |
11398 + # developer tools. Any system running Mac OS X 10.7 or | |
11399 + # later (Darwin 11 and later) is required to have a 64-bit | |
11400 + # processor. This is not true of the ARM version of Darwin | |
11401 + # that Apple uses in portable devices. | |
11402 + UNAME_PROCESSOR=x86_64 | |
11403 + fi | |
11404 + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} | |
11405 + exit ;; | |
11406 + *:procnto*:*:* | *:QNX:[0123456789]*:*) | |
11407 + UNAME_PROCESSOR=`uname -p` | |
11408 + if test "$UNAME_PROCESSOR" = "x86"; then | |
11409 + UNAME_PROCESSOR=i386 | |
11410 + UNAME_MACHINE=pc | |
11411 + fi | |
11412 + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} | |
11413 + exit ;; | |
11414 + *:QNX:*:4*) | |
11415 + echo i386-pc-qnx | |
11416 + exit ;; | |
11417 + NEO-?:NONSTOP_KERNEL:*:*) | |
11418 + echo neo-tandem-nsk${UNAME_RELEASE} | |
11419 + exit ;; | |
11420 + NSE-*:NONSTOP_KERNEL:*:*) | |
11421 + echo nse-tandem-nsk${UNAME_RELEASE} | |
11422 + exit ;; | |
11423 + NSR-?:NONSTOP_KERNEL:*:*) | |
11424 + echo nsr-tandem-nsk${UNAME_RELEASE} | |
11425 + exit ;; | |
11426 + *:NonStop-UX:*:*) | |
11427 + echo mips-compaq-nonstopux | |
11428 + exit ;; | |
11429 + BS2000:POSIX*:*:*) | |
11430 + echo bs2000-siemens-sysv | |
11431 + exit ;; | |
11432 + DS/*:UNIX_System_V:*:*) | |
11433 + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} | |
11434 + exit ;; | |
11435 + *:Plan9:*:*) | |
11436 + # "uname -m" is not consistent, so use $cputype instead. 386 | |
11437 + # is converted to i386 for consistency with other x86 | |
11438 + # operating systems. | |
11439 + if test "$cputype" = "386"; then | |
11440 + UNAME_MACHINE=i386 | |
11441 + else | |
11442 + UNAME_MACHINE="$cputype" | |
11443 + fi | |
11444 + echo ${UNAME_MACHINE}-unknown-plan9 | |
11445 + exit ;; | |
11446 + *:TOPS-10:*:*) | |
11447 + echo pdp10-unknown-tops10 | |
11448 + exit ;; | |
11449 + *:TENEX:*:*) | |
11450 + echo pdp10-unknown-tenex | |
11451 + exit ;; | |
11452 + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) | |
11453 + echo pdp10-dec-tops20 | |
11454 + exit ;; | |
11455 + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) | |
11456 + echo pdp10-xkl-tops20 | |
11457 + exit ;; | |
11458 + *:TOPS-20:*:*) | |
11459 + echo pdp10-unknown-tops20 | |
11460 + exit ;; | |
11461 + *:ITS:*:*) | |
11462 + echo pdp10-unknown-its | |
11463 + exit ;; | |
11464 + SEI:*:*:SEIUX) | |
11465 + echo mips-sei-seiux${UNAME_RELEASE} | |
11466 + exit ;; | |
11467 + *:DragonFly:*:*) | |
11468 + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` | |
11469 + exit ;; | |
11470 + *:*VMS:*:*) | |
11471 + UNAME_MACHINE=`(uname -p) 2>/dev/null` | |
11472 + case "${UNAME_MACHINE}" in | |
11473 + A*) echo alpha-dec-vms ; exit ;; | |
11474 + I*) echo ia64-dec-vms ; exit ;; | |
11475 + V*) echo vax-dec-vms ; exit ;; | |
11476 + esac ;; | |
11477 + *:XENIX:*:SysV) | |
11478 + echo i386-pc-xenix | |
11479 + exit ;; | |
11480 + i*86:skyos:*:*) | |
11481 + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' | |
11482 + exit ;; | |
11483 + i*86:rdos:*:*) | |
11484 + echo ${UNAME_MACHINE}-pc-rdos | |
11485 + exit ;; | |
11486 + i*86:AROS:*:*) | |
11487 + echo ${UNAME_MACHINE}-pc-aros | |
11488 + exit ;; | |
11489 + x86_64:VMkernel:*:*) | |
11490 + echo ${UNAME_MACHINE}-unknown-esx | |
11491 + exit ;; | |
11492 +esac | |
11493 + | |
11494 +cat >&2 <<EOF | |
11495 +$0: unable to guess system type | |
11496 + | |
11497 +This script, last modified $timestamp, has failed to recognize | |
11498 +the operating system you are using. It is advised that you | |
11499 +download the most up to date version of the config scripts from | |
11500 + | |
11501 + http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD | |
11502 +and | |
11503 + http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD | |
11504 + | |
11505 +If the version you run ($0) is already up to date, please | |
11506 +send the following data and any information you think might be | |
11507 +pertinent to <config-patches@gnu.org> in order to provide the needed | |
11508 +information to handle your system. | |
11509 + | |
11510 +config.guess timestamp = $timestamp | |
11511 + | |
11512 +uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
11513 +uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
11514 +uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
11515 +uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
11516 + | |
11517 +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` | |
11518 +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` | |
11519 + | |
11520 +hostinfo = `(hostinfo) 2>/dev/null` | |
11521 +/bin/universe = `(/bin/universe) 2>/dev/null` | |
11522 +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` | |
11523 +/bin/arch = `(/bin/arch) 2>/dev/null` | |
11524 +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` | |
11525 +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` | |
11526 + | |
11527 +UNAME_MACHINE = ${UNAME_MACHINE} | |
11528 +UNAME_RELEASE = ${UNAME_RELEASE} | |
11529 +UNAME_SYSTEM = ${UNAME_SYSTEM} | |
11530 +UNAME_VERSION = ${UNAME_VERSION} | |
11531 +EOF | |
11532 + | |
11533 +exit 1 | |
11534 + | |
11535 +# Local variables: | |
11536 +# eval: (add-hook 'write-file-hooks 'time-stamp) | |
11537 +# time-stamp-start: "timestamp='" | |
11538 +# time-stamp-format: "%:y-%02m-%02d" | |
11539 +# time-stamp-end: "'" | |
11540 +# End: | |
11541 diff -uNr a/config.sub b/config.sub | |
11542 --- a/config.sub 1969-12-31 19:00:00.000000000 -0500 | |
11543 +++ b/config.sub 2014-12-12 15:22:27.586240602 -0500 | |
11544 @@ -0,0 +1,1799 @@ | |
11545 +#! /bin/sh | |
11546 +# Configuration validation subroutine script. | |
11547 +# Copyright 1992-2014 Free Software Foundation, Inc. | |
11548 + | |
11549 +timestamp='2014-09-11' | |
11550 + | |
11551 +# This file is free software; you can redistribute it and/or modify it | |
11552 +# under the terms of the GNU General Public License as published by | |
11553 +# the Free Software Foundation; either version 3 of the License, or | |
11554 +# (at your option) any later version. | |
11555 +# | |
11556 +# This program is distributed in the hope that it will be useful, but | |
11557 +# WITHOUT ANY WARRANTY; without even the implied warranty of | |
11558 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
11559 +# General Public License for more details. | |
11560 +# | |
11561 +# You should have received a copy of the GNU General Public License | |
11562 +# along with this program; if not, see <http://www.gnu.org/licenses/>. | |
11563 +# | |
11564 +# As a special exception to the GNU General Public License, if you | |
11565 +# distribute this file as part of a program that contains a | |
11566 +# configuration script generated by Autoconf, you may include it under | |
11567 +# the same distribution terms that you use for the rest of that | |
11568 +# program. This Exception is an additional permission under section 7 | |
11569 +# of the GNU General Public License, version 3 ("GPLv3"). | |
11570 + | |
11571 + | |
11572 +# Please send patches with a ChangeLog entry to config-patches@gnu.org. | |
11573 +# | |
11574 +# Configuration subroutine to validate and canonicalize a configuration type. | |
11575 +# Supply the specified configuration type as an argument. | |
11576 +# If it is invalid, we print an error message on stderr and exit with code 1. | |
11577 +# Otherwise, we print the canonical config type on stdout and succeed. | |
11578 + | |
11579 +# You can get the latest version of this script from: | |
11580 +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD | |
11581 + | |
11582 +# This file is supposed to be the same for all GNU packages | |
11583 +# and recognize all the CPU types, system types and aliases | |
11584 +# that are meaningful with *any* GNU software. | |
11585 +# Each package is responsible for reporting which valid configurations | |
11586 +# it does not support. The user should be able to distinguish | |
11587 +# a failure to support a valid configuration from a meaningless | |
11588 +# configuration. | |
11589 + | |
11590 +# The goal of this file is to map all the various variations of a given | |
11591 +# machine specification into a single specification in the form: | |
11592 +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM | |
11593 +# or in some cases, the newer four-part form: | |
11594 +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM | |
11595 +# It is wrong to echo any other type of specification. | |
11596 + | |
11597 +me=`echo "$0" | sed -e 's,.*/,,'` | |
11598 + | |
11599 +usage="\ | |
11600 +Usage: $0 [OPTION] CPU-MFR-OPSYS | |
11601 + $0 [OPTION] ALIAS | |
11602 + | |
11603 +Canonicalize a configuration name. | |
11604 + | |
11605 +Operation modes: | |
11606 + -h, --help print this help, then exit | |
11607 + -t, --time-stamp print date of last modification, then exit | |
11608 + -v, --version print version number, then exit | |
11609 + | |
11610 +Report bugs and patches to <config-patches@gnu.org>." | |
11611 + | |
11612 +version="\ | |
11613 +GNU config.sub ($timestamp) | |
11614 + | |
11615 +Copyright 1992-2014 Free Software Foundation, Inc. | |
11616 + | |
11617 +This is free software; see the source for copying conditions. There is NO | |
11618 +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." | |
11619 + | |
11620 +help=" | |
11621 +Try \`$me --help' for more information." | |
11622 + | |
11623 +# Parse command line | |
11624 +while test $# -gt 0 ; do | |
11625 + case $1 in | |
11626 + --time-stamp | --time* | -t ) | |
11627 + echo "$timestamp" ; exit ;; | |
11628 + --version | -v ) | |
11629 + echo "$version" ; exit ;; | |
11630 + --help | --h* | -h ) | |
11631 + echo "$usage"; exit ;; | |
11632 + -- ) # Stop option processing | |
11633 + shift; break ;; | |
11634 + - ) # Use stdin as input. | |
11635 + break ;; | |
11636 + -* ) | |
11637 + echo "$me: invalid option $1$help" | |
11638 + exit 1 ;; | |
11639 + | |
11640 + *local*) | |
11641 + # First pass through any local machine types. | |
11642 + echo $1 | |
11643 + exit ;; | |
11644 + | |
11645 + * ) | |
11646 + break ;; | |
11647 + esac | |
11648 +done | |
11649 + | |
11650 +case $# in | |
11651 + 0) echo "$me: missing argument$help" >&2 | |
11652 + exit 1;; | |
11653 + 1) ;; | |
11654 + *) echo "$me: too many arguments$help" >&2 | |
11655 + exit 1;; | |
11656 +esac | |
11657 + | |
11658 +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). | |
11659 +# Here we must recognize all the valid KERNEL-OS combinations. | |
11660 +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` | |
11661 +case $maybe_os in | |
11662 + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ | |
11663 + linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ | |
11664 + knetbsd*-gnu* | netbsd*-gnu* | \ | |
11665 + kopensolaris*-gnu* | \ | |
11666 + storm-chaos* | os2-emx* | rtmk-nova*) | |
11667 + os=-$maybe_os | |
11668 + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` | |
11669 + ;; | |
11670 + android-linux) | |
11671 + os=-linux-android | |
11672 + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown | |
11673 + ;; | |
11674 + *) | |
11675 + basic_machine=`echo $1 | sed 's/-[^-]*$//'` | |
11676 + if [ $basic_machine != $1 ] | |
11677 + then os=`echo $1 | sed 's/.*-/-/'` | |
11678 + else os=; fi | |
11679 + ;; | |
11680 +esac | |
11681 + | |
11682 +### Let's recognize common machines as not being operating systems so | |
11683 +### that things like config.sub decstation-3100 work. We also | |
11684 +### recognize some manufacturers as not being operating systems, so we | |
11685 +### can provide default operating systems below. | |
11686 +case $os in | |
11687 + -sun*os*) | |
11688 + # Prevent following clause from handling this invalid input. | |
11689 + ;; | |
11690 + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ | |
11691 + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ | |
11692 + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ | |
11693 + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ | |
11694 + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ | |
11695 + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ | |
11696 + -apple | -axis | -knuth | -cray | -microblaze*) | |
11697 + os= | |
11698 + basic_machine=$1 | |
11699 + ;; | |
11700 + -bluegene*) | |
11701 + os=-cnk | |
11702 + ;; | |
11703 + -sim | -cisco | -oki | -wec | -winbond) | |
11704 + os= | |
11705 + basic_machine=$1 | |
11706 + ;; | |
11707 + -scout) | |
11708 + ;; | |
11709 + -wrs) | |
11710 + os=-vxworks | |
11711 + basic_machine=$1 | |
11712 + ;; | |
11713 + -chorusos*) | |
11714 + os=-chorusos | |
11715 + basic_machine=$1 | |
11716 + ;; | |
11717 + -chorusrdb) | |
11718 + os=-chorusrdb | |
11719 + basic_machine=$1 | |
11720 + ;; | |
11721 + -hiux*) | |
11722 + os=-hiuxwe2 | |
11723 + ;; | |
11724 + -sco6) | |
11725 + os=-sco5v6 | |
11726 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
11727 + ;; | |
11728 + -sco5) | |
11729 + os=-sco3.2v5 | |
11730 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
11731 + ;; | |
11732 + -sco4) | |
11733 + os=-sco3.2v4 | |
11734 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
11735 + ;; | |
11736 + -sco3.2.[4-9]*) | |
11737 + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` | |
11738 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
11739 + ;; | |
11740 + -sco3.2v[4-9]*) | |
11741 + # Don't forget version if it is 3.2v4 or newer. | |
11742 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
11743 + ;; | |
11744 + -sco5v6*) | |
11745 + # Don't forget version if it is 3.2v4 or newer. | |
11746 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
11747 + ;; | |
11748 + -sco*) | |
11749 + os=-sco3.2v2 | |
11750 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
11751 + ;; | |
11752 + -udk*) | |
11753 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
11754 + ;; | |
11755 + -isc) | |
11756 + os=-isc2.2 | |
11757 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
11758 + ;; | |
11759 + -clix*) | |
11760 + basic_machine=clipper-intergraph | |
11761 + ;; | |
11762 + -isc*) | |
11763 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
11764 + ;; | |
11765 + -lynx*178) | |
11766 + os=-lynxos178 | |
11767 + ;; | |
11768 + -lynx*5) | |
11769 + os=-lynxos5 | |
11770 + ;; | |
11771 + -lynx*) | |
11772 + os=-lynxos | |
11773 + ;; | |
11774 + -ptx*) | |
11775 + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` | |
11776 + ;; | |
11777 + -windowsnt*) | |
11778 + os=`echo $os | sed -e 's/windowsnt/winnt/'` | |
11779 + ;; | |
11780 + -psos*) | |
11781 + os=-psos | |
11782 + ;; | |
11783 + -mint | -mint[0-9]*) | |
11784 + basic_machine=m68k-atari | |
11785 + os=-mint | |
11786 + ;; | |
11787 +esac | |
11788 + | |
11789 +# Decode aliases for certain CPU-COMPANY combinations. | |
11790 +case $basic_machine in | |
11791 + # Recognize the basic CPU types without company name. | |
11792 + # Some are omitted here because they have special meanings below. | |
11793 + 1750a | 580 \ | |
11794 + | a29k \ | |
11795 + | aarch64 | aarch64_be \ | |
11796 + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | |
11797 + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | |
11798 + | am33_2.0 \ | |
11799 + | arc | arceb \ | |
11800 + | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | |
11801 + | avr | avr32 \ | |
11802 + | be32 | be64 \ | |
11803 + | bfin \ | |
11804 + | c4x | c8051 | clipper \ | |
11805 + | d10v | d30v | dlx | dsp16xx \ | |
11806 + | epiphany \ | |
11807 + | fido | fr30 | frv \ | |
11808 + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | |
11809 + | hexagon \ | |
11810 + | i370 | i860 | i960 | ia64 \ | |
11811 + | ip2k | iq2000 \ | |
11812 + | k1om \ | |
11813 + | le32 | le64 \ | |
11814 + | lm32 \ | |
11815 + | m32c | m32r | m32rle | m68000 | m68k | m88k \ | |
11816 + | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | |
11817 + | mips | mipsbe | mipseb | mipsel | mipsle \ | |
11818 + | mips16 \ | |
11819 + | mips64 | mips64el \ | |
11820 + | mips64octeon | mips64octeonel \ | |
11821 + | mips64orion | mips64orionel \ | |
11822 + | mips64r5900 | mips64r5900el \ | |
11823 + | mips64vr | mips64vrel \ | |
11824 + | mips64vr4100 | mips64vr4100el \ | |
11825 + | mips64vr4300 | mips64vr4300el \ | |
11826 + | mips64vr5000 | mips64vr5000el \ | |
11827 + | mips64vr5900 | mips64vr5900el \ | |
11828 + | mipsisa32 | mipsisa32el \ | |
11829 + | mipsisa32r2 | mipsisa32r2el \ | |
11830 + | mipsisa32r6 | mipsisa32r6el \ | |
11831 + | mipsisa64 | mipsisa64el \ | |
11832 + | mipsisa64r2 | mipsisa64r2el \ | |
11833 + | mipsisa64r6 | mipsisa64r6el \ | |
11834 + | mipsisa64sb1 | mipsisa64sb1el \ | |
11835 + | mipsisa64sr71k | mipsisa64sr71kel \ | |
11836 + | mipsr5900 | mipsr5900el \ | |
11837 + | mipstx39 | mipstx39el \ | |
11838 + | mn10200 | mn10300 \ | |
11839 + | moxie \ | |
11840 + | mt \ | |
11841 + | msp430 \ | |
11842 + | nds32 | nds32le | nds32be \ | |
11843 + | nios | nios2 | nios2eb | nios2el \ | |
11844 + | ns16k | ns32k \ | |
11845 + | open8 | or1k | or1knd | or32 \ | |
11846 + | pdp10 | pdp11 | pj | pjl \ | |
11847 + | powerpc | powerpc64 | powerpc64le | powerpcle \ | |
11848 + | pyramid \ | |
11849 + | riscv32 | riscv64 \ | |
11850 + | rl78 | rx \ | |
11851 + | score \ | |
11852 + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | |
11853 + | sh64 | sh64le \ | |
11854 + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | |
11855 + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | |
11856 + | spu \ | |
11857 + | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | |
11858 + | ubicom32 \ | |
11859 + | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | |
11860 + | we32k \ | |
11861 + | x86 | xc16x | xstormy16 | xtensa \ | |
11862 + | z8k | z80) | |
11863 + basic_machine=$basic_machine-unknown | |
11864 + ;; | |
11865 + c54x) | |
11866 + basic_machine=tic54x-unknown | |
11867 + ;; | |
11868 + c55x) | |
11869 + basic_machine=tic55x-unknown | |
11870 + ;; | |
11871 + c6x) | |
11872 + basic_machine=tic6x-unknown | |
11873 + ;; | |
11874 + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) | |
11875 + basic_machine=$basic_machine-unknown | |
11876 + os=-none | |
11877 + ;; | |
11878 + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) | |
11879 + ;; | |
11880 + ms1) | |
11881 + basic_machine=mt-unknown | |
11882 + ;; | |
11883 + | |
11884 + strongarm | thumb | xscale) | |
11885 + basic_machine=arm-unknown | |
11886 + ;; | |
11887 + xgate) | |
11888 + basic_machine=$basic_machine-unknown | |
11889 + os=-none | |
11890 + ;; | |
11891 + xscaleeb) | |
11892 + basic_machine=armeb-unknown | |
11893 + ;; | |
11894 + | |
11895 + xscaleel) | |
11896 + basic_machine=armel-unknown | |
11897 + ;; | |
11898 + | |
11899 + # We use `pc' rather than `unknown' | |
11900 + # because (1) that's what they normally are, and | |
11901 + # (2) the word "unknown" tends to confuse beginning users. | |
11902 + i*86 | x86_64) | |
11903 + basic_machine=$basic_machine-pc | |
11904 + ;; | |
11905 + # Object if more than one company name word. | |
11906 + *-*-*) | |
11907 + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 | |
11908 + exit 1 | |
11909 + ;; | |
11910 + # Recognize the basic CPU types with company name. | |
11911 + 580-* \ | |
11912 + | a29k-* \ | |
11913 + | aarch64-* | aarch64_be-* \ | |
11914 + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | |
11915 + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | |
11916 + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | |
11917 + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | |
11918 + | avr-* | avr32-* \ | |
11919 + | be32-* | be64-* \ | |
11920 + | bfin-* | bs2000-* \ | |
11921 + | c[123]* | c30-* | [cjt]90-* | c4x-* \ | |
11922 + | c8051-* | clipper-* | craynv-* | cydra-* \ | |
11923 + | d10v-* | d30v-* | dlx-* \ | |
11924 + | elxsi-* \ | |
11925 + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | |
11926 + | h8300-* | h8500-* \ | |
11927 + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | |
11928 + | hexagon-* \ | |
11929 + | i*86-* | i860-* | i960-* | ia64-* \ | |
11930 + | ip2k-* | iq2000-* \ | |
11931 + | k1om-* \ | |
11932 + | le32-* | le64-* \ | |
11933 + | lm32-* \ | |
11934 + | m32c-* | m32r-* | m32rle-* \ | |
11935 + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | |
11936 + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | |
11937 + | microblaze-* | microblazeel-* \ | |
11938 + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | |
11939 + | mips16-* \ | |
11940 + | mips64-* | mips64el-* \ | |
11941 + | mips64octeon-* | mips64octeonel-* \ | |
11942 + | mips64orion-* | mips64orionel-* \ | |
11943 + | mips64r5900-* | mips64r5900el-* \ | |
11944 + | mips64vr-* | mips64vrel-* \ | |
11945 + | mips64vr4100-* | mips64vr4100el-* \ | |
11946 + | mips64vr4300-* | mips64vr4300el-* \ | |
11947 + | mips64vr5000-* | mips64vr5000el-* \ | |
11948 + | mips64vr5900-* | mips64vr5900el-* \ | |
11949 + | mipsisa32-* | mipsisa32el-* \ | |
11950 + | mipsisa32r2-* | mipsisa32r2el-* \ | |
11951 + | mipsisa32r6-* | mipsisa32r6el-* \ | |
11952 + | mipsisa64-* | mipsisa64el-* \ | |
11953 + | mipsisa64r2-* | mipsisa64r2el-* \ | |
11954 + | mipsisa64r6-* | mipsisa64r6el-* \ | |
11955 + | mipsisa64sb1-* | mipsisa64sb1el-* \ | |
11956 + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | |
11957 + | mipsr5900-* | mipsr5900el-* \ | |
11958 + | mipstx39-* | mipstx39el-* \ | |
11959 + | mmix-* \ | |
11960 + | mt-* \ | |
11961 + | msp430-* \ | |
11962 + | nds32-* | nds32le-* | nds32be-* \ | |
11963 + | nios-* | nios2-* | nios2eb-* | nios2el-* \ | |
11964 + | none-* | np1-* | ns16k-* | ns32k-* \ | |
11965 + | open8-* \ | |
11966 + | or1k*-* \ | |
11967 + | orion-* \ | |
11968 + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | |
11969 + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | |
11970 + | pyramid-* \ | |
11971 + | rl78-* | romp-* | rs6000-* | rx-* \ | |
11972 + | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | |
11973 + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | |
11974 + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | |
11975 + | sparclite-* \ | |
11976 + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ | |
11977 + | tahoe-* \ | |
11978 + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | |
11979 + | tile*-* \ | |
11980 + | tron-* \ | |
11981 + | ubicom32-* \ | |
11982 + | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | |
11983 + | vax-* \ | |
11984 + | we32k-* \ | |
11985 + | x86-* | x86_64-* | xc16x-* | xps100-* \ | |
11986 + | xstormy16-* | xtensa*-* \ | |
11987 + | ymp-* \ | |
11988 + | z8k-* | z80-*) | |
11989 + ;; | |
11990 + # Recognize the basic CPU types without company name, with glob match. | |
11991 + xtensa*) | |
11992 + basic_machine=$basic_machine-unknown | |
11993 + ;; | |
11994 + # Recognize the various machine names and aliases which stand | |
11995 + # for a CPU type and a company and sometimes even an OS. | |
11996 + 386bsd) | |
11997 + basic_machine=i386-unknown | |
11998 + os=-bsd | |
11999 + ;; | |
12000 + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) | |
12001 + basic_machine=m68000-att | |
12002 + ;; | |
12003 + 3b*) | |
12004 + basic_machine=we32k-att | |
12005 + ;; | |
12006 + a29khif) | |
12007 + basic_machine=a29k-amd | |
12008 + os=-udi | |
12009 + ;; | |
12010 + abacus) | |
12011 + basic_machine=abacus-unknown | |
12012 + ;; | |
12013 + adobe68k) | |
12014 + basic_machine=m68010-adobe | |
12015 + os=-scout | |
12016 + ;; | |
12017 + alliant | fx80) | |
12018 + basic_machine=fx80-alliant | |
12019 + ;; | |
12020 + altos | altos3068) | |
12021 + basic_machine=m68k-altos | |
12022 + ;; | |
12023 + am29k) | |
12024 + basic_machine=a29k-none | |
12025 + os=-bsd | |
12026 + ;; | |
12027 + amd64) | |
12028 + basic_machine=x86_64-pc | |
12029 + ;; | |
12030 + amd64-*) | |
12031 + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` | |
12032 + ;; | |
12033 + amdahl) | |
12034 + basic_machine=580-amdahl | |
12035 + os=-sysv | |
12036 + ;; | |
12037 + amiga | amiga-*) | |
12038 + basic_machine=m68k-unknown | |
12039 + ;; | |
12040 + amigaos | amigados) | |
12041 + basic_machine=m68k-unknown | |
12042 + os=-amigaos | |
12043 + ;; | |
12044 + amigaunix | amix) | |
12045 + basic_machine=m68k-unknown | |
12046 + os=-sysv4 | |
12047 + ;; | |
12048 + apollo68) | |
12049 + basic_machine=m68k-apollo | |
12050 + os=-sysv | |
12051 + ;; | |
12052 + apollo68bsd) | |
12053 + basic_machine=m68k-apollo | |
12054 + os=-bsd | |
12055 + ;; | |
12056 + aros) | |
12057 + basic_machine=i386-pc | |
12058 + os=-aros | |
12059 + ;; | |
12060 + aux) | |
12061 + basic_machine=m68k-apple | |
12062 + os=-aux | |
12063 + ;; | |
12064 + balance) | |
12065 + basic_machine=ns32k-sequent | |
12066 + os=-dynix | |
12067 + ;; | |
12068 + blackfin) | |
12069 + basic_machine=bfin-unknown | |
12070 + os=-linux | |
12071 + ;; | |
12072 + blackfin-*) | |
12073 + basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` | |
12074 + os=-linux | |
12075 + ;; | |
12076 + bluegene*) | |
12077 + basic_machine=powerpc-ibm | |
12078 + os=-cnk | |
12079 + ;; | |
12080 + c54x-*) | |
12081 + basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` | |
12082 + ;; | |
12083 + c55x-*) | |
12084 + basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` | |
12085 + ;; | |
12086 + c6x-*) | |
12087 + basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` | |
12088 + ;; | |
12089 + c90) | |
12090 + basic_machine=c90-cray | |
12091 + os=-unicos | |
12092 + ;; | |
12093 + cegcc) | |
12094 + basic_machine=arm-unknown | |
12095 + os=-cegcc | |
12096 + ;; | |
12097 + convex-c1) | |
12098 + basic_machine=c1-convex | |
12099 + os=-bsd | |
12100 + ;; | |
12101 + convex-c2) | |
12102 + basic_machine=c2-convex | |
12103 + os=-bsd | |
12104 + ;; | |
12105 + convex-c32) | |
12106 + basic_machine=c32-convex | |
12107 + os=-bsd | |
12108 + ;; | |
12109 + convex-c34) | |
12110 + basic_machine=c34-convex | |
12111 + os=-bsd | |
12112 + ;; | |
12113 + convex-c38) | |
12114 + basic_machine=c38-convex | |
12115 + os=-bsd | |
12116 + ;; | |
12117 + cray | j90) | |
12118 + basic_machine=j90-cray | |
12119 + os=-unicos | |
12120 + ;; | |
12121 + craynv) | |
12122 + basic_machine=craynv-cray | |
12123 + os=-unicosmp | |
12124 + ;; | |
12125 + cr16 | cr16-*) | |
12126 + basic_machine=cr16-unknown | |
12127 + os=-elf | |
12128 + ;; | |
12129 + crds | unos) | |
12130 + basic_machine=m68k-crds | |
12131 + ;; | |
12132 + crisv32 | crisv32-* | etraxfs*) | |
12133 + basic_machine=crisv32-axis | |
12134 + ;; | |
12135 + cris | cris-* | etrax*) | |
12136 + basic_machine=cris-axis | |
12137 + ;; | |
12138 + crx) | |
12139 + basic_machine=crx-unknown | |
12140 + os=-elf | |
12141 + ;; | |
12142 + da30 | da30-*) | |
12143 + basic_machine=m68k-da30 | |
12144 + ;; | |
12145 + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) | |
12146 + basic_machine=mips-dec | |
12147 + ;; | |
12148 + decsystem10* | dec10*) | |
12149 + basic_machine=pdp10-dec | |
12150 + os=-tops10 | |
12151 + ;; | |
12152 + decsystem20* | dec20*) | |
12153 + basic_machine=pdp10-dec | |
12154 + os=-tops20 | |
12155 + ;; | |
12156 + delta | 3300 | motorola-3300 | motorola-delta \ | |
12157 + | 3300-motorola | delta-motorola) | |
12158 + basic_machine=m68k-motorola | |
12159 + ;; | |
12160 + delta88) | |
12161 + basic_machine=m88k-motorola | |
12162 + os=-sysv3 | |
12163 + ;; | |
12164 + dicos) | |
12165 + basic_machine=i686-pc | |
12166 + os=-dicos | |
12167 + ;; | |
12168 + djgpp) | |
12169 + basic_machine=i586-pc | |
12170 + os=-msdosdjgpp | |
12171 + ;; | |
12172 + dpx20 | dpx20-*) | |
12173 + basic_machine=rs6000-bull | |
12174 + os=-bosx | |
12175 + ;; | |
12176 + dpx2* | dpx2*-bull) | |
12177 + basic_machine=m68k-bull | |
12178 + os=-sysv3 | |
12179 + ;; | |
12180 + ebmon29k) | |
12181 + basic_machine=a29k-amd | |
12182 + os=-ebmon | |
12183 + ;; | |
12184 + elxsi) | |
12185 + basic_machine=elxsi-elxsi | |
12186 + os=-bsd | |
12187 + ;; | |
12188 + encore | umax | mmax) | |
12189 + basic_machine=ns32k-encore | |
12190 + ;; | |
12191 + es1800 | OSE68k | ose68k | ose | OSE) | |
12192 + basic_machine=m68k-ericsson | |
12193 + os=-ose | |
12194 + ;; | |
12195 + fx2800) | |
12196 + basic_machine=i860-alliant | |
12197 + ;; | |
12198 + genix) | |
12199 + basic_machine=ns32k-ns | |
12200 + ;; | |
12201 + gmicro) | |
12202 + basic_machine=tron-gmicro | |
12203 + os=-sysv | |
12204 + ;; | |
12205 + go32) | |
12206 + basic_machine=i386-pc | |
12207 + os=-go32 | |
12208 + ;; | |
12209 + h3050r* | hiux*) | |
12210 + basic_machine=hppa1.1-hitachi | |
12211 + os=-hiuxwe2 | |
12212 + ;; | |
12213 + h8300hms) | |
12214 + basic_machine=h8300-hitachi | |
12215 + os=-hms | |
12216 + ;; | |
12217 + h8300xray) | |
12218 + basic_machine=h8300-hitachi | |
12219 + os=-xray | |
12220 + ;; | |
12221 + h8500hms) | |
12222 + basic_machine=h8500-hitachi | |
12223 + os=-hms | |
12224 + ;; | |
12225 + harris) | |
12226 + basic_machine=m88k-harris | |
12227 + os=-sysv3 | |
12228 + ;; | |
12229 + hp300-*) | |
12230 + basic_machine=m68k-hp | |
12231 + ;; | |
12232 + hp300bsd) | |
12233 + basic_machine=m68k-hp | |
12234 + os=-bsd | |
12235 + ;; | |
12236 + hp300hpux) | |
12237 + basic_machine=m68k-hp | |
12238 + os=-hpux | |
12239 + ;; | |
12240 + hp3k9[0-9][0-9] | hp9[0-9][0-9]) | |
12241 + basic_machine=hppa1.0-hp | |
12242 + ;; | |
12243 + hp9k2[0-9][0-9] | hp9k31[0-9]) | |
12244 + basic_machine=m68000-hp | |
12245 + ;; | |
12246 + hp9k3[2-9][0-9]) | |
12247 + basic_machine=m68k-hp | |
12248 + ;; | |
12249 + hp9k6[0-9][0-9] | hp6[0-9][0-9]) | |
12250 + basic_machine=hppa1.0-hp | |
12251 + ;; | |
12252 + hp9k7[0-79][0-9] | hp7[0-79][0-9]) | |
12253 + basic_machine=hppa1.1-hp | |
12254 + ;; | |
12255 + hp9k78[0-9] | hp78[0-9]) | |
12256 + # FIXME: really hppa2.0-hp | |
12257 + basic_machine=hppa1.1-hp | |
12258 + ;; | |
12259 + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) | |
12260 + # FIXME: really hppa2.0-hp | |
12261 + basic_machine=hppa1.1-hp | |
12262 + ;; | |
12263 + hp9k8[0-9][13679] | hp8[0-9][13679]) | |
12264 + basic_machine=hppa1.1-hp | |
12265 + ;; | |
12266 + hp9k8[0-9][0-9] | hp8[0-9][0-9]) | |
12267 + basic_machine=hppa1.0-hp | |
12268 + ;; | |
12269 + hppa-next) | |
12270 + os=-nextstep3 | |
12271 + ;; | |
12272 + hppaosf) | |
12273 + basic_machine=hppa1.1-hp | |
12274 + os=-osf | |
12275 + ;; | |
12276 + hppro) | |
12277 + basic_machine=hppa1.1-hp | |
12278 + os=-proelf | |
12279 + ;; | |
12280 + i370-ibm* | ibm*) | |
12281 + basic_machine=i370-ibm | |
12282 + ;; | |
12283 + i*86v32) | |
12284 + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` | |
12285 + os=-sysv32 | |
12286 + ;; | |
12287 + i*86v4*) | |
12288 + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` | |
12289 + os=-sysv4 | |
12290 + ;; | |
12291 + i*86v) | |
12292 + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` | |
12293 + os=-sysv | |
12294 + ;; | |
12295 + i*86sol2) | |
12296 + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` | |
12297 + os=-solaris2 | |
12298 + ;; | |
12299 + i386mach) | |
12300 + basic_machine=i386-mach | |
12301 + os=-mach | |
12302 + ;; | |
12303 + i386-vsta | vsta) | |
12304 + basic_machine=i386-unknown | |
12305 + os=-vsta | |
12306 + ;; | |
12307 + iris | iris4d) | |
12308 + basic_machine=mips-sgi | |
12309 + case $os in | |
12310 + -irix*) | |
12311 + ;; | |
12312 + *) | |
12313 + os=-irix4 | |
12314 + ;; | |
12315 + esac | |
12316 + ;; | |
12317 + isi68 | isi) | |
12318 + basic_machine=m68k-isi | |
12319 + os=-sysv | |
12320 + ;; | |
12321 + m68knommu) | |
12322 + basic_machine=m68k-unknown | |
12323 + os=-linux | |
12324 + ;; | |
12325 + m68knommu-*) | |
12326 + basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` | |
12327 + os=-linux | |
12328 + ;; | |
12329 + m88k-omron*) | |
12330 + basic_machine=m88k-omron | |
12331 + ;; | |
12332 + magnum | m3230) | |
12333 + basic_machine=mips-mips | |
12334 + os=-sysv | |
12335 + ;; | |
12336 + merlin) | |
12337 + basic_machine=ns32k-utek | |
12338 + os=-sysv | |
12339 + ;; | |
12340 + microblaze*) | |
12341 + basic_machine=microblaze-xilinx | |
12342 + ;; | |
12343 + mingw64) | |
12344 + basic_machine=x86_64-pc | |
12345 + os=-mingw64 | |
12346 + ;; | |
12347 + mingw32) | |
12348 + basic_machine=i686-pc | |
12349 + os=-mingw32 | |
12350 + ;; | |
12351 + mingw32ce) | |
12352 + basic_machine=arm-unknown | |
12353 + os=-mingw32ce | |
12354 + ;; | |
12355 + miniframe) | |
12356 + basic_machine=m68000-convergent | |
12357 + ;; | |
12358 + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) | |
12359 + basic_machine=m68k-atari | |
12360 + os=-mint | |
12361 + ;; | |
12362 + mips3*-*) | |
12363 + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` | |
12364 + ;; | |
12365 + mips3*) | |
12366 + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown | |
12367 + ;; | |
12368 + monitor) | |
12369 + basic_machine=m68k-rom68k | |
12370 + os=-coff | |
12371 + ;; | |
12372 + morphos) | |
12373 + basic_machine=powerpc-unknown | |
12374 + os=-morphos | |
12375 + ;; | |
12376 + moxiebox) | |
12377 + basic_machine=moxie-unknown | |
12378 + os=-moxiebox | |
12379 + ;; | |
12380 + msdos) | |
12381 + basic_machine=i386-pc | |
12382 + os=-msdos | |
12383 + ;; | |
12384 + ms1-*) | |
12385 + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` | |
12386 + ;; | |
12387 + msys) | |
12388 + basic_machine=i686-pc | |
12389 + os=-msys | |
12390 + ;; | |
12391 + mvs) | |
12392 + basic_machine=i370-ibm | |
12393 + os=-mvs | |
12394 + ;; | |
12395 + nacl) | |
12396 + basic_machine=le32-unknown | |
12397 + os=-nacl | |
12398 + ;; | |
12399 + ncr3000) | |
12400 + basic_machine=i486-ncr | |
12401 + os=-sysv4 | |
12402 + ;; | |
12403 + netbsd386) | |
12404 + basic_machine=i386-unknown | |
12405 + os=-netbsd | |
12406 + ;; | |
12407 + netwinder) | |
12408 + basic_machine=armv4l-rebel | |
12409 + os=-linux | |
12410 + ;; | |
12411 + news | news700 | news800 | news900) | |
12412 + basic_machine=m68k-sony | |
12413 + os=-newsos | |
12414 + ;; | |
12415 + news1000) | |
12416 + basic_machine=m68030-sony | |
12417 + os=-newsos | |
12418 + ;; | |
12419 + news-3600 | risc-news) | |
12420 + basic_machine=mips-sony | |
12421 + os=-newsos | |
12422 + ;; | |
12423 + necv70) | |
12424 + basic_machine=v70-nec | |
12425 + os=-sysv | |
12426 + ;; | |
12427 + next | m*-next ) | |
12428 + basic_machine=m68k-next | |
12429 + case $os in | |
12430 + -nextstep* ) | |
12431 + ;; | |
12432 + -ns2*) | |
12433 + os=-nextstep2 | |
12434 + ;; | |
12435 + *) | |
12436 + os=-nextstep3 | |
12437 + ;; | |
12438 + esac | |
12439 + ;; | |
12440 + nh3000) | |
12441 + basic_machine=m68k-harris | |
12442 + os=-cxux | |
12443 + ;; | |
12444 + nh[45]000) | |
12445 + basic_machine=m88k-harris | |
12446 + os=-cxux | |
12447 + ;; | |
12448 + nindy960) | |
12449 + basic_machine=i960-intel | |
12450 + os=-nindy | |
12451 + ;; | |
12452 + mon960) | |
12453 + basic_machine=i960-intel | |
12454 + os=-mon960 | |
12455 + ;; | |
12456 + nonstopux) | |
12457 + basic_machine=mips-compaq | |
12458 + os=-nonstopux | |
12459 + ;; | |
12460 + np1) | |
12461 + basic_machine=np1-gould | |
12462 + ;; | |
12463 + neo-tandem) | |
12464 + basic_machine=neo-tandem | |
12465 + ;; | |
12466 + nse-tandem) | |
12467 + basic_machine=nse-tandem | |
12468 + ;; | |
12469 + nsr-tandem) | |
12470 + basic_machine=nsr-tandem | |
12471 + ;; | |
12472 + op50n-* | op60c-*) | |
12473 + basic_machine=hppa1.1-oki | |
12474 + os=-proelf | |
12475 + ;; | |
12476 + openrisc | openrisc-*) | |
12477 + basic_machine=or32-unknown | |
12478 + ;; | |
12479 + os400) | |
12480 + basic_machine=powerpc-ibm | |
12481 + os=-os400 | |
12482 + ;; | |
12483 + OSE68000 | ose68000) | |
12484 + basic_machine=m68000-ericsson | |
12485 + os=-ose | |
12486 + ;; | |
12487 + os68k) | |
12488 + basic_machine=m68k-none | |
12489 + os=-os68k | |
12490 + ;; | |
12491 + pa-hitachi) | |
12492 + basic_machine=hppa1.1-hitachi | |
12493 + os=-hiuxwe2 | |
12494 + ;; | |
12495 + paragon) | |
12496 + basic_machine=i860-intel | |
12497 + os=-osf | |
12498 + ;; | |
12499 + parisc) | |
12500 + basic_machine=hppa-unknown | |
12501 + os=-linux | |
12502 + ;; | |
12503 + parisc-*) | |
12504 + basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` | |
12505 + os=-linux | |
12506 + ;; | |
12507 + pbd) | |
12508 + basic_machine=sparc-tti | |
12509 + ;; | |
12510 + pbb) | |
12511 + basic_machine=m68k-tti | |
12512 + ;; | |
12513 + pc532 | pc532-*) | |
12514 + basic_machine=ns32k-pc532 | |
12515 + ;; | |
12516 + pc98) | |
12517 + basic_machine=i386-pc | |
12518 + ;; | |
12519 + pc98-*) | |
12520 + basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` | |
12521 + ;; | |
12522 + pentium | p5 | k5 | k6 | nexgen | viac3) | |
12523 + basic_machine=i586-pc | |
12524 + ;; | |
12525 + pentiumpro | p6 | 6x86 | athlon | athlon_*) | |
12526 + basic_machine=i686-pc | |
12527 + ;; | |
12528 + pentiumii | pentium2 | pentiumiii | pentium3) | |
12529 + basic_machine=i686-pc | |
12530 + ;; | |
12531 + pentium4) | |
12532 + basic_machine=i786-pc | |
12533 + ;; | |
12534 + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) | |
12535 + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` | |
12536 + ;; | |
12537 + pentiumpro-* | p6-* | 6x86-* | athlon-*) | |
12538 + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` | |
12539 + ;; | |
12540 + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) | |
12541 + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` | |
12542 + ;; | |
12543 + pentium4-*) | |
12544 + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` | |
12545 + ;; | |
12546 + pn) | |
12547 + basic_machine=pn-gould | |
12548 + ;; | |
12549 + power) basic_machine=power-ibm | |
12550 + ;; | |
12551 + ppc | ppcbe) basic_machine=powerpc-unknown | |
12552 + ;; | |
12553 + ppc-* | ppcbe-*) | |
12554 + basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` | |
12555 + ;; | |
12556 + ppcle | powerpclittle | ppc-le | powerpc-little) | |
12557 + basic_machine=powerpcle-unknown | |
12558 + ;; | |
12559 + ppcle-* | powerpclittle-*) | |
12560 + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` | |
12561 + ;; | |
12562 + ppc64) basic_machine=powerpc64-unknown | |
12563 + ;; | |
12564 + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` | |
12565 + ;; | |
12566 + ppc64le | powerpc64little | ppc64-le | powerpc64-little) | |
12567 + basic_machine=powerpc64le-unknown | |
12568 + ;; | |
12569 + ppc64le-* | powerpc64little-*) | |
12570 + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` | |
12571 + ;; | |
12572 + ps2) | |
12573 + basic_machine=i386-ibm | |
12574 + ;; | |
12575 + pw32) | |
12576 + basic_machine=i586-unknown | |
12577 + os=-pw32 | |
12578 + ;; | |
12579 + rdos | rdos64) | |
12580 + basic_machine=x86_64-pc | |
12581 + os=-rdos | |
12582 + ;; | |
12583 + rdos32) | |
12584 + basic_machine=i386-pc | |
12585 + os=-rdos | |
12586 + ;; | |
12587 + rom68k) | |
12588 + basic_machine=m68k-rom68k | |
12589 + os=-coff | |
12590 + ;; | |
12591 + rm[46]00) | |
12592 + basic_machine=mips-siemens | |
12593 + ;; | |
12594 + rtpc | rtpc-*) | |
12595 + basic_machine=romp-ibm | |
12596 + ;; | |
12597 + s390 | s390-*) | |
12598 + basic_machine=s390-ibm | |
12599 + ;; | |
12600 + s390x | s390x-*) | |
12601 + basic_machine=s390x-ibm | |
12602 + ;; | |
12603 + sa29200) | |
12604 + basic_machine=a29k-amd | |
12605 + os=-udi | |
12606 + ;; | |
12607 + sb1) | |
12608 + basic_machine=mipsisa64sb1-unknown | |
12609 + ;; | |
12610 + sb1el) | |
12611 + basic_machine=mipsisa64sb1el-unknown | |
12612 + ;; | |
12613 + sde) | |
12614 + basic_machine=mipsisa32-sde | |
12615 + os=-elf | |
12616 + ;; | |
12617 + sei) | |
12618 + basic_machine=mips-sei | |
12619 + os=-seiux | |
12620 + ;; | |
12621 + sequent) | |
12622 + basic_machine=i386-sequent | |
12623 + ;; | |
12624 + sh) | |
12625 + basic_machine=sh-hitachi | |
12626 + os=-hms | |
12627 + ;; | |
12628 + sh5el) | |
12629 + basic_machine=sh5le-unknown | |
12630 + ;; | |
12631 + sh64) | |
12632 + basic_machine=sh64-unknown | |
12633 + ;; | |
12634 + sparclite-wrs | simso-wrs) | |
12635 + basic_machine=sparclite-wrs | |
12636 + os=-vxworks | |
12637 + ;; | |
12638 + sps7) | |
12639 + basic_machine=m68k-bull | |
12640 + os=-sysv2 | |
12641 + ;; | |
12642 + spur) | |
12643 + basic_machine=spur-unknown | |
12644 + ;; | |
12645 + st2000) | |
12646 + basic_machine=m68k-tandem | |
12647 + ;; | |
12648 + stratus) | |
12649 + basic_machine=i860-stratus | |
12650 + os=-sysv4 | |
12651 + ;; | |
12652 + strongarm-* | thumb-*) | |
12653 + basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` | |
12654 + ;; | |
12655 + sun2) | |
12656 + basic_machine=m68000-sun | |
12657 + ;; | |
12658 + sun2os3) | |
12659 + basic_machine=m68000-sun | |
12660 + os=-sunos3 | |
12661 + ;; | |
12662 + sun2os4) | |
12663 + basic_machine=m68000-sun | |
12664 + os=-sunos4 | |
12665 + ;; | |
12666 + sun3os3) | |
12667 + basic_machine=m68k-sun | |
12668 + os=-sunos3 | |
12669 + ;; | |
12670 + sun3os4) | |
12671 + basic_machine=m68k-sun | |
12672 + os=-sunos4 | |
12673 + ;; | |
12674 + sun4os3) | |
12675 + basic_machine=sparc-sun | |
12676 + os=-sunos3 | |
12677 + ;; | |
12678 + sun4os4) | |
12679 + basic_machine=sparc-sun | |
12680 + os=-sunos4 | |
12681 + ;; | |
12682 + sun4sol2) | |
12683 + basic_machine=sparc-sun | |
12684 + os=-solaris2 | |
12685 + ;; | |
12686 + sun3 | sun3-*) | |
12687 + basic_machine=m68k-sun | |
12688 + ;; | |
12689 + sun4) | |
12690 + basic_machine=sparc-sun | |
12691 + ;; | |
12692 + sun386 | sun386i | roadrunner) | |
12693 + basic_machine=i386-sun | |
12694 + ;; | |
12695 + sv1) | |
12696 + basic_machine=sv1-cray | |
12697 + os=-unicos | |
12698 + ;; | |
12699 + symmetry) | |
12700 + basic_machine=i386-sequent | |
12701 + os=-dynix | |
12702 + ;; | |
12703 + t3e) | |
12704 + basic_machine=alphaev5-cray | |
12705 + os=-unicos | |
12706 + ;; | |
12707 + t90) | |
12708 + basic_machine=t90-cray | |
12709 + os=-unicos | |
12710 + ;; | |
12711 + tile*) | |
12712 + basic_machine=$basic_machine-unknown | |
12713 + os=-linux-gnu | |
12714 + ;; | |
12715 + tx39) | |
12716 + basic_machine=mipstx39-unknown | |
12717 + ;; | |
12718 + tx39el) | |
12719 + basic_machine=mipstx39el-unknown | |
12720 + ;; | |
12721 + toad1) | |
12722 + basic_machine=pdp10-xkl | |
12723 + os=-tops20 | |
12724 + ;; | |
12725 + tower | tower-32) | |
12726 + basic_machine=m68k-ncr | |
12727 + ;; | |
12728 + tpf) | |
12729 + basic_machine=s390x-ibm | |
12730 + os=-tpf | |
12731 + ;; | |
12732 + udi29k) | |
12733 + basic_machine=a29k-amd | |
12734 + os=-udi | |
12735 + ;; | |
12736 + ultra3) | |
12737 + basic_machine=a29k-nyu | |
12738 + os=-sym1 | |
12739 + ;; | |
12740 + v810 | necv810) | |
12741 + basic_machine=v810-nec | |
12742 + os=-none | |
12743 + ;; | |
12744 + vaxv) | |
12745 + basic_machine=vax-dec | |
12746 + os=-sysv | |
12747 + ;; | |
12748 + vms) | |
12749 + basic_machine=vax-dec | |
12750 + os=-vms | |
12751 + ;; | |
12752 + vpp*|vx|vx-*) | |
12753 + basic_machine=f301-fujitsu | |
12754 + ;; | |
12755 + vxworks960) | |
12756 + basic_machine=i960-wrs | |
12757 + os=-vxworks | |
12758 + ;; | |
12759 + vxworks68) | |
12760 + basic_machine=m68k-wrs | |
12761 + os=-vxworks | |
12762 + ;; | |
12763 + vxworks29k) | |
12764 + basic_machine=a29k-wrs | |
12765 + os=-vxworks | |
12766 + ;; | |
12767 + w65*) | |
12768 + basic_machine=w65-wdc | |
12769 + os=-none | |
12770 + ;; | |
12771 + w89k-*) | |
12772 + basic_machine=hppa1.1-winbond | |
12773 + os=-proelf | |
12774 + ;; | |
12775 + xbox) | |
12776 + basic_machine=i686-pc | |
12777 + os=-mingw32 | |
12778 + ;; | |
12779 + xps | xps100) | |
12780 + basic_machine=xps100-honeywell | |
12781 + ;; | |
12782 + xscale-* | xscalee[bl]-*) | |
12783 + basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` | |
12784 + ;; | |
12785 + ymp) | |
12786 + basic_machine=ymp-cray | |
12787 + os=-unicos | |
12788 + ;; | |
12789 + z8k-*-coff) | |
12790 + basic_machine=z8k-unknown | |
12791 + os=-sim | |
12792 + ;; | |
12793 + z80-*-coff) | |
12794 + basic_machine=z80-unknown | |
12795 + os=-sim | |
12796 + ;; | |
12797 + none) | |
12798 + basic_machine=none-none | |
12799 + os=-none | |
12800 + ;; | |
12801 + | |
12802 +# Here we handle the default manufacturer of certain CPU types. It is in | |
12803 +# some cases the only manufacturer, in others, it is the most popular. | |
12804 + w89k) | |
12805 + basic_machine=hppa1.1-winbond | |
12806 + ;; | |
12807 + op50n) | |
12808 + basic_machine=hppa1.1-oki | |
12809 + ;; | |
12810 + op60c) | |
12811 + basic_machine=hppa1.1-oki | |
12812 + ;; | |
12813 + romp) | |
12814 + basic_machine=romp-ibm | |
12815 + ;; | |
12816 + mmix) | |
12817 + basic_machine=mmix-knuth | |
12818 + ;; | |
12819 + rs6000) | |
12820 + basic_machine=rs6000-ibm | |
12821 + ;; | |
12822 + vax) | |
12823 + basic_machine=vax-dec | |
12824 + ;; | |
12825 + pdp10) | |
12826 + # there are many clones, so DEC is not a safe bet | |
12827 + basic_machine=pdp10-unknown | |
12828 + ;; | |
12829 + pdp11) | |
12830 + basic_machine=pdp11-dec | |
12831 + ;; | |
12832 + we32k) | |
12833 + basic_machine=we32k-att | |
12834 + ;; | |
12835 + sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) | |
12836 + basic_machine=sh-unknown | |
12837 + ;; | |
12838 + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) | |
12839 + basic_machine=sparc-sun | |
12840 + ;; | |
12841 + cydra) | |
12842 + basic_machine=cydra-cydrome | |
12843 + ;; | |
12844 + orion) | |
12845 + basic_machine=orion-highlevel | |
12846 + ;; | |
12847 + orion105) | |
12848 + basic_machine=clipper-highlevel | |
12849 + ;; | |
12850 + mac | mpw | mac-mpw) | |
12851 + basic_machine=m68k-apple | |
12852 + ;; | |
12853 + pmac | pmac-mpw) | |
12854 + basic_machine=powerpc-apple | |
12855 + ;; | |
12856 + *-unknown) | |
12857 + # Make sure to match an already-canonicalized machine name. | |
12858 + ;; | |
12859 + *) | |
12860 + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 | |
12861 + exit 1 | |
12862 + ;; | |
12863 +esac | |
12864 + | |
12865 +# Here we canonicalize certain aliases for manufacturers. | |
12866 +case $basic_machine in | |
12867 + *-digital*) | |
12868 + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` | |
12869 + ;; | |
12870 + *-commodore*) | |
12871 + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` | |
12872 + ;; | |
12873 + *) | |
12874 + ;; | |
12875 +esac | |
12876 + | |
12877 +# Decode manufacturer-specific aliases for certain operating systems. | |
12878 + | |
12879 +if [ x"$os" != x"" ] | |
12880 +then | |
12881 +case $os in | |
12882 + # First match some system type aliases | |
12883 + # that might get confused with valid system types. | |
12884 + # -solaris* is a basic system type, with this one exception. | |
12885 + -auroraux) | |
12886 + os=-auroraux | |
12887 + ;; | |
12888 + -solaris1 | -solaris1.*) | |
12889 + os=`echo $os | sed -e 's|solaris1|sunos4|'` | |
12890 + ;; | |
12891 + -solaris) | |
12892 + os=-solaris2 | |
12893 + ;; | |
12894 + -svr4*) | |
12895 + os=-sysv4 | |
12896 + ;; | |
12897 + -unixware*) | |
12898 + os=-sysv4.2uw | |
12899 + ;; | |
12900 + -gnu/linux*) | |
12901 + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` | |
12902 + ;; | |
12903 + # First accept the basic system types. | |
12904 + # The portable systems comes first. | |
12905 + # Each alternative MUST END IN A *, to match a version number. | |
12906 + # -sysv* is not here because it comes later, after sysvr4. | |
12907 + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | |
12908 + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | |
12909 + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | |
12910 + | -sym* | -kopensolaris* | -plan9* \ | |
12911 + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | |
12912 + | -aos* | -aros* \ | |
12913 + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | |
12914 + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | |
12915 + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | |
12916 + | -bitrig* | -openbsd* | -solidbsd* \ | |
12917 + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | |
12918 + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | |
12919 + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | |
12920 + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | |
12921 + | -chorusos* | -chorusrdb* | -cegcc* \ | |
12922 + | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | |
12923 + | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | |
12924 + | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | |
12925 + | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | |
12926 + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | |
12927 + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | |
12928 + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | |
12929 + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | |
12930 + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | |
12931 + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | |
12932 + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*) | |
12933 + # Remember, each alternative MUST END IN *, to match a version number. | |
12934 + ;; | |
12935 + -qnx*) | |
12936 + case $basic_machine in | |
12937 + x86-* | i*86-*) | |
12938 + ;; | |
12939 + *) | |
12940 + os=-nto$os | |
12941 + ;; | |
12942 + esac | |
12943 + ;; | |
12944 + -nto-qnx*) | |
12945 + ;; | |
12946 + -nto*) | |
12947 + os=`echo $os | sed -e 's|nto|nto-qnx|'` | |
12948 + ;; | |
12949 + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | |
12950 + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | |
12951 + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) | |
12952 + ;; | |
12953 + -mac*) | |
12954 + os=`echo $os | sed -e 's|mac|macos|'` | |
12955 + ;; | |
12956 + -linux-dietlibc) | |
12957 + os=-linux-dietlibc | |
12958 + ;; | |
12959 + -linux*) | |
12960 + os=`echo $os | sed -e 's|linux|linux-gnu|'` | |
12961 + ;; | |
12962 + -sunos5*) | |
12963 + os=`echo $os | sed -e 's|sunos5|solaris2|'` | |
12964 + ;; | |
12965 + -sunos6*) | |
12966 + os=`echo $os | sed -e 's|sunos6|solaris3|'` | |
12967 + ;; | |
12968 + -opened*) | |
12969 + os=-openedition | |
12970 + ;; | |
12971 + -os400*) | |
12972 + os=-os400 | |
12973 + ;; | |
12974 + -wince*) | |
12975 + os=-wince | |
12976 + ;; | |
12977 + -osfrose*) | |
12978 + os=-osfrose | |
12979 + ;; | |
12980 + -osf*) | |
12981 + os=-osf | |
12982 + ;; | |
12983 + -utek*) | |
12984 + os=-bsd | |
12985 + ;; | |
12986 + -dynix*) | |
12987 + os=-bsd | |
12988 + ;; | |
12989 + -acis*) | |
12990 + os=-aos | |
12991 + ;; | |
12992 + -atheos*) | |
12993 + os=-atheos | |
12994 + ;; | |
12995 + -syllable*) | |
12996 + os=-syllable | |
12997 + ;; | |
12998 + -386bsd) | |
12999 + os=-bsd | |
13000 + ;; | |
13001 + -ctix* | -uts*) | |
13002 + os=-sysv | |
13003 + ;; | |
13004 + -nova*) | |
13005 + os=-rtmk-nova | |
13006 + ;; | |
13007 + -ns2 ) | |
13008 + os=-nextstep2 | |
13009 + ;; | |
13010 + -nsk*) | |
13011 + os=-nsk | |
13012 + ;; | |
13013 + # Preserve the version number of sinix5. | |
13014 + -sinix5.*) | |
13015 + os=`echo $os | sed -e 's|sinix|sysv|'` | |
13016 + ;; | |
13017 + -sinix*) | |
13018 + os=-sysv4 | |
13019 + ;; | |
13020 + -tpf*) | |
13021 + os=-tpf | |
13022 + ;; | |
13023 + -triton*) | |
13024 + os=-sysv3 | |
13025 + ;; | |
13026 + -oss*) | |
13027 + os=-sysv3 | |
13028 + ;; | |
13029 + -svr4) | |
13030 + os=-sysv4 | |
13031 + ;; | |
13032 + -svr3) | |
13033 + os=-sysv3 | |
13034 + ;; | |
13035 + -sysvr4) | |
13036 + os=-sysv4 | |
13037 + ;; | |
13038 + # This must come after -sysvr4. | |
13039 + -sysv*) | |
13040 + ;; | |
13041 + -ose*) | |
13042 + os=-ose | |
13043 + ;; | |
13044 + -es1800*) | |
13045 + os=-ose | |
13046 + ;; | |
13047 + -xenix) | |
13048 + os=-xenix | |
13049 + ;; | |
13050 + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) | |
13051 + os=-mint | |
13052 + ;; | |
13053 + -aros*) | |
13054 + os=-aros | |
13055 + ;; | |
13056 + -zvmoe) | |
13057 + os=-zvmoe | |
13058 + ;; | |
13059 + -dicos*) | |
13060 + os=-dicos | |
13061 + ;; | |
13062 + -nacl*) | |
13063 + ;; | |
13064 + -none) | |
13065 + ;; | |
13066 + *) | |
13067 + # Get rid of the `-' at the beginning of $os. | |
13068 + os=`echo $os | sed 's/[^-]*-//'` | |
13069 + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 | |
13070 + exit 1 | |
13071 + ;; | |
13072 +esac | |
13073 +else | |
13074 + | |
13075 +# Here we handle the default operating systems that come with various machines. | |
13076 +# The value should be what the vendor currently ships out the door with their | |
13077 +# machine or put another way, the most popular os provided with the machine. | |
13078 + | |
13079 +# Note that if you're going to try to match "-MANUFACTURER" here (say, | |
13080 +# "-sun"), then you have to tell the case statement up towards the top | |
13081 +# that MANUFACTURER isn't an operating system. Otherwise, code above | |
13082 +# will signal an error saying that MANUFACTURER isn't an operating | |
13083 +# system, and we'll never get to this point. | |
13084 + | |
13085 +case $basic_machine in | |
13086 + score-*) | |
13087 + os=-elf | |
13088 + ;; | |
13089 + spu-*) | |
13090 + os=-elf | |
13091 + ;; | |
13092 + *-acorn) | |
13093 + os=-riscix1.2 | |
13094 + ;; | |
13095 + arm*-rebel) | |
13096 + os=-linux | |
13097 + ;; | |
13098 + arm*-semi) | |
13099 + os=-aout | |
13100 + ;; | |
13101 + c4x-* | tic4x-*) | |
13102 + os=-coff | |
13103 + ;; | |
13104 + c8051-*) | |
13105 + os=-elf | |
13106 + ;; | |
13107 + hexagon-*) | |
13108 + os=-elf | |
13109 + ;; | |
13110 + tic54x-*) | |
13111 + os=-coff | |
13112 + ;; | |
13113 + tic55x-*) | |
13114 + os=-coff | |
13115 + ;; | |
13116 + tic6x-*) | |
13117 + os=-coff | |
13118 + ;; | |
13119 + # This must come before the *-dec entry. | |
13120 + pdp10-*) | |
13121 + os=-tops20 | |
13122 + ;; | |
13123 + pdp11-*) | |
13124 + os=-none | |
13125 + ;; | |
13126 + *-dec | vax-*) | |
13127 + os=-ultrix4.2 | |
13128 + ;; | |
13129 + m68*-apollo) | |
13130 + os=-domain | |
13131 + ;; | |
13132 + i386-sun) | |
13133 + os=-sunos4.0.2 | |
13134 + ;; | |
13135 + m68000-sun) | |
13136 + os=-sunos3 | |
13137 + ;; | |
13138 + m68*-cisco) | |
13139 + os=-aout | |
13140 + ;; | |
13141 + mep-*) | |
13142 + os=-elf | |
13143 + ;; | |
13144 + mips*-cisco) | |
13145 + os=-elf | |
13146 + ;; | |
13147 + mips*-*) | |
13148 + os=-elf | |
13149 + ;; | |
13150 + or32-*) | |
13151 + os=-coff | |
13152 + ;; | |
13153 + *-tti) # must be before sparc entry or we get the wrong os. | |
13154 + os=-sysv3 | |
13155 + ;; | |
13156 + sparc-* | *-sun) | |
13157 + os=-sunos4.1.1 | |
13158 + ;; | |
13159 + *-be) | |
13160 + os=-beos | |
13161 + ;; | |
13162 + *-haiku) | |
13163 + os=-haiku | |
13164 + ;; | |
13165 + *-ibm) | |
13166 + os=-aix | |
13167 + ;; | |
13168 + *-knuth) | |
13169 + os=-mmixware | |
13170 + ;; | |
13171 + *-wec) | |
13172 + os=-proelf | |
13173 + ;; | |
13174 + *-winbond) | |
13175 + os=-proelf | |
13176 + ;; | |
13177 + *-oki) | |
13178 + os=-proelf | |
13179 + ;; | |
13180 + *-hp) | |
13181 + os=-hpux | |
13182 + ;; | |
13183 + *-hitachi) | |
13184 + os=-hiux | |
13185 + ;; | |
13186 + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) | |
13187 + os=-sysv | |
13188 + ;; | |
13189 + *-cbm) | |
13190 + os=-amigaos | |
13191 + ;; | |
13192 + *-dg) | |
13193 + os=-dgux | |
13194 + ;; | |
13195 + *-dolphin) | |
13196 + os=-sysv3 | |
13197 + ;; | |
13198 + m68k-ccur) | |
13199 + os=-rtu | |
13200 + ;; | |
13201 + m88k-omron*) | |
13202 + os=-luna | |
13203 + ;; | |
13204 + *-next ) | |
13205 + os=-nextstep | |
13206 + ;; | |
13207 + *-sequent) | |
13208 + os=-ptx | |
13209 + ;; | |
13210 + *-crds) | |
13211 + os=-unos | |
13212 + ;; | |
13213 + *-ns) | |
13214 + os=-genix | |
13215 + ;; | |
13216 + i370-*) | |
13217 + os=-mvs | |
13218 + ;; | |
13219 + *-next) | |
13220 + os=-nextstep3 | |
13221 + ;; | |
13222 + *-gould) | |
13223 + os=-sysv | |
13224 + ;; | |
13225 + *-highlevel) | |
13226 + os=-bsd | |
13227 + ;; | |
13228 + *-encore) | |
13229 + os=-bsd | |
13230 + ;; | |
13231 + *-sgi) | |
13232 + os=-irix | |
13233 + ;; | |
13234 + *-siemens) | |
13235 + os=-sysv4 | |
13236 + ;; | |
13237 + *-masscomp) | |
13238 + os=-rtu | |
13239 + ;; | |
13240 + f30[01]-fujitsu | f700-fujitsu) | |
13241 + os=-uxpv | |
13242 + ;; | |
13243 + *-rom68k) | |
13244 + os=-coff | |
13245 + ;; | |
13246 + *-*bug) | |
13247 + os=-coff | |
13248 + ;; | |
13249 + *-apple) | |
13250 + os=-macos | |
13251 + ;; | |
13252 + *-atari*) | |
13253 + os=-mint | |
13254 + ;; | |
13255 + *) | |
13256 + os=-none | |
13257 + ;; | |
13258 +esac | |
13259 +fi | |
13260 + | |
13261 +# Here we handle the case where we know the os, and the CPU type, but not the | |
13262 +# manufacturer. We pick the logical manufacturer. | |
13263 +vendor=unknown | |
13264 +case $basic_machine in | |
13265 + *-unknown) | |
13266 + case $os in | |
13267 + -riscix*) | |
13268 + vendor=acorn | |
13269 + ;; | |
13270 + -sunos*) | |
13271 + vendor=sun | |
13272 + ;; | |
13273 + -cnk*|-aix*) | |
13274 + vendor=ibm | |
13275 + ;; | |
13276 + -beos*) | |
13277 + vendor=be | |
13278 + ;; | |
13279 + -hpux*) | |
13280 + vendor=hp | |
13281 + ;; | |
13282 + -mpeix*) | |
13283 + vendor=hp | |
13284 + ;; | |
13285 + -hiux*) | |
13286 + vendor=hitachi | |
13287 + ;; | |
13288 + -unos*) | |
13289 + vendor=crds | |
13290 + ;; | |
13291 + -dgux*) | |
13292 + vendor=dg | |
13293 + ;; | |
13294 + -luna*) | |
13295 + vendor=omron | |
13296 + ;; | |
13297 + -genix*) | |
13298 + vendor=ns | |
13299 + ;; | |
13300 + -mvs* | -opened*) | |
13301 + vendor=ibm | |
13302 + ;; | |
13303 + -os400*) | |
13304 + vendor=ibm | |
13305 + ;; | |
13306 + -ptx*) | |
13307 + vendor=sequent | |
13308 + ;; | |
13309 + -tpf*) | |
13310 + vendor=ibm | |
13311 + ;; | |
13312 + -vxsim* | -vxworks* | -windiss*) | |
13313 + vendor=wrs | |
13314 + ;; | |
13315 + -aux*) | |
13316 + vendor=apple | |
13317 + ;; | |
13318 + -hms*) | |
13319 + vendor=hitachi | |
13320 + ;; | |
13321 + -mpw* | -macos*) | |
13322 + vendor=apple | |
13323 + ;; | |
13324 + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) | |
13325 + vendor=atari | |
13326 + ;; | |
13327 + -vos*) | |
13328 + vendor=stratus | |
13329 + ;; | |
13330 + esac | |
13331 + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` | |
13332 + ;; | |
13333 +esac | |
13334 + | |
13335 +echo $basic_machine$os | |
13336 +exit | |
13337 + | |
13338 +# Local variables: | |
13339 +# eval: (add-hook 'write-file-hooks 'time-stamp) | |
13340 +# time-stamp-start: "timestamp='" | |
13341 +# time-stamp-format: "%:y-%02m-%02d" | |
13342 +# time-stamp-end: "'" | |
13343 +# End: | |
13344 diff -uNr a/configure.ac b/configure.ac | |
13345 --- a/configure.ac 1969-12-31 19:00:00.000000000 -0500 | |
13346 +++ b/configure.ac 2014-12-12 15:37:39.364452680 -0500 | |
13347 @@ -0,0 +1,31 @@ | |
13348 +AC_PREREQ([2.62]) | |
13349 +AC_INIT([GL2PS], [1.3.8], [], [gl2ps]) | |
13350 + | |
13351 +AC_CONFIG_SRCDIR([gl2ps.c]) | |
13352 + | |
13353 +AM_INIT_AUTOMAKE | |
13354 + | |
13355 +AC_CANONICAL_HOST | |
13356 + | |
13357 +AC_PROG_CC | |
13358 + | |
13359 +LT_PREREQ([2.2.2]) | |
13360 +LT_INIT([disable-static dlopen win32-dll]) | |
13361 + | |
13362 +AC_CHECK_LIB([z], [gzclearerr], [LIBS="-lz $LIBS" | |
13363 +AC_DEFINE([GL2PS_HAVE_ZLIB], 1)]) | |
13364 + | |
13365 +AC_CHECK_LIB([png], [png_write_info], [LIBS="-lpng $LIBS" | |
13366 +AC_DEFINE([GL2PS_HAVE_LIBPNG], 1)]) | |
13367 + | |
13368 +AC_CHECK_HEADERS([GL/glu.h OpenGL/glu.h]) | |
13369 +AC_CHECK_LIB([GLU], [gluBeginCurve]) | |
13370 + | |
13371 +AC_CHECK_HEADERS([GL/gl.h OpenGL/gl.h]) | |
13372 +AC_CHECK_LIB([GL], [glEnable]) | |
13373 + | |
13374 +AC_CHECK_FUNCS([vsnprintf], [], [AC_DEFINE([HAVE_NO_VSNPRINTF], 1)]) | |
13375 + | |
13376 +AC_CONFIG_FILES([Makefile]) | |
13377 + | |
13378 +AC_OUTPUT | |
13379 diff -uNr a/COPYING b/COPYING | |
13380 --- a/COPYING 1969-12-31 19:00:00.000000000 -0500 | |
13381 +++ b/COPYING 2014-12-12 15:59:32.605606679 -0500 | |
13382 @@ -0,0 +1 @@ | |
13383 + | |
13384 diff -uNr a/depcomp b/depcomp | |
13385 --- a/depcomp 1969-12-31 19:00:00.000000000 -0500 | |
13386 +++ b/depcomp 2014-12-12 15:22:27.650238513 -0500 | |
13387 @@ -0,0 +1,791 @@ | |
13388 +#! /bin/sh | |
13389 +# depcomp - compile a program generating dependencies as side-effects | |
13390 + | |
13391 +scriptversion=2013-05-30.07; # UTC | |
13392 + | |
13393 +# Copyright (C) 1999-2013 Free Software Foundation, Inc. | |
13394 + | |
13395 +# This program is free software; you can redistribute it and/or modify | |
13396 +# it under the terms of the GNU General Public License as published by | |
13397 +# the Free Software Foundation; either version 2, or (at your option) | |
13398 +# any later version. | |
13399 + | |
13400 +# This program is distributed in the hope that it will be useful, | |
13401 +# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13402 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13403 +# GNU General Public License for more details. | |
13404 + | |
13405 +# You should have received a copy of the GNU General Public License | |
13406 +# along with this program. If not, see <http://www.gnu.org/licenses/>. | |
13407 + | |
13408 +# As a special exception to the GNU General Public License, if you | |
13409 +# distribute this file as part of a program that contains a | |
13410 +# configuration script generated by Autoconf, you may include it under | |
13411 +# the same distribution terms that you use for the rest of that program. | |
13412 + | |
13413 +# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>. | |
13414 + | |
13415 +case $1 in | |
13416 + '') | |
13417 + echo "$0: No command. Try '$0 --help' for more information." 1>&2 | |
13418 + exit 1; | |
13419 + ;; | |
13420 + -h | --h*) | |
13421 + cat <<\EOF | |
13422 +Usage: depcomp [--help] [--version] PROGRAM [ARGS] | |
13423 + | |
13424 +Run PROGRAMS ARGS to compile a file, generating dependencies | |
13425 +as side-effects. | |
13426 + | |
13427 +Environment variables: | |
13428 + depmode Dependency tracking mode. | |
13429 + source Source file read by 'PROGRAMS ARGS'. | |
13430 + object Object file output by 'PROGRAMS ARGS'. | |
13431 + DEPDIR directory where to store dependencies. | |
13432 + depfile Dependency file to output. | |
13433 + tmpdepfile Temporary file to use when outputting dependencies. | |
13434 + libtool Whether libtool is used (yes/no). | |
13435 + | |
13436 +Report bugs to <bug-automake@gnu.org>. | |
13437 +EOF | |
13438 + exit $? | |
13439 + ;; | |
13440 + -v | --v*) | |
13441 + echo "depcomp $scriptversion" | |
13442 + exit $? | |
13443 + ;; | |
13444 +esac | |
13445 + | |
13446 +# Get the directory component of the given path, and save it in the | |
13447 +# global variables '$dir'. Note that this directory component will | |
13448 +# be either empty or ending with a '/' character. This is deliberate. | |
13449 +set_dir_from () | |
13450 +{ | |
13451 + case $1 in | |
13452 + */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; | |
13453 + *) dir=;; | |
13454 + esac | |
13455 +} | |
13456 + | |
13457 +# Get the suffix-stripped basename of the given path, and save it the | |
13458 +# global variable '$base'. | |
13459 +set_base_from () | |
13460 +{ | |
13461 + base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` | |
13462 +} | |
13463 + | |
13464 +# If no dependency file was actually created by the compiler invocation, | |
13465 +# we still have to create a dummy depfile, to avoid errors with the | |
13466 +# Makefile "include basename.Plo" scheme. | |
13467 +make_dummy_depfile () | |
13468 +{ | |
13469 + echo "#dummy" > "$depfile" | |
13470 +} | |
13471 + | |
13472 +# Factor out some common post-processing of the generated depfile. | |
13473 +# Requires the auxiliary global variable '$tmpdepfile' to be set. | |
13474 +aix_post_process_depfile () | |
13475 +{ | |
13476 + # If the compiler actually managed to produce a dependency file, | |
13477 + # post-process it. | |
13478 + if test -f "$tmpdepfile"; then | |
13479 + # Each line is of the form 'foo.o: dependency.h'. | |
13480 + # Do two passes, one to just change these to | |
13481 + # $object: dependency.h | |
13482 + # and one to simply output | |
13483 + # dependency.h: | |
13484 + # which is needed to avoid the deleted-header problem. | |
13485 + { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" | |
13486 + sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" | |
13487 + } > "$depfile" | |
13488 + rm -f "$tmpdepfile" | |
13489 + else | |
13490 + make_dummy_depfile | |
13491 + fi | |
13492 +} | |
13493 + | |
13494 +# A tabulation character. | |
13495 +tab=' ' | |
13496 +# A newline character. | |
13497 +nl=' | |
13498 +' | |
13499 +# Character ranges might be problematic outside the C locale. | |
13500 +# These definitions help. | |
13501 +upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ | |
13502 +lower=abcdefghijklmnopqrstuvwxyz | |
13503 +digits=0123456789 | |
13504 +alpha=${upper}${lower} | |
13505 + | |
13506 +if test -z "$depmode" || test -z "$source" || test -z "$object"; then | |
13507 + echo "depcomp: Variables source, object and depmode must be set" 1>&2 | |
13508 + exit 1 | |
13509 +fi | |
13510 + | |
13511 +# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. | |
13512 +depfile=${depfile-`echo "$object" | | |
13513 + sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} | |
13514 +tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} | |
13515 + | |
13516 +rm -f "$tmpdepfile" | |
13517 + | |
13518 +# Avoid interferences from the environment. | |
13519 +gccflag= dashmflag= | |
13520 + | |
13521 +# Some modes work just like other modes, but use different flags. We | |
13522 +# parameterize here, but still list the modes in the big case below, | |
13523 +# to make depend.m4 easier to write. Note that we *cannot* use a case | |
13524 +# here, because this file can only contain one case statement. | |
13525 +if test "$depmode" = hp; then | |
13526 + # HP compiler uses -M and no extra arg. | |
13527 + gccflag=-M | |
13528 + depmode=gcc | |
13529 +fi | |
13530 + | |
13531 +if test "$depmode" = dashXmstdout; then | |
13532 + # This is just like dashmstdout with a different argument. | |
13533 + dashmflag=-xM | |
13534 + depmode=dashmstdout | |
13535 +fi | |
13536 + | |
13537 +cygpath_u="cygpath -u -f -" | |
13538 +if test "$depmode" = msvcmsys; then | |
13539 + # This is just like msvisualcpp but w/o cygpath translation. | |
13540 + # Just convert the backslash-escaped backslashes to single forward | |
13541 + # slashes to satisfy depend.m4 | |
13542 + cygpath_u='sed s,\\\\,/,g' | |
13543 + depmode=msvisualcpp | |
13544 +fi | |
13545 + | |
13546 +if test "$depmode" = msvc7msys; then | |
13547 + # This is just like msvc7 but w/o cygpath translation. | |
13548 + # Just convert the backslash-escaped backslashes to single forward | |
13549 + # slashes to satisfy depend.m4 | |
13550 + cygpath_u='sed s,\\\\,/,g' | |
13551 + depmode=msvc7 | |
13552 +fi | |
13553 + | |
13554 +if test "$depmode" = xlc; then | |
13555 + # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. | |
13556 + gccflag=-qmakedep=gcc,-MF | |
13557 + depmode=gcc | |
13558 +fi | |
13559 + | |
13560 +case "$depmode" in | |
13561 +gcc3) | |
13562 +## gcc 3 implements dependency tracking that does exactly what | |
13563 +## we want. Yay! Note: for some reason libtool 1.4 doesn't like | |
13564 +## it if -MD -MP comes after the -MF stuff. Hmm. | |
13565 +## Unfortunately, FreeBSD c89 acceptance of flags depends upon | |
13566 +## the command line argument order; so add the flags where they | |
13567 +## appear in depend2.am. Note that the slowdown incurred here | |
13568 +## affects only configure: in makefiles, %FASTDEP% shortcuts this. | |
13569 + for arg | |
13570 + do | |
13571 + case $arg in | |
13572 + -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; | |
13573 + *) set fnord "$@" "$arg" ;; | |
13574 + esac | |
13575 + shift # fnord | |
13576 + shift # $arg | |
13577 + done | |
13578 + "$@" | |
13579 + stat=$? | |
13580 + if test $stat -ne 0; then | |
13581 + rm -f "$tmpdepfile" | |
13582 + exit $stat | |
13583 + fi | |
13584 + mv "$tmpdepfile" "$depfile" | |
13585 + ;; | |
13586 + | |
13587 +gcc) | |
13588 +## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. | |
13589 +## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. | |
13590 +## (see the conditional assignment to $gccflag above). | |
13591 +## There are various ways to get dependency output from gcc. Here's | |
13592 +## why we pick this rather obscure method: | |
13593 +## - Don't want to use -MD because we'd like the dependencies to end | |
13594 +## up in a subdir. Having to rename by hand is ugly. | |
13595 +## (We might end up doing this anyway to support other compilers.) | |
13596 +## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like | |
13597 +## -MM, not -M (despite what the docs say). Also, it might not be | |
13598 +## supported by the other compilers which use the 'gcc' depmode. | |
13599 +## - Using -M directly means running the compiler twice (even worse | |
13600 +## than renaming). | |
13601 + if test -z "$gccflag"; then | |
13602 + gccflag=-MD, | |
13603 + fi | |
13604 + "$@" -Wp,"$gccflag$tmpdepfile" | |
13605 + stat=$? | |
13606 + if test $stat -ne 0; then | |
13607 + rm -f "$tmpdepfile" | |
13608 + exit $stat | |
13609 + fi | |
13610 + rm -f "$depfile" | |
13611 + echo "$object : \\" > "$depfile" | |
13612 + # The second -e expression handles DOS-style file names with drive | |
13613 + # letters. | |
13614 + sed -e 's/^[^:]*: / /' \ | |
13615 + -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" | |
13616 +## This next piece of magic avoids the "deleted header file" problem. | |
13617 +## The problem is that when a header file which appears in a .P file | |
13618 +## is deleted, the dependency causes make to die (because there is | |
13619 +## typically no way to rebuild the header). We avoid this by adding | |
13620 +## dummy dependencies for each header file. Too bad gcc doesn't do | |
13621 +## this for us directly. | |
13622 +## Some versions of gcc put a space before the ':'. On the theory | |
13623 +## that the space means something, we add a space to the output as | |
13624 +## well. hp depmode also adds that space, but also prefixes the VPATH | |
13625 +## to the object. Take care to not repeat it in the output. | |
13626 +## Some versions of the HPUX 10.20 sed can't process this invocation | |
13627 +## correctly. Breaking it into two sed invocations is a workaround. | |
13628 + tr ' ' "$nl" < "$tmpdepfile" \ | |
13629 + | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ | |
13630 + | sed -e 's/$/ :/' >> "$depfile" | |
13631 + rm -f "$tmpdepfile" | |
13632 + ;; | |
13633 + | |
13634 +hp) | |
13635 + # This case exists only to let depend.m4 do its work. It works by | |
13636 + # looking at the text of this script. This case will never be run, | |
13637 + # since it is checked for above. | |
13638 + exit 1 | |
13639 + ;; | |
13640 + | |
13641 +sgi) | |
13642 + if test "$libtool" = yes; then | |
13643 + "$@" "-Wp,-MDupdate,$tmpdepfile" | |
13644 + else | |
13645 + "$@" -MDupdate "$tmpdepfile" | |
13646 + fi | |
13647 + stat=$? | |
13648 + if test $stat -ne 0; then | |
13649 + rm -f "$tmpdepfile" | |
13650 + exit $stat | |
13651 + fi | |
13652 + rm -f "$depfile" | |
13653 + | |
13654 + if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files | |
13655 + echo "$object : \\" > "$depfile" | |
13656 + # Clip off the initial element (the dependent). Don't try to be | |
13657 + # clever and replace this with sed code, as IRIX sed won't handle | |
13658 + # lines with more than a fixed number of characters (4096 in | |
13659 + # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; | |
13660 + # the IRIX cc adds comments like '#:fec' to the end of the | |
13661 + # dependency line. | |
13662 + tr ' ' "$nl" < "$tmpdepfile" \ | |
13663 + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ | |
13664 + | tr "$nl" ' ' >> "$depfile" | |
13665 + echo >> "$depfile" | |
13666 + # The second pass generates a dummy entry for each header file. | |
13667 + tr ' ' "$nl" < "$tmpdepfile" \ | |
13668 + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ | |
13669 + >> "$depfile" | |
13670 + else | |
13671 + make_dummy_depfile | |
13672 + fi | |
13673 + rm -f "$tmpdepfile" | |
13674 + ;; | |
13675 + | |
13676 +xlc) | |
13677 + # This case exists only to let depend.m4 do its work. It works by | |
13678 + # looking at the text of this script. This case will never be run, | |
13679 + # since it is checked for above. | |
13680 + exit 1 | |
13681 + ;; | |
13682 + | |
13683 +aix) | |
13684 + # The C for AIX Compiler uses -M and outputs the dependencies | |
13685 + # in a .u file. In older versions, this file always lives in the | |
13686 + # current directory. Also, the AIX compiler puts '$object:' at the | |
13687 + # start of each line; $object doesn't have directory information. | |
13688 + # Version 6 uses the directory in both cases. | |
13689 + set_dir_from "$object" | |
13690 + set_base_from "$object" | |
13691 + if test "$libtool" = yes; then | |
13692 + tmpdepfile1=$dir$base.u | |
13693 + tmpdepfile2=$base.u | |
13694 + tmpdepfile3=$dir.libs/$base.u | |
13695 + "$@" -Wc,-M | |
13696 + else | |
13697 + tmpdepfile1=$dir$base.u | |
13698 + tmpdepfile2=$dir$base.u | |
13699 + tmpdepfile3=$dir$base.u | |
13700 + "$@" -M | |
13701 + fi | |
13702 + stat=$? | |
13703 + if test $stat -ne 0; then | |
13704 + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" | |
13705 + exit $stat | |
13706 + fi | |
13707 + | |
13708 + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" | |
13709 + do | |
13710 + test -f "$tmpdepfile" && break | |
13711 + done | |
13712 + aix_post_process_depfile | |
13713 + ;; | |
13714 + | |
13715 +tcc) | |
13716 + # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 | |
13717 + # FIXME: That version still under development at the moment of writing. | |
13718 + # Make that this statement remains true also for stable, released | |
13719 + # versions. | |
13720 + # It will wrap lines (doesn't matter whether long or short) with a | |
13721 + # trailing '\', as in: | |
13722 + # | |
13723 + # foo.o : \ | |
13724 + # foo.c \ | |
13725 + # foo.h \ | |
13726 + # | |
13727 + # It will put a trailing '\' even on the last line, and will use leading | |
13728 + # spaces rather than leading tabs (at least since its commit 0394caf7 | |
13729 + # "Emit spaces for -MD"). | |
13730 + "$@" -MD -MF "$tmpdepfile" | |
13731 + stat=$? | |
13732 + if test $stat -ne 0; then | |
13733 + rm -f "$tmpdepfile" | |
13734 + exit $stat | |
13735 + fi | |
13736 + rm -f "$depfile" | |
13737 + # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. | |
13738 + # We have to change lines of the first kind to '$object: \'. | |
13739 + sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" | |
13740 + # And for each line of the second kind, we have to emit a 'dep.h:' | |
13741 + # dummy dependency, to avoid the deleted-header problem. | |
13742 + sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" | |
13743 + rm -f "$tmpdepfile" | |
13744 + ;; | |
13745 + | |
13746 +## The order of this option in the case statement is important, since the | |
13747 +## shell code in configure will try each of these formats in the order | |
13748 +## listed in this file. A plain '-MD' option would be understood by many | |
13749 +## compilers, so we must ensure this comes after the gcc and icc options. | |
13750 +pgcc) | |
13751 + # Portland's C compiler understands '-MD'. | |
13752 + # Will always output deps to 'file.d' where file is the root name of the | |
13753 + # source file under compilation, even if file resides in a subdirectory. | |
13754 + # The object file name does not affect the name of the '.d' file. | |
13755 + # pgcc 10.2 will output | |
13756 + # foo.o: sub/foo.c sub/foo.h | |
13757 + # and will wrap long lines using '\' : | |
13758 + # foo.o: sub/foo.c ... \ | |
13759 + # sub/foo.h ... \ | |
13760 + # ... | |
13761 + set_dir_from "$object" | |
13762 + # Use the source, not the object, to determine the base name, since | |
13763 + # that's sadly what pgcc will do too. | |
13764 + set_base_from "$source" | |
13765 + tmpdepfile=$base.d | |
13766 + | |
13767 + # For projects that build the same source file twice into different object | |
13768 + # files, the pgcc approach of using the *source* file root name can cause | |
13769 + # problems in parallel builds. Use a locking strategy to avoid stomping on | |
13770 + # the same $tmpdepfile. | |
13771 + lockdir=$base.d-lock | |
13772 + trap " | |
13773 + echo '$0: caught signal, cleaning up...' >&2 | |
13774 + rmdir '$lockdir' | |
13775 + exit 1 | |
13776 + " 1 2 13 15 | |
13777 + numtries=100 | |
13778 + i=$numtries | |
13779 + while test $i -gt 0; do | |
13780 + # mkdir is a portable test-and-set. | |
13781 + if mkdir "$lockdir" 2>/dev/null; then | |
13782 + # This process acquired the lock. | |
13783 + "$@" -MD | |
13784 + stat=$? | |
13785 + # Release the lock. | |
13786 + rmdir "$lockdir" | |
13787 + break | |
13788 + else | |
13789 + # If the lock is being held by a different process, wait | |
13790 + # until the winning process is done or we timeout. | |
13791 + while test -d "$lockdir" && test $i -gt 0; do | |
13792 + sleep 1 | |
13793 + i=`expr $i - 1` | |
13794 + done | |
13795 + fi | |
13796 + i=`expr $i - 1` | |
13797 + done | |
13798 + trap - 1 2 13 15 | |
13799 + if test $i -le 0; then | |
13800 + echo "$0: failed to acquire lock after $numtries attempts" >&2 | |
13801 + echo "$0: check lockdir '$lockdir'" >&2 | |
13802 + exit 1 | |
13803 + fi | |
13804 + | |
13805 + if test $stat -ne 0; then | |
13806 + rm -f "$tmpdepfile" | |
13807 + exit $stat | |
13808 + fi | |
13809 + rm -f "$depfile" | |
13810 + # Each line is of the form `foo.o: dependent.h', | |
13811 + # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. | |
13812 + # Do two passes, one to just change these to | |
13813 + # `$object: dependent.h' and one to simply `dependent.h:'. | |
13814 + sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" | |
13815 + # Some versions of the HPUX 10.20 sed can't process this invocation | |
13816 + # correctly. Breaking it into two sed invocations is a workaround. | |
13817 + sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ | |
13818 + | sed -e 's/$/ :/' >> "$depfile" | |
13819 + rm -f "$tmpdepfile" | |
13820 + ;; | |
13821 + | |
13822 +hp2) | |
13823 + # The "hp" stanza above does not work with aCC (C++) and HP's ia64 | |
13824 + # compilers, which have integrated preprocessors. The correct option | |
13825 + # to use with these is +Maked; it writes dependencies to a file named | |
13826 + # 'foo.d', which lands next to the object file, wherever that | |
13827 + # happens to be. | |
13828 + # Much of this is similar to the tru64 case; see comments there. | |
13829 + set_dir_from "$object" | |
13830 + set_base_from "$object" | |
13831 + if test "$libtool" = yes; then | |
13832 + tmpdepfile1=$dir$base.d | |
13833 + tmpdepfile2=$dir.libs/$base.d | |
13834 + "$@" -Wc,+Maked | |
13835 + else | |
13836 + tmpdepfile1=$dir$base.d | |
13837 + tmpdepfile2=$dir$base.d | |
13838 + "$@" +Maked | |
13839 + fi | |
13840 + stat=$? | |
13841 + if test $stat -ne 0; then | |
13842 + rm -f "$tmpdepfile1" "$tmpdepfile2" | |
13843 + exit $stat | |
13844 + fi | |
13845 + | |
13846 + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" | |
13847 + do | |
13848 + test -f "$tmpdepfile" && break | |
13849 + done | |
13850 + if test -f "$tmpdepfile"; then | |
13851 + sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" | |
13852 + # Add 'dependent.h:' lines. | |
13853 + sed -ne '2,${ | |
13854 + s/^ *// | |
13855 + s/ \\*$// | |
13856 + s/$/:/ | |
13857 + p | |
13858 + }' "$tmpdepfile" >> "$depfile" | |
13859 + else | |
13860 + make_dummy_depfile | |
13861 + fi | |
13862 + rm -f "$tmpdepfile" "$tmpdepfile2" | |
13863 + ;; | |
13864 + | |
13865 +tru64) | |
13866 + # The Tru64 compiler uses -MD to generate dependencies as a side | |
13867 + # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. | |
13868 + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put | |
13869 + # dependencies in 'foo.d' instead, so we check for that too. | |
13870 + # Subdirectories are respected. | |
13871 + set_dir_from "$object" | |
13872 + set_base_from "$object" | |
13873 + | |
13874 + if test "$libtool" = yes; then | |
13875 + # Libtool generates 2 separate objects for the 2 libraries. These | |
13876 + # two compilations output dependencies in $dir.libs/$base.o.d and | |
13877 + # in $dir$base.o.d. We have to check for both files, because | |
13878 + # one of the two compilations can be disabled. We should prefer | |
13879 + # $dir$base.o.d over $dir.libs/$base.o.d because the latter is | |
13880 + # automatically cleaned when .libs/ is deleted, while ignoring | |
13881 + # the former would cause a distcleancheck panic. | |
13882 + tmpdepfile1=$dir$base.o.d # libtool 1.5 | |
13883 + tmpdepfile2=$dir.libs/$base.o.d # Likewise. | |
13884 + tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 | |
13885 + "$@" -Wc,-MD | |
13886 + else | |
13887 + tmpdepfile1=$dir$base.d | |
13888 + tmpdepfile2=$dir$base.d | |
13889 + tmpdepfile3=$dir$base.d | |
13890 + "$@" -MD | |
13891 + fi | |
13892 + | |
13893 + stat=$? | |
13894 + if test $stat -ne 0; then | |
13895 + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" | |
13896 + exit $stat | |
13897 + fi | |
13898 + | |
13899 + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" | |
13900 + do | |
13901 + test -f "$tmpdepfile" && break | |
13902 + done | |
13903 + # Same post-processing that is required for AIX mode. | |
13904 + aix_post_process_depfile | |
13905 + ;; | |
13906 + | |
13907 +msvc7) | |
13908 + if test "$libtool" = yes; then | |
13909 + showIncludes=-Wc,-showIncludes | |
13910 + else | |
13911 + showIncludes=-showIncludes | |
13912 + fi | |
13913 + "$@" $showIncludes > "$tmpdepfile" | |
13914 + stat=$? | |
13915 + grep -v '^Note: including file: ' "$tmpdepfile" | |
13916 + if test $stat -ne 0; then | |
13917 + rm -f "$tmpdepfile" | |
13918 + exit $stat | |
13919 + fi | |
13920 + rm -f "$depfile" | |
13921 + echo "$object : \\" > "$depfile" | |
13922 + # The first sed program below extracts the file names and escapes | |
13923 + # backslashes for cygpath. The second sed program outputs the file | |
13924 + # name when reading, but also accumulates all include files in the | |
13925 + # hold buffer in order to output them again at the end. This only | |
13926 + # works with sed implementations that can handle large buffers. | |
13927 + sed < "$tmpdepfile" -n ' | |
13928 +/^Note: including file: *\(.*\)/ { | |
13929 + s//\1/ | |
13930 + s/\\/\\\\/g | |
13931 + p | |
13932 +}' | $cygpath_u | sort -u | sed -n ' | |
13933 +s/ /\\ /g | |
13934 +s/\(.*\)/'"$tab"'\1 \\/p | |
13935 +s/.\(.*\) \\/\1:/ | |
13936 +H | |
13937 +$ { | |
13938 + s/.*/'"$tab"'/ | |
13939 + G | |
13940 + p | |
13941 +}' >> "$depfile" | |
13942 + echo >> "$depfile" # make sure the fragment doesn't end with a backslash | |
13943 + rm -f "$tmpdepfile" | |
13944 + ;; | |
13945 + | |
13946 +msvc7msys) | |
13947 + # This case exists only to let depend.m4 do its work. It works by | |
13948 + # looking at the text of this script. This case will never be run, | |
13949 + # since it is checked for above. | |
13950 + exit 1 | |
13951 + ;; | |
13952 + | |
13953 +#nosideeffect) | |
13954 + # This comment above is used by automake to tell side-effect | |
13955 + # dependency tracking mechanisms from slower ones. | |
13956 + | |
13957 +dashmstdout) | |
13958 + # Important note: in order to support this mode, a compiler *must* | |
13959 + # always write the preprocessed file to stdout, regardless of -o. | |
13960 + "$@" || exit $? | |
13961 + | |
13962 + # Remove the call to Libtool. | |
13963 + if test "$libtool" = yes; then | |
13964 + while test "X$1" != 'X--mode=compile'; do | |
13965 + shift | |
13966 + done | |
13967 + shift | |
13968 + fi | |
13969 + | |
13970 + # Remove '-o $object'. | |
13971 + IFS=" " | |
13972 + for arg | |
13973 + do | |
13974 + case $arg in | |
13975 + -o) | |
13976 + shift | |
13977 + ;; | |
13978 + $object) | |
13979 + shift | |
13980 + ;; | |
13981 + *) | |
13982 + set fnord "$@" "$arg" | |
13983 + shift # fnord | |
13984 + shift # $arg | |
13985 + ;; | |
13986 + esac | |
13987 + done | |
13988 + | |
13989 + test -z "$dashmflag" && dashmflag=-M | |
13990 + # Require at least two characters before searching for ':' | |
13991 + # in the target name. This is to cope with DOS-style filenames: | |
13992 + # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. | |
13993 + "$@" $dashmflag | | |
13994 + sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" | |
13995 + rm -f "$depfile" | |
13996 + cat < "$tmpdepfile" > "$depfile" | |
13997 + # Some versions of the HPUX 10.20 sed can't process this sed invocation | |
13998 + # correctly. Breaking it into two sed invocations is a workaround. | |
13999 + tr ' ' "$nl" < "$tmpdepfile" \ | |
14000 + | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | |
14001 + | sed -e 's/$/ :/' >> "$depfile" | |
14002 + rm -f "$tmpdepfile" | |
14003 + ;; | |
14004 + | |
14005 +dashXmstdout) | |
14006 + # This case only exists to satisfy depend.m4. It is never actually | |
14007 + # run, as this mode is specially recognized in the preamble. | |
14008 + exit 1 | |
14009 + ;; | |
14010 + | |
14011 +makedepend) | |
14012 + "$@" || exit $? | |
14013 + # Remove any Libtool call | |
14014 + if test "$libtool" = yes; then | |
14015 + while test "X$1" != 'X--mode=compile'; do | |
14016 + shift | |
14017 + done | |
14018 + shift | |
14019 + fi | |
14020 + # X makedepend | |
14021 + shift | |
14022 + cleared=no eat=no | |
14023 + for arg | |
14024 + do | |
14025 + case $cleared in | |
14026 + no) | |
14027 + set ""; shift | |
14028 + cleared=yes ;; | |
14029 + esac | |
14030 + if test $eat = yes; then | |
14031 + eat=no | |
14032 + continue | |
14033 + fi | |
14034 + case "$arg" in | |
14035 + -D*|-I*) | |
14036 + set fnord "$@" "$arg"; shift ;; | |
14037 + # Strip any option that makedepend may not understand. Remove | |
14038 + # the object too, otherwise makedepend will parse it as a source file. | |
14039 + -arch) | |
14040 + eat=yes ;; | |
14041 + -*|$object) | |
14042 + ;; | |
14043 + *) | |
14044 + set fnord "$@" "$arg"; shift ;; | |
14045 + esac | |
14046 + done | |
14047 + obj_suffix=`echo "$object" | sed 's/^.*\././'` | |
14048 + touch "$tmpdepfile" | |
14049 + ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" | |
14050 + rm -f "$depfile" | |
14051 + # makedepend may prepend the VPATH from the source file name to the object. | |
14052 + # No need to regex-escape $object, excess matching of '.' is harmless. | |
14053 + sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" | |
14054 + # Some versions of the HPUX 10.20 sed can't process the last invocation | |
14055 + # correctly. Breaking it into two sed invocations is a workaround. | |
14056 + sed '1,2d' "$tmpdepfile" \ | |
14057 + | tr ' ' "$nl" \ | |
14058 + | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | |
14059 + | sed -e 's/$/ :/' >> "$depfile" | |
14060 + rm -f "$tmpdepfile" "$tmpdepfile".bak | |
14061 + ;; | |
14062 + | |
14063 +cpp) | |
14064 + # Important note: in order to support this mode, a compiler *must* | |
14065 + # always write the preprocessed file to stdout. | |
14066 + "$@" || exit $? | |
14067 + | |
14068 + # Remove the call to Libtool. | |
14069 + if test "$libtool" = yes; then | |
14070 + while test "X$1" != 'X--mode=compile'; do | |
14071 + shift | |
14072 + done | |
14073 + shift | |
14074 + fi | |
14075 + | |
14076 + # Remove '-o $object'. | |
14077 + IFS=" " | |
14078 + for arg | |
14079 + do | |
14080 + case $arg in | |
14081 + -o) | |
14082 + shift | |
14083 + ;; | |
14084 + $object) | |
14085 + shift | |
14086 + ;; | |
14087 + *) | |
14088 + set fnord "$@" "$arg" | |
14089 + shift # fnord | |
14090 + shift # $arg | |
14091 + ;; | |
14092 + esac | |
14093 + done | |
14094 + | |
14095 + "$@" -E \ | |
14096 + | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ | |
14097 + -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ | |
14098 + | sed '$ s: \\$::' > "$tmpdepfile" | |
14099 + rm -f "$depfile" | |
14100 + echo "$object : \\" > "$depfile" | |
14101 + cat < "$tmpdepfile" >> "$depfile" | |
14102 + sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" | |
14103 + rm -f "$tmpdepfile" | |
14104 + ;; | |
14105 + | |
14106 +msvisualcpp) | |
14107 + # Important note: in order to support this mode, a compiler *must* | |
14108 + # always write the preprocessed file to stdout. | |
14109 + "$@" || exit $? | |
14110 + | |
14111 + # Remove the call to Libtool. | |
14112 + if test "$libtool" = yes; then | |
14113 + while test "X$1" != 'X--mode=compile'; do | |
14114 + shift | |
14115 + done | |
14116 + shift | |
14117 + fi | |
14118 + | |
14119 + IFS=" " | |
14120 + for arg | |
14121 + do | |
14122 + case "$arg" in | |
14123 + -o) | |
14124 + shift | |
14125 + ;; | |
14126 + $object) | |
14127 + shift | |
14128 + ;; | |
14129 + "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") | |
14130 + set fnord "$@" | |
14131 + shift | |
14132 + shift | |
14133 + ;; | |
14134 + *) | |
14135 + set fnord "$@" "$arg" | |
14136 + shift | |
14137 + shift | |
14138 + ;; | |
14139 + esac | |
14140 + done | |
14141 + "$@" -E 2>/dev/null | | |
14142 + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" | |
14143 + rm -f "$depfile" | |
14144 + echo "$object : \\" > "$depfile" | |
14145 + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" | |
14146 + echo "$tab" >> "$depfile" | |
14147 + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" | |
14148 + rm -f "$tmpdepfile" | |
14149 + ;; | |
14150 + | |
14151 +msvcmsys) | |
14152 + # This case exists only to let depend.m4 do its work. It works by | |
14153 + # looking at the text of this script. This case will never be run, | |
14154 + # since it is checked for above. | |
14155 + exit 1 | |
14156 + ;; | |
14157 + | |
14158 +none) | |
14159 + exec "$@" | |
14160 + ;; | |
14161 + | |
14162 +*) | |
14163 + echo "Unknown depmode $depmode" 1>&2 | |
14164 + exit 1 | |
14165 + ;; | |
14166 +esac | |
14167 + | |
14168 +exit 0 | |
14169 + | |
14170 +# Local Variables: | |
14171 +# mode: shell-script | |
14172 +# sh-indentation: 2 | |
14173 +# eval: (add-hook 'write-file-hooks 'time-stamp) | |
14174 +# time-stamp-start: "scriptversion=" | |
14175 +# time-stamp-format: "%:y-%02m-%02d.%02H" | |
14176 +# time-stamp-time-zone: "UTC" | |
14177 +# time-stamp-end: "; # UTC" | |
14178 +# End: | |
14179 diff -uNr a/INSTALL b/INSTALL | |
14180 --- a/INSTALL 1969-12-31 19:00:00.000000000 -0500 | |
14181 +++ b/INSTALL 2014-12-12 15:22:27.622239427 -0500 | |
14182 @@ -0,0 +1,370 @@ | |
14183 +Installation Instructions | |
14184 +************************* | |
14185 + | |
14186 +Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation, | |
14187 +Inc. | |
14188 + | |
14189 + Copying and distribution of this file, with or without modification, | |
14190 +are permitted in any medium without royalty provided the copyright | |
14191 +notice and this notice are preserved. This file is offered as-is, | |
14192 +without warranty of any kind. | |
14193 + | |
14194 +Basic Installation | |
14195 +================== | |
14196 + | |
14197 + Briefly, the shell command `./configure && make && make install' | |
14198 +should configure, build, and install this package. The following | |
14199 +more-detailed instructions are generic; see the `README' file for | |
14200 +instructions specific to this package. Some packages provide this | |
14201 +`INSTALL' file but do not implement all of the features documented | |
14202 +below. The lack of an optional feature in a given package is not | |
14203 +necessarily a bug. More recommendations for GNU packages can be found | |
14204 +in *note Makefile Conventions: (standards)Makefile Conventions. | |
14205 + | |
14206 + The `configure' shell script attempts to guess correct values for | |
14207 +various system-dependent variables used during compilation. It uses | |
14208 +those values to create a `Makefile' in each directory of the package. | |
14209 +It may also create one or more `.h' files containing system-dependent | |
14210 +definitions. Finally, it creates a shell script `config.status' that | |
14211 +you can run in the future to recreate the current configuration, and a | |
14212 +file `config.log' containing compiler output (useful mainly for | |
14213 +debugging `configure'). | |
14214 + | |
14215 + It can also use an optional file (typically called `config.cache' | |
14216 +and enabled with `--cache-file=config.cache' or simply `-C') that saves | |
14217 +the results of its tests to speed up reconfiguring. Caching is | |
14218 +disabled by default to prevent problems with accidental use of stale | |
14219 +cache files. | |
14220 + | |
14221 + If you need to do unusual things to compile the package, please try | |
14222 +to figure out how `configure' could check whether to do them, and mail | |
14223 +diffs or instructions to the address given in the `README' so they can | |
14224 +be considered for the next release. If you are using the cache, and at | |
14225 +some point `config.cache' contains results you don't want to keep, you | |
14226 +may remove or edit it. | |
14227 + | |
14228 + The file `configure.ac' (or `configure.in') is used to create | |
14229 +`configure' by a program called `autoconf'. You need `configure.ac' if | |
14230 +you want to change it or regenerate `configure' using a newer version | |
14231 +of `autoconf'. | |
14232 + | |
14233 + The simplest way to compile this package is: | |
14234 + | |
14235 + 1. `cd' to the directory containing the package's source code and type | |
14236 + `./configure' to configure the package for your system. | |
14237 + | |
14238 + Running `configure' might take a while. While running, it prints | |
14239 + some messages telling which features it is checking for. | |
14240 + | |
14241 + 2. Type `make' to compile the package. | |
14242 + | |
14243 + 3. Optionally, type `make check' to run any self-tests that come with | |
14244 + the package, generally using the just-built uninstalled binaries. | |
14245 + | |
14246 + 4. Type `make install' to install the programs and any data files and | |
14247 + documentation. When installing into a prefix owned by root, it is | |
14248 + recommended that the package be configured and built as a regular | |
14249 + user, and only the `make install' phase executed with root | |
14250 + privileges. | |
14251 + | |
14252 + 5. Optionally, type `make installcheck' to repeat any self-tests, but | |
14253 + this time using the binaries in their final installed location. | |
14254 + This target does not install anything. Running this target as a | |
14255 + regular user, particularly if the prior `make install' required | |
14256 + root privileges, verifies that the installation completed | |
14257 + correctly. | |
14258 + | |
14259 + 6. You can remove the program binaries and object files from the | |
14260 + source code directory by typing `make clean'. To also remove the | |
14261 + files that `configure' created (so you can compile the package for | |
14262 + a different kind of computer), type `make distclean'. There is | |
14263 + also a `make maintainer-clean' target, but that is intended mainly | |
14264 + for the package's developers. If you use it, you may have to get | |
14265 + all sorts of other programs in order to regenerate files that came | |
14266 + with the distribution. | |
14267 + | |
14268 + 7. Often, you can also type `make uninstall' to remove the installed | |
14269 + files again. In practice, not all packages have tested that | |
14270 + uninstallation works correctly, even though it is required by the | |
14271 + GNU Coding Standards. | |
14272 + | |
14273 + 8. Some packages, particularly those that use Automake, provide `make | |
14274 + distcheck', which can by used by developers to test that all other | |
14275 + targets like `make install' and `make uninstall' work correctly. | |
14276 + This target is generally not run by end users. | |
14277 + | |
14278 +Compilers and Options | |
14279 +===================== | |
14280 + | |
14281 + Some systems require unusual options for compilation or linking that | |
14282 +the `configure' script does not know about. Run `./configure --help' | |
14283 +for details on some of the pertinent environment variables. | |
14284 + | |
14285 + You can give `configure' initial values for configuration parameters | |
14286 +by setting variables in the command line or in the environment. Here | |
14287 +is an example: | |
14288 + | |
14289 + ./configure CC=c99 CFLAGS=-g LIBS=-lposix | |
14290 + | |
14291 + *Note Defining Variables::, for more details. | |
14292 + | |
14293 +Compiling For Multiple Architectures | |
14294 +==================================== | |
14295 + | |
14296 + You can compile the package for more than one kind of computer at the | |
14297 +same time, by placing the object files for each architecture in their | |
14298 +own directory. To do this, you can use GNU `make'. `cd' to the | |
14299 +directory where you want the object files and executables to go and run | |
14300 +the `configure' script. `configure' automatically checks for the | |
14301 +source code in the directory that `configure' is in and in `..'. This | |
14302 +is known as a "VPATH" build. | |
14303 + | |
14304 + With a non-GNU `make', it is safer to compile the package for one | |
14305 +architecture at a time in the source code directory. After you have | |
14306 +installed the package for one architecture, use `make distclean' before | |
14307 +reconfiguring for another architecture. | |
14308 + | |
14309 + On MacOS X 10.5 and later systems, you can create libraries and | |
14310 +executables that work on multiple system types--known as "fat" or | |
14311 +"universal" binaries--by specifying multiple `-arch' options to the | |
14312 +compiler but only a single `-arch' option to the preprocessor. Like | |
14313 +this: | |
14314 + | |
14315 + ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ | |
14316 + CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ | |
14317 + CPP="gcc -E" CXXCPP="g++ -E" | |
14318 + | |
14319 + This is not guaranteed to produce working output in all cases, you | |
14320 +may have to build one architecture at a time and combine the results | |
14321 +using the `lipo' tool if you have problems. | |
14322 + | |
14323 +Installation Names | |
14324 +================== | |
14325 + | |
14326 + By default, `make install' installs the package's commands under | |
14327 +`/usr/local/bin', include files under `/usr/local/include', etc. You | |
14328 +can specify an installation prefix other than `/usr/local' by giving | |
14329 +`configure' the option `--prefix=PREFIX', where PREFIX must be an | |
14330 +absolute file name. | |
14331 + | |
14332 + You can specify separate installation prefixes for | |
14333 +architecture-specific files and architecture-independent files. If you | |
14334 +pass the option `--exec-prefix=PREFIX' to `configure', the package uses | |
14335 +PREFIX as the prefix for installing programs and libraries. | |
14336 +Documentation and other data files still use the regular prefix. | |
14337 + | |
14338 + In addition, if you use an unusual directory layout you can give | |
14339 +options like `--bindir=DIR' to specify different values for particular | |
14340 +kinds of files. Run `configure --help' for a list of the directories | |
14341 +you can set and what kinds of files go in them. In general, the | |
14342 +default for these options is expressed in terms of `${prefix}', so that | |
14343 +specifying just `--prefix' will affect all of the other directory | |
14344 +specifications that were not explicitly provided. | |
14345 + | |
14346 + The most portable way to affect installation locations is to pass the | |
14347 +correct locations to `configure'; however, many packages provide one or | |
14348 +both of the following shortcuts of passing variable assignments to the | |
14349 +`make install' command line to change installation locations without | |
14350 +having to reconfigure or recompile. | |
14351 + | |
14352 + The first method involves providing an override variable for each | |
14353 +affected directory. For example, `make install | |
14354 +prefix=/alternate/directory' will choose an alternate location for all | |
14355 +directory configuration variables that were expressed in terms of | |
14356 +`${prefix}'. Any directories that were specified during `configure', | |
14357 +but not in terms of `${prefix}', must each be overridden at install | |
14358 +time for the entire installation to be relocated. The approach of | |
14359 +makefile variable overrides for each directory variable is required by | |
14360 +the GNU Coding Standards, and ideally causes no recompilation. | |
14361 +However, some platforms have known limitations with the semantics of | |
14362 +shared libraries that end up requiring recompilation when using this | |
14363 +method, particularly noticeable in packages that use GNU Libtool. | |
14364 + | |
14365 + The second method involves providing the `DESTDIR' variable. For | |
14366 +example, `make install DESTDIR=/alternate/directory' will prepend | |
14367 +`/alternate/directory' before all installation names. The approach of | |
14368 +`DESTDIR' overrides is not required by the GNU Coding Standards, and | |
14369 +does not work on platforms that have drive letters. On the other hand, | |
14370 +it does better at avoiding recompilation issues, and works well even | |
14371 +when some directory options were not specified in terms of `${prefix}' | |
14372 +at `configure' time. | |
14373 + | |
14374 +Optional Features | |
14375 +================= | |
14376 + | |
14377 + If the package supports it, you can cause programs to be installed | |
14378 +with an extra prefix or suffix on their names by giving `configure' the | |
14379 +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. | |
14380 + | |
14381 + Some packages pay attention to `--enable-FEATURE' options to | |
14382 +`configure', where FEATURE indicates an optional part of the package. | |
14383 +They may also pay attention to `--with-PACKAGE' options, where PACKAGE | |
14384 +is something like `gnu-as' or `x' (for the X Window System). The | |
14385 +`README' should mention any `--enable-' and `--with-' options that the | |
14386 +package recognizes. | |
14387 + | |
14388 + For packages that use the X Window System, `configure' can usually | |
14389 +find the X include and library files automatically, but if it doesn't, | |
14390 +you can use the `configure' options `--x-includes=DIR' and | |
14391 +`--x-libraries=DIR' to specify their locations. | |
14392 + | |
14393 + Some packages offer the ability to configure how verbose the | |
14394 +execution of `make' will be. For these packages, running `./configure | |
14395 +--enable-silent-rules' sets the default to minimal output, which can be | |
14396 +overridden with `make V=1'; while running `./configure | |
14397 +--disable-silent-rules' sets the default to verbose, which can be | |
14398 +overridden with `make V=0'. | |
14399 + | |
14400 +Particular systems | |
14401 +================== | |
14402 + | |
14403 + On HP-UX, the default C compiler is not ANSI C compatible. If GNU | |
14404 +CC is not installed, it is recommended to use the following options in | |
14405 +order to use an ANSI C compiler: | |
14406 + | |
14407 + ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" | |
14408 + | |
14409 +and if that doesn't work, install pre-built binaries of GCC for HP-UX. | |
14410 + | |
14411 + HP-UX `make' updates targets which have the same time stamps as | |
14412 +their prerequisites, which makes it generally unusable when shipped | |
14413 +generated files such as `configure' are involved. Use GNU `make' | |
14414 +instead. | |
14415 + | |
14416 + On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot | |
14417 +parse its `<wchar.h>' header file. The option `-nodtk' can be used as | |
14418 +a workaround. If GNU CC is not installed, it is therefore recommended | |
14419 +to try | |
14420 + | |
14421 + ./configure CC="cc" | |
14422 + | |
14423 +and if that doesn't work, try | |
14424 + | |
14425 + ./configure CC="cc -nodtk" | |
14426 + | |
14427 + On Solaris, don't put `/usr/ucb' early in your `PATH'. This | |
14428 +directory contains several dysfunctional programs; working variants of | |
14429 +these programs are available in `/usr/bin'. So, if you need `/usr/ucb' | |
14430 +in your `PATH', put it _after_ `/usr/bin'. | |
14431 + | |
14432 + On Haiku, software installed for all users goes in `/boot/common', | |
14433 +not `/usr/local'. It is recommended to use the following options: | |
14434 + | |
14435 + ./configure --prefix=/boot/common | |
14436 + | |
14437 +Specifying the System Type | |
14438 +========================== | |
14439 + | |
14440 + There may be some features `configure' cannot figure out | |
14441 +automatically, but needs to determine by the type of machine the package | |
14442 +will run on. Usually, assuming the package is built to be run on the | |
14443 +_same_ architectures, `configure' can figure that out, but if it prints | |
14444 +a message saying it cannot guess the machine type, give it the | |
14445 +`--build=TYPE' option. TYPE can either be a short name for the system | |
14446 +type, such as `sun4', or a canonical name which has the form: | |
14447 + | |
14448 + CPU-COMPANY-SYSTEM | |
14449 + | |
14450 +where SYSTEM can have one of these forms: | |
14451 + | |
14452 + OS | |
14453 + KERNEL-OS | |
14454 + | |
14455 + See the file `config.sub' for the possible values of each field. If | |
14456 +`config.sub' isn't included in this package, then this package doesn't | |
14457 +need to know the machine type. | |
14458 + | |
14459 + If you are _building_ compiler tools for cross-compiling, you should | |
14460 +use the option `--target=TYPE' to select the type of system they will | |
14461 +produce code for. | |
14462 + | |
14463 + If you want to _use_ a cross compiler, that generates code for a | |
14464 +platform different from the build platform, you should specify the | |
14465 +"host" platform (i.e., that on which the generated programs will | |
14466 +eventually be run) with `--host=TYPE'. | |
14467 + | |
14468 +Sharing Defaults | |
14469 +================ | |
14470 + | |
14471 + If you want to set default values for `configure' scripts to share, | |
14472 +you can create a site shell script called `config.site' that gives | |
14473 +default values for variables like `CC', `cache_file', and `prefix'. | |
14474 +`configure' looks for `PREFIX/share/config.site' if it exists, then | |
14475 +`PREFIX/etc/config.site' if it exists. Or, you can set the | |
14476 +`CONFIG_SITE' environment variable to the location of the site script. | |
14477 +A warning: not all `configure' scripts look for a site script. | |
14478 + | |
14479 +Defining Variables | |
14480 +================== | |
14481 + | |
14482 + Variables not defined in a site shell script can be set in the | |
14483 +environment passed to `configure'. However, some packages may run | |
14484 +configure again during the build, and the customized values of these | |
14485 +variables may be lost. In order to avoid this problem, you should set | |
14486 +them in the `configure' command line, using `VAR=value'. For example: | |
14487 + | |
14488 + ./configure CC=/usr/local2/bin/gcc | |
14489 + | |
14490 +causes the specified `gcc' to be used as the C compiler (unless it is | |
14491 +overridden in the site shell script). | |
14492 + | |
14493 +Unfortunately, this technique does not work for `CONFIG_SHELL' due to | |
14494 +an Autoconf limitation. Until the limitation is lifted, you can use | |
14495 +this workaround: | |
14496 + | |
14497 + CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash | |
14498 + | |
14499 +`configure' Invocation | |
14500 +====================== | |
14501 + | |
14502 + `configure' recognizes the following options to control how it | |
14503 +operates. | |
14504 + | |
14505 +`--help' | |
14506 +`-h' | |
14507 + Print a summary of all of the options to `configure', and exit. | |
14508 + | |
14509 +`--help=short' | |
14510 +`--help=recursive' | |
14511 + Print a summary of the options unique to this package's | |
14512 + `configure', and exit. The `short' variant lists options used | |
14513 + only in the top level, while the `recursive' variant lists options | |
14514 + also present in any nested packages. | |
14515 + | |
14516 +`--version' | |
14517 +`-V' | |
14518 + Print the version of Autoconf used to generate the `configure' | |
14519 + script, and exit. | |
14520 + | |
14521 +`--cache-file=FILE' | |
14522 + Enable the cache: use and save the results of the tests in FILE, | |
14523 + traditionally `config.cache'. FILE defaults to `/dev/null' to | |
14524 + disable caching. | |
14525 + | |
14526 +`--config-cache' | |
14527 +`-C' | |
14528 + Alias for `--cache-file=config.cache'. | |
14529 + | |
14530 +`--quiet' | |
14531 +`--silent' | |
14532 +`-q' | |
14533 + Do not print messages saying which checks are being made. To | |
14534 + suppress all normal output, redirect it to `/dev/null' (any error | |
14535 + messages will still be shown). | |
14536 + | |
14537 +`--srcdir=DIR' | |
14538 + Look for the package's source code in directory DIR. Usually | |
14539 + `configure' can determine that directory automatically. | |
14540 + | |
14541 +`--prefix=DIR' | |
14542 + Use DIR as the installation prefix. *note Installation Names:: | |
14543 + for more details, including other options available for fine-tuning | |
14544 + the installation locations. | |
14545 + | |
14546 +`--no-create' | |
14547 +`-n' | |
14548 + Run the configure checks, but stop before creating any output | |
14549 + files. | |
14550 + | |
14551 +`configure' also accepts some other, not widely useful, options. Run | |
14552 +`configure --help' for more details. | |
14553 diff -uNr a/install-sh b/install-sh | |
14554 --- a/install-sh 1969-12-31 19:00:00.000000000 -0500 | |
14555 +++ b/install-sh 2014-12-12 15:22:27.594240341 -0500 | |
14556 @@ -0,0 +1,527 @@ | |
14557 +#!/bin/sh | |
14558 +# install - install a program, script, or datafile | |
14559 + | |
14560 +scriptversion=2011-11-20.07; # UTC | |
14561 + | |
14562 +# This originates from X11R5 (mit/util/scripts/install.sh), which was | |
14563 +# later released in X11R6 (xc/config/util/install.sh) with the | |
14564 +# following copyright and license. | |
14565 +# | |
14566 +# Copyright (C) 1994 X Consortium | |
14567 +# | |
14568 +# Permission is hereby granted, free of charge, to any person obtaining a copy | |
14569 +# of this software and associated documentation files (the "Software"), to | |
14570 +# deal in the Software without restriction, including without limitation the | |
14571 +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | |
14572 +# sell copies of the Software, and to permit persons to whom the Software is | |
14573 +# furnished to do so, subject to the following conditions: | |
14574 +# | |
14575 +# The above copyright notice and this permission notice shall be included in | |
14576 +# all copies or substantial portions of the Software. | |
14577 +# | |
14578 +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
14579 +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
14580 +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
14581 +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN | |
14582 +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- | |
14583 +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |
14584 +# | |
14585 +# Except as contained in this notice, the name of the X Consortium shall not | |
14586 +# be used in advertising or otherwise to promote the sale, use or other deal- | |
14587 +# ings in this Software without prior written authorization from the X Consor- | |
14588 +# tium. | |
14589 +# | |
14590 +# | |
14591 +# FSF changes to this file are in the public domain. | |
14592 +# | |
14593 +# Calling this script install-sh is preferred over install.sh, to prevent | |
14594 +# 'make' implicit rules from creating a file called install from it | |
14595 +# when there is no Makefile. | |
14596 +# | |
14597 +# This script is compatible with the BSD install script, but was written | |
14598 +# from scratch. | |
14599 + | |
14600 +nl=' | |
14601 +' | |
14602 +IFS=" "" $nl" | |
14603 + | |
14604 +# set DOITPROG to echo to test this script | |
14605 + | |
14606 +# Don't use :- since 4.3BSD and earlier shells don't like it. | |
14607 +doit=${DOITPROG-} | |
14608 +if test -z "$doit"; then | |
14609 + doit_exec=exec | |
14610 +else | |
14611 + doit_exec=$doit | |
14612 +fi | |
14613 + | |
14614 +# Put in absolute file names if you don't have them in your path; | |
14615 +# or use environment vars. | |
14616 + | |
14617 +chgrpprog=${CHGRPPROG-chgrp} | |
14618 +chmodprog=${CHMODPROG-chmod} | |
14619 +chownprog=${CHOWNPROG-chown} | |
14620 +cmpprog=${CMPPROG-cmp} | |
14621 +cpprog=${CPPROG-cp} | |
14622 +mkdirprog=${MKDIRPROG-mkdir} | |
14623 +mvprog=${MVPROG-mv} | |
14624 +rmprog=${RMPROG-rm} | |
14625 +stripprog=${STRIPPROG-strip} | |
14626 + | |
14627 +posix_glob='?' | |
14628 +initialize_posix_glob=' | |
14629 + test "$posix_glob" != "?" || { | |
14630 + if (set -f) 2>/dev/null; then | |
14631 + posix_glob= | |
14632 + else | |
14633 + posix_glob=: | |
14634 + fi | |
14635 + } | |
14636 +' | |
14637 + | |
14638 +posix_mkdir= | |
14639 + | |
14640 +# Desired mode of installed file. | |
14641 +mode=0755 | |
14642 + | |
14643 +chgrpcmd= | |
14644 +chmodcmd=$chmodprog | |
14645 +chowncmd= | |
14646 +mvcmd=$mvprog | |
14647 +rmcmd="$rmprog -f" | |
14648 +stripcmd= | |
14649 + | |
14650 +src= | |
14651 +dst= | |
14652 +dir_arg= | |
14653 +dst_arg= | |
14654 + | |
14655 +copy_on_change=false | |
14656 +no_target_directory= | |
14657 + | |
14658 +usage="\ | |
14659 +Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE | |
14660 + or: $0 [OPTION]... SRCFILES... DIRECTORY | |
14661 + or: $0 [OPTION]... -t DIRECTORY SRCFILES... | |
14662 + or: $0 [OPTION]... -d DIRECTORIES... | |
14663 + | |
14664 +In the 1st form, copy SRCFILE to DSTFILE. | |
14665 +In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. | |
14666 +In the 4th, create DIRECTORIES. | |
14667 + | |
14668 +Options: | |
14669 + --help display this help and exit. | |
14670 + --version display version info and exit. | |
14671 + | |
14672 + -c (ignored) | |
14673 + -C install only if different (preserve the last data modification time) | |
14674 + -d create directories instead of installing files. | |
14675 + -g GROUP $chgrpprog installed files to GROUP. | |
14676 + -m MODE $chmodprog installed files to MODE. | |
14677 + -o USER $chownprog installed files to USER. | |
14678 + -s $stripprog installed files. | |
14679 + -t DIRECTORY install into DIRECTORY. | |
14680 + -T report an error if DSTFILE is a directory. | |
14681 + | |
14682 +Environment variables override the default commands: | |
14683 + CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG | |
14684 + RMPROG STRIPPROG | |
14685 +" | |
14686 + | |
14687 +while test $# -ne 0; do | |
14688 + case $1 in | |
14689 + -c) ;; | |
14690 + | |
14691 + -C) copy_on_change=true;; | |
14692 + | |
14693 + -d) dir_arg=true;; | |
14694 + | |
14695 + -g) chgrpcmd="$chgrpprog $2" | |
14696 + shift;; | |
14697 + | |
14698 + --help) echo "$usage"; exit $?;; | |
14699 + | |
14700 + -m) mode=$2 | |
14701 + case $mode in | |
14702 + *' '* | *' '* | *' | |
14703 +'* | *'*'* | *'?'* | *'['*) | |
14704 + echo "$0: invalid mode: $mode" >&2 | |
14705 + exit 1;; | |
14706 + esac | |
14707 + shift;; | |
14708 + | |
14709 + -o) chowncmd="$chownprog $2" | |
14710 + shift;; | |
14711 + | |
14712 + -s) stripcmd=$stripprog;; | |
14713 + | |
14714 + -t) dst_arg=$2 | |
14715 + # Protect names problematic for 'test' and other utilities. | |
14716 + case $dst_arg in | |
14717 + -* | [=\(\)!]) dst_arg=./$dst_arg;; | |
14718 + esac | |
14719 + shift;; | |
14720 + | |
14721 + -T) no_target_directory=true;; | |
14722 + | |
14723 + --version) echo "$0 $scriptversion"; exit $?;; | |
14724 + | |
14725 + --) shift | |
14726 + break;; | |
14727 + | |
14728 + -*) echo "$0: invalid option: $1" >&2 | |
14729 + exit 1;; | |
14730 + | |
14731 + *) break;; | |
14732 + esac | |
14733 + shift | |
14734 +done | |
14735 + | |
14736 +if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then | |
14737 + # When -d is used, all remaining arguments are directories to create. | |
14738 + # When -t is used, the destination is already specified. | |
14739 + # Otherwise, the last argument is the destination. Remove it from $@. | |
14740 + for arg | |
14741 + do | |
14742 + if test -n "$dst_arg"; then | |
14743 + # $@ is not empty: it contains at least $arg. | |
14744 + set fnord "$@" "$dst_arg" | |
14745 + shift # fnord | |
14746 + fi | |
14747 + shift # arg | |
14748 + dst_arg=$arg | |
14749 + # Protect names problematic for 'test' and other utilities. | |
14750 + case $dst_arg in | |
14751 + -* | [=\(\)!]) dst_arg=./$dst_arg;; | |
14752 + esac | |
14753 + done | |
14754 +fi | |
14755 + | |
14756 +if test $# -eq 0; then | |
14757 + if test -z "$dir_arg"; then | |
14758 + echo "$0: no input file specified." >&2 | |
14759 + exit 1 | |
14760 + fi | |
14761 + # It's OK to call 'install-sh -d' without argument. | |
14762 + # This can happen when creating conditional directories. | |
14763 + exit 0 | |
14764 +fi | |
14765 + | |
14766 +if test -z "$dir_arg"; then | |
14767 + do_exit='(exit $ret); exit $ret' | |
14768 + trap "ret=129; $do_exit" 1 | |
14769 + trap "ret=130; $do_exit" 2 | |
14770 + trap "ret=141; $do_exit" 13 | |
14771 + trap "ret=143; $do_exit" 15 | |
14772 + | |
14773 + # Set umask so as not to create temps with too-generous modes. | |
14774 + # However, 'strip' requires both read and write access to temps. | |
14775 + case $mode in | |
14776 + # Optimize common cases. | |
14777 + *644) cp_umask=133;; | |
14778 + *755) cp_umask=22;; | |
14779 + | |
14780 + *[0-7]) | |
14781 + if test -z "$stripcmd"; then | |
14782 + u_plus_rw= | |
14783 + else | |
14784 + u_plus_rw='% 200' | |
14785 + fi | |
14786 + cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; | |
14787 + *) | |
14788 + if test -z "$stripcmd"; then | |
14789 + u_plus_rw= | |
14790 + else | |
14791 + u_plus_rw=,u+rw | |
14792 + fi | |
14793 + cp_umask=$mode$u_plus_rw;; | |
14794 + esac | |
14795 +fi | |
14796 + | |
14797 +for src | |
14798 +do | |
14799 + # Protect names problematic for 'test' and other utilities. | |
14800 + case $src in | |
14801 + -* | [=\(\)!]) src=./$src;; | |
14802 + esac | |
14803 + | |
14804 + if test -n "$dir_arg"; then | |
14805 + dst=$src | |
14806 + dstdir=$dst | |
14807 + test -d "$dstdir" | |
14808 + dstdir_status=$? | |
14809 + else | |
14810 + | |
14811 + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command | |
14812 + # might cause directories to be created, which would be especially bad | |
14813 + # if $src (and thus $dsttmp) contains '*'. | |
14814 + if test ! -f "$src" && test ! -d "$src"; then | |
14815 + echo "$0: $src does not exist." >&2 | |
14816 + exit 1 | |
14817 + fi | |
14818 + | |
14819 + if test -z "$dst_arg"; then | |
14820 + echo "$0: no destination specified." >&2 | |
14821 + exit 1 | |
14822 + fi | |
14823 + dst=$dst_arg | |
14824 + | |
14825 + # If destination is a directory, append the input filename; won't work | |
14826 + # if double slashes aren't ignored. | |
14827 + if test -d "$dst"; then | |
14828 + if test -n "$no_target_directory"; then | |
14829 + echo "$0: $dst_arg: Is a directory" >&2 | |
14830 + exit 1 | |
14831 + fi | |
14832 + dstdir=$dst | |
14833 + dst=$dstdir/`basename "$src"` | |
14834 + dstdir_status=0 | |
14835 + else | |
14836 + # Prefer dirname, but fall back on a substitute if dirname fails. | |
14837 + dstdir=` | |
14838 + (dirname "$dst") 2>/dev/null || | |
14839 + expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
14840 + X"$dst" : 'X\(//\)[^/]' \| \ | |
14841 + X"$dst" : 'X\(//\)$' \| \ | |
14842 + X"$dst" : 'X\(/\)' \| . 2>/dev/null || | |
14843 + echo X"$dst" | | |
14844 + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
14845 + s//\1/ | |
14846 + q | |
14847 + } | |
14848 + /^X\(\/\/\)[^/].*/{ | |
14849 + s//\1/ | |
14850 + q | |
14851 + } | |
14852 + /^X\(\/\/\)$/{ | |
14853 + s//\1/ | |
14854 + q | |
14855 + } | |
14856 + /^X\(\/\).*/{ | |
14857 + s//\1/ | |
14858 + q | |
14859 + } | |
14860 + s/.*/./; q' | |
14861 + ` | |
14862 + | |
14863 + test -d "$dstdir" | |
14864 + dstdir_status=$? | |
14865 + fi | |
14866 + fi | |
14867 + | |
14868 + obsolete_mkdir_used=false | |
14869 + | |
14870 + if test $dstdir_status != 0; then | |
14871 + case $posix_mkdir in | |
14872 + '') | |
14873 + # Create intermediate dirs using mode 755 as modified by the umask. | |
14874 + # This is like FreeBSD 'install' as of 1997-10-28. | |
14875 + umask=`umask` | |
14876 + case $stripcmd.$umask in | |
14877 + # Optimize common cases. | |
14878 + *[2367][2367]) mkdir_umask=$umask;; | |
14879 + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; | |
14880 + | |
14881 + *[0-7]) | |
14882 + mkdir_umask=`expr $umask + 22 \ | |
14883 + - $umask % 100 % 40 + $umask % 20 \ | |
14884 + - $umask % 10 % 4 + $umask % 2 | |
14885 + `;; | |
14886 + *) mkdir_umask=$umask,go-w;; | |
14887 + esac | |
14888 + | |
14889 + # With -d, create the new directory with the user-specified mode. | |
14890 + # Otherwise, rely on $mkdir_umask. | |
14891 + if test -n "$dir_arg"; then | |
14892 + mkdir_mode=-m$mode | |
14893 + else | |
14894 + mkdir_mode= | |
14895 + fi | |
14896 + | |
14897 + posix_mkdir=false | |
14898 + case $umask in | |
14899 + *[123567][0-7][0-7]) | |
14900 + # POSIX mkdir -p sets u+wx bits regardless of umask, which | |
14901 + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. | |
14902 + ;; | |
14903 + *) | |
14904 + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ | |
14905 + trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 | |
14906 + | |
14907 + if (umask $mkdir_umask && | |
14908 + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 | |
14909 + then | |
14910 + if test -z "$dir_arg" || { | |
14911 + # Check for POSIX incompatibilities with -m. | |
14912 + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or | |
14913 + # other-writable bit of parent directory when it shouldn't. | |
14914 + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. | |
14915 + ls_ld_tmpdir=`ls -ld "$tmpdir"` | |
14916 + case $ls_ld_tmpdir in | |
14917 + d????-?r-*) different_mode=700;; | |
14918 + d????-?--*) different_mode=755;; | |
14919 + *) false;; | |
14920 + esac && | |
14921 + $mkdirprog -m$different_mode -p -- "$tmpdir" && { | |
14922 + ls_ld_tmpdir_1=`ls -ld "$tmpdir"` | |
14923 + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" | |
14924 + } | |
14925 + } | |
14926 + then posix_mkdir=: | |
14927 + fi | |
14928 + rmdir "$tmpdir/d" "$tmpdir" | |
14929 + else | |
14930 + # Remove any dirs left behind by ancient mkdir implementations. | |
14931 + rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null | |
14932 + fi | |
14933 + trap '' 0;; | |
14934 + esac;; | |
14935 + esac | |
14936 + | |
14937 + if | |
14938 + $posix_mkdir && ( | |
14939 + umask $mkdir_umask && | |
14940 + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" | |
14941 + ) | |
14942 + then : | |
14943 + else | |
14944 + | |
14945 + # The umask is ridiculous, or mkdir does not conform to POSIX, | |
14946 + # or it failed possibly due to a race condition. Create the | |
14947 + # directory the slow way, step by step, checking for races as we go. | |
14948 + | |
14949 + case $dstdir in | |
14950 + /*) prefix='/';; | |
14951 + [-=\(\)!]*) prefix='./';; | |
14952 + *) prefix='';; | |
14953 + esac | |
14954 + | |
14955 + eval "$initialize_posix_glob" | |
14956 + | |
14957 + oIFS=$IFS | |
14958 + IFS=/ | |
14959 + $posix_glob set -f | |
14960 + set fnord $dstdir | |
14961 + shift | |
14962 + $posix_glob set +f | |
14963 + IFS=$oIFS | |
14964 + | |
14965 + prefixes= | |
14966 + | |
14967 + for d | |
14968 + do | |
14969 + test X"$d" = X && continue | |
14970 + | |
14971 + prefix=$prefix$d | |
14972 + if test -d "$prefix"; then | |
14973 + prefixes= | |
14974 + else | |
14975 + if $posix_mkdir; then | |
14976 + (umask=$mkdir_umask && | |
14977 + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break | |
14978 + # Don't fail if two instances are running concurrently. | |
14979 + test -d "$prefix" || exit 1 | |
14980 + else | |
14981 + case $prefix in | |
14982 + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; | |
14983 + *) qprefix=$prefix;; | |
14984 + esac | |
14985 + prefixes="$prefixes '$qprefix'" | |
14986 + fi | |
14987 + fi | |
14988 + prefix=$prefix/ | |
14989 + done | |
14990 + | |
14991 + if test -n "$prefixes"; then | |
14992 + # Don't fail if two instances are running concurrently. | |
14993 + (umask $mkdir_umask && | |
14994 + eval "\$doit_exec \$mkdirprog $prefixes") || | |
14995 + test -d "$dstdir" || exit 1 | |
14996 + obsolete_mkdir_used=true | |
14997 + fi | |
14998 + fi | |
14999 + fi | |
15000 + | |
15001 + if test -n "$dir_arg"; then | |
15002 + { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && | |
15003 + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && | |
15004 + { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || | |
15005 + test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 | |
15006 + else | |
15007 + | |
15008 + # Make a couple of temp file names in the proper directory. | |
15009 + dsttmp=$dstdir/_inst.$$_ | |
15010 + rmtmp=$dstdir/_rm.$$_ | |
15011 + | |
15012 + # Trap to clean up those temp files at exit. | |
15013 + trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 | |
15014 + | |
15015 + # Copy the file name to the temp name. | |
15016 + (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && | |
15017 + | |
15018 + # and set any options; do chmod last to preserve setuid bits. | |
15019 + # | |
15020 + # If any of these fail, we abort the whole thing. If we want to | |
15021 + # ignore errors from any of these, just make sure not to ignore | |
15022 + # errors from the above "$doit $cpprog $src $dsttmp" command. | |
15023 + # | |
15024 + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && | |
15025 + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && | |
15026 + { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && | |
15027 + { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && | |
15028 + | |
15029 + # If -C, don't bother to copy if it wouldn't change the file. | |
15030 + if $copy_on_change && | |
15031 + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && | |
15032 + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && | |
15033 + | |
15034 + eval "$initialize_posix_glob" && | |
15035 + $posix_glob set -f && | |
15036 + set X $old && old=:$2:$4:$5:$6 && | |
15037 + set X $new && new=:$2:$4:$5:$6 && | |
15038 + $posix_glob set +f && | |
15039 + | |
15040 + test "$old" = "$new" && | |
15041 + $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 | |
15042 + then | |
15043 + rm -f "$dsttmp" | |
15044 + else | |
15045 + # Rename the file to the real destination. | |
15046 + $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || | |
15047 + | |
15048 + # The rename failed, perhaps because mv can't rename something else | |
15049 + # to itself, or perhaps because mv is so ancient that it does not | |
15050 + # support -f. | |
15051 + { | |
15052 + # Now remove or move aside any old file at destination location. | |
15053 + # We try this two ways since rm can't unlink itself on some | |
15054 + # systems and the destination file might be busy for other | |
15055 + # reasons. In this case, the final cleanup might fail but the new | |
15056 + # file should still install successfully. | |
15057 + { | |
15058 + test ! -f "$dst" || | |
15059 + $doit $rmcmd -f "$dst" 2>/dev/null || | |
15060 + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && | |
15061 + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } | |
15062 + } || | |
15063 + { echo "$0: cannot unlink or rename $dst" >&2 | |
15064 + (exit 1); exit 1 | |
15065 + } | |
15066 + } && | |
15067 + | |
15068 + # Now rename the file to the real destination. | |
15069 + $doit $mvcmd "$dsttmp" "$dst" | |
15070 + } | |
15071 + fi || exit 1 | |
15072 + | |
15073 + trap '' 0 | |
15074 + fi | |
15075 +done | |
15076 + | |
15077 +# Local variables: | |
15078 +# eval: (add-hook 'write-file-hooks 'time-stamp) | |
15079 +# time-stamp-start: "scriptversion=" | |
15080 +# time-stamp-format: "%:y-%02m-%02d.%02H" | |
15081 +# time-stamp-time-zone: "UTC" | |
15082 +# time-stamp-end: "; # UTC" | |
15083 +# End: | |
15084 diff -uNr a/ltmain.sh b/ltmain.sh | |
15085 --- a/ltmain.sh 1969-12-31 19:00:00.000000000 -0500 | |
15086 +++ b/ltmain.sh 2014-12-12 15:22:32.314086261 -0500 | |
15087 @@ -0,0 +1,9661 @@ | |
15088 + | |
15089 +# libtool (GNU libtool) 2.4.2 | |
15090 +# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 | |
15091 + | |
15092 +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, | |
15093 +# 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. | |
15094 +# This is free software; see the source for copying conditions. There is NO | |
15095 +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
15096 + | |
15097 +# GNU Libtool is free software; you can redistribute it and/or modify | |
15098 +# it under the terms of the GNU General Public License as published by | |
15099 +# the Free Software Foundation; either version 2 of the License, or | |
15100 +# (at your option) any later version. | |
15101 +# | |
15102 +# As a special exception to the GNU General Public License, | |
15103 +# if you distribute this file as part of a program or library that | |
15104 +# is built using GNU Libtool, you may include this file under the | |
15105 +# same distribution terms that you use for the rest of that program. | |
15106 +# | |
15107 +# GNU Libtool is distributed in the hope that it will be useful, but | |
15108 +# WITHOUT ANY WARRANTY; without even the implied warranty of | |
15109 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
15110 +# General Public License for more details. | |
15111 +# | |
15112 +# You should have received a copy of the GNU General Public License | |
15113 +# along with GNU Libtool; see the file COPYING. If not, a copy | |
15114 +# can be downloaded from http://www.gnu.org/licenses/gpl.html, | |
15115 +# or obtained by writing to the Free Software Foundation, Inc., | |
15116 +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |
15117 + | |
15118 +# Usage: $progname [OPTION]... [MODE-ARG]... | |
15119 +# | |
15120 +# Provide generalized library-building support services. | |
15121 +# | |
15122 +# --config show all configuration variables | |
15123 +# --debug enable verbose shell tracing | |
15124 +# -n, --dry-run display commands without modifying any files | |
15125 +# --features display basic configuration information and exit | |
15126 +# --mode=MODE use operation mode MODE | |
15127 +# --preserve-dup-deps don't remove duplicate dependency libraries | |
15128 +# --quiet, --silent don't print informational messages | |
15129 +# --no-quiet, --no-silent | |
15130 +# print informational messages (default) | |
15131 +# --no-warn don't display warning messages | |
15132 +# --tag=TAG use configuration variables from tag TAG | |
15133 +# -v, --verbose print more informational messages than default | |
15134 +# --no-verbose don't print the extra informational messages | |
15135 +# --version print version information | |
15136 +# -h, --help, --help-all print short, long, or detailed help message | |
15137 +# | |
15138 +# MODE must be one of the following: | |
15139 +# | |
15140 +# clean remove files from the build directory | |
15141 +# compile compile a source file into a libtool object | |
15142 +# execute automatically set library path, then run a program | |
15143 +# finish complete the installation of libtool libraries | |
15144 +# install install libraries or executables | |
15145 +# link create a library or an executable | |
15146 +# uninstall remove libraries from an installed directory | |
15147 +# | |
15148 +# MODE-ARGS vary depending on the MODE. When passed as first option, | |
15149 +# `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. | |
15150 +# Try `$progname --help --mode=MODE' for a more detailed description of MODE. | |
15151 +# | |
15152 +# When reporting a bug, please describe a test case to reproduce it and | |
15153 +# include the following information: | |
15154 +# | |
15155 +# host-triplet: $host | |
15156 +# shell: $SHELL | |
15157 +# compiler: $LTCC | |
15158 +# compiler flags: $LTCFLAGS | |
15159 +# linker: $LD (gnu? $with_gnu_ld) | |
15160 +# $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1.11 | |
15161 +# automake: $automake_version | |
15162 +# autoconf: $autoconf_version | |
15163 +# | |
15164 +# Report bugs to <bug-libtool@gnu.org>. | |
15165 +# GNU libtool home page: <http://www.gnu.org/software/libtool/>. | |
15166 +# General help using GNU software: <http://www.gnu.org/gethelp/>. | |
15167 + | |
15168 +PROGRAM=libtool | |
15169 +PACKAGE=libtool | |
15170 +VERSION="2.4.2 Debian-2.4.2-1.11" | |
15171 +TIMESTAMP="" | |
15172 +package_revision=1.3337 | |
15173 + | |
15174 +# Be Bourne compatible | |
15175 +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then | |
15176 + emulate sh | |
15177 + NULLCMD=: | |
15178 + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which | |
15179 + # is contrary to our usage. Disable this feature. | |
15180 + alias -g '${1+"$@"}'='"$@"' | |
15181 + setopt NO_GLOB_SUBST | |
15182 +else | |
15183 + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac | |
15184 +fi | |
15185 +BIN_SH=xpg4; export BIN_SH # for Tru64 | |
15186 +DUALCASE=1; export DUALCASE # for MKS sh | |
15187 + | |
15188 +# A function that is used when there is no print builtin or printf. | |
15189 +func_fallback_echo () | |
15190 +{ | |
15191 + eval 'cat <<_LTECHO_EOF | |
15192 +$1 | |
15193 +_LTECHO_EOF' | |
15194 +} | |
15195 + | |
15196 +# NLS nuisances: We save the old values to restore during execute mode. | |
15197 +lt_user_locale= | |
15198 +lt_safe_locale= | |
15199 +for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES | |
15200 +do | |
15201 + eval "if test \"\${$lt_var+set}\" = set; then | |
15202 + save_$lt_var=\$$lt_var | |
15203 + $lt_var=C | |
15204 + export $lt_var | |
15205 + lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" | |
15206 + lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" | |
15207 + fi" | |
15208 +done | |
15209 +LC_ALL=C | |
15210 +LANGUAGE=C | |
15211 +export LANGUAGE LC_ALL | |
15212 + | |
15213 +$lt_unset CDPATH | |
15214 + | |
15215 + | |
15216 +# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh | |
15217 +# is ksh but when the shell is invoked as "sh" and the current value of | |
15218 +# the _XPG environment variable is not equal to 1 (one), the special | |
15219 +# positional parameter $0, within a function call, is the name of the | |
15220 +# function. | |
15221 +progpath="$0" | |
15222 + | |
15223 + | |
15224 + | |
15225 +: ${CP="cp -f"} | |
15226 +test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} | |
15227 +: ${MAKE="make"} | |
15228 +: ${MKDIR="mkdir"} | |
15229 +: ${MV="mv -f"} | |
15230 +: ${RM="rm -f"} | |
15231 +: ${SHELL="${CONFIG_SHELL-/bin/sh}"} | |
15232 +: ${Xsed="$SED -e 1s/^X//"} | |
15233 + | |
15234 +# Global variables: | |
15235 +EXIT_SUCCESS=0 | |
15236 +EXIT_FAILURE=1 | |
15237 +EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. | |
15238 +EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. | |
15239 + | |
15240 +exit_status=$EXIT_SUCCESS | |
15241 + | |
15242 +# Make sure IFS has a sensible default | |
15243 +lt_nl=' | |
15244 +' | |
15245 +IFS=" $lt_nl" | |
15246 + | |
15247 +dirname="s,/[^/]*$,," | |
15248 +basename="s,^.*/,," | |
15249 + | |
15250 +# func_dirname file append nondir_replacement | |
15251 +# Compute the dirname of FILE. If nonempty, add APPEND to the result, | |
15252 +# otherwise set result to NONDIR_REPLACEMENT. | |
15253 +func_dirname () | |
15254 +{ | |
15255 + func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` | |
15256 + if test "X$func_dirname_result" = "X${1}"; then | |
15257 + func_dirname_result="${3}" | |
15258 + else | |
15259 + func_dirname_result="$func_dirname_result${2}" | |
15260 + fi | |
15261 +} # func_dirname may be replaced by extended shell implementation | |
15262 + | |
15263 + | |
15264 +# func_basename file | |
15265 +func_basename () | |
15266 +{ | |
15267 + func_basename_result=`$ECHO "${1}" | $SED "$basename"` | |
15268 +} # func_basename may be replaced by extended shell implementation | |
15269 + | |
15270 + | |
15271 +# func_dirname_and_basename file append nondir_replacement | |
15272 +# perform func_basename and func_dirname in a single function | |
15273 +# call: | |
15274 +# dirname: Compute the dirname of FILE. If nonempty, | |
15275 +# add APPEND to the result, otherwise set result | |
15276 +# to NONDIR_REPLACEMENT. | |
15277 +# value returned in "$func_dirname_result" | |
15278 +# basename: Compute filename of FILE. | |
15279 +# value retuned in "$func_basename_result" | |
15280 +# Implementation must be kept synchronized with func_dirname | |
15281 +# and func_basename. For efficiency, we do not delegate to | |
15282 +# those functions but instead duplicate the functionality here. | |
15283 +func_dirname_and_basename () | |
15284 +{ | |
15285 + # Extract subdirectory from the argument. | |
15286 + func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` | |
15287 + if test "X$func_dirname_result" = "X${1}"; then | |
15288 + func_dirname_result="${3}" | |
15289 + else | |
15290 + func_dirname_result="$func_dirname_result${2}" | |
15291 + fi | |
15292 + func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` | |
15293 +} # func_dirname_and_basename may be replaced by extended shell implementation | |
15294 + | |
15295 + | |
15296 +# func_stripname prefix suffix name | |
15297 +# strip PREFIX and SUFFIX off of NAME. | |
15298 +# PREFIX and SUFFIX must not contain globbing or regex special | |
15299 +# characters, hashes, percent signs, but SUFFIX may contain a leading | |
15300 +# dot (in which case that matches only a dot). | |
15301 +# func_strip_suffix prefix name | |
15302 +func_stripname () | |
15303 +{ | |
15304 + case ${2} in | |
15305 + .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; | |
15306 + *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; | |
15307 + esac | |
15308 +} # func_stripname may be replaced by extended shell implementation | |
15309 + | |
15310 + | |
15311 +# These SED scripts presuppose an absolute path with a trailing slash. | |
15312 +pathcar='s,^/\([^/]*\).*$,\1,' | |
15313 +pathcdr='s,^/[^/]*,,' | |
15314 +removedotparts=':dotsl | |
15315 + s@/\./@/@g | |
15316 + t dotsl | |
15317 + s,/\.$,/,' | |
15318 +collapseslashes='s@/\{1,\}@/@g' | |
15319 +finalslash='s,/*$,/,' | |
15320 + | |
15321 +# func_normal_abspath PATH | |
15322 +# Remove doubled-up and trailing slashes, "." path components, | |
15323 +# and cancel out any ".." path components in PATH after making | |
15324 +# it an absolute path. | |
15325 +# value returned in "$func_normal_abspath_result" | |
15326 +func_normal_abspath () | |
15327 +{ | |
15328 + # Start from root dir and reassemble the path. | |
15329 + func_normal_abspath_result= | |
15330 + func_normal_abspath_tpath=$1 | |
15331 + func_normal_abspath_altnamespace= | |
15332 + case $func_normal_abspath_tpath in | |
15333 + "") | |
15334 + # Empty path, that just means $cwd. | |
15335 + func_stripname '' '/' "`pwd`" | |
15336 + func_normal_abspath_result=$func_stripname_result | |
15337 + return | |
15338 + ;; | |
15339 + # The next three entries are used to spot a run of precisely | |
15340 + # two leading slashes without using negated character classes; | |
15341 + # we take advantage of case's first-match behaviour. | |
15342 + ///*) | |
15343 + # Unusual form of absolute path, do nothing. | |
15344 + ;; | |
15345 + //*) | |
15346 + # Not necessarily an ordinary path; POSIX reserves leading '//' | |
15347 + # and for example Cygwin uses it to access remote file shares | |
15348 + # over CIFS/SMB, so we conserve a leading double slash if found. | |
15349 + func_normal_abspath_altnamespace=/ | |
15350 + ;; | |
15351 + /*) | |
15352 + # Absolute path, do nothing. | |
15353 + ;; | |
15354 + *) | |
15355 + # Relative path, prepend $cwd. | |
15356 + func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath | |
15357 + ;; | |
15358 + esac | |
15359 + # Cancel out all the simple stuff to save iterations. We also want | |
15360 + # the path to end with a slash for ease of parsing, so make sure | |
15361 + # there is one (and only one) here. | |
15362 + func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ | |
15363 + -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"` | |
15364 + while :; do | |
15365 + # Processed it all yet? | |
15366 + if test "$func_normal_abspath_tpath" = / ; then | |
15367 + # If we ascended to the root using ".." the result may be empty now. | |
15368 + if test -z "$func_normal_abspath_result" ; then | |
15369 + func_normal_abspath_result=/ | |
15370 + fi | |
15371 + break | |
15372 + fi | |
15373 + func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ | |
15374 + -e "$pathcar"` | |
15375 + func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ | |
15376 + -e "$pathcdr"` | |
15377 + # Figure out what to do with it | |
15378 + case $func_normal_abspath_tcomponent in | |
15379 + "") | |
15380 + # Trailing empty path component, ignore it. | |
15381 + ;; | |
15382 + ..) | |
15383 + # Parent dir; strip last assembled component from result. | |
15384 + func_dirname "$func_normal_abspath_result" | |
15385 + func_normal_abspath_result=$func_dirname_result | |
15386 + ;; | |
15387 + *) | |
15388 + # Actual path component, append it. | |
15389 + func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent | |
15390 + ;; | |
15391 + esac | |
15392 + done | |
15393 + # Restore leading double-slash if one was found on entry. | |
15394 + func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result | |
15395 +} | |
15396 + | |
15397 +# func_relative_path SRCDIR DSTDIR | |
15398 +# generates a relative path from SRCDIR to DSTDIR, with a trailing | |
15399 +# slash if non-empty, suitable for immediately appending a filename | |
15400 +# without needing to append a separator. | |
15401 +# value returned in "$func_relative_path_result" | |
15402 +func_relative_path () | |
15403 +{ | |
15404 + func_relative_path_result= | |
15405 + func_normal_abspath "$1" | |
15406 + func_relative_path_tlibdir=$func_normal_abspath_result | |
15407 + func_normal_abspath "$2" | |
15408 + func_relative_path_tbindir=$func_normal_abspath_result | |
15409 + | |
15410 + # Ascend the tree starting from libdir | |
15411 + while :; do | |
15412 + # check if we have found a prefix of bindir | |
15413 + case $func_relative_path_tbindir in | |
15414 + $func_relative_path_tlibdir) | |
15415 + # found an exact match | |
15416 + func_relative_path_tcancelled= | |
15417 + break | |
15418 + ;; | |
15419 + $func_relative_path_tlibdir*) | |
15420 + # found a matching prefix | |
15421 + func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" | |
15422 + func_relative_path_tcancelled=$func_stripname_result | |
15423 + if test -z "$func_relative_path_result"; then | |
15424 + func_relative_path_result=. | |
15425 + fi | |
15426 + break | |
15427 + ;; | |
15428 + *) | |
15429 + func_dirname $func_relative_path_tlibdir | |
15430 + func_relative_path_tlibdir=${func_dirname_result} | |
15431 + if test "x$func_relative_path_tlibdir" = x ; then | |
15432 + # Have to descend all the way to the root! | |
15433 + func_relative_path_result=../$func_relative_path_result | |
15434 + func_relative_path_tcancelled=$func_relative_path_tbindir | |
15435 + break | |
15436 + fi | |
15437 + func_relative_path_result=../$func_relative_path_result | |
15438 + ;; | |
15439 + esac | |
15440 + done | |
15441 + | |
15442 + # Now calculate path; take care to avoid doubling-up slashes. | |
15443 + func_stripname '' '/' "$func_relative_path_result" | |
15444 + func_relative_path_result=$func_stripname_result | |
15445 + func_stripname '/' '/' "$func_relative_path_tcancelled" | |
15446 + if test "x$func_stripname_result" != x ; then | |
15447 + func_relative_path_result=${func_relative_path_result}/${func_stripname_result} | |
15448 + fi | |
15449 + | |
15450 + # Normalisation. If bindir is libdir, return empty string, | |
15451 + # else relative path ending with a slash; either way, target | |
15452 + # file name can be directly appended. | |
15453 + if test ! -z "$func_relative_path_result"; then | |
15454 + func_stripname './' '' "$func_relative_path_result/" | |
15455 + func_relative_path_result=$func_stripname_result | |
15456 + fi | |
15457 +} | |
15458 + | |
15459 +# The name of this program: | |
15460 +func_dirname_and_basename "$progpath" | |
15461 +progname=$func_basename_result | |
15462 + | |
15463 +# Make sure we have an absolute path for reexecution: | |
15464 +case $progpath in | |
15465 + [\\/]*|[A-Za-z]:\\*) ;; | |
15466 + *[\\/]*) | |
15467 + progdir=$func_dirname_result | |
15468 + progdir=`cd "$progdir" && pwd` | |
15469 + progpath="$progdir/$progname" | |
15470 + ;; | |
15471 + *) | |
15472 + save_IFS="$IFS" | |
15473 + IFS=${PATH_SEPARATOR-:} | |
15474 + for progdir in $PATH; do | |
15475 + IFS="$save_IFS" | |
15476 + test -x "$progdir/$progname" && break | |
15477 + done | |
15478 + IFS="$save_IFS" | |
15479 + test -n "$progdir" || progdir=`pwd` | |
15480 + progpath="$progdir/$progname" | |
15481 + ;; | |
15482 +esac | |
15483 + | |
15484 +# Sed substitution that helps us do robust quoting. It backslashifies | |
15485 +# metacharacters that are still active within double-quoted strings. | |
15486 +Xsed="${SED}"' -e 1s/^X//' | |
15487 +sed_quote_subst='s/\([`"$\\]\)/\\\1/g' | |
15488 + | |
15489 +# Same as above, but do not quote variable references. | |
15490 +double_quote_subst='s/\(["`\\]\)/\\\1/g' | |
15491 + | |
15492 +# Sed substitution that turns a string into a regex matching for the | |
15493 +# string literally. | |
15494 +sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' | |
15495 + | |
15496 +# Sed substitution that converts a w32 file name or path | |
15497 +# which contains forward slashes, into one that contains | |
15498 +# (escaped) backslashes. A very naive implementation. | |
15499 +lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' | |
15500 + | |
15501 +# Re-`\' parameter expansions in output of double_quote_subst that were | |
15502 +# `\'-ed in input to the same. If an odd number of `\' preceded a '$' | |
15503 +# in input to double_quote_subst, that '$' was protected from expansion. | |
15504 +# Since each input `\' is now two `\'s, look for any number of runs of | |
15505 +# four `\'s followed by two `\'s and then a '$'. `\' that '$'. | |
15506 +bs='\\' | |
15507 +bs2='\\\\' | |
15508 +bs4='\\\\\\\\' | |
15509 +dollar='\$' | |
15510 +sed_double_backslash="\ | |
15511 + s/$bs4/&\\ | |
15512 +/g | |
15513 + s/^$bs2$dollar/$bs&/ | |
15514 + s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g | |
15515 + s/\n//g" | |
15516 + | |
15517 +# Standard options: | |
15518 +opt_dry_run=false | |
15519 +opt_help=false | |
15520 +opt_quiet=false | |
15521 +opt_verbose=false | |
15522 +opt_warning=: | |
15523 + | |
15524 +# func_echo arg... | |
15525 +# Echo program name prefixed message, along with the current mode | |
15526 +# name if it has been set yet. | |
15527 +func_echo () | |
15528 +{ | |
15529 + $ECHO "$progname: ${opt_mode+$opt_mode: }$*" | |
15530 +} | |
15531 + | |
15532 +# func_verbose arg... | |
15533 +# Echo program name prefixed message in verbose mode only. | |
15534 +func_verbose () | |
15535 +{ | |
15536 + $opt_verbose && func_echo ${1+"$@"} | |
15537 + | |
15538 + # A bug in bash halts the script if the last line of a function | |
15539 + # fails when set -e is in force, so we need another command to | |
15540 + # work around that: | |
15541 + : | |
15542 +} | |
15543 + | |
15544 +# func_echo_all arg... | |
15545 +# Invoke $ECHO with all args, space-separated. | |
15546 +func_echo_all () | |
15547 +{ | |
15548 + $ECHO "$*" | |
15549 +} | |
15550 + | |
15551 +# func_error arg... | |
15552 +# Echo program name prefixed message to standard error. | |
15553 +func_error () | |
15554 +{ | |
15555 + $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 | |
15556 +} | |
15557 + | |
15558 +# func_warning arg... | |
15559 +# Echo program name prefixed warning message to standard error. | |
15560 +func_warning () | |
15561 +{ | |
15562 + $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 | |
15563 + | |
15564 + # bash bug again: | |
15565 + : | |
15566 +} | |
15567 + | |
15568 +# func_fatal_error arg... | |
15569 +# Echo program name prefixed message to standard error, and exit. | |
15570 +func_fatal_error () | |
15571 +{ | |
15572 + func_error ${1+"$@"} | |
15573 + exit $EXIT_FAILURE | |
15574 +} | |
15575 + | |
15576 +# func_fatal_help arg... | |
15577 +# Echo program name prefixed message to standard error, followed by | |
15578 +# a help hint, and exit. | |
15579 +func_fatal_help () | |
15580 +{ | |
15581 + func_error ${1+"$@"} | |
15582 + func_fatal_error "$help" | |
15583 +} | |
15584 +help="Try \`$progname --help' for more information." ## default | |
15585 + | |
15586 + | |
15587 +# func_grep expression filename | |
15588 +# Check whether EXPRESSION matches any line of FILENAME, without output. | |
15589 +func_grep () | |
15590 +{ | |
15591 + $GREP "$1" "$2" >/dev/null 2>&1 | |
15592 +} | |
15593 + | |
15594 + | |
15595 +# func_mkdir_p directory-path | |
15596 +# Make sure the entire path to DIRECTORY-PATH is available. | |
15597 +func_mkdir_p () | |
15598 +{ | |
15599 + my_directory_path="$1" | |
15600 + my_dir_list= | |
15601 + | |
15602 + if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then | |
15603 + | |
15604 + # Protect directory names starting with `-' | |
15605 + case $my_directory_path in | |
15606 + -*) my_directory_path="./$my_directory_path" ;; | |
15607 + esac | |
15608 + | |
15609 + # While some portion of DIR does not yet exist... | |
15610 + while test ! -d "$my_directory_path"; do | |
15611 + # ...make a list in topmost first order. Use a colon delimited | |
15612 + # list incase some portion of path contains whitespace. | |
15613 + my_dir_list="$my_directory_path:$my_dir_list" | |
15614 + | |
15615 + # If the last portion added has no slash in it, the list is done | |
15616 + case $my_directory_path in */*) ;; *) break ;; esac | |
15617 + | |
15618 + # ...otherwise throw away the child directory and loop | |
15619 + my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` | |
15620 + done | |
15621 + my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` | |
15622 + | |
15623 + save_mkdir_p_IFS="$IFS"; IFS=':' | |
15624 + for my_dir in $my_dir_list; do | |
15625 + IFS="$save_mkdir_p_IFS" | |
15626 + # mkdir can fail with a `File exist' error if two processes | |
15627 + # try to create one of the directories concurrently. Don't | |
15628 + # stop in that case! | |
15629 + $MKDIR "$my_dir" 2>/dev/null || : | |
15630 + done | |
15631 + IFS="$save_mkdir_p_IFS" | |
15632 + | |
15633 + # Bail out if we (or some other process) failed to create a directory. | |
15634 + test -d "$my_directory_path" || \ | |
15635 + func_fatal_error "Failed to create \`$1'" | |
15636 + fi | |
15637 +} | |
15638 + | |
15639 + | |
15640 +# func_mktempdir [string] | |
15641 +# Make a temporary directory that won't clash with other running | |
15642 +# libtool processes, and avoids race conditions if possible. If | |
15643 +# given, STRING is the basename for that directory. | |
15644 +func_mktempdir () | |
15645 +{ | |
15646 + my_template="${TMPDIR-/tmp}/${1-$progname}" | |
15647 + | |
15648 + if test "$opt_dry_run" = ":"; then | |
15649 + # Return a directory name, but don't create it in dry-run mode | |
15650 + my_tmpdir="${my_template}-$$" | |
15651 + else | |
15652 + | |
15653 + # If mktemp works, use that first and foremost | |
15654 + my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` | |
15655 + | |
15656 + if test ! -d "$my_tmpdir"; then | |
15657 + # Failing that, at least try and use $RANDOM to avoid a race | |
15658 + my_tmpdir="${my_template}-${RANDOM-0}$$" | |
15659 + | |
15660 + save_mktempdir_umask=`umask` | |
15661 + umask 0077 | |
15662 + $MKDIR "$my_tmpdir" | |
15663 + umask $save_mktempdir_umask | |
15664 + fi | |
15665 + | |
15666 + # If we're not in dry-run mode, bomb out on failure | |
15667 + test -d "$my_tmpdir" || \ | |
15668 + func_fatal_error "cannot create temporary directory \`$my_tmpdir'" | |
15669 + fi | |
15670 + | |
15671 + $ECHO "$my_tmpdir" | |
15672 +} | |
15673 + | |
15674 + | |
15675 +# func_quote_for_eval arg | |
15676 +# Aesthetically quote ARG to be evaled later. | |
15677 +# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT | |
15678 +# is double-quoted, suitable for a subsequent eval, whereas | |
15679 +# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters | |
15680 +# which are still active within double quotes backslashified. | |
15681 +func_quote_for_eval () | |
15682 +{ | |
15683 + case $1 in | |
15684 + *[\\\`\"\$]*) | |
15685 + func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; | |
15686 + *) | |
15687 + func_quote_for_eval_unquoted_result="$1" ;; | |
15688 + esac | |
15689 + | |
15690 + case $func_quote_for_eval_unquoted_result in | |
15691 + # Double-quote args containing shell metacharacters to delay | |
15692 + # word splitting, command substitution and and variable | |
15693 + # expansion for a subsequent eval. | |
15694 + # Many Bourne shells cannot handle close brackets correctly | |
15695 + # in scan sets, so we specify it separately. | |
15696 + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") | |
15697 + func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" | |
15698 + ;; | |
15699 + *) | |
15700 + func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" | |
15701 + esac | |
15702 +} | |
15703 + | |
15704 + | |
15705 +# func_quote_for_expand arg | |
15706 +# Aesthetically quote ARG to be evaled later; same as above, | |
15707 +# but do not quote variable references. | |
15708 +func_quote_for_expand () | |
15709 +{ | |
15710 + case $1 in | |
15711 + *[\\\`\"]*) | |
15712 + my_arg=`$ECHO "$1" | $SED \ | |
15713 + -e "$double_quote_subst" -e "$sed_double_backslash"` ;; | |
15714 + *) | |
15715 + my_arg="$1" ;; | |
15716 + esac | |
15717 + | |
15718 + case $my_arg in | |
15719 + # Double-quote args containing shell metacharacters to delay | |
15720 + # word splitting and command substitution for a subsequent eval. | |
15721 + # Many Bourne shells cannot handle close brackets correctly | |
15722 + # in scan sets, so we specify it separately. | |
15723 + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") | |
15724 + my_arg="\"$my_arg\"" | |
15725 + ;; | |
15726 + esac | |
15727 + | |
15728 + func_quote_for_expand_result="$my_arg" | |
15729 +} | |
15730 + | |
15731 + | |
15732 +# func_show_eval cmd [fail_exp] | |
15733 +# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is | |
15734 +# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP | |
15735 +# is given, then evaluate it. | |
15736 +func_show_eval () | |
15737 +{ | |
15738 + my_cmd="$1" | |
15739 + my_fail_exp="${2-:}" | |
15740 + | |
15741 + ${opt_silent-false} || { | |
15742 + func_quote_for_expand "$my_cmd" | |
15743 + eval "func_echo $func_quote_for_expand_result" | |
15744 + } | |
15745 + | |
15746 + if ${opt_dry_run-false}; then :; else | |
15747 + eval "$my_cmd" | |
15748 + my_status=$? | |
15749 + if test "$my_status" -eq 0; then :; else | |
15750 + eval "(exit $my_status); $my_fail_exp" | |
15751 + fi | |
15752 + fi | |
15753 +} | |
15754 + | |
15755 + | |
15756 +# func_show_eval_locale cmd [fail_exp] | |
15757 +# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is | |
15758 +# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP | |
15759 +# is given, then evaluate it. Use the saved locale for evaluation. | |
15760 +func_show_eval_locale () | |
15761 +{ | |
15762 + my_cmd="$1" | |
15763 + my_fail_exp="${2-:}" | |
15764 + | |
15765 + ${opt_silent-false} || { | |
15766 + func_quote_for_expand "$my_cmd" | |
15767 + eval "func_echo $func_quote_for_expand_result" | |
15768 + } | |
15769 + | |
15770 + if ${opt_dry_run-false}; then :; else | |
15771 + eval "$lt_user_locale | |
15772 + $my_cmd" | |
15773 + my_status=$? | |
15774 + eval "$lt_safe_locale" | |
15775 + if test "$my_status" -eq 0; then :; else | |
15776 + eval "(exit $my_status); $my_fail_exp" | |
15777 + fi | |
15778 + fi | |
15779 +} | |
15780 + | |
15781 +# func_tr_sh | |
15782 +# Turn $1 into a string suitable for a shell variable name. | |
15783 +# Result is stored in $func_tr_sh_result. All characters | |
15784 +# not in the set a-zA-Z0-9_ are replaced with '_'. Further, | |
15785 +# if $1 begins with a digit, a '_' is prepended as well. | |
15786 +func_tr_sh () | |
15787 +{ | |
15788 + case $1 in | |
15789 + [0-9]* | *[!a-zA-Z0-9_]*) | |
15790 + func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` | |
15791 + ;; | |
15792 + * ) | |
15793 + func_tr_sh_result=$1 | |
15794 + ;; | |
15795 + esac | |
15796 +} | |
15797 + | |
15798 + | |
15799 +# func_version | |
15800 +# Echo version message to standard output and exit. | |
15801 +func_version () | |
15802 +{ | |
15803 + $opt_debug | |
15804 + | |
15805 + $SED -n '/(C)/!b go | |
15806 + :more | |
15807 + /\./!{ | |
15808 + N | |
15809 + s/\n# / / | |
15810 + b more | |
15811 + } | |
15812 + :go | |
15813 + /^# '$PROGRAM' (GNU /,/# warranty; / { | |
15814 + s/^# // | |
15815 + s/^# *$// | |
15816 + s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ | |
15817 + p | |
15818 + }' < "$progpath" | |
15819 + exit $? | |
15820 +} | |
15821 + | |
15822 +# func_usage | |
15823 +# Echo short help message to standard output and exit. | |
15824 +func_usage () | |
15825 +{ | |
15826 + $opt_debug | |
15827 + | |
15828 + $SED -n '/^# Usage:/,/^# *.*--help/ { | |
15829 + s/^# // | |
15830 + s/^# *$// | |
15831 + s/\$progname/'$progname'/ | |
15832 + p | |
15833 + }' < "$progpath" | |
15834 + echo | |
15835 + $ECHO "run \`$progname --help | more' for full usage" | |
15836 + exit $? | |
15837 +} | |
15838 + | |
15839 +# func_help [NOEXIT] | |
15840 +# Echo long help message to standard output and exit, | |
15841 +# unless 'noexit' is passed as argument. | |
15842 +func_help () | |
15843 +{ | |
15844 + $opt_debug | |
15845 + | |
15846 + $SED -n '/^# Usage:/,/# Report bugs to/ { | |
15847 + :print | |
15848 + s/^# // | |
15849 + s/^# *$// | |
15850 + s*\$progname*'$progname'* | |
15851 + s*\$host*'"$host"'* | |
15852 + s*\$SHELL*'"$SHELL"'* | |
15853 + s*\$LTCC*'"$LTCC"'* | |
15854 + s*\$LTCFLAGS*'"$LTCFLAGS"'* | |
15855 + s*\$LD*'"$LD"'* | |
15856 + s/\$with_gnu_ld/'"$with_gnu_ld"'/ | |
15857 + s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/ | |
15858 + s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/ | |
15859 + p | |
15860 + d | |
15861 + } | |
15862 + /^# .* home page:/b print | |
15863 + /^# General help using/b print | |
15864 + ' < "$progpath" | |
15865 + ret=$? | |
15866 + if test -z "$1"; then | |
15867 + exit $ret | |
15868 + fi | |
15869 +} | |
15870 + | |
15871 +# func_missing_arg argname | |
15872 +# Echo program name prefixed message to standard error and set global | |
15873 +# exit_cmd. | |
15874 +func_missing_arg () | |
15875 +{ | |
15876 + $opt_debug | |
15877 + | |
15878 + func_error "missing argument for $1." | |
15879 + exit_cmd=exit | |
15880 +} | |
15881 + | |
15882 + | |
15883 +# func_split_short_opt shortopt | |
15884 +# Set func_split_short_opt_name and func_split_short_opt_arg shell | |
15885 +# variables after splitting SHORTOPT after the 2nd character. | |
15886 +func_split_short_opt () | |
15887 +{ | |
15888 + my_sed_short_opt='1s/^\(..\).*$/\1/;q' | |
15889 + my_sed_short_rest='1s/^..\(.*\)$/\1/;q' | |
15890 + | |
15891 + func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` | |
15892 + func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` | |
15893 +} # func_split_short_opt may be replaced by extended shell implementation | |
15894 + | |
15895 + | |
15896 +# func_split_long_opt longopt | |
15897 +# Set func_split_long_opt_name and func_split_long_opt_arg shell | |
15898 +# variables after splitting LONGOPT at the `=' sign. | |
15899 +func_split_long_opt () | |
15900 +{ | |
15901 + my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' | |
15902 + my_sed_long_arg='1s/^--[^=]*=//' | |
15903 + | |
15904 + func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` | |
15905 + func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` | |
15906 +} # func_split_long_opt may be replaced by extended shell implementation | |
15907 + | |
15908 +exit_cmd=: | |
15909 + | |
15910 + | |
15911 + | |
15912 + | |
15913 + | |
15914 +magic="%%%MAGIC variable%%%" | |
15915 +magic_exe="%%%MAGIC EXE variable%%%" | |
15916 + | |
15917 +# Global variables. | |
15918 +nonopt= | |
15919 +preserve_args= | |
15920 +lo2o="s/\\.lo\$/.${objext}/" | |
15921 +o2lo="s/\\.${objext}\$/.lo/" | |
15922 +extracted_archives= | |
15923 +extracted_serial=0 | |
15924 + | |
15925 +# If this variable is set in any of the actions, the command in it | |
15926 +# will be execed at the end. This prevents here-documents from being | |
15927 +# left over by shells. | |
15928 +exec_cmd= | |
15929 + | |
15930 +# func_append var value | |
15931 +# Append VALUE to the end of shell variable VAR. | |
15932 +func_append () | |
15933 +{ | |
15934 + eval "${1}=\$${1}\${2}" | |
15935 +} # func_append may be replaced by extended shell implementation | |
15936 + | |
15937 +# func_append_quoted var value | |
15938 +# Quote VALUE and append to the end of shell variable VAR, separated | |
15939 +# by a space. | |
15940 +func_append_quoted () | |
15941 +{ | |
15942 + func_quote_for_eval "${2}" | |
15943 + eval "${1}=\$${1}\\ \$func_quote_for_eval_result" | |
15944 +} # func_append_quoted may be replaced by extended shell implementation | |
15945 + | |
15946 + | |
15947 +# func_arith arithmetic-term... | |
15948 +func_arith () | |
15949 +{ | |
15950 + func_arith_result=`expr "${@}"` | |
15951 +} # func_arith may be replaced by extended shell implementation | |
15952 + | |
15953 + | |
15954 +# func_len string | |
15955 +# STRING may not start with a hyphen. | |
15956 +func_len () | |
15957 +{ | |
15958 + func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len` | |
15959 +} # func_len may be replaced by extended shell implementation | |
15960 + | |
15961 + | |
15962 +# func_lo2o object | |
15963 +func_lo2o () | |
15964 +{ | |
15965 + func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` | |
15966 +} # func_lo2o may be replaced by extended shell implementation | |
15967 + | |
15968 + | |
15969 +# func_xform libobj-or-source | |
15970 +func_xform () | |
15971 +{ | |
15972 + func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` | |
15973 +} # func_xform may be replaced by extended shell implementation | |
15974 + | |
15975 + | |
15976 +# func_fatal_configuration arg... | |
15977 +# Echo program name prefixed message to standard error, followed by | |
15978 +# a configuration failure hint, and exit. | |
15979 +func_fatal_configuration () | |
15980 +{ | |
15981 + func_error ${1+"$@"} | |
15982 + func_error "See the $PACKAGE documentation for more information." | |
15983 + func_fatal_error "Fatal configuration error." | |
15984 +} | |
15985 + | |
15986 + | |
15987 +# func_config | |
15988 +# Display the configuration for all the tags in this script. | |
15989 +func_config () | |
15990 +{ | |
15991 + re_begincf='^# ### BEGIN LIBTOOL' | |
15992 + re_endcf='^# ### END LIBTOOL' | |
15993 + | |
15994 + # Default configuration. | |
15995 + $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" | |
15996 + | |
15997 + # Now print the configurations for the tags. | |
15998 + for tagname in $taglist; do | |
15999 + $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" | |
16000 + done | |
16001 + | |
16002 + exit $? | |
16003 +} | |
16004 + | |
16005 +# func_features | |
16006 +# Display the features supported by this script. | |
16007 +func_features () | |
16008 +{ | |
16009 + echo "host: $host" | |
16010 + if test "$build_libtool_libs" = yes; then | |
16011 + echo "enable shared libraries" | |
16012 + else | |
16013 + echo "disable shared libraries" | |
16014 + fi | |
16015 + if test "$build_old_libs" = yes; then | |
16016 + echo "enable static libraries" | |
16017 + else | |
16018 + echo "disable static libraries" | |
16019 + fi | |
16020 + | |
16021 + exit $? | |
16022 +} | |
16023 + | |
16024 +# func_enable_tag tagname | |
16025 +# Verify that TAGNAME is valid, and either flag an error and exit, or | |
16026 +# enable the TAGNAME tag. We also add TAGNAME to the global $taglist | |
16027 +# variable here. | |
16028 +func_enable_tag () | |
16029 +{ | |
16030 + # Global variable: | |
16031 + tagname="$1" | |
16032 + | |
16033 + re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" | |
16034 + re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" | |
16035 + sed_extractcf="/$re_begincf/,/$re_endcf/p" | |
16036 + | |
16037 + # Validate tagname. | |
16038 + case $tagname in | |
16039 + *[!-_A-Za-z0-9,/]*) | |
16040 + func_fatal_error "invalid tag name: $tagname" | |
16041 + ;; | |
16042 + esac | |
16043 + | |
16044 + # Don't test for the "default" C tag, as we know it's | |
16045 + # there but not specially marked. | |
16046 + case $tagname in | |
16047 + CC) ;; | |
16048 + *) | |
16049 + if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then | |
16050 + taglist="$taglist $tagname" | |
16051 + | |
16052 + # Evaluate the configuration. Be careful to quote the path | |
16053 + # and the sed script, to avoid splitting on whitespace, but | |
16054 + # also don't use non-portable quotes within backquotes within | |
16055 + # quotes we have to do it in 2 steps: | |
16056 + extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` | |
16057 + eval "$extractedcf" | |
16058 + else | |
16059 + func_error "ignoring unknown tag $tagname" | |
16060 + fi | |
16061 + ;; | |
16062 + esac | |
16063 +} | |
16064 + | |
16065 +# func_check_version_match | |
16066 +# Ensure that we are using m4 macros, and libtool script from the same | |
16067 +# release of libtool. | |
16068 +func_check_version_match () | |
16069 +{ | |
16070 + if test "$package_revision" != "$macro_revision"; then | |
16071 + if test "$VERSION" != "$macro_version"; then | |
16072 + if test -z "$macro_version"; then | |
16073 + cat >&2 <<_LT_EOF | |
16074 +$progname: Version mismatch error. This is $PACKAGE $VERSION, but the | |
16075 +$progname: definition of this LT_INIT comes from an older release. | |
16076 +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION | |
16077 +$progname: and run autoconf again. | |
16078 +_LT_EOF | |
16079 + else | |
16080 + cat >&2 <<_LT_EOF | |
16081 +$progname: Version mismatch error. This is $PACKAGE $VERSION, but the | |
16082 +$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. | |
16083 +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION | |
16084 +$progname: and run autoconf again. | |
16085 +_LT_EOF | |
16086 + fi | |
16087 + else | |
16088 + cat >&2 <<_LT_EOF | |
16089 +$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, | |
16090 +$progname: but the definition of this LT_INIT comes from revision $macro_revision. | |
16091 +$progname: You should recreate aclocal.m4 with macros from revision $package_revision | |
16092 +$progname: of $PACKAGE $VERSION and run autoconf again. | |
16093 +_LT_EOF | |
16094 + fi | |
16095 + | |
16096 + exit $EXIT_MISMATCH | |
16097 + fi | |
16098 +} | |
16099 + | |
16100 + | |
16101 +# Shorthand for --mode=foo, only valid as the first argument | |
16102 +case $1 in | |
16103 +clean|clea|cle|cl) | |
16104 + shift; set dummy --mode clean ${1+"$@"}; shift | |
16105 + ;; | |
16106 +compile|compil|compi|comp|com|co|c) | |
16107 + shift; set dummy --mode compile ${1+"$@"}; shift | |
16108 + ;; | |
16109 +execute|execut|execu|exec|exe|ex|e) | |
16110 + shift; set dummy --mode execute ${1+"$@"}; shift | |
16111 + ;; | |
16112 +finish|finis|fini|fin|fi|f) | |
16113 + shift; set dummy --mode finish ${1+"$@"}; shift | |
16114 + ;; | |
16115 +install|instal|insta|inst|ins|in|i) | |
16116 + shift; set dummy --mode install ${1+"$@"}; shift | |
16117 + ;; | |
16118 +link|lin|li|l) | |
16119 + shift; set dummy --mode link ${1+"$@"}; shift | |
16120 + ;; | |
16121 +uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) | |
16122 + shift; set dummy --mode uninstall ${1+"$@"}; shift | |
16123 + ;; | |
16124 +esac | |
16125 + | |
16126 + | |
16127 + | |
16128 +# Option defaults: | |
16129 +opt_debug=: | |
16130 +opt_dry_run=false | |
16131 +opt_config=false | |
16132 +opt_preserve_dup_deps=false | |
16133 +opt_features=false | |
16134 +opt_finish=false | |
16135 +opt_help=false | |
16136 +opt_help_all=false | |
16137 +opt_silent=: | |
16138 +opt_warning=: | |
16139 +opt_verbose=: | |
16140 +opt_silent=false | |
16141 +opt_verbose=false | |
16142 + | |
16143 + | |
16144 +# Parse options once, thoroughly. This comes as soon as possible in the | |
16145 +# script to make things like `--version' happen as quickly as we can. | |
16146 +{ | |
16147 + # this just eases exit handling | |
16148 + while test $# -gt 0; do | |
16149 + opt="$1" | |
16150 + shift | |
16151 + case $opt in | |
16152 + --debug|-x) opt_debug='set -x' | |
16153 + func_echo "enabling shell trace mode" | |
16154 + $opt_debug | |
16155 + ;; | |
16156 + --dry-run|--dryrun|-n) | |
16157 + opt_dry_run=: | |
16158 + ;; | |
16159 + --config) | |
16160 + opt_config=: | |
16161 +func_config | |
16162 + ;; | |
16163 + --dlopen|-dlopen) | |
16164 + optarg="$1" | |
16165 + opt_dlopen="${opt_dlopen+$opt_dlopen | |
16166 +}$optarg" | |
16167 + shift | |
16168 + ;; | |
16169 + --preserve-dup-deps) | |
16170 + opt_preserve_dup_deps=: | |
16171 + ;; | |
16172 + --features) | |
16173 + opt_features=: | |
16174 +func_features | |
16175 + ;; | |
16176 + --finish) | |
16177 + opt_finish=: | |
16178 +set dummy --mode finish ${1+"$@"}; shift | |
16179 + ;; | |
16180 + --help) | |
16181 + opt_help=: | |
16182 + ;; | |
16183 + --help-all) | |
16184 + opt_help_all=: | |
16185 +opt_help=': help-all' | |
16186 + ;; | |
16187 + --mode) | |
16188 + test $# = 0 && func_missing_arg $opt && break | |
16189 + optarg="$1" | |
16190 + opt_mode="$optarg" | |
16191 +case $optarg in | |
16192 + # Valid mode arguments: | |
16193 + clean|compile|execute|finish|install|link|relink|uninstall) ;; | |
16194 + | |
16195 + # Catch anything else as an error | |
16196 + *) func_error "invalid argument for $opt" | |
16197 + exit_cmd=exit | |
16198 + break | |
16199 + ;; | |
16200 +esac | |
16201 + shift | |
16202 + ;; | |
16203 + --no-silent|--no-quiet) | |
16204 + opt_silent=false | |
16205 +func_append preserve_args " $opt" | |
16206 + ;; | |
16207 + --no-warning|--no-warn) | |
16208 + opt_warning=false | |
16209 +func_append preserve_args " $opt" | |
16210 + ;; | |
16211 + --no-verbose) | |
16212 + opt_verbose=false | |
16213 +func_append preserve_args " $opt" | |
16214 + ;; | |
16215 + --silent|--quiet) | |
16216 + opt_silent=: | |
16217 +func_append preserve_args " $opt" | |
16218 + opt_verbose=false | |
16219 + ;; | |
16220 + --verbose|-v) | |
16221 + opt_verbose=: | |
16222 +func_append preserve_args " $opt" | |
16223 +opt_silent=false | |
16224 + ;; | |
16225 + --tag) | |
16226 + test $# = 0 && func_missing_arg $opt && break | |
16227 + optarg="$1" | |
16228 + opt_tag="$optarg" | |
16229 +func_append preserve_args " $opt $optarg" | |
16230 +func_enable_tag "$optarg" | |
16231 + shift | |
16232 + ;; | |
16233 + | |
16234 + -\?|-h) func_usage ;; | |
16235 + --help) func_help ;; | |
16236 + --version) func_version ;; | |
16237 + | |
16238 + # Separate optargs to long options: | |
16239 + --*=*) | |
16240 + func_split_long_opt "$opt" | |
16241 + set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} | |
16242 + shift | |
16243 + ;; | |
16244 + | |
16245 + # Separate non-argument short options: | |
16246 + -\?*|-h*|-n*|-v*) | |
16247 + func_split_short_opt "$opt" | |
16248 + set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} | |
16249 + shift | |
16250 + ;; | |
16251 + | |
16252 + --) break ;; | |
16253 + -*) func_fatal_help "unrecognized option \`$opt'" ;; | |
16254 + *) set dummy "$opt" ${1+"$@"}; shift; break ;; | |
16255 + esac | |
16256 + done | |
16257 + | |
16258 + # Validate options: | |
16259 + | |
16260 + # save first non-option argument | |
16261 + if test "$#" -gt 0; then | |
16262 + nonopt="$opt" | |
16263 + shift | |
16264 + fi | |
16265 + | |
16266 + # preserve --debug | |
16267 + test "$opt_debug" = : || func_append preserve_args " --debug" | |
16268 + | |
16269 + case $host in | |
16270 + *cygwin* | *mingw* | *pw32* | *cegcc*) | |
16271 + # don't eliminate duplications in $postdeps and $predeps | |
16272 + opt_duplicate_compiler_generated_deps=: | |
16273 + ;; | |
16274 + *) | |
16275 + opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps | |
16276 + ;; | |
16277 + esac | |
16278 + | |
16279 + $opt_help || { | |
16280 + # Sanity checks first: | |
16281 + func_check_version_match | |
16282 + | |
16283 + if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then | |
16284 + func_fatal_configuration "not configured to build any kind of library" | |
16285 + fi | |
16286 + | |
16287 + # Darwin sucks | |
16288 + eval std_shrext=\"$shrext_cmds\" | |
16289 + | |
16290 + # Only execute mode is allowed to have -dlopen flags. | |
16291 + if test -n "$opt_dlopen" && test "$opt_mode" != execute; then | |
16292 + func_error "unrecognized option \`-dlopen'" | |
16293 + $ECHO "$help" 1>&2 | |
16294 + exit $EXIT_FAILURE | |
16295 + fi | |
16296 + | |
16297 + # Change the help message to a mode-specific one. | |
16298 + generic_help="$help" | |
16299 + help="Try \`$progname --help --mode=$opt_mode' for more information." | |
16300 + } | |
16301 + | |
16302 + | |
16303 + # Bail if the options were screwed | |
16304 + $exit_cmd $EXIT_FAILURE | |
16305 +} | |
16306 + | |
16307 + | |
16308 + | |
16309 + | |
16310 +## ----------- ## | |
16311 +## Main. ## | |
16312 +## ----------- ## | |
16313 + | |
16314 +# func_lalib_p file | |
16315 +# True iff FILE is a libtool `.la' library or `.lo' object file. | |
16316 +# This function is only a basic sanity check; it will hardly flush out | |
16317 +# determined imposters. | |
16318 +func_lalib_p () | |
16319 +{ | |
16320 + test -f "$1" && | |
16321 + $SED -e 4q "$1" 2>/dev/null \ | |
16322 + | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 | |
16323 +} | |
16324 + | |
16325 +# func_lalib_unsafe_p file | |
16326 +# True iff FILE is a libtool `.la' library or `.lo' object file. | |
16327 +# This function implements the same check as func_lalib_p without | |
16328 +# resorting to external programs. To this end, it redirects stdin and | |
16329 +# closes it afterwards, without saving the original file descriptor. | |
16330 +# As a safety measure, use it only where a negative result would be | |
16331 +# fatal anyway. Works if `file' does not exist. | |
16332 +func_lalib_unsafe_p () | |
16333 +{ | |
16334 + lalib_p=no | |
16335 + if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then | |
16336 + for lalib_p_l in 1 2 3 4 | |
16337 + do | |
16338 + read lalib_p_line | |
16339 + case "$lalib_p_line" in | |
16340 + \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; | |
16341 + esac | |
16342 + done | |
16343 + exec 0<&5 5<&- | |
16344 + fi | |
16345 + test "$lalib_p" = yes | |
16346 +} | |
16347 + | |
16348 +# func_ltwrapper_script_p file | |
16349 +# True iff FILE is a libtool wrapper script | |
16350 +# This function is only a basic sanity check; it will hardly flush out | |
16351 +# determined imposters. | |
16352 +func_ltwrapper_script_p () | |
16353 +{ | |
16354 + func_lalib_p "$1" | |
16355 +} | |
16356 + | |
16357 +# func_ltwrapper_executable_p file | |
16358 +# True iff FILE is a libtool wrapper executable | |
16359 +# This function is only a basic sanity check; it will hardly flush out | |
16360 +# determined imposters. | |
16361 +func_ltwrapper_executable_p () | |
16362 +{ | |
16363 + func_ltwrapper_exec_suffix= | |
16364 + case $1 in | |
16365 + *.exe) ;; | |
16366 + *) func_ltwrapper_exec_suffix=.exe ;; | |
16367 + esac | |
16368 + $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 | |
16369 +} | |
16370 + | |
16371 +# func_ltwrapper_scriptname file | |
16372 +# Assumes file is an ltwrapper_executable | |
16373 +# uses $file to determine the appropriate filename for a | |
16374 +# temporary ltwrapper_script. | |
16375 +func_ltwrapper_scriptname () | |
16376 +{ | |
16377 + func_dirname_and_basename "$1" "" "." | |
16378 + func_stripname '' '.exe' "$func_basename_result" | |
16379 + func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" | |
16380 +} | |
16381 + | |
16382 +# func_ltwrapper_p file | |
16383 +# True iff FILE is a libtool wrapper script or wrapper executable | |
16384 +# This function is only a basic sanity check; it will hardly flush out | |
16385 +# determined imposters. | |
16386 +func_ltwrapper_p () | |
16387 +{ | |
16388 + func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" | |
16389 +} | |
16390 + | |
16391 + | |
16392 +# func_execute_cmds commands fail_cmd | |
16393 +# Execute tilde-delimited COMMANDS. | |
16394 +# If FAIL_CMD is given, eval that upon failure. | |
16395 +# FAIL_CMD may read-access the current command in variable CMD! | |
16396 +func_execute_cmds () | |
16397 +{ | |
16398 + $opt_debug | |
16399 + save_ifs=$IFS; IFS='~' | |
16400 + for cmd in $1; do | |
16401 + IFS=$save_ifs | |
16402 + eval cmd=\"$cmd\" | |
16403 + func_show_eval "$cmd" "${2-:}" | |
16404 + done | |
16405 + IFS=$save_ifs | |
16406 +} | |
16407 + | |
16408 + | |
16409 +# func_source file | |
16410 +# Source FILE, adding directory component if necessary. | |
16411 +# Note that it is not necessary on cygwin/mingw to append a dot to | |
16412 +# FILE even if both FILE and FILE.exe exist: automatic-append-.exe | |
16413 +# behavior happens only for exec(3), not for open(2)! Also, sourcing | |
16414 +# `FILE.' does not work on cygwin managed mounts. | |
16415 +func_source () | |
16416 +{ | |
16417 + $opt_debug | |
16418 + case $1 in | |
16419 + */* | *\\*) . "$1" ;; | |
16420 + *) . "./$1" ;; | |
16421 + esac | |
16422 +} | |
16423 + | |
16424 + | |
16425 +# func_resolve_sysroot PATH | |
16426 +# Replace a leading = in PATH with a sysroot. Store the result into | |
16427 +# func_resolve_sysroot_result | |
16428 +func_resolve_sysroot () | |
16429 +{ | |
16430 + func_resolve_sysroot_result=$1 | |
16431 + case $func_resolve_sysroot_result in | |
16432 + =*) | |
16433 + func_stripname '=' '' "$func_resolve_sysroot_result" | |
16434 + func_resolve_sysroot_result=$lt_sysroot$func_stripname_result | |
16435 + ;; | |
16436 + esac | |
16437 +} | |
16438 + | |
16439 +# func_replace_sysroot PATH | |
16440 +# If PATH begins with the sysroot, replace it with = and | |
16441 +# store the result into func_replace_sysroot_result. | |
16442 +func_replace_sysroot () | |
16443 +{ | |
16444 + case "$lt_sysroot:$1" in | |
16445 + ?*:"$lt_sysroot"*) | |
16446 + func_stripname "$lt_sysroot" '' "$1" | |
16447 + func_replace_sysroot_result="=$func_stripname_result" | |
16448 + ;; | |
16449 + *) | |
16450 + # Including no sysroot. | |
16451 + func_replace_sysroot_result=$1 | |
16452 + ;; | |
16453 + esac | |
16454 +} | |
16455 + | |
16456 +# func_infer_tag arg | |
16457 +# Infer tagged configuration to use if any are available and | |
16458 +# if one wasn't chosen via the "--tag" command line option. | |
16459 +# Only attempt this if the compiler in the base compile | |
16460 +# command doesn't match the default compiler. | |
16461 +# arg is usually of the form 'gcc ...' | |
16462 +func_infer_tag () | |
16463 +{ | |
16464 + $opt_debug | |
16465 + if test -n "$available_tags" && test -z "$tagname"; then | |
16466 + CC_quoted= | |
16467 + for arg in $CC; do | |
16468 + func_append_quoted CC_quoted "$arg" | |
16469 + done | |
16470 + CC_expanded=`func_echo_all $CC` | |
16471 + CC_quoted_expanded=`func_echo_all $CC_quoted` | |
16472 + case $@ in | |
16473 + # Blanks in the command may have been stripped by the calling shell, | |
16474 + # but not from the CC environment variable when configure was run. | |
16475 + " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ | |
16476 + " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; | |
16477 + # Blanks at the start of $base_compile will cause this to fail | |
16478 + # if we don't check for them as well. | |
16479 + *) | |
16480 + for z in $available_tags; do | |
16481 + if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then | |
16482 + # Evaluate the configuration. | |
16483 + eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" | |
16484 + CC_quoted= | |
16485 + for arg in $CC; do | |
16486 + # Double-quote args containing other shell metacharacters. | |
16487 + func_append_quoted CC_quoted "$arg" | |
16488 + done | |
16489 + CC_expanded=`func_echo_all $CC` | |
16490 + CC_quoted_expanded=`func_echo_all $CC_quoted` | |
16491 + case "$@ " in | |
16492 + " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ | |
16493 + " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) | |
16494 + # The compiler in the base compile command matches | |
16495 + # the one in the tagged configuration. | |
16496 + # Assume this is the tagged configuration we want. | |
16497 + tagname=$z | |
16498 + break | |
16499 + ;; | |
16500 + esac | |
16501 + fi | |
16502 + done | |
16503 + # If $tagname still isn't set, then no tagged configuration | |
16504 + # was found and let the user know that the "--tag" command | |
16505 + # line option must be used. | |
16506 + if test -z "$tagname"; then | |
16507 + func_echo "unable to infer tagged configuration" | |
16508 + func_fatal_error "specify a tag with \`--tag'" | |
16509 +# else | |
16510 +# func_verbose "using $tagname tagged configuration" | |
16511 + fi | |
16512 + ;; | |
16513 + esac | |
16514 + fi | |
16515 +} | |
16516 + | |
16517 + | |
16518 + | |
16519 +# func_write_libtool_object output_name pic_name nonpic_name | |
16520 +# Create a libtool object file (analogous to a ".la" file), | |
16521 +# but don't create it if we're doing a dry run. | |
16522 +func_write_libtool_object () | |
16523 +{ | |
16524 + write_libobj=${1} | |
16525 + if test "$build_libtool_libs" = yes; then | |
16526 + write_lobj=\'${2}\' | |
16527 + else | |
16528 + write_lobj=none | |
16529 + fi | |
16530 + | |
16531 + if test "$build_old_libs" = yes; then | |
16532 + write_oldobj=\'${3}\' | |
16533 + else | |
16534 + write_oldobj=none | |
16535 + fi | |
16536 + | |
16537 + $opt_dry_run || { | |
16538 + cat >${write_libobj}T <<EOF | |
16539 +# $write_libobj - a libtool object file | |
16540 +# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION | |
16541 +# | |
16542 +# Please DO NOT delete this file! | |
16543 +# It is necessary for linking the library. | |
16544 + | |
16545 +# Name of the PIC object. | |
16546 +pic_object=$write_lobj | |
16547 + | |
16548 +# Name of the non-PIC object | |
16549 +non_pic_object=$write_oldobj | |
16550 + | |
16551 +EOF | |
16552 + $MV "${write_libobj}T" "${write_libobj}" | |
16553 + } | |
16554 +} | |
16555 + | |
16556 + | |
16557 +################################################## | |
16558 +# FILE NAME AND PATH CONVERSION HELPER FUNCTIONS # | |
16559 +################################################## | |
16560 + | |
16561 +# func_convert_core_file_wine_to_w32 ARG | |
16562 +# Helper function used by file name conversion functions when $build is *nix, | |
16563 +# and $host is mingw, cygwin, or some other w32 environment. Relies on a | |
16564 +# correctly configured wine environment available, with the winepath program | |
16565 +# in $build's $PATH. | |
16566 +# | |
16567 +# ARG is the $build file name to be converted to w32 format. | |
16568 +# Result is available in $func_convert_core_file_wine_to_w32_result, and will | |
16569 +# be empty on error (or when ARG is empty) | |
16570 +func_convert_core_file_wine_to_w32 () | |
16571 +{ | |
16572 + $opt_debug | |
16573 + func_convert_core_file_wine_to_w32_result="$1" | |
16574 + if test -n "$1"; then | |
16575 + # Unfortunately, winepath does not exit with a non-zero error code, so we | |
16576 + # are forced to check the contents of stdout. On the other hand, if the | |
16577 + # command is not found, the shell will set an exit code of 127 and print | |
16578 + # *an error message* to stdout. So we must check for both error code of | |
16579 + # zero AND non-empty stdout, which explains the odd construction: | |
16580 + func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null` | |
16581 + if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then | |
16582 + func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | | |
16583 + $SED -e "$lt_sed_naive_backslashify"` | |
16584 + else | |
16585 + func_convert_core_file_wine_to_w32_result= | |
16586 + fi | |
16587 + fi | |
16588 +} | |
16589 +# end: func_convert_core_file_wine_to_w32 | |
16590 + | |
16591 + | |
16592 +# func_convert_core_path_wine_to_w32 ARG | |
16593 +# Helper function used by path conversion functions when $build is *nix, and | |
16594 +# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly | |
16595 +# configured wine environment available, with the winepath program in $build's | |
16596 +# $PATH. Assumes ARG has no leading or trailing path separator characters. | |
16597 +# | |
16598 +# ARG is path to be converted from $build format to win32. | |
16599 +# Result is available in $func_convert_core_path_wine_to_w32_result. | |
16600 +# Unconvertible file (directory) names in ARG are skipped; if no directory names | |
16601 +# are convertible, then the result may be empty. | |
16602 +func_convert_core_path_wine_to_w32 () | |
16603 +{ | |
16604 + $opt_debug | |
16605 + # unfortunately, winepath doesn't convert paths, only file names | |
16606 + func_convert_core_path_wine_to_w32_result="" | |
16607 + if test -n "$1"; then | |
16608 + oldIFS=$IFS | |
16609 + IFS=: | |
16610 + for func_convert_core_path_wine_to_w32_f in $1; do | |
16611 + IFS=$oldIFS | |
16612 + func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" | |
16613 + if test -n "$func_convert_core_file_wine_to_w32_result" ; then | |
16614 + if test -z "$func_convert_core_path_wine_to_w32_result"; then | |
16615 + func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" | |
16616 + else | |
16617 + func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" | |
16618 + fi | |
16619 + fi | |
16620 + done | |
16621 + IFS=$oldIFS | |
16622 + fi | |
16623 +} | |
16624 +# end: func_convert_core_path_wine_to_w32 | |
16625 + | |
16626 + | |
16627 +# func_cygpath ARGS... | |
16628 +# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when | |
16629 +# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) | |
16630 +# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or | |
16631 +# (2), returns the Cygwin file name or path in func_cygpath_result (input | |
16632 +# file name or path is assumed to be in w32 format, as previously converted | |
16633 +# from $build's *nix or MSYS format). In case (3), returns the w32 file name | |
16634 +# or path in func_cygpath_result (input file name or path is assumed to be in | |
16635 +# Cygwin format). Returns an empty string on error. | |
16636 +# | |
16637 +# ARGS are passed to cygpath, with the last one being the file name or path to | |
16638 +# be converted. | |
16639 +# | |
16640 +# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH | |
16641 +# environment variable; do not put it in $PATH. | |
16642 +func_cygpath () | |
16643 +{ | |
16644 + $opt_debug | |
16645 + if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then | |
16646 + func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` | |
16647 + if test "$?" -ne 0; then | |
16648 + # on failure, ensure result is empty | |
16649 + func_cygpath_result= | |
16650 + fi | |
16651 + else | |
16652 + func_cygpath_result= | |
16653 + func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" | |
16654 + fi | |
16655 +} | |
16656 +#end: func_cygpath | |
16657 + | |
16658 + | |
16659 +# func_convert_core_msys_to_w32 ARG | |
16660 +# Convert file name or path ARG from MSYS format to w32 format. Return | |
16661 +# result in func_convert_core_msys_to_w32_result. | |
16662 +func_convert_core_msys_to_w32 () | |
16663 +{ | |
16664 + $opt_debug | |
16665 + # awkward: cmd appends spaces to result | |
16666 + func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | | |
16667 + $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` | |
16668 +} | |
16669 +#end: func_convert_core_msys_to_w32 | |
16670 + | |
16671 + | |
16672 +# func_convert_file_check ARG1 ARG2 | |
16673 +# Verify that ARG1 (a file name in $build format) was converted to $host | |
16674 +# format in ARG2. Otherwise, emit an error message, but continue (resetting | |
16675 +# func_to_host_file_result to ARG1). | |
16676 +func_convert_file_check () | |
16677 +{ | |
16678 + $opt_debug | |
16679 + if test -z "$2" && test -n "$1" ; then | |
16680 + func_error "Could not determine host file name corresponding to" | |
16681 + func_error " \`$1'" | |
16682 + func_error "Continuing, but uninstalled executables may not work." | |
16683 + # Fallback: | |
16684 + func_to_host_file_result="$1" | |
16685 + fi | |
16686 +} | |
16687 +# end func_convert_file_check | |
16688 + | |
16689 + | |
16690 +# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH | |
16691 +# Verify that FROM_PATH (a path in $build format) was converted to $host | |
16692 +# format in TO_PATH. Otherwise, emit an error message, but continue, resetting | |
16693 +# func_to_host_file_result to a simplistic fallback value (see below). | |
16694 +func_convert_path_check () | |
16695 +{ | |
16696 + $opt_debug | |
16697 + if test -z "$4" && test -n "$3"; then | |
16698 + func_error "Could not determine the host path corresponding to" | |
16699 + func_error " \`$3'" | |
16700 + func_error "Continuing, but uninstalled executables may not work." | |
16701 + # Fallback. This is a deliberately simplistic "conversion" and | |
16702 + # should not be "improved". See libtool.info. | |
16703 + if test "x$1" != "x$2"; then | |
16704 + lt_replace_pathsep_chars="s|$1|$2|g" | |
16705 + func_to_host_path_result=`echo "$3" | | |
16706 + $SED -e "$lt_replace_pathsep_chars"` | |
16707 + else | |
16708 + func_to_host_path_result="$3" | |
16709 + fi | |
16710 + fi | |
16711 +} | |
16712 +# end func_convert_path_check | |
16713 + | |
16714 + | |
16715 +# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG | |
16716 +# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT | |
16717 +# and appending REPL if ORIG matches BACKPAT. | |
16718 +func_convert_path_front_back_pathsep () | |
16719 +{ | |
16720 + $opt_debug | |
16721 + case $4 in | |
16722 + $1 ) func_to_host_path_result="$3$func_to_host_path_result" | |
16723 + ;; | |
16724 + esac | |
16725 + case $4 in | |
16726 + $2 ) func_append func_to_host_path_result "$3" | |
16727 + ;; | |
16728 + esac | |
16729 +} | |
16730 +# end func_convert_path_front_back_pathsep | |
16731 + | |
16732 + | |
16733 +################################################## | |
16734 +# $build to $host FILE NAME CONVERSION FUNCTIONS # | |
16735 +################################################## | |
16736 +# invoked via `$to_host_file_cmd ARG' | |
16737 +# | |
16738 +# In each case, ARG is the path to be converted from $build to $host format. | |
16739 +# Result will be available in $func_to_host_file_result. | |
16740 + | |
16741 + | |
16742 +# func_to_host_file ARG | |
16743 +# Converts the file name ARG from $build format to $host format. Return result | |
16744 +# in func_to_host_file_result. | |
16745 +func_to_host_file () | |
16746 +{ | |
16747 + $opt_debug | |
16748 + $to_host_file_cmd "$1" | |
16749 +} | |
16750 +# end func_to_host_file | |
16751 + | |
16752 + | |
16753 +# func_to_tool_file ARG LAZY | |
16754 +# converts the file name ARG from $build format to toolchain format. Return | |
16755 +# result in func_to_tool_file_result. If the conversion in use is listed | |
16756 +# in (the comma separated) LAZY, no conversion takes place. | |
16757 +func_to_tool_file () | |
16758 +{ | |
16759 + $opt_debug | |
16760 + case ,$2, in | |
16761 + *,"$to_tool_file_cmd",*) | |
16762 + func_to_tool_file_result=$1 | |
16763 + ;; | |
16764 + *) | |
16765 + $to_tool_file_cmd "$1" | |
16766 + func_to_tool_file_result=$func_to_host_file_result | |
16767 + ;; | |
16768 + esac | |
16769 +} | |
16770 +# end func_to_tool_file | |
16771 + | |
16772 + | |
16773 +# func_convert_file_noop ARG | |
16774 +# Copy ARG to func_to_host_file_result. | |
16775 +func_convert_file_noop () | |
16776 +{ | |
16777 + func_to_host_file_result="$1" | |
16778 +} | |
16779 +# end func_convert_file_noop | |
16780 + | |
16781 + | |
16782 +# func_convert_file_msys_to_w32 ARG | |
16783 +# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic | |
16784 +# conversion to w32 is not available inside the cwrapper. Returns result in | |
16785 +# func_to_host_file_result. | |
16786 +func_convert_file_msys_to_w32 () | |
16787 +{ | |
16788 + $opt_debug | |
16789 + func_to_host_file_result="$1" | |
16790 + if test -n "$1"; then | |
16791 + func_convert_core_msys_to_w32 "$1" | |
16792 + func_to_host_file_result="$func_convert_core_msys_to_w32_result" | |
16793 + fi | |
16794 + func_convert_file_check "$1" "$func_to_host_file_result" | |
16795 +} | |
16796 +# end func_convert_file_msys_to_w32 | |
16797 + | |
16798 + | |
16799 +# func_convert_file_cygwin_to_w32 ARG | |
16800 +# Convert file name ARG from Cygwin to w32 format. Returns result in | |
16801 +# func_to_host_file_result. | |
16802 +func_convert_file_cygwin_to_w32 () | |
16803 +{ | |
16804 + $opt_debug | |
16805 + func_to_host_file_result="$1" | |
16806 + if test -n "$1"; then | |
16807 + # because $build is cygwin, we call "the" cygpath in $PATH; no need to use | |
16808 + # LT_CYGPATH in this case. | |
16809 + func_to_host_file_result=`cygpath -m "$1"` | |
16810 + fi | |
16811 + func_convert_file_check "$1" "$func_to_host_file_result" | |
16812 +} | |
16813 +# end func_convert_file_cygwin_to_w32 | |
16814 + | |
16815 + | |
16816 +# func_convert_file_nix_to_w32 ARG | |
16817 +# Convert file name ARG from *nix to w32 format. Requires a wine environment | |
16818 +# and a working winepath. Returns result in func_to_host_file_result. | |
16819 +func_convert_file_nix_to_w32 () | |
16820 +{ | |
16821 + $opt_debug | |
16822 + func_to_host_file_result="$1" | |
16823 + if test -n "$1"; then | |
16824 + func_convert_core_file_wine_to_w32 "$1" | |
16825 + func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" | |
16826 + fi | |
16827 + func_convert_file_check "$1" "$func_to_host_file_result" | |
16828 +} | |
16829 +# end func_convert_file_nix_to_w32 | |
16830 + | |
16831 + | |
16832 +# func_convert_file_msys_to_cygwin ARG | |
16833 +# Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. | |
16834 +# Returns result in func_to_host_file_result. | |
16835 +func_convert_file_msys_to_cygwin () | |
16836 +{ | |
16837 + $opt_debug | |
16838 + func_to_host_file_result="$1" | |
16839 + if test -n "$1"; then | |
16840 + func_convert_core_msys_to_w32 "$1" | |
16841 + func_cygpath -u "$func_convert_core_msys_to_w32_result" | |
16842 + func_to_host_file_result="$func_cygpath_result" | |
16843 + fi | |
16844 + func_convert_file_check "$1" "$func_to_host_file_result" | |
16845 +} | |
16846 +# end func_convert_file_msys_to_cygwin | |
16847 + | |
16848 + | |
16849 +# func_convert_file_nix_to_cygwin ARG | |
16850 +# Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed | |
16851 +# in a wine environment, working winepath, and LT_CYGPATH set. Returns result | |
16852 +# in func_to_host_file_result. | |
16853 +func_convert_file_nix_to_cygwin () | |
16854 +{ | |
16855 + $opt_debug | |
16856 + func_to_host_file_result="$1" | |
16857 + if test -n "$1"; then | |
16858 + # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. | |
16859 + func_convert_core_file_wine_to_w32 "$1" | |
16860 + func_cygpath -u "$func_convert_core_file_wine_to_w32_result" | |
16861 + func_to_host_file_result="$func_cygpath_result" | |
16862 + fi | |
16863 + func_convert_file_check "$1" "$func_to_host_file_result" | |
16864 +} | |
16865 +# end func_convert_file_nix_to_cygwin | |
16866 + | |
16867 + | |
16868 +############################################# | |
16869 +# $build to $host PATH CONVERSION FUNCTIONS # | |
16870 +############################################# | |
16871 +# invoked via `$to_host_path_cmd ARG' | |
16872 +# | |
16873 +# In each case, ARG is the path to be converted from $build to $host format. | |
16874 +# The result will be available in $func_to_host_path_result. | |
16875 +# | |
16876 +# Path separators are also converted from $build format to $host format. If | |
16877 +# ARG begins or ends with a path separator character, it is preserved (but | |
16878 +# converted to $host format) on output. | |
16879 +# | |
16880 +# All path conversion functions are named using the following convention: | |
16881 +# file name conversion function : func_convert_file_X_to_Y () | |
16882 +# path conversion function : func_convert_path_X_to_Y () | |
16883 +# where, for any given $build/$host combination the 'X_to_Y' value is the | |
16884 +# same. If conversion functions are added for new $build/$host combinations, | |
16885 +# the two new functions must follow this pattern, or func_init_to_host_path_cmd | |
16886 +# will break. | |
16887 + | |
16888 + | |
16889 +# func_init_to_host_path_cmd | |
16890 +# Ensures that function "pointer" variable $to_host_path_cmd is set to the | |
16891 +# appropriate value, based on the value of $to_host_file_cmd. | |
16892 +to_host_path_cmd= | |
16893 +func_init_to_host_path_cmd () | |
16894 +{ | |
16895 + $opt_debug | |
16896 + if test -z "$to_host_path_cmd"; then | |
16897 + func_stripname 'func_convert_file_' '' "$to_host_file_cmd" | |
16898 + to_host_path_cmd="func_convert_path_${func_stripname_result}" | |
16899 + fi | |
16900 +} | |
16901 + | |
16902 + | |
16903 +# func_to_host_path ARG | |
16904 +# Converts the path ARG from $build format to $host format. Return result | |
16905 +# in func_to_host_path_result. | |
16906 +func_to_host_path () | |
16907 +{ | |
16908 + $opt_debug | |
16909 + func_init_to_host_path_cmd | |
16910 + $to_host_path_cmd "$1" | |
16911 +} | |
16912 +# end func_to_host_path | |
16913 + | |
16914 + | |
16915 +# func_convert_path_noop ARG | |
16916 +# Copy ARG to func_to_host_path_result. | |
16917 +func_convert_path_noop () | |
16918 +{ | |
16919 + func_to_host_path_result="$1" | |
16920 +} | |
16921 +# end func_convert_path_noop | |
16922 + | |
16923 + | |
16924 +# func_convert_path_msys_to_w32 ARG | |
16925 +# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic | |
16926 +# conversion to w32 is not available inside the cwrapper. Returns result in | |
16927 +# func_to_host_path_result. | |
16928 +func_convert_path_msys_to_w32 () | |
16929 +{ | |
16930 + $opt_debug | |
16931 + func_to_host_path_result="$1" | |
16932 + if test -n "$1"; then | |
16933 + # Remove leading and trailing path separator characters from ARG. MSYS | |
16934 + # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; | |
16935 + # and winepath ignores them completely. | |
16936 + func_stripname : : "$1" | |
16937 + func_to_host_path_tmp1=$func_stripname_result | |
16938 + func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" | |
16939 + func_to_host_path_result="$func_convert_core_msys_to_w32_result" | |
16940 + func_convert_path_check : ";" \ | |
16941 + "$func_to_host_path_tmp1" "$func_to_host_path_result" | |
16942 + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" | |
16943 + fi | |
16944 +} | |
16945 +# end func_convert_path_msys_to_w32 | |
16946 + | |
16947 + | |
16948 +# func_convert_path_cygwin_to_w32 ARG | |
16949 +# Convert path ARG from Cygwin to w32 format. Returns result in | |
16950 +# func_to_host_file_result. | |
16951 +func_convert_path_cygwin_to_w32 () | |
16952 +{ | |
16953 + $opt_debug | |
16954 + func_to_host_path_result="$1" | |
16955 + if test -n "$1"; then | |
16956 + # See func_convert_path_msys_to_w32: | |
16957 + func_stripname : : "$1" | |
16958 + func_to_host_path_tmp1=$func_stripname_result | |
16959 + func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` | |
16960 + func_convert_path_check : ";" \ | |
16961 + "$func_to_host_path_tmp1" "$func_to_host_path_result" | |
16962 + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" | |
16963 + fi | |
16964 +} | |
16965 +# end func_convert_path_cygwin_to_w32 | |
16966 + | |
16967 + | |
16968 +# func_convert_path_nix_to_w32 ARG | |
16969 +# Convert path ARG from *nix to w32 format. Requires a wine environment and | |
16970 +# a working winepath. Returns result in func_to_host_file_result. | |
16971 +func_convert_path_nix_to_w32 () | |
16972 +{ | |
16973 + $opt_debug | |
16974 + func_to_host_path_result="$1" | |
16975 + if test -n "$1"; then | |
16976 + # See func_convert_path_msys_to_w32: | |
16977 + func_stripname : : "$1" | |
16978 + func_to_host_path_tmp1=$func_stripname_result | |
16979 + func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" | |
16980 + func_to_host_path_result="$func_convert_core_path_wine_to_w32_result" | |
16981 + func_convert_path_check : ";" \ | |
16982 + "$func_to_host_path_tmp1" "$func_to_host_path_result" | |
16983 + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" | |
16984 + fi | |
16985 +} | |
16986 +# end func_convert_path_nix_to_w32 | |
16987 + | |
16988 + | |
16989 +# func_convert_path_msys_to_cygwin ARG | |
16990 +# Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. | |
16991 +# Returns result in func_to_host_file_result. | |
16992 +func_convert_path_msys_to_cygwin () | |
16993 +{ | |
16994 + $opt_debug | |
16995 + func_to_host_path_result="$1" | |
16996 + if test -n "$1"; then | |
16997 + # See func_convert_path_msys_to_w32: | |
16998 + func_stripname : : "$1" | |
16999 + func_to_host_path_tmp1=$func_stripname_result | |
17000 + func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" | |
17001 + func_cygpath -u -p "$func_convert_core_msys_to_w32_result" | |
17002 + func_to_host_path_result="$func_cygpath_result" | |
17003 + func_convert_path_check : : \ | |
17004 + "$func_to_host_path_tmp1" "$func_to_host_path_result" | |
17005 + func_convert_path_front_back_pathsep ":*" "*:" : "$1" | |
17006 + fi | |
17007 +} | |
17008 +# end func_convert_path_msys_to_cygwin | |
17009 + | |
17010 + | |
17011 +# func_convert_path_nix_to_cygwin ARG | |
17012 +# Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a | |
17013 +# a wine environment, working winepath, and LT_CYGPATH set. Returns result in | |
17014 +# func_to_host_file_result. | |
17015 +func_convert_path_nix_to_cygwin () | |
17016 +{ | |
17017 + $opt_debug | |
17018 + func_to_host_path_result="$1" | |
17019 + if test -n "$1"; then | |
17020 + # Remove leading and trailing path separator characters from | |
17021 + # ARG. msys behavior is inconsistent here, cygpath turns them | |
17022 + # into '.;' and ';.', and winepath ignores them completely. | |
17023 + func_stripname : : "$1" | |
17024 + func_to_host_path_tmp1=$func_stripname_result | |
17025 + func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" | |
17026 + func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" | |
17027 + func_to_host_path_result="$func_cygpath_result" | |
17028 + func_convert_path_check : : \ | |
17029 + "$func_to_host_path_tmp1" "$func_to_host_path_result" | |
17030 + func_convert_path_front_back_pathsep ":*" "*:" : "$1" | |
17031 + fi | |
17032 +} | |
17033 +# end func_convert_path_nix_to_cygwin | |
17034 + | |
17035 + | |
17036 +# func_mode_compile arg... | |
17037 +func_mode_compile () | |
17038 +{ | |
17039 + $opt_debug | |
17040 + # Get the compilation command and the source file. | |
17041 + base_compile= | |
17042 + srcfile="$nonopt" # always keep a non-empty value in "srcfile" | |
17043 + suppress_opt=yes | |
17044 + suppress_output= | |
17045 + arg_mode=normal | |
17046 + libobj= | |
17047 + later= | |
17048 + pie_flag= | |
17049 + | |
17050 + for arg | |
17051 + do | |
17052 + case $arg_mode in | |
17053 + arg ) | |
17054 + # do not "continue". Instead, add this to base_compile | |
17055 + lastarg="$arg" | |
17056 + arg_mode=normal | |
17057 + ;; | |
17058 + | |
17059 + target ) | |
17060 + libobj="$arg" | |
17061 + arg_mode=normal | |
17062 + continue | |
17063 + ;; | |
17064 + | |
17065 + normal ) | |
17066 + # Accept any command-line options. | |
17067 + case $arg in | |
17068 + -o) | |
17069 + test -n "$libobj" && \ | |
17070 + func_fatal_error "you cannot specify \`-o' more than once" | |
17071 + arg_mode=target | |
17072 + continue | |
17073 + ;; | |
17074 + | |
17075 + -pie | -fpie | -fPIE) | |
17076 + func_append pie_flag " $arg" | |
17077 + continue | |
17078 + ;; | |
17079 + | |
17080 + -shared | -static | -prefer-pic | -prefer-non-pic) | |
17081 + func_append later " $arg" | |
17082 + continue | |
17083 + ;; | |
17084 + | |
17085 + -no-suppress) | |
17086 + suppress_opt=no | |
17087 + continue | |
17088 + ;; | |
17089 + | |
17090 + -Xcompiler) | |
17091 + arg_mode=arg # the next one goes into the "base_compile" arg list | |
17092 + continue # The current "srcfile" will either be retained or | |
17093 + ;; # replaced later. I would guess that would be a bug. | |
17094 + | |
17095 + -Wc,*) | |
17096 + func_stripname '-Wc,' '' "$arg" | |
17097 + args=$func_stripname_result | |
17098 + lastarg= | |
17099 + save_ifs="$IFS"; IFS=',' | |
17100 + for arg in $args; do | |
17101 + IFS="$save_ifs" | |
17102 + func_append_quoted lastarg "$arg" | |
17103 + done | |
17104 + IFS="$save_ifs" | |
17105 + func_stripname ' ' '' "$lastarg" | |
17106 + lastarg=$func_stripname_result | |
17107 + | |
17108 + # Add the arguments to base_compile. | |
17109 + func_append base_compile " $lastarg" | |
17110 + continue | |
17111 + ;; | |
17112 + | |
17113 + *) | |
17114 + # Accept the current argument as the source file. | |
17115 + # The previous "srcfile" becomes the current argument. | |
17116 + # | |
17117 + lastarg="$srcfile" | |
17118 + srcfile="$arg" | |
17119 + ;; | |
17120 + esac # case $arg | |
17121 + ;; | |
17122 + esac # case $arg_mode | |
17123 + | |
17124 + # Aesthetically quote the previous argument. | |
17125 + func_append_quoted base_compile "$lastarg" | |
17126 + done # for arg | |
17127 + | |
17128 + case $arg_mode in | |
17129 + arg) | |
17130 + func_fatal_error "you must specify an argument for -Xcompile" | |
17131 + ;; | |
17132 + target) | |
17133 + func_fatal_error "you must specify a target with \`-o'" | |
17134 + ;; | |
17135 + *) | |
17136 + # Get the name of the library object. | |
17137 + test -z "$libobj" && { | |
17138 + func_basename "$srcfile" | |
17139 + libobj="$func_basename_result" | |
17140 + } | |
17141 + ;; | |
17142 + esac | |
17143 + | |
17144 + # Recognize several different file suffixes. | |
17145 + # If the user specifies -o file.o, it is replaced with file.lo | |
17146 + case $libobj in | |
17147 + *.[cCFSifmso] | \ | |
17148 + *.ada | *.adb | *.ads | *.asm | \ | |
17149 + *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ | |
17150 + *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) | |
17151 + func_xform "$libobj" | |
17152 + libobj=$func_xform_result | |
17153 + ;; | |
17154 + esac | |
17155 + | |
17156 + case $libobj in | |
17157 + *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; | |
17158 + *) | |
17159 + func_fatal_error "cannot determine name of library object from \`$libobj'" | |
17160 + ;; | |
17161 + esac | |
17162 + | |
17163 + func_infer_tag $base_compile | |
17164 + | |
17165 + for arg in $later; do | |
17166 + case $arg in | |
17167 + -shared) | |
17168 + test "$build_libtool_libs" != yes && \ | |
17169 + func_fatal_configuration "can not build a shared library" | |
17170 + build_old_libs=no | |
17171 + continue | |
17172 + ;; | |
17173 + | |
17174 + -static) | |
17175 + build_libtool_libs=no | |
17176 + build_old_libs=yes | |
17177 + continue | |
17178 + ;; | |
17179 + | |
17180 + -prefer-pic) | |
17181 + pic_mode=yes | |
17182 + continue | |
17183 + ;; | |
17184 + | |
17185 + -prefer-non-pic) | |
17186 + pic_mode=no | |
17187 + continue | |
17188 + ;; | |
17189 + esac | |
17190 + done | |
17191 + | |
17192 + func_quote_for_eval "$libobj" | |
17193 + test "X$libobj" != "X$func_quote_for_eval_result" \ | |
17194 + && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ | |
17195 + && func_warning "libobj name \`$libobj' may not contain shell special characters." | |
17196 + func_dirname_and_basename "$obj" "/" "" | |
17197 + objname="$func_basename_result" | |
17198 + xdir="$func_dirname_result" | |
17199 + lobj=${xdir}$objdir/$objname | |
17200 + | |
17201 + test -z "$base_compile" && \ | |
17202 + func_fatal_help "you must specify a compilation command" | |
17203 + | |
17204 + # Delete any leftover library objects. | |
17205 + if test "$build_old_libs" = yes; then | |
17206 + removelist="$obj $lobj $libobj ${libobj}T" | |
17207 + else | |
17208 + removelist="$lobj $libobj ${libobj}T" | |
17209 + fi | |
17210 + | |
17211 + # On Cygwin there's no "real" PIC flag so we must build both object types | |
17212 + case $host_os in | |
17213 + cygwin* | mingw* | pw32* | os2* | cegcc*) | |
17214 + pic_mode=default | |
17215 + ;; | |
17216 + esac | |
17217 + if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then | |
17218 + # non-PIC code in shared libraries is not supported | |
17219 + pic_mode=default | |
17220 + fi | |
17221 + | |
17222 + # Calculate the filename of the output object if compiler does | |
17223 + # not support -o with -c | |
17224 + if test "$compiler_c_o" = no; then | |
17225 + output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext} | |
17226 + lockfile="$output_obj.lock" | |
17227 + else | |
17228 + output_obj= | |
17229 + need_locks=no | |
17230 + lockfile= | |
17231 + fi | |
17232 + | |
17233 + # Lock this critical section if it is needed | |
17234 + # We use this script file to make the link, it avoids creating a new file | |
17235 + if test "$need_locks" = yes; then | |
17236 + until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do | |
17237 + func_echo "Waiting for $lockfile to be removed" | |
17238 + sleep 2 | |
17239 + done | |
17240 + elif test "$need_locks" = warn; then | |
17241 + if test -f "$lockfile"; then | |
17242 + $ECHO "\ | |
17243 +*** ERROR, $lockfile exists and contains: | |
17244 +`cat $lockfile 2>/dev/null` | |
17245 + | |
17246 +This indicates that another process is trying to use the same | |
17247 +temporary object file, and libtool could not work around it because | |
17248 +your compiler does not support \`-c' and \`-o' together. If you | |
17249 +repeat this compilation, it may succeed, by chance, but you had better | |
17250 +avoid parallel builds (make -j) in this platform, or get a better | |
17251 +compiler." | |
17252 + | |
17253 + $opt_dry_run || $RM $removelist | |
17254 + exit $EXIT_FAILURE | |
17255 + fi | |
17256 + func_append removelist " $output_obj" | |
17257 + $ECHO "$srcfile" > "$lockfile" | |
17258 + fi | |
17259 + | |
17260 + $opt_dry_run || $RM $removelist | |
17261 + func_append removelist " $lockfile" | |
17262 + trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 | |
17263 + | |
17264 + func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 | |
17265 + srcfile=$func_to_tool_file_result | |
17266 + func_quote_for_eval "$srcfile" | |
17267 + qsrcfile=$func_quote_for_eval_result | |
17268 + | |
17269 + # Only build a PIC object if we are building libtool libraries. | |
17270 + if test "$build_libtool_libs" = yes; then | |
17271 + # Without this assignment, base_compile gets emptied. | |
17272 + fbsd_hideous_sh_bug=$base_compile | |
17273 + | |
17274 + if test "$pic_mode" != no; then | |
17275 + command="$base_compile $qsrcfile $pic_flag" | |
17276 + else | |
17277 + # Don't build PIC code | |
17278 + command="$base_compile $qsrcfile" | |
17279 + fi | |
17280 + | |
17281 + func_mkdir_p "$xdir$objdir" | |
17282 + | |
17283 + if test -z "$output_obj"; then | |
17284 + # Place PIC objects in $objdir | |
17285 + func_append command " -o $lobj" | |
17286 + fi | |
17287 + | |
17288 + func_show_eval_locale "$command" \ | |
17289 + 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' | |
17290 + | |
17291 + if test "$need_locks" = warn && | |
17292 + test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then | |
17293 + $ECHO "\ | |
17294 +*** ERROR, $lockfile contains: | |
17295 +`cat $lockfile 2>/dev/null` | |
17296 + | |
17297 +but it should contain: | |
17298 +$srcfile | |
17299 + | |
17300 +This indicates that another process is trying to use the same | |
17301 +temporary object file, and libtool could not work around it because | |
17302 +your compiler does not support \`-c' and \`-o' together. If you | |
17303 +repeat this compilation, it may succeed, by chance, but you had better | |
17304 +avoid parallel builds (make -j) in this platform, or get a better | |
17305 +compiler." | |
17306 + | |
17307 + $opt_dry_run || $RM $removelist | |
17308 + exit $EXIT_FAILURE | |
17309 + fi | |
17310 + | |
17311 + # Just move the object if needed, then go on to compile the next one | |
17312 + if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then | |
17313 + func_show_eval '$MV "$output_obj" "$lobj"' \ | |
17314 + 'error=$?; $opt_dry_run || $RM $removelist; exit $error' | |
17315 + fi | |
17316 + | |
17317 + # Allow error messages only from the first compilation. | |
17318 + if test "$suppress_opt" = yes; then | |
17319 + suppress_output=' >/dev/null 2>&1' | |
17320 + fi | |
17321 + fi | |
17322 + | |
17323 + # Only build a position-dependent object if we build old libraries. | |
17324 + if test "$build_old_libs" = yes; then | |
17325 + if test "$pic_mode" != yes; then | |
17326 + # Don't build PIC code | |
17327 + command="$base_compile $qsrcfile$pie_flag" | |
17328 + else | |
17329 + command="$base_compile $qsrcfile $pic_flag" | |
17330 + fi | |
17331 + if test "$compiler_c_o" = yes; then | |
17332 + func_append command " -o $obj" | |
17333 + fi | |
17334 + | |
17335 + # Suppress compiler output if we already did a PIC compilation. | |
17336 + func_append command "$suppress_output" | |
17337 + func_show_eval_locale "$command" \ | |
17338 + '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' | |
17339 + | |
17340 + if test "$need_locks" = warn && | |
17341 + test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then | |
17342 + $ECHO "\ | |
17343 +*** ERROR, $lockfile contains: | |
17344 +`cat $lockfile 2>/dev/null` | |
17345 + | |
17346 +but it should contain: | |
17347 +$srcfile | |
17348 + | |
17349 +This indicates that another process is trying to use the same | |
17350 +temporary object file, and libtool could not work around it because | |
17351 +your compiler does not support \`-c' and \`-o' together. If you | |
17352 +repeat this compilation, it may succeed, by chance, but you had better | |
17353 +avoid parallel builds (make -j) in this platform, or get a better | |
17354 +compiler." | |
17355 + | |
17356 + $opt_dry_run || $RM $removelist | |
17357 + exit $EXIT_FAILURE | |
17358 + fi | |
17359 + | |
17360 + # Just move the object if needed | |
17361 + if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then | |
17362 + func_show_eval '$MV "$output_obj" "$obj"' \ | |
17363 + 'error=$?; $opt_dry_run || $RM $removelist; exit $error' | |
17364 + fi | |
17365 + fi | |
17366 + | |
17367 + $opt_dry_run || { | |
17368 + func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" | |
17369 + | |
17370 + # Unlock the critical section if it was locked | |
17371 + if test "$need_locks" != no; then | |
17372 + removelist=$lockfile | |
17373 + $RM "$lockfile" | |
17374 + fi | |
17375 + } | |
17376 + | |
17377 + exit $EXIT_SUCCESS | |
17378 +} | |
17379 + | |
17380 +$opt_help || { | |
17381 + test "$opt_mode" = compile && func_mode_compile ${1+"$@"} | |
17382 +} | |
17383 + | |
17384 +func_mode_help () | |
17385 +{ | |
17386 + # We need to display help for each of the modes. | |
17387 + case $opt_mode in | |
17388 + "") | |
17389 + # Generic help is extracted from the usage comments | |
17390 + # at the start of this file. | |
17391 + func_help | |
17392 + ;; | |
17393 + | |
17394 + clean) | |
17395 + $ECHO \ | |
17396 +"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... | |
17397 + | |
17398 +Remove files from the build directory. | |
17399 + | |
17400 +RM is the name of the program to use to delete files associated with each FILE | |
17401 +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed | |
17402 +to RM. | |
17403 + | |
17404 +If FILE is a libtool library, object or program, all the files associated | |
17405 +with it are deleted. Otherwise, only FILE itself is deleted using RM." | |
17406 + ;; | |
17407 + | |
17408 + compile) | |
17409 + $ECHO \ | |
17410 +"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE | |
17411 + | |
17412 +Compile a source file into a libtool library object. | |
17413 + | |
17414 +This mode accepts the following additional options: | |
17415 + | |
17416 + -o OUTPUT-FILE set the output file name to OUTPUT-FILE | |
17417 + -no-suppress do not suppress compiler output for multiple passes | |
17418 + -prefer-pic try to build PIC objects only | |
17419 + -prefer-non-pic try to build non-PIC objects only | |
17420 + -shared do not build a \`.o' file suitable for static linking | |
17421 + -static only build a \`.o' file suitable for static linking | |
17422 + -Wc,FLAG pass FLAG directly to the compiler | |
17423 + | |
17424 +COMPILE-COMMAND is a command to be used in creating a \`standard' object file | |
17425 +from the given SOURCEFILE. | |
17426 + | |
17427 +The output file name is determined by removing the directory component from | |
17428 +SOURCEFILE, then substituting the C source code suffix \`.c' with the | |
17429 +library object suffix, \`.lo'." | |
17430 + ;; | |
17431 + | |
17432 + execute) | |
17433 + $ECHO \ | |
17434 +"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... | |
17435 + | |
17436 +Automatically set library path, then run a program. | |
17437 + | |
17438 +This mode accepts the following additional options: | |
17439 + | |
17440 + -dlopen FILE add the directory containing FILE to the library path | |
17441 + | |
17442 +This mode sets the library path environment variable according to \`-dlopen' | |
17443 +flags. | |
17444 + | |
17445 +If any of the ARGS are libtool executable wrappers, then they are translated | |
17446 +into their corresponding uninstalled binary, and any of their required library | |
17447 +directories are added to the library path. | |
17448 + | |
17449 +Then, COMMAND is executed, with ARGS as arguments." | |
17450 + ;; | |
17451 + | |
17452 + finish) | |
17453 + $ECHO \ | |
17454 +"Usage: $progname [OPTION]... --mode=finish [LIBDIR]... | |
17455 + | |
17456 +Complete the installation of libtool libraries. | |
17457 + | |
17458 +Each LIBDIR is a directory that contains libtool libraries. | |
17459 + | |
17460 +The commands that this mode executes may require superuser privileges. Use | |
17461 +the \`--dry-run' option if you just want to see what would be executed." | |
17462 + ;; | |
17463 + | |
17464 + install) | |
17465 + $ECHO \ | |
17466 +"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... | |
17467 + | |
17468 +Install executables or libraries. | |
17469 + | |
17470 +INSTALL-COMMAND is the installation command. The first component should be | |
17471 +either the \`install' or \`cp' program. | |
17472 + | |
17473 +The following components of INSTALL-COMMAND are treated specially: | |
17474 + | |
17475 + -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation | |
17476 + | |
17477 +The rest of the components are interpreted as arguments to that command (only | |
17478 +BSD-compatible install options are recognized)." | |
17479 + ;; | |
17480 + | |
17481 + link) | |
17482 + $ECHO \ | |
17483 +"Usage: $progname [OPTION]... --mode=link LINK-COMMAND... | |
17484 + | |
17485 +Link object files or libraries together to form another library, or to | |
17486 +create an executable program. | |
17487 + | |
17488 +LINK-COMMAND is a command using the C compiler that you would use to create | |
17489 +a program from several object files. | |
17490 + | |
17491 +The following components of LINK-COMMAND are treated specially: | |
17492 + | |
17493 + -all-static do not do any dynamic linking at all | |
17494 + -avoid-version do not add a version suffix if possible | |
17495 + -bindir BINDIR specify path to binaries directory (for systems where | |
17496 + libraries must be found in the PATH setting at runtime) | |
17497 + -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime | |
17498 + -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols | |
17499 + -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) | |
17500 + -export-symbols SYMFILE | |
17501 + try to export only the symbols listed in SYMFILE | |
17502 + -export-symbols-regex REGEX | |
17503 + try to export only the symbols matching REGEX | |
17504 + -LLIBDIR search LIBDIR for required installed libraries | |
17505 + -lNAME OUTPUT-FILE requires the installed library libNAME | |
17506 + -module build a library that can dlopened | |
17507 + -no-fast-install disable the fast-install mode | |
17508 + -no-install link a not-installable executable | |
17509 + -no-undefined declare that a library does not refer to external symbols | |
17510 + -o OUTPUT-FILE create OUTPUT-FILE from the specified objects | |
17511 + -objectlist FILE Use a list of object files found in FILE to specify objects | |
17512 + -precious-files-regex REGEX | |
17513 + don't remove output files matching REGEX | |
17514 + -release RELEASE specify package release information | |
17515 + -rpath LIBDIR the created library will eventually be installed in LIBDIR | |
17516 + -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries | |
17517 + -shared only do dynamic linking of libtool libraries | |
17518 + -shrext SUFFIX override the standard shared library file extension | |
17519 + -static do not do any dynamic linking of uninstalled libtool libraries | |
17520 + -static-libtool-libs | |
17521 + do not do any dynamic linking of libtool libraries | |
17522 + -version-info CURRENT[:REVISION[:AGE]] | |
17523 + specify library version info [each variable defaults to 0] | |
17524 + -weak LIBNAME declare that the target provides the LIBNAME interface | |
17525 + -Wc,FLAG | |
17526 + -Xcompiler FLAG pass linker-specific FLAG directly to the compiler | |
17527 + -Wl,FLAG | |
17528 + -Xlinker FLAG pass linker-specific FLAG directly to the linker | |
17529 + -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) | |
17530 + | |
17531 +All other options (arguments beginning with \`-') are ignored. | |
17532 + | |
17533 +Every other argument is treated as a filename. Files ending in \`.la' are | |
17534 +treated as uninstalled libtool libraries, other files are standard or library | |
17535 +object files. | |
17536 + | |
17537 +If the OUTPUT-FILE ends in \`.la', then a libtool library is created, | |
17538 +only library objects (\`.lo' files) may be specified, and \`-rpath' is | |
17539 +required, except when creating a convenience library. | |
17540 + | |
17541 +If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created | |
17542 +using \`ar' and \`ranlib', or on Windows using \`lib'. | |
17543 + | |
17544 +If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file | |
17545 +is created, otherwise an executable program is created." | |
17546 + ;; | |
17547 + | |
17548 + uninstall) | |
17549 + $ECHO \ | |
17550 +"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... | |
17551 + | |
17552 +Remove libraries from an installation directory. | |
17553 + | |
17554 +RM is the name of the program to use to delete files associated with each FILE | |
17555 +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed | |
17556 +to RM. | |
17557 + | |
17558 +If FILE is a libtool library, all the files associated with it are deleted. | |
17559 +Otherwise, only FILE itself is deleted using RM." | |
17560 + ;; | |
17561 + | |
17562 + *) | |
17563 + func_fatal_help "invalid operation mode \`$opt_mode'" | |
17564 + ;; | |
17565 + esac | |
17566 + | |
17567 + echo | |
17568 + $ECHO "Try \`$progname --help' for more information about other modes." | |
17569 +} | |
17570 + | |
17571 +# Now that we've collected a possible --mode arg, show help if necessary | |
17572 +if $opt_help; then | |
17573 + if test "$opt_help" = :; then | |
17574 + func_mode_help | |
17575 + else | |
17576 + { | |
17577 + func_help noexit | |
17578 + for opt_mode in compile link execute install finish uninstall clean; do | |
17579 + func_mode_help | |
17580 + done | |
17581 + } | sed -n '1p; 2,$s/^Usage:/ or: /p' | |
17582 + { | |
17583 + func_help noexit | |
17584 + for opt_mode in compile link execute install finish uninstall clean; do | |
17585 + echo | |
17586 + func_mode_help | |
17587 + done | |
17588 + } | | |
17589 + sed '1d | |
17590 + /^When reporting/,/^Report/{ | |
17591 + H | |
17592 + d | |
17593 + } | |
17594 + $x | |
17595 + /information about other modes/d | |
17596 + /more detailed .*MODE/d | |
17597 + s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' | |
17598 + fi | |
17599 + exit $? | |
17600 +fi | |
17601 + | |
17602 + | |
17603 +# func_mode_execute arg... | |
17604 +func_mode_execute () | |
17605 +{ | |
17606 + $opt_debug | |
17607 + # The first argument is the command name. | |
17608 + cmd="$nonopt" | |
17609 + test -z "$cmd" && \ | |
17610 + func_fatal_help "you must specify a COMMAND" | |
17611 + | |
17612 + # Handle -dlopen flags immediately. | |
17613 + for file in $opt_dlopen; do | |
17614 + test -f "$file" \ | |
17615 + || func_fatal_help "\`$file' is not a file" | |
17616 + | |
17617 + dir= | |
17618 + case $file in | |
17619 + *.la) | |
17620 + func_resolve_sysroot "$file" | |
17621 + file=$func_resolve_sysroot_result | |
17622 + | |
17623 + # Check to see that this really is a libtool archive. | |
17624 + func_lalib_unsafe_p "$file" \ | |
17625 + || func_fatal_help "\`$lib' is not a valid libtool archive" | |
17626 + | |
17627 + # Read the libtool library. | |
17628 + dlname= | |
17629 + library_names= | |
17630 + func_source "$file" | |
17631 + | |
17632 + # Skip this library if it cannot be dlopened. | |
17633 + if test -z "$dlname"; then | |
17634 + # Warn if it was a shared library. | |
17635 + test -n "$library_names" && \ | |
17636 + func_warning "\`$file' was not linked with \`-export-dynamic'" | |
17637 + continue | |
17638 + fi | |
17639 + | |
17640 + func_dirname "$file" "" "." | |
17641 + dir="$func_dirname_result" | |
17642 + | |
17643 + if test -f "$dir/$objdir/$dlname"; then | |
17644 + func_append dir "/$objdir" | |
17645 + else | |
17646 + if test ! -f "$dir/$dlname"; then | |
17647 + func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" | |
17648 + fi | |
17649 + fi | |
17650 + ;; | |
17651 + | |
17652 + *.lo) | |
17653 + # Just add the directory containing the .lo file. | |
17654 + func_dirname "$file" "" "." | |
17655 + dir="$func_dirname_result" | |
17656 + ;; | |
17657 + | |
17658 + *) | |
17659 + func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" | |
17660 + continue | |
17661 + ;; | |
17662 + esac | |
17663 + | |
17664 + # Get the absolute pathname. | |
17665 + absdir=`cd "$dir" && pwd` | |
17666 + test -n "$absdir" && dir="$absdir" | |
17667 + | |
17668 + # Now add the directory to shlibpath_var. | |
17669 + if eval "test -z \"\$$shlibpath_var\""; then | |
17670 + eval "$shlibpath_var=\"\$dir\"" | |
17671 + else | |
17672 + eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" | |
17673 + fi | |
17674 + done | |
17675 + | |
17676 + # This variable tells wrapper scripts just to set shlibpath_var | |
17677 + # rather than running their programs. | |
17678 + libtool_execute_magic="$magic" | |
17679 + | |
17680 + # Check if any of the arguments is a wrapper script. | |
17681 + args= | |
17682 + for file | |
17683 + do | |
17684 + case $file in | |
17685 + -* | *.la | *.lo ) ;; | |
17686 + *) | |
17687 + # Do a test to see if this is really a libtool program. | |
17688 + if func_ltwrapper_script_p "$file"; then | |
17689 + func_source "$file" | |
17690 + # Transform arg to wrapped name. | |
17691 + file="$progdir/$program" | |
17692 + elif func_ltwrapper_executable_p "$file"; then | |
17693 + func_ltwrapper_scriptname "$file" | |
17694 + func_source "$func_ltwrapper_scriptname_result" | |
17695 + # Transform arg to wrapped name. | |
17696 + file="$progdir/$program" | |
17697 + fi | |
17698 + ;; | |
17699 + esac | |
17700 + # Quote arguments (to preserve shell metacharacters). | |
17701 + func_append_quoted args "$file" | |
17702 + done | |
17703 + | |
17704 + if test "X$opt_dry_run" = Xfalse; then | |
17705 + if test -n "$shlibpath_var"; then | |
17706 + # Export the shlibpath_var. | |
17707 + eval "export $shlibpath_var" | |
17708 + fi | |
17709 + | |
17710 + # Restore saved environment variables | |
17711 + for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES | |
17712 + do | |
17713 + eval "if test \"\${save_$lt_var+set}\" = set; then | |
17714 + $lt_var=\$save_$lt_var; export $lt_var | |
17715 + else | |
17716 + $lt_unset $lt_var | |
17717 + fi" | |
17718 + done | |
17719 + | |
17720 + # Now prepare to actually exec the command. | |
17721 + exec_cmd="\$cmd$args" | |
17722 + else | |
17723 + # Display what would be done. | |
17724 + if test -n "$shlibpath_var"; then | |
17725 + eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" | |
17726 + echo "export $shlibpath_var" | |
17727 + fi | |
17728 + $ECHO "$cmd$args" | |
17729 + exit $EXIT_SUCCESS | |
17730 + fi | |
17731 +} | |
17732 + | |
17733 +test "$opt_mode" = execute && func_mode_execute ${1+"$@"} | |
17734 + | |
17735 + | |
17736 +# func_mode_finish arg... | |
17737 +func_mode_finish () | |
17738 +{ | |
17739 + $opt_debug | |
17740 + libs= | |
17741 + libdirs= | |
17742 + admincmds= | |
17743 + | |
17744 + for opt in "$nonopt" ${1+"$@"} | |
17745 + do | |
17746 + if test -d "$opt"; then | |
17747 + func_append libdirs " $opt" | |
17748 + | |
17749 + elif test -f "$opt"; then | |
17750 + if func_lalib_unsafe_p "$opt"; then | |
17751 + func_append libs " $opt" | |
17752 + else | |
17753 + func_warning "\`$opt' is not a valid libtool archive" | |
17754 + fi | |
17755 + | |
17756 + else | |
17757 + func_fatal_error "invalid argument \`$opt'" | |
17758 + fi | |
17759 + done | |
17760 + | |
17761 + if test -n "$libs"; then | |
17762 + if test -n "$lt_sysroot"; then | |
17763 + sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` | |
17764 + sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" | |
17765 + else | |
17766 + sysroot_cmd= | |
17767 + fi | |
17768 + | |
17769 + # Remove sysroot references | |
17770 + if $opt_dry_run; then | |
17771 + for lib in $libs; do | |
17772 + echo "removing references to $lt_sysroot and \`=' prefixes from $lib" | |
17773 + done | |
17774 + else | |
17775 + tmpdir=`func_mktempdir` | |
17776 + for lib in $libs; do | |
17777 + sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ | |
17778 + > $tmpdir/tmp-la | |
17779 + mv -f $tmpdir/tmp-la $lib | |
17780 + done | |
17781 + ${RM}r "$tmpdir" | |
17782 + fi | |
17783 + fi | |
17784 + | |
17785 + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then | |
17786 + for libdir in $libdirs; do | |
17787 + if test -n "$finish_cmds"; then | |
17788 + # Do each command in the finish commands. | |
17789 + func_execute_cmds "$finish_cmds" 'admincmds="$admincmds | |
17790 +'"$cmd"'"' | |
17791 + fi | |
17792 + if test -n "$finish_eval"; then | |
17793 + # Do the single finish_eval. | |
17794 + eval cmds=\"$finish_eval\" | |
17795 + $opt_dry_run || eval "$cmds" || func_append admincmds " | |
17796 + $cmds" | |
17797 + fi | |
17798 + done | |
17799 + fi | |
17800 + | |
17801 + # Exit here if they wanted silent mode. | |
17802 + $opt_silent && exit $EXIT_SUCCESS | |
17803 + | |
17804 + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then | |
17805 + echo "----------------------------------------------------------------------" | |
17806 + echo "Libraries have been installed in:" | |
17807 + for libdir in $libdirs; do | |
17808 + $ECHO " $libdir" | |
17809 + done | |
17810 + echo | |
17811 + echo "If you ever happen to want to link against installed libraries" | |
17812 + echo "in a given directory, LIBDIR, you must either use libtool, and" | |
17813 + echo "specify the full pathname of the library, or use the \`-LLIBDIR'" | |
17814 + echo "flag during linking and do at least one of the following:" | |
17815 + if test -n "$shlibpath_var"; then | |
17816 + echo " - add LIBDIR to the \`$shlibpath_var' environment variable" | |
17817 + echo " during execution" | |
17818 + fi | |
17819 + if test -n "$runpath_var"; then | |
17820 + echo " - add LIBDIR to the \`$runpath_var' environment variable" | |
17821 + echo " during linking" | |
17822 + fi | |
17823 + if test -n "$hardcode_libdir_flag_spec"; then | |
17824 + libdir=LIBDIR | |
17825 + eval flag=\"$hardcode_libdir_flag_spec\" | |
17826 + | |
17827 + $ECHO " - use the \`$flag' linker flag" | |
17828 + fi | |
17829 + if test -n "$admincmds"; then | |
17830 + $ECHO " - have your system administrator run these commands:$admincmds" | |
17831 + fi | |
17832 + if test -f /etc/ld.so.conf; then | |
17833 + echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" | |
17834 + fi | |
17835 + echo | |
17836 + | |
17837 + echo "See any operating system documentation about shared libraries for" | |
17838 + case $host in | |
17839 + solaris2.[6789]|solaris2.1[0-9]) | |
17840 + echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" | |
17841 + echo "pages." | |
17842 + ;; | |
17843 + *) | |
17844 + echo "more information, such as the ld(1) and ld.so(8) manual pages." | |
17845 + ;; | |
17846 + esac | |
17847 + echo "----------------------------------------------------------------------" | |
17848 + fi | |
17849 + exit $EXIT_SUCCESS | |
17850 +} | |
17851 + | |
17852 +test "$opt_mode" = finish && func_mode_finish ${1+"$@"} | |
17853 + | |
17854 + | |
17855 +# func_mode_install arg... | |
17856 +func_mode_install () | |
17857 +{ | |
17858 + $opt_debug | |
17859 + # There may be an optional sh(1) argument at the beginning of | |
17860 + # install_prog (especially on Windows NT). | |
17861 + if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || | |
17862 + # Allow the use of GNU shtool's install command. | |
17863 + case $nonopt in *shtool*) :;; *) false;; esac; then | |
17864 + # Aesthetically quote it. | |
17865 + func_quote_for_eval "$nonopt" | |
17866 + install_prog="$func_quote_for_eval_result " | |
17867 + arg=$1 | |
17868 + shift | |
17869 + else | |
17870 + install_prog= | |
17871 + arg=$nonopt | |
17872 + fi | |
17873 + | |
17874 + # The real first argument should be the name of the installation program. | |
17875 + # Aesthetically quote it. | |
17876 + func_quote_for_eval "$arg" | |
17877 + func_append install_prog "$func_quote_for_eval_result" | |
17878 + install_shared_prog=$install_prog | |
17879 + case " $install_prog " in | |
17880 + *[\\\ /]cp\ *) install_cp=: ;; | |
17881 + *) install_cp=false ;; | |
17882 + esac | |
17883 + | |
17884 + # We need to accept at least all the BSD install flags. | |
17885 + dest= | |
17886 + files= | |
17887 + opts= | |
17888 + prev= | |
17889 + install_type= | |
17890 + isdir=no | |
17891 + stripme= | |
17892 + no_mode=: | |
17893 + for arg | |
17894 + do | |
17895 + arg2= | |
17896 + if test -n "$dest"; then | |
17897 + func_append files " $dest" | |
17898 + dest=$arg | |
17899 + continue | |
17900 + fi | |
17901 + | |
17902 + case $arg in | |
17903 + -d) isdir=yes ;; | |
17904 + -f) | |
17905 + if $install_cp; then :; else | |
17906 + prev=$arg | |
17907 + fi | |
17908 + ;; | |
17909 + -g | -m | -o) | |
17910 + prev=$arg | |
17911 + ;; | |
17912 + -s) | |
17913 + stripme=" -s" | |
17914 + continue | |
17915 + ;; | |
17916 + -*) | |
17917 + ;; | |
17918 + *) | |
17919 + # If the previous option needed an argument, then skip it. | |
17920 + if test -n "$prev"; then | |
17921 + if test "x$prev" = x-m && test -n "$install_override_mode"; then | |
17922 + arg2=$install_override_mode | |
17923 + no_mode=false | |
17924 + fi | |
17925 + prev= | |
17926 + else | |
17927 + dest=$arg | |
17928 + continue | |
17929 + fi | |
17930 + ;; | |
17931 + esac | |
17932 + | |
17933 + # Aesthetically quote the argument. | |
17934 + func_quote_for_eval "$arg" | |
17935 + func_append install_prog " $func_quote_for_eval_result" | |
17936 + if test -n "$arg2"; then | |
17937 + func_quote_for_eval "$arg2" | |
17938 + fi | |
17939 + func_append install_shared_prog " $func_quote_for_eval_result" | |
17940 + done | |
17941 + | |
17942 + test -z "$install_prog" && \ | |
17943 + func_fatal_help "you must specify an install program" | |
17944 + | |
17945 + test -n "$prev" && \ | |
17946 + func_fatal_help "the \`$prev' option requires an argument" | |
17947 + | |
17948 + if test -n "$install_override_mode" && $no_mode; then | |
17949 + if $install_cp; then :; else | |
17950 + func_quote_for_eval "$install_override_mode" | |
17951 + func_append install_shared_prog " -m $func_quote_for_eval_result" | |
17952 + fi | |
17953 + fi | |
17954 + | |
17955 + if test -z "$files"; then | |
17956 + if test -z "$dest"; then | |
17957 + func_fatal_help "no file or destination specified" | |
17958 + else | |
17959 + func_fatal_help "you must specify a destination" | |
17960 + fi | |
17961 + fi | |
17962 + | |
17963 + # Strip any trailing slash from the destination. | |
17964 + func_stripname '' '/' "$dest" | |
17965 + dest=$func_stripname_result | |
17966 + | |
17967 + # Check to see that the destination is a directory. | |
17968 + test -d "$dest" && isdir=yes | |
17969 + if test "$isdir" = yes; then | |
17970 + destdir="$dest" | |
17971 + destname= | |
17972 + else | |
17973 + func_dirname_and_basename "$dest" "" "." | |
17974 + destdir="$func_dirname_result" | |
17975 + destname="$func_basename_result" | |
17976 + | |
17977 + # Not a directory, so check to see that there is only one file specified. | |
17978 + set dummy $files; shift | |
17979 + test "$#" -gt 1 && \ | |
17980 + func_fatal_help "\`$dest' is not a directory" | |
17981 + fi | |
17982 + case $destdir in | |
17983 + [\\/]* | [A-Za-z]:[\\/]*) ;; | |
17984 + *) | |
17985 + for file in $files; do | |
17986 + case $file in | |
17987 + *.lo) ;; | |
17988 + *) | |
17989 + func_fatal_help "\`$destdir' must be an absolute directory name" | |
17990 + ;; | |
17991 + esac | |
17992 + done | |
17993 + ;; | |
17994 + esac | |
17995 + | |
17996 + # This variable tells wrapper scripts just to set variables rather | |
17997 + # than running their programs. | |
17998 + libtool_install_magic="$magic" | |
17999 + | |
18000 + staticlibs= | |
18001 + future_libdirs= | |
18002 + current_libdirs= | |
18003 + for file in $files; do | |
18004 + | |
18005 + # Do each installation. | |
18006 + case $file in | |
18007 + *.$libext) | |
18008 + # Do the static libraries later. | |
18009 + func_append staticlibs " $file" | |
18010 + ;; | |
18011 + | |
18012 + *.la) | |
18013 + func_resolve_sysroot "$file" | |
18014 + file=$func_resolve_sysroot_result | |
18015 + | |
18016 + # Check to see that this really is a libtool archive. | |
18017 + func_lalib_unsafe_p "$file" \ | |
18018 + || func_fatal_help "\`$file' is not a valid libtool archive" | |
18019 + | |
18020 + library_names= | |
18021 + old_library= | |
18022 + relink_command= | |
18023 + func_source "$file" | |
18024 + | |
18025 + # Add the libdir to current_libdirs if it is the destination. | |
18026 + if test "X$destdir" = "X$libdir"; then | |
18027 + case "$current_libdirs " in | |
18028 + *" $libdir "*) ;; | |
18029 + *) func_append current_libdirs " $libdir" ;; | |
18030 + esac | |
18031 + else | |
18032 + # Note the libdir as a future libdir. | |
18033 + case "$future_libdirs " in | |
18034 + *" $libdir "*) ;; | |
18035 + *) func_append future_libdirs " $libdir" ;; | |
18036 + esac | |
18037 + fi | |
18038 + | |
18039 + func_dirname "$file" "/" "" | |
18040 + dir="$func_dirname_result" | |
18041 + func_append dir "$objdir" | |
18042 + | |
18043 + if test -n "$relink_command"; then | |
18044 + # Determine the prefix the user has applied to our future dir. | |
18045 + inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` | |
18046 + | |
18047 + # Don't allow the user to place us outside of our expected | |
18048 + # location b/c this prevents finding dependent libraries that | |
18049 + # are installed to the same prefix. | |
18050 + # At present, this check doesn't affect windows .dll's that | |
18051 + # are installed into $libdir/../bin (currently, that works fine) | |
18052 + # but it's something to keep an eye on. | |
18053 + test "$inst_prefix_dir" = "$destdir" && \ | |
18054 + func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" | |
18055 + | |
18056 + if test -n "$inst_prefix_dir"; then | |
18057 + # Stick the inst_prefix_dir data into the link command. | |
18058 + relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` | |
18059 + else | |
18060 + relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` | |
18061 + fi | |
18062 + | |
18063 + func_warning "relinking \`$file'" | |
18064 + func_show_eval "$relink_command" \ | |
18065 + 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' | |
18066 + fi | |
18067 + | |
18068 + # See the names of the shared library. | |
18069 + set dummy $library_names; shift | |
18070 + if test -n "$1"; then | |
18071 + realname="$1" | |
18072 + shift | |
18073 + | |
18074 + srcname="$realname" | |
18075 + test -n "$relink_command" && srcname="$realname"T | |
18076 + | |
18077 + # Install the shared library and build the symlinks. | |
18078 + func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ | |
18079 + 'exit $?' | |
18080 + tstripme="$stripme" | |
18081 + case $host_os in | |
18082 + cygwin* | mingw* | pw32* | cegcc*) | |
18083 + case $realname in | |
18084 + *.dll.a) | |
18085 + tstripme="" | |
18086 + ;; | |
18087 + esac | |
18088 + ;; | |
18089 + esac | |
18090 + if test -n "$tstripme" && test -n "$striplib"; then | |
18091 + func_show_eval "$striplib $destdir/$realname" 'exit $?' | |
18092 + fi | |
18093 + | |
18094 + if test "$#" -gt 0; then | |
18095 + # Delete the old symlinks, and create new ones. | |
18096 + # Try `ln -sf' first, because the `ln' binary might depend on | |
18097 + # the symlink we replace! Solaris /bin/ln does not understand -f, | |
18098 + # so we also need to try rm && ln -s. | |
18099 + for linkname | |
18100 + do | |
18101 + test "$linkname" != "$realname" \ | |
18102 + && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" | |
18103 + done | |
18104 + fi | |
18105 + | |
18106 + # Do each command in the postinstall commands. | |
18107 + lib="$destdir/$realname" | |
18108 + func_execute_cmds "$postinstall_cmds" 'exit $?' | |
18109 + fi | |
18110 + | |
18111 + # Install the pseudo-library for information purposes. | |
18112 + func_basename "$file" | |
18113 + name="$func_basename_result" | |
18114 + instname="$dir/$name"i | |
18115 + func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' | |
18116 + | |
18117 + # Maybe install the static library, too. | |
18118 + test -n "$old_library" && func_append staticlibs " $dir/$old_library" | |
18119 + ;; | |
18120 + | |
18121 + *.lo) | |
18122 + # Install (i.e. copy) a libtool object. | |
18123 + | |
18124 + # Figure out destination file name, if it wasn't already specified. | |
18125 + if test -n "$destname"; then | |
18126 + destfile="$destdir/$destname" | |
18127 + else | |
18128 + func_basename "$file" | |
18129 + destfile="$func_basename_result" | |
18130 + destfile="$destdir/$destfile" | |
18131 + fi | |
18132 + | |
18133 + # Deduce the name of the destination old-style object file. | |
18134 + case $destfile in | |
18135 + *.lo) | |
18136 + func_lo2o "$destfile" | |
18137 + staticdest=$func_lo2o_result | |
18138 + ;; | |
18139 + *.$objext) | |
18140 + staticdest="$destfile" | |
18141 + destfile= | |
18142 + ;; | |
18143 + *) | |
18144 + func_fatal_help "cannot copy a libtool object to \`$destfile'" | |
18145 + ;; | |
18146 + esac | |
18147 + | |
18148 + # Install the libtool object if requested. | |
18149 + test -n "$destfile" && \ | |
18150 + func_show_eval "$install_prog $file $destfile" 'exit $?' | |
18151 + | |
18152 + # Install the old object if enabled. | |
18153 + if test "$build_old_libs" = yes; then | |
18154 + # Deduce the name of the old-style object file. | |
18155 + func_lo2o "$file" | |
18156 + staticobj=$func_lo2o_result | |
18157 + func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' | |
18158 + fi | |
18159 + exit $EXIT_SUCCESS | |
18160 + ;; | |
18161 + | |
18162 + *) | |
18163 + # Figure out destination file name, if it wasn't already specified. | |
18164 + if test -n "$destname"; then | |
18165 + destfile="$destdir/$destname" | |
18166 + else | |
18167 + func_basename "$file" | |
18168 + destfile="$func_basename_result" | |
18169 + destfile="$destdir/$destfile" | |
18170 + fi | |
18171 + | |
18172 + # If the file is missing, and there is a .exe on the end, strip it | |
18173 + # because it is most likely a libtool script we actually want to | |
18174 + # install | |
18175 + stripped_ext="" | |
18176 + case $file in | |
18177 + *.exe) | |
18178 + if test ! -f "$file"; then | |
18179 + func_stripname '' '.exe' "$file" | |
18180 + file=$func_stripname_result | |
18181 + stripped_ext=".exe" | |
18182 + fi | |
18183 + ;; | |
18184 + esac | |
18185 + | |
18186 + # Do a test to see if this is really a libtool program. | |
18187 + case $host in | |
18188 + *cygwin* | *mingw*) | |
18189 + if func_ltwrapper_executable_p "$file"; then | |
18190 + func_ltwrapper_scriptname "$file" | |
18191 + wrapper=$func_ltwrapper_scriptname_result | |
18192 + else | |
18193 + func_stripname '' '.exe' "$file" | |
18194 + wrapper=$func_stripname_result | |
18195 + fi | |
18196 + ;; | |
18197 + *) | |
18198 + wrapper=$file | |
18199 + ;; | |
18200 + esac | |
18201 + if func_ltwrapper_script_p "$wrapper"; then | |
18202 + notinst_deplibs= | |
18203 + relink_command= | |
18204 + | |
18205 + func_source "$wrapper" | |
18206 + | |
18207 + # Check the variables that should have been set. | |
18208 + test -z "$generated_by_libtool_version" && \ | |
18209 + func_fatal_error "invalid libtool wrapper script \`$wrapper'" | |
18210 + | |
18211 + finalize=yes | |
18212 + for lib in $notinst_deplibs; do | |
18213 + # Check to see that each library is installed. | |
18214 + libdir= | |
18215 + if test -f "$lib"; then | |
18216 + func_source "$lib" | |
18217 + fi | |
18218 + libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test | |
18219 + if test -n "$libdir" && test ! -f "$libfile"; then | |
18220 + func_warning "\`$lib' has not been installed in \`$libdir'" | |
18221 + finalize=no | |
18222 + fi | |
18223 + done | |
18224 + | |
18225 + relink_command= | |
18226 + func_source "$wrapper" | |
18227 + | |
18228 + outputname= | |
18229 + if test "$fast_install" = no && test -n "$relink_command"; then | |
18230 + $opt_dry_run || { | |
18231 + if test "$finalize" = yes; then | |
18232 + tmpdir=`func_mktempdir` | |
18233 + func_basename "$file$stripped_ext" | |
18234 + file="$func_basename_result" | |
18235 + outputname="$tmpdir/$file" | |
18236 + # Replace the output file specification. | |
18237 + relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` | |
18238 + | |
18239 + $opt_silent || { | |
18240 + func_quote_for_expand "$relink_command" | |
18241 + eval "func_echo $func_quote_for_expand_result" | |
18242 + } | |
18243 + if eval "$relink_command"; then : | |
18244 + else | |
18245 + func_error "error: relink \`$file' with the above command before installing it" | |
18246 + $opt_dry_run || ${RM}r "$tmpdir" | |
18247 + continue | |
18248 + fi | |
18249 + file="$outputname" | |
18250 + else | |
18251 + func_warning "cannot relink \`$file'" | |
18252 + fi | |
18253 + } | |
18254 + else | |
18255 + # Install the binary that we compiled earlier. | |
18256 + file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` | |
18257 + fi | |
18258 + fi | |
18259 + | |
18260 + # remove .exe since cygwin /usr/bin/install will append another | |
18261 + # one anyway | |
18262 + case $install_prog,$host in | |
18263 + */usr/bin/install*,*cygwin*) | |
18264 + case $file:$destfile in | |
18265 + *.exe:*.exe) | |
18266 + # this is ok | |
18267 + ;; | |
18268 + *.exe:*) | |
18269 + destfile=$destfile.exe | |
18270 + ;; | |
18271 + *:*.exe) | |
18272 + func_stripname '' '.exe' "$destfile" | |
18273 + destfile=$func_stripname_result | |
18274 + ;; | |
18275 + esac | |
18276 + ;; | |
18277 + esac | |
18278 + func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' | |
18279 + $opt_dry_run || if test -n "$outputname"; then | |
18280 + ${RM}r "$tmpdir" | |
18281 + fi | |
18282 + ;; | |
18283 + esac | |
18284 + done | |
18285 + | |
18286 + for file in $staticlibs; do | |
18287 + func_basename "$file" | |
18288 + name="$func_basename_result" | |
18289 + | |
18290 + # Set up the ranlib parameters. | |
18291 + oldlib="$destdir/$name" | |
18292 + func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 | |
18293 + tool_oldlib=$func_to_tool_file_result | |
18294 + | |
18295 + func_show_eval "$install_prog \$file \$oldlib" 'exit $?' | |
18296 + | |
18297 + if test -n "$stripme" && test -n "$old_striplib"; then | |
18298 + func_show_eval "$old_striplib $tool_oldlib" 'exit $?' | |
18299 + fi | |
18300 + | |
18301 + # Do each command in the postinstall commands. | |
18302 + func_execute_cmds "$old_postinstall_cmds" 'exit $?' | |
18303 + done | |
18304 + | |
18305 + test -n "$future_libdirs" && \ | |
18306 + func_warning "remember to run \`$progname --finish$future_libdirs'" | |
18307 + | |
18308 + if test -n "$current_libdirs"; then | |
18309 + # Maybe just do a dry run. | |
18310 + $opt_dry_run && current_libdirs=" -n$current_libdirs" | |
18311 + exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' | |
18312 + else | |
18313 + exit $EXIT_SUCCESS | |
18314 + fi | |
18315 +} | |
18316 + | |
18317 +test "$opt_mode" = install && func_mode_install ${1+"$@"} | |
18318 + | |
18319 + | |
18320 +# func_generate_dlsyms outputname originator pic_p | |
18321 +# Extract symbols from dlprefiles and create ${outputname}S.o with | |
18322 +# a dlpreopen symbol table. | |
18323 +func_generate_dlsyms () | |
18324 +{ | |
18325 + $opt_debug | |
18326 + my_outputname="$1" | |
18327 + my_originator="$2" | |
18328 + my_pic_p="${3-no}" | |
18329 + my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` | |
18330 + my_dlsyms= | |
18331 + | |
18332 + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then | |
18333 + if test -n "$NM" && test -n "$global_symbol_pipe"; then | |
18334 + my_dlsyms="${my_outputname}S.c" | |
18335 + else | |
18336 + func_error "not configured to extract global symbols from dlpreopened files" | |
18337 + fi | |
18338 + fi | |
18339 + | |
18340 + if test -n "$my_dlsyms"; then | |
18341 + case $my_dlsyms in | |
18342 + "") ;; | |
18343 + *.c) | |
18344 + # Discover the nlist of each of the dlfiles. | |
18345 + nlist="$output_objdir/${my_outputname}.nm" | |
18346 + | |
18347 + func_show_eval "$RM $nlist ${nlist}S ${nlist}T" | |
18348 + | |
18349 + # Parse the name list into a source file. | |
18350 + func_verbose "creating $output_objdir/$my_dlsyms" | |
18351 + | |
18352 + $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ | |
18353 +/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ | |
18354 +/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ | |
18355 + | |
18356 +#ifdef __cplusplus | |
18357 +extern \"C\" { | |
18358 +#endif | |
18359 + | |
18360 +#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) | |
18361 +#pragma GCC diagnostic ignored \"-Wstrict-prototypes\" | |
18362 +#endif | |
18363 + | |
18364 +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ | |
18365 +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) | |
18366 +/* DATA imports from DLLs on WIN32 con't be const, because runtime | |
18367 + relocations are performed -- see ld's documentation on pseudo-relocs. */ | |
18368 +# define LT_DLSYM_CONST | |
18369 +#elif defined(__osf__) | |
18370 +/* This system does not cope well with relocations in const data. */ | |
18371 +# define LT_DLSYM_CONST | |
18372 +#else | |
18373 +# define LT_DLSYM_CONST const | |
18374 +#endif | |
18375 + | |
18376 +/* External symbol declarations for the compiler. */\ | |
18377 +" | |
18378 + | |
18379 + if test "$dlself" = yes; then | |
18380 + func_verbose "generating symbol list for \`$output'" | |
18381 + | |
18382 + $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" | |
18383 + | |
18384 + # Add our own program objects to the symbol list. | |
18385 + progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` | |
18386 + for progfile in $progfiles; do | |
18387 + func_to_tool_file "$progfile" func_convert_file_msys_to_w32 | |
18388 + func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" | |
18389 + $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" | |
18390 + done | |
18391 + | |
18392 + if test -n "$exclude_expsyms"; then | |
18393 + $opt_dry_run || { | |
18394 + eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' | |
18395 + eval '$MV "$nlist"T "$nlist"' | |
18396 + } | |
18397 + fi | |
18398 + | |
18399 + if test -n "$export_symbols_regex"; then | |
18400 + $opt_dry_run || { | |
18401 + eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' | |
18402 + eval '$MV "$nlist"T "$nlist"' | |
18403 + } | |
18404 + fi | |
18405 + | |
18406 + # Prepare the list of exported symbols | |
18407 + if test -z "$export_symbols"; then | |
18408 + export_symbols="$output_objdir/$outputname.exp" | |
18409 + $opt_dry_run || { | |
18410 + $RM $export_symbols | |
18411 + eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' | |
18412 + case $host in | |
18413 + *cygwin* | *mingw* | *cegcc* ) | |
18414 + eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' | |
18415 + eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' | |
18416 + ;; | |
18417 + esac | |
18418 + } | |
18419 + else | |
18420 + $opt_dry_run || { | |
18421 + eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' | |
18422 + eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' | |
18423 + eval '$MV "$nlist"T "$nlist"' | |
18424 + case $host in | |
18425 + *cygwin* | *mingw* | *cegcc* ) | |
18426 + eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' | |
18427 + eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' | |
18428 + ;; | |
18429 + esac | |
18430 + } | |
18431 + fi | |
18432 + fi | |
18433 + | |
18434 + for dlprefile in $dlprefiles; do | |
18435 + func_verbose "extracting global C symbols from \`$dlprefile'" | |
18436 + func_basename "$dlprefile" | |
18437 + name="$func_basename_result" | |
18438 + case $host in | |
18439 + *cygwin* | *mingw* | *cegcc* ) | |
18440 + # if an import library, we need to obtain dlname | |
18441 + if func_win32_import_lib_p "$dlprefile"; then | |
18442 + func_tr_sh "$dlprefile" | |
18443 + eval "curr_lafile=\$libfile_$func_tr_sh_result" | |
18444 + dlprefile_dlbasename="" | |
18445 + if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then | |
18446 + # Use subshell, to avoid clobbering current variable values | |
18447 + dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` | |
18448 + if test -n "$dlprefile_dlname" ; then | |
18449 + func_basename "$dlprefile_dlname" | |
18450 + dlprefile_dlbasename="$func_basename_result" | |
18451 + else | |
18452 + # no lafile. user explicitly requested -dlpreopen <import library>. | |
18453 + $sharedlib_from_linklib_cmd "$dlprefile" | |
18454 + dlprefile_dlbasename=$sharedlib_from_linklib_result | |
18455 + fi | |
18456 + fi | |
18457 + $opt_dry_run || { | |
18458 + if test -n "$dlprefile_dlbasename" ; then | |
18459 + eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' | |
18460 + else | |
18461 + func_warning "Could not compute DLL name from $name" | |
18462 + eval '$ECHO ": $name " >> "$nlist"' | |
18463 + fi | |
18464 + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 | |
18465 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | | |
18466 + $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" | |
18467 + } | |
18468 + else # not an import lib | |
18469 + $opt_dry_run || { | |
18470 + eval '$ECHO ": $name " >> "$nlist"' | |
18471 + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 | |
18472 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" | |
18473 + } | |
18474 + fi | |
18475 + ;; | |
18476 + *) | |
18477 + $opt_dry_run || { | |
18478 + eval '$ECHO ": $name " >> "$nlist"' | |
18479 + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 | |
18480 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" | |
18481 + } | |
18482 + ;; | |
18483 + esac | |
18484 + done | |
18485 + | |
18486 + $opt_dry_run || { | |
18487 + # Make sure we have at least an empty file. | |
18488 + test -f "$nlist" || : > "$nlist" | |
18489 + | |
18490 + if test -n "$exclude_expsyms"; then | |
18491 + $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T | |
18492 + $MV "$nlist"T "$nlist" | |
18493 + fi | |
18494 + | |
18495 + # Try sorting and uniquifying the output. | |
18496 + if $GREP -v "^: " < "$nlist" | | |
18497 + if sort -k 3 </dev/null >/dev/null 2>&1; then | |
18498 + sort -k 3 | |
18499 + else | |
18500 + sort +2 | |
18501 + fi | | |
18502 + uniq > "$nlist"S; then | |
18503 + : | |
18504 + else | |
18505 + $GREP -v "^: " < "$nlist" > "$nlist"S | |
18506 + fi | |
18507 + | |
18508 + if test -f "$nlist"S; then | |
18509 + eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' | |
18510 + else | |
18511 + echo '/* NONE */' >> "$output_objdir/$my_dlsyms" | |
18512 + fi | |
18513 + | |
18514 + echo >> "$output_objdir/$my_dlsyms" "\ | |
18515 + | |
18516 +/* The mapping between symbol names and symbols. */ | |
18517 +typedef struct { | |
18518 + const char *name; | |
18519 + void *address; | |
18520 +} lt_dlsymlist; | |
18521 +extern LT_DLSYM_CONST lt_dlsymlist | |
18522 +lt_${my_prefix}_LTX_preloaded_symbols[]; | |
18523 +LT_DLSYM_CONST lt_dlsymlist | |
18524 +lt_${my_prefix}_LTX_preloaded_symbols[] = | |
18525 +{\ | |
18526 + { \"$my_originator\", (void *) 0 }," | |
18527 + | |
18528 + case $need_lib_prefix in | |
18529 + no) | |
18530 + eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" | |
18531 + ;; | |
18532 + *) | |
18533 + eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" | |
18534 + ;; | |
18535 + esac | |
18536 + echo >> "$output_objdir/$my_dlsyms" "\ | |
18537 + {0, (void *) 0} | |
18538 +}; | |
18539 + | |
18540 +/* This works around a problem in FreeBSD linker */ | |
18541 +#ifdef FREEBSD_WORKAROUND | |
18542 +static const void *lt_preloaded_setup() { | |
18543 + return lt_${my_prefix}_LTX_preloaded_symbols; | |
18544 +} | |
18545 +#endif | |
18546 + | |
18547 +#ifdef __cplusplus | |
18548 +} | |
18549 +#endif\ | |
18550 +" | |
18551 + } # !$opt_dry_run | |
18552 + | |
18553 + pic_flag_for_symtable= | |
18554 + case "$compile_command " in | |
18555 + *" -static "*) ;; | |
18556 + *) | |
18557 + case $host in | |
18558 + # compiling the symbol table file with pic_flag works around | |
18559 + # a FreeBSD bug that causes programs to crash when -lm is | |
18560 + # linked before any other PIC object. But we must not use | |
18561 + # pic_flag when linking with -static. The problem exists in | |
18562 + # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. | |
18563 + *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) | |
18564 + pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; | |
18565 + *-*-hpux*) | |
18566 + pic_flag_for_symtable=" $pic_flag" ;; | |
18567 + *) | |
18568 + if test "X$my_pic_p" != Xno; then | |
18569 + pic_flag_for_symtable=" $pic_flag" | |
18570 + fi | |
18571 + ;; | |
18572 + esac | |
18573 + ;; | |
18574 + esac | |
18575 + symtab_cflags= | |
18576 + for arg in $LTCFLAGS; do | |
18577 + case $arg in | |
18578 + -pie | -fpie | -fPIE) ;; | |
18579 + *) func_append symtab_cflags " $arg" ;; | |
18580 + esac | |
18581 + done | |
18582 + | |
18583 + # Now compile the dynamic symbol file. | |
18584 + func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' | |
18585 + | |
18586 + # Clean up the generated files. | |
18587 + func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' | |
18588 + | |
18589 + # Transform the symbol file into the correct name. | |
18590 + symfileobj="$output_objdir/${my_outputname}S.$objext" | |
18591 + case $host in | |
18592 + *cygwin* | *mingw* | *cegcc* ) | |
18593 + if test -f "$output_objdir/$my_outputname.def"; then | |
18594 + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` | |
18595 + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` | |
18596 + else | |
18597 + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` | |
18598 + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` | |
18599 + fi | |
18600 + ;; | |
18601 + *) | |
18602 + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` | |
18603 + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` | |
18604 + ;; | |
18605 + esac | |
18606 + ;; | |
18607 + *) | |
18608 + func_fatal_error "unknown suffix for \`$my_dlsyms'" | |
18609 + ;; | |
18610 + esac | |
18611 + else | |
18612 + # We keep going just in case the user didn't refer to | |
18613 + # lt_preloaded_symbols. The linker will fail if global_symbol_pipe | |
18614 + # really was required. | |
18615 + | |
18616 + # Nullify the symbol file. | |
18617 + compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` | |
18618 + finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` | |
18619 + fi | |
18620 +} | |
18621 + | |
18622 +# func_win32_libid arg | |
18623 +# return the library type of file 'arg' | |
18624 +# | |
18625 +# Need a lot of goo to handle *both* DLLs and import libs | |
18626 +# Has to be a shell function in order to 'eat' the argument | |
18627 +# that is supplied when $file_magic_command is called. | |
18628 +# Despite the name, also deal with 64 bit binaries. | |
18629 +func_win32_libid () | |
18630 +{ | |
18631 + $opt_debug | |
18632 + win32_libid_type="unknown" | |
18633 + win32_fileres=`file -L $1 2>/dev/null` | |
18634 + case $win32_fileres in | |
18635 + *ar\ archive\ import\ library*) # definitely import | |
18636 + win32_libid_type="x86 archive import" | |
18637 + ;; | |
18638 + *ar\ archive*) # could be an import, or static | |
18639 + # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. | |
18640 + if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | | |
18641 + $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then | |
18642 + func_to_tool_file "$1" func_convert_file_msys_to_w32 | |
18643 + win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | | |
18644 + $SED -n -e ' | |
18645 + 1,100{ | |
18646 + / I /{ | |
18647 + s,.*,import, | |
18648 + p | |
18649 + q | |
18650 + } | |
18651 + }'` | |
18652 + case $win32_nmres in | |
18653 + import*) win32_libid_type="x86 archive import";; | |
18654 + *) win32_libid_type="x86 archive static";; | |
18655 + esac | |
18656 + fi | |
18657 + ;; | |
18658 + *DLL*) | |
18659 + win32_libid_type="x86 DLL" | |
18660 + ;; | |
18661 + *executable*) # but shell scripts are "executable" too... | |
18662 + case $win32_fileres in | |
18663 + *MS\ Windows\ PE\ Intel*) | |
18664 + win32_libid_type="x86 DLL" | |
18665 + ;; | |
18666 + esac | |
18667 + ;; | |
18668 + esac | |
18669 + $ECHO "$win32_libid_type" | |
18670 +} | |
18671 + | |
18672 +# func_cygming_dll_for_implib ARG | |
18673 +# | |
18674 +# Platform-specific function to extract the | |
18675 +# name of the DLL associated with the specified | |
18676 +# import library ARG. | |
18677 +# Invoked by eval'ing the libtool variable | |
18678 +# $sharedlib_from_linklib_cmd | |
18679 +# Result is available in the variable | |
18680 +# $sharedlib_from_linklib_result | |
18681 +func_cygming_dll_for_implib () | |
18682 +{ | |
18683 + $opt_debug | |
18684 + sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` | |
18685 +} | |
18686 + | |
18687 +# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs | |
18688 +# | |
18689 +# The is the core of a fallback implementation of a | |
18690 +# platform-specific function to extract the name of the | |
18691 +# DLL associated with the specified import library LIBNAME. | |
18692 +# | |
18693 +# SECTION_NAME is either .idata$6 or .idata$7, depending | |
18694 +# on the platform and compiler that created the implib. | |
18695 +# | |
18696 +# Echos the name of the DLL associated with the | |
18697 +# specified import library. | |
18698 +func_cygming_dll_for_implib_fallback_core () | |
18699 +{ | |
18700 + $opt_debug | |
18701 + match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` | |
18702 + $OBJDUMP -s --section "$1" "$2" 2>/dev/null | | |
18703 + $SED '/^Contents of section '"$match_literal"':/{ | |
18704 + # Place marker at beginning of archive member dllname section | |
18705 + s/.*/====MARK====/ | |
18706 + p | |
18707 + d | |
18708 + } | |
18709 + # These lines can sometimes be longer than 43 characters, but | |
18710 + # are always uninteresting | |
18711 + /:[ ]*file format pe[i]\{,1\}-/d | |
18712 + /^In archive [^:]*:/d | |
18713 + # Ensure marker is printed | |
18714 + /^====MARK====/p | |
18715 + # Remove all lines with less than 43 characters | |
18716 + /^.\{43\}/!d | |
18717 + # From remaining lines, remove first 43 characters | |
18718 + s/^.\{43\}//' | | |
18719 + $SED -n ' | |
18720 + # Join marker and all lines until next marker into a single line | |
18721 + /^====MARK====/ b para | |
18722 + H | |
18723 + $ b para | |
18724 + b | |
18725 + :para | |
18726 + x | |
18727 + s/\n//g | |
18728 + # Remove the marker | |
18729 + s/^====MARK====// | |
18730 + # Remove trailing dots and whitespace | |
18731 + s/[\. \t]*$// | |
18732 + # Print | |
18733 + /./p' | | |
18734 + # we now have a list, one entry per line, of the stringified | |
18735 + # contents of the appropriate section of all members of the | |
18736 + # archive which possess that section. Heuristic: eliminate | |
18737 + # all those which have a first or second character that is | |
18738 + # a '.' (that is, objdump's representation of an unprintable | |
18739 + # character.) This should work for all archives with less than | |
18740 + # 0x302f exports -- but will fail for DLLs whose name actually | |
18741 + # begins with a literal '.' or a single character followed by | |
18742 + # a '.'. | |
18743 + # | |
18744 + # Of those that remain, print the first one. | |
18745 + $SED -e '/^\./d;/^.\./d;q' | |
18746 +} | |
18747 + | |
18748 +# func_cygming_gnu_implib_p ARG | |
18749 +# This predicate returns with zero status (TRUE) if | |
18750 +# ARG is a GNU/binutils-style import library. Returns | |
18751 +# with nonzero status (FALSE) otherwise. | |
18752 +func_cygming_gnu_implib_p () | |
18753 +{ | |
18754 + $opt_debug | |
18755 + func_to_tool_file "$1" func_convert_file_msys_to_w32 | |
18756 + func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` | |
18757 + test -n "$func_cygming_gnu_implib_tmp" | |
18758 +} | |
18759 + | |
18760 +# func_cygming_ms_implib_p ARG | |
18761 +# This predicate returns with zero status (TRUE) if | |
18762 +# ARG is an MS-style import library. Returns | |
18763 +# with nonzero status (FALSE) otherwise. | |
18764 +func_cygming_ms_implib_p () | |
18765 +{ | |
18766 + $opt_debug | |
18767 + func_to_tool_file "$1" func_convert_file_msys_to_w32 | |
18768 + func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` | |
18769 + test -n "$func_cygming_ms_implib_tmp" | |
18770 +} | |
18771 + | |
18772 +# func_cygming_dll_for_implib_fallback ARG | |
18773 +# Platform-specific function to extract the | |
18774 +# name of the DLL associated with the specified | |
18775 +# import library ARG. | |
18776 +# | |
18777 +# This fallback implementation is for use when $DLLTOOL | |
18778 +# does not support the --identify-strict option. | |
18779 +# Invoked by eval'ing the libtool variable | |
18780 +# $sharedlib_from_linklib_cmd | |
18781 +# Result is available in the variable | |
18782 +# $sharedlib_from_linklib_result | |
18783 +func_cygming_dll_for_implib_fallback () | |
18784 +{ | |
18785 + $opt_debug | |
18786 + if func_cygming_gnu_implib_p "$1" ; then | |
18787 + # binutils import library | |
18788 + sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` | |
18789 + elif func_cygming_ms_implib_p "$1" ; then | |
18790 + # ms-generated import library | |
18791 + sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` | |
18792 + else | |
18793 + # unknown | |
18794 + sharedlib_from_linklib_result="" | |
18795 + fi | |
18796 +} | |
18797 + | |
18798 + | |
18799 +# func_extract_an_archive dir oldlib | |
18800 +func_extract_an_archive () | |
18801 +{ | |
18802 + $opt_debug | |
18803 + f_ex_an_ar_dir="$1"; shift | |
18804 + f_ex_an_ar_oldlib="$1" | |
18805 + if test "$lock_old_archive_extraction" = yes; then | |
18806 + lockfile=$f_ex_an_ar_oldlib.lock | |
18807 + until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do | |
18808 + func_echo "Waiting for $lockfile to be removed" | |
18809 + sleep 2 | |
18810 + done | |
18811 + fi | |
18812 + func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ | |
18813 + 'stat=$?; rm -f "$lockfile"; exit $stat' | |
18814 + if test "$lock_old_archive_extraction" = yes; then | |
18815 + $opt_dry_run || rm -f "$lockfile" | |
18816 + fi | |
18817 + if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then | |
18818 + : | |
18819 + else | |
18820 + func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" | |
18821 + fi | |
18822 +} | |
18823 + | |
18824 + | |
18825 +# func_extract_archives gentop oldlib ... | |
18826 +func_extract_archives () | |
18827 +{ | |
18828 + $opt_debug | |
18829 + my_gentop="$1"; shift | |
18830 + my_oldlibs=${1+"$@"} | |
18831 + my_oldobjs="" | |
18832 + my_xlib="" | |
18833 + my_xabs="" | |
18834 + my_xdir="" | |
18835 + | |
18836 + for my_xlib in $my_oldlibs; do | |
18837 + # Extract the objects. | |
18838 + case $my_xlib in | |
18839 + [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; | |
18840 + *) my_xabs=`pwd`"/$my_xlib" ;; | |
18841 + esac | |
18842 + func_basename "$my_xlib" | |
18843 + my_xlib="$func_basename_result" | |
18844 + my_xlib_u=$my_xlib | |
18845 + while :; do | |
18846 + case " $extracted_archives " in | |
18847 + *" $my_xlib_u "*) | |
18848 + func_arith $extracted_serial + 1 | |
18849 + extracted_serial=$func_arith_result | |
18850 + my_xlib_u=lt$extracted_serial-$my_xlib ;; | |
18851 + *) break ;; | |
18852 + esac | |
18853 + done | |
18854 + extracted_archives="$extracted_archives $my_xlib_u" | |
18855 + my_xdir="$my_gentop/$my_xlib_u" | |
18856 + | |
18857 + func_mkdir_p "$my_xdir" | |
18858 + | |
18859 + case $host in | |
18860 + *-darwin*) | |
18861 + func_verbose "Extracting $my_xabs" | |
18862 + # Do not bother doing anything if just a dry run | |
18863 + $opt_dry_run || { | |
18864 + darwin_orig_dir=`pwd` | |
18865 + cd $my_xdir || exit $? | |
18866 + darwin_archive=$my_xabs | |
18867 + darwin_curdir=`pwd` | |
18868 + darwin_base_archive=`basename "$darwin_archive"` | |
18869 + darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` | |
18870 + if test -n "$darwin_arches"; then | |
18871 + darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` | |
18872 + darwin_arch= | |
18873 + func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" | |
18874 + for darwin_arch in $darwin_arches ; do | |
18875 + func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" | |
18876 + $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" | |
18877 + cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" | |
18878 + func_extract_an_archive "`pwd`" "${darwin_base_archive}" | |
18879 + cd "$darwin_curdir" | |
18880 + $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" | |
18881 + done # $darwin_arches | |
18882 + ## Okay now we've a bunch of thin objects, gotta fatten them up :) | |
18883 + darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` | |
18884 + darwin_file= | |
18885 + darwin_files= | |
18886 + for darwin_file in $darwin_filelist; do | |
18887 + darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` | |
18888 + $LIPO -create -output "$darwin_file" $darwin_files | |
18889 + done # $darwin_filelist | |
18890 + $RM -rf unfat-$$ | |
18891 + cd "$darwin_orig_dir" | |
18892 + else | |
18893 + cd $darwin_orig_dir | |
18894 + func_extract_an_archive "$my_xdir" "$my_xabs" | |
18895 + fi # $darwin_arches | |
18896 + } # !$opt_dry_run | |
18897 + ;; | |
18898 + *) | |
18899 + func_extract_an_archive "$my_xdir" "$my_xabs" | |
18900 + ;; | |
18901 + esac | |
18902 + my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` | |
18903 + done | |
18904 + | |
18905 + func_extract_archives_result="$my_oldobjs" | |
18906 +} | |
18907 + | |
18908 + | |
18909 +# func_emit_wrapper [arg=no] | |
18910 +# | |
18911 +# Emit a libtool wrapper script on stdout. | |
18912 +# Don't directly open a file because we may want to | |
18913 +# incorporate the script contents within a cygwin/mingw | |
18914 +# wrapper executable. Must ONLY be called from within | |
18915 +# func_mode_link because it depends on a number of variables | |
18916 +# set therein. | |
18917 +# | |
18918 +# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR | |
18919 +# variable will take. If 'yes', then the emitted script | |
18920 +# will assume that the directory in which it is stored is | |
18921 +# the $objdir directory. This is a cygwin/mingw-specific | |
18922 +# behavior. | |
18923 +func_emit_wrapper () | |
18924 +{ | |
18925 + func_emit_wrapper_arg1=${1-no} | |
18926 + | |
18927 + $ECHO "\ | |
18928 +#! $SHELL | |
18929 + | |
18930 +# $output - temporary wrapper script for $objdir/$outputname | |
18931 +# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION | |
18932 +# | |
18933 +# The $output program cannot be directly executed until all the libtool | |
18934 +# libraries that it depends on are installed. | |
18935 +# | |
18936 +# This wrapper script should never be moved out of the build directory. | |
18937 +# If it is, it will not operate correctly. | |
18938 + | |
18939 +# Sed substitution that helps us do robust quoting. It backslashifies | |
18940 +# metacharacters that are still active within double-quoted strings. | |
18941 +sed_quote_subst='$sed_quote_subst' | |
18942 + | |
18943 +# Be Bourne compatible | |
18944 +if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then | |
18945 + emulate sh | |
18946 + NULLCMD=: | |
18947 + # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which | |
18948 + # is contrary to our usage. Disable this feature. | |
18949 + alias -g '\${1+\"\$@\"}'='\"\$@\"' | |
18950 + setopt NO_GLOB_SUBST | |
18951 +else | |
18952 + case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac | |
18953 +fi | |
18954 +BIN_SH=xpg4; export BIN_SH # for Tru64 | |
18955 +DUALCASE=1; export DUALCASE # for MKS sh | |
18956 + | |
18957 +# The HP-UX ksh and POSIX shell print the target directory to stdout | |
18958 +# if CDPATH is set. | |
18959 +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH | |
18960 + | |
18961 +relink_command=\"$relink_command\" | |
18962 + | |
18963 +# This environment variable determines our operation mode. | |
18964 +if test \"\$libtool_install_magic\" = \"$magic\"; then | |
18965 + # install mode needs the following variables: | |
18966 + generated_by_libtool_version='$macro_version' | |
18967 + notinst_deplibs='$notinst_deplibs' | |
18968 +else | |
18969 + # When we are sourced in execute mode, \$file and \$ECHO are already set. | |
18970 + if test \"\$libtool_execute_magic\" != \"$magic\"; then | |
18971 + file=\"\$0\"" | |
18972 + | |
18973 + qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` | |
18974 + $ECHO "\ | |
18975 + | |
18976 +# A function that is used when there is no print builtin or printf. | |
18977 +func_fallback_echo () | |
18978 +{ | |
18979 + eval 'cat <<_LTECHO_EOF | |
18980 +\$1 | |
18981 +_LTECHO_EOF' | |
18982 +} | |
18983 + ECHO=\"$qECHO\" | |
18984 + fi | |
18985 + | |
18986 +# Very basic option parsing. These options are (a) specific to | |
18987 +# the libtool wrapper, (b) are identical between the wrapper | |
18988 +# /script/ and the wrapper /executable/ which is used only on | |
18989 +# windows platforms, and (c) all begin with the string "--lt-" | |
18990 +# (application programs are unlikely to have options which match | |
18991 +# this pattern). | |
18992 +# | |
18993 +# There are only two supported options: --lt-debug and | |
18994 +# --lt-dump-script. There is, deliberately, no --lt-help. | |
18995 +# | |
18996 +# The first argument to this parsing function should be the | |
18997 +# script's $0 value, followed by "$@". | |
18998 +lt_option_debug= | |
18999 +func_parse_lt_options () | |
19000 +{ | |
19001 + lt_script_arg0=\$0 | |
19002 + shift | |
19003 + for lt_opt | |
19004 + do | |
19005 + case \"\$lt_opt\" in | |
19006 + --lt-debug) lt_option_debug=1 ;; | |
19007 + --lt-dump-script) | |
19008 + lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` | |
19009 + test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. | |
19010 + lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` | |
19011 + cat \"\$lt_dump_D/\$lt_dump_F\" | |
19012 + exit 0 | |
19013 + ;; | |
19014 + --lt-*) | |
19015 + \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 | |
19016 + exit 1 | |
19017 + ;; | |
19018 + esac | |
19019 + done | |
19020 + | |
19021 + # Print the debug banner immediately: | |
19022 + if test -n \"\$lt_option_debug\"; then | |
19023 + echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 | |
19024 + fi | |
19025 +} | |
19026 + | |
19027 +# Used when --lt-debug. Prints its arguments to stdout | |
19028 +# (redirection is the responsibility of the caller) | |
19029 +func_lt_dump_args () | |
19030 +{ | |
19031 + lt_dump_args_N=1; | |
19032 + for lt_arg | |
19033 + do | |
19034 + \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" | |
19035 + lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` | |
19036 + done | |
19037 +} | |
19038 + | |
19039 +# Core function for launching the target application | |
19040 +func_exec_program_core () | |
19041 +{ | |
19042 +" | |
19043 + case $host in | |
19044 + # Backslashes separate directories on plain windows | |
19045 + *-*-mingw | *-*-os2* | *-cegcc*) | |
19046 + $ECHO "\ | |
19047 + if test -n \"\$lt_option_debug\"; then | |
19048 + \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 | |
19049 + func_lt_dump_args \${1+\"\$@\"} 1>&2 | |
19050 + fi | |
19051 + exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} | |
19052 +" | |
19053 + ;; | |
19054 + | |
19055 + *) | |
19056 + $ECHO "\ | |
19057 + if test -n \"\$lt_option_debug\"; then | |
19058 + \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 | |
19059 + func_lt_dump_args \${1+\"\$@\"} 1>&2 | |
19060 + fi | |
19061 + exec \"\$progdir/\$program\" \${1+\"\$@\"} | |
19062 +" | |
19063 + ;; | |
19064 + esac | |
19065 + $ECHO "\ | |
19066 + \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 | |
19067 + exit 1 | |
19068 +} | |
19069 + | |
19070 +# A function to encapsulate launching the target application | |
19071 +# Strips options in the --lt-* namespace from \$@ and | |
19072 +# launches target application with the remaining arguments. | |
19073 +func_exec_program () | |
19074 +{ | |
19075 + case \" \$* \" in | |
19076 + *\\ --lt-*) | |
19077 + for lt_wr_arg | |
19078 + do | |
19079 + case \$lt_wr_arg in | |
19080 + --lt-*) ;; | |
19081 + *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; | |
19082 + esac | |
19083 + shift | |
19084 + done ;; | |
19085 + esac | |
19086 + func_exec_program_core \${1+\"\$@\"} | |
19087 +} | |
19088 + | |
19089 + # Parse options | |
19090 + func_parse_lt_options \"\$0\" \${1+\"\$@\"} | |
19091 + | |
19092 + # Find the directory that this script lives in. | |
19093 + thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` | |
19094 + test \"x\$thisdir\" = \"x\$file\" && thisdir=. | |
19095 + | |
19096 + # Follow symbolic links until we get to the real thisdir. | |
19097 + file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` | |
19098 + while test -n \"\$file\"; do | |
19099 + destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` | |
19100 + | |
19101 + # If there was a directory component, then change thisdir. | |
19102 + if test \"x\$destdir\" != \"x\$file\"; then | |
19103 + case \"\$destdir\" in | |
19104 + [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; | |
19105 + *) thisdir=\"\$thisdir/\$destdir\" ;; | |
19106 + esac | |
19107 + fi | |
19108 + | |
19109 + file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` | |
19110 + file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` | |
19111 + done | |
19112 + | |
19113 + # Usually 'no', except on cygwin/mingw when embedded into | |
19114 + # the cwrapper. | |
19115 + WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 | |
19116 + if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then | |
19117 + # special case for '.' | |
19118 + if test \"\$thisdir\" = \".\"; then | |
19119 + thisdir=\`pwd\` | |
19120 + fi | |
19121 + # remove .libs from thisdir | |
19122 + case \"\$thisdir\" in | |
19123 + *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; | |
19124 + $objdir ) thisdir=. ;; | |
19125 + esac | |
19126 + fi | |
19127 + | |
19128 + # Try to get the absolute directory name. | |
19129 + absdir=\`cd \"\$thisdir\" && pwd\` | |
19130 + test -n \"\$absdir\" && thisdir=\"\$absdir\" | |
19131 +" | |
19132 + | |
19133 + if test "$fast_install" = yes; then | |
19134 + $ECHO "\ | |
19135 + program=lt-'$outputname'$exeext | |
19136 + progdir=\"\$thisdir/$objdir\" | |
19137 + | |
19138 + if test ! -f \"\$progdir/\$program\" || | |
19139 + { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ | |
19140 + test \"X\$file\" != \"X\$progdir/\$program\"; }; then | |
19141 + | |
19142 + file=\"\$\$-\$program\" | |
19143 + | |
19144 + if test ! -d \"\$progdir\"; then | |
19145 + $MKDIR \"\$progdir\" | |
19146 + else | |
19147 + $RM \"\$progdir/\$file\" | |
19148 + fi" | |
19149 + | |
19150 + $ECHO "\ | |
19151 + | |
19152 + # relink executable if necessary | |
19153 + if test -n \"\$relink_command\"; then | |
19154 + if relink_command_output=\`eval \$relink_command 2>&1\`; then : | |
19155 + else | |
19156 + $ECHO \"\$relink_command_output\" >&2 | |
19157 + $RM \"\$progdir/\$file\" | |
19158 + exit 1 | |
19159 + fi | |
19160 + fi | |
19161 + | |
19162 + $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || | |
19163 + { $RM \"\$progdir/\$program\"; | |
19164 + $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } | |
19165 + $RM \"\$progdir/\$file\" | |
19166 + fi" | |
19167 + else | |
19168 + $ECHO "\ | |
19169 + program='$outputname' | |
19170 + progdir=\"\$thisdir/$objdir\" | |
19171 +" | |
19172 + fi | |
19173 + | |
19174 + $ECHO "\ | |
19175 + | |
19176 + if test -f \"\$progdir/\$program\"; then" | |
19177 + | |
19178 + # fixup the dll searchpath if we need to. | |
19179 + # | |
19180 + # Fix the DLL searchpath if we need to. Do this before prepending | |
19181 + # to shlibpath, because on Windows, both are PATH and uninstalled | |
19182 + # libraries must come first. | |
19183 + if test -n "$dllsearchpath"; then | |
19184 + $ECHO "\ | |
19185 + # Add the dll search path components to the executable PATH | |
19186 + PATH=$dllsearchpath:\$PATH | |
19187 +" | |
19188 + fi | |
19189 + | |
19190 + # Export our shlibpath_var if we have one. | |
19191 + if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then | |
19192 + $ECHO "\ | |
19193 + # Add our own library path to $shlibpath_var | |
19194 + $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" | |
19195 + | |
19196 + # Some systems cannot cope with colon-terminated $shlibpath_var | |
19197 + # The second colon is a workaround for a bug in BeOS R4 sed | |
19198 + $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` | |
19199 + | |
19200 + export $shlibpath_var | |
19201 +" | |
19202 + fi | |
19203 + | |
19204 + $ECHO "\ | |
19205 + if test \"\$libtool_execute_magic\" != \"$magic\"; then | |
19206 + # Run the actual program with our arguments. | |
19207 + func_exec_program \${1+\"\$@\"} | |
19208 + fi | |
19209 + else | |
19210 + # The program doesn't exist. | |
19211 + \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 | |
19212 + \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 | |
19213 + \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 | |
19214 + exit 1 | |
19215 + fi | |
19216 +fi\ | |
19217 +" | |
19218 +} | |
19219 + | |
19220 + | |
19221 +# func_emit_cwrapperexe_src | |
19222 +# emit the source code for a wrapper executable on stdout | |
19223 +# Must ONLY be called from within func_mode_link because | |
19224 +# it depends on a number of variable set therein. | |
19225 +func_emit_cwrapperexe_src () | |
19226 +{ | |
19227 + cat <<EOF | |
19228 + | |
19229 +/* $cwrappersource - temporary wrapper executable for $objdir/$outputname | |
19230 + Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION | |
19231 + | |
19232 + The $output program cannot be directly executed until all the libtool | |
19233 + libraries that it depends on are installed. | |
19234 + | |
19235 + This wrapper executable should never be moved out of the build directory. | |
19236 + If it is, it will not operate correctly. | |
19237 +*/ | |
19238 +EOF | |
19239 + cat <<"EOF" | |
19240 +#ifdef _MSC_VER | |
19241 +# define _CRT_SECURE_NO_DEPRECATE 1 | |
19242 +#endif | |
19243 +#include <stdio.h> | |
19244 +#include <stdlib.h> | |
19245 +#ifdef _MSC_VER | |
19246 +# include <direct.h> | |
19247 +# include <process.h> | |
19248 +# include <io.h> | |
19249 +#else | |
19250 +# include <unistd.h> | |
19251 +# include <stdint.h> | |
19252 +# ifdef __CYGWIN__ | |
19253 +# include <io.h> | |
19254 +# endif | |
19255 +#endif | |
19256 +#include <malloc.h> | |
19257 +#include <stdarg.h> | |
19258 +#include <assert.h> | |
19259 +#include <string.h> | |
19260 +#include <ctype.h> | |
19261 +#include <errno.h> | |
19262 +#include <fcntl.h> | |
19263 +#include <sys/stat.h> | |
19264 + | |
19265 +/* declarations of non-ANSI functions */ | |
19266 +#if defined(__MINGW32__) | |
19267 +# ifdef __STRICT_ANSI__ | |
19268 +int _putenv (const char *); | |
19269 +# endif | |
19270 +#elif defined(__CYGWIN__) | |
19271 +# ifdef __STRICT_ANSI__ | |
19272 +char *realpath (const char *, char *); | |
19273 +int putenv (char *); | |
19274 +int setenv (const char *, const char *, int); | |
19275 +# endif | |
19276 +/* #elif defined (other platforms) ... */ | |
19277 +#endif | |
19278 + | |
19279 +/* portability defines, excluding path handling macros */ | |
19280 +#if defined(_MSC_VER) | |
19281 +# define setmode _setmode | |
19282 +# define stat _stat | |
19283 +# define chmod _chmod | |
19284 +# define getcwd _getcwd | |
19285 +# define putenv _putenv | |
19286 +# define S_IXUSR _S_IEXEC | |
19287 +# ifndef _INTPTR_T_DEFINED | |
19288 +# define _INTPTR_T_DEFINED | |
19289 +# define intptr_t int | |
19290 +# endif | |
19291 +#elif defined(__MINGW32__) | |
19292 +# define setmode _setmode | |
19293 +# define stat _stat | |
19294 +# define chmod _chmod | |
19295 +# define getcwd _getcwd | |
19296 +# define putenv _putenv | |
19297 +#elif defined(__CYGWIN__) | |
19298 +# define HAVE_SETENV | |
19299 +# define FOPEN_WB "wb" | |
19300 +/* #elif defined (other platforms) ... */ | |
19301 +#endif | |
19302 + | |
19303 +#if defined(PATH_MAX) | |
19304 +# define LT_PATHMAX PATH_MAX | |
19305 +#elif defined(MAXPATHLEN) | |
19306 +# define LT_PATHMAX MAXPATHLEN | |
19307 +#else | |
19308 +# define LT_PATHMAX 1024 | |
19309 +#endif | |
19310 + | |
19311 +#ifndef S_IXOTH | |
19312 +# define S_IXOTH 0 | |
19313 +#endif | |
19314 +#ifndef S_IXGRP | |
19315 +# define S_IXGRP 0 | |
19316 +#endif | |
19317 + | |
19318 +/* path handling portability macros */ | |
19319 +#ifndef DIR_SEPARATOR | |
19320 +# define DIR_SEPARATOR '/' | |
19321 +# define PATH_SEPARATOR ':' | |
19322 +#endif | |
19323 + | |
19324 +#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ | |
19325 + defined (__OS2__) | |
19326 +# define HAVE_DOS_BASED_FILE_SYSTEM | |
19327 +# define FOPEN_WB "wb" | |
19328 +# ifndef DIR_SEPARATOR_2 | |
19329 +# define DIR_SEPARATOR_2 '\\' | |
19330 +# endif | |
19331 +# ifndef PATH_SEPARATOR_2 | |
19332 +# define PATH_SEPARATOR_2 ';' | |
19333 +# endif | |
19334 +#endif | |
19335 + | |
19336 +#ifndef DIR_SEPARATOR_2 | |
19337 +# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) | |
19338 +#else /* DIR_SEPARATOR_2 */ | |
19339 +# define IS_DIR_SEPARATOR(ch) \ | |
19340 + (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) | |
19341 +#endif /* DIR_SEPARATOR_2 */ | |
19342 + | |
19343 +#ifndef PATH_SEPARATOR_2 | |
19344 +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) | |
19345 +#else /* PATH_SEPARATOR_2 */ | |
19346 +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) | |
19347 +#endif /* PATH_SEPARATOR_2 */ | |
19348 + | |
19349 +#ifndef FOPEN_WB | |
19350 +# define FOPEN_WB "w" | |
19351 +#endif | |
19352 +#ifndef _O_BINARY | |
19353 +# define _O_BINARY 0 | |
19354 +#endif | |
19355 + | |
19356 +#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) | |
19357 +#define XFREE(stale) do { \ | |
19358 + if (stale) { free ((void *) stale); stale = 0; } \ | |
19359 +} while (0) | |
19360 + | |
19361 +#if defined(LT_DEBUGWRAPPER) | |
19362 +static int lt_debug = 1; | |
19363 +#else | |
19364 +static int lt_debug = 0; | |
19365 +#endif | |
19366 + | |
19367 +const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ | |
19368 + | |
19369 +void *xmalloc (size_t num); | |
19370 +char *xstrdup (const char *string); | |
19371 +const char *base_name (const char *name); | |
19372 +char *find_executable (const char *wrapper); | |
19373 +char *chase_symlinks (const char *pathspec); | |
19374 +int make_executable (const char *path); | |
19375 +int check_executable (const char *path); | |
19376 +char *strendzap (char *str, const char *pat); | |
19377 +void lt_debugprintf (const char *file, int line, const char *fmt, ...); | |
19378 +void lt_fatal (const char *file, int line, const char *message, ...); | |
19379 +static const char *nonnull (const char *s); | |
19380 +static const char *nonempty (const char *s); | |
19381 +void lt_setenv (const char *name, const char *value); | |
19382 +char *lt_extend_str (const char *orig_value, const char *add, int to_end); | |
19383 +void lt_update_exe_path (const char *name, const char *value); | |
19384 +void lt_update_lib_path (const char *name, const char *value); | |
19385 +char **prepare_spawn (char **argv); | |
19386 +void lt_dump_script (FILE *f); | |
19387 +EOF | |
19388 + | |
19389 + cat <<EOF | |
19390 +volatile const char * MAGIC_EXE = "$magic_exe"; | |
19391 +const char * LIB_PATH_VARNAME = "$shlibpath_var"; | |
19392 +EOF | |
19393 + | |
19394 + if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then | |
19395 + func_to_host_path "$temp_rpath" | |
19396 + cat <<EOF | |
19397 +const char * LIB_PATH_VALUE = "$func_to_host_path_result"; | |
19398 +EOF | |
19399 + else | |
19400 + cat <<"EOF" | |
19401 +const char * LIB_PATH_VALUE = ""; | |
19402 +EOF | |
19403 + fi | |
19404 + | |
19405 + if test -n "$dllsearchpath"; then | |
19406 + func_to_host_path "$dllsearchpath:" | |
19407 + cat <<EOF | |
19408 +const char * EXE_PATH_VARNAME = "PATH"; | |
19409 +const char * EXE_PATH_VALUE = "$func_to_host_path_result"; | |
19410 +EOF | |
19411 + else | |
19412 + cat <<"EOF" | |
19413 +const char * EXE_PATH_VARNAME = ""; | |
19414 +const char * EXE_PATH_VALUE = ""; | |
19415 +EOF | |
19416 + fi | |
19417 + | |
19418 + if test "$fast_install" = yes; then | |
19419 + cat <<EOF | |
19420 +const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */ | |
19421 +EOF | |
19422 + else | |
19423 + cat <<EOF | |
19424 +const char * TARGET_PROGRAM_NAME = "$outputname"; /* hopefully, no .exe */ | |
19425 +EOF | |
19426 + fi | |
19427 + | |
19428 + | |
19429 + cat <<"EOF" | |
19430 + | |
19431 +#define LTWRAPPER_OPTION_PREFIX "--lt-" | |
19432 + | |
19433 +static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX; | |
19434 +static const char *dumpscript_opt = LTWRAPPER_OPTION_PREFIX "dump-script"; | |
19435 +static const char *debug_opt = LTWRAPPER_OPTION_PREFIX "debug"; | |
19436 + | |
19437 +int | |
19438 +main (int argc, char *argv[]) | |
19439 +{ | |
19440 + char **newargz; | |
19441 + int newargc; | |
19442 + char *tmp_pathspec; | |
19443 + char *actual_cwrapper_path; | |
19444 + char *actual_cwrapper_name; | |
19445 + char *target_name; | |
19446 + char *lt_argv_zero; | |
19447 + intptr_t rval = 127; | |
19448 + | |
19449 + int i; | |
19450 + | |
19451 + program_name = (char *) xstrdup (base_name (argv[0])); | |
19452 + newargz = XMALLOC (char *, argc + 1); | |
19453 + | |
19454 + /* very simple arg parsing; don't want to rely on getopt | |
19455 + * also, copy all non cwrapper options to newargz, except | |
19456 + * argz[0], which is handled differently | |
19457 + */ | |
19458 + newargc=0; | |
19459 + for (i = 1; i < argc; i++) | |
19460 + { | |
19461 + if (strcmp (argv[i], dumpscript_opt) == 0) | |
19462 + { | |
19463 +EOF | |
19464 + case "$host" in | |
19465 + *mingw* | *cygwin* ) | |
19466 + # make stdout use "unix" line endings | |
19467 + echo " setmode(1,_O_BINARY);" | |
19468 + ;; | |
19469 + esac | |
19470 + | |
19471 + cat <<"EOF" | |
19472 + lt_dump_script (stdout); | |
19473 + return 0; | |
19474 + } | |
19475 + if (strcmp (argv[i], debug_opt) == 0) | |
19476 + { | |
19477 + lt_debug = 1; | |
19478 + continue; | |
19479 + } | |
19480 + if (strcmp (argv[i], ltwrapper_option_prefix) == 0) | |
19481 + { | |
19482 + /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX | |
19483 + namespace, but it is not one of the ones we know about and | |
19484 + have already dealt with, above (inluding dump-script), then | |
19485 + report an error. Otherwise, targets might begin to believe | |
19486 + they are allowed to use options in the LTWRAPPER_OPTION_PREFIX | |
19487 + namespace. The first time any user complains about this, we'll | |
19488 + need to make LTWRAPPER_OPTION_PREFIX a configure-time option | |
19489 + or a configure.ac-settable value. | |
19490 + */ | |
19491 + lt_fatal (__FILE__, __LINE__, | |
19492 + "unrecognized %s option: '%s'", | |
19493 + ltwrapper_option_prefix, argv[i]); | |
19494 + } | |
19495 + /* otherwise ... */ | |
19496 + newargz[++newargc] = xstrdup (argv[i]); | |
19497 + } | |
19498 + newargz[++newargc] = NULL; | |
19499 + | |
19500 +EOF | |
19501 + cat <<EOF | |
19502 + /* The GNU banner must be the first non-error debug message */ | |
19503 + lt_debugprintf (__FILE__, __LINE__, "libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\n"); | |
19504 +EOF | |
19505 + cat <<"EOF" | |
19506 + lt_debugprintf (__FILE__, __LINE__, "(main) argv[0]: %s\n", argv[0]); | |
19507 + lt_debugprintf (__FILE__, __LINE__, "(main) program_name: %s\n", program_name); | |
19508 + | |
19509 + tmp_pathspec = find_executable (argv[0]); | |
19510 + if (tmp_pathspec == NULL) | |
19511 + lt_fatal (__FILE__, __LINE__, "couldn't find %s", argv[0]); | |
19512 + lt_debugprintf (__FILE__, __LINE__, | |
19513 + "(main) found exe (before symlink chase) at: %s\n", | |
19514 + tmp_pathspec); | |
19515 + | |
19516 + actual_cwrapper_path = chase_symlinks (tmp_pathspec); | |
19517 + lt_debugprintf (__FILE__, __LINE__, | |
19518 + "(main) found exe (after symlink chase) at: %s\n", | |
19519 + actual_cwrapper_path); | |
19520 + XFREE (tmp_pathspec); | |
19521 + | |
19522 + actual_cwrapper_name = xstrdup (base_name (actual_cwrapper_path)); | |
19523 + strendzap (actual_cwrapper_path, actual_cwrapper_name); | |
19524 + | |
19525 + /* wrapper name transforms */ | |
19526 + strendzap (actual_cwrapper_name, ".exe"); | |
19527 + tmp_pathspec = lt_extend_str (actual_cwrapper_name, ".exe", 1); | |
19528 + XFREE (actual_cwrapper_name); | |
19529 + actual_cwrapper_name = tmp_pathspec; | |
19530 + tmp_pathspec = 0; | |
19531 + | |
19532 + /* target_name transforms -- use actual target program name; might have lt- prefix */ | |
19533 + target_name = xstrdup (base_name (TARGET_PROGRAM_NAME)); | |
19534 + strendzap (target_name, ".exe"); | |
19535 + tmp_pathspec = lt_extend_str (target_name, ".exe", 1); | |
19536 + XFREE (target_name); | |
19537 + target_name = tmp_pathspec; | |
19538 + tmp_pathspec = 0; | |
19539 + | |
19540 + lt_debugprintf (__FILE__, __LINE__, | |
19541 + "(main) libtool target name: %s\n", | |
19542 + target_name); | |
19543 +EOF | |
19544 + | |
19545 + cat <<EOF | |
19546 + newargz[0] = | |
19547 + XMALLOC (char, (strlen (actual_cwrapper_path) + | |
19548 + strlen ("$objdir") + 1 + strlen (actual_cwrapper_name) + 1)); | |
19549 + strcpy (newargz[0], actual_cwrapper_path); | |
19550 + strcat (newargz[0], "$objdir"); | |
19551 + strcat (newargz[0], "/"); | |
19552 +EOF | |
19553 + | |
19554 + cat <<"EOF" | |
19555 + /* stop here, and copy so we don't have to do this twice */ | |
19556 + tmp_pathspec = xstrdup (newargz[0]); | |
19557 + | |
19558 + /* do NOT want the lt- prefix here, so use actual_cwrapper_name */ | |
19559 + strcat (newargz[0], actual_cwrapper_name); | |
19560 + | |
19561 + /* DO want the lt- prefix here if it exists, so use target_name */ | |
19562 + lt_argv_zero = lt_extend_str (tmp_pathspec, target_name, 1); | |
19563 + XFREE (tmp_pathspec); | |
19564 + tmp_pathspec = NULL; | |
19565 +EOF | |
19566 + | |
19567 + case $host_os in | |
19568 + mingw*) | |
19569 + cat <<"EOF" | |
19570 + { | |
19571 + char* p; | |
19572 + while ((p = strchr (newargz[0], '\\')) != NULL) | |
19573 + { | |
19574 + *p = '/'; | |
19575 + } | |
19576 + while ((p = strchr (lt_argv_zero, '\\')) != NULL) | |
19577 + { | |
19578 + *p = '/'; | |
19579 + } | |
19580 + } | |
19581 +EOF | |
19582 + ;; | |
19583 + esac | |
19584 + | |
19585 + cat <<"EOF" | |
19586 + XFREE (target_name); | |
19587 + XFREE (actual_cwrapper_path); | |
19588 + XFREE (actual_cwrapper_name); | |
19589 + | |
19590 + lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */ | |
19591 + lt_setenv ("DUALCASE", "1"); /* for MSK sh */ | |
19592 + /* Update the DLL searchpath. EXE_PATH_VALUE ($dllsearchpath) must | |
19593 + be prepended before (that is, appear after) LIB_PATH_VALUE ($temp_rpath) | |
19594 + because on Windows, both *_VARNAMEs are PATH but uninstalled | |
19595 + libraries must come first. */ | |
19596 + lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE); | |
19597 + lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE); | |
19598 + | |
19599 + lt_debugprintf (__FILE__, __LINE__, "(main) lt_argv_zero: %s\n", | |
19600 + nonnull (lt_argv_zero)); | |
19601 + for (i = 0; i < newargc; i++) | |
19602 + { | |
19603 + lt_debugprintf (__FILE__, __LINE__, "(main) newargz[%d]: %s\n", | |
19604 + i, nonnull (newargz[i])); | |
19605 + } | |
19606 + | |
19607 +EOF | |
19608 + | |
19609 + case $host_os in | |
19610 + mingw*) | |
19611 + cat <<"EOF" | |
19612 + /* execv doesn't actually work on mingw as expected on unix */ | |
19613 + newargz = prepare_spawn (newargz); | |
19614 + rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz); | |
19615 + if (rval == -1) | |
19616 + { | |
19617 + /* failed to start process */ | |
19618 + lt_debugprintf (__FILE__, __LINE__, | |
19619 + "(main) failed to launch target \"%s\": %s\n", | |
19620 + lt_argv_zero, nonnull (strerror (errno))); | |
19621 + return 127; | |
19622 + } | |
19623 + return rval; | |
19624 +EOF | |
19625 + ;; | |
19626 + *) | |
19627 + cat <<"EOF" | |
19628 + execv (lt_argv_zero, newargz); | |
19629 + return rval; /* =127, but avoids unused variable warning */ | |
19630 +EOF | |
19631 + ;; | |
19632 + esac | |
19633 + | |
19634 + cat <<"EOF" | |
19635 +} | |
19636 + | |
19637 +void * | |
19638 +xmalloc (size_t num) | |
19639 +{ | |
19640 + void *p = (void *) malloc (num); | |
19641 + if (!p) | |
19642 + lt_fatal (__FILE__, __LINE__, "memory exhausted"); | |
19643 + | |
19644 + return p; | |
19645 +} | |
19646 + | |
19647 +char * | |
19648 +xstrdup (const char *string) | |
19649 +{ | |
19650 + return string ? strcpy ((char *) xmalloc (strlen (string) + 1), | |
19651 + string) : NULL; | |
19652 +} | |
19653 + | |
19654 +const char * | |
19655 +base_name (const char *name) | |
19656 +{ | |
19657 + const char *base; | |
19658 + | |
19659 +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) | |
19660 + /* Skip over the disk name in MSDOS pathnames. */ | |
19661 + if (isalpha ((unsigned char) name[0]) && name[1] == ':') | |
19662 + name += 2; | |
19663 +#endif | |
19664 + | |
19665 + for (base = name; *name; name++) | |
19666 + if (IS_DIR_SEPARATOR (*name)) | |
19667 + base = name + 1; | |
19668 + return base; | |
19669 +} | |
19670 + | |
19671 +int | |
19672 +check_executable (const char *path) | |
19673 +{ | |
19674 + struct stat st; | |
19675 + | |
19676 + lt_debugprintf (__FILE__, __LINE__, "(check_executable): %s\n", | |
19677 + nonempty (path)); | |
19678 + if ((!path) || (!*path)) | |
19679 + return 0; | |
19680 + | |
19681 + if ((stat (path, &st) >= 0) | |
19682 + && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) | |
19683 + return 1; | |
19684 + else | |
19685 + return 0; | |
19686 +} | |
19687 + | |
19688 +int | |
19689 +make_executable (const char *path) | |
19690 +{ | |
19691 + int rval = 0; | |
19692 + struct stat st; | |
19693 + | |
19694 + lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", | |
19695 + nonempty (path)); | |
19696 + if ((!path) || (!*path)) | |
19697 + return 0; | |
19698 + | |
19699 + if (stat (path, &st) >= 0) | |
19700 + { | |
19701 + rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); | |
19702 + } | |
19703 + return rval; | |
19704 +} | |
19705 + | |
19706 +/* Searches for the full path of the wrapper. Returns | |
19707 + newly allocated full path name if found, NULL otherwise | |
19708 + Does not chase symlinks, even on platforms that support them. | |
19709 +*/ | |
19710 +char * | |
19711 +find_executable (const char *wrapper) | |
19712 +{ | |
19713 + int has_slash = 0; | |
19714 + const char *p; | |
19715 + const char *p_next; | |
19716 + /* static buffer for getcwd */ | |
19717 + char tmp[LT_PATHMAX + 1]; | |
19718 + int tmp_len; | |
19719 + char *concat_name; | |
19720 + | |
19721 + lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", | |
19722 + nonempty (wrapper)); | |
19723 + | |
19724 + if ((wrapper == NULL) || (*wrapper == '\0')) | |
19725 + return NULL; | |
19726 + | |
19727 + /* Absolute path? */ | |
19728 +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) | |
19729 + if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') | |
19730 + { | |
19731 + concat_name = xstrdup (wrapper); | |
19732 + if (check_executable (concat_name)) | |
19733 + return concat_name; | |
19734 + XFREE (concat_name); | |
19735 + } | |
19736 + else | |
19737 + { | |
19738 +#endif | |
19739 + if (IS_DIR_SEPARATOR (wrapper[0])) | |
19740 + { | |
19741 + concat_name = xstrdup (wrapper); | |
19742 + if (check_executable (concat_name)) | |
19743 + return concat_name; | |
19744 + XFREE (concat_name); | |
19745 + } | |
19746 +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) | |
19747 + } | |
19748 +#endif | |
19749 + | |
19750 + for (p = wrapper; *p; p++) | |
19751 + if (*p == '/') | |
19752 + { | |
19753 + has_slash = 1; | |
19754 + break; | |
19755 + } | |
19756 + if (!has_slash) | |
19757 + { | |
19758 + /* no slashes; search PATH */ | |
19759 + const char *path = getenv ("PATH"); | |
19760 + if (path != NULL) | |
19761 + { | |
19762 + for (p = path; *p; p = p_next) | |
19763 + { | |
19764 + const char *q; | |
19765 + size_t p_len; | |
19766 + for (q = p; *q; q++) | |
19767 + if (IS_PATH_SEPARATOR (*q)) | |
19768 + break; | |
19769 + p_len = q - p; | |
19770 + p_next = (*q == '\0' ? q : q + 1); | |
19771 + if (p_len == 0) | |
19772 + { | |
19773 + /* empty path: current directory */ | |
19774 + if (getcwd (tmp, LT_PATHMAX) == NULL) | |
19775 + lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", | |
19776 + nonnull (strerror (errno))); | |
19777 + tmp_len = strlen (tmp); | |
19778 + concat_name = | |
19779 + XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); | |
19780 + memcpy (concat_name, tmp, tmp_len); | |
19781 + concat_name[tmp_len] = '/'; | |
19782 + strcpy (concat_name + tmp_len + 1, wrapper); | |
19783 + } | |
19784 + else | |
19785 + { | |
19786 + concat_name = | |
19787 + XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); | |
19788 + memcpy (concat_name, p, p_len); | |
19789 + concat_name[p_len] = '/'; | |
19790 + strcpy (concat_name + p_len + 1, wrapper); | |
19791 + } | |
19792 + if (check_executable (concat_name)) | |
19793 + return concat_name; | |
19794 + XFREE (concat_name); | |
19795 + } | |
19796 + } | |
19797 + /* not found in PATH; assume curdir */ | |
19798 + } | |
19799 + /* Relative path | not found in path: prepend cwd */ | |
19800 + if (getcwd (tmp, LT_PATHMAX) == NULL) | |
19801 + lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", | |
19802 + nonnull (strerror (errno))); | |
19803 + tmp_len = strlen (tmp); | |
19804 + concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); | |
19805 + memcpy (concat_name, tmp, tmp_len); | |
19806 + concat_name[tmp_len] = '/'; | |
19807 + strcpy (concat_name + tmp_len + 1, wrapper); | |
19808 + | |
19809 + if (check_executable (concat_name)) | |
19810 + return concat_name; | |
19811 + XFREE (concat_name); | |
19812 + return NULL; | |
19813 +} | |
19814 + | |
19815 +char * | |
19816 +chase_symlinks (const char *pathspec) | |
19817 +{ | |
19818 +#ifndef S_ISLNK | |
19819 + return xstrdup (pathspec); | |
19820 +#else | |
19821 + char buf[LT_PATHMAX]; | |
19822 + struct stat s; | |
19823 + char *tmp_pathspec = xstrdup (pathspec); | |
19824 + char *p; | |
19825 + int has_symlinks = 0; | |
19826 + while (strlen (tmp_pathspec) && !has_symlinks) | |
19827 + { | |
19828 + lt_debugprintf (__FILE__, __LINE__, | |
19829 + "checking path component for symlinks: %s\n", | |
19830 + tmp_pathspec); | |
19831 + if (lstat (tmp_pathspec, &s) == 0) | |
19832 + { | |
19833 + if (S_ISLNK (s.st_mode) != 0) | |
19834 + { | |
19835 + has_symlinks = 1; | |
19836 + break; | |
19837 + } | |
19838 + | |
19839 + /* search backwards for last DIR_SEPARATOR */ | |
19840 + p = tmp_pathspec + strlen (tmp_pathspec) - 1; | |
19841 + while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) | |
19842 + p--; | |
19843 + if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) | |
19844 + { | |
19845 + /* no more DIR_SEPARATORS left */ | |
19846 + break; | |
19847 + } | |
19848 + *p = '\0'; | |
19849 + } | |
19850 + else | |
19851 + { | |
19852 + lt_fatal (__FILE__, __LINE__, | |
19853 + "error accessing file \"%s\": %s", | |
19854 + tmp_pathspec, nonnull (strerror (errno))); | |
19855 + } | |
19856 + } | |
19857 + XFREE (tmp_pathspec); | |
19858 + | |
19859 + if (!has_symlinks) | |
19860 + { | |
19861 + return xstrdup (pathspec); | |
19862 + } | |
19863 + | |
19864 + tmp_pathspec = realpath (pathspec, buf); | |
19865 + if (tmp_pathspec == 0) | |
19866 + { | |
19867 + lt_fatal (__FILE__, __LINE__, | |
19868 + "could not follow symlinks for %s", pathspec); | |
19869 + } | |
19870 + return xstrdup (tmp_pathspec); | |
19871 +#endif | |
19872 +} | |
19873 + | |
19874 +char * | |
19875 +strendzap (char *str, const char *pat) | |
19876 +{ | |
19877 + size_t len, patlen; | |
19878 + | |
19879 + assert (str != NULL); | |
19880 + assert (pat != NULL); | |
19881 + | |
19882 + len = strlen (str); | |
19883 + patlen = strlen (pat); | |
19884 + | |
19885 + if (patlen <= len) | |
19886 + { | |
19887 + str += len - patlen; | |
19888 + if (strcmp (str, pat) == 0) | |
19889 + *str = '\0'; | |
19890 + } | |
19891 + return str; | |
19892 +} | |
19893 + | |
19894 +void | |
19895 +lt_debugprintf (const char *file, int line, const char *fmt, ...) | |
19896 +{ | |
19897 + va_list args; | |
19898 + if (lt_debug) | |
19899 + { | |
19900 + (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); | |
19901 + va_start (args, fmt); | |
19902 + (void) vfprintf (stderr, fmt, args); | |
19903 + va_end (args); | |
19904 + } | |
19905 +} | |
19906 + | |
19907 +static void | |
19908 +lt_error_core (int exit_status, const char *file, | |
19909 + int line, const char *mode, | |
19910 + const char *message, va_list ap) | |
19911 +{ | |
19912 + fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); | |
19913 + vfprintf (stderr, message, ap); | |
19914 + fprintf (stderr, ".\n"); | |
19915 + | |
19916 + if (exit_status >= 0) | |
19917 + exit (exit_status); | |
19918 +} | |
19919 + | |
19920 +void | |
19921 +lt_fatal (const char *file, int line, const char *message, ...) | |
19922 +{ | |
19923 + va_list ap; | |
19924 + va_start (ap, message); | |
19925 + lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); | |
19926 + va_end (ap); | |
19927 +} | |
19928 + | |
19929 +static const char * | |
19930 +nonnull (const char *s) | |
19931 +{ | |
19932 + return s ? s : "(null)"; | |
19933 +} | |
19934 + | |
19935 +static const char * | |
19936 +nonempty (const char *s) | |
19937 +{ | |
19938 + return (s && !*s) ? "(empty)" : nonnull (s); | |
19939 +} | |
19940 + | |
19941 +void | |
19942 +lt_setenv (const char *name, const char *value) | |
19943 +{ | |
19944 + lt_debugprintf (__FILE__, __LINE__, | |
19945 + "(lt_setenv) setting '%s' to '%s'\n", | |
19946 + nonnull (name), nonnull (value)); | |
19947 + { | |
19948 +#ifdef HAVE_SETENV | |
19949 + /* always make a copy, for consistency with !HAVE_SETENV */ | |
19950 + char *str = xstrdup (value); | |
19951 + setenv (name, str, 1); | |
19952 +#else | |
19953 + int len = strlen (name) + 1 + strlen (value) + 1; | |
19954 + char *str = XMALLOC (char, len); | |
19955 + sprintf (str, "%s=%s", name, value); | |
19956 + if (putenv (str) != EXIT_SUCCESS) | |
19957 + { | |
19958 + XFREE (str); | |
19959 + } | |
19960 +#endif | |
19961 + } | |
19962 +} | |
19963 + | |
19964 +char * | |
19965 +lt_extend_str (const char *orig_value, const char *add, int to_end) | |
19966 +{ | |
19967 + char *new_value; | |
19968 + if (orig_value && *orig_value) | |
19969 + { | |
19970 + int orig_value_len = strlen (orig_value); | |
19971 + int add_len = strlen (add); | |
19972 + new_value = XMALLOC (char, add_len + orig_value_len + 1); | |
19973 + if (to_end) | |
19974 + { | |
19975 + strcpy (new_value, orig_value); | |
19976 + strcpy (new_value + orig_value_len, add); | |
19977 + } | |
19978 + else | |
19979 + { | |
19980 + strcpy (new_value, add); | |
19981 + strcpy (new_value + add_len, orig_value); | |
19982 + } | |
19983 + } | |
19984 + else | |
19985 + { | |
19986 + new_value = xstrdup (add); | |
19987 + } | |
19988 + return new_value; | |
19989 +} | |
19990 + | |
19991 +void | |
19992 +lt_update_exe_path (const char *name, const char *value) | |
19993 +{ | |
19994 + lt_debugprintf (__FILE__, __LINE__, | |
19995 + "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", | |
19996 + nonnull (name), nonnull (value)); | |
19997 + | |
19998 + if (name && *name && value && *value) | |
19999 + { | |
20000 + char *new_value = lt_extend_str (getenv (name), value, 0); | |
20001 + /* some systems can't cope with a ':'-terminated path #' */ | |
20002 + int len = strlen (new_value); | |
20003 + while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) | |
20004 + { | |
20005 + new_value[len-1] = '\0'; | |
20006 + } | |
20007 + lt_setenv (name, new_value); | |
20008 + XFREE (new_value); | |
20009 + } | |
20010 +} | |
20011 + | |
20012 +void | |
20013 +lt_update_lib_path (const char *name, const char *value) | |
20014 +{ | |
20015 + lt_debugprintf (__FILE__, __LINE__, | |
20016 + "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", | |
20017 + nonnull (name), nonnull (value)); | |
20018 + | |
20019 + if (name && *name && value && *value) | |
20020 + { | |
20021 + char *new_value = lt_extend_str (getenv (name), value, 0); | |
20022 + lt_setenv (name, new_value); | |
20023 + XFREE (new_value); | |
20024 + } | |
20025 +} | |
20026 + | |
20027 +EOF | |
20028 + case $host_os in | |
20029 + mingw*) | |
20030 + cat <<"EOF" | |
20031 + | |
20032 +/* Prepares an argument vector before calling spawn(). | |
20033 + Note that spawn() does not by itself call the command interpreter | |
20034 + (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : | |
20035 + ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); | |
20036 + GetVersionEx(&v); | |
20037 + v.dwPlatformId == VER_PLATFORM_WIN32_NT; | |
20038 + }) ? "cmd.exe" : "command.com"). | |
20039 + Instead it simply concatenates the arguments, separated by ' ', and calls | |
20040 + CreateProcess(). We must quote the arguments since Win32 CreateProcess() | |
20041 + interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a | |
20042 + special way: | |
20043 + - Space and tab are interpreted as delimiters. They are not treated as | |
20044 + delimiters if they are surrounded by double quotes: "...". | |
20045 + - Unescaped double quotes are removed from the input. Their only effect is | |
20046 + that within double quotes, space and tab are treated like normal | |
20047 + characters. | |
20048 + - Backslashes not followed by double quotes are not special. | |
20049 + - But 2*n+1 backslashes followed by a double quote become | |
20050 + n backslashes followed by a double quote (n >= 0): | |
20051 + \" -> " | |
20052 + \\\" -> \" | |
20053 + \\\\\" -> \\" | |
20054 + */ | |
20055 +#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" | |
20056 +#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" | |
20057 +char ** | |
20058 +prepare_spawn (char **argv) | |
20059 +{ | |
20060 + size_t argc; | |
20061 + char **new_argv; | |
20062 + size_t i; | |
20063 + | |
20064 + /* Count number of arguments. */ | |
20065 + for (argc = 0; argv[argc] != NULL; argc++) | |
20066 + ; | |
20067 + | |
20068 + /* Allocate new argument vector. */ | |
20069 + new_argv = XMALLOC (char *, argc + 1); | |
20070 + | |
20071 + /* Put quoted arguments into the new argument vector. */ | |
20072 + for (i = 0; i < argc; i++) | |
20073 + { | |
20074 + const char *string = argv[i]; | |
20075 + | |
20076 + if (string[0] == '\0') | |
20077 + new_argv[i] = xstrdup ("\"\""); | |
20078 + else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) | |
20079 + { | |
20080 + int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); | |
20081 + size_t length; | |
20082 + unsigned int backslashes; | |
20083 + const char *s; | |
20084 + char *quoted_string; | |
20085 + char *p; | |
20086 + | |
20087 + length = 0; | |
20088 + backslashes = 0; | |
20089 + if (quote_around) | |
20090 + length++; | |
20091 + for (s = string; *s != '\0'; s++) | |
20092 + { | |
20093 + char c = *s; | |
20094 + if (c == '"') | |
20095 + length += backslashes + 1; | |
20096 + length++; | |
20097 + if (c == '\\') | |
20098 + backslashes++; | |
20099 + else | |
20100 + backslashes = 0; | |
20101 + } | |
20102 + if (quote_around) | |
20103 + length += backslashes + 1; | |
20104 + | |
20105 + quoted_string = XMALLOC (char, length + 1); | |
20106 + | |
20107 + p = quoted_string; | |
20108 + backslashes = 0; | |
20109 + if (quote_around) | |
20110 + *p++ = '"'; | |
20111 + for (s = string; *s != '\0'; s++) | |
20112 + { | |
20113 + char c = *s; | |
20114 + if (c == '"') | |
20115 + { | |
20116 + unsigned int j; | |
20117 + for (j = backslashes + 1; j > 0; j--) | |
20118 + *p++ = '\\'; | |
20119 + } | |
20120 + *p++ = c; | |
20121 + if (c == '\\') | |
20122 + backslashes++; | |
20123 + else | |
20124 + backslashes = 0; | |
20125 + } | |
20126 + if (quote_around) | |
20127 + { | |
20128 + unsigned int j; | |
20129 + for (j = backslashes; j > 0; j--) | |
20130 + *p++ = '\\'; | |
20131 + *p++ = '"'; | |
20132 + } | |
20133 + *p = '\0'; | |
20134 + | |
20135 + new_argv[i] = quoted_string; | |
20136 + } | |
20137 + else | |
20138 + new_argv[i] = (char *) string; | |
20139 + } | |
20140 + new_argv[argc] = NULL; | |
20141 + | |
20142 + return new_argv; | |
20143 +} | |
20144 +EOF | |
20145 + ;; | |
20146 + esac | |
20147 + | |
20148 + cat <<"EOF" | |
20149 +void lt_dump_script (FILE* f) | |
20150 +{ | |
20151 +EOF | |
20152 + func_emit_wrapper yes | | |
20153 + $SED -n -e ' | |
20154 +s/^\(.\{79\}\)\(..*\)/\1\ | |
20155 +\2/ | |
20156 +h | |
20157 +s/\([\\"]\)/\\\1/g | |
20158 +s/$/\\n/ | |
20159 +s/\([^\n]*\).*/ fputs ("\1", f);/p | |
20160 +g | |
20161 +D' | |
20162 + cat <<"EOF" | |
20163 +} | |
20164 +EOF | |
20165 +} | |
20166 +# end: func_emit_cwrapperexe_src | |
20167 + | |
20168 +# func_win32_import_lib_p ARG | |
20169 +# True if ARG is an import lib, as indicated by $file_magic_cmd | |
20170 +func_win32_import_lib_p () | |
20171 +{ | |
20172 + $opt_debug | |
20173 + case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in | |
20174 + *import*) : ;; | |
20175 + *) false ;; | |
20176 + esac | |
20177 +} | |
20178 + | |
20179 +# func_mode_link arg... | |
20180 +func_mode_link () | |
20181 +{ | |
20182 + $opt_debug | |
20183 + case $host in | |
20184 + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) | |
20185 + # It is impossible to link a dll without this setting, and | |
20186 + # we shouldn't force the makefile maintainer to figure out | |
20187 + # which system we are compiling for in order to pass an extra | |
20188 + # flag for every libtool invocation. | |
20189 + # allow_undefined=no | |
20190 + | |
20191 + # FIXME: Unfortunately, there are problems with the above when trying | |
20192 + # to make a dll which has undefined symbols, in which case not | |
20193 + # even a static library is built. For now, we need to specify | |
20194 + # -no-undefined on the libtool link line when we can be certain | |
20195 + # that all symbols are satisfied, otherwise we get a static library. | |
20196 + allow_undefined=yes | |
20197 + ;; | |
20198 + *) | |
20199 + allow_undefined=yes | |
20200 + ;; | |
20201 + esac | |
20202 + libtool_args=$nonopt | |
20203 + base_compile="$nonopt $@" | |
20204 + compile_command=$nonopt | |
20205 + finalize_command=$nonopt | |
20206 + | |
20207 + compile_rpath= | |
20208 + finalize_rpath= | |
20209 + compile_shlibpath= | |
20210 + finalize_shlibpath= | |
20211 + convenience= | |
20212 + old_convenience= | |
20213 + deplibs= | |
20214 + old_deplibs= | |
20215 + compiler_flags= | |
20216 + linker_flags= | |
20217 + dllsearchpath= | |
20218 + lib_search_path=`pwd` | |
20219 + inst_prefix_dir= | |
20220 + new_inherited_linker_flags= | |
20221 + | |
20222 + avoid_version=no | |
20223 + bindir= | |
20224 + dlfiles= | |
20225 + dlprefiles= | |
20226 + dlself=no | |
20227 + export_dynamic=no | |
20228 + export_symbols= | |
20229 + export_symbols_regex= | |
20230 + generated= | |
20231 + libobjs= | |
20232 + ltlibs= | |
20233 + module=no | |
20234 + no_install=no | |
20235 + objs= | |
20236 + non_pic_objects= | |
20237 + precious_files_regex= | |
20238 + prefer_static_libs=no | |
20239 + preload=no | |
20240 + prev= | |
20241 + prevarg= | |
20242 + release= | |
20243 + rpath= | |
20244 + xrpath= | |
20245 + perm_rpath= | |
20246 + temp_rpath= | |
20247 + thread_safe=no | |
20248 + vinfo= | |
20249 + vinfo_number=no | |
20250 + weak_libs= | |
20251 + single_module="${wl}-single_module" | |
20252 + func_infer_tag $base_compile | |
20253 + | |
20254 + # We need to know -static, to get the right output filenames. | |
20255 + for arg | |
20256 + do | |
20257 + case $arg in | |
20258 + -shared) | |
20259 + test "$build_libtool_libs" != yes && \ | |
20260 + func_fatal_configuration "can not build a shared library" | |
20261 + build_old_libs=no | |
20262 + break | |
20263 + ;; | |
20264 + -all-static | -static | -static-libtool-libs) | |
20265 + case $arg in | |
20266 + -all-static) | |
20267 + if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then | |
20268 + func_warning "complete static linking is impossible in this configuration" | |
20269 + fi | |
20270 + if test -n "$link_static_flag"; then | |
20271 + dlopen_self=$dlopen_self_static | |
20272 + fi | |
20273 + prefer_static_libs=yes | |
20274 + ;; | |
20275 + -static) | |
20276 + if test -z "$pic_flag" && test -n "$link_static_flag"; then | |
20277 + dlopen_self=$dlopen_self_static | |
20278 + fi | |
20279 + prefer_static_libs=built | |
20280 + ;; | |
20281 + -static-libtool-libs) | |
20282 + if test -z "$pic_flag" && test -n "$link_static_flag"; then | |
20283 + dlopen_self=$dlopen_self_static | |
20284 + fi | |
20285 + prefer_static_libs=yes | |
20286 + ;; | |
20287 + esac | |
20288 + build_libtool_libs=no | |
20289 + build_old_libs=yes | |
20290 + break | |
20291 + ;; | |
20292 + esac | |
20293 + done | |
20294 + | |
20295 + # See if our shared archives depend on static archives. | |
20296 + test -n "$old_archive_from_new_cmds" && build_old_libs=yes | |
20297 + | |
20298 + # Go through the arguments, transforming them on the way. | |
20299 + while test "$#" -gt 0; do | |
20300 + arg="$1" | |
20301 + shift | |
20302 + func_quote_for_eval "$arg" | |
20303 + qarg=$func_quote_for_eval_unquoted_result | |
20304 + func_append libtool_args " $func_quote_for_eval_result" | |
20305 + | |
20306 + # If the previous option needs an argument, assign it. | |
20307 + if test -n "$prev"; then | |
20308 + case $prev in | |
20309 + output) | |
20310 + func_append compile_command " @OUTPUT@" | |
20311 + func_append finalize_command " @OUTPUT@" | |
20312 + ;; | |
20313 + esac | |
20314 + | |
20315 + case $prev in | |
20316 + bindir) | |
20317 + bindir="$arg" | |
20318 + prev= | |
20319 + continue | |
20320 + ;; | |
20321 + dlfiles|dlprefiles) | |
20322 + if test "$preload" = no; then | |
20323 + # Add the symbol object into the linking commands. | |
20324 + func_append compile_command " @SYMFILE@" | |
20325 + func_append finalize_command " @SYMFILE@" | |
20326 + preload=yes | |
20327 + fi | |
20328 + case $arg in | |
20329 + *.la | *.lo) ;; # We handle these cases below. | |
20330 + force) | |
20331 + if test "$dlself" = no; then | |
20332 + dlself=needless | |
20333 + export_dynamic=yes | |
20334 + fi | |
20335 + prev= | |
20336 + continue | |
20337 + ;; | |
20338 + self) | |
20339 + if test "$prev" = dlprefiles; then | |
20340 + dlself=yes | |
20341 + elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then | |
20342 + dlself=yes | |
20343 + else | |
20344 + dlself=needless | |
20345 + export_dynamic=yes | |
20346 + fi | |
20347 + prev= | |
20348 + continue | |
20349 + ;; | |
20350 + *) | |
20351 + if test "$prev" = dlfiles; then | |
20352 + func_append dlfiles " $arg" | |
20353 + else | |
20354 + func_append dlprefiles " $arg" | |
20355 + fi | |
20356 + prev= | |
20357 + continue | |
20358 + ;; | |
20359 + esac | |
20360 + ;; | |
20361 + expsyms) | |
20362 + export_symbols="$arg" | |
20363 + test -f "$arg" \ | |
20364 + || func_fatal_error "symbol file \`$arg' does not exist" | |
20365 + prev= | |
20366 + continue | |
20367 + ;; | |
20368 + expsyms_regex) | |
20369 + export_symbols_regex="$arg" | |
20370 + prev= | |
20371 + continue | |
20372 + ;; | |
20373 + framework) | |
20374 + case $host in | |
20375 + *-*-darwin*) | |
20376 + case "$deplibs " in | |
20377 + *" $qarg.ltframework "*) ;; | |
20378 + *) func_append deplibs " $qarg.ltframework" # this is fixed later | |
20379 + ;; | |
20380 + esac | |
20381 + ;; | |
20382 + esac | |
20383 + prev= | |
20384 + continue | |
20385 + ;; | |
20386 + inst_prefix) | |
20387 + inst_prefix_dir="$arg" | |
20388 + prev= | |
20389 + continue | |
20390 + ;; | |
20391 + objectlist) | |
20392 + if test -f "$arg"; then | |
20393 + save_arg=$arg | |
20394 + moreargs= | |
20395 + for fil in `cat "$save_arg"` | |
20396 + do | |
20397 +# func_append moreargs " $fil" | |
20398 + arg=$fil | |
20399 + # A libtool-controlled object. | |
20400 + | |
20401 + # Check to see that this really is a libtool object. | |
20402 + if func_lalib_unsafe_p "$arg"; then | |
20403 + pic_object= | |
20404 + non_pic_object= | |
20405 + | |
20406 + # Read the .lo file | |
20407 + func_source "$arg" | |
20408 + | |
20409 + if test -z "$pic_object" || | |
20410 + test -z "$non_pic_object" || | |
20411 + test "$pic_object" = none && | |
20412 + test "$non_pic_object" = none; then | |
20413 + func_fatal_error "cannot find name of object for \`$arg'" | |
20414 + fi | |
20415 + | |
20416 + # Extract subdirectory from the argument. | |
20417 + func_dirname "$arg" "/" "" | |
20418 + xdir="$func_dirname_result" | |
20419 + | |
20420 + if test "$pic_object" != none; then | |
20421 + # Prepend the subdirectory the object is found in. | |
20422 + pic_object="$xdir$pic_object" | |
20423 + | |
20424 + if test "$prev" = dlfiles; then | |
20425 + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then | |
20426 + func_append dlfiles " $pic_object" | |
20427 + prev= | |
20428 + continue | |
20429 + else | |
20430 + # If libtool objects are unsupported, then we need to preload. | |
20431 + prev=dlprefiles | |
20432 + fi | |
20433 + fi | |
20434 + | |
20435 + # CHECK ME: I think I busted this. -Ossama | |
20436 + if test "$prev" = dlprefiles; then | |
20437 + # Preload the old-style object. | |
20438 + func_append dlprefiles " $pic_object" | |
20439 + prev= | |
20440 + fi | |
20441 + | |
20442 + # A PIC object. | |
20443 + func_append libobjs " $pic_object" | |
20444 + arg="$pic_object" | |
20445 + fi | |
20446 + | |
20447 + # Non-PIC object. | |
20448 + if test "$non_pic_object" != none; then | |
20449 + # Prepend the subdirectory the object is found in. | |
20450 + non_pic_object="$xdir$non_pic_object" | |
20451 + | |
20452 + # A standard non-PIC object | |
20453 + func_append non_pic_objects " $non_pic_object" | |
20454 + if test -z "$pic_object" || test "$pic_object" = none ; then | |
20455 + arg="$non_pic_object" | |
20456 + fi | |
20457 + else | |
20458 + # If the PIC object exists, use it instead. | |
20459 + # $xdir was prepended to $pic_object above. | |
20460 + non_pic_object="$pic_object" | |
20461 + func_append non_pic_objects " $non_pic_object" | |
20462 + fi | |
20463 + else | |
20464 + # Only an error if not doing a dry-run. | |
20465 + if $opt_dry_run; then | |
20466 + # Extract subdirectory from the argument. | |
20467 + func_dirname "$arg" "/" "" | |
20468 + xdir="$func_dirname_result" | |
20469 + | |
20470 + func_lo2o "$arg" | |
20471 + pic_object=$xdir$objdir/$func_lo2o_result | |
20472 + non_pic_object=$xdir$func_lo2o_result | |
20473 + func_append libobjs " $pic_object" | |
20474 + func_append non_pic_objects " $non_pic_object" | |
20475 + else | |
20476 + func_fatal_error "\`$arg' is not a valid libtool object" | |
20477 + fi | |
20478 + fi | |
20479 + done | |
20480 + else | |
20481 + func_fatal_error "link input file \`$arg' does not exist" | |
20482 + fi | |
20483 + arg=$save_arg | |
20484 + prev= | |
20485 + continue | |
20486 + ;; | |
20487 + precious_regex) | |
20488 + precious_files_regex="$arg" | |
20489 + prev= | |
20490 + continue | |
20491 + ;; | |
20492 + release) | |
20493 + release="-$arg" | |
20494 + prev= | |
20495 + continue | |
20496 + ;; | |
20497 + rpath | xrpath) | |
20498 + # We need an absolute path. | |
20499 + case $arg in | |
20500 + [\\/]* | [A-Za-z]:[\\/]*) ;; | |
20501 + *) | |
20502 + func_fatal_error "only absolute run-paths are allowed" | |
20503 + ;; | |
20504 + esac | |
20505 + if test "$prev" = rpath; then | |
20506 + case "$rpath " in | |
20507 + *" $arg "*) ;; | |
20508 + *) func_append rpath " $arg" ;; | |
20509 + esac | |
20510 + else | |
20511 + case "$xrpath " in | |
20512 + *" $arg "*) ;; | |
20513 + *) func_append xrpath " $arg" ;; | |
20514 + esac | |
20515 + fi | |
20516 + prev= | |
20517 + continue | |
20518 + ;; | |
20519 + shrext) | |
20520 + shrext_cmds="$arg" | |
20521 + prev= | |
20522 + continue | |
20523 + ;; | |
20524 + weak) | |
20525 + func_append weak_libs " $arg" | |
20526 + prev= | |
20527 + continue | |
20528 + ;; | |
20529 + xcclinker) | |
20530 + func_append linker_flags " $qarg" | |
20531 + func_append compiler_flags " $qarg" | |
20532 + prev= | |
20533 + func_append compile_command " $qarg" | |
20534 + func_append finalize_command " $qarg" | |
20535 + continue | |
20536 + ;; | |
20537 + xcompiler) | |
20538 + func_append compiler_flags " $qarg" | |
20539 + prev= | |
20540 + func_append compile_command " $qarg" | |
20541 + func_append finalize_command " $qarg" | |
20542 + continue | |
20543 + ;; | |
20544 + xlinker) | |
20545 + func_append linker_flags " $qarg" | |
20546 + func_append compiler_flags " $wl$qarg" | |
20547 + prev= | |
20548 + func_append compile_command " $wl$qarg" | |
20549 + func_append finalize_command " $wl$qarg" | |
20550 + continue | |
20551 + ;; | |
20552 + *) | |
20553 + eval "$prev=\"\$arg\"" | |
20554 + prev= | |
20555 + continue | |
20556 + ;; | |
20557 + esac | |
20558 + fi # test -n "$prev" | |
20559 + | |
20560 + prevarg="$arg" | |
20561 + | |
20562 + case $arg in | |
20563 + -all-static) | |
20564 + if test -n "$link_static_flag"; then | |
20565 + # See comment for -static flag below, for more details. | |
20566 + func_append compile_command " $link_static_flag" | |
20567 + func_append finalize_command " $link_static_flag" | |
20568 + fi | |
20569 + continue | |
20570 + ;; | |
20571 + | |
20572 + -allow-undefined) | |
20573 + # FIXME: remove this flag sometime in the future. | |
20574 + func_fatal_error "\`-allow-undefined' must not be used because it is the default" | |
20575 + ;; | |
20576 + | |
20577 + -avoid-version) | |
20578 + avoid_version=yes | |
20579 + continue | |
20580 + ;; | |
20581 + | |
20582 + -bindir) | |
20583 + prev=bindir | |
20584 + continue | |
20585 + ;; | |
20586 + | |
20587 + -dlopen) | |
20588 + prev=dlfiles | |
20589 + continue | |
20590 + ;; | |
20591 + | |
20592 + -dlpreopen) | |
20593 + prev=dlprefiles | |
20594 + continue | |
20595 + ;; | |
20596 + | |
20597 + -export-dynamic) | |
20598 + export_dynamic=yes | |
20599 + continue | |
20600 + ;; | |
20601 + | |
20602 + -export-symbols | -export-symbols-regex) | |
20603 + if test -n "$export_symbols" || test -n "$export_symbols_regex"; then | |
20604 + func_fatal_error "more than one -exported-symbols argument is not allowed" | |
20605 + fi | |
20606 + if test "X$arg" = "X-export-symbols"; then | |
20607 + prev=expsyms | |
20608 + else | |
20609 + prev=expsyms_regex | |
20610 + fi | |
20611 + continue | |
20612 + ;; | |
20613 + | |
20614 + -framework) | |
20615 + prev=framework | |
20616 + continue | |
20617 + ;; | |
20618 + | |
20619 + -inst-prefix-dir) | |
20620 + prev=inst_prefix | |
20621 + continue | |
20622 + ;; | |
20623 + | |
20624 + # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* | |
20625 + # so, if we see these flags be careful not to treat them like -L | |
20626 + -L[A-Z][A-Z]*:*) | |
20627 + case $with_gcc/$host in | |
20628 + no/*-*-irix* | /*-*-irix*) | |
20629 + func_append compile_command " $arg" | |
20630 + func_append finalize_command " $arg" | |
20631 + ;; | |
20632 + esac | |
20633 + continue | |
20634 + ;; | |
20635 + | |
20636 + -L*) | |
20637 + func_stripname "-L" '' "$arg" | |
20638 + if test -z "$func_stripname_result"; then | |
20639 + if test "$#" -gt 0; then | |
20640 + func_fatal_error "require no space between \`-L' and \`$1'" | |
20641 + else | |
20642 + func_fatal_error "need path for \`-L' option" | |
20643 + fi | |
20644 + fi | |
20645 + func_resolve_sysroot "$func_stripname_result" | |
20646 + dir=$func_resolve_sysroot_result | |
20647 + # We need an absolute path. | |
20648 + case $dir in | |
20649 + [\\/]* | [A-Za-z]:[\\/]*) ;; | |
20650 + *) | |
20651 + absdir=`cd "$dir" && pwd` | |
20652 + test -z "$absdir" && \ | |
20653 + func_fatal_error "cannot determine absolute directory name of \`$dir'" | |
20654 + dir="$absdir" | |
20655 + ;; | |
20656 + esac | |
20657 + case "$deplibs " in | |
20658 + *" -L$dir "* | *" $arg "*) | |
20659 + # Will only happen for absolute or sysroot arguments | |
20660 + ;; | |
20661 + *) | |
20662 + # Preserve sysroot, but never include relative directories | |
20663 + case $dir in | |
20664 + [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; | |
20665 + *) func_append deplibs " -L$dir" ;; | |
20666 + esac | |
20667 + func_append lib_search_path " $dir" | |
20668 + ;; | |
20669 + esac | |
20670 + case $host in | |
20671 + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) | |
20672 + testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` | |
20673 + case :$dllsearchpath: in | |
20674 + *":$dir:"*) ;; | |
20675 + ::) dllsearchpath=$dir;; | |
20676 + *) func_append dllsearchpath ":$dir";; | |
20677 + esac | |
20678 + case :$dllsearchpath: in | |
20679 + *":$testbindir:"*) ;; | |
20680 + ::) dllsearchpath=$testbindir;; | |
20681 + *) func_append dllsearchpath ":$testbindir";; | |
20682 + esac | |
20683 + ;; | |
20684 + esac | |
20685 + continue | |
20686 + ;; | |
20687 + | |
20688 + -l*) | |
20689 + if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then | |
20690 + case $host in | |
20691 + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) | |
20692 + # These systems don't actually have a C or math library (as such) | |
20693 + continue | |
20694 + ;; | |
20695 + *-*-os2*) | |
20696 + # These systems don't actually have a C library (as such) | |
20697 + test "X$arg" = "X-lc" && continue | |
20698 + ;; | |
20699 + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) | |
20700 + # Do not include libc due to us having libc/libc_r. | |
20701 + test "X$arg" = "X-lc" && continue | |
20702 + ;; | |
20703 + *-*-rhapsody* | *-*-darwin1.[012]) | |
20704 + # Rhapsody C and math libraries are in the System framework | |
20705 + func_append deplibs " System.ltframework" | |
20706 + continue | |
20707 + ;; | |
20708 + *-*-sco3.2v5* | *-*-sco5v6*) | |
20709 + # Causes problems with __ctype | |
20710 + test "X$arg" = "X-lc" && continue | |
20711 + ;; | |
20712 + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) | |
20713 + # Compiler inserts libc in the correct place for threads to work | |
20714 + test "X$arg" = "X-lc" && continue | |
20715 + ;; | |
20716 + esac | |
20717 + elif test "X$arg" = "X-lc_r"; then | |
20718 + case $host in | |
20719 + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) | |
20720 + # Do not include libc_r directly, use -pthread flag. | |
20721 + continue | |
20722 + ;; | |
20723 + esac | |
20724 + fi | |
20725 + func_append deplibs " $arg" | |
20726 + continue | |
20727 + ;; | |
20728 + | |
20729 + -module) | |
20730 + module=yes | |
20731 + continue | |
20732 + ;; | |
20733 + | |
20734 + # Tru64 UNIX uses -model [arg] to determine the layout of C++ | |
20735 + # classes, name mangling, and exception handling. | |
20736 + # Darwin uses the -arch flag to determine output architecture. | |
20737 + -model|-arch|-isysroot|--sysroot) | |
20738 + func_append compiler_flags " $arg" | |
20739 + func_append compile_command " $arg" | |
20740 + func_append finalize_command " $arg" | |
20741 + prev=xcompiler | |
20742 + continue | |
20743 + ;; | |
20744 + | |
20745 + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ | |
20746 + |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) | |
20747 + func_append compiler_flags " $arg" | |
20748 + func_append compile_command " $arg" | |
20749 + func_append finalize_command " $arg" | |
20750 + case "$new_inherited_linker_flags " in | |
20751 + *" $arg "*) ;; | |
20752 + * ) func_append new_inherited_linker_flags " $arg" ;; | |
20753 + esac | |
20754 + continue | |
20755 + ;; | |
20756 + | |
20757 + -multi_module) | |
20758 + single_module="${wl}-multi_module" | |
20759 + continue | |
20760 + ;; | |
20761 + | |
20762 + -no-fast-install) | |
20763 + fast_install=no | |
20764 + continue | |
20765 + ;; | |
20766 + | |
20767 + -no-install) | |
20768 + case $host in | |
20769 + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) | |
20770 + # The PATH hackery in wrapper scripts is required on Windows | |
20771 + # and Darwin in order for the loader to find any dlls it needs. | |
20772 + func_warning "\`-no-install' is ignored for $host" | |
20773 + func_warning "assuming \`-no-fast-install' instead" | |
20774 + fast_install=no | |
20775 + ;; | |
20776 + *) no_install=yes ;; | |
20777 + esac | |
20778 + continue | |
20779 + ;; | |
20780 + | |
20781 + -no-undefined) | |
20782 + allow_undefined=no | |
20783 + continue | |
20784 + ;; | |
20785 + | |
20786 + -objectlist) | |
20787 + prev=objectlist | |
20788 + continue | |
20789 + ;; | |
20790 + | |
20791 + -o) prev=output ;; | |
20792 + | |
20793 + -precious-files-regex) | |
20794 + prev=precious_regex | |
20795 + continue | |
20796 + ;; | |
20797 + | |
20798 + -release) | |
20799 + prev=release | |
20800 + continue | |
20801 + ;; | |
20802 + | |
20803 + -rpath) | |
20804 + prev=rpath | |
20805 + continue | |
20806 + ;; | |
20807 + | |
20808 + -R) | |
20809 + prev=xrpath | |
20810 + continue | |
20811 + ;; | |
20812 + | |
20813 + -R*) | |
20814 + func_stripname '-R' '' "$arg" | |
20815 + dir=$func_stripname_result | |
20816 + # We need an absolute path. | |
20817 + case $dir in | |
20818 + [\\/]* | [A-Za-z]:[\\/]*) ;; | |
20819 + =*) | |
20820 + func_stripname '=' '' "$dir" | |
20821 + dir=$lt_sysroot$func_stripname_result | |
20822 + ;; | |
20823 + *) | |
20824 + func_fatal_error "only absolute run-paths are allowed" | |
20825 + ;; | |
20826 + esac | |
20827 + case "$xrpath " in | |
20828 + *" $dir "*) ;; | |
20829 + *) func_append xrpath " $dir" ;; | |
20830 + esac | |
20831 + continue | |
20832 + ;; | |
20833 + | |
20834 + -shared) | |
20835 + # The effects of -shared are defined in a previous loop. | |
20836 + continue | |
20837 + ;; | |
20838 + | |
20839 + -shrext) | |
20840 + prev=shrext | |
20841 + continue | |
20842 + ;; | |
20843 + | |
20844 + -static | -static-libtool-libs) | |
20845 + # The effects of -static are defined in a previous loop. | |
20846 + # We used to do the same as -all-static on platforms that | |
20847 + # didn't have a PIC flag, but the assumption that the effects | |
20848 + # would be equivalent was wrong. It would break on at least | |
20849 + # Digital Unix and AIX. | |
20850 + continue | |
20851 + ;; | |
20852 + | |
20853 + -thread-safe) | |
20854 + thread_safe=yes | |
20855 + continue | |
20856 + ;; | |
20857 + | |
20858 + -version-info) | |
20859 + prev=vinfo | |
20860 + continue | |
20861 + ;; | |
20862 + | |
20863 + -version-number) | |
20864 + prev=vinfo | |
20865 + vinfo_number=yes | |
20866 + continue | |
20867 + ;; | |
20868 + | |
20869 + -weak) | |
20870 + prev=weak | |
20871 + continue | |
20872 + ;; | |
20873 + | |
20874 + -Wc,*) | |
20875 + func_stripname '-Wc,' '' "$arg" | |
20876 + args=$func_stripname_result | |
20877 + arg= | |
20878 + save_ifs="$IFS"; IFS=',' | |
20879 + for flag in $args; do | |
20880 + IFS="$save_ifs" | |
20881 + func_quote_for_eval "$flag" | |
20882 + func_append arg " $func_quote_for_eval_result" | |
20883 + func_append compiler_flags " $func_quote_for_eval_result" | |
20884 + done | |
20885 + IFS="$save_ifs" | |
20886 + func_stripname ' ' '' "$arg" | |
20887 + arg=$func_stripname_result | |
20888 + ;; | |
20889 + | |
20890 + -Wl,*) | |
20891 + func_stripname '-Wl,' '' "$arg" | |
20892 + args=$func_stripname_result | |
20893 + arg= | |
20894 + save_ifs="$IFS"; IFS=',' | |
20895 + for flag in $args; do | |
20896 + IFS="$save_ifs" | |
20897 + func_quote_for_eval "$flag" | |
20898 + func_append arg " $wl$func_quote_for_eval_result" | |
20899 + func_append compiler_flags " $wl$func_quote_for_eval_result" | |
20900 + func_append linker_flags " $func_quote_for_eval_result" | |
20901 + done | |
20902 + IFS="$save_ifs" | |
20903 + func_stripname ' ' '' "$arg" | |
20904 + arg=$func_stripname_result | |
20905 + ;; | |
20906 + | |
20907 + -Xcompiler) | |
20908 + prev=xcompiler | |
20909 + continue | |
20910 + ;; | |
20911 + | |
20912 + -Xlinker) | |
20913 + prev=xlinker | |
20914 + continue | |
20915 + ;; | |
20916 + | |
20917 + -XCClinker) | |
20918 + prev=xcclinker | |
20919 + continue | |
20920 + ;; | |
20921 + | |
20922 + # -msg_* for osf cc | |
20923 + -msg_*) | |
20924 + func_quote_for_eval "$arg" | |
20925 + arg="$func_quote_for_eval_result" | |
20926 + ;; | |
20927 + | |
20928 + # Flags to be passed through unchanged, with rationale: | |
20929 + # -64, -mips[0-9] enable 64-bit mode for the SGI compiler | |
20930 + # -r[0-9][0-9]* specify processor for the SGI compiler | |
20931 + # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler | |
20932 + # +DA*, +DD* enable 64-bit mode for the HP compiler | |
20933 + # -q* compiler args for the IBM compiler | |
20934 + # -m*, -t[45]*, -txscale* architecture-specific flags for GCC | |
20935 + # -F/path path to uninstalled frameworks, gcc on darwin | |
20936 + # -p, -pg, --coverage, -fprofile-* profiling flags for GCC | |
20937 + # @file GCC response files | |
20938 + # -tp=* Portland pgcc target processor selection | |
20939 + # --sysroot=* for sysroot support | |
20940 + # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization | |
20941 + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ | |
20942 + -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ | |
20943 + -O*|-flto*|-fwhopr*|-fuse-linker-plugin) | |
20944 + func_quote_for_eval "$arg" | |
20945 + arg="$func_quote_for_eval_result" | |
20946 + func_append compile_command " $arg" | |
20947 + func_append finalize_command " $arg" | |
20948 + func_append compiler_flags " $arg" | |
20949 + continue | |
20950 + ;; | |
20951 + | |
20952 + # Some other compiler flag. | |
20953 + -* | +*) | |
20954 + func_quote_for_eval "$arg" | |
20955 + arg="$func_quote_for_eval_result" | |
20956 + ;; | |
20957 + | |
20958 + *.$objext) | |
20959 + # A standard object. | |
20960 + func_append objs " $arg" | |
20961 + ;; | |
20962 + | |
20963 + *.lo) | |
20964 + # A libtool-controlled object. | |
20965 + | |
20966 + # Check to see that this really is a libtool object. | |
20967 + if func_lalib_unsafe_p "$arg"; then | |
20968 + pic_object= | |
20969 + non_pic_object= | |
20970 + | |
20971 + # Read the .lo file | |
20972 + func_source "$arg" | |
20973 + | |
20974 + if test -z "$pic_object" || | |
20975 + test -z "$non_pic_object" || | |
20976 + test "$pic_object" = none && | |
20977 + test "$non_pic_object" = none; then | |
20978 + func_fatal_error "cannot find name of object for \`$arg'" | |
20979 + fi | |
20980 + | |
20981 + # Extract subdirectory from the argument. | |
20982 + func_dirname "$arg" "/" "" | |
20983 + xdir="$func_dirname_result" | |
20984 + | |
20985 + if test "$pic_object" != none; then | |
20986 + # Prepend the subdirectory the object is found in. | |
20987 + pic_object="$xdir$pic_object" | |
20988 + | |
20989 + if test "$prev" = dlfiles; then | |
20990 + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then | |
20991 + func_append dlfiles " $pic_object" | |
20992 + prev= | |
20993 + continue | |
20994 + else | |
20995 + # If libtool objects are unsupported, then we need to preload. | |
20996 + prev=dlprefiles | |
20997 + fi | |
20998 + fi | |
20999 + | |
21000 + # CHECK ME: I think I busted this. -Ossama | |
21001 + if test "$prev" = dlprefiles; then | |
21002 + # Preload the old-style object. | |
21003 + func_append dlprefiles " $pic_object" | |
21004 + prev= | |
21005 + fi | |
21006 + | |
21007 + # A PIC object. | |
21008 + func_append libobjs " $pic_object" | |
21009 + arg="$pic_object" | |
21010 + fi | |
21011 + | |
21012 + # Non-PIC object. | |
21013 + if test "$non_pic_object" != none; then | |
21014 + # Prepend the subdirectory the object is found in. | |
21015 + non_pic_object="$xdir$non_pic_object" | |
21016 + | |
21017 + # A standard non-PIC object | |
21018 + func_append non_pic_objects " $non_pic_object" | |
21019 + if test -z "$pic_object" || test "$pic_object" = none ; then | |
21020 + arg="$non_pic_object" | |
21021 + fi | |
21022 + else | |
21023 + # If the PIC object exists, use it instead. | |
21024 + # $xdir was prepended to $pic_object above. | |
21025 + non_pic_object="$pic_object" | |
21026 + func_append non_pic_objects " $non_pic_object" | |
21027 + fi | |
21028 + else | |
21029 + # Only an error if not doing a dry-run. | |
21030 + if $opt_dry_run; then | |
21031 + # Extract subdirectory from the argument. | |
21032 + func_dirname "$arg" "/" "" | |
21033 + xdir="$func_dirname_result" | |
21034 + | |
21035 + func_lo2o "$arg" | |
21036 + pic_object=$xdir$objdir/$func_lo2o_result | |
21037 + non_pic_object=$xdir$func_lo2o_result | |
21038 + func_append libobjs " $pic_object" | |
21039 + func_append non_pic_objects " $non_pic_object" | |
21040 + else | |
21041 + func_fatal_error "\`$arg' is not a valid libtool object" | |
21042 + fi | |
21043 + fi | |
21044 + ;; | |
21045 + | |
21046 + *.$libext) | |
21047 + # An archive. | |
21048 + func_append deplibs " $arg" | |
21049 + func_append old_deplibs " $arg" | |
21050 + continue | |
21051 + ;; | |
21052 + | |
21053 + *.la) | |
21054 + # A libtool-controlled library. | |
21055 + | |
21056 + func_resolve_sysroot "$arg" | |
21057 + if test "$prev" = dlfiles; then | |
21058 + # This library was specified with -dlopen. | |
21059 + func_append dlfiles " $func_resolve_sysroot_result" | |
21060 + prev= | |
21061 + elif test "$prev" = dlprefiles; then | |
21062 + # The library was specified with -dlpreopen. | |
21063 + func_append dlprefiles " $func_resolve_sysroot_result" | |
21064 + prev= | |
21065 + else | |
21066 + func_append deplibs " $func_resolve_sysroot_result" | |
21067 + fi | |
21068 + continue | |
21069 + ;; | |
21070 + | |
21071 + # Some other compiler argument. | |
21072 + *) | |
21073 + # Unknown arguments in both finalize_command and compile_command need | |
21074 + # to be aesthetically quoted because they are evaled later. | |
21075 + func_quote_for_eval "$arg" | |
21076 + arg="$func_quote_for_eval_result" | |
21077 + ;; | |
21078 + esac # arg | |
21079 + | |
21080 + # Now actually substitute the argument into the commands. | |
21081 + if test -n "$arg"; then | |
21082 + func_append compile_command " $arg" | |
21083 + func_append finalize_command " $arg" | |
21084 + fi | |
21085 + done # argument parsing loop | |
21086 + | |
21087 + test -n "$prev" && \ | |
21088 + func_fatal_help "the \`$prevarg' option requires an argument" | |
21089 + | |
21090 + if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then | |
21091 + eval arg=\"$export_dynamic_flag_spec\" | |
21092 + func_append compile_command " $arg" | |
21093 + func_append finalize_command " $arg" | |
21094 + fi | |
21095 + | |
21096 + oldlibs= | |
21097 + # calculate the name of the file, without its directory | |
21098 + func_basename "$output" | |
21099 + outputname="$func_basename_result" | |
21100 + libobjs_save="$libobjs" | |
21101 + | |
21102 + if test -n "$shlibpath_var"; then | |
21103 + # get the directories listed in $shlibpath_var | |
21104 + eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\` | |
21105 + else | |
21106 + shlib_search_path= | |
21107 + fi | |
21108 + eval sys_lib_search_path=\"$sys_lib_search_path_spec\" | |
21109 + eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" | |
21110 + | |
21111 + func_dirname "$output" "/" "" | |
21112 + output_objdir="$func_dirname_result$objdir" | |
21113 + func_to_tool_file "$output_objdir/" | |
21114 + tool_output_objdir=$func_to_tool_file_result | |
21115 + # Create the object directory. | |
21116 + func_mkdir_p "$output_objdir" | |
21117 + | |
21118 + # Determine the type of output | |
21119 + case $output in | |
21120 + "") | |
21121 + func_fatal_help "you must specify an output file" | |
21122 + ;; | |
21123 + *.$libext) linkmode=oldlib ;; | |
21124 + *.lo | *.$objext) linkmode=obj ;; | |
21125 + *.la) linkmode=lib ;; | |
21126 + *) linkmode=prog ;; # Anything else should be a program. | |
21127 + esac | |
21128 + | |
21129 + specialdeplibs= | |
21130 + | |
21131 + libs= | |
21132 + # Find all interdependent deplibs by searching for libraries | |
21133 + # that are linked more than once (e.g. -la -lb -la) | |
21134 + for deplib in $deplibs; do | |
21135 + if $opt_preserve_dup_deps ; then | |
21136 + case "$libs " in | |
21137 + *" $deplib "*) func_append specialdeplibs " $deplib" ;; | |
21138 + esac | |
21139 + fi | |
21140 + func_append libs " $deplib" | |
21141 + done | |
21142 + | |
21143 + if test "$linkmode" = lib; then | |
21144 + libs="$predeps $libs $compiler_lib_search_path $postdeps" | |
21145 + | |
21146 + # Compute libraries that are listed more than once in $predeps | |
21147 + # $postdeps and mark them as special (i.e., whose duplicates are | |
21148 + # not to be eliminated). | |
21149 + pre_post_deps= | |
21150 + if $opt_duplicate_compiler_generated_deps; then | |
21151 + for pre_post_dep in $predeps $postdeps; do | |
21152 + case "$pre_post_deps " in | |
21153 + *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; | |
21154 + esac | |
21155 + func_append pre_post_deps " $pre_post_dep" | |
21156 + done | |
21157 + fi | |
21158 + pre_post_deps= | |
21159 + fi | |
21160 + | |
21161 + deplibs= | |
21162 + newdependency_libs= | |
21163 + newlib_search_path= | |
21164 + need_relink=no # whether we're linking any uninstalled libtool libraries | |
21165 + notinst_deplibs= # not-installed libtool libraries | |
21166 + notinst_path= # paths that contain not-installed libtool libraries | |
21167 + | |
21168 + case $linkmode in | |
21169 + lib) | |
21170 + passes="conv dlpreopen link" | |
21171 + for file in $dlfiles $dlprefiles; do | |
21172 + case $file in | |
21173 + *.la) ;; | |
21174 + *) | |
21175 + func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" | |
21176 + ;; | |
21177 + esac | |
21178 + done | |
21179 + ;; | |
21180 + prog) | |
21181 + compile_deplibs= | |
21182 + finalize_deplibs= | |
21183 + alldeplibs=no | |
21184 + newdlfiles= | |
21185 + newdlprefiles= | |
21186 + passes="conv scan dlopen dlpreopen link" | |
21187 + ;; | |
21188 + *) passes="conv" | |
21189 + ;; | |
21190 + esac | |
21191 + | |
21192 + for pass in $passes; do | |
21193 + # The preopen pass in lib mode reverses $deplibs; put it back here | |
21194 + # so that -L comes before libs that need it for instance... | |
21195 + if test "$linkmode,$pass" = "lib,link"; then | |
21196 + ## FIXME: Find the place where the list is rebuilt in the wrong | |
21197 + ## order, and fix it there properly | |
21198 + tmp_deplibs= | |
21199 + for deplib in $deplibs; do | |
21200 + tmp_deplibs="$deplib $tmp_deplibs" | |
21201 + done | |
21202 + deplibs="$tmp_deplibs" | |
21203 + fi | |
21204 + | |
21205 + if test "$linkmode,$pass" = "lib,link" || | |
21206 + test "$linkmode,$pass" = "prog,scan"; then | |
21207 + libs="$deplibs" | |
21208 + deplibs= | |
21209 + fi | |
21210 + if test "$linkmode" = prog; then | |
21211 + case $pass in | |
21212 + dlopen) libs="$dlfiles" ;; | |
21213 + dlpreopen) libs="$dlprefiles" ;; | |
21214 + link) | |
21215 + libs="$deplibs %DEPLIBS%" | |
21216 + test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" | |
21217 + ;; | |
21218 + esac | |
21219 + fi | |
21220 + if test "$linkmode,$pass" = "lib,dlpreopen"; then | |
21221 + # Collect and forward deplibs of preopened libtool libs | |
21222 + for lib in $dlprefiles; do | |
21223 + # Ignore non-libtool-libs | |
21224 + dependency_libs= | |
21225 + func_resolve_sysroot "$lib" | |
21226 + case $lib in | |
21227 + *.la) func_source "$func_resolve_sysroot_result" ;; | |
21228 + esac | |
21229 + | |
21230 + # Collect preopened libtool deplibs, except any this library | |
21231 + # has declared as weak libs | |
21232 + for deplib in $dependency_libs; do | |
21233 + func_basename "$deplib" | |
21234 + deplib_base=$func_basename_result | |
21235 + case " $weak_libs " in | |
21236 + *" $deplib_base "*) ;; | |
21237 + *) func_append deplibs " $deplib" ;; | |
21238 + esac | |
21239 + done | |
21240 + done | |
21241 + libs="$dlprefiles" | |
21242 + fi | |
21243 + if test "$pass" = dlopen; then | |
21244 + # Collect dlpreopened libraries | |
21245 + save_deplibs="$deplibs" | |
21246 + deplibs= | |
21247 + fi | |
21248 + | |
21249 + for deplib in $libs; do | |
21250 + lib= | |
21251 + found=no | |
21252 + case $deplib in | |
21253 + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ | |
21254 + |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) | |
21255 + if test "$linkmode,$pass" = "prog,link"; then | |
21256 + compile_deplibs="$deplib $compile_deplibs" | |
21257 + finalize_deplibs="$deplib $finalize_deplibs" | |
21258 + else | |
21259 + func_append compiler_flags " $deplib" | |
21260 + if test "$linkmode" = lib ; then | |
21261 + case "$new_inherited_linker_flags " in | |
21262 + *" $deplib "*) ;; | |
21263 + * ) func_append new_inherited_linker_flags " $deplib" ;; | |
21264 + esac | |
21265 + fi | |
21266 + fi | |
21267 + continue | |
21268 + ;; | |
21269 + -l*) | |
21270 + if test "$linkmode" != lib && test "$linkmode" != prog; then | |
21271 + func_warning "\`-l' is ignored for archives/objects" | |
21272 + continue | |
21273 + fi | |
21274 + func_stripname '-l' '' "$deplib" | |
21275 + name=$func_stripname_result | |
21276 + if test "$linkmode" = lib; then | |
21277 + searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" | |
21278 + else | |
21279 + searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" | |
21280 + fi | |
21281 + for searchdir in $searchdirs; do | |
21282 + for search_ext in .la $std_shrext .so .a; do | |
21283 + # Search the libtool library | |
21284 + lib="$searchdir/lib${name}${search_ext}" | |
21285 + if test -f "$lib"; then | |
21286 + if test "$search_ext" = ".la"; then | |
21287 + found=yes | |
21288 + else | |
21289 + found=no | |
21290 + fi | |
21291 + break 2 | |
21292 + fi | |
21293 + done | |
21294 + done | |
21295 + if test "$found" != yes; then | |
21296 + # deplib doesn't seem to be a libtool library | |
21297 + if test "$linkmode,$pass" = "prog,link"; then | |
21298 + compile_deplibs="$deplib $compile_deplibs" | |
21299 + finalize_deplibs="$deplib $finalize_deplibs" | |
21300 + else | |
21301 + deplibs="$deplib $deplibs" | |
21302 + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" | |
21303 + fi | |
21304 + continue | |
21305 + else # deplib is a libtool library | |
21306 + # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, | |
21307 + # We need to do some special things here, and not later. | |
21308 + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then | |
21309 + case " $predeps $postdeps " in | |
21310 + *" $deplib "*) | |
21311 + if func_lalib_p "$lib"; then | |
21312 + library_names= | |
21313 + old_library= | |
21314 + func_source "$lib" | |
21315 + for l in $old_library $library_names; do | |
21316 + ll="$l" | |
21317 + done | |
21318 + if test "X$ll" = "X$old_library" ; then # only static version available | |
21319 + found=no | |
21320 + func_dirname "$lib" "" "." | |
21321 + ladir="$func_dirname_result" | |
21322 + lib=$ladir/$old_library | |
21323 + if test "$linkmode,$pass" = "prog,link"; then | |
21324 + compile_deplibs="$deplib $compile_deplibs" | |
21325 + finalize_deplibs="$deplib $finalize_deplibs" | |
21326 + else | |
21327 + deplibs="$deplib $deplibs" | |
21328 + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" | |
21329 + fi | |
21330 + continue | |
21331 + fi | |
21332 + fi | |
21333 + ;; | |
21334 + *) ;; | |
21335 + esac | |
21336 + fi | |
21337 + fi | |
21338 + ;; # -l | |
21339 + *.ltframework) | |
21340 + if test "$linkmode,$pass" = "prog,link"; then | |
21341 + compile_deplibs="$deplib $compile_deplibs" | |
21342 + finalize_deplibs="$deplib $finalize_deplibs" | |
21343 + else | |
21344 + deplibs="$deplib $deplibs" | |
21345 + if test "$linkmode" = lib ; then | |
21346 + case "$new_inherited_linker_flags " in | |
21347 + *" $deplib "*) ;; | |
21348 + * ) func_append new_inherited_linker_flags " $deplib" ;; | |
21349 + esac | |
21350 + fi | |
21351 + fi | |
21352 + continue | |
21353 + ;; | |
21354 + -L*) | |
21355 + case $linkmode in | |
21356 + lib) | |
21357 + deplibs="$deplib $deplibs" | |
21358 + test "$pass" = conv && continue | |
21359 + newdependency_libs="$deplib $newdependency_libs" | |
21360 + func_stripname '-L' '' "$deplib" | |
21361 + func_resolve_sysroot "$func_stripname_result" | |
21362 + func_append newlib_search_path " $func_resolve_sysroot_result" | |
21363 + ;; | |
21364 + prog) | |
21365 + if test "$pass" = conv; then | |
21366 + deplibs="$deplib $deplibs" | |
21367 + continue | |
21368 + fi | |
21369 + if test "$pass" = scan; then | |
21370 + deplibs="$deplib $deplibs" | |
21371 + else | |
21372 + compile_deplibs="$deplib $compile_deplibs" | |
21373 + finalize_deplibs="$deplib $finalize_deplibs" | |
21374 + fi | |
21375 + func_stripname '-L' '' "$deplib" | |
21376 + func_resolve_sysroot "$func_stripname_result" | |
21377 + func_append newlib_search_path " $func_resolve_sysroot_result" | |
21378 + ;; | |
21379 + *) | |
21380 + func_warning "\`-L' is ignored for archives/objects" | |
21381 + ;; | |
21382 + esac # linkmode | |
21383 + continue | |
21384 + ;; # -L | |
21385 + -R*) | |
21386 + if test "$pass" = link; then | |
21387 + func_stripname '-R' '' "$deplib" | |
21388 + func_resolve_sysroot "$func_stripname_result" | |
21389 + dir=$func_resolve_sysroot_result | |
21390 + # Make sure the xrpath contains only unique directories. | |
21391 + case "$xrpath " in | |
21392 + *" $dir "*) ;; | |
21393 + *) func_append xrpath " $dir" ;; | |
21394 + esac | |
21395 + fi | |
21396 + deplibs="$deplib $deplibs" | |
21397 + continue | |
21398 + ;; | |
21399 + *.la) | |
21400 + func_resolve_sysroot "$deplib" | |
21401 + lib=$func_resolve_sysroot_result | |
21402 + ;; | |
21403 + *.$libext) | |
21404 + if test "$pass" = conv; then | |
21405 + deplibs="$deplib $deplibs" | |
21406 + continue | |
21407 + fi | |
21408 + case $linkmode in | |
21409 + lib) | |
21410 + # Linking convenience modules into shared libraries is allowed, | |
21411 + # but linking other static libraries is non-portable. | |
21412 + case " $dlpreconveniencelibs " in | |
21413 + *" $deplib "*) ;; | |
21414 + *) | |
21415 + valid_a_lib=no | |
21416 + case $deplibs_check_method in | |
21417 + match_pattern*) | |
21418 + set dummy $deplibs_check_method; shift | |
21419 + match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` | |
21420 + if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | |
21421 + | $EGREP "$match_pattern_regex" > /dev/null; then | |
21422 + valid_a_lib=yes | |
21423 + fi | |
21424 + ;; | |
21425 + pass_all) | |
21426 + valid_a_lib=yes | |
21427 + ;; | |
21428 + esac | |
21429 + if test "$valid_a_lib" != yes; then | |
21430 + echo | |
21431 + $ECHO "*** Warning: Trying to link with static lib archive $deplib." | |
21432 + echo "*** I have the capability to make that library automatically link in when" | |
21433 + echo "*** you link to this library. But I can only do this if you have a" | |
21434 + echo "*** shared version of the library, which you do not appear to have" | |
21435 + echo "*** because the file extensions .$libext of this argument makes me believe" | |
21436 + echo "*** that it is just a static archive that I should not use here." | |
21437 + else | |
21438 + echo | |
21439 + $ECHO "*** Warning: Linking the shared library $output against the" | |
21440 + $ECHO "*** static library $deplib is not portable!" | |
21441 + deplibs="$deplib $deplibs" | |
21442 + fi | |
21443 + ;; | |
21444 + esac | |
21445 + continue | |
21446 + ;; | |
21447 + prog) | |
21448 + if test "$pass" != link; then | |
21449 + deplibs="$deplib $deplibs" | |
21450 + else | |
21451 + compile_deplibs="$deplib $compile_deplibs" | |
21452 + finalize_deplibs="$deplib $finalize_deplibs" | |
21453 + fi | |
21454 + continue | |
21455 + ;; | |
21456 + esac # linkmode | |
21457 + ;; # *.$libext | |
21458 + *.lo | *.$objext) | |
21459 + if test "$pass" = conv; then | |
21460 + deplibs="$deplib $deplibs" | |
21461 + elif test "$linkmode" = prog; then | |
21462 + if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then | |
21463 + # If there is no dlopen support or we're linking statically, | |
21464 + # we need to preload. | |
21465 + func_append newdlprefiles " $deplib" | |
21466 + compile_deplibs="$deplib $compile_deplibs" | |
21467 + finalize_deplibs="$deplib $finalize_deplibs" | |
21468 + else | |
21469 + func_append newdlfiles " $deplib" | |
21470 + fi | |
21471 + fi | |
21472 + continue | |
21473 + ;; | |
21474 + %DEPLIBS%) | |
21475 + alldeplibs=yes | |
21476 + continue | |
21477 + ;; | |
21478 + esac # case $deplib | |
21479 + | |
21480 + if test "$found" = yes || test -f "$lib"; then : | |
21481 + else | |
21482 + func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" | |
21483 + fi | |
21484 + | |
21485 + # Check to see that this really is a libtool archive. | |
21486 + func_lalib_unsafe_p "$lib" \ | |
21487 + || func_fatal_error "\`$lib' is not a valid libtool archive" | |
21488 + | |
21489 + func_dirname "$lib" "" "." | |
21490 + ladir="$func_dirname_result" | |
21491 + | |
21492 + dlname= | |
21493 + dlopen= | |
21494 + dlpreopen= | |
21495 + libdir= | |
21496 + library_names= | |
21497 + old_library= | |
21498 + inherited_linker_flags= | |
21499 + # If the library was installed with an old release of libtool, | |
21500 + # it will not redefine variables installed, or shouldnotlink | |
21501 + installed=yes | |
21502 + shouldnotlink=no | |
21503 + avoidtemprpath= | |
21504 + | |
21505 + | |
21506 + # Read the .la file | |
21507 + func_source "$lib" | |
21508 + | |
21509 + # Convert "-framework foo" to "foo.ltframework" | |
21510 + if test -n "$inherited_linker_flags"; then | |
21511 + tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` | |
21512 + for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do | |
21513 + case " $new_inherited_linker_flags " in | |
21514 + *" $tmp_inherited_linker_flag "*) ;; | |
21515 + *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; | |
21516 + esac | |
21517 + done | |
21518 + fi | |
21519 + dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` | |
21520 + if test "$linkmode,$pass" = "lib,link" || | |
21521 + test "$linkmode,$pass" = "prog,scan" || | |
21522 + { test "$linkmode" != prog && test "$linkmode" != lib; }; then | |
21523 + test -n "$dlopen" && func_append dlfiles " $dlopen" | |
21524 + test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" | |
21525 + fi | |
21526 + | |
21527 + if test "$pass" = conv; then | |
21528 + # Only check for convenience libraries | |
21529 + deplibs="$lib $deplibs" | |
21530 + if test -z "$libdir"; then | |
21531 + if test -z "$old_library"; then | |
21532 + func_fatal_error "cannot find name of link library for \`$lib'" | |
21533 + fi | |
21534 + # It is a libtool convenience library, so add in its objects. | |
21535 + func_append convenience " $ladir/$objdir/$old_library" | |
21536 + func_append old_convenience " $ladir/$objdir/$old_library" | |
21537 + tmp_libs= | |
21538 + for deplib in $dependency_libs; do | |
21539 + deplibs="$deplib $deplibs" | |
21540 + if $opt_preserve_dup_deps ; then | |
21541 + case "$tmp_libs " in | |
21542 + *" $deplib "*) func_append specialdeplibs " $deplib" ;; | |
21543 + esac | |
21544 + fi | |
21545 + func_append tmp_libs " $deplib" | |
21546 + done | |
21547 + elif test "$linkmode" != prog && test "$linkmode" != lib; then | |
21548 + func_fatal_error "\`$lib' is not a convenience library" | |
21549 + fi | |
21550 + continue | |
21551 + fi # $pass = conv | |
21552 + | |
21553 + | |
21554 + # Get the name of the library we link against. | |
21555 + linklib= | |
21556 + if test -n "$old_library" && | |
21557 + { test "$prefer_static_libs" = yes || | |
21558 + test "$prefer_static_libs,$installed" = "built,no"; }; then | |
21559 + linklib=$old_library | |
21560 + else | |
21561 + for l in $old_library $library_names; do | |
21562 + linklib="$l" | |
21563 + done | |
21564 + fi | |
21565 + if test -z "$linklib"; then | |
21566 + func_fatal_error "cannot find name of link library for \`$lib'" | |
21567 + fi | |
21568 + | |
21569 + # This library was specified with -dlopen. | |
21570 + if test "$pass" = dlopen; then | |
21571 + if test -z "$libdir"; then | |
21572 + func_fatal_error "cannot -dlopen a convenience library: \`$lib'" | |
21573 + fi | |
21574 + if test -z "$dlname" || | |
21575 + test "$dlopen_support" != yes || | |
21576 + test "$build_libtool_libs" = no; then | |
21577 + # If there is no dlname, no dlopen support or we're linking | |
21578 + # statically, we need to preload. We also need to preload any | |
21579 + # dependent libraries so libltdl's deplib preloader doesn't | |
21580 + # bomb out in the load deplibs phase. | |
21581 + func_append dlprefiles " $lib $dependency_libs" | |
21582 + else | |
21583 + func_append newdlfiles " $lib" | |
21584 + fi | |
21585 + continue | |
21586 + fi # $pass = dlopen | |
21587 + | |
21588 + # We need an absolute path. | |
21589 + case $ladir in | |
21590 + [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; | |
21591 + *) | |
21592 + abs_ladir=`cd "$ladir" && pwd` | |
21593 + if test -z "$abs_ladir"; then | |
21594 + func_warning "cannot determine absolute directory name of \`$ladir'" | |
21595 + func_warning "passing it literally to the linker, although it might fail" | |
21596 + abs_ladir="$ladir" | |
21597 + fi | |
21598 + ;; | |
21599 + esac | |
21600 + func_basename "$lib" | |
21601 + laname="$func_basename_result" | |
21602 + | |
21603 + # Find the relevant object directory and library name. | |
21604 + if test "X$installed" = Xyes; then | |
21605 + if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then | |
21606 + func_warning "library \`$lib' was moved." | |
21607 + dir="$ladir" | |
21608 + absdir="$abs_ladir" | |
21609 + libdir="$abs_ladir" | |
21610 + else | |
21611 + dir="$lt_sysroot$libdir" | |
21612 + absdir="$lt_sysroot$libdir" | |
21613 + fi | |
21614 + test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes | |
21615 + else | |
21616 + if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then | |
21617 + dir="$ladir" | |
21618 + absdir="$abs_ladir" | |
21619 + # Remove this search path later | |
21620 + func_append notinst_path " $abs_ladir" | |
21621 + else | |
21622 + dir="$ladir/$objdir" | |
21623 + absdir="$abs_ladir/$objdir" | |
21624 + # Remove this search path later | |
21625 + func_append notinst_path " $abs_ladir" | |
21626 + fi | |
21627 + fi # $installed = yes | |
21628 + func_stripname 'lib' '.la' "$laname" | |
21629 + name=$func_stripname_result | |
21630 + | |
21631 + # This library was specified with -dlpreopen. | |
21632 + if test "$pass" = dlpreopen; then | |
21633 + if test -z "$libdir" && test "$linkmode" = prog; then | |
21634 + func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" | |
21635 + fi | |
21636 + case "$host" in | |
21637 + # special handling for platforms with PE-DLLs. | |
21638 + *cygwin* | *mingw* | *cegcc* ) | |
21639 + # Linker will automatically link against shared library if both | |
21640 + # static and shared are present. Therefore, ensure we extract | |
21641 + # symbols from the import library if a shared library is present | |
21642 + # (otherwise, the dlopen module name will be incorrect). We do | |
21643 + # this by putting the import library name into $newdlprefiles. | |
21644 + # We recover the dlopen module name by 'saving' the la file | |
21645 + # name in a special purpose variable, and (later) extracting the | |
21646 + # dlname from the la file. | |
21647 + if test -n "$dlname"; then | |
21648 + func_tr_sh "$dir/$linklib" | |
21649 + eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" | |
21650 + func_append newdlprefiles " $dir/$linklib" | |
21651 + else | |
21652 + func_append newdlprefiles " $dir/$old_library" | |
21653 + # Keep a list of preopened convenience libraries to check | |
21654 + # that they are being used correctly in the link pass. | |
21655 + test -z "$libdir" && \ | |
21656 + func_append dlpreconveniencelibs " $dir/$old_library" | |
21657 + fi | |
21658 + ;; | |
21659 + * ) | |
21660 + # Prefer using a static library (so that no silly _DYNAMIC symbols | |
21661 + # are required to link). | |
21662 + if test -n "$old_library"; then | |
21663 + func_append newdlprefiles " $dir/$old_library" | |
21664 + # Keep a list of preopened convenience libraries to check | |
21665 + # that they are being used correctly in the link pass. | |
21666 + test -z "$libdir" && \ | |
21667 + func_append dlpreconveniencelibs " $dir/$old_library" | |
21668 + # Otherwise, use the dlname, so that lt_dlopen finds it. | |
21669 + elif test -n "$dlname"; then | |
21670 + func_append newdlprefiles " $dir/$dlname" | |
21671 + else | |
21672 + func_append newdlprefiles " $dir/$linklib" | |
21673 + fi | |
21674 + ;; | |
21675 + esac | |
21676 + fi # $pass = dlpreopen | |
21677 + | |
21678 + if test -z "$libdir"; then | |
21679 + # Link the convenience library | |
21680 + if test "$linkmode" = lib; then | |
21681 + deplibs="$dir/$old_library $deplibs" | |
21682 + elif test "$linkmode,$pass" = "prog,link"; then | |
21683 + compile_deplibs="$dir/$old_library $compile_deplibs" | |
21684 + finalize_deplibs="$dir/$old_library $finalize_deplibs" | |
21685 + else | |
21686 + deplibs="$lib $deplibs" # used for prog,scan pass | |
21687 + fi | |
21688 + continue | |
21689 + fi | |
21690 + | |
21691 + | |
21692 + if test "$linkmode" = prog && test "$pass" != link; then | |
21693 + func_append newlib_search_path " $ladir" | |
21694 + deplibs="$lib $deplibs" | |
21695 + | |
21696 + linkalldeplibs=no | |
21697 + if test "$link_all_deplibs" != no || test -z "$library_names" || | |
21698 + test "$build_libtool_libs" = no; then | |
21699 + linkalldeplibs=yes | |
21700 + fi | |
21701 + | |
21702 + tmp_libs= | |
21703 + for deplib in $dependency_libs; do | |
21704 + case $deplib in | |
21705 + -L*) func_stripname '-L' '' "$deplib" | |
21706 + func_resolve_sysroot "$func_stripname_result" | |
21707 + func_append newlib_search_path " $func_resolve_sysroot_result" | |
21708 + ;; | |
21709 + esac | |
21710 + # Need to link against all dependency_libs? | |
21711 + if test "$linkalldeplibs" = yes; then | |
21712 + deplibs="$deplib $deplibs" | |
21713 + else | |
21714 + # Need to hardcode shared library paths | |
21715 + # or/and link against static libraries | |
21716 + newdependency_libs="$deplib $newdependency_libs" | |
21717 + fi | |
21718 + if $opt_preserve_dup_deps ; then | |
21719 + case "$tmp_libs " in | |
21720 + *" $deplib "*) func_append specialdeplibs " $deplib" ;; | |
21721 + esac | |
21722 + fi | |
21723 + func_append tmp_libs " $deplib" | |
21724 + done # for deplib | |
21725 + continue | |
21726 + fi # $linkmode = prog... | |
21727 + | |
21728 + if test "$linkmode,$pass" = "prog,link"; then | |
21729 + if test -n "$library_names" && | |
21730 + { { test "$prefer_static_libs" = no || | |
21731 + test "$prefer_static_libs,$installed" = "built,yes"; } || | |
21732 + test -z "$old_library"; }; then | |
21733 + # We need to hardcode the library path | |
21734 + if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then | |
21735 + # Make sure the rpath contains only unique directories. | |
21736 + case "$temp_rpath:" in | |
21737 + *"$absdir:"*) ;; | |
21738 + *) func_append temp_rpath "$absdir:" ;; | |
21739 + esac | |
21740 + fi | |
21741 + | |
21742 + # Hardcode the library path. | |
21743 + # Skip directories that are in the system default run-time | |
21744 + # search path. | |
21745 + case " $sys_lib_dlsearch_path " in | |
21746 + *" $absdir "*) ;; | |
21747 + *) | |
21748 + case "$compile_rpath " in | |
21749 + *" $absdir "*) ;; | |
21750 + *) func_append compile_rpath " $absdir" ;; | |
21751 + esac | |
21752 + ;; | |
21753 + esac | |
21754 + case " $sys_lib_dlsearch_path " in | |
21755 + *" $libdir "*) ;; | |
21756 + *) | |
21757 + case "$finalize_rpath " in | |
21758 + *" $libdir "*) ;; | |
21759 + *) func_append finalize_rpath " $libdir" ;; | |
21760 + esac | |
21761 + ;; | |
21762 + esac | |
21763 + fi # $linkmode,$pass = prog,link... | |
21764 + | |
21765 + if test "$alldeplibs" = yes && | |
21766 + { test "$deplibs_check_method" = pass_all || | |
21767 + { test "$build_libtool_libs" = yes && | |
21768 + test -n "$library_names"; }; }; then | |
21769 + # We only need to search for static libraries | |
21770 + continue | |
21771 + fi | |
21772 + fi | |
21773 + | |
21774 + link_static=no # Whether the deplib will be linked statically | |
21775 + use_static_libs=$prefer_static_libs | |
21776 + if test "$use_static_libs" = built && test "$installed" = yes; then | |
21777 + use_static_libs=no | |
21778 + fi | |
21779 + if test -n "$library_names" && | |
21780 + { test "$use_static_libs" = no || test -z "$old_library"; }; then | |
21781 + case $host in | |
21782 + *cygwin* | *mingw* | *cegcc*) | |
21783 + # No point in relinking DLLs because paths are not encoded | |
21784 + func_append notinst_deplibs " $lib" | |
21785 + need_relink=no | |
21786 + ;; | |
21787 + *) | |
21788 + if test "$installed" = no; then | |
21789 + func_append notinst_deplibs " $lib" | |
21790 + need_relink=yes | |
21791 + fi | |
21792 + ;; | |
21793 + esac | |
21794 + # This is a shared library | |
21795 + | |
21796 + # Warn about portability, can't link against -module's on some | |
21797 + # systems (darwin). Don't bleat about dlopened modules though! | |
21798 + dlopenmodule="" | |
21799 + for dlpremoduletest in $dlprefiles; do | |
21800 + if test "X$dlpremoduletest" = "X$lib"; then | |
21801 + dlopenmodule="$dlpremoduletest" | |
21802 + break | |
21803 + fi | |
21804 + done | |
21805 + if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then | |
21806 + echo | |
21807 + if test "$linkmode" = prog; then | |
21808 + $ECHO "*** Warning: Linking the executable $output against the loadable module" | |
21809 + else | |
21810 + $ECHO "*** Warning: Linking the shared library $output against the loadable module" | |
21811 + fi | |
21812 + $ECHO "*** $linklib is not portable!" | |
21813 + fi | |
21814 + if test "$linkmode" = lib && | |
21815 + test "$hardcode_into_libs" = yes; then | |
21816 + # Hardcode the library path. | |
21817 + # Skip directories that are in the system default run-time | |
21818 + # search path. | |
21819 + case " $sys_lib_dlsearch_path " in | |
21820 + *" $absdir "*) ;; | |
21821 + *) | |
21822 + case "$compile_rpath " in | |
21823 + *" $absdir "*) ;; | |
21824 + *) func_append compile_rpath " $absdir" ;; | |
21825 + esac | |
21826 + ;; | |
21827 + esac | |
21828 + case " $sys_lib_dlsearch_path " in | |
21829 + *" $libdir "*) ;; | |
21830 + *) | |
21831 + case "$finalize_rpath " in | |
21832 + *" $libdir "*) ;; | |
21833 + *) func_append finalize_rpath " $libdir" ;; | |
21834 + esac | |
21835 + ;; | |
21836 + esac | |
21837 + fi | |
21838 + | |
21839 + if test -n "$old_archive_from_expsyms_cmds"; then | |
21840 + # figure out the soname | |
21841 + set dummy $library_names | |
21842 + shift | |
21843 + realname="$1" | |
21844 + shift | |
21845 + libname=`eval "\\$ECHO \"$libname_spec\""` | |
21846 + # use dlname if we got it. it's perfectly good, no? | |
21847 + if test -n "$dlname"; then | |
21848 + soname="$dlname" | |
21849 + elif test -n "$soname_spec"; then | |
21850 + # bleh windows | |
21851 + case $host in | |
21852 + *cygwin* | mingw* | *cegcc*) | |
21853 + func_arith $current - $age | |
21854 + major=$func_arith_result | |
21855 + versuffix="-$major" | |
21856 + ;; | |
21857 + esac | |
21858 + eval soname=\"$soname_spec\" | |
21859 + else | |
21860 + soname="$realname" | |
21861 + fi | |
21862 + | |
21863 + # Make a new name for the extract_expsyms_cmds to use | |
21864 + soroot="$soname" | |
21865 + func_basename "$soroot" | |
21866 + soname="$func_basename_result" | |
21867 + func_stripname 'lib' '.dll' "$soname" | |
21868 + newlib=libimp-$func_stripname_result.a | |
21869 + | |
21870 + # If the library has no export list, then create one now | |
21871 + if test -f "$output_objdir/$soname-def"; then : | |
21872 + else | |
21873 + func_verbose "extracting exported symbol list from \`$soname'" | |
21874 + func_execute_cmds "$extract_expsyms_cmds" 'exit $?' | |
21875 + fi | |
21876 + | |
21877 + # Create $newlib | |
21878 + if test -f "$output_objdir/$newlib"; then :; else | |
21879 + func_verbose "generating import library for \`$soname'" | |
21880 + func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' | |
21881 + fi | |
21882 + # make sure the library variables are pointing to the new library | |
21883 + dir=$output_objdir | |
21884 + linklib=$newlib | |
21885 + fi # test -n "$old_archive_from_expsyms_cmds" | |
21886 + | |
21887 + if test "$linkmode" = prog || test "$opt_mode" != relink; then | |
21888 + add_shlibpath= | |
21889 + add_dir= | |
21890 + add= | |
21891 + lib_linked=yes | |
21892 + case $hardcode_action in | |
21893 + immediate | unsupported) | |
21894 + if test "$hardcode_direct" = no; then | |
21895 + add="$dir/$linklib" | |
21896 + case $host in | |
21897 + *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; | |
21898 + *-*-sysv4*uw2*) add_dir="-L$dir" ;; | |
21899 + *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ | |
21900 + *-*-unixware7*) add_dir="-L$dir" ;; | |
21901 + *-*-darwin* ) | |
21902 + # if the lib is a (non-dlopened) module then we can not | |
21903 + # link against it, someone is ignoring the earlier warnings | |
21904 + if /usr/bin/file -L $add 2> /dev/null | | |
21905 + $GREP ": [^:]* bundle" >/dev/null ; then | |
21906 + if test "X$dlopenmodule" != "X$lib"; then | |
21907 + $ECHO "*** Warning: lib $linklib is a module, not a shared library" | |
21908 + if test -z "$old_library" ; then | |
21909 + echo | |
21910 + echo "*** And there doesn't seem to be a static archive available" | |
21911 + echo "*** The link will probably fail, sorry" | |
21912 + else | |
21913 + add="$dir/$old_library" | |
21914 + fi | |
21915 + elif test -n "$old_library"; then | |
21916 + add="$dir/$old_library" | |
21917 + fi | |
21918 + fi | |
21919 + esac | |
21920 + elif test "$hardcode_minus_L" = no; then | |
21921 + case $host in | |
21922 + *-*-sunos*) add_shlibpath="$dir" ;; | |
21923 + esac | |
21924 + add_dir="-L$dir" | |
21925 + add="-l$name" | |
21926 + elif test "$hardcode_shlibpath_var" = no; then | |
21927 + add_shlibpath="$dir" | |
21928 + add="-l$name" | |
21929 + else | |
21930 + lib_linked=no | |
21931 + fi | |
21932 + ;; | |
21933 + relink) | |
21934 + if test "$hardcode_direct" = yes && | |
21935 + test "$hardcode_direct_absolute" = no; then | |
21936 + add="$dir/$linklib" | |
21937 + elif test "$hardcode_minus_L" = yes; then | |
21938 + add_dir="-L$absdir" | |
21939 + # Try looking first in the location we're being installed to. | |
21940 + if test -n "$inst_prefix_dir"; then | |
21941 + case $libdir in | |
21942 + [\\/]*) | |
21943 + func_append add_dir " -L$inst_prefix_dir$libdir" | |
21944 + ;; | |
21945 + esac | |
21946 + fi | |
21947 + add="-l$name" | |
21948 + elif test "$hardcode_shlibpath_var" = yes; then | |
21949 + add_shlibpath="$dir" | |
21950 + add="-l$name" | |
21951 + else | |
21952 + lib_linked=no | |
21953 + fi | |
21954 + ;; | |
21955 + *) lib_linked=no ;; | |
21956 + esac | |
21957 + | |
21958 + if test "$lib_linked" != yes; then | |
21959 + func_fatal_configuration "unsupported hardcode properties" | |
21960 + fi | |
21961 + | |
21962 + if test -n "$add_shlibpath"; then | |
21963 + case :$compile_shlibpath: in | |
21964 + *":$add_shlibpath:"*) ;; | |
21965 + *) func_append compile_shlibpath "$add_shlibpath:" ;; | |
21966 + esac | |
21967 + fi | |
21968 + if test "$linkmode" = prog; then | |
21969 + test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" | |
21970 + test -n "$add" && compile_deplibs="$add $compile_deplibs" | |
21971 + else | |
21972 + test -n "$add_dir" && deplibs="$add_dir $deplibs" | |
21973 + test -n "$add" && deplibs="$add $deplibs" | |
21974 + if test "$hardcode_direct" != yes && | |
21975 + test "$hardcode_minus_L" != yes && | |
21976 + test "$hardcode_shlibpath_var" = yes; then | |
21977 + case :$finalize_shlibpath: in | |
21978 + *":$libdir:"*) ;; | |
21979 + *) func_append finalize_shlibpath "$libdir:" ;; | |
21980 + esac | |
21981 + fi | |
21982 + fi | |
21983 + fi | |
21984 + | |
21985 + if test "$linkmode" = prog || test "$opt_mode" = relink; then | |
21986 + add_shlibpath= | |
21987 + add_dir= | |
21988 + add= | |
21989 + # Finalize command for both is simple: just hardcode it. | |
21990 + if test "$hardcode_direct" = yes && | |
21991 + test "$hardcode_direct_absolute" = no; then | |
21992 + add="$libdir/$linklib" | |
21993 + elif test "$hardcode_minus_L" = yes; then | |
21994 + add_dir="-L$libdir" | |
21995 + add="-l$name" | |
21996 + elif test "$hardcode_shlibpath_var" = yes; then | |
21997 + case :$finalize_shlibpath: in | |
21998 + *":$libdir:"*) ;; | |
21999 + *) func_append finalize_shlibpath "$libdir:" ;; | |
22000 + esac | |
22001 + add="-l$name" | |
22002 + elif test "$hardcode_automatic" = yes; then | |
22003 + if test -n "$inst_prefix_dir" && | |
22004 + test -f "$inst_prefix_dir$libdir/$linklib" ; then | |
22005 + add="$inst_prefix_dir$libdir/$linklib" | |
22006 + else | |
22007 + add="$libdir/$linklib" | |
22008 + fi | |
22009 + else | |
22010 + # We cannot seem to hardcode it, guess we'll fake it. | |
22011 + add_dir="-L$libdir" | |
22012 + # Try looking first in the location we're being installed to. | |
22013 + if test -n "$inst_prefix_dir"; then | |
22014 + case $libdir in | |
22015 + [\\/]*) | |
22016 + func_append add_dir " -L$inst_prefix_dir$libdir" | |
22017 + ;; | |
22018 + esac | |
22019 + fi | |
22020 + add="-l$name" | |
22021 + fi | |
22022 + | |
22023 + if test "$linkmode" = prog; then | |
22024 + test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" | |
22025 + test -n "$add" && finalize_deplibs="$add $finalize_deplibs" | |
22026 + else | |
22027 + test -n "$add_dir" && deplibs="$add_dir $deplibs" | |
22028 + test -n "$add" && deplibs="$add $deplibs" | |
22029 + fi | |
22030 + fi | |
22031 + elif test "$linkmode" = prog; then | |
22032 + # Here we assume that one of hardcode_direct or hardcode_minus_L | |
22033 + # is not unsupported. This is valid on all known static and | |
22034 + # shared platforms. | |
22035 + if test "$hardcode_direct" != unsupported; then | |
22036 + test -n "$old_library" && linklib="$old_library" | |
22037 + compile_deplibs="$dir/$linklib $compile_deplibs" | |
22038 + finalize_deplibs="$dir/$linklib $finalize_deplibs" | |
22039 + else | |
22040 + compile_deplibs="-l$name -L$dir $compile_deplibs" | |
22041 + finalize_deplibs="-l$name -L$dir $finalize_deplibs" | |
22042 + fi | |
22043 + elif test "$build_libtool_libs" = yes; then | |
22044 + # Not a shared library | |
22045 + if test "$deplibs_check_method" != pass_all; then | |
22046 + # We're trying link a shared library against a static one | |
22047 + # but the system doesn't support it. | |
22048 + | |
22049 + # Just print a warning and add the library to dependency_libs so | |
22050 + # that the program can be linked against the static library. | |
22051 + echo | |
22052 + $ECHO "*** Warning: This system can not link to static lib archive $lib." | |
22053 + echo "*** I have the capability to make that library automatically link in when" | |
22054 + echo "*** you link to this library. But I can only do this if you have a" | |
22055 + echo "*** shared version of the library, which you do not appear to have." | |
22056 + if test "$module" = yes; then | |
22057 + echo "*** But as you try to build a module library, libtool will still create " | |
22058 + echo "*** a static module, that should work as long as the dlopening application" | |
22059 + echo "*** is linked with the -dlopen flag to resolve symbols at runtime." | |
22060 + if test -z "$global_symbol_pipe"; then | |
22061 + echo | |
22062 + echo "*** However, this would only work if libtool was able to extract symbol" | |
22063 + echo "*** lists from a program, using \`nm' or equivalent, but libtool could" | |
22064 + echo "*** not find such a program. So, this module is probably useless." | |
22065 + echo "*** \`nm' from GNU binutils and a full rebuild may help." | |
22066 + fi | |
22067 + if test "$build_old_libs" = no; then | |
22068 + build_libtool_libs=module | |
22069 + build_old_libs=yes | |
22070 + else | |
22071 + build_libtool_libs=no | |
22072 + fi | |
22073 + fi | |
22074 + else | |
22075 + deplibs="$dir/$old_library $deplibs" | |
22076 + link_static=yes | |
22077 + fi | |
22078 + fi # link shared/static library? | |
22079 + | |
22080 + if test "$linkmode" = lib; then | |
22081 + if test -n "$dependency_libs" && | |
22082 + { test "$hardcode_into_libs" != yes || | |
22083 + test "$build_old_libs" = yes || | |
22084 + test "$link_static" = yes; }; then | |
22085 + # Extract -R from dependency_libs | |
22086 + temp_deplibs= | |
22087 + for libdir in $dependency_libs; do | |
22088 + case $libdir in | |
22089 + -R*) func_stripname '-R' '' "$libdir" | |
22090 + temp_xrpath=$func_stripname_result | |
22091 + case " $xrpath " in | |
22092 + *" $temp_xrpath "*) ;; | |
22093 + *) func_append xrpath " $temp_xrpath";; | |
22094 + esac;; | |
22095 + *) func_append temp_deplibs " $libdir";; | |
22096 + esac | |
22097 + done | |
22098 + dependency_libs="$temp_deplibs" | |
22099 + fi | |
22100 + | |
22101 + func_append newlib_search_path " $absdir" | |
22102 + # Link against this library | |
22103 + test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" | |
22104 + # ... and its dependency_libs | |
22105 + tmp_libs= | |
22106 + for deplib in $dependency_libs; do | |
22107 + newdependency_libs="$deplib $newdependency_libs" | |
22108 + case $deplib in | |
22109 + -L*) func_stripname '-L' '' "$deplib" | |
22110 + func_resolve_sysroot "$func_stripname_result";; | |
22111 + *) func_resolve_sysroot "$deplib" ;; | |
22112 + esac | |
22113 + if $opt_preserve_dup_deps ; then | |
22114 + case "$tmp_libs " in | |
22115 + *" $func_resolve_sysroot_result "*) | |
22116 + func_append specialdeplibs " $func_resolve_sysroot_result" ;; | |
22117 + esac | |
22118 + fi | |
22119 + func_append tmp_libs " $func_resolve_sysroot_result" | |
22120 + done | |
22121 + | |
22122 + if test "$link_all_deplibs" != no; then | |
22123 + # Add the search paths of all dependency libraries | |
22124 + for deplib in $dependency_libs; do | |
22125 + path= | |
22126 + case $deplib in | |
22127 + -L*) path="$deplib" ;; | |
22128 + *.la) | |
22129 + func_resolve_sysroot "$deplib" | |
22130 + deplib=$func_resolve_sysroot_result | |
22131 + func_dirname "$deplib" "" "." | |
22132 + dir=$func_dirname_result | |
22133 + # We need an absolute path. | |
22134 + case $dir in | |
22135 + [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; | |
22136 + *) | |
22137 + absdir=`cd "$dir" && pwd` | |
22138 + if test -z "$absdir"; then | |
22139 + func_warning "cannot determine absolute directory name of \`$dir'" | |
22140 + absdir="$dir" | |
22141 + fi | |
22142 + ;; | |
22143 + esac | |
22144 + if $GREP "^installed=no" $deplib > /dev/null; then | |
22145 + case $host in | |
22146 + *-*-darwin*) | |
22147 + depdepl= | |
22148 + eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` | |
22149 + if test -n "$deplibrary_names" ; then | |
22150 + for tmp in $deplibrary_names ; do | |
22151 + depdepl=$tmp | |
22152 + done | |
22153 + if test -f "$absdir/$objdir/$depdepl" ; then | |
22154 + depdepl="$absdir/$objdir/$depdepl" | |
22155 + darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` | |
22156 + if test -z "$darwin_install_name"; then | |
22157 + darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` | |
22158 + fi | |
22159 + func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" | |
22160 + func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}" | |
22161 + path= | |
22162 + fi | |
22163 + fi | |
22164 + ;; | |
22165 + *) | |
22166 + path="-L$absdir/$objdir" | |
22167 + ;; | |
22168 + esac | |
22169 + else | |
22170 + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` | |
22171 + test -z "$libdir" && \ | |
22172 + func_fatal_error "\`$deplib' is not a valid libtool archive" | |
22173 + test "$absdir" != "$libdir" && \ | |
22174 + func_warning "\`$deplib' seems to be moved" | |
22175 + | |
22176 + path="-L$absdir" | |
22177 + fi | |
22178 + ;; | |
22179 + esac | |
22180 + case " $deplibs " in | |
22181 + *" $path "*) ;; | |
22182 + *) deplibs="$path $deplibs" ;; | |
22183 + esac | |
22184 + done | |
22185 + fi # link_all_deplibs != no | |
22186 + fi # linkmode = lib | |
22187 + done # for deplib in $libs | |
22188 + if test "$pass" = link; then | |
22189 + if test "$linkmode" = "prog"; then | |
22190 + compile_deplibs="$new_inherited_linker_flags $compile_deplibs" | |
22191 + finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" | |
22192 + else | |
22193 + compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` | |
22194 + fi | |
22195 + fi | |
22196 + dependency_libs="$newdependency_libs" | |
22197 + if test "$pass" = dlpreopen; then | |
22198 + # Link the dlpreopened libraries before other libraries | |
22199 + for deplib in $save_deplibs; do | |
22200 + deplibs="$deplib $deplibs" | |
22201 + done | |
22202 + fi | |
22203 + if test "$pass" != dlopen; then | |
22204 + if test "$pass" != conv; then | |
22205 + # Make sure lib_search_path contains only unique directories. | |
22206 + lib_search_path= | |
22207 + for dir in $newlib_search_path; do | |
22208 + case "$lib_search_path " in | |
22209 + *" $dir "*) ;; | |
22210 + *) func_append lib_search_path " $dir" ;; | |
22211 + esac | |
22212 + done | |
22213 + newlib_search_path= | |
22214 + fi | |
22215 + | |
22216 + if test "$linkmode,$pass" != "prog,link"; then | |
22217 + vars="deplibs" | |
22218 + else | |
22219 + vars="compile_deplibs finalize_deplibs" | |
22220 + fi | |
22221 + for var in $vars dependency_libs; do | |
22222 + # Add libraries to $var in reverse order | |
22223 + eval tmp_libs=\"\$$var\" | |
22224 + new_libs= | |
22225 + for deplib in $tmp_libs; do | |
22226 + # FIXME: Pedantically, this is the right thing to do, so | |
22227 + # that some nasty dependency loop isn't accidentally | |
22228 + # broken: | |
22229 + #new_libs="$deplib $new_libs" | |
22230 + # Pragmatically, this seems to cause very few problems in | |
22231 + # practice: | |
22232 + case $deplib in | |
22233 + -L*) new_libs="$deplib $new_libs" ;; | |
22234 + -R*) ;; | |
22235 + *) | |
22236 + # And here is the reason: when a library appears more | |
22237 + # than once as an explicit dependence of a library, or | |
22238 + # is implicitly linked in more than once by the | |
22239 + # compiler, it is considered special, and multiple | |
22240 + # occurrences thereof are not removed. Compare this | |
22241 + # with having the same library being listed as a | |
22242 + # dependency of multiple other libraries: in this case, | |
22243 + # we know (pedantically, we assume) the library does not | |
22244 + # need to be listed more than once, so we keep only the | |
22245 + # last copy. This is not always right, but it is rare | |
22246 + # enough that we require users that really mean to play | |
22247 + # such unportable linking tricks to link the library | |
22248 + # using -Wl,-lname, so that libtool does not consider it | |
22249 + # for duplicate removal. | |
22250 + case " $specialdeplibs " in | |
22251 + *" $deplib "*) new_libs="$deplib $new_libs" ;; | |
22252 + *) | |
22253 + case " $new_libs " in | |
22254 + *" $deplib "*) ;; | |
22255 + *) new_libs="$deplib $new_libs" ;; | |
22256 + esac | |
22257 + ;; | |
22258 + esac | |
22259 + ;; | |
22260 + esac | |
22261 + done | |
22262 + tmp_libs= | |
22263 + for deplib in $new_libs; do | |
22264 + case $deplib in | |
22265 + -L*) | |
22266 + case " $tmp_libs " in | |
22267 + *" $deplib "*) ;; | |
22268 + *) func_append tmp_libs " $deplib" ;; | |
22269 + esac | |
22270 + ;; | |
22271 + *) func_append tmp_libs " $deplib" ;; | |
22272 + esac | |
22273 + done | |
22274 + eval $var=\"$tmp_libs\" | |
22275 + done # for var | |
22276 + fi | |
22277 + # Last step: remove runtime libs from dependency_libs | |
22278 + # (they stay in deplibs) | |
22279 + tmp_libs= | |
22280 + for i in $dependency_libs ; do | |
22281 + case " $predeps $postdeps $compiler_lib_search_path " in | |
22282 + *" $i "*) | |
22283 + i="" | |
22284 + ;; | |
22285 + esac | |
22286 + if test -n "$i" ; then | |
22287 + func_append tmp_libs " $i" | |
22288 + fi | |
22289 + done | |
22290 + dependency_libs=$tmp_libs | |
22291 + done # for pass | |
22292 + if test "$linkmode" = prog; then | |
22293 + dlfiles="$newdlfiles" | |
22294 + fi | |
22295 + if test "$linkmode" = prog || test "$linkmode" = lib; then | |
22296 + dlprefiles="$newdlprefiles" | |
22297 + fi | |
22298 + | |
22299 + case $linkmode in | |
22300 + oldlib) | |
22301 + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then | |
22302 + func_warning "\`-dlopen' is ignored for archives" | |
22303 + fi | |
22304 + | |
22305 + case " $deplibs" in | |
22306 + *\ -l* | *\ -L*) | |
22307 + func_warning "\`-l' and \`-L' are ignored for archives" ;; | |
22308 + esac | |
22309 + | |
22310 + test -n "$rpath" && \ | |
22311 + func_warning "\`-rpath' is ignored for archives" | |
22312 + | |
22313 + test -n "$xrpath" && \ | |
22314 + func_warning "\`-R' is ignored for archives" | |
22315 + | |
22316 + test -n "$vinfo" && \ | |
22317 + func_warning "\`-version-info/-version-number' is ignored for archives" | |
22318 + | |
22319 + test -n "$release" && \ | |
22320 + func_warning "\`-release' is ignored for archives" | |
22321 + | |
22322 + test -n "$export_symbols$export_symbols_regex" && \ | |
22323 + func_warning "\`-export-symbols' is ignored for archives" | |
22324 + | |
22325 + # Now set the variables for building old libraries. | |
22326 + build_libtool_libs=no | |
22327 + oldlibs="$output" | |
22328 + func_append objs "$old_deplibs" | |
22329 + ;; | |
22330 + | |
22331 + lib) | |
22332 + # Make sure we only generate libraries of the form `libNAME.la'. | |
22333 + case $outputname in | |
22334 + lib*) | |
22335 + func_stripname 'lib' '.la' "$outputname" | |
22336 + name=$func_stripname_result | |
22337 + eval shared_ext=\"$shrext_cmds\" | |
22338 + eval libname=\"$libname_spec\" | |
22339 + ;; | |
22340 + *) | |
22341 + test "$module" = no && \ | |
22342 + func_fatal_help "libtool library \`$output' must begin with \`lib'" | |
22343 + | |
22344 + if test "$need_lib_prefix" != no; then | |
22345 + # Add the "lib" prefix for modules if required | |
22346 + func_stripname '' '.la' "$outputname" | |
22347 + name=$func_stripname_result | |
22348 + eval shared_ext=\"$shrext_cmds\" | |
22349 + eval libname=\"$libname_spec\" | |
22350 + else | |
22351 + func_stripname '' '.la' "$outputname" | |
22352 + libname=$func_stripname_result | |
22353 + fi | |
22354 + ;; | |
22355 + esac | |
22356 + | |
22357 + if test -n "$objs"; then | |
22358 + if test "$deplibs_check_method" != pass_all; then | |
22359 + func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" | |
22360 + else | |
22361 + echo | |
22362 + $ECHO "*** Warning: Linking the shared library $output against the non-libtool" | |
22363 + $ECHO "*** objects $objs is not portable!" | |
22364 + func_append libobjs " $objs" | |
22365 + fi | |
22366 + fi | |
22367 + | |
22368 + test "$dlself" != no && \ | |
22369 + func_warning "\`-dlopen self' is ignored for libtool libraries" | |
22370 + | |
22371 + set dummy $rpath | |
22372 + shift | |
22373 + test "$#" -gt 1 && \ | |
22374 + func_warning "ignoring multiple \`-rpath's for a libtool library" | |
22375 + | |
22376 + install_libdir="$1" | |
22377 + | |
22378 + oldlibs= | |
22379 + if test -z "$rpath"; then | |
22380 + if test "$build_libtool_libs" = yes; then | |
22381 + # Building a libtool convenience library. | |
22382 + # Some compilers have problems with a `.al' extension so | |
22383 + # convenience libraries should have the same extension an | |
22384 + # archive normally would. | |
22385 + oldlibs="$output_objdir/$libname.$libext $oldlibs" | |
22386 + build_libtool_libs=convenience | |
22387 + build_old_libs=yes | |
22388 + fi | |
22389 + | |
22390 + test -n "$vinfo" && \ | |
22391 + func_warning "\`-version-info/-version-number' is ignored for convenience libraries" | |
22392 + | |
22393 + test -n "$release" && \ | |
22394 + func_warning "\`-release' is ignored for convenience libraries" | |
22395 + else | |
22396 + | |
22397 + # Parse the version information argument. | |
22398 + save_ifs="$IFS"; IFS=':' | |
22399 + set dummy $vinfo 0 0 0 | |
22400 + shift | |
22401 + IFS="$save_ifs" | |
22402 + | |
22403 + test -n "$7" && \ | |
22404 + func_fatal_help "too many parameters to \`-version-info'" | |
22405 + | |
22406 + # convert absolute version numbers to libtool ages | |
22407 + # this retains compatibility with .la files and attempts | |
22408 + # to make the code below a bit more comprehensible | |
22409 + | |
22410 + case $vinfo_number in | |
22411 + yes) | |
22412 + number_major="$1" | |
22413 + number_minor="$2" | |
22414 + number_revision="$3" | |
22415 + # | |
22416 + # There are really only two kinds -- those that | |
22417 + # use the current revision as the major version | |
22418 + # and those that subtract age and use age as | |
22419 + # a minor version. But, then there is irix | |
22420 + # which has an extra 1 added just for fun | |
22421 + # | |
22422 + case $version_type in | |
22423 + # correct linux to gnu/linux during the next big refactor | |
22424 + darwin|linux|osf|windows|none) | |
22425 + func_arith $number_major + $number_minor | |
22426 + current=$func_arith_result | |
22427 + age="$number_minor" | |
22428 + revision="$number_revision" | |
22429 + ;; | |
22430 + freebsd-aout|freebsd-elf|qnx|sunos) | |
22431 + current="$number_major" | |
22432 + revision="$number_minor" | |
22433 + age="0" | |
22434 + ;; | |
22435 + irix|nonstopux) | |
22436 + func_arith $number_major + $number_minor | |
22437 + current=$func_arith_result | |
22438 + age="$number_minor" | |
22439 + revision="$number_minor" | |
22440 + lt_irix_increment=no | |
22441 + ;; | |
22442 + *) | |
22443 + func_fatal_configuration "$modename: unknown library version type \`$version_type'" | |
22444 + ;; | |
22445 + esac | |
22446 + ;; | |
22447 + no) | |
22448 + current="$1" | |
22449 + revision="$2" | |
22450 + age="$3" | |
22451 + ;; | |
22452 + esac | |
22453 + | |
22454 + # Check that each of the things are valid numbers. | |
22455 + case $current in | |
22456 + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; | |
22457 + *) | |
22458 + func_error "CURRENT \`$current' must be a nonnegative integer" | |
22459 + func_fatal_error "\`$vinfo' is not valid version information" | |
22460 + ;; | |
22461 + esac | |
22462 + | |
22463 + case $revision in | |
22464 + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; | |
22465 + *) | |
22466 + func_error "REVISION \`$revision' must be a nonnegative integer" | |
22467 + func_fatal_error "\`$vinfo' is not valid version information" | |
22468 + ;; | |
22469 + esac | |
22470 + | |
22471 + case $age in | |
22472 + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; | |
22473 + *) | |
22474 + func_error "AGE \`$age' must be a nonnegative integer" | |
22475 + func_fatal_error "\`$vinfo' is not valid version information" | |
22476 + ;; | |
22477 + esac | |
22478 + | |
22479 + if test "$age" -gt "$current"; then | |
22480 + func_error "AGE \`$age' is greater than the current interface number \`$current'" | |
22481 + func_fatal_error "\`$vinfo' is not valid version information" | |
22482 + fi | |
22483 + | |
22484 + # Calculate the version variables. | |
22485 + major= | |
22486 + versuffix= | |
22487 + verstring= | |
22488 + case $version_type in | |
22489 + none) ;; | |
22490 + | |
22491 + darwin) | |
22492 + # Like Linux, but with the current version available in | |
22493 + # verstring for coding it into the library header | |
22494 + func_arith $current - $age | |
22495 + major=.$func_arith_result | |
22496 + versuffix="$major.$age.$revision" | |
22497 + # Darwin ld doesn't like 0 for these options... | |
22498 + func_arith $current + 1 | |
22499 + minor_current=$func_arith_result | |
22500 + xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" | |
22501 + verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" | |
22502 + ;; | |
22503 + | |
22504 + freebsd-aout) | |
22505 + major=".$current" | |
22506 + versuffix=".$current.$revision"; | |
22507 + ;; | |
22508 + | |
22509 + freebsd-elf) | |
22510 + major=".$current" | |
22511 + versuffix=".$current" | |
22512 + ;; | |
22513 + | |
22514 + irix | nonstopux) | |
22515 + if test "X$lt_irix_increment" = "Xno"; then | |
22516 + func_arith $current - $age | |
22517 + else | |
22518 + func_arith $current - $age + 1 | |
22519 + fi | |
22520 + major=$func_arith_result | |
22521 + | |
22522 + case $version_type in | |
22523 + nonstopux) verstring_prefix=nonstopux ;; | |
22524 + *) verstring_prefix=sgi ;; | |
22525 + esac | |
22526 + verstring="$verstring_prefix$major.$revision" | |
22527 + | |
22528 + # Add in all the interfaces that we are compatible with. | |
22529 + loop=$revision | |
22530 + while test "$loop" -ne 0; do | |
22531 + func_arith $revision - $loop | |
22532 + iface=$func_arith_result | |
22533 + func_arith $loop - 1 | |
22534 + loop=$func_arith_result | |
22535 + verstring="$verstring_prefix$major.$iface:$verstring" | |
22536 + done | |
22537 + | |
22538 + # Before this point, $major must not contain `.'. | |
22539 + major=.$major | |
22540 + versuffix="$major.$revision" | |
22541 + ;; | |
22542 + | |
22543 + linux) # correct to gnu/linux during the next big refactor | |
22544 + func_arith $current - $age | |
22545 + major=.$func_arith_result | |
22546 + versuffix="$major.$age.$revision" | |
22547 + ;; | |
22548 + | |
22549 + osf) | |
22550 + func_arith $current - $age | |
22551 + major=.$func_arith_result | |
22552 + versuffix=".$current.$age.$revision" | |
22553 + verstring="$current.$age.$revision" | |
22554 + | |
22555 + # Add in all the interfaces that we are compatible with. | |
22556 + loop=$age | |
22557 + while test "$loop" -ne 0; do | |
22558 + func_arith $current - $loop | |
22559 + iface=$func_arith_result | |
22560 + func_arith $loop - 1 | |
22561 + loop=$func_arith_result | |
22562 + verstring="$verstring:${iface}.0" | |
22563 + done | |
22564 + | |
22565 + # Make executables depend on our current version. | |
22566 + func_append verstring ":${current}.0" | |
22567 + ;; | |
22568 + | |
22569 + qnx) | |
22570 + major=".$current" | |
22571 + versuffix=".$current" | |
22572 + ;; | |
22573 + | |
22574 + sunos) | |
22575 + major=".$current" | |
22576 + versuffix=".$current.$revision" | |
22577 + ;; | |
22578 + | |
22579 + windows) | |
22580 + # Use '-' rather than '.', since we only want one | |
22581 + # extension on DOS 8.3 filesystems. | |
22582 + func_arith $current - $age | |
22583 + major=$func_arith_result | |
22584 + versuffix="-$major" | |
22585 + ;; | |
22586 + | |
22587 + *) | |
22588 + func_fatal_configuration "unknown library version type \`$version_type'" | |
22589 + ;; | |
22590 + esac | |
22591 + | |
22592 + # Clear the version info if we defaulted, and they specified a release. | |
22593 + if test -z "$vinfo" && test -n "$release"; then | |
22594 + major= | |
22595 + case $version_type in | |
22596 + darwin) | |
22597 + # we can't check for "0.0" in archive_cmds due to quoting | |
22598 + # problems, so we reset it completely | |
22599 + verstring= | |
22600 + ;; | |
22601 + *) | |
22602 + verstring="0.0" | |
22603 + ;; | |
22604 + esac | |
22605 + if test "$need_version" = no; then | |
22606 + versuffix= | |
22607 + else | |
22608 + versuffix=".0.0" | |
22609 + fi | |
22610 + fi | |
22611 + | |
22612 + # Remove version info from name if versioning should be avoided | |
22613 + if test "$avoid_version" = yes && test "$need_version" = no; then | |
22614 + major= | |
22615 + versuffix= | |
22616 + verstring="" | |
22617 + fi | |
22618 + | |
22619 + # Check to see if the archive will have undefined symbols. | |
22620 + if test "$allow_undefined" = yes; then | |
22621 + if test "$allow_undefined_flag" = unsupported; then | |
22622 + func_warning "undefined symbols not allowed in $host shared libraries" | |
22623 + build_libtool_libs=no | |
22624 + build_old_libs=yes | |
22625 + fi | |
22626 + else | |
22627 + # Don't allow undefined symbols. | |
22628 + allow_undefined_flag="$no_undefined_flag" | |
22629 + fi | |
22630 + | |
22631 + fi | |
22632 + | |
22633 + func_generate_dlsyms "$libname" "$libname" "yes" | |
22634 + func_append libobjs " $symfileobj" | |
22635 + test "X$libobjs" = "X " && libobjs= | |
22636 + | |
22637 + if test "$opt_mode" != relink; then | |
22638 + # Remove our outputs, but don't remove object files since they | |
22639 + # may have been created when compiling PIC objects. | |
22640 + removelist= | |
22641 + tempremovelist=`$ECHO "$output_objdir/*"` | |
22642 + for p in $tempremovelist; do | |
22643 + case $p in | |
22644 + *.$objext | *.gcno) | |
22645 + ;; | |
22646 + $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) | |
22647 + if test "X$precious_files_regex" != "X"; then | |
22648 + if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 | |
22649 + then | |
22650 + continue | |
22651 + fi | |
22652 + fi | |
22653 + func_append removelist " $p" | |
22654 + ;; | |
22655 + *) ;; | |
22656 + esac | |
22657 + done | |
22658 + test -n "$removelist" && \ | |
22659 + func_show_eval "${RM}r \$removelist" | |
22660 + fi | |
22661 + | |
22662 + # Now set the variables for building old libraries. | |
22663 + if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then | |
22664 + func_append oldlibs " $output_objdir/$libname.$libext" | |
22665 + | |
22666 + # Transform .lo files to .o files. | |
22667 + oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` | |
22668 + fi | |
22669 + | |
22670 + # Eliminate all temporary directories. | |
22671 + #for path in $notinst_path; do | |
22672 + # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` | |
22673 + # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` | |
22674 + # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` | |
22675 + #done | |
22676 + | |
22677 + if test -n "$xrpath"; then | |
22678 + # If the user specified any rpath flags, then add them. | |
22679 + temp_xrpath= | |
22680 + for libdir in $xrpath; do | |
22681 + func_replace_sysroot "$libdir" | |
22682 + func_append temp_xrpath " -R$func_replace_sysroot_result" | |
22683 + case "$finalize_rpath " in | |
22684 + *" $libdir "*) ;; | |
22685 + *) func_append finalize_rpath " $libdir" ;; | |
22686 + esac | |
22687 + done | |
22688 + if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then | |
22689 + dependency_libs="$temp_xrpath $dependency_libs" | |
22690 + fi | |
22691 + fi | |
22692 + | |
22693 + # Make sure dlfiles contains only unique files that won't be dlpreopened | |
22694 + old_dlfiles="$dlfiles" | |
22695 + dlfiles= | |
22696 + for lib in $old_dlfiles; do | |
22697 + case " $dlprefiles $dlfiles " in | |
22698 + *" $lib "*) ;; | |
22699 + *) func_append dlfiles " $lib" ;; | |
22700 + esac | |
22701 + done | |
22702 + | |
22703 + # Make sure dlprefiles contains only unique files | |
22704 + old_dlprefiles="$dlprefiles" | |
22705 + dlprefiles= | |
22706 + for lib in $old_dlprefiles; do | |
22707 + case "$dlprefiles " in | |
22708 + *" $lib "*) ;; | |
22709 + *) func_append dlprefiles " $lib" ;; | |
22710 + esac | |
22711 + done | |
22712 + | |
22713 + if test "$build_libtool_libs" = yes; then | |
22714 + if test -n "$rpath"; then | |
22715 + case $host in | |
22716 + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) | |
22717 + # these systems don't actually have a c library (as such)! | |
22718 + ;; | |
22719 + *-*-rhapsody* | *-*-darwin1.[012]) | |
22720 + # Rhapsody C library is in the System framework | |
22721 + func_append deplibs " System.ltframework" | |
22722 + ;; | |
22723 + *-*-netbsd*) | |
22724 + # Don't link with libc until the a.out ld.so is fixed. | |
22725 + ;; | |
22726 + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) | |
22727 + # Do not include libc due to us having libc/libc_r. | |
22728 + ;; | |
22729 + *-*-sco3.2v5* | *-*-sco5v6*) | |
22730 + # Causes problems with __ctype | |
22731 + ;; | |
22732 + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) | |
22733 + # Compiler inserts libc in the correct place for threads to work | |
22734 + ;; | |
22735 + *) | |
22736 + # Add libc to deplibs on all other systems if necessary. | |
22737 + if test "$build_libtool_need_lc" = "yes"; then | |
22738 + func_append deplibs " -lc" | |
22739 + fi | |
22740 + ;; | |
22741 + esac | |
22742 + fi | |
22743 + | |
22744 + # Transform deplibs into only deplibs that can be linked in shared. | |
22745 + name_save=$name | |
22746 + libname_save=$libname | |
22747 + release_save=$release | |
22748 + versuffix_save=$versuffix | |
22749 + major_save=$major | |
22750 + # I'm not sure if I'm treating the release correctly. I think | |
22751 + # release should show up in the -l (ie -lgmp5) so we don't want to | |
22752 + # add it in twice. Is that correct? | |
22753 + release="" | |
22754 + versuffix="" | |
22755 + major="" | |
22756 + newdeplibs= | |
22757 + droppeddeps=no | |
22758 + case $deplibs_check_method in | |
22759 + pass_all) | |
22760 + # Don't check for shared/static. Everything works. | |
22761 + # This might be a little naive. We might want to check | |
22762 + # whether the library exists or not. But this is on | |
22763 + # osf3 & osf4 and I'm not really sure... Just | |
22764 + # implementing what was already the behavior. | |
22765 + newdeplibs=$deplibs | |
22766 + ;; | |
22767 + test_compile) | |
22768 + # This code stresses the "libraries are programs" paradigm to its | |
22769 + # limits. Maybe even breaks it. We compile a program, linking it | |
22770 + # against the deplibs as a proxy for the library. Then we can check | |
22771 + # whether they linked in statically or dynamically with ldd. | |
22772 + $opt_dry_run || $RM conftest.c | |
22773 + cat > conftest.c <<EOF | |
22774 + int main() { return 0; } | |
22775 +EOF | |
22776 + $opt_dry_run || $RM conftest | |
22777 + if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then | |
22778 + ldd_output=`ldd conftest` | |
22779 + for i in $deplibs; do | |
22780 + case $i in | |
22781 + -l*) | |
22782 + func_stripname -l '' "$i" | |
22783 + name=$func_stripname_result | |
22784 + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then | |
22785 + case " $predeps $postdeps " in | |
22786 + *" $i "*) | |
22787 + func_append newdeplibs " $i" | |
22788 + i="" | |
22789 + ;; | |
22790 + esac | |
22791 + fi | |
22792 + if test -n "$i" ; then | |
22793 + libname=`eval "\\$ECHO \"$libname_spec\""` | |
22794 + deplib_matches=`eval "\\$ECHO \"$library_names_spec\""` | |
22795 + set dummy $deplib_matches; shift | |
22796 + deplib_match=$1 | |
22797 + if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then | |
22798 + func_append newdeplibs " $i" | |
22799 + else | |
22800 + droppeddeps=yes | |
22801 + echo | |
22802 + $ECHO "*** Warning: dynamic linker does not accept needed library $i." | |
22803 + echo "*** I have the capability to make that library automatically link in when" | |
22804 + echo "*** you link to this library. But I can only do this if you have a" | |
22805 + echo "*** shared version of the library, which I believe you do not have" | |
22806 + echo "*** because a test_compile did reveal that the linker did not use it for" | |
22807 + echo "*** its dynamic dependency list that programs get resolved with at runtime." | |
22808 + fi | |
22809 + fi | |
22810 + ;; | |
22811 + *) | |
22812 + func_append newdeplibs " $i" | |
22813 + ;; | |
22814 + esac | |
22815 + done | |
22816 + else | |
22817 + # Error occurred in the first compile. Let's try to salvage | |
22818 + # the situation: Compile a separate program for each library. | |
22819 + for i in $deplibs; do | |
22820 + case $i in | |
22821 + -l*) | |
22822 + func_stripname -l '' "$i" | |
22823 + name=$func_stripname_result | |
22824 + $opt_dry_run || $RM conftest | |
22825 + if $LTCC $LTCFLAGS -o conftest conftest.c $i; then | |
22826 + ldd_output=`ldd conftest` | |
22827 + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then | |
22828 + case " $predeps $postdeps " in | |
22829 + *" $i "*) | |
22830 + func_append newdeplibs " $i" | |
22831 + i="" | |
22832 + ;; | |
22833 + esac | |
22834 + fi | |
22835 + if test -n "$i" ; then | |
22836 + libname=`eval "\\$ECHO \"$libname_spec\""` | |
22837 + deplib_matches=`eval "\\$ECHO \"$library_names_spec\""` | |
22838 + set dummy $deplib_matches; shift | |
22839 + deplib_match=$1 | |
22840 + if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then | |
22841 + func_append newdeplibs " $i" | |
22842 + else | |
22843 + droppeddeps=yes | |
22844 + echo | |
22845 + $ECHO "*** Warning: dynamic linker does not accept needed library $i." | |
22846 + echo "*** I have the capability to make that library automatically link in when" | |
22847 + echo "*** you link to this library. But I can only do this if you have a" | |
22848 + echo "*** shared version of the library, which you do not appear to have" | |
22849 + echo "*** because a test_compile did reveal that the linker did not use this one" | |
22850 + echo "*** as a dynamic dependency that programs can get resolved with at runtime." | |
22851 + fi | |
22852 + fi | |
22853 + else | |
22854 + droppeddeps=yes | |
22855 + echo | |
22856 + $ECHO "*** Warning! Library $i is needed by this library but I was not able to" | |
22857 + echo "*** make it link in! You will probably need to install it or some" | |
22858 + echo "*** library that it depends on before this library will be fully" | |
22859 + echo "*** functional. Installing it before continuing would be even better." | |
22860 + fi | |
22861 + ;; | |
22862 + *) | |
22863 + func_append newdeplibs " $i" | |
22864 + ;; | |
22865 + esac | |
22866 + done | |
22867 + fi | |
22868 + ;; | |
22869 + file_magic*) | |
22870 + set dummy $deplibs_check_method; shift | |
22871 + file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` | |
22872 + for a_deplib in $deplibs; do | |
22873 + case $a_deplib in | |
22874 + -l*) | |
22875 + func_stripname -l '' "$a_deplib" | |
22876 + name=$func_stripname_result | |
22877 + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then | |
22878 + case " $predeps $postdeps " in | |
22879 + *" $a_deplib "*) | |
22880 + func_append newdeplibs " $a_deplib" | |
22881 + a_deplib="" | |
22882 + ;; | |
22883 + esac | |
22884 + fi | |
22885 + if test -n "$a_deplib" ; then | |
22886 + libname=`eval "\\$ECHO \"$libname_spec\""` | |
22887 + if test -n "$file_magic_glob"; then | |
22888 + libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob` | |
22889 + else | |
22890 + libnameglob=$libname | |
22891 + fi | |
22892 + test "$want_nocaseglob" = yes && nocaseglob=`shopt -p nocaseglob` | |
22893 + for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do | |
22894 + if test "$want_nocaseglob" = yes; then | |
22895 + shopt -s nocaseglob | |
22896 + potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` | |
22897 + $nocaseglob | |
22898 + else | |
22899 + potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` | |
22900 + fi | |
22901 + for potent_lib in $potential_libs; do | |
22902 + # Follow soft links. | |
22903 + if ls -lLd "$potent_lib" 2>/dev/null | | |
22904 + $GREP " -> " >/dev/null; then | |
22905 + continue | |
22906 + fi | |
22907 + # The statement above tries to avoid entering an | |
22908 + # endless loop below, in case of cyclic links. | |
22909 + # We might still enter an endless loop, since a link | |
22910 + # loop can be closed while we follow links, | |
22911 + # but so what? | |
22912 + potlib="$potent_lib" | |
22913 + while test -h "$potlib" 2>/dev/null; do | |
22914 + potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` | |
22915 + case $potliblink in | |
22916 + [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; | |
22917 + *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; | |
22918 + esac | |
22919 + done | |
22920 + if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | | |
22921 + $SED -e 10q | | |
22922 + $EGREP "$file_magic_regex" > /dev/null; then | |
22923 + func_append newdeplibs " $a_deplib" | |
22924 + a_deplib="" | |
22925 + break 2 | |
22926 + fi | |
22927 + done | |
22928 + done | |
22929 + fi | |
22930 + if test -n "$a_deplib" ; then | |
22931 + droppeddeps=yes | |
22932 + echo | |
22933 + $ECHO "*** Warning: linker path does not have real file for library $a_deplib." | |
22934 + echo "*** I have the capability to make that library automatically link in when" | |
22935 + echo "*** you link to this library. But I can only do this if you have a" | |
22936 + echo "*** shared version of the library, which you do not appear to have" | |
22937 + echo "*** because I did check the linker path looking for a file starting" | |
22938 + if test -z "$potlib" ; then | |
22939 + $ECHO "*** with $libname but no candidates were found. (...for file magic test)" | |
22940 + else | |
22941 + $ECHO "*** with $libname and none of the candidates passed a file format test" | |
22942 + $ECHO "*** using a file magic. Last file checked: $potlib" | |
22943 + fi | |
22944 + fi | |
22945 + ;; | |
22946 + *) | |
22947 + # Add a -L argument. | |
22948 + func_append newdeplibs " $a_deplib" | |
22949 + ;; | |
22950 + esac | |
22951 + done # Gone through all deplibs. | |
22952 + ;; | |
22953 + match_pattern*) | |
22954 + set dummy $deplibs_check_method; shift | |
22955 + match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` | |
22956 + for a_deplib in $deplibs; do | |
22957 + case $a_deplib in | |
22958 + -l*) | |
22959 + func_stripname -l '' "$a_deplib" | |
22960 + name=$func_stripname_result | |
22961 + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then | |
22962 + case " $predeps $postdeps " in | |
22963 + *" $a_deplib "*) | |
22964 + func_append newdeplibs " $a_deplib" | |
22965 + a_deplib="" | |
22966 + ;; | |
22967 + esac | |
22968 + fi | |
22969 + if test -n "$a_deplib" ; then | |
22970 + libname=`eval "\\$ECHO \"$libname_spec\""` | |
22971 + for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do | |
22972 + potential_libs=`ls $i/$libname[.-]* 2>/dev/null` | |
22973 + for potent_lib in $potential_libs; do | |
22974 + potlib="$potent_lib" # see symlink-check above in file_magic test | |
22975 + if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ | |
22976 + $EGREP "$match_pattern_regex" > /dev/null; then | |
22977 + func_append newdeplibs " $a_deplib" | |
22978 + a_deplib="" | |
22979 + break 2 | |
22980 + fi | |
22981 + done | |
22982 + done | |
22983 + fi | |
22984 + if test -n "$a_deplib" ; then | |
22985 + droppeddeps=yes | |
22986 + echo | |
22987 + $ECHO "*** Warning: linker path does not have real file for library $a_deplib." | |
22988 + echo "*** I have the capability to make that library automatically link in when" | |
22989 + echo "*** you link to this library. But I can only do this if you have a" | |
22990 + echo "*** shared version of the library, which you do not appear to have" | |
22991 + echo "*** because I did check the linker path looking for a file starting" | |
22992 + if test -z "$potlib" ; then | |
22993 + $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" | |
22994 + else | |
22995 + $ECHO "*** with $libname and none of the candidates passed a file format test" | |
22996 + $ECHO "*** using a regex pattern. Last file checked: $potlib" | |
22997 + fi | |
22998 + fi | |
22999 + ;; | |
23000 + *) | |
23001 + # Add a -L argument. | |
23002 + func_append newdeplibs " $a_deplib" | |
23003 + ;; | |
23004 + esac | |
23005 + done # Gone through all deplibs. | |
23006 + ;; | |
23007 + none | unknown | *) | |
23008 + newdeplibs="" | |
23009 + tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` | |
23010 + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then | |
23011 + for i in $predeps $postdeps ; do | |
23012 + # can't use Xsed below, because $i might contain '/' | |
23013 + tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"` | |
23014 + done | |
23015 + fi | |
23016 + case $tmp_deplibs in | |
23017 + *[!\ \ ]*) | |
23018 + echo | |
23019 + if test "X$deplibs_check_method" = "Xnone"; then | |
23020 + echo "*** Warning: inter-library dependencies are not supported in this platform." | |
23021 + else | |
23022 + echo "*** Warning: inter-library dependencies are not known to be supported." | |
23023 + fi | |
23024 + echo "*** All declared inter-library dependencies are being dropped." | |
23025 + droppeddeps=yes | |
23026 + ;; | |
23027 + esac | |
23028 + ;; | |
23029 + esac | |
23030 + versuffix=$versuffix_save | |
23031 + major=$major_save | |
23032 + release=$release_save | |
23033 + libname=$libname_save | |
23034 + name=$name_save | |
23035 + | |
23036 + case $host in | |
23037 + *-*-rhapsody* | *-*-darwin1.[012]) | |
23038 + # On Rhapsody replace the C library with the System framework | |
23039 + newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` | |
23040 + ;; | |
23041 + esac | |
23042 + | |
23043 + if test "$droppeddeps" = yes; then | |
23044 + if test "$module" = yes; then | |
23045 + echo | |
23046 + echo "*** Warning: libtool could not satisfy all declared inter-library" | |
23047 + $ECHO "*** dependencies of module $libname. Therefore, libtool will create" | |
23048 + echo "*** a static module, that should work as long as the dlopening" | |
23049 + echo "*** application is linked with the -dlopen flag." | |
23050 + if test -z "$global_symbol_pipe"; then | |
23051 + echo | |
23052 + echo "*** However, this would only work if libtool was able to extract symbol" | |
23053 + echo "*** lists from a program, using \`nm' or equivalent, but libtool could" | |
23054 + echo "*** not find such a program. So, this module is probably useless." | |
23055 + echo "*** \`nm' from GNU binutils and a full rebuild may help." | |
23056 + fi | |
23057 + if test "$build_old_libs" = no; then | |
23058 + oldlibs="$output_objdir/$libname.$libext" | |
23059 + build_libtool_libs=module | |
23060 + build_old_libs=yes | |
23061 + else | |
23062 + build_libtool_libs=no | |
23063 + fi | |
23064 + else | |
23065 + echo "*** The inter-library dependencies that have been dropped here will be" | |
23066 + echo "*** automatically added whenever a program is linked with this library" | |
23067 + echo "*** or is declared to -dlopen it." | |
23068 + | |
23069 + if test "$allow_undefined" = no; then | |
23070 + echo | |
23071 + echo "*** Since this library must not contain undefined symbols," | |
23072 + echo "*** because either the platform does not support them or" | |
23073 + echo "*** it was explicitly requested with -no-undefined," | |
23074 + echo "*** libtool will only create a static version of it." | |
23075 + if test "$build_old_libs" = no; then | |
23076 + oldlibs="$output_objdir/$libname.$libext" | |
23077 + build_libtool_libs=module | |
23078 + build_old_libs=yes | |
23079 + else | |
23080 + build_libtool_libs=no | |
23081 + fi | |
23082 + fi | |
23083 + fi | |
23084 + fi | |
23085 + # Done checking deplibs! | |
23086 + deplibs=$newdeplibs | |
23087 + fi | |
23088 + # Time to change all our "foo.ltframework" stuff back to "-framework foo" | |
23089 + case $host in | |
23090 + *-*-darwin*) | |
23091 + newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` | |
23092 + new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` | |
23093 + deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` | |
23094 + ;; | |
23095 + esac | |
23096 + | |
23097 + # move library search paths that coincide with paths to not yet | |
23098 + # installed libraries to the beginning of the library search list | |
23099 + new_libs= | |
23100 + for path in $notinst_path; do | |
23101 + case " $new_libs " in | |
23102 + *" -L$path/$objdir "*) ;; | |
23103 + *) | |
23104 + case " $deplibs " in | |
23105 + *" -L$path/$objdir "*) | |
23106 + func_append new_libs " -L$path/$objdir" ;; | |
23107 + esac | |
23108 + ;; | |
23109 + esac | |
23110 + done | |
23111 + for deplib in $deplibs; do | |
23112 + case $deplib in | |
23113 + -L*) | |
23114 + case " $new_libs " in | |
23115 + *" $deplib "*) ;; | |
23116 + *) func_append new_libs " $deplib" ;; | |
23117 + esac | |
23118 + ;; | |
23119 + *) func_append new_libs " $deplib" ;; | |
23120 + esac | |
23121 + done | |
23122 + deplibs="$new_libs" | |
23123 + | |
23124 + # All the library-specific variables (install_libdir is set above). | |
23125 + library_names= | |
23126 + old_library= | |
23127 + dlname= | |
23128 + | |
23129 + # Test again, we may have decided not to build it any more | |
23130 + if test "$build_libtool_libs" = yes; then | |
23131 + # Remove ${wl} instances when linking with ld. | |
23132 + # FIXME: should test the right _cmds variable. | |
23133 + case $archive_cmds in | |
23134 + *\$LD\ *) wl= ;; | |
23135 + esac | |
23136 + if test "$hardcode_into_libs" = yes; then | |
23137 + # Hardcode the library paths | |
23138 + hardcode_libdirs= | |
23139 + dep_rpath= | |
23140 + rpath="$finalize_rpath" | |
23141 + test "$opt_mode" != relink && rpath="$compile_rpath$rpath" | |
23142 + for libdir in $rpath; do | |
23143 + if test -n "$hardcode_libdir_flag_spec"; then | |
23144 + if test -n "$hardcode_libdir_separator"; then | |
23145 + func_replace_sysroot "$libdir" | |
23146 + libdir=$func_replace_sysroot_result | |
23147 + if test -z "$hardcode_libdirs"; then | |
23148 + hardcode_libdirs="$libdir" | |
23149 + else | |
23150 + # Just accumulate the unique libdirs. | |
23151 + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in | |
23152 + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) | |
23153 + ;; | |
23154 + *) | |
23155 + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" | |
23156 + ;; | |
23157 + esac | |
23158 + fi | |
23159 + else | |
23160 + eval flag=\"$hardcode_libdir_flag_spec\" | |
23161 + func_append dep_rpath " $flag" | |
23162 + fi | |
23163 + elif test -n "$runpath_var"; then | |
23164 + case "$perm_rpath " in | |
23165 + *" $libdir "*) ;; | |
23166 + *) func_append perm_rpath " $libdir" ;; | |
23167 + esac | |
23168 + fi | |
23169 + done | |
23170 + # Substitute the hardcoded libdirs into the rpath. | |
23171 + if test -n "$hardcode_libdir_separator" && | |
23172 + test -n "$hardcode_libdirs"; then | |
23173 + libdir="$hardcode_libdirs" | |
23174 + eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" | |
23175 + fi | |
23176 + if test -n "$runpath_var" && test -n "$perm_rpath"; then | |
23177 + # We should set the runpath_var. | |
23178 + rpath= | |
23179 + for dir in $perm_rpath; do | |
23180 + func_append rpath "$dir:" | |
23181 + done | |
23182 + eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" | |
23183 + fi | |
23184 + test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" | |
23185 + fi | |
23186 + | |
23187 + shlibpath="$finalize_shlibpath" | |
23188 + test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" | |
23189 + if test -n "$shlibpath"; then | |
23190 + eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" | |
23191 + fi | |
23192 + | |
23193 + # Get the real and link names of the library. | |
23194 + eval shared_ext=\"$shrext_cmds\" | |
23195 + eval library_names=\"$library_names_spec\" | |
23196 + set dummy $library_names | |
23197 + shift | |
23198 + realname="$1" | |
23199 + shift | |
23200 + | |
23201 + if test -n "$soname_spec"; then | |
23202 + eval soname=\"$soname_spec\" | |
23203 + else | |
23204 + soname="$realname" | |
23205 + fi | |
23206 + if test -z "$dlname"; then | |
23207 + dlname=$soname | |
23208 + fi | |
23209 + | |
23210 + lib="$output_objdir/$realname" | |
23211 + linknames= | |
23212 + for link | |
23213 + do | |
23214 + func_append linknames " $link" | |
23215 + done | |
23216 + | |
23217 + # Use standard objects if they are pic | |
23218 + test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` | |
23219 + test "X$libobjs" = "X " && libobjs= | |
23220 + | |
23221 + delfiles= | |
23222 + if test -n "$export_symbols" && test -n "$include_expsyms"; then | |
23223 + $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" | |
23224 + export_symbols="$output_objdir/$libname.uexp" | |
23225 + func_append delfiles " $export_symbols" | |
23226 + fi | |
23227 + | |
23228 + orig_export_symbols= | |
23229 + case $host_os in | |
23230 + cygwin* | mingw* | cegcc*) | |
23231 + if test -n "$export_symbols" && test -z "$export_symbols_regex"; then | |
23232 + # exporting using user supplied symfile | |
23233 + if test "x`$SED 1q $export_symbols`" != xEXPORTS; then | |
23234 + # and it's NOT already a .def file. Must figure out | |
23235 + # which of the given symbols are data symbols and tag | |
23236 + # them as such. So, trigger use of export_symbols_cmds. | |
23237 + # export_symbols gets reassigned inside the "prepare | |
23238 + # the list of exported symbols" if statement, so the | |
23239 + # include_expsyms logic still works. | |
23240 + orig_export_symbols="$export_symbols" | |
23241 + export_symbols= | |
23242 + always_export_symbols=yes | |
23243 + fi | |
23244 + fi | |
23245 + ;; | |
23246 + esac | |
23247 + | |
23248 + # Prepare the list of exported symbols | |
23249 + if test -z "$export_symbols"; then | |
23250 + if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then | |
23251 + func_verbose "generating symbol list for \`$libname.la'" | |
23252 + export_symbols="$output_objdir/$libname.exp" | |
23253 + $opt_dry_run || $RM $export_symbols | |
23254 + cmds=$export_symbols_cmds | |
23255 + save_ifs="$IFS"; IFS='~' | |
23256 + for cmd1 in $cmds; do | |
23257 + IFS="$save_ifs" | |
23258 + # Take the normal branch if the nm_file_list_spec branch | |
23259 + # doesn't work or if tool conversion is not needed. | |
23260 + case $nm_file_list_spec~$to_tool_file_cmd in | |
23261 + *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) | |
23262 + try_normal_branch=yes | |
23263 + eval cmd=\"$cmd1\" | |
23264 + func_len " $cmd" | |
23265 + len=$func_len_result | |
23266 + ;; | |
23267 + *) | |
23268 + try_normal_branch=no | |
23269 + ;; | |
23270 + esac | |
23271 + if test "$try_normal_branch" = yes \ | |
23272 + && { test "$len" -lt "$max_cmd_len" \ | |
23273 + || test "$max_cmd_len" -le -1; } | |
23274 + then | |
23275 + func_show_eval "$cmd" 'exit $?' | |
23276 + skipped_export=false | |
23277 + elif test -n "$nm_file_list_spec"; then | |
23278 + func_basename "$output" | |
23279 + output_la=$func_basename_result | |
23280 + save_libobjs=$libobjs | |
23281 + save_output=$output | |
23282 + output=${output_objdir}/${output_la}.nm | |
23283 + func_to_tool_file "$output" | |
23284 + libobjs=$nm_file_list_spec$func_to_tool_file_result | |
23285 + func_append delfiles " $output" | |
23286 + func_verbose "creating $NM input file list: $output" | |
23287 + for obj in $save_libobjs; do | |
23288 + func_to_tool_file "$obj" | |
23289 + $ECHO "$func_to_tool_file_result" | |
23290 + done > "$output" | |
23291 + eval cmd=\"$cmd1\" | |
23292 + func_show_eval "$cmd" 'exit $?' | |
23293 + output=$save_output | |
23294 + libobjs=$save_libobjs | |
23295 + skipped_export=false | |
23296 + else | |
23297 + # The command line is too long to execute in one step. | |
23298 + func_verbose "using reloadable object file for export list..." | |
23299 + skipped_export=: | |
23300 + # Break out early, otherwise skipped_export may be | |
23301 + # set to false by a later but shorter cmd. | |
23302 + break | |
23303 + fi | |
23304 + done | |
23305 + IFS="$save_ifs" | |
23306 + if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then | |
23307 + func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' | |
23308 + func_show_eval '$MV "${export_symbols}T" "$export_symbols"' | |
23309 + fi | |
23310 + fi | |
23311 + fi | |
23312 + | |
23313 + if test -n "$export_symbols" && test -n "$include_expsyms"; then | |
23314 + tmp_export_symbols="$export_symbols" | |
23315 + test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" | |
23316 + $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' | |
23317 + fi | |
23318 + | |
23319 + if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then | |
23320 + # The given exports_symbols file has to be filtered, so filter it. | |
23321 + func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" | |
23322 + # FIXME: $output_objdir/$libname.filter potentially contains lots of | |
23323 + # 's' commands which not all seds can handle. GNU sed should be fine | |
23324 + # though. Also, the filter scales superlinearly with the number of | |
23325 + # global variables. join(1) would be nice here, but unfortunately | |
23326 + # isn't a blessed tool. | |
23327 + $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter | |
23328 + func_append delfiles " $export_symbols $output_objdir/$libname.filter" | |
23329 + export_symbols=$output_objdir/$libname.def | |
23330 + $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols | |
23331 + fi | |
23332 + | |
23333 + tmp_deplibs= | |
23334 + for test_deplib in $deplibs; do | |
23335 + case " $convenience " in | |
23336 + *" $test_deplib "*) ;; | |
23337 + *) | |
23338 + func_append tmp_deplibs " $test_deplib" | |
23339 + ;; | |
23340 + esac | |
23341 + done | |
23342 + deplibs="$tmp_deplibs" | |
23343 + | |
23344 + if test -n "$convenience"; then | |
23345 + if test -n "$whole_archive_flag_spec" && | |
23346 + test "$compiler_needs_object" = yes && | |
23347 + test -z "$libobjs"; then | |
23348 + # extract the archives, so we have objects to list. | |
23349 + # TODO: could optimize this to just extract one archive. | |
23350 + whole_archive_flag_spec= | |
23351 + fi | |
23352 + if test -n "$whole_archive_flag_spec"; then | |
23353 + save_libobjs=$libobjs | |
23354 + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" | |
23355 + test "X$libobjs" = "X " && libobjs= | |
23356 + else | |
23357 + gentop="$output_objdir/${outputname}x" | |
23358 + func_append generated " $gentop" | |
23359 + | |
23360 + func_extract_archives $gentop $convenience | |
23361 + func_append libobjs " $func_extract_archives_result" | |
23362 + test "X$libobjs" = "X " && libobjs= | |
23363 + fi | |
23364 + fi | |
23365 + | |
23366 + if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then | |
23367 + eval flag=\"$thread_safe_flag_spec\" | |
23368 + func_append linker_flags " $flag" | |
23369 + fi | |
23370 + | |
23371 + # Make a backup of the uninstalled library when relinking | |
23372 + if test "$opt_mode" = relink; then | |
23373 + $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? | |
23374 + fi | |
23375 + | |
23376 + # Do each of the archive commands. | |
23377 + if test "$module" = yes && test -n "$module_cmds" ; then | |
23378 + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then | |
23379 + eval test_cmds=\"$module_expsym_cmds\" | |
23380 + cmds=$module_expsym_cmds | |
23381 + else | |
23382 + eval test_cmds=\"$module_cmds\" | |
23383 + cmds=$module_cmds | |
23384 + fi | |
23385 + else | |
23386 + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then | |
23387 + eval test_cmds=\"$archive_expsym_cmds\" | |
23388 + cmds=$archive_expsym_cmds | |
23389 + else | |
23390 + eval test_cmds=\"$archive_cmds\" | |
23391 + cmds=$archive_cmds | |
23392 + fi | |
23393 + fi | |
23394 + | |
23395 + if test "X$skipped_export" != "X:" && | |
23396 + func_len " $test_cmds" && | |
23397 + len=$func_len_result && | |
23398 + test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then | |
23399 + : | |
23400 + else | |
23401 + # The command line is too long to link in one step, link piecewise | |
23402 + # or, if using GNU ld and skipped_export is not :, use a linker | |
23403 + # script. | |
23404 + | |
23405 + # Save the value of $output and $libobjs because we want to | |
23406 + # use them later. If we have whole_archive_flag_spec, we | |
23407 + # want to use save_libobjs as it was before | |
23408 + # whole_archive_flag_spec was expanded, because we can't | |
23409 + # assume the linker understands whole_archive_flag_spec. | |
23410 + # This may have to be revisited, in case too many | |
23411 + # convenience libraries get linked in and end up exceeding | |
23412 + # the spec. | |
23413 + if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then | |
23414 + save_libobjs=$libobjs | |
23415 + fi | |
23416 + save_output=$output | |
23417 + func_basename "$output" | |
23418 + output_la=$func_basename_result | |
23419 + | |
23420 + # Clear the reloadable object creation command queue and | |
23421 + # initialize k to one. | |
23422 + test_cmds= | |
23423 + concat_cmds= | |
23424 + objlist= | |
23425 + last_robj= | |
23426 + k=1 | |
23427 + | |
23428 + if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then | |
23429 + output=${output_objdir}/${output_la}.lnkscript | |
23430 + func_verbose "creating GNU ld script: $output" | |
23431 + echo 'INPUT (' > $output | |
23432 + for obj in $save_libobjs | |
23433 + do | |
23434 + func_to_tool_file "$obj" | |
23435 + $ECHO "$func_to_tool_file_result" >> $output | |
23436 + done | |
23437 + echo ')' >> $output | |
23438 + func_append delfiles " $output" | |
23439 + func_to_tool_file "$output" | |
23440 + output=$func_to_tool_file_result | |
23441 + elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then | |
23442 + output=${output_objdir}/${output_la}.lnk | |
23443 + func_verbose "creating linker input file list: $output" | |
23444 + : > $output | |
23445 + set x $save_libobjs | |
23446 + shift | |
23447 + firstobj= | |
23448 + if test "$compiler_needs_object" = yes; then | |
23449 + firstobj="$1 " | |
23450 + shift | |
23451 + fi | |
23452 + for obj | |
23453 + do | |
23454 + func_to_tool_file "$obj" | |
23455 + $ECHO "$func_to_tool_file_result" >> $output | |
23456 + done | |
23457 + func_append delfiles " $output" | |
23458 + func_to_tool_file "$output" | |
23459 + output=$firstobj\"$file_list_spec$func_to_tool_file_result\" | |
23460 + else | |
23461 + if test -n "$save_libobjs"; then | |
23462 + func_verbose "creating reloadable object files..." | |
23463 + output=$output_objdir/$output_la-${k}.$objext | |
23464 + eval test_cmds=\"$reload_cmds\" | |
23465 + func_len " $test_cmds" | |
23466 + len0=$func_len_result | |
23467 + len=$len0 | |
23468 + | |
23469 + # Loop over the list of objects to be linked. | |
23470 + for obj in $save_libobjs | |
23471 + do | |
23472 + func_len " $obj" | |
23473 + func_arith $len + $func_len_result | |
23474 + len=$func_arith_result | |
23475 + if test "X$objlist" = X || | |
23476 + test "$len" -lt "$max_cmd_len"; then | |
23477 + func_append objlist " $obj" | |
23478 + else | |
23479 + # The command $test_cmds is almost too long, add a | |
23480 + # command to the queue. | |
23481 + if test "$k" -eq 1 ; then | |
23482 + # The first file doesn't have a previous command to add. | |
23483 + reload_objs=$objlist | |
23484 + eval concat_cmds=\"$reload_cmds\" | |
23485 + else | |
23486 + # All subsequent reloadable object files will link in | |
23487 + # the last one created. | |
23488 + reload_objs="$objlist $last_robj" | |
23489 + eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" | |
23490 + fi | |
23491 + last_robj=$output_objdir/$output_la-${k}.$objext | |
23492 + func_arith $k + 1 | |
23493 + k=$func_arith_result | |
23494 + output=$output_objdir/$output_la-${k}.$objext | |
23495 + objlist=" $obj" | |
23496 + func_len " $last_robj" | |
23497 + func_arith $len0 + $func_len_result | |
23498 + len=$func_arith_result | |
23499 + fi | |
23500 + done | |
23501 + # Handle the remaining objects by creating one last | |
23502 + # reloadable object file. All subsequent reloadable object | |
23503 + # files will link in the last one created. | |
23504 + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ | |
23505 + reload_objs="$objlist $last_robj" | |
23506 + eval concat_cmds=\"\${concat_cmds}$reload_cmds\" | |
23507 + if test -n "$last_robj"; then | |
23508 + eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" | |
23509 + fi | |
23510 + func_append delfiles " $output" | |
23511 + | |
23512 + else | |
23513 + output= | |
23514 + fi | |
23515 + | |
23516 + if ${skipped_export-false}; then | |
23517 + func_verbose "generating symbol list for \`$libname.la'" | |
23518 + export_symbols="$output_objdir/$libname.exp" | |
23519 + $opt_dry_run || $RM $export_symbols | |
23520 + libobjs=$output | |
23521 + # Append the command to create the export file. | |
23522 + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ | |
23523 + eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" | |
23524 + if test -n "$last_robj"; then | |
23525 + eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" | |
23526 + fi | |
23527 + fi | |
23528 + | |
23529 + test -n "$save_libobjs" && | |
23530 + func_verbose "creating a temporary reloadable object file: $output" | |
23531 + | |
23532 + # Loop through the commands generated above and execute them. | |
23533 + save_ifs="$IFS"; IFS='~' | |
23534 + for cmd in $concat_cmds; do | |
23535 + IFS="$save_ifs" | |
23536 + $opt_silent || { | |
23537 + func_quote_for_expand "$cmd" | |
23538 + eval "func_echo $func_quote_for_expand_result" | |
23539 + } | |
23540 + $opt_dry_run || eval "$cmd" || { | |
23541 + lt_exit=$? | |
23542 + | |
23543 + # Restore the uninstalled library and exit | |
23544 + if test "$opt_mode" = relink; then | |
23545 + ( cd "$output_objdir" && \ | |
23546 + $RM "${realname}T" && \ | |
23547 + $MV "${realname}U" "$realname" ) | |
23548 + fi | |
23549 + | |
23550 + exit $lt_exit | |
23551 + } | |
23552 + done | |
23553 + IFS="$save_ifs" | |
23554 + | |
23555 + if test -n "$export_symbols_regex" && ${skipped_export-false}; then | |
23556 + func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' | |
23557 + func_show_eval '$MV "${export_symbols}T" "$export_symbols"' | |
23558 + fi | |
23559 + fi | |
23560 + | |
23561 + if ${skipped_export-false}; then | |
23562 + if test -n "$export_symbols" && test -n "$include_expsyms"; then | |
23563 + tmp_export_symbols="$export_symbols" | |
23564 + test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" | |
23565 + $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' | |
23566 + fi | |
23567 + | |
23568 + if test -n "$orig_export_symbols"; then | |
23569 + # The given exports_symbols file has to be filtered, so filter it. | |
23570 + func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" | |
23571 + # FIXME: $output_objdir/$libname.filter potentially contains lots of | |
23572 + # 's' commands which not all seds can handle. GNU sed should be fine | |
23573 + # though. Also, the filter scales superlinearly with the number of | |
23574 + # global variables. join(1) would be nice here, but unfortunately | |
23575 + # isn't a blessed tool. | |
23576 + $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter | |
23577 + func_append delfiles " $export_symbols $output_objdir/$libname.filter" | |
23578 + export_symbols=$output_objdir/$libname.def | |
23579 + $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols | |
23580 + fi | |
23581 + fi | |
23582 + | |
23583 + libobjs=$output | |
23584 + # Restore the value of output. | |
23585 + output=$save_output | |
23586 + | |
23587 + if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then | |
23588 + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" | |
23589 + test "X$libobjs" = "X " && libobjs= | |
23590 + fi | |
23591 + # Expand the library linking commands again to reset the | |
23592 + # value of $libobjs for piecewise linking. | |
23593 + | |
23594 + # Do each of the archive commands. | |
23595 + if test "$module" = yes && test -n "$module_cmds" ; then | |
23596 + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then | |
23597 + cmds=$module_expsym_cmds | |
23598 + else | |
23599 + cmds=$module_cmds | |
23600 + fi | |
23601 + else | |
23602 + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then | |
23603 + cmds=$archive_expsym_cmds | |
23604 + else | |
23605 + cmds=$archive_cmds | |
23606 + fi | |
23607 + fi | |
23608 + fi | |
23609 + | |
23610 + if test -n "$delfiles"; then | |
23611 + # Append the command to remove temporary files to $cmds. | |
23612 + eval cmds=\"\$cmds~\$RM $delfiles\" | |
23613 + fi | |
23614 + | |
23615 + # Add any objects from preloaded convenience libraries | |
23616 + if test -n "$dlprefiles"; then | |
23617 + gentop="$output_objdir/${outputname}x" | |
23618 + func_append generated " $gentop" | |
23619 + | |
23620 + func_extract_archives $gentop $dlprefiles | |
23621 + func_append libobjs " $func_extract_archives_result" | |
23622 + test "X$libobjs" = "X " && libobjs= | |
23623 + fi | |
23624 + | |
23625 + save_ifs="$IFS"; IFS='~' | |
23626 + for cmd in $cmds; do | |
23627 + IFS="$save_ifs" | |
23628 + eval cmd=\"$cmd\" | |
23629 + $opt_silent || { | |
23630 + func_quote_for_expand "$cmd" | |
23631 + eval "func_echo $func_quote_for_expand_result" | |
23632 + } | |
23633 + $opt_dry_run || eval "$cmd" || { | |
23634 + lt_exit=$? | |
23635 + | |
23636 + # Restore the uninstalled library and exit | |
23637 + if test "$opt_mode" = relink; then | |
23638 + ( cd "$output_objdir" && \ | |
23639 + $RM "${realname}T" && \ | |
23640 + $MV "${realname}U" "$realname" ) | |
23641 + fi | |
23642 + | |
23643 + exit $lt_exit | |
23644 + } | |
23645 + done | |
23646 + IFS="$save_ifs" | |
23647 + | |
23648 + # Restore the uninstalled library and exit | |
23649 + if test "$opt_mode" = relink; then | |
23650 + $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? | |
23651 + | |
23652 + if test -n "$convenience"; then | |
23653 + if test -z "$whole_archive_flag_spec"; then | |
23654 + func_show_eval '${RM}r "$gentop"' | |
23655 + fi | |
23656 + fi | |
23657 + | |
23658 + exit $EXIT_SUCCESS | |
23659 + fi | |
23660 + | |
23661 + # Create links to the real library. | |
23662 + for linkname in $linknames; do | |
23663 + if test "$realname" != "$linkname"; then | |
23664 + func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' | |
23665 + fi | |
23666 + done | |
23667 + | |
23668 + # If -module or -export-dynamic was specified, set the dlname. | |
23669 + if test "$module" = yes || test "$export_dynamic" = yes; then | |
23670 + # On all known operating systems, these are identical. | |
23671 + dlname="$soname" | |
23672 + fi | |
23673 + fi | |
23674 + ;; | |
23675 + | |
23676 + obj) | |
23677 + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then | |
23678 + func_warning "\`-dlopen' is ignored for objects" | |
23679 + fi | |
23680 + | |
23681 + case " $deplibs" in | |
23682 + *\ -l* | *\ -L*) | |
23683 + func_warning "\`-l' and \`-L' are ignored for objects" ;; | |
23684 + esac | |
23685 + | |
23686 + test -n "$rpath" && \ | |
23687 + func_warning "\`-rpath' is ignored for objects" | |
23688 + | |
23689 + test -n "$xrpath" && \ | |
23690 + func_warning "\`-R' is ignored for objects" | |
23691 + | |
23692 + test -n "$vinfo" && \ | |
23693 + func_warning "\`-version-info' is ignored for objects" | |
23694 + | |
23695 + test -n "$release" && \ | |
23696 + func_warning "\`-release' is ignored for objects" | |
23697 + | |
23698 + case $output in | |
23699 + *.lo) | |
23700 + test -n "$objs$old_deplibs" && \ | |
23701 + func_fatal_error "cannot build library object \`$output' from non-libtool objects" | |
23702 + | |
23703 + libobj=$output | |
23704 + func_lo2o "$libobj" | |
23705 + obj=$func_lo2o_result | |
23706 + ;; | |
23707 + *) | |
23708 + libobj= | |
23709 + obj="$output" | |
23710 + ;; | |
23711 + esac | |
23712 + | |
23713 + # Delete the old objects. | |
23714 + $opt_dry_run || $RM $obj $libobj | |
23715 + | |
23716 + # Objects from convenience libraries. This assumes | |
23717 + # single-version convenience libraries. Whenever we create | |
23718 + # different ones for PIC/non-PIC, this we'll have to duplicate | |
23719 + # the extraction. | |
23720 + reload_conv_objs= | |
23721 + gentop= | |
23722 + # reload_cmds runs $LD directly, so let us get rid of | |
23723 + # -Wl from whole_archive_flag_spec and hope we can get by with | |
23724 + # turning comma into space.. | |
23725 + wl= | |
23726 + | |
23727 + if test -n "$convenience"; then | |
23728 + if test -n "$whole_archive_flag_spec"; then | |
23729 + eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" | |
23730 + reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` | |
23731 + else | |
23732 + gentop="$output_objdir/${obj}x" | |
23733 + func_append generated " $gentop" | |
23734 + | |
23735 + func_extract_archives $gentop $convenience | |
23736 + reload_conv_objs="$reload_objs $func_extract_archives_result" | |
23737 + fi | |
23738 + fi | |
23739 + | |
23740 + # If we're not building shared, we need to use non_pic_objs | |
23741 + test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" | |
23742 + | |
23743 + # Create the old-style object. | |
23744 + reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test | |
23745 + | |
23746 + output="$obj" | |
23747 + func_execute_cmds "$reload_cmds" 'exit $?' | |
23748 + | |
23749 + # Exit if we aren't doing a library object file. | |
23750 + if test -z "$libobj"; then | |
23751 + if test -n "$gentop"; then | |
23752 + func_show_eval '${RM}r "$gentop"' | |
23753 + fi | |
23754 + | |
23755 + exit $EXIT_SUCCESS | |
23756 + fi | |
23757 + | |
23758 + if test "$build_libtool_libs" != yes; then | |
23759 + if test -n "$gentop"; then | |
23760 + func_show_eval '${RM}r "$gentop"' | |
23761 + fi | |
23762 + | |
23763 + # Create an invalid libtool object if no PIC, so that we don't | |
23764 + # accidentally link it into a program. | |
23765 + # $show "echo timestamp > $libobj" | |
23766 + # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? | |
23767 + exit $EXIT_SUCCESS | |
23768 + fi | |
23769 + | |
23770 + if test -n "$pic_flag" || test "$pic_mode" != default; then | |
23771 + # Only do commands if we really have different PIC objects. | |
23772 + reload_objs="$libobjs $reload_conv_objs" | |
23773 + output="$libobj" | |
23774 + func_execute_cmds "$reload_cmds" 'exit $?' | |
23775 + fi | |
23776 + | |
23777 + if test -n "$gentop"; then | |
23778 + func_show_eval '${RM}r "$gentop"' | |
23779 + fi | |
23780 + | |
23781 + exit $EXIT_SUCCESS | |
23782 + ;; | |
23783 + | |
23784 + prog) | |
23785 + case $host in | |
23786 + *cygwin*) func_stripname '' '.exe' "$output" | |
23787 + output=$func_stripname_result.exe;; | |
23788 + esac | |
23789 + test -n "$vinfo" && \ | |
23790 + func_warning "\`-version-info' is ignored for programs" | |
23791 + | |
23792 + test -n "$release" && \ | |
23793 + func_warning "\`-release' is ignored for programs" | |
23794 + | |
23795 + test "$preload" = yes \ | |
23796 + && test "$dlopen_support" = unknown \ | |
23797 + && test "$dlopen_self" = unknown \ | |
23798 + && test "$dlopen_self_static" = unknown && \ | |
23799 + func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." | |
23800 + | |
23801 + case $host in | |
23802 + *-*-rhapsody* | *-*-darwin1.[012]) | |
23803 + # On Rhapsody replace the C library is the System framework | |
23804 + compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` | |
23805 + finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` | |
23806 + ;; | |
23807 + esac | |
23808 + | |
23809 + case $host in | |
23810 + *-*-darwin*) | |
23811 + # Don't allow lazy linking, it breaks C++ global constructors | |
23812 + # But is supposedly fixed on 10.4 or later (yay!). | |
23813 + if test "$tagname" = CXX ; then | |
23814 + case ${MACOSX_DEPLOYMENT_TARGET-10.0} in | |
23815 + 10.[0123]) | |
23816 + func_append compile_command " ${wl}-bind_at_load" | |
23817 + func_append finalize_command " ${wl}-bind_at_load" | |
23818 + ;; | |
23819 + esac | |
23820 + fi | |
23821 + # Time to change all our "foo.ltframework" stuff back to "-framework foo" | |
23822 + compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` | |
23823 + finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` | |
23824 + ;; | |
23825 + esac | |
23826 + | |
23827 + | |
23828 + # move library search paths that coincide with paths to not yet | |
23829 + # installed libraries to the beginning of the library search list | |
23830 + new_libs= | |
23831 + for path in $notinst_path; do | |
23832 + case " $new_libs " in | |
23833 + *" -L$path/$objdir "*) ;; | |
23834 + *) | |
23835 + case " $compile_deplibs " in | |
23836 + *" -L$path/$objdir "*) | |
23837 + func_append new_libs " -L$path/$objdir" ;; | |
23838 + esac | |
23839 + ;; | |
23840 + esac | |
23841 + done | |
23842 + for deplib in $compile_deplibs; do | |
23843 + case $deplib in | |
23844 + -L*) | |
23845 + case " $new_libs " in | |
23846 + *" $deplib "*) ;; | |
23847 + *) func_append new_libs " $deplib" ;; | |
23848 + esac | |
23849 + ;; | |
23850 + *) func_append new_libs " $deplib" ;; | |
23851 + esac | |
23852 + done | |
23853 + compile_deplibs="$new_libs" | |
23854 + | |
23855 + | |
23856 + func_append compile_command " $compile_deplibs" | |
23857 + func_append finalize_command " $finalize_deplibs" | |
23858 + | |
23859 + if test -n "$rpath$xrpath"; then | |
23860 + # If the user specified any rpath flags, then add them. | |
23861 + for libdir in $rpath $xrpath; do | |
23862 + # This is the magic to use -rpath. | |
23863 + case "$finalize_rpath " in | |
23864 + *" $libdir "*) ;; | |
23865 + *) func_append finalize_rpath " $libdir" ;; | |
23866 + esac | |
23867 + done | |
23868 + fi | |
23869 + | |
23870 + # Now hardcode the library paths | |
23871 + rpath= | |
23872 + hardcode_libdirs= | |
23873 + for libdir in $compile_rpath $finalize_rpath; do | |
23874 + if test -n "$hardcode_libdir_flag_spec"; then | |
23875 + if test -n "$hardcode_libdir_separator"; then | |
23876 + if test -z "$hardcode_libdirs"; then | |
23877 + hardcode_libdirs="$libdir" | |
23878 + else | |
23879 + # Just accumulate the unique libdirs. | |
23880 + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in | |
23881 + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) | |
23882 + ;; | |
23883 + *) | |
23884 + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" | |
23885 + ;; | |
23886 + esac | |
23887 + fi | |
23888 + else | |
23889 + eval flag=\"$hardcode_libdir_flag_spec\" | |
23890 + func_append rpath " $flag" | |
23891 + fi | |
23892 + elif test -n "$runpath_var"; then | |
23893 + case "$perm_rpath " in | |
23894 + *" $libdir "*) ;; | |
23895 + *) func_append perm_rpath " $libdir" ;; | |
23896 + esac | |
23897 + fi | |
23898 + case $host in | |
23899 + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) | |
23900 + testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` | |
23901 + case :$dllsearchpath: in | |
23902 + *":$libdir:"*) ;; | |
23903 + ::) dllsearchpath=$libdir;; | |
23904 + *) func_append dllsearchpath ":$libdir";; | |
23905 + esac | |
23906 + case :$dllsearchpath: in | |
23907 + *":$testbindir:"*) ;; | |
23908 + ::) dllsearchpath=$testbindir;; | |
23909 + *) func_append dllsearchpath ":$testbindir";; | |
23910 + esac | |
23911 + ;; | |
23912 + esac | |
23913 + done | |
23914 + # Substitute the hardcoded libdirs into the rpath. | |
23915 + if test -n "$hardcode_libdir_separator" && | |
23916 + test -n "$hardcode_libdirs"; then | |
23917 + libdir="$hardcode_libdirs" | |
23918 + eval rpath=\" $hardcode_libdir_flag_spec\" | |
23919 + fi | |
23920 + compile_rpath="$rpath" | |
23921 + | |
23922 + rpath= | |
23923 + hardcode_libdirs= | |
23924 + for libdir in $finalize_rpath; do | |
23925 + if test -n "$hardcode_libdir_flag_spec"; then | |
23926 + if test -n "$hardcode_libdir_separator"; then | |
23927 + if test -z "$hardcode_libdirs"; then | |
23928 + hardcode_libdirs="$libdir" | |
23929 + else | |
23930 + # Just accumulate the unique libdirs. | |
23931 + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in | |
23932 + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) | |
23933 + ;; | |
23934 + *) | |
23935 + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" | |
23936 + ;; | |
23937 + esac | |
23938 + fi | |
23939 + else | |
23940 + eval flag=\"$hardcode_libdir_flag_spec\" | |
23941 + func_append rpath " $flag" | |
23942 + fi | |
23943 + elif test -n "$runpath_var"; then | |
23944 + case "$finalize_perm_rpath " in | |
23945 + *" $libdir "*) ;; | |
23946 + *) func_append finalize_perm_rpath " $libdir" ;; | |
23947 + esac | |
23948 + fi | |
23949 + done | |
23950 + # Substitute the hardcoded libdirs into the rpath. | |
23951 + if test -n "$hardcode_libdir_separator" && | |
23952 + test -n "$hardcode_libdirs"; then | |
23953 + libdir="$hardcode_libdirs" | |
23954 + eval rpath=\" $hardcode_libdir_flag_spec\" | |
23955 + fi | |
23956 + finalize_rpath="$rpath" | |
23957 + | |
23958 + if test -n "$libobjs" && test "$build_old_libs" = yes; then | |
23959 + # Transform all the library objects into standard objects. | |
23960 + compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` | |
23961 + finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` | |
23962 + fi | |
23963 + | |
23964 + func_generate_dlsyms "$outputname" "@PROGRAM@" "no" | |
23965 + | |
23966 + # template prelinking step | |
23967 + if test -n "$prelink_cmds"; then | |
23968 + func_execute_cmds "$prelink_cmds" 'exit $?' | |
23969 + fi | |
23970 + | |
23971 + wrappers_required=yes | |
23972 + case $host in | |
23973 + *cegcc* | *mingw32ce*) | |
23974 + # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. | |
23975 + wrappers_required=no | |
23976 + ;; | |
23977 + *cygwin* | *mingw* ) | |
23978 + if test "$build_libtool_libs" != yes; then | |
23979 + wrappers_required=no | |
23980 + fi | |
23981 + ;; | |
23982 + *) | |
23983 + if test "$need_relink" = no || test "$build_libtool_libs" != yes; then | |
23984 + wrappers_required=no | |
23985 + fi | |
23986 + ;; | |
23987 + esac | |
23988 + if test "$wrappers_required" = no; then | |
23989 + # Replace the output file specification. | |
23990 + compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` | |
23991 + link_command="$compile_command$compile_rpath" | |
23992 + | |
23993 + # We have no uninstalled library dependencies, so finalize right now. | |
23994 + exit_status=0 | |
23995 + func_show_eval "$link_command" 'exit_status=$?' | |
23996 + | |
23997 + if test -n "$postlink_cmds"; then | |
23998 + func_to_tool_file "$output" | |
23999 + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` | |
24000 + func_execute_cmds "$postlink_cmds" 'exit $?' | |
24001 + fi | |
24002 + | |
24003 + # Delete the generated files. | |
24004 + if test -f "$output_objdir/${outputname}S.${objext}"; then | |
24005 + func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' | |
24006 + fi | |
24007 + | |
24008 + exit $exit_status | |
24009 + fi | |
24010 + | |
24011 + if test -n "$compile_shlibpath$finalize_shlibpath"; then | |
24012 + compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" | |
24013 + fi | |
24014 + if test -n "$finalize_shlibpath"; then | |
24015 + finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" | |
24016 + fi | |
24017 + | |
24018 + compile_var= | |
24019 + finalize_var= | |
24020 + if test -n "$runpath_var"; then | |
24021 + if test -n "$perm_rpath"; then | |
24022 + # We should set the runpath_var. | |
24023 + rpath= | |
24024 + for dir in $perm_rpath; do | |
24025 + func_append rpath "$dir:" | |
24026 + done | |
24027 + compile_var="$runpath_var=\"$rpath\$$runpath_var\" " | |
24028 + fi | |
24029 + if test -n "$finalize_perm_rpath"; then | |
24030 + # We should set the runpath_var. | |
24031 + rpath= | |
24032 + for dir in $finalize_perm_rpath; do | |
24033 + func_append rpath "$dir:" | |
24034 + done | |
24035 + finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " | |
24036 + fi | |
24037 + fi | |
24038 + | |
24039 + if test "$no_install" = yes; then | |
24040 + # We don't need to create a wrapper script. | |
24041 + link_command="$compile_var$compile_command$compile_rpath" | |
24042 + # Replace the output file specification. | |
24043 + link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` | |
24044 + # Delete the old output file. | |
24045 + $opt_dry_run || $RM $output | |
24046 + # Link the executable and exit | |
24047 + func_show_eval "$link_command" 'exit $?' | |
24048 + | |
24049 + if test -n "$postlink_cmds"; then | |
24050 + func_to_tool_file "$output" | |
24051 + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` | |
24052 + func_execute_cmds "$postlink_cmds" 'exit $?' | |
24053 + fi | |
24054 + | |
24055 + exit $EXIT_SUCCESS | |
24056 + fi | |
24057 + | |
24058 + if test "$hardcode_action" = relink; then | |
24059 + # Fast installation is not supported | |
24060 + link_command="$compile_var$compile_command$compile_rpath" | |
24061 + relink_command="$finalize_var$finalize_command$finalize_rpath" | |
24062 + | |
24063 + func_warning "this platform does not like uninstalled shared libraries" | |
24064 + func_warning "\`$output' will be relinked during installation" | |
24065 + else | |
24066 + if test "$fast_install" != no; then | |
24067 + link_command="$finalize_var$compile_command$finalize_rpath" | |
24068 + if test "$fast_install" = yes; then | |
24069 + relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` | |
24070 + else | |
24071 + # fast_install is set to needless | |
24072 + relink_command= | |
24073 + fi | |
24074 + else | |
24075 + link_command="$compile_var$compile_command$compile_rpath" | |
24076 + relink_command="$finalize_var$finalize_command$finalize_rpath" | |
24077 + fi | |
24078 + fi | |
24079 + | |
24080 + # Replace the output file specification. | |
24081 + link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` | |
24082 + | |
24083 + # Delete the old output files. | |
24084 + $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname | |
24085 + | |
24086 + func_show_eval "$link_command" 'exit $?' | |
24087 + | |
24088 + if test -n "$postlink_cmds"; then | |
24089 + func_to_tool_file "$output_objdir/$outputname" | |
24090 + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` | |
24091 + func_execute_cmds "$postlink_cmds" 'exit $?' | |
24092 + fi | |
24093 + | |
24094 + # Now create the wrapper script. | |
24095 + func_verbose "creating $output" | |
24096 + | |
24097 + # Quote the relink command for shipping. | |
24098 + if test -n "$relink_command"; then | |
24099 + # Preserve any variables that may affect compiler behavior | |
24100 + for var in $variables_saved_for_relink; do | |
24101 + if eval test -z \"\${$var+set}\"; then | |
24102 + relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" | |
24103 + elif eval var_value=\$$var; test -z "$var_value"; then | |
24104 + relink_command="$var=; export $var; $relink_command" | |
24105 + else | |
24106 + func_quote_for_eval "$var_value" | |
24107 + relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" | |
24108 + fi | |
24109 + done | |
24110 + relink_command="(cd `pwd`; $relink_command)" | |
24111 + relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` | |
24112 + fi | |
24113 + | |
24114 + # Only actually do things if not in dry run mode. | |
24115 + $opt_dry_run || { | |
24116 + # win32 will think the script is a binary if it has | |
24117 + # a .exe suffix, so we strip it off here. | |
24118 + case $output in | |
24119 + *.exe) func_stripname '' '.exe' "$output" | |
24120 + output=$func_stripname_result ;; | |
24121 + esac | |
24122 + # test for cygwin because mv fails w/o .exe extensions | |
24123 + case $host in | |
24124 + *cygwin*) | |
24125 + exeext=.exe | |
24126 + func_stripname '' '.exe' "$outputname" | |
24127 + outputname=$func_stripname_result ;; | |
24128 + *) exeext= ;; | |
24129 + esac | |
24130 + case $host in | |
24131 + *cygwin* | *mingw* ) | |
24132 + func_dirname_and_basename "$output" "" "." | |
24133 + output_name=$func_basename_result | |
24134 + output_path=$func_dirname_result | |
24135 + cwrappersource="$output_path/$objdir/lt-$output_name.c" | |
24136 + cwrapper="$output_path/$output_name.exe" | |
24137 + $RM $cwrappersource $cwrapper | |
24138 + trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 | |
24139 + | |
24140 + func_emit_cwrapperexe_src > $cwrappersource | |
24141 + | |
24142 + # The wrapper executable is built using the $host compiler, | |
24143 + # because it contains $host paths and files. If cross- | |
24144 + # compiling, it, like the target executable, must be | |
24145 + # executed on the $host or under an emulation environment. | |
24146 + $opt_dry_run || { | |
24147 + $LTCC $LTCFLAGS -o $cwrapper $cwrappersource | |
24148 + $STRIP $cwrapper | |
24149 + } | |
24150 + | |
24151 + # Now, create the wrapper script for func_source use: | |
24152 + func_ltwrapper_scriptname $cwrapper | |
24153 + $RM $func_ltwrapper_scriptname_result | |
24154 + trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 | |
24155 + $opt_dry_run || { | |
24156 + # note: this script will not be executed, so do not chmod. | |
24157 + if test "x$build" = "x$host" ; then | |
24158 + $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result | |
24159 + else | |
24160 + func_emit_wrapper no > $func_ltwrapper_scriptname_result | |
24161 + fi | |
24162 + } | |
24163 + ;; | |
24164 + * ) | |
24165 + $RM $output | |
24166 + trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 | |
24167 + | |
24168 + func_emit_wrapper no > $output | |
24169 + chmod +x $output | |
24170 + ;; | |
24171 + esac | |
24172 + } | |
24173 + exit $EXIT_SUCCESS | |
24174 + ;; | |
24175 + esac | |
24176 + | |
24177 + # See if we need to build an old-fashioned archive. | |
24178 + for oldlib in $oldlibs; do | |
24179 + | |
24180 + if test "$build_libtool_libs" = convenience; then | |
24181 + oldobjs="$libobjs_save $symfileobj" | |
24182 + addlibs="$convenience" | |
24183 + build_libtool_libs=no | |
24184 + else | |
24185 + if test "$build_libtool_libs" = module; then | |
24186 + oldobjs="$libobjs_save" | |
24187 + build_libtool_libs=no | |
24188 + else | |
24189 + oldobjs="$old_deplibs $non_pic_objects" | |
24190 + if test "$preload" = yes && test -f "$symfileobj"; then | |
24191 + func_append oldobjs " $symfileobj" | |
24192 + fi | |
24193 + fi | |
24194 + addlibs="$old_convenience" | |
24195 + fi | |
24196 + | |
24197 + if test -n "$addlibs"; then | |
24198 + gentop="$output_objdir/${outputname}x" | |
24199 + func_append generated " $gentop" | |
24200 + | |
24201 + func_extract_archives $gentop $addlibs | |
24202 + func_append oldobjs " $func_extract_archives_result" | |
24203 + fi | |
24204 + | |
24205 + # Do each command in the archive commands. | |
24206 + if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then | |
24207 + cmds=$old_archive_from_new_cmds | |
24208 + else | |
24209 + | |
24210 + # Add any objects from preloaded convenience libraries | |
24211 + if test -n "$dlprefiles"; then | |
24212 + gentop="$output_objdir/${outputname}x" | |
24213 + func_append generated " $gentop" | |
24214 + | |
24215 + func_extract_archives $gentop $dlprefiles | |
24216 + func_append oldobjs " $func_extract_archives_result" | |
24217 + fi | |
24218 + | |
24219 + # POSIX demands no paths to be encoded in archives. We have | |
24220 + # to avoid creating archives with duplicate basenames if we | |
24221 + # might have to extract them afterwards, e.g., when creating a | |
24222 + # static archive out of a convenience library, or when linking | |
24223 + # the entirety of a libtool archive into another (currently | |
24224 + # not supported by libtool). | |
24225 + if (for obj in $oldobjs | |
24226 + do | |
24227 + func_basename "$obj" | |
24228 + $ECHO "$func_basename_result" | |
24229 + done | sort | sort -uc >/dev/null 2>&1); then | |
24230 + : | |
24231 + else | |
24232 + echo "copying selected object files to avoid basename conflicts..." | |
24233 + gentop="$output_objdir/${outputname}x" | |
24234 + func_append generated " $gentop" | |
24235 + func_mkdir_p "$gentop" | |
24236 + save_oldobjs=$oldobjs | |
24237 + oldobjs= | |
24238 + counter=1 | |
24239 + for obj in $save_oldobjs | |
24240 + do | |
24241 + func_basename "$obj" | |
24242 + objbase="$func_basename_result" | |
24243 + case " $oldobjs " in | |
24244 + " ") oldobjs=$obj ;; | |
24245 + *[\ /]"$objbase "*) | |
24246 + while :; do | |
24247 + # Make sure we don't pick an alternate name that also | |
24248 + # overlaps. | |
24249 + newobj=lt$counter-$objbase | |
24250 + func_arith $counter + 1 | |
24251 + counter=$func_arith_result | |
24252 + case " $oldobjs " in | |
24253 + *[\ /]"$newobj "*) ;; | |
24254 + *) if test ! -f "$gentop/$newobj"; then break; fi ;; | |
24255 + esac | |
24256 + done | |
24257 + func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" | |
24258 + func_append oldobjs " $gentop/$newobj" | |
24259 + ;; | |
24260 + *) func_append oldobjs " $obj" ;; | |
24261 + esac | |
24262 + done | |
24263 + fi | |
24264 + func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 | |
24265 + tool_oldlib=$func_to_tool_file_result | |
24266 + eval cmds=\"$old_archive_cmds\" | |
24267 + | |
24268 + func_len " $cmds" | |
24269 + len=$func_len_result | |
24270 + if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then | |
24271 + cmds=$old_archive_cmds | |
24272 + elif test -n "$archiver_list_spec"; then | |
24273 + func_verbose "using command file archive linking..." | |
24274 + for obj in $oldobjs | |
24275 + do | |
24276 + func_to_tool_file "$obj" | |
24277 + $ECHO "$func_to_tool_file_result" | |
24278 + done > $output_objdir/$libname.libcmd | |
24279 + func_to_tool_file "$output_objdir/$libname.libcmd" | |
24280 + oldobjs=" $archiver_list_spec$func_to_tool_file_result" | |
24281 + cmds=$old_archive_cmds | |
24282 + else | |
24283 + # the command line is too long to link in one step, link in parts | |
24284 + func_verbose "using piecewise archive linking..." | |
24285 + save_RANLIB=$RANLIB | |
24286 + RANLIB=: | |
24287 + objlist= | |
24288 + concat_cmds= | |
24289 + save_oldobjs=$oldobjs | |
24290 + oldobjs= | |
24291 + # Is there a better way of finding the last object in the list? | |
24292 + for obj in $save_oldobjs | |
24293 + do | |
24294 + last_oldobj=$obj | |
24295 + done | |
24296 + eval test_cmds=\"$old_archive_cmds\" | |
24297 + func_len " $test_cmds" | |
24298 + len0=$func_len_result | |
24299 + len=$len0 | |
24300 + for obj in $save_oldobjs | |
24301 + do | |
24302 + func_len " $obj" | |
24303 + func_arith $len + $func_len_result | |
24304 + len=$func_arith_result | |
24305 + func_append objlist " $obj" | |
24306 + if test "$len" -lt "$max_cmd_len"; then | |
24307 + : | |
24308 + else | |
24309 + # the above command should be used before it gets too long | |
24310 + oldobjs=$objlist | |
24311 + if test "$obj" = "$last_oldobj" ; then | |
24312 + RANLIB=$save_RANLIB | |
24313 + fi | |
24314 + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ | |
24315 + eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" | |
24316 + objlist= | |
24317 + len=$len0 | |
24318 + fi | |
24319 + done | |
24320 + RANLIB=$save_RANLIB | |
24321 + oldobjs=$objlist | |
24322 + if test "X$oldobjs" = "X" ; then | |
24323 + eval cmds=\"\$concat_cmds\" | |
24324 + else | |
24325 + eval cmds=\"\$concat_cmds~\$old_archive_cmds\" | |
24326 + fi | |
24327 + fi | |
24328 + fi | |
24329 + func_execute_cmds "$cmds" 'exit $?' | |
24330 + done | |
24331 + | |
24332 + test -n "$generated" && \ | |
24333 + func_show_eval "${RM}r$generated" | |
24334 + | |
24335 + # Now create the libtool archive. | |
24336 + case $output in | |
24337 + *.la) | |
24338 + old_library= | |
24339 + test "$build_old_libs" = yes && old_library="$libname.$libext" | |
24340 + func_verbose "creating $output" | |
24341 + | |
24342 + # Preserve any variables that may affect compiler behavior | |
24343 + for var in $variables_saved_for_relink; do | |
24344 + if eval test -z \"\${$var+set}\"; then | |
24345 + relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" | |
24346 + elif eval var_value=\$$var; test -z "$var_value"; then | |
24347 + relink_command="$var=; export $var; $relink_command" | |
24348 + else | |
24349 + func_quote_for_eval "$var_value" | |
24350 + relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" | |
24351 + fi | |
24352 + done | |
24353 + # Quote the link command for shipping. | |
24354 + relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" | |
24355 + relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` | |
24356 + if test "$hardcode_automatic" = yes ; then | |
24357 + relink_command= | |
24358 + fi | |
24359 + | |
24360 + # Only create the output if not a dry run. | |
24361 + $opt_dry_run || { | |
24362 + for installed in no yes; do | |
24363 + if test "$installed" = yes; then | |
24364 + if test -z "$install_libdir"; then | |
24365 + break | |
24366 + fi | |
24367 + output="$output_objdir/$outputname"i | |
24368 + # Replace all uninstalled libtool libraries with the installed ones | |
24369 + newdependency_libs= | |
24370 + for deplib in $dependency_libs; do | |
24371 + case $deplib in | |
24372 + *.la) | |
24373 + func_basename "$deplib" | |
24374 + name="$func_basename_result" | |
24375 + func_resolve_sysroot "$deplib" | |
24376 + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` | |
24377 + test -z "$libdir" && \ | |
24378 + func_fatal_error "\`$deplib' is not a valid libtool archive" | |
24379 + func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" | |
24380 + ;; | |
24381 + -L*) | |
24382 + func_stripname -L '' "$deplib" | |
24383 + func_replace_sysroot "$func_stripname_result" | |
24384 + func_append newdependency_libs " -L$func_replace_sysroot_result" | |
24385 + ;; | |
24386 + -R*) | |
24387 + func_stripname -R '' "$deplib" | |
24388 + func_replace_sysroot "$func_stripname_result" | |
24389 + func_append newdependency_libs " -R$func_replace_sysroot_result" | |
24390 + ;; | |
24391 + *) func_append newdependency_libs " $deplib" ;; | |
24392 + esac | |
24393 + done | |
24394 + dependency_libs="$newdependency_libs" | |
24395 + newdlfiles= | |
24396 + | |
24397 + for lib in $dlfiles; do | |
24398 + case $lib in | |
24399 + *.la) | |
24400 + func_basename "$lib" | |
24401 + name="$func_basename_result" | |
24402 + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` | |
24403 + test -z "$libdir" && \ | |
24404 + func_fatal_error "\`$lib' is not a valid libtool archive" | |
24405 + func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" | |
24406 + ;; | |
24407 + *) func_append newdlfiles " $lib" ;; | |
24408 + esac | |
24409 + done | |
24410 + dlfiles="$newdlfiles" | |
24411 + newdlprefiles= | |
24412 + for lib in $dlprefiles; do | |
24413 + case $lib in | |
24414 + *.la) | |
24415 + # Only pass preopened files to the pseudo-archive (for | |
24416 + # eventual linking with the app. that links it) if we | |
24417 + # didn't already link the preopened objects directly into | |
24418 + # the library: | |
24419 + func_basename "$lib" | |
24420 + name="$func_basename_result" | |
24421 + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` | |
24422 + test -z "$libdir" && \ | |
24423 + func_fatal_error "\`$lib' is not a valid libtool archive" | |
24424 + func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" | |
24425 + ;; | |
24426 + esac | |
24427 + done | |
24428 + dlprefiles="$newdlprefiles" | |
24429 + else | |
24430 + newdlfiles= | |
24431 + for lib in $dlfiles; do | |
24432 + case $lib in | |
24433 + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; | |
24434 + *) abs=`pwd`"/$lib" ;; | |
24435 + esac | |
24436 + func_append newdlfiles " $abs" | |
24437 + done | |
24438 + dlfiles="$newdlfiles" | |
24439 + newdlprefiles= | |
24440 + for lib in $dlprefiles; do | |
24441 + case $lib in | |
24442 + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; | |
24443 + *) abs=`pwd`"/$lib" ;; | |
24444 + esac | |
24445 + func_append newdlprefiles " $abs" | |
24446 + done | |
24447 + dlprefiles="$newdlprefiles" | |
24448 + fi | |
24449 + $RM $output | |
24450 + # place dlname in correct position for cygwin | |
24451 + # In fact, it would be nice if we could use this code for all target | |
24452 + # systems that can't hard-code library paths into their executables | |
24453 + # and that have no shared library path variable independent of PATH, | |
24454 + # but it turns out we can't easily determine that from inspecting | |
24455 + # libtool variables, so we have to hard-code the OSs to which it | |
24456 + # applies here; at the moment, that means platforms that use the PE | |
24457 + # object format with DLL files. See the long comment at the top of | |
24458 + # tests/bindir.at for full details. | |
24459 + tdlname=$dlname | |
24460 + case $host,$output,$installed,$module,$dlname in | |
24461 + *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) | |
24462 + # If a -bindir argument was supplied, place the dll there. | |
24463 + if test "x$bindir" != x ; | |
24464 + then | |
24465 + func_relative_path "$install_libdir" "$bindir" | |
24466 + tdlname=$func_relative_path_result$dlname | |
24467 + else | |
24468 + # Otherwise fall back on heuristic. | |
24469 + tdlname=../bin/$dlname | |
24470 + fi | |
24471 + ;; | |
24472 + esac | |
24473 + $ECHO > $output "\ | |
24474 +# $outputname - a libtool library file | |
24475 +# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION | |
24476 +# | |
24477 +# Please DO NOT delete this file! | |
24478 +# It is necessary for linking the library. | |
24479 + | |
24480 +# The name that we can dlopen(3). | |
24481 +dlname='$tdlname' | |
24482 + | |
24483 +# Names of this library. | |
24484 +library_names='$library_names' | |
24485 + | |
24486 +# The name of the static archive. | |
24487 +old_library='$old_library' | |
24488 + | |
24489 +# Linker flags that can not go in dependency_libs. | |
24490 +inherited_linker_flags='$new_inherited_linker_flags' | |
24491 + | |
24492 +# Libraries that this one depends upon. | |
24493 +dependency_libs='$dependency_libs' | |
24494 + | |
24495 +# Names of additional weak libraries provided by this library | |
24496 +weak_library_names='$weak_libs' | |
24497 + | |
24498 +# Version information for $libname. | |
24499 +current=$current | |
24500 +age=$age | |
24501 +revision=$revision | |
24502 + | |
24503 +# Is this an already installed library? | |
24504 +installed=$installed | |
24505 + | |
24506 +# Should we warn about portability when linking against -modules? | |
24507 +shouldnotlink=$module | |
24508 + | |
24509 +# Files to dlopen/dlpreopen | |
24510 +dlopen='$dlfiles' | |
24511 +dlpreopen='$dlprefiles' | |
24512 + | |
24513 +# Directory that this library needs to be installed in: | |
24514 +libdir='$install_libdir'" | |
24515 + if test "$installed" = no && test "$need_relink" = yes; then | |
24516 + $ECHO >> $output "\ | |
24517 +relink_command=\"$relink_command\"" | |
24518 + fi | |
24519 + done | |
24520 + } | |
24521 + | |
24522 + # Do a symbolic link so that the libtool archive can be found in | |
24523 + # LD_LIBRARY_PATH before the program is installed. | |
24524 + func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' | |
24525 + ;; | |
24526 + esac | |
24527 + exit $EXIT_SUCCESS | |
24528 +} | |
24529 + | |
24530 +{ test "$opt_mode" = link || test "$opt_mode" = relink; } && | |
24531 + func_mode_link ${1+"$@"} | |
24532 + | |
24533 + | |
24534 +# func_mode_uninstall arg... | |
24535 +func_mode_uninstall () | |
24536 +{ | |
24537 + $opt_debug | |
24538 + RM="$nonopt" | |
24539 + files= | |
24540 + rmforce= | |
24541 + exit_status=0 | |
24542 + | |
24543 + # This variable tells wrapper scripts just to set variables rather | |
24544 + # than running their programs. | |
24545 + libtool_install_magic="$magic" | |
24546 + | |
24547 + for arg | |
24548 + do | |
24549 + case $arg in | |
24550 + -f) func_append RM " $arg"; rmforce=yes ;; | |
24551 + -*) func_append RM " $arg" ;; | |
24552 + *) func_append files " $arg" ;; | |
24553 + esac | |
24554 + done | |
24555 + | |
24556 + test -z "$RM" && \ | |
24557 + func_fatal_help "you must specify an RM program" | |
24558 + | |
24559 + rmdirs= | |
24560 + | |
24561 + for file in $files; do | |
24562 + func_dirname "$file" "" "." | |
24563 + dir="$func_dirname_result" | |
24564 + if test "X$dir" = X.; then | |
24565 + odir="$objdir" | |
24566 + else | |
24567 + odir="$dir/$objdir" | |
24568 + fi | |
24569 + func_basename "$file" | |
24570 + name="$func_basename_result" | |
24571 + test "$opt_mode" = uninstall && odir="$dir" | |
24572 + | |
24573 + # Remember odir for removal later, being careful to avoid duplicates | |
24574 + if test "$opt_mode" = clean; then | |
24575 + case " $rmdirs " in | |
24576 + *" $odir "*) ;; | |
24577 + *) func_append rmdirs " $odir" ;; | |
24578 + esac | |
24579 + fi | |
24580 + | |
24581 + # Don't error if the file doesn't exist and rm -f was used. | |
24582 + if { test -L "$file"; } >/dev/null 2>&1 || | |
24583 + { test -h "$file"; } >/dev/null 2>&1 || | |
24584 + test -f "$file"; then | |
24585 + : | |
24586 + elif test -d "$file"; then | |
24587 + exit_status=1 | |
24588 + continue | |
24589 + elif test "$rmforce" = yes; then | |
24590 + continue | |
24591 + fi | |
24592 + | |
24593 + rmfiles="$file" | |
24594 + | |
24595 + case $name in | |
24596 + *.la) | |
24597 + # Possibly a libtool archive, so verify it. | |
24598 + if func_lalib_p "$file"; then | |
24599 + func_source $dir/$name | |
24600 + | |
24601 + # Delete the libtool libraries and symlinks. | |
24602 + for n in $library_names; do | |
24603 + func_append rmfiles " $odir/$n" | |
24604 + done | |
24605 + test -n "$old_library" && func_append rmfiles " $odir/$old_library" | |
24606 + | |
24607 + case "$opt_mode" in | |
24608 + clean) | |
24609 + case " $library_names " in | |
24610 + *" $dlname "*) ;; | |
24611 + *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; | |
24612 + esac | |
24613 + test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" | |
24614 + ;; | |
24615 + uninstall) | |
24616 + if test -n "$library_names"; then | |
24617 + # Do each command in the postuninstall commands. | |
24618 + func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' | |
24619 + fi | |
24620 + | |
24621 + if test -n "$old_library"; then | |
24622 + # Do each command in the old_postuninstall commands. | |
24623 + func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' | |
24624 + fi | |
24625 + # FIXME: should reinstall the best remaining shared library. | |
24626 + ;; | |
24627 + esac | |
24628 + fi | |
24629 + ;; | |
24630 + | |
24631 + *.lo) | |
24632 + # Possibly a libtool object, so verify it. | |
24633 + if func_lalib_p "$file"; then | |
24634 + | |
24635 + # Read the .lo file | |
24636 + func_source $dir/$name | |
24637 + | |
24638 + # Add PIC object to the list of files to remove. | |
24639 + if test -n "$pic_object" && | |
24640 + test "$pic_object" != none; then | |
24641 + func_append rmfiles " $dir/$pic_object" | |
24642 + fi | |
24643 + | |
24644 + # Add non-PIC object to the list of files to remove. | |
24645 + if test -n "$non_pic_object" && | |
24646 + test "$non_pic_object" != none; then | |
24647 + func_append rmfiles " $dir/$non_pic_object" | |
24648 + fi | |
24649 + fi | |
24650 + ;; | |
24651 + | |
24652 + *) | |
24653 + if test "$opt_mode" = clean ; then | |
24654 + noexename=$name | |
24655 + case $file in | |
24656 + *.exe) | |
24657 + func_stripname '' '.exe' "$file" | |
24658 + file=$func_stripname_result | |
24659 + func_stripname '' '.exe' "$name" | |
24660 + noexename=$func_stripname_result | |
24661 + # $file with .exe has already been added to rmfiles, | |
24662 + # add $file without .exe | |
24663 + func_append rmfiles " $file" | |
24664 + ;; | |
24665 + esac | |
24666 + # Do a test to see if this is a libtool program. | |
24667 + if func_ltwrapper_p "$file"; then | |
24668 + if func_ltwrapper_executable_p "$file"; then | |
24669 + func_ltwrapper_scriptname "$file" | |
24670 + relink_command= | |
24671 + func_source $func_ltwrapper_scriptname_result | |
24672 + func_append rmfiles " $func_ltwrapper_scriptname_result" | |
24673 + else | |
24674 + relink_command= | |
24675 + func_source $dir/$noexename | |
24676 + fi | |
24677 + | |
24678 + # note $name still contains .exe if it was in $file originally | |
24679 + # as does the version of $file that was added into $rmfiles | |
24680 + func_append rmfiles " $odir/$name $odir/${name}S.${objext}" | |
24681 + if test "$fast_install" = yes && test -n "$relink_command"; then | |
24682 + func_append rmfiles " $odir/lt-$name" | |
24683 + fi | |
24684 + if test "X$noexename" != "X$name" ; then | |
24685 + func_append rmfiles " $odir/lt-${noexename}.c" | |
24686 + fi | |
24687 + fi | |
24688 + fi | |
24689 + ;; | |
24690 + esac | |
24691 + func_show_eval "$RM $rmfiles" 'exit_status=1' | |
24692 + done | |
24693 + | |
24694 + # Try to remove the ${objdir}s in the directories where we deleted files | |
24695 + for dir in $rmdirs; do | |
24696 + if test -d "$dir"; then | |
24697 + func_show_eval "rmdir $dir >/dev/null 2>&1" | |
24698 + fi | |
24699 + done | |
24700 + | |
24701 + exit $exit_status | |
24702 +} | |
24703 + | |
24704 +{ test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && | |
24705 + func_mode_uninstall ${1+"$@"} | |
24706 + | |
24707 +test -z "$opt_mode" && { | |
24708 + help="$generic_help" | |
24709 + func_fatal_help "you must specify a MODE" | |
24710 +} | |
24711 + | |
24712 +test -z "$exec_cmd" && \ | |
24713 + func_fatal_help "invalid operation mode \`$opt_mode'" | |
24714 + | |
24715 +if test -n "$exec_cmd"; then | |
24716 + eval exec "$exec_cmd" | |
24717 + exit $EXIT_FAILURE | |
24718 +fi | |
24719 + | |
24720 +exit $exit_status | |
24721 + | |
24722 + | |
24723 +# The TAGs below are defined such that we never get into a situation | |
24724 +# in which we disable both kinds of libraries. Given conflicting | |
24725 +# choices, we go for a static library, that is the most portable, | |
24726 +# since we can't tell whether shared libraries were disabled because | |
24727 +# the user asked for that or because the platform doesn't support | |
24728 +# them. This is particularly important on AIX, because we don't | |
24729 +# support having both static and shared libraries enabled at the same | |
24730 +# time on that platform, so we default to a shared-only configuration. | |
24731 +# If a disable-shared tag is given, we'll fallback to a static-only | |
24732 +# configuration. But we'll never go from static-only to shared-only. | |
24733 + | |
24734 +# ### BEGIN LIBTOOL TAG CONFIG: disable-shared | |
24735 +build_libtool_libs=no | |
24736 +build_old_libs=yes | |
24737 +# ### END LIBTOOL TAG CONFIG: disable-shared | |
24738 + | |
24739 +# ### BEGIN LIBTOOL TAG CONFIG: disable-static | |
24740 +build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` | |
24741 +# ### END LIBTOOL TAG CONFIG: disable-static | |
24742 + | |
24743 +# Local Variables: | |
24744 +# mode:shell-script | |
24745 +# sh-indentation:2 | |
24746 +# End: | |
24747 +# vi:sw=2 | |
24748 + | |
24749 diff -uNr a/Makefile.am b/Makefile.am | |
24750 --- a/Makefile.am 1969-12-31 19:00:00.000000000 -0500 | |
24751 +++ b/Makefile.am 2014-12-12 14:58:08.449959961 -0500 | |
24752 @@ -0,0 +1,5 @@ | |
24753 +lib_LTLIBRARIES = libgl2ps.la | |
24754 + | |
24755 +libgl2ps_la_SOURCES = gl2ps.c | |
24756 + | |
24757 +include_HEADERS = gl2ps.h | |
24758 diff -uNr a/missing b/missing | |
24759 --- a/missing 1969-12-31 19:00:00.000000000 -0500 | |
24760 +++ b/missing 2014-12-12 15:22:27.598240211 -0500 | |
24761 @@ -0,0 +1,215 @@ | |
24762 +#! /bin/sh | |
24763 +# Common wrapper for a few potentially missing GNU programs. | |
24764 + | |
24765 +scriptversion=2013-10-28.13; # UTC | |
24766 + | |
24767 +# Copyright (C) 1996-2013 Free Software Foundation, Inc. | |
24768 +# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. | |
24769 + | |
24770 +# This program is free software; you can redistribute it and/or modify | |
24771 +# it under the terms of the GNU General Public License as published by | |
24772 +# the Free Software Foundation; either version 2, or (at your option) | |
24773 +# any later version. | |
24774 + | |
24775 +# This program is distributed in the hope that it will be useful, | |
24776 +# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
24777 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
24778 +# GNU General Public License for more details. | |
24779 + | |
24780 +# You should have received a copy of the GNU General Public License | |
24781 +# along with this program. If not, see <http://www.gnu.org/licenses/>. | |
24782 + | |
24783 +# As a special exception to the GNU General Public License, if you | |
24784 +# distribute this file as part of a program that contains a | |
24785 +# configuration script generated by Autoconf, you may include it under | |
24786 +# the same distribution terms that you use for the rest of that program. | |
24787 + | |
24788 +if test $# -eq 0; then | |
24789 + echo 1>&2 "Try '$0 --help' for more information" | |
24790 + exit 1 | |
24791 +fi | |
24792 + | |
24793 +case $1 in | |
24794 + | |
24795 + --is-lightweight) | |
24796 + # Used by our autoconf macros to check whether the available missing | |
24797 + # script is modern enough. | |
24798 + exit 0 | |
24799 + ;; | |
24800 + | |
24801 + --run) | |
24802 + # Back-compat with the calling convention used by older automake. | |
24803 + shift | |
24804 + ;; | |
24805 + | |
24806 + -h|--h|--he|--hel|--help) | |
24807 + echo "\ | |
24808 +$0 [OPTION]... PROGRAM [ARGUMENT]... | |
24809 + | |
24810 +Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due | |
24811 +to PROGRAM being missing or too old. | |
24812 + | |
24813 +Options: | |
24814 + -h, --help display this help and exit | |
24815 + -v, --version output version information and exit | |
24816 + | |
24817 +Supported PROGRAM values: | |
24818 + aclocal autoconf autoheader autom4te automake makeinfo | |
24819 + bison yacc flex lex help2man | |
24820 + | |
24821 +Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and | |
24822 +'g' are ignored when checking the name. | |
24823 + | |
24824 +Send bug reports to <bug-automake@gnu.org>." | |
24825 + exit $? | |
24826 + ;; | |
24827 + | |
24828 + -v|--v|--ve|--ver|--vers|--versi|--versio|--version) | |
24829 + echo "missing $scriptversion (GNU Automake)" | |
24830 + exit $? | |
24831 + ;; | |
24832 + | |
24833 + -*) | |
24834 + echo 1>&2 "$0: unknown '$1' option" | |
24835 + echo 1>&2 "Try '$0 --help' for more information" | |
24836 + exit 1 | |
24837 + ;; | |
24838 + | |
24839 +esac | |
24840 + | |
24841 +# Run the given program, remember its exit status. | |
24842 +"$@"; st=$? | |
24843 + | |
24844 +# If it succeeded, we are done. | |
24845 +test $st -eq 0 && exit 0 | |
24846 + | |
24847 +# Also exit now if we it failed (or wasn't found), and '--version' was | |
24848 +# passed; such an option is passed most likely to detect whether the | |
24849 +# program is present and works. | |
24850 +case $2 in --version|--help) exit $st;; esac | |
24851 + | |
24852 +# Exit code 63 means version mismatch. This often happens when the user | |
24853 +# tries to use an ancient version of a tool on a file that requires a | |
24854 +# minimum version. | |
24855 +if test $st -eq 63; then | |
24856 + msg="probably too old" | |
24857 +elif test $st -eq 127; then | |
24858 + # Program was missing. | |
24859 + msg="missing on your system" | |
24860 +else | |
24861 + # Program was found and executed, but failed. Give up. | |
24862 + exit $st | |
24863 +fi | |
24864 + | |
24865 +perl_URL=http://www.perl.org/ | |
24866 +flex_URL=http://flex.sourceforge.net/ | |
24867 +gnu_software_URL=http://www.gnu.org/software | |
24868 + | |
24869 +program_details () | |
24870 +{ | |
24871 + case $1 in | |
24872 + aclocal|automake) | |
24873 + echo "The '$1' program is part of the GNU Automake package:" | |
24874 + echo "<$gnu_software_URL/automake>" | |
24875 + echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" | |
24876 + echo "<$gnu_software_URL/autoconf>" | |
24877 + echo "<$gnu_software_URL/m4/>" | |
24878 + echo "<$perl_URL>" | |
24879 + ;; | |
24880 + autoconf|autom4te|autoheader) | |
24881 + echo "The '$1' program is part of the GNU Autoconf package:" | |
24882 + echo "<$gnu_software_URL/autoconf/>" | |
24883 + echo "It also requires GNU m4 and Perl in order to run:" | |
24884 + echo "<$gnu_software_URL/m4/>" | |
24885 + echo "<$perl_URL>" | |
24886 + ;; | |
24887 + esac | |
24888 +} | |
24889 + | |
24890 +give_advice () | |
24891 +{ | |
24892 + # Normalize program name to check for. | |
24893 + normalized_program=`echo "$1" | sed ' | |
24894 + s/^gnu-//; t | |
24895 + s/^gnu//; t | |
24896 + s/^g//; t'` | |
24897 + | |
24898 + printf '%s\n' "'$1' is $msg." | |
24899 + | |
24900 + configure_deps="'configure.ac' or m4 files included by 'configure.ac'" | |
24901 + case $normalized_program in | |
24902 + autoconf*) | |
24903 + echo "You should only need it if you modified 'configure.ac'," | |
24904 + echo "or m4 files included by it." | |
24905 + program_details 'autoconf' | |
24906 + ;; | |
24907 + autoheader*) | |
24908 + echo "You should only need it if you modified 'acconfig.h' or" | |
24909 + echo "$configure_deps." | |
24910 + program_details 'autoheader' | |
24911 + ;; | |
24912 + automake*) | |
24913 + echo "You should only need it if you modified 'Makefile.am' or" | |
24914 + echo "$configure_deps." | |
24915 + program_details 'automake' | |
24916 + ;; | |
24917 + aclocal*) | |
24918 + echo "You should only need it if you modified 'acinclude.m4' or" | |
24919 + echo "$configure_deps." | |
24920 + program_details 'aclocal' | |
24921 + ;; | |
24922 + autom4te*) | |
24923 + echo "You might have modified some maintainer files that require" | |
24924 + echo "the 'autom4te' program to be rebuilt." | |
24925 + program_details 'autom4te' | |
24926 + ;; | |
24927 + bison*|yacc*) | |
24928 + echo "You should only need it if you modified a '.y' file." | |
24929 + echo "You may want to install the GNU Bison package:" | |
24930 + echo "<$gnu_software_URL/bison/>" | |
24931 + ;; | |
24932 + lex*|flex*) | |
24933 + echo "You should only need it if you modified a '.l' file." | |
24934 + echo "You may want to install the Fast Lexical Analyzer package:" | |
24935 + echo "<$flex_URL>" | |
24936 + ;; | |
24937 + help2man*) | |
24938 + echo "You should only need it if you modified a dependency" \ | |
24939 + "of a man page." | |
24940 + echo "You may want to install the GNU Help2man package:" | |
24941 + echo "<$gnu_software_URL/help2man/>" | |
24942 + ;; | |
24943 + makeinfo*) | |
24944 + echo "You should only need it if you modified a '.texi' file, or" | |
24945 + echo "any other file indirectly affecting the aspect of the manual." | |
24946 + echo "You might want to install the Texinfo package:" | |
24947 + echo "<$gnu_software_URL/texinfo/>" | |
24948 + echo "The spurious makeinfo call might also be the consequence of" | |
24949 + echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" | |
24950 + echo "want to install GNU make:" | |
24951 + echo "<$gnu_software_URL/make/>" | |
24952 + ;; | |
24953 + *) | |
24954 + echo "You might have modified some files without having the proper" | |
24955 + echo "tools for further handling them. Check the 'README' file, it" | |
24956 + echo "often tells you about the needed prerequisites for installing" | |
24957 + echo "this package. You may also peek at any GNU archive site, in" | |
24958 + echo "case some other package contains this missing '$1' program." | |
24959 + ;; | |
24960 + esac | |
24961 +} | |
24962 + | |
24963 +give_advice "$1" | sed -e '1s/^/WARNING: /' \ | |
24964 + -e '2,$s/^/ /' >&2 | |
24965 + | |
24966 +# Propagate the correct exit status (expected to be 127 for a program | |
24967 +# not found, 63 for a program that failed due to version mismatch). | |
24968 +exit $st | |
24969 + | |
24970 +# Local variables: | |
24971 +# eval: (add-hook 'write-file-hooks 'time-stamp) | |
24972 +# time-stamp-start: "scriptversion=" | |
24973 +# time-stamp-format: "%:y-%02m-%02d.%02H" | |
24974 +# time-stamp-time-zone: "UTC" | |
24975 +# time-stamp-end: "; # UTC" | |
24976 +# End: | |
24977 diff -uNr a/NEWS b/NEWS | |
24978 --- a/NEWS 1969-12-31 19:00:00.000000000 -0500 | |
24979 +++ b/NEWS 2014-12-12 15:59:32.605606679 -0500 | |
24980 @@ -0,0 +1 @@ | |
24981 + | |
24982 diff -uNr a/README b/README | |
24983 --- a/README 1969-12-31 19:00:00.000000000 -0500 | |
24984 +++ b/README 2014-12-12 15:59:32.605606679 -0500 | |
24985 @@ -0,0 +1 @@ | |
24986 + |