Debian Codegraph @

m4/libtool.m4

raw
1 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
2 #
3 # Copyright (C) 1996-2001, 2003-2019, 2021-2024 Free Software
4 # Foundation, Inc.
5 # Written by Gordon Matzigkeit, 1996
6 #
7 # This file is free software; the Free Software Foundation gives
8 # unlimited permission to copy and/or distribute it, with or without
9 # modifications, as long as this notice is preserved.
10
11 m4_define([_LT_COPYING], [dnl
12 # Copyright (C) 2024 Free Software Foundation, Inc.
13 # This is free software; see the source for copying conditions. There is NO
14 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15
16 # GNU Libtool is free software; you can redistribute it and/or modify
17 # it under the terms of the GNU General Public License as published by
18 # the Free Software Foundation; either version 2 of the License, or
19 # (at your option) any later version.
20 #
21 # As a special exception to the GNU General Public License, if you
22 # distribute this file as part of a program or library that is built
23 # using GNU Libtool, you may include this file under the same
24 # distribution terms that you use for the rest of that program.
25 #
26 # GNU Libtool is distributed in the hope that it will be useful, but
27 # WITHOUT ANY WARRANTY; without even the implied warranty of
28 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29 # GNU General Public License for more details.
30 #
31 # You should have received a copy of the GNU General Public License
32 # along with this program. If not, see <http://www.gnu.org/licenses/>.
33 ])
34
35 # serial 63 LT_INIT
36
37
38 # LT_PREREQ(VERSION)
39 # ------------------
40 # Complain and exit if this libtool version is less that VERSION.
41 m4_defun([LT_PREREQ],
42 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
43 [m4_default([$3],
44 [m4_fatal([Libtool version $1 or higher is required],
45 63)])],
46 [$2])])
47
48
49 # _LT_CHECK_BUILDDIR
50 # ------------------
51 # Complain if the absolute build directory name contains unusual characters
52 m4_defun([_LT_CHECK_BUILDDIR],
53 [case `pwd` in
54 *\ * | *\ *)
55 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
56 esac
57 ])
58
59
60 # LT_INIT([OPTIONS])
61 # ------------------
62 AC_DEFUN([LT_INIT],
63 [AC_PREREQ([2.64])dnl We use AC_PATH_PROGS_FEATURE_CHECK
64 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
65 AC_BEFORE([$0], [LT_LANG])dnl
66 AC_BEFORE([$0], [LT_OUTPUT])dnl
67 AC_BEFORE([$0], [LTDL_INIT])dnl
68 m4_require([_LT_CHECK_BUILDDIR])dnl
69
70 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
71 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
72 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
73 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
74 dnl unless we require an AC_DEFUNed macro:
75 AC_REQUIRE([LTOPTIONS_VERSION])dnl
76 AC_REQUIRE([LTSUGAR_VERSION])dnl
77 AC_REQUIRE([LTVERSION_VERSION])dnl
78 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
79 m4_require([_LT_PROG_LTMAIN])dnl
80
81 _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
82
83 dnl Parse OPTIONS
84 _LT_SET_OPTIONS([$0], [$1])
85
86 # This can be used to rebuild libtool when needed
87 LIBTOOL_DEPS=$ltmain
88
89 # Always use our own libtool.
90 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
91 AC_SUBST(LIBTOOL)dnl
92
93 _LT_SETUP
94
95 # Only expand once:
96 m4_define([LT_INIT])
97 ])# LT_INIT
98
99 # Old names:
100 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
101 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
102 dnl aclocal-1.4 backwards compatibility:
103 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
104 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
105
106
107 # _LT_PREPARE_CC_BASENAME
108 # -----------------------
109 m4_defun([_LT_PREPARE_CC_BASENAME], [
110 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
111 func_cc_basename ()
112 {
113 for cc_temp in @S|@*""; do
114 case $cc_temp in
115 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
116 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
117 \-*) ;;
118 *) break;;
119 esac
120 done
121 func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
122 }
123 ])# _LT_PREPARE_CC_BASENAME
124
125
126 # _LT_CC_BASENAME(CC)
127 # -------------------
128 # It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
129 # but that macro is also expanded into generated libtool script, which
130 # arranges for $SED and $ECHO to be set by different means.
131 m4_defun([_LT_CC_BASENAME],
132 [m4_require([_LT_PREPARE_CC_BASENAME])dnl
133 AC_REQUIRE([_LT_DECL_SED])dnl
134 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
135 func_cc_basename $1
136 cc_basename=$func_cc_basename_result
137 ])
138
139
140 # _LT_FILEUTILS_DEFAULTS
141 # ----------------------
142 # It is okay to use these file commands and assume they have been set
143 # sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
144 m4_defun([_LT_FILEUTILS_DEFAULTS],
145 [: ${CP="cp -f"}
146 : ${MV="mv -f"}
147 : ${RM="rm -f"}
148 ])# _LT_FILEUTILS_DEFAULTS
149
150
151 # _LT_SETUP
152 # ---------
153 m4_defun([_LT_SETUP],
154 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
155 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
156 AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
157 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
158
159 _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
160 dnl
161 _LT_DECL([], [host_alias], [0], [The host system])dnl
162 _LT_DECL([], [host], [0])dnl
163 _LT_DECL([], [host_os], [0])dnl
164 dnl
165 _LT_DECL([], [build_alias], [0], [The build system])dnl
166 _LT_DECL([], [build], [0])dnl
167 _LT_DECL([], [build_os], [0])dnl
168 dnl
169 AC_REQUIRE([AC_PROG_CC])dnl
170 AC_REQUIRE([LT_PATH_LD])dnl
171 AC_REQUIRE([LT_PATH_NM])dnl
172 dnl
173 AC_REQUIRE([AC_PROG_LN_S])dnl
174 test -z "$LN_S" && LN_S="ln -s"
175 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
176 dnl
177 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
178 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
179 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
180 dnl
181 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
182 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
183 m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
184 m4_require([_LT_CMD_RELOAD])dnl
185 m4_require([_LT_DECL_FILECMD])dnl
186 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
187 m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
188 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
189 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
190 m4_require([_LT_WITH_SYSROOT])dnl
191 m4_require([_LT_CMD_TRUNCATE])dnl
192
193 _LT_CONFIG_LIBTOOL_INIT([
194 # See if we are running on zsh, and set the options that allow our
195 # commands through without removal of \ escapes INIT.
196 if test -n "\${ZSH_VERSION+set}"; then
197 setopt NO_GLOB_SUBST
198 fi
199 ])
200 if test -n "${ZSH_VERSION+set}"; then
201 setopt NO_GLOB_SUBST
202 fi
203
204 _LT_CHECK_OBJDIR
205
206 m4_require([_LT_TAG_COMPILER])dnl
207
208 case $host_os in
209 aix3*)
210 # AIX sometimes has problems with the GCC collect2 program. For some
211 # reason, if we set the COLLECT_NAMES environment variable, the problems
212 # vanish in a puff of smoke.
213 if test set != "${COLLECT_NAMES+set}"; then
214 COLLECT_NAMES=
215 export COLLECT_NAMES
216 fi
217 ;;
218 esac
219
220 # Global variables:
221 ofile=libtool
222 can_build_shared=yes
223
224 # All known linkers require a '.a' archive for static linking (except MSVC and
225 # ICC, which need '.lib').
226 libext=a
227
228 with_gnu_ld=$lt_cv_prog_gnu_ld
229
230 old_CC=$CC
231 old_CFLAGS=$CFLAGS
232
233 # Set sane defaults for various variables
234 test -z "$CC" && CC=cc
235 test -z "$LTCC" && LTCC=$CC
236 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
237 test -z "$LD" && LD=ld
238 test -z "$ac_objext" && ac_objext=o
239
240 _LT_CC_BASENAME([$compiler])
241
242 # Only perform the check for file, if the check method requires it
243 test -z "$MAGIC_CMD" && MAGIC_CMD=file
244 case $deplibs_check_method in
245 file_magic*)
246 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
247 _LT_PATH_MAGIC
248 fi
249 ;;
250 esac
251
252 # Use C for the default configuration in the libtool script
253 LT_SUPPORTED_TAG([CC])
254 _LT_LANG_C_CONFIG
255 _LT_LANG_DEFAULT_CONFIG
256 _LT_CONFIG_COMMANDS
257 ])# _LT_SETUP
258
259
260 # _LT_PREPARE_SED_QUOTE_VARS
261 # --------------------------
262 # Define a few sed substitution that help us do robust quoting.
263 m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
264 [# Backslashify metacharacters that are still active within
265 # double-quoted strings.
266 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
267
268 # Same as above, but do not quote variable references.
269 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
270
271 # Sed substitution to delay expansion of an escaped shell variable in a
272 # double_quote_subst'ed string.
273 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
274
275 # Sed substitution to delay expansion of an escaped single quote.
276 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
277
278 # Sed substitution to avoid accidental globbing in evaled expressions
279 no_glob_subst='s/\*/\\\*/g'
280 ])
281
282 # _LT_PROG_LTMAIN
283 # ---------------
284 # Note that this code is called both from 'configure', and 'config.status'
285 # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
286 # 'config.status' has no value for ac_aux_dir unless we are using Automake,
287 # so we pass a copy along to make sure it has a sensible value anyway.
288 m4_defun([_LT_PROG_LTMAIN],
289 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
290 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
291 ltmain=$ac_aux_dir/ltmain.sh
292 ])# _LT_PROG_LTMAIN
293
294
295 ## ------------------------------------- ##
296 ## Accumulate code for creating libtool. ##
297 ## ------------------------------------- ##
298
299 # So that we can recreate a full libtool script including additional
300 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
301 # in macros and then make a single call at the end using the 'libtool'
302 # label.
303
304
305 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
306 # ----------------------------------------
307 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
308 m4_define([_LT_CONFIG_LIBTOOL_INIT],
309 [m4_ifval([$1],
310 [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
311 [$1
312 ])])])
313
314 # Initialize.
315 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
316
317
318 # _LT_CONFIG_LIBTOOL([COMMANDS])
319 # ------------------------------
320 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
321 m4_define([_LT_CONFIG_LIBTOOL],
322 [m4_ifval([$1],
323 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
324 [$1
325 ])])])
326
327 # Initialize.
328 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
329
330
331 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
332 # -----------------------------------------------------
333 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
334 [_LT_CONFIG_LIBTOOL([$1])
335 _LT_CONFIG_LIBTOOL_INIT([$2])
336 ])
337
338
339 # _LT_FORMAT_COMMENT([COMMENT])
340 # -----------------------------
341 # Add leading comment marks to the start of each line, and a trailing
342 # full-stop to the whole comment if one is not present already.
343 m4_define([_LT_FORMAT_COMMENT],
344 [m4_ifval([$1], [
345 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
346 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
347 )])
348
349
350
351 ## ------------------------ ##
352 ## FIXME: Eliminate VARNAME ##
353 ## ------------------------ ##
354
355
356 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
357 # -------------------------------------------------------------------
358 # CONFIGNAME is the name given to the value in the libtool script.
359 # VARNAME is the (base) name used in the configure script.
360 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
361 # VARNAME. Any other value will be used directly.
362 m4_define([_LT_DECL],
363 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
364 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
365 [m4_ifval([$1], [$1], [$2])])
366 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
367 m4_ifval([$4],
368 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
369 lt_dict_add_subkey([lt_decl_dict], [$2],
370 [tagged?], [m4_ifval([$5], [yes], [no])])])
371 ])
372
373
374 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
375 # --------------------------------------------------------
376 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
377
378
379 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
380 # ------------------------------------------------
381 m4_define([lt_decl_tag_varnames],
382 [_lt_decl_filter([tagged?], [yes], $@)])
383
384
385 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
386 # ---------------------------------------------------------
387 m4_define([_lt_decl_filter],
388 [m4_case([$#],
389 [0], [m4_fatal([$0: too few arguments: $#])],
390 [1], [m4_fatal([$0: too few arguments: $#: $1])],
391 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
392 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
393 [lt_dict_filter([lt_decl_dict], $@)])[]dnl
394 ])
395
396
397 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
398 # --------------------------------------------------
399 m4_define([lt_decl_quote_varnames],
400 [_lt_decl_filter([value], [1], $@)])
401
402
403 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
404 # ---------------------------------------------------
405 m4_define([lt_decl_dquote_varnames],
406 [_lt_decl_filter([value], [2], $@)])
407
408
409 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
410 # ---------------------------------------------------
411 m4_define([lt_decl_varnames_tagged],
412 [m4_assert([$# <= 2])dnl
413 _$0(m4_quote(m4_default([$1], [[, ]])),
414 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
415 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
416 m4_define([_lt_decl_varnames_tagged],
417 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
418
419
420 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
421 # ------------------------------------------------
422 m4_define([lt_decl_all_varnames],
423 [_$0(m4_quote(m4_default([$1], [[, ]])),
424 m4_if([$2], [],
425 m4_quote(lt_decl_varnames),
426 m4_quote(m4_shift($@))))[]dnl
427 ])
428 m4_define([_lt_decl_all_varnames],
429 [lt_join($@, lt_decl_varnames_tagged([$1],
430 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
431 ])
432
433
434 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
435 # ------------------------------------
436 # Quote a variable value, and forward it to 'config.status' so that its
437 # declaration there will have the same value as in 'configure'. VARNAME
438 # must have a single quote delimited value for this to work.
439 m4_define([_LT_CONFIG_STATUS_DECLARE],
440 [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
441
442
443 # _LT_CONFIG_STATUS_DECLARATIONS
444 # ------------------------------
445 # We delimit libtool config variables with single quotes, so when
446 # we write them to config.status, we have to be sure to quote all
447 # embedded single quotes properly. In configure, this macro expands
448 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
449 #
450 # <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
451 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
452 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
453 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
454
455
456 # _LT_LIBTOOL_TAGS
457 # ----------------
458 # Output comment and list of tags supported by the script
459 m4_defun([_LT_LIBTOOL_TAGS],
460 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
461 available_tags='_LT_TAGS'dnl
462 ])
463
464
465 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
466 # -----------------------------------
467 # Extract the dictionary values for VARNAME (optionally with TAG) and
468 # expand to a commented shell variable setting:
469 #
470 # # Some comment about what VAR is for.
471 # visible_name=$lt_internal_name
472 m4_define([_LT_LIBTOOL_DECLARE],
473 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
474 [description])))[]dnl
475 m4_pushdef([_libtool_name],
476 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
477 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
478 [0], [_libtool_name=[$]$1],
479 [1], [_libtool_name=$lt_[]$1],
480 [2], [_libtool_name=$lt_[]$1],
481 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
482 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
483 ])
484
485
486 # _LT_LIBTOOL_CONFIG_VARS
487 # -----------------------
488 # Produce commented declarations of non-tagged libtool config variables
489 # suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
490 # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
491 # section) are produced by _LT_LIBTOOL_TAG_VARS.
492 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
493 [m4_foreach([_lt_var],
494 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
495 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
496
497
498 # _LT_LIBTOOL_TAG_VARS(TAG)
499 # -------------------------
500 m4_define([_LT_LIBTOOL_TAG_VARS],
501 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
502 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
503
504
505 # _LT_TAGVAR(VARNAME, [TAGNAME])
506 # ------------------------------
507 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
508
509
510 # _LT_CONFIG_COMMANDS
511 # -------------------
512 # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
513 # variables for single and double quote escaping we saved from calls
514 # to _LT_DECL, we can put quote escaped variables declarations
515 # into 'config.status', and then the shell code to quote escape them in
516 # for loops in 'config.status'. Finally, any additional code accumulated
517 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
518 m4_defun([_LT_CONFIG_COMMANDS],
519 [AC_PROVIDE_IFELSE([LT_OUTPUT],
520 dnl If the libtool generation code has been placed in $CONFIG_LT,
521 dnl instead of duplicating it all over again into config.status,
522 dnl then we will have config.status run $CONFIG_LT later, so it
523 dnl needs to know what name is stored there:
524 [AC_CONFIG_COMMANDS([libtool],
525 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
526 dnl If the libtool generation code is destined for config.status,
527 dnl expand the accumulated commands and init code now:
528 [AC_CONFIG_COMMANDS([libtool],
529 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
530 ])#_LT_CONFIG_COMMANDS
531
532
533 # Initialize.
534 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
535 [
536
537 # The HP-UX ksh and POSIX shell print the target directory to stdout
538 # if CDPATH is set.
539 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
540
541 sed_quote_subst='$sed_quote_subst'
542 double_quote_subst='$double_quote_subst'
543 delay_variable_subst='$delay_variable_subst'
544 _LT_CONFIG_STATUS_DECLARATIONS
545 LTCC='$LTCC'
546 LTCFLAGS='$LTCFLAGS'
547 compiler='$compiler_DEFAULT'
548
549 # A function that is used when there is no print builtin or printf.
550 func_fallback_echo ()
551 {
552 eval 'cat <<_LTECHO_EOF
553 \$[]1
554 _LTECHO_EOF'
555 }
556
557 # Quote evaled strings.
558 for var in lt_decl_all_varnames([[ \
559 ]], lt_decl_quote_varnames); do
560 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
561 *[[\\\\\\\`\\"\\\$]]*)
562 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
563 ;;
564 *)
565 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
566 ;;
567 esac
568 done
569
570 # Double-quote double-evaled strings.
571 for var in lt_decl_all_varnames([[ \
572 ]], lt_decl_dquote_varnames); do
573 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
574 *[[\\\\\\\`\\"\\\$]]*)
575 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
576 ;;
577 *)
578 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
579 ;;
580 esac
581 done
582
583 _LT_OUTPUT_LIBTOOL_INIT
584 ])
585
586 # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
587 # ------------------------------------
588 # Generate a child script FILE with all initialization necessary to
589 # reuse the environment learned by the parent script, and make the
590 # file executable. If COMMENT is supplied, it is inserted after the
591 # '#!' sequence but before initialization text begins. After this
592 # macro, additional text can be appended to FILE to form the body of
593 # the child script. The macro ends with non-zero status if the
594 # file could not be fully written (such as if the disk is full).
595 m4_ifdef([AS_INIT_GENERATED],
596 [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
597 [m4_defun([_LT_GENERATED_FILE_INIT],
598 [m4_require([AS_PREPARE])]dnl
599 [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
600 [lt_write_fail=0
601 cat >$1 <<_ASEOF || lt_write_fail=1
602 #! $SHELL
603 # Generated by $as_me.
604 $2
605 SHELL=\${CONFIG_SHELL-$SHELL}
606 export SHELL
607 _ASEOF
608 cat >>$1 <<\_ASEOF || lt_write_fail=1
609 AS_SHELL_SANITIZE
610 _AS_PREPARE
611 exec AS_MESSAGE_FD>&1
612 _ASEOF
613 test 0 = "$lt_write_fail" && chmod +x $1[]dnl
614 m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
615
616 # LT_OUTPUT
617 # ---------
618 # This macro allows early generation of the libtool script (before
619 # AC_OUTPUT is called), in case it is used in configure for compilation
620 # tests.
621 AC_DEFUN([LT_OUTPUT],
622 [: ${CONFIG_LT=./config.lt}
623 AC_MSG_NOTICE([creating $CONFIG_LT])
624 _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
625 [# Run this file to recreate a libtool stub with the current configuration.])
626
627 cat >>"$CONFIG_LT" <<\_LTEOF
628 lt_cl_silent=false
629 exec AS_MESSAGE_LOG_FD>>config.log
630 {
631 echo
632 AS_BOX([Running $as_me.])
633 } >&AS_MESSAGE_LOG_FD
634
635 lt_cl_help="\
636 '$as_me' creates a local libtool stub from the current configuration,
637 for use in further configure time tests before the real libtool is
638 generated.
639
640 Usage: $[0] [[OPTIONS]]
641
642 -h, --help print this help, then exit
643 -V, --version print version number, then exit
644 -q, --quiet do not print progress messages
645 -d, --debug don't remove temporary files
646
647 Report bugs to <[email protected]>."
648
649 lt_cl_version="\
650 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
651 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
652 configured by $[0], generated by m4_PACKAGE_STRING.
653
654 Copyright (C) 2024 Free Software Foundation, Inc.
655 This config.lt script is free software; the Free Software Foundation
656 gives unlimited permission to copy, distribute and modify it."
657
658 while test 0 != $[#]
659 do
660 case $[1] in
661 --version | --v* | -V )
662 echo "$lt_cl_version"; exit 0 ;;
663 --help | --h* | -h )
664 echo "$lt_cl_help"; exit 0 ;;
665 --debug | --d* | -d )
666 debug=: ;;
667 --quiet | --q* | --silent | --s* | -q )
668 lt_cl_silent=: ;;
669
670 -*) AC_MSG_ERROR([unrecognized option: $[1]
671 Try '$[0] --help' for more information.]) ;;
672
673 *) AC_MSG_ERROR([unrecognized argument: $[1]
674 Try '$[0] --help' for more information.]) ;;
675 esac
676 shift
677 done
678
679 if $lt_cl_silent; then
680 exec AS_MESSAGE_FD>/dev/null
681 fi
682 _LTEOF
683
684 cat >>"$CONFIG_LT" <<_LTEOF
685 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
686 _LTEOF
687
688 cat >>"$CONFIG_LT" <<\_LTEOF
689 AC_MSG_NOTICE([creating $ofile])
690 _LT_OUTPUT_LIBTOOL_COMMANDS
691 AS_EXIT(0)
692 _LTEOF
693 chmod +x "$CONFIG_LT"
694
695 # configure is writing to config.log, but config.lt does its own redirection,
696 # appending to config.log, which fails on DOS, as config.log is still kept
697 # open by configure. Here we exec the FD to /dev/null, effectively closing
698 # config.log, so it can be properly (re)opened and appended to by config.lt.
699 lt_cl_success=:
700 test yes = "$silent" &&
701 lt_config_lt_args="$lt_config_lt_args --quiet"
702 exec AS_MESSAGE_LOG_FD>/dev/null
703 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
704 exec AS_MESSAGE_LOG_FD>>config.log
705 $lt_cl_success || AS_EXIT(1)
706 ])# LT_OUTPUT
707
708
709 # _LT_CONFIG(TAG)
710 # ---------------
711 # If TAG is the built-in tag, create an initial libtool script with a
712 # default configuration from the untagged config vars. Otherwise add code
713 # to config.status for appending the configuration named by TAG from the
714 # matching tagged config vars.
715 m4_defun([_LT_CONFIG],
716 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
717 _LT_CONFIG_SAVE_COMMANDS([
718 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
719 m4_if(_LT_TAG, [C], [
720 # See if we are running on zsh, and set the options that allow our
721 # commands through without removal of \ escapes.
722 if test -n "${ZSH_VERSION+set}"; then
723 setopt NO_GLOB_SUBST
724 fi
725
726 cfgfile=${ofile}T
727 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
728 $RM "$cfgfile"
729
730 cat <<_LT_EOF >> "$cfgfile"
731 #! $SHELL
732 # Generated automatically by $as_me ($PACKAGE) $VERSION
733 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
734
735 # Provide generalized library-building support services.
736 # Written by Gordon Matzigkeit, 1996
737
738 _LT_COPYING
739 _LT_LIBTOOL_TAGS
740
741 # Configured defaults for sys_lib_dlsearch_path munging.
742 : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
743
744 # ### BEGIN LIBTOOL CONFIG
745 _LT_LIBTOOL_CONFIG_VARS
746 _LT_LIBTOOL_TAG_VARS
747 # ### END LIBTOOL CONFIG
748
749 _LT_EOF
750
751 cat <<'_LT_EOF' >> "$cfgfile"
752
753 # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
754
755 _LT_PREPARE_MUNGE_PATH_LIST
756 _LT_PREPARE_CC_BASENAME
757
758 # ### END FUNCTIONS SHARED WITH CONFIGURE
759
760 _LT_EOF
761
762 case $host_os in
763 aix3*)
764 cat <<\_LT_EOF >> "$cfgfile"
765 # AIX sometimes has problems with the GCC collect2 program. For some
766 # reason, if we set the COLLECT_NAMES environment variable, the problems
767 # vanish in a puff of smoke.
768 if test set != "${COLLECT_NAMES+set}"; then
769 COLLECT_NAMES=
770 export COLLECT_NAMES
771 fi
772 _LT_EOF
773 ;;
774 esac
775
776 _LT_PROG_LTMAIN
777
778 # We use sed instead of cat because bash on DJGPP gets confused if
779 # if finds mixed CR/LF and LF-only lines. Since sed operates in
780 # text mode, it properly converts lines to CR/LF. This bash problem
781 # is reportedly fixed, but why not run on old versions too?
782 $SED '$q' "$ltmain" >> "$cfgfile" \
783 || (rm -f "$cfgfile"; exit 1)
784
785 mv -f "$cfgfile" "$ofile" ||
786 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
787 chmod +x "$ofile"
788 ],
789 [cat <<_LT_EOF >> "$ofile"
790
791 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
792 dnl in a comment (ie after a #).
793 # ### BEGIN LIBTOOL TAG CONFIG: $1
794 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
795 # ### END LIBTOOL TAG CONFIG: $1
796 _LT_EOF
797 ])dnl /m4_if
798 ],
799 [m4_if([$1], [], [
800 PACKAGE='$PACKAGE'
801 VERSION='$VERSION'
802 RM='$RM'
803 ofile='$ofile'], [])
804 ])dnl /_LT_CONFIG_SAVE_COMMANDS
805 ])# _LT_CONFIG
806
807
808 # LT_SUPPORTED_TAG(TAG)
809 # ---------------------
810 # Trace this macro to discover what tags are supported by the libtool
811 # --tag option, using:
812 # autoconf --trace 'LT_SUPPORTED_TAG:$1'
813 AC_DEFUN([LT_SUPPORTED_TAG], [])
814
815
816 # C support is built-in for now
817 m4_define([_LT_LANG_C_enabled], [])
818 m4_define([_LT_TAGS], [])
819
820
821 # LT_LANG(LANG)
822 # -------------
823 # Enable libtool support for the given language if not already enabled.
824 AC_DEFUN([LT_LANG],
825 [AC_BEFORE([$0], [LT_OUTPUT])dnl
826 m4_case([$1],
827 [C], [_LT_LANG(C)],
828 [C++], [_LT_LANG(CXX)],
829 [Go], [_LT_LANG(GO)],
830 [Java], [_LT_LANG(GCJ)],
831 [Fortran 77], [_LT_LANG(F77)],
832 [Fortran], [_LT_LANG(FC)],
833 [Windows Resource], [_LT_LANG(RC)],
834 [m4_ifdef([_LT_LANG_]$1[_CONFIG],
835 [_LT_LANG($1)],
836 [m4_fatal([$0: unsupported language: "$1"])])])dnl
837 ])# LT_LANG
838
839
840 # _LT_LANG(LANGNAME)
841 # ------------------
842 m4_defun([_LT_LANG],
843 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
844 [LT_SUPPORTED_TAG([$1])dnl
845 m4_append([_LT_TAGS], [$1 ])dnl
846 m4_define([_LT_LANG_]$1[_enabled], [])dnl
847 _LT_LANG_$1_CONFIG($1)])dnl
848 ])# _LT_LANG
849
850
851 m4_ifndef([AC_PROG_GO], [
852 ############################################################
853 # NOTE: This macro has been submitted for inclusion into #
854 # GNU Autoconf as AC_PROG_GO. When it is available in #
855 # a released version of Autoconf we should remove this #
856 # macro and use it instead. #
857 ############################################################
858 m4_defun([AC_PROG_GO],
859 [AC_LANG_PUSH(Go)dnl
860 AC_ARG_VAR([GOC], [Go compiler command])dnl
861 AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
862 _AC_ARG_VAR_LDFLAGS()dnl
863 AC_CHECK_TOOL(GOC, gccgo)
864 if test -z "$GOC"; then
865 if test -n "$ac_tool_prefix"; then
866 AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
867 fi
868 fi
869 if test -z "$GOC"; then
870 AC_CHECK_PROG(GOC, gccgo, gccgo, false)
871 fi
872 ])#m4_defun
873 ])#m4_ifndef
874
875
876 # _LT_LANG_DEFAULT_CONFIG
877 # -----------------------
878 m4_defun([_LT_LANG_DEFAULT_CONFIG],
879 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
880 [LT_LANG(CXX)],
881 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
882
883 AC_PROVIDE_IFELSE([AC_PROG_F77],
884 [LT_LANG(F77)],
885 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
886
887 AC_PROVIDE_IFELSE([AC_PROG_FC],
888 [LT_LANG(FC)],
889 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
890
891 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
892 dnl pulling things in needlessly.
893 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
894 [LT_LANG(GCJ)],
895 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
896 [LT_LANG(GCJ)],
897 [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
898 [LT_LANG(GCJ)],
899 [m4_ifdef([AC_PROG_GCJ],
900 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
901 m4_ifdef([A][M_PROG_GCJ],
902 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
903 m4_ifdef([LT_PROG_GCJ],
904 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
905
906 AC_PROVIDE_IFELSE([AC_PROG_GO],
907 [LT_LANG(GO)],
908 [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
909
910 AC_PROVIDE_IFELSE([LT_PROG_RC],
911 [LT_LANG(RC)],
912 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
913 ])# _LT_LANG_DEFAULT_CONFIG
914
915 # Obsolete macros:
916 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
917 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
918 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
919 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
920 AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
921 dnl aclocal-1.4 backwards compatibility:
922 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
923 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
924 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
925 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
926 dnl AC_DEFUN([AC_LIBTOOL_RC], [])
927
928
929 # _LT_TAG_COMPILER
930 # ----------------
931 m4_defun([_LT_TAG_COMPILER],
932 [AC_REQUIRE([AC_PROG_CC])dnl
933
934 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
935 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
936 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
937 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
938
939 # If no C compiler was specified, use CC.
940 LTCC=${LTCC-"$CC"}
941
942 # If no C compiler flags were specified, use CFLAGS.
943 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
944
945 # Allow CC to be a program name with arguments.
946 compiler=$CC
947 ])# _LT_TAG_COMPILER
948
949
950 # _LT_COMPILER_BOILERPLATE
951 # ------------------------
952 # Check for compiler boilerplate output or warnings with
953 # the simple compiler test code.
954 m4_defun([_LT_COMPILER_BOILERPLATE],
955 [m4_require([_LT_DECL_SED])dnl
956 ac_outfile=conftest.$ac_objext
957 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
958 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
959 _lt_compiler_boilerplate=`cat conftest.err`
960 $RM conftest*
961 ])# _LT_COMPILER_BOILERPLATE
962
963
964 # _LT_LINKER_BOILERPLATE
965 # ----------------------
966 # Check for linker boilerplate output or warnings with
967 # the simple link test code.
968 m4_defun([_LT_LINKER_BOILERPLATE],
969 [m4_require([_LT_DECL_SED])dnl
970 ac_outfile=conftest.$ac_objext
971 echo "$lt_simple_link_test_code" >conftest.$ac_ext
972 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
973 _lt_linker_boilerplate=`cat conftest.err`
974 $RM -r conftest*
975 ])# _LT_LINKER_BOILERPLATE
976
977
978 # _LT_REQUIRED_DARWIN_CHECKS
979 # -------------------------
980 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
981 case $host_os in
982 rhapsody* | darwin*)
983 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
984 AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
985 AC_CHECK_TOOL([LIPO], [lipo], [:])
986 AC_CHECK_TOOL([OTOOL], [otool], [:])
987 AC_CHECK_TOOL([OTOOL64], [otool64], [:])
988 _LT_DECL([], [DSYMUTIL], [1],
989 [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
990 _LT_DECL([], [NMEDIT], [1],
991 [Tool to change global to local symbols on Mac OS X])
992 _LT_DECL([], [LIPO], [1],
993 [Tool to manipulate fat objects and archives on Mac OS X])
994 _LT_DECL([], [OTOOL], [1],
995 [ldd/readelf like tool for Mach-O binaries on Mac OS X])
996 _LT_DECL([], [OTOOL64], [1],
997 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
998
999 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
1000 [lt_cv_apple_cc_single_mod=no
1001 if test -z "$LT_MULTI_MODULE"; then
1002 # By default we will add the -single_module flag. You can override
1003 # by either setting the environment variable LT_MULTI_MODULE
1004 # non-empty at configure time, or by adding -multi_module to the
1005 # link flags.
1006 rm -rf libconftest.dylib*
1007 echo "int foo(void){return 1;}" > conftest.c
1008 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1009 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
1010 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1011 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
1012 _lt_result=$?
1013 # If there is a non-empty error log, and "single_module"
1014 # appears in it, assume the flag caused a linker warning
1015 if test -s conftest.err && $GREP single_module conftest.err; then
1016 cat conftest.err >&AS_MESSAGE_LOG_FD
1017 # Otherwise, if the output was created with a 0 exit code from
1018 # the compiler, it worked.
1019 elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
1020 lt_cv_apple_cc_single_mod=yes
1021 else
1022 cat conftest.err >&AS_MESSAGE_LOG_FD
1023 fi
1024 rm -rf libconftest.dylib*
1025 rm -f conftest.*
1026 fi])
1027
1028 # Feature test to disable chained fixups since it is not
1029 # compatible with '-undefined dynamic_lookup'
1030 AC_CACHE_CHECK([for -no_fixup_chains linker flag],
1031 [lt_cv_support_no_fixup_chains],
1032 [ save_LDFLAGS=$LDFLAGS
1033 LDFLAGS="$LDFLAGS -Wl,-no_fixup_chains"
1034 AC_LINK_IFELSE(
1035 [AC_LANG_PROGRAM([],[])],
1036 lt_cv_support_no_fixup_chains=yes,
1037 lt_cv_support_no_fixup_chains=no
1038 )
1039 LDFLAGS=$save_LDFLAGS
1040 ]
1041 )
1042
1043 AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1044 [lt_cv_ld_exported_symbols_list],
1045 [lt_cv_ld_exported_symbols_list=no
1046 save_LDFLAGS=$LDFLAGS
1047 echo "_main" > conftest.sym
1048 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1049 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1050 [lt_cv_ld_exported_symbols_list=yes],
1051 [lt_cv_ld_exported_symbols_list=no])
1052 LDFLAGS=$save_LDFLAGS
1053 ])
1054
1055 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
1056 [lt_cv_ld_force_load=no
1057 cat > conftest.c << _LT_EOF
1058 int forced_loaded() { return 2;}
1059 _LT_EOF
1060 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
1061 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
1062 echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
1063 $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
1064 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
1065 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
1066 cat > conftest.c << _LT_EOF
1067 int main(void) { return 0;}
1068 _LT_EOF
1069 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
1070 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
1071 _lt_result=$?
1072 if test -s conftest.err && $GREP force_load conftest.err; then
1073 cat conftest.err >&AS_MESSAGE_LOG_FD
1074 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
1075 lt_cv_ld_force_load=yes
1076 else
1077 cat conftest.err >&AS_MESSAGE_LOG_FD
1078 fi
1079 rm -f conftest.err libconftest.a conftest conftest.c
1080 rm -rf conftest.dSYM
1081 ])
1082 case $host_os in
1083 rhapsody* | darwin1.[[012]])
1084 _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
1085 darwin1.*)
1086 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
1087 darwin*)
1088 case $MACOSX_DEPLOYMENT_TARGET,$host in
1089 10.[[012]],*|,*powerpc*-darwin[[5-8]]*)
1090 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
1091 *)
1092 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup'
1093 if test yes = "$lt_cv_support_no_fixup_chains"; then
1094 AS_VAR_APPEND([_lt_dar_allow_undefined], [' $wl-no_fixup_chains'])
1095 fi
1096 ;;
1097 esac
1098 ;;
1099 esac
1100 if test yes = "$lt_cv_apple_cc_single_mod"; then
1101 _lt_dar_single_mod='$single_module'
1102 fi
1103 _lt_dar_needs_single_mod=no
1104 case $host_os in
1105 rhapsody* | darwin1.*)
1106 _lt_dar_needs_single_mod=yes ;;
1107 darwin*)
1108 # When targeting Mac OS X 10.4 (darwin 8) or later,
1109 # -single_module is the default and -multi_module is unsupported.
1110 # The toolchain on macOS 10.14 (darwin 18) and later cannot
1111 # target any OS version that needs -single_module.
1112 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
1113 10.0,*-darwin[[567]].*|10.[[0-3]],*-darwin[[5-9]].*|10.[[0-3]],*-darwin1[[0-7]].*)
1114 _lt_dar_needs_single_mod=yes ;;
1115 esac
1116 ;;
1117 esac
1118 if test yes = "$lt_cv_ld_exported_symbols_list"; then
1119 _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
1120 else
1121 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
1122 fi
1123 if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
1124 _lt_dsymutil='~$DSYMUTIL $lib || :'
1125 else
1126 _lt_dsymutil=
1127 fi
1128 ;;
1129 esac
1130 ])
1131
1132
1133 # _LT_DARWIN_LINKER_FEATURES([TAG])
1134 # ---------------------------------
1135 # Checks for linker and compiler features on darwin
1136 m4_defun([_LT_DARWIN_LINKER_FEATURES],
1137 [
1138 m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1139 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1140 _LT_TAGVAR(hardcode_direct, $1)=no
1141 _LT_TAGVAR(hardcode_automatic, $1)=yes
1142 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1143 if test yes = "$lt_cv_ld_force_load"; then
1144 _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\"`'
1145 m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
1146 [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
1147 else
1148 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1149 fi
1150 _LT_TAGVAR(link_all_deplibs, $1)=yes
1151 _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
1152 case $cc_basename in
1153 ifort*|nagfor*) _lt_dar_can_shared=yes ;;
1154 *) _lt_dar_can_shared=$GCC ;;
1155 esac
1156 if test yes = "$_lt_dar_can_shared"; then
1157 output_verbose_link_cmd=func_echo_all
1158 _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"
1159 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
1160 _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"
1161 _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"
1162 m4_if([$1], [CXX],
1163 [ if test yes = "$_lt_dar_needs_single_mod" -a yes != "$lt_cv_apple_cc_single_mod"; then
1164 _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"
1165 _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"
1166 fi
1167 ],[])
1168 else
1169 _LT_TAGVAR(ld_shlibs, $1)=no
1170 fi
1171 ])
1172
1173 # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
1174 # ----------------------------------
1175 # Links a minimal program and checks the executable
1176 # for the system default hardcoded library path. In most cases,
1177 # this is /usr/lib:/lib, but when the MPI compilers are used
1178 # the location of the communication and MPI libs are included too.
1179 # If we don't find anything, use the default library path according
1180 # to the aix ld manual.
1181 # Store the results from the different compilers for each TAGNAME.
1182 # Allow to override them for all tags through lt_cv_aix_libpath.
1183 m4_defun([_LT_SYS_MODULE_PATH_AIX],
1184 [m4_require([_LT_DECL_SED])dnl
1185 if test set = "${lt_cv_aix_libpath+set}"; then
1186 aix_libpath=$lt_cv_aix_libpath
1187 else
1188 AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
1189 [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
1190 lt_aix_libpath_sed='[
1191 /Import File Strings/,/^$/ {
1192 /^0/ {
1193 s/^0 *\([^ ]*\) *$/\1/
1194 p
1195 }
1196 }]'
1197 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1198 # Check for a 64-bit object if we didn't find anything.
1199 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1200 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1201 fi],[])
1202 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1203 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
1204 fi
1205 ])
1206 aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
1207 fi
1208 ])# _LT_SYS_MODULE_PATH_AIX
1209
1210
1211 # _LT_SHELL_INIT(ARG)
1212 # -------------------
1213 m4_define([_LT_SHELL_INIT],
1214 [m4_divert_text([M4SH-INIT], [$1
1215 ])])# _LT_SHELL_INIT
1216
1217
1218
1219 # _LT_PROG_ECHO_BACKSLASH
1220 # -----------------------
1221 # Find how we can fake an echo command that does not interpret backslash.
1222 # In particular, with Autoconf 2.60 or later we add some code to the start
1223 # of the generated configure script that will find a shell with a builtin
1224 # printf (that we can use as an echo command).
1225 m4_defun([_LT_PROG_ECHO_BACKSLASH],
1226 [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1227 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1228 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1229
1230 AC_MSG_CHECKING([how to print strings])
1231 # Test print first, because it will be a builtin if present.
1232 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
1233 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
1234 ECHO='print -r --'
1235 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
1236 ECHO='printf %s\n'
1237 else
1238 # Use this function as a fallback that always works.
1239 func_fallback_echo ()
1240 {
1241 eval 'cat <<_LTECHO_EOF
1242 $[]1
1243 _LTECHO_EOF'
1244 }
1245 ECHO='func_fallback_echo'
1246 fi
1247
1248 # func_echo_all arg...
1249 # Invoke $ECHO with all args, space-separated.
1250 func_echo_all ()
1251 {
1252 $ECHO "$*"
1253 }
1254
1255 case $ECHO in
1256 printf*) AC_MSG_RESULT([printf]) ;;
1257 print*) AC_MSG_RESULT([print -r]) ;;
1258 *) AC_MSG_RESULT([cat]) ;;
1259 esac
1260
1261 m4_ifdef([_AS_DETECT_SUGGESTED],
1262 [_AS_DETECT_SUGGESTED([
1263 test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
1264 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1265 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1266 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1267 PATH=/empty FPATH=/empty; export PATH FPATH
1268 test "X`printf %s $ECHO`" = "X$ECHO" \
1269 || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
1270
1271 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1272 _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
1273 ])# _LT_PROG_ECHO_BACKSLASH
1274
1275
1276 # _LT_WITH_SYSROOT
1277 # ----------------
1278 AC_DEFUN([_LT_WITH_SYSROOT],
1279 [m4_require([_LT_DECL_SED])dnl
1280 AC_MSG_CHECKING([for sysroot])
1281 AC_ARG_WITH([sysroot],
1282 [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
1283 [Search for dependent libraries within DIR (or the compiler's sysroot
1284 if not specified).])],
1285 [], [with_sysroot=no])
1286
1287 dnl lt_sysroot will always be passed unquoted. We quote it here
1288 dnl in case the user passed a directory name.
1289 lt_sysroot=
1290 case $with_sysroot in #(
1291 yes)
1292 if test yes = "$GCC"; then
1293 # Trim trailing / since we'll always append absolute paths and we want
1294 # to avoid //, if only for less confusing output for the user.
1295 lt_sysroot=`$CC --print-sysroot 2>/dev/null | $SED 's:/\+$::'`
1296 fi
1297 ;; #(
1298 /*)
1299 lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"`
1300 ;; #(
1301 no|'')
1302 ;; #(
1303 *)
1304 AC_MSG_RESULT([$with_sysroot])
1305 AC_MSG_ERROR([The sysroot must be an absolute path.])
1306 ;;
1307 esac
1308
1309 AC_MSG_RESULT([${lt_sysroot:-no}])
1310 _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
1311 [dependent libraries, and where our libraries should be installed.])])
1312
1313 # _LT_ENABLE_LOCK
1314 # ---------------
1315 m4_defun([_LT_ENABLE_LOCK],
1316 [AC_ARG_ENABLE([libtool-lock],
1317 [AS_HELP_STRING([--disable-libtool-lock],
1318 [avoid locking (might break parallel builds)])])
1319 test no = "$enable_libtool_lock" || enable_libtool_lock=yes
1320
1321 # Some flags need to be propagated to the compiler or linker for good
1322 # libtool support.
1323 case $host in
1324 ia64-*-hpux*)
1325 # Find out what ABI is being produced by ac_compile, and set mode
1326 # options accordingly.
1327 echo 'int i;' > conftest.$ac_ext
1328 if AC_TRY_EVAL(ac_compile); then
1329 case `$FILECMD conftest.$ac_objext` in
1330 *ELF-32*)
1331 HPUX_IA64_MODE=32
1332 ;;
1333 *ELF-64*)
1334 HPUX_IA64_MODE=64
1335 ;;
1336 esac
1337 fi
1338 rm -rf conftest*
1339 ;;
1340 *-*-irix6*)
1341 # Find out what ABI is being produced by ac_compile, and set linker
1342 # options accordingly.
1343 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
1344 if AC_TRY_EVAL(ac_compile); then
1345 if test yes = "$lt_cv_prog_gnu_ld"; then
1346 case `$FILECMD conftest.$ac_objext` in
1347 *32-bit*)
1348 LD="${LD-ld} -melf32bsmip"
1349 ;;
1350 *N32*)
1351 LD="${LD-ld} -melf32bmipn32"
1352 ;;
1353 *64-bit*)
1354 LD="${LD-ld} -melf64bmip"
1355 ;;
1356 esac
1357 else
1358 case `$FILECMD conftest.$ac_objext` in
1359 *32-bit*)
1360 LD="${LD-ld} -32"
1361 ;;
1362 *N32*)
1363 LD="${LD-ld} -n32"
1364 ;;
1365 *64-bit*)
1366 LD="${LD-ld} -64"
1367 ;;
1368 esac
1369 fi
1370 fi
1371 rm -rf conftest*
1372 ;;
1373
1374 mips64*-*linux*)
1375 # Find out what ABI is being produced by ac_compile, and set linker
1376 # options accordingly.
1377 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
1378 if AC_TRY_EVAL(ac_compile); then
1379 emul=elf
1380 case `$FILECMD conftest.$ac_objext` in
1381 *32-bit*)
1382 emul="${emul}32"
1383 ;;
1384 *64-bit*)
1385 emul="${emul}64"
1386 ;;
1387 esac
1388 case `$FILECMD conftest.$ac_objext` in
1389 *MSB*)
1390 emul="${emul}btsmip"
1391 ;;
1392 *LSB*)
1393 emul="${emul}ltsmip"
1394 ;;
1395 esac
1396 case `$FILECMD conftest.$ac_objext` in
1397 *N32*)
1398 emul="${emul}n32"
1399 ;;
1400 esac
1401 LD="${LD-ld} -m $emul"
1402 fi
1403 rm -rf conftest*
1404 ;;
1405
1406 x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
1407 s390*-*linux*|s390*-*tpf*|sparc*-*linux*|x86_64-gnu*)
1408 # Find out what ABI is being produced by ac_compile, and set linker
1409 # options accordingly. Note that the listed cases only cover the
1410 # situations where additional linker options are needed (such as when
1411 # doing 32-bit compilation for a host where ld defaults to 64-bit, or
1412 # vice versa); the common cases where no linker options are needed do
1413 # not appear in the list.
1414 echo 'int i;' > conftest.$ac_ext
1415 if AC_TRY_EVAL(ac_compile); then
1416 case `$FILECMD conftest.o` in
1417 *32-bit*)
1418 case $host in
1419 x86_64-*kfreebsd*-gnu)
1420 LD="${LD-ld} -m elf_i386_fbsd"
1421 ;;
1422 x86_64-*linux*|x86_64-gnu*)
1423 case `$FILECMD conftest.o` in
1424 *x86-64*)
1425 LD="${LD-ld} -m elf32_x86_64"
1426 ;;
1427 *)
1428 LD="${LD-ld} -m elf_i386"
1429 ;;
1430 esac
1431 ;;
1432 powerpc64le-*linux*)
1433 LD="${LD-ld} -m elf32lppclinux"
1434 ;;
1435 powerpc64-*linux*)
1436 LD="${LD-ld} -m elf32ppclinux"
1437 ;;
1438 s390x-*linux*)
1439 LD="${LD-ld} -m elf_s390"
1440 ;;
1441 sparc64-*linux*)
1442 LD="${LD-ld} -m elf32_sparc"
1443 ;;
1444 esac
1445 ;;
1446 *64-bit*)
1447 case $host in
1448 x86_64-*kfreebsd*-gnu)
1449 LD="${LD-ld} -m elf_x86_64_fbsd"
1450 ;;
1451 x86_64-*linux*|x86_64-gnu*)
1452 LD="${LD-ld} -m elf_x86_64"
1453 ;;
1454 powerpcle-*linux*)
1455 LD="${LD-ld} -m elf64lppc"
1456 ;;
1457 powerpc-*linux*)
1458 LD="${LD-ld} -m elf64ppc"
1459 ;;
1460 s390*-*linux*|s390*-*tpf*)
1461 LD="${LD-ld} -m elf64_s390"
1462 ;;
1463 sparc*-*linux*)
1464 LD="${LD-ld} -m elf64_sparc"
1465 ;;
1466 esac
1467 ;;
1468 esac
1469 fi
1470 rm -rf conftest*
1471 ;;
1472
1473 *-*-sco3.2v5*)
1474 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1475 SAVE_CFLAGS=$CFLAGS
1476 CFLAGS="$CFLAGS -belf"
1477 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1478 [AC_LANG_PUSH(C)
1479 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1480 AC_LANG_POP])
1481 if test yes != "$lt_cv_cc_needs_belf"; then
1482 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1483 CFLAGS=$SAVE_CFLAGS
1484 fi
1485 ;;
1486 *-*solaris*)
1487 # Find out what ABI is being produced by ac_compile, and set linker
1488 # options accordingly.
1489 echo 'int i;' > conftest.$ac_ext
1490 if AC_TRY_EVAL(ac_compile); then
1491 case `$FILECMD conftest.o` in
1492 *64-bit*)
1493 case $lt_cv_prog_gnu_ld in
1494 yes*)
1495 case $host in
1496 i?86-*-solaris*|x86_64-*-solaris*)
1497 LD="${LD-ld} -m elf_x86_64"
1498 ;;
1499 sparc*-*-solaris*)
1500 LD="${LD-ld} -m elf64_sparc"
1501 ;;
1502 esac
1503 # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
1504 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
1505 LD=${LD-ld}_sol2
1506 fi
1507 ;;
1508 *)
1509 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1510 LD="${LD-ld} -64"
1511 fi
1512 ;;
1513 esac
1514 ;;
1515 esac
1516 fi
1517 rm -rf conftest*
1518 ;;
1519 esac
1520
1521 need_locks=$enable_libtool_lock
1522 ])# _LT_ENABLE_LOCK
1523
1524
1525 # _LT_PROG_AR
1526 # -----------
1527 m4_defun([_LT_PROG_AR],
1528 [AC_CHECK_TOOLS(AR, [ar], false)
1529 : ${AR=ar}
1530 _LT_DECL([], [AR], [1], [The archiver])
1531
1532 # Use ARFLAGS variable as AR's operation code to sync the variable naming with
1533 # Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have
1534 # higher priority because that's what people were doing historically (setting
1535 # ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS
1536 # variable obsoleted/removed.
1537
1538 test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr}
1539 lt_ar_flags=$AR_FLAGS
1540 _LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)])
1541
1542 # Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override
1543 # by AR_FLAGS because that was never working and AR_FLAGS is about to die.
1544 _LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}],
1545 [Flags to create an archive])
1546
1547 AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
1548 [lt_cv_ar_at_file=no
1549 AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
1550 [echo conftest.$ac_objext > conftest.lst
1551 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
1552 AC_TRY_EVAL([lt_ar_try])
1553 if test 0 -eq "$ac_status"; then
1554 # Ensure the archiver fails upon bogus file names.
1555 rm -f conftest.$ac_objext libconftest.a
1556 AC_TRY_EVAL([lt_ar_try])
1557 if test 0 -ne "$ac_status"; then
1558 lt_cv_ar_at_file=@
1559 fi
1560 fi
1561 rm -f conftest.* libconftest.a
1562 ])
1563 ])
1564
1565 if test no = "$lt_cv_ar_at_file"; then
1566 archiver_list_spec=
1567 else
1568 archiver_list_spec=$lt_cv_ar_at_file
1569 fi
1570 _LT_DECL([], [archiver_list_spec], [1],
1571 [How to feed a file listing to the archiver])
1572 ])# _LT_PROG_AR
1573
1574
1575 # _LT_CMD_OLD_ARCHIVE
1576 # -------------------
1577 m4_defun([_LT_CMD_OLD_ARCHIVE],
1578 [_LT_PROG_AR
1579
1580 AC_CHECK_TOOL(STRIP, strip, :)
1581 test -z "$STRIP" && STRIP=:
1582 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
1583
1584 AC_REQUIRE([AC_PROG_RANLIB])
1585 test -z "$RANLIB" && RANLIB=:
1586 _LT_DECL([], [RANLIB], [1],
1587 [Commands used to install an old-style archive])
1588
1589 # Determine commands to create old-style static archives.
1590 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1591 old_postinstall_cmds='chmod 644 $oldlib'
1592 old_postuninstall_cmds=
1593
1594 if test -n "$RANLIB"; then
1595 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
1596 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
1597 fi
1598
1599 case $host_os in
1600 darwin*)
1601 lock_old_archive_extraction=yes ;;
1602 *)
1603 lock_old_archive_extraction=no ;;
1604 esac
1605 _LT_DECL([], [old_postinstall_cmds], [2])
1606 _LT_DECL([], [old_postuninstall_cmds], [2])
1607 _LT_TAGDECL([], [old_archive_cmds], [2],
1608 [Commands used to build an old-style archive])
1609 _LT_DECL([], [lock_old_archive_extraction], [0],
1610 [Whether to use a lock for old archive extraction])
1611 ])# _LT_CMD_OLD_ARCHIVE
1612
1613
1614 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1615 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1616 # ----------------------------------------------------------------
1617 # Check whether the given compiler option works
1618 AC_DEFUN([_LT_COMPILER_OPTION],
1619 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1620 m4_require([_LT_DECL_SED])dnl
1621 AC_CACHE_CHECK([$1], [$2],
1622 [$2=no
1623 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1624 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1625 lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment
1626 # Insert the option either (1) after the last *FLAGS variable, or
1627 # (2) before a word containing "conftest.", or (3) at the end.
1628 # Note that $ac_compile itself does not contain backslashes and begins
1629 # with a dollar sign (not a hyphen), so the echo should work correctly.
1630 # The option is referenced via a variable to avoid confusing sed.
1631 lt_compile=`echo "$ac_compile" | $SED \
1632 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1633 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1634 -e 's:$: $lt_compiler_flag:'`
1635 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1636 (eval "$lt_compile" 2>conftest.err)
1637 ac_status=$?
1638 cat conftest.err >&AS_MESSAGE_LOG_FD
1639 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1640 if (exit $ac_status) && test -s "$ac_outfile"; then
1641 # The compiler can only warn and ignore the option if not recognized
1642 # So say no if there are warnings other than the usual output.
1643 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
1644 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1645 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1646 $2=yes
1647 fi
1648 fi
1649 $RM conftest*
1650 ])
1651
1652 if test yes = "[$]$2"; then
1653 m4_if([$5], , :, [$5])
1654 else
1655 m4_if([$6], , :, [$6])
1656 fi
1657 ])# _LT_COMPILER_OPTION
1658
1659 # Old name:
1660 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
1661 dnl aclocal-1.4 backwards compatibility:
1662 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
1663
1664
1665 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1666 # [ACTION-SUCCESS], [ACTION-FAILURE])
1667 # ----------------------------------------------------
1668 # Check whether the given linker option works
1669 AC_DEFUN([_LT_LINKER_OPTION],
1670 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1671 m4_require([_LT_DECL_SED])dnl
1672 AC_CACHE_CHECK([$1], [$2],
1673 [$2=no
1674 save_LDFLAGS=$LDFLAGS
1675 LDFLAGS="$LDFLAGS $3"
1676 echo "$lt_simple_link_test_code" > conftest.$ac_ext
1677 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1678 # The linker can only warn and ignore the option if not recognized
1679 # So say no if there are warnings
1680 if test -s conftest.err; then
1681 # Append any errors to the config.log.
1682 cat conftest.err 1>&AS_MESSAGE_LOG_FD
1683 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
1684 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1685 if diff conftest.exp conftest.er2 >/dev/null; then
1686 $2=yes
1687 fi
1688 else
1689 $2=yes
1690 fi
1691 fi
1692 $RM -r conftest*
1693 LDFLAGS=$save_LDFLAGS
1694 ])
1695
1696 if test yes = "[$]$2"; then
1697 m4_if([$4], , :, [$4])
1698 else
1699 m4_if([$5], , :, [$5])
1700 fi
1701 ])# _LT_LINKER_OPTION
1702
1703 # Old name:
1704 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
1705 dnl aclocal-1.4 backwards compatibility:
1706 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
1707
1708
1709 # LT_CMD_MAX_LEN
1710 #---------------
1711 AC_DEFUN([LT_CMD_MAX_LEN],
1712 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1713 # find the maximum length of command line arguments
1714 AC_MSG_CHECKING([the maximum length of command line arguments])
1715 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1716 i=0
1717 teststring=ABCD
1718
1719 case $build_os in
1720 msdosdjgpp*)
1721 # On DJGPP, this test can blow up pretty badly due to problems in libc
1722 # (any single argument exceeding 2000 bytes causes a buffer overrun
1723 # during glob expansion). Even if it were fixed, the result of this
1724 # check would be larger than it should be.
1725 lt_cv_sys_max_cmd_len=12288; # 12K is about right
1726 ;;
1727
1728 gnu* | ironclad*)
1729 # Under GNU Hurd and Ironclad, this test is not required because there
1730 # is no limit to the length of command line arguments.
1731 # Libtool will interpret -1 as no limit whatsoever
1732 lt_cv_sys_max_cmd_len=-1;
1733 ;;
1734
1735 cygwin* | mingw* | windows* | cegcc*)
1736 # On Win9x/ME, this test blows up -- it succeeds, but takes
1737 # about 5 minutes as the teststring grows exponentially.
1738 # Worse, since 9x/ME are not pre-emptively multitasking,
1739 # you end up with a "frozen" computer, even though with patience
1740 # the test eventually succeeds (with a max line length of 256k).
1741 # Instead, let's just punt: use the minimum linelength reported by
1742 # all of the supported platforms: 8192 (on NT/2K/XP).
1743 lt_cv_sys_max_cmd_len=8192;
1744 ;;
1745
1746 mint*)
1747 # On MiNT this can take a long time and run out of memory.
1748 lt_cv_sys_max_cmd_len=8192;
1749 ;;
1750
1751 amigaos*)
1752 # On AmigaOS with pdksh, this test takes hours, literally.
1753 # So we just punt and use a minimum line length of 8192.
1754 lt_cv_sys_max_cmd_len=8192;
1755 ;;
1756
1757 darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*)
1758 # This has been around since 386BSD, at least. Likely further.
1759 if test -x /sbin/sysctl; then
1760 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1761 elif test -x /usr/sbin/sysctl; then
1762 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1763 else
1764 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
1765 fi
1766 # And add a safety zone
1767 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1768 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1769 ;;
1770
1771 interix*)
1772 # We know the value 262144 and hardcode it with a safety zone (like BSD)
1773 lt_cv_sys_max_cmd_len=196608
1774 ;;
1775
1776 os2*)
1777 # The test takes a long time on OS/2.
1778 lt_cv_sys_max_cmd_len=8192
1779 ;;
1780
1781 osf*)
1782 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1783 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1784 # nice to cause kernel panics so lets avoid the loop below.
1785 # First set a reasonable default.
1786 lt_cv_sys_max_cmd_len=16384
1787 #
1788 if test -x /sbin/sysconfig; then
1789 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1790 *1*) lt_cv_sys_max_cmd_len=-1 ;;
1791 esac
1792 fi
1793 ;;
1794 sco3.2v5*)
1795 lt_cv_sys_max_cmd_len=102400
1796 ;;
1797 sysv5* | sco5v6* | sysv4.2uw2*)
1798 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1799 if test -n "$kargmax"; then
1800 lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[ ]]//'`
1801 else
1802 lt_cv_sys_max_cmd_len=32768
1803 fi
1804 ;;
1805 *)
1806 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
1807 if test -n "$lt_cv_sys_max_cmd_len" && \
1808 test undefined != "$lt_cv_sys_max_cmd_len"; then
1809 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1810 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1811 else
1812 # Make teststring a little bigger before we do anything with it.
1813 # a 1K string should be a reasonable start.
1814 for i in 1 2 3 4 5 6 7 8; do
1815 teststring=$teststring$teststring
1816 done
1817 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1818 # If test is not a shell built-in, we'll probably end up computing a
1819 # maximum length that is only half of the actual maximum length, but
1820 # we can't tell.
1821 while { test X`env echo "$teststring$teststring" 2>/dev/null` \
1822 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
1823 test 17 != "$i" # 1/2 MB should be enough
1824 do
1825 i=`expr $i + 1`
1826 teststring=$teststring$teststring
1827 done
1828 # Only check the string length outside the loop.
1829 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1830 teststring=
1831 # Add a significant safety factor because C++ compilers can tack on
1832 # massive amounts of additional arguments before passing them to the
1833 # linker. It appears as though 1/2 is a usable value.
1834 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1835 fi
1836 ;;
1837 esac
1838 ])
1839 if test -n "$lt_cv_sys_max_cmd_len"; then
1840 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1841 else
1842 AC_MSG_RESULT(none)
1843 fi
1844 max_cmd_len=$lt_cv_sys_max_cmd_len
1845 _LT_DECL([], [max_cmd_len], [0],
1846 [What is the maximum length of a command?])
1847 ])# LT_CMD_MAX_LEN
1848
1849 # Old name:
1850 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
1851 dnl aclocal-1.4 backwards compatibility:
1852 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
1853
1854
1855 # _LT_HEADER_DLFCN
1856 # ----------------
1857 m4_defun([_LT_HEADER_DLFCN],
1858 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
1859 ])# _LT_HEADER_DLFCN
1860
1861
1862 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1863 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1864 # ----------------------------------------------------------------
1865 m4_defun([_LT_TRY_DLOPEN_SELF],
1866 [m4_require([_LT_HEADER_DLFCN])dnl
1867 if test yes = "$cross_compiling"; then :
1868 [$4]
1869 else
1870 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1871 lt_status=$lt_dlunknown
1872 cat > conftest.$ac_ext <<_LT_EOF
1873 [#line $LINENO "configure"
1874 #include "confdefs.h"
1875
1876 #if HAVE_DLFCN_H
1877 #include <dlfcn.h>
1878 #endif
1879
1880 #include <stdio.h>
1881
1882 #ifdef RTLD_GLOBAL
1883 # define LT_DLGLOBAL RTLD_GLOBAL
1884 #else
1885 # ifdef DL_GLOBAL
1886 # define LT_DLGLOBAL DL_GLOBAL
1887 # else
1888 # define LT_DLGLOBAL 0
1889 # endif
1890 #endif
1891
1892 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1893 find out it does not work in some platform. */
1894 #ifndef LT_DLLAZY_OR_NOW
1895 # ifdef RTLD_LAZY
1896 # define LT_DLLAZY_OR_NOW RTLD_LAZY
1897 # else
1898 # ifdef DL_LAZY
1899 # define LT_DLLAZY_OR_NOW DL_LAZY
1900 # else
1901 # ifdef RTLD_NOW
1902 # define LT_DLLAZY_OR_NOW RTLD_NOW
1903 # else
1904 # ifdef DL_NOW
1905 # define LT_DLLAZY_OR_NOW DL_NOW
1906 # else
1907 # define LT_DLLAZY_OR_NOW 0
1908 # endif
1909 # endif
1910 # endif
1911 # endif
1912 #endif
1913
1914 /* When -fvisibility=hidden is used, assume the code has been annotated
1915 correspondingly for the symbols needed. */
1916 #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
1917 int fnord (void) __attribute__((visibility("default")));
1918 #endif
1919
1920 int fnord (void) { return 42; }
1921 int main (void)
1922 {
1923 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1924 int status = $lt_dlunknown;
1925
1926 if (self)
1927 {
1928 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1929 else
1930 {
1931 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1932 else puts (dlerror ());
1933 }
1934 /* dlclose (self); */
1935 }
1936 else
1937 puts (dlerror ());
1938
1939 return status;
1940 }]
1941 _LT_EOF
1942 if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
1943 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1944 lt_status=$?
1945 case x$lt_status in
1946 x$lt_dlno_uscore) $1 ;;
1947 x$lt_dlneed_uscore) $2 ;;
1948 x$lt_dlunknown|x*) $3 ;;
1949 esac
1950 else :
1951 # compilation failed
1952 $3
1953 fi
1954 fi
1955 rm -fr conftest*
1956 ])# _LT_TRY_DLOPEN_SELF
1957
1958
1959 # LT_SYS_DLOPEN_SELF
1960 # ------------------
1961 AC_DEFUN([LT_SYS_DLOPEN_SELF],
1962 [m4_require([_LT_HEADER_DLFCN])dnl
1963 if test yes != "$enable_dlopen"; then
1964 enable_dlopen=unknown
1965 enable_dlopen_self=unknown
1966 enable_dlopen_self_static=unknown
1967 else
1968 lt_cv_dlopen=no
1969 lt_cv_dlopen_libs=
1970
1971 case $host_os in
1972 beos*)
1973 lt_cv_dlopen=load_add_on
1974 lt_cv_dlopen_libs=
1975 lt_cv_dlopen_self=yes
1976 ;;
1977
1978 mingw* | windows* | pw32* | cegcc*)
1979 lt_cv_dlopen=LoadLibrary
1980 lt_cv_dlopen_libs=
1981 ;;
1982
1983 cygwin*)
1984 lt_cv_dlopen=dlopen
1985 lt_cv_dlopen_libs=
1986 ;;
1987
1988 darwin*)
1989 # if libdl is installed we need to link against it
1990 AC_CHECK_LIB([dl], [dlopen],
1991 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
1992 lt_cv_dlopen=dyld
1993 lt_cv_dlopen_libs=
1994 lt_cv_dlopen_self=yes
1995 ])
1996 ;;
1997
1998 tpf*)
1999 # Don't try to run any link tests for TPF. We know it's impossible
2000 # because TPF is a cross-compiler, and we know how we open DSOs.
2001 lt_cv_dlopen=dlopen
2002 lt_cv_dlopen_libs=
2003 lt_cv_dlopen_self=no
2004 ;;
2005
2006 *)
2007 AC_CHECK_FUNC([shl_load],
2008 [lt_cv_dlopen=shl_load],
2009 [AC_CHECK_LIB([dld], [shl_load],
2010 [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
2011 [AC_CHECK_FUNC([dlopen],
2012 [lt_cv_dlopen=dlopen],
2013 [AC_CHECK_LIB([dl], [dlopen],
2014 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
2015 [AC_CHECK_LIB([svld], [dlopen],
2016 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
2017 [AC_CHECK_LIB([dld], [dld_link],
2018 [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
2019 ])
2020 ])
2021 ])
2022 ])
2023 ])
2024 ;;
2025 esac
2026
2027 if test no = "$lt_cv_dlopen"; then
2028 enable_dlopen=no
2029 else
2030 enable_dlopen=yes
2031 fi
2032
2033 case $lt_cv_dlopen in
2034 dlopen)
2035 save_CPPFLAGS=$CPPFLAGS
2036 test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2037
2038 save_LDFLAGS=$LDFLAGS
2039 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2040
2041 save_LIBS=$LIBS
2042 LIBS="$lt_cv_dlopen_libs $LIBS"
2043
2044 AC_CACHE_CHECK([whether a program can dlopen itself],
2045 lt_cv_dlopen_self, [dnl
2046 _LT_TRY_DLOPEN_SELF(
2047 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2048 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2049 ])
2050
2051 if test yes = "$lt_cv_dlopen_self"; then
2052 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2053 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2054 lt_cv_dlopen_self_static, [dnl
2055 _LT_TRY_DLOPEN_SELF(
2056 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2057 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
2058 ])
2059 fi
2060
2061 CPPFLAGS=$save_CPPFLAGS
2062 LDFLAGS=$save_LDFLAGS
2063 LIBS=$save_LIBS
2064 ;;
2065 esac
2066
2067 case $lt_cv_dlopen_self in
2068 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2069 *) enable_dlopen_self=unknown ;;
2070 esac
2071
2072 case $lt_cv_dlopen_self_static in
2073 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2074 *) enable_dlopen_self_static=unknown ;;
2075 esac
2076 fi
2077 _LT_DECL([dlopen_support], [enable_dlopen], [0],
2078 [Whether dlopen is supported])
2079 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
2080 [Whether dlopen of programs is supported])
2081 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
2082 [Whether dlopen of statically linked programs is supported])
2083 ])# LT_SYS_DLOPEN_SELF
2084
2085 # Old name:
2086 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
2087 dnl aclocal-1.4 backwards compatibility:
2088 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
2089
2090
2091 # _LT_COMPILER_C_O([TAGNAME])
2092 # ---------------------------
2093 # Check to see if options -c and -o are simultaneously supported by compiler.
2094 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
2095 m4_defun([_LT_COMPILER_C_O],
2096 [m4_require([_LT_DECL_SED])dnl
2097 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2098 m4_require([_LT_TAG_COMPILER])dnl
2099 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2100 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2101 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2102 $RM -r conftest 2>/dev/null
2103 mkdir conftest
2104 cd conftest
2105 mkdir out
2106 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2107
2108 lt_compiler_flag="-o out/conftest2.$ac_objext"
2109 # Insert the option either (1) after the last *FLAGS variable, or
2110 # (2) before a word containing "conftest.", or (3) at the end.
2111 # Note that $ac_compile itself does not contain backslashes and begins
2112 # with a dollar sign (not a hyphen), so the echo should work correctly.
2113 lt_compile=`echo "$ac_compile" | $SED \
2114 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2115 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2116 -e 's:$: $lt_compiler_flag:'`
2117 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2118 (eval "$lt_compile" 2>out/conftest.err)
2119 ac_status=$?
2120 cat out/conftest.err >&AS_MESSAGE_LOG_FD
2121 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2122 if (exit $ac_status) && test -s out/conftest2.$ac_objext
2123 then
2124 # The compiler can only warn and ignore the option if not recognized
2125 # So say no if there are warnings
2126 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
2127 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2128 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2129 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2130 fi
2131 fi
2132 chmod u+w . 2>&AS_MESSAGE_LOG_FD
2133 $RM conftest*
2134 # SGI C++ compiler will create directory out/ii_files/ for
2135 # template instantiation
2136 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
2137 $RM out/* && rmdir out
2138 cd ..
2139 $RM -r conftest
2140 $RM conftest*
2141 ])
2142 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
2143 [Does compiler simultaneously support -c and -o options?])
2144 ])# _LT_COMPILER_C_O
2145
2146
2147 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
2148 # ----------------------------------
2149 # Check to see if we can do hard links to lock some files if needed
2150 m4_defun([_LT_COMPILER_FILE_LOCKS],
2151 [m4_require([_LT_ENABLE_LOCK])dnl
2152 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2153 _LT_COMPILER_C_O([$1])
2154
2155 hard_links=nottested
2156 if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
2157 # do not overwrite the value of need_locks provided by the user
2158 AC_MSG_CHECKING([if we can lock with hard links])
2159 hard_links=yes
2160 $RM conftest*
2161 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2162 touch conftest.a
2163 ln conftest.a conftest.b 2>&5 || hard_links=no
2164 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2165 AC_MSG_RESULT([$hard_links])
2166 if test no = "$hard_links"; then
2167 AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
2168 need_locks=warn
2169 fi
2170 else
2171 need_locks=no
2172 fi
2173 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
2174 ])# _LT_COMPILER_FILE_LOCKS
2175
2176
2177 # _LT_CHECK_OBJDIR
2178 # ----------------
2179 m4_defun([_LT_CHECK_OBJDIR],
2180 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2181 [rm -f .libs 2>/dev/null
2182 mkdir .libs 2>/dev/null
2183 if test -d .libs; then
2184 lt_cv_objdir=.libs
2185 else
2186 # MS-DOS does not allow filenames that begin with a dot.
2187 lt_cv_objdir=_libs
2188 fi
2189 rmdir .libs 2>/dev/null])
2190 objdir=$lt_cv_objdir
2191 _LT_DECL([], [objdir], [0],
2192 [The name of the directory that contains temporary libtool files])dnl
2193 m4_pattern_allow([LT_OBJDIR])dnl
2194 AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
2195 [Define to the sub-directory where libtool stores uninstalled libraries.])
2196 ])# _LT_CHECK_OBJDIR
2197
2198
2199 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
2200 # --------------------------------------
2201 # Check hardcoding attributes.
2202 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
2203 [AC_MSG_CHECKING([how to hardcode library paths into programs])
2204 _LT_TAGVAR(hardcode_action, $1)=
2205 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
2206 test -n "$_LT_TAGVAR(runpath_var, $1)" ||
2207 test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
2208
2209 # We can hardcode non-existent directories.
2210 if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
2211 # If the only mechanism to avoid hardcoding is shlibpath_var, we
2212 # have to relink, otherwise we might link with an installed library
2213 # when we should be linking with a yet-to-be-installed one
2214 ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
2215 test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
2216 # Linking always hardcodes the temporary library directory.
2217 _LT_TAGVAR(hardcode_action, $1)=relink
2218 else
2219 # We can link without hardcoding, and we can hardcode nonexisting dirs.
2220 _LT_TAGVAR(hardcode_action, $1)=immediate
2221 fi
2222 else
2223 # We cannot hardcode anything, or else we can only hardcode existing
2224 # directories.
2225 _LT_TAGVAR(hardcode_action, $1)=unsupported
2226 fi
2227 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
2228
2229 if test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
2230 test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
2231 # Fast installation is not supported
2232 enable_fast_install=no
2233 elif test yes = "$shlibpath_overrides_runpath" ||
2234 test no = "$enable_shared"; then
2235 # Fast installation is not necessary
2236 enable_fast_install=needless
2237 fi
2238 _LT_TAGDECL([], [hardcode_action], [0],
2239 [How to hardcode a shared library path into an executable])
2240 ])# _LT_LINKER_HARDCODE_LIBPATH
2241
2242
2243 # _LT_CMD_STRIPLIB
2244 # ----------------
2245 m4_defun([_LT_CMD_STRIPLIB],
2246 [m4_require([_LT_DECL_EGREP])
2247 striplib=
2248 old_striplib=
2249 AC_MSG_CHECKING([whether stripping libraries is possible])
2250 if test -z "$STRIP"; then
2251 AC_MSG_RESULT([no])
2252 else
2253 if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2254 old_striplib="$STRIP --strip-debug"
2255 striplib="$STRIP --strip-unneeded"
2256 AC_MSG_RESULT([yes])
2257 else
2258 case $host_os in
2259 darwin*)
2260 # FIXME - insert some real tests, host_os isn't really good enough
2261 striplib="$STRIP -x"
2262 old_striplib="$STRIP -S"
2263 AC_MSG_RESULT([yes])
2264 ;;
2265 freebsd*)
2266 if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then
2267 old_striplib="$STRIP --strip-debug"
2268 striplib="$STRIP --strip-unneeded"
2269 AC_MSG_RESULT([yes])
2270 else
2271 AC_MSG_RESULT([no])
2272 fi
2273 ;;
2274 *)
2275 AC_MSG_RESULT([no])
2276 ;;
2277 esac
2278 fi
2279 fi
2280 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2281 _LT_DECL([], [striplib], [1])
2282 ])# _LT_CMD_STRIPLIB
2283
2284
2285 # _LT_PREPARE_MUNGE_PATH_LIST
2286 # ---------------------------
2287 # Make sure func_munge_path_list() is defined correctly.
2288 m4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
2289 [[# func_munge_path_list VARIABLE PATH
2290 # -----------------------------------
2291 # VARIABLE is name of variable containing _space_ separated list of
2292 # directories to be munged by the contents of PATH, which is string
2293 # having a format:
2294 # "DIR[:DIR]:"
2295 # string "DIR[ DIR]" will be prepended to VARIABLE
2296 # ":DIR[:DIR]"
2297 # string "DIR[ DIR]" will be appended to VARIABLE
2298 # "DIRP[:DIRP]::[DIRA:]DIRA"
2299 # string "DIRP[ DIRP]" will be prepended to VARIABLE and string
2300 # "DIRA[ DIRA]" will be appended to VARIABLE
2301 # "DIR[:DIR]"
2302 # VARIABLE will be replaced by "DIR[ DIR]"
2303 func_munge_path_list ()
2304 {
2305 case x@S|@2 in
2306 x)
2307 ;;
2308 *:)
2309 eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
2310 ;;
2311 x:*)
2312 eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
2313 ;;
2314 *::*)
2315 eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
2316 eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
2317 ;;
2318 *)
2319 eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
2320 ;;
2321 esac
2322 }
2323 ]])# _LT_PREPARE_PATH_LIST
2324
2325
2326 # _LT_SYS_DYNAMIC_LINKER([TAG])
2327 # -----------------------------
2328 # PORTME Fill in your ld.so characteristics
2329 m4_defun([_LT_SYS_DYNAMIC_LINKER],
2330 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2331 m4_require([_LT_DECL_EGREP])dnl
2332 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2333 m4_require([_LT_DECL_OBJDUMP])dnl
2334 m4_require([_LT_DECL_SED])dnl
2335 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
2336 m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
2337 AC_MSG_CHECKING([dynamic linker characteristics])
2338 m4_if([$1],
2339 [], [
2340 if test yes = "$GCC"; then
2341 case $host_os in
2342 darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
2343 *) lt_awk_arg='/^libraries:/' ;;
2344 esac
2345 case $host_os in
2346 mingw* | windows* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
2347 *) lt_sed_strip_eq='s|=/|/|g' ;;
2348 esac
2349 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
2350 case $lt_search_path_spec in
2351 *\;*)
2352 # if the path contains ";" then we assume it to be the separator
2353 # otherwise default to the standard path separator (i.e. ":") - it is
2354 # assumed that no part of a normal pathname contains ";" but that should
2355 # okay in the real world where ";" in dirpaths is itself problematic.
2356 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
2357 ;;
2358 *)
2359 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
2360 ;;
2361 esac
2362 # Ok, now we have the path, separated by spaces, we can step through it
2363 # and add multilib dir if necessary...
2364 lt_tmp_lt_search_path_spec=
2365 lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2366 # ...but if some path component already ends with the multilib dir we assume
2367 # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
2368 case "$lt_multi_os_dir; $lt_search_path_spec " in
2369 "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
2370 lt_multi_os_dir=
2371 ;;
2372 esac
2373 for lt_sys_path in $lt_search_path_spec; do
2374 if test -d "$lt_sys_path$lt_multi_os_dir"; then
2375 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
2376 elif test -n "$lt_multi_os_dir"; then
2377 test -d "$lt_sys_path" && \
2378 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2379 fi
2380 done
2381 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
2382 BEGIN {RS = " "; FS = "/|\n";} {
2383 lt_foo = "";
2384 lt_count = 0;
2385 for (lt_i = NF; lt_i > 0; lt_i--) {
2386 if ($lt_i != "" && $lt_i != ".") {
2387 if ($lt_i == "..") {
2388 lt_count++;
2389 } else {
2390 if (lt_count == 0) {
2391 lt_foo = "/" $lt_i lt_foo;
2392 } else {
2393 lt_count--;
2394 }
2395 }
2396 }
2397 }
2398 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2399 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2400 }'`
2401 # AWK program above erroneously prepends '/' to C:/dos/paths
2402 # for these hosts.
2403 case $host_os in
2404 mingw* | windows* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
2405 $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
2406 esac
2407 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
2408 else
2409 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2410 fi])
2411 library_names_spec=
2412 libname_spec='lib$name'
2413 soname_spec=
2414 shrext_cmds=.so
2415 postinstall_cmds=
2416 postuninstall_cmds=
2417 finish_cmds=
2418 finish_eval=
2419 shlibpath_var=
2420 shlibpath_overrides_runpath=unknown
2421 version_type=none
2422 dynamic_linker="$host_os ld.so"
2423 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2424 need_lib_prefix=unknown
2425 hardcode_into_libs=no
2426
2427 # when you set need_version to no, make sure it does not cause -set_version
2428 # flags to be left without arguments
2429 need_version=unknown
2430
2431 AC_ARG_VAR([LT_SYS_LIBRARY_PATH],
2432 [User-defined run-time library search path.])
2433
2434 case $host_os in
2435 aix3*)
2436 version_type=linux # correct to gnu/linux during the next big refactor
2437 library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
2438 shlibpath_var=LIBPATH
2439
2440 # AIX 3 has no versioning support, so we append a major version to the name.
2441 soname_spec='$libname$release$shared_ext$major'
2442 ;;
2443
2444 aix[[4-9]]*)
2445 version_type=linux # correct to gnu/linux during the next big refactor
2446 need_lib_prefix=no
2447 need_version=no
2448 hardcode_into_libs=yes
2449 if test ia64 = "$host_cpu"; then
2450 # AIX 5 supports IA64
2451 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
2452 shlibpath_var=LD_LIBRARY_PATH
2453 else
2454 # With GCC up to 2.95.x, collect2 would create an import file
2455 # for dependence libraries. The import file would start with
2456 # the line '#! .'. This would cause the generated library to
2457 # depend on '.', always an invalid library. This was fixed in
2458 # development snapshots of GCC prior to 3.0.
2459 case $host_os in
2460 aix4 | aix4.[[01]] | aix4.[[01]].*)
2461 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2462 echo ' yes '
2463 echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
2464 :
2465 else
2466 can_build_shared=no
2467 fi
2468 ;;
2469 esac
2470 # Using Import Files as archive members, it is possible to support
2471 # filename-based versioning of shared library archives on AIX. While
2472 # this would work for both with and without runtime linking, it will
2473 # prevent static linking of such archives. So we do filename-based
2474 # shared library versioning with .so extension only, which is used
2475 # when both runtime linking and shared linking is enabled.
2476 # Unfortunately, runtime linking may impact performance, so we do
2477 # not want this to be the default eventually. Also, we use the
2478 # versioned .so libs for executables only if there is the -brtl
2479 # linker flag in LDFLAGS as well, or --enable-aix-soname=svr4 only.
2480 # To allow for filename-based versioning support, we need to create
2481 # libNAME.so.V as an archive file, containing:
2482 # *) an Import File, referring to the versioned filename of the
2483 # archive as well as the shared archive member, telling the
2484 # bitwidth (32 or 64) of that shared object, and providing the
2485 # list of exported symbols of that shared object, eventually
2486 # decorated with the 'weak' keyword
2487 # *) the shared object with the F_LOADONLY flag set, to really avoid
2488 # it being seen by the linker.
2489 # At run time we better use the real file rather than another symlink,
2490 # but for link time we create the symlink libNAME.so -> libNAME.so.V
2491
2492 case $with_aix_soname,$aix_use_runtimelinking in
2493 # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
2494 # soname into executable. Probably we can add versioning support to
2495 # collect2, so additional links can be useful in future.
2496 aix,yes) # traditional libtool
2497 dynamic_linker='AIX unversionable lib.so'
2498 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2499 # instead of lib<name>.a to let people know that these are not
2500 # typical AIX shared libraries.
2501 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2502 ;;
2503 aix,no) # traditional AIX only
2504 dynamic_linker='AIX lib.a[(]lib.so.V[)]'
2505 # We preserve .a as extension for shared libraries through AIX4.2
2506 # and later when we are not doing run time linking.
2507 library_names_spec='$libname$release.a $libname.a'
2508 soname_spec='$libname$release$shared_ext$major'
2509 ;;
2510 svr4,*) # full svr4 only
2511 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
2512 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
2513 # We do not specify a path in Import Files, so LIBPATH fires.
2514 shlibpath_overrides_runpath=yes
2515 ;;
2516 *,yes) # both, prefer svr4
2517 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
2518 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
2519 # unpreferred sharedlib libNAME.a needs extra handling
2520 postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
2521 postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
2522 # We do not specify a path in Import Files, so LIBPATH fires.
2523 shlibpath_overrides_runpath=yes
2524 ;;
2525 *,no) # both, prefer aix
2526 dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
2527 library_names_spec='$libname$release.a $libname.a'
2528 soname_spec='$libname$release$shared_ext$major'
2529 # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
2530 postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
2531 postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
2532 ;;
2533 esac
2534 shlibpath_var=LIBPATH
2535 fi
2536 ;;
2537
2538 amigaos*)
2539 case $host_cpu in
2540 powerpc)
2541 # Since July 2007 AmigaOS4 officially supports .so libraries.
2542 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2543 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2544 ;;
2545 m68k)
2546 library_names_spec='$libname.ixlibrary $libname.a'
2547 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2548 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $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'
2549 ;;
2550 esac
2551 ;;
2552
2553 beos*)
2554 library_names_spec='$libname$shared_ext'
2555 dynamic_linker="$host_os ld.so"
2556 shlibpath_var=LIBRARY_PATH
2557 ;;
2558
2559 bsdi[[45]]*)
2560 version_type=linux # correct to gnu/linux during the next big refactor
2561 need_version=no
2562 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2563 soname_spec='$libname$release$shared_ext$major'
2564 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2565 shlibpath_var=LD_LIBRARY_PATH
2566 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2567 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2568 # the default ld.so.conf also contains /usr/contrib/lib and
2569 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2570 # libtool to hard-code these into programs
2571 ;;
2572
2573 cygwin* | mingw* | windows* | pw32* | cegcc*)
2574 version_type=windows
2575 shrext_cmds=.dll
2576 need_version=no
2577 need_lib_prefix=no
2578
2579 case $GCC,$cc_basename in
2580 yes,*)
2581 # gcc
2582 library_names_spec='$libname.dll.a'
2583 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2584 # If user builds GCC with multilib enabled,
2585 # it should just install on $(libdir)
2586 # not on $(libdir)/../bin or 32 bits dlls would override 64 bit ones.
2587 if test xyes = x"$multilib"; then
2588 postinstall_cmds='base_file=`basename \$file`~
2589 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
2590 dldir=$destdir/`dirname \$dlpath`~
2591 $install_prog $dir/$dlname $destdir/$dlname~
2592 chmod a+x $destdir/$dlname~
2593 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2594 eval '\''$striplib $destdir/$dlname'\'' || exit \$?;
2595 fi'
2596 else
2597 postinstall_cmds='base_file=`basename \$file`~
2598 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
2599 dldir=$destdir/`dirname \$dlpath`~
2600 test -d \$dldir || mkdir -p \$dldir~
2601 $install_prog $dir/$dlname \$dldir/$dlname~
2602 chmod a+x \$dldir/$dlname~
2603 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2604 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2605 fi'
2606 fi
2607 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2608 dlpath=$dir/\$dldll~
2609 $RM \$dlpath'
2610 shlibpath_overrides_runpath=yes
2611
2612 case $host_os in
2613 cygwin*)
2614 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2615 soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2616 m4_if([$1], [],[
2617 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
2618 ;;
2619 mingw* | windows* | cegcc*)
2620 # MinGW DLLs use traditional 'lib' prefix
2621 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2622 ;;
2623 pw32*)
2624 # pw32 DLLs use 'pw' prefix rather than 'lib'
2625 library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2626 ;;
2627 esac
2628 dynamic_linker='Win32 ld.exe'
2629 ;;
2630
2631 *,cl* | *,icl*)
2632 # Native MSVC or ICC
2633 libname_spec='$name'
2634 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2635 library_names_spec='$libname.dll.lib'
2636
2637 case $build_os in
2638 mingw* | windows*)
2639 sys_lib_search_path_spec=
2640 lt_save_ifs=$IFS
2641 IFS=';'
2642 for lt_path in $LIB
2643 do
2644 IFS=$lt_save_ifs
2645 # Let DOS variable expansion print the short 8.3 style file name.
2646 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
2647 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
2648 done
2649 IFS=$lt_save_ifs
2650 # Convert to MSYS style.
2651 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
2652 ;;
2653 cygwin*)
2654 # Convert to unix form, then to dos form, then back to unix form
2655 # but this time dos style (no spaces!) so that the unix form looks
2656 # like /cygdrive/c/PROGRA~1:/cygdr...
2657 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
2658 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
2659 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2660 ;;
2661 *)
2662 sys_lib_search_path_spec=$LIB
2663 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2664 # It is most probably a Windows format PATH.
2665 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2666 else
2667 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2668 fi
2669 # FIXME: find the short name or the path components, as spaces are
2670 # common. (e.g. "Program Files" -> "PROGRA~1")
2671 ;;
2672 esac
2673
2674 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2675 postinstall_cmds='base_file=`basename \$file`~
2676 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
2677 dldir=$destdir/`dirname \$dlpath`~
2678 test -d \$dldir || mkdir -p \$dldir~
2679 $install_prog $dir/$dlname \$dldir/$dlname'
2680 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2681 dlpath=$dir/\$dldll~
2682 $RM \$dlpath'
2683 shlibpath_overrides_runpath=yes
2684 dynamic_linker='Win32 link.exe'
2685 ;;
2686
2687 *)
2688 # Assume MSVC and ICC wrapper
2689 library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
2690 dynamic_linker='Win32 ld.exe'
2691 ;;
2692 esac
2693 # FIXME: first we should search . and the directory the executable is in
2694 shlibpath_var=PATH
2695 ;;
2696
2697 darwin* | rhapsody*)
2698 dynamic_linker="$host_os dyld"
2699 version_type=darwin
2700 need_lib_prefix=no
2701 need_version=no
2702 library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
2703 soname_spec='$libname$release$major$shared_ext'
2704 shlibpath_overrides_runpath=yes
2705 shlibpath_var=DYLD_LIBRARY_PATH
2706 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2707 m4_if([$1], [],[
2708 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2709 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2710 ;;
2711
2712 dgux*)
2713 version_type=linux # correct to gnu/linux during the next big refactor
2714 need_lib_prefix=no
2715 need_version=no
2716 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2717 soname_spec='$libname$release$shared_ext$major'
2718 shlibpath_var=LD_LIBRARY_PATH
2719 ;;
2720
2721 freebsd* | dragonfly* | midnightbsd*)
2722 # DragonFly does not have aout. When/if they implement a new
2723 # versioning mechanism, adjust this.
2724 if test -x /usr/bin/objformat; then
2725 objformat=`/usr/bin/objformat`
2726 else
2727 case $host_os in
2728 freebsd[[23]].*) objformat=aout ;;
2729 *) objformat=elf ;;
2730 esac
2731 fi
2732 version_type=freebsd-$objformat
2733 case $version_type in
2734 freebsd-elf*)
2735 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2736 soname_spec='$libname$release$shared_ext$major'
2737 need_version=no
2738 need_lib_prefix=no
2739 ;;
2740 freebsd-*)
2741 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
2742 need_version=yes
2743 ;;
2744 esac
2745 case $host_cpu in
2746 powerpc64)
2747 # On FreeBSD bi-arch platforms, a different variable is used for 32-bit
2748 # binaries. See <https://man.freebsd.org/cgi/man.cgi?query=ld.so>.
2749 AC_COMPILE_IFELSE(
2750 [AC_LANG_SOURCE(
2751 [[int test_pointer_size[sizeof (void *) - 5];
2752 ]])],
2753 [shlibpath_var=LD_LIBRARY_PATH],
2754 [shlibpath_var=LD_32_LIBRARY_PATH])
2755 ;;
2756 *)
2757 shlibpath_var=LD_LIBRARY_PATH
2758 ;;
2759 esac
2760 case $host_os in
2761 freebsd2.*)
2762 shlibpath_overrides_runpath=yes
2763 ;;
2764 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2765 shlibpath_overrides_runpath=yes
2766 hardcode_into_libs=yes
2767 ;;
2768 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2769 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2770 shlibpath_overrides_runpath=no
2771 hardcode_into_libs=yes
2772 ;;
2773 *) # from 4.6 on, and DragonFly
2774 shlibpath_overrides_runpath=yes
2775 hardcode_into_libs=yes
2776 ;;
2777 esac
2778 ;;
2779
2780 haiku*)
2781 version_type=linux # correct to gnu/linux during the next big refactor
2782 need_lib_prefix=no
2783 need_version=no
2784 dynamic_linker="$host_os runtime_loader"
2785 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2786 soname_spec='$libname$release$shared_ext$major'
2787 shlibpath_var=LIBRARY_PATH
2788 shlibpath_overrides_runpath=no
2789 sys_lib_search_path_spec='/boot/system/non-packaged/develop/lib /boot/system/develop/lib'
2790 sys_lib_dlsearch_path_spec='/boot/home/config/non-packaged/lib /boot/home/config/lib /boot/system/non-packaged/lib /boot/system/lib'
2791 hardcode_into_libs=no
2792 ;;
2793
2794 hpux9* | hpux10* | hpux11*)
2795 # Give a soname corresponding to the major version so that dld.sl refuses to
2796 # link against other versions.
2797 version_type=sunos
2798 need_lib_prefix=no
2799 need_version=no
2800 case $host_cpu in
2801 ia64*)
2802 shrext_cmds='.so'
2803 hardcode_into_libs=yes
2804 dynamic_linker="$host_os dld.so"
2805 shlibpath_var=LD_LIBRARY_PATH
2806 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2807 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2808 soname_spec='$libname$release$shared_ext$major'
2809 if test 32 = "$HPUX_IA64_MODE"; then
2810 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2811 sys_lib_dlsearch_path_spec=/usr/lib/hpux32
2812 else
2813 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2814 sys_lib_dlsearch_path_spec=/usr/lib/hpux64
2815 fi
2816 ;;
2817 hppa*64*)
2818 shrext_cmds='.sl'
2819 hardcode_into_libs=yes
2820 dynamic_linker="$host_os dld.sl"
2821 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2822 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2823 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2824 soname_spec='$libname$release$shared_ext$major'
2825 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2826 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2827 ;;
2828 *)
2829 shrext_cmds='.sl'
2830 dynamic_linker="$host_os dld.sl"
2831 shlibpath_var=SHLIB_PATH
2832 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2833 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2834 soname_spec='$libname$release$shared_ext$major'
2835 ;;
2836 esac
2837 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
2838 postinstall_cmds='chmod 555 $lib'
2839 # or fails outright, so override atomically:
2840 install_override_mode=555
2841 ;;
2842
2843 interix[[3-9]]*)
2844 version_type=linux # correct to gnu/linux during the next big refactor
2845 need_lib_prefix=no
2846 need_version=no
2847 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2848 soname_spec='$libname$release$shared_ext$major'
2849 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2850 shlibpath_var=LD_LIBRARY_PATH
2851 shlibpath_overrides_runpath=no
2852 hardcode_into_libs=yes
2853 ;;
2854
2855 irix5* | irix6* | nonstopux*)
2856 case $host_os in
2857 nonstopux*) version_type=nonstopux ;;
2858 *)
2859 if test yes = "$lt_cv_prog_gnu_ld"; then
2860 version_type=linux # correct to gnu/linux during the next big refactor
2861 else
2862 version_type=irix
2863 fi ;;
2864 esac
2865 need_lib_prefix=no
2866 need_version=no
2867 soname_spec='$libname$release$shared_ext$major'
2868 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
2869 case $host_os in
2870 irix5* | nonstopux*)
2871 libsuff= shlibsuff=
2872 ;;
2873 *)
2874 case $LD in # libtool.m4 will add one of these switches to LD
2875 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2876 libsuff= shlibsuff= libmagic=32-bit;;
2877 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2878 libsuff=32 shlibsuff=N32 libmagic=N32;;
2879 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2880 libsuff=64 shlibsuff=64 libmagic=64-bit;;
2881 *) libsuff= shlibsuff= libmagic=never-match;;
2882 esac
2883 ;;
2884 esac
2885 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2886 shlibpath_overrides_runpath=no
2887 sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
2888 sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
2889 hardcode_into_libs=yes
2890 ;;
2891
2892 # No shared lib support for Linux oldld, aout, or coff.
2893 linux*oldld* | linux*aout* | linux*coff*)
2894 dynamic_linker=no
2895 ;;
2896
2897 linux*android*)
2898 version_type=none # Android doesn't support versioned libraries.
2899 need_lib_prefix=no
2900 need_version=no
2901 library_names_spec='$libname$release$shared_ext $libname$shared_ext'
2902 soname_spec='$libname$release$shared_ext'
2903 finish_cmds=
2904 shlibpath_var=LD_LIBRARY_PATH
2905 shlibpath_overrides_runpath=yes
2906
2907 # This implies no fast_install, which is unacceptable.
2908 # Some rework will be needed to allow for fast_install
2909 # before this can be enabled.
2910 hardcode_into_libs=yes
2911
2912 dynamic_linker='Android linker'
2913 # -rpath works at least for libraries that are not overridden by
2914 # libraries installed in system locations.
2915 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
2916 ;;
2917
2918 # This must be glibc/ELF.
2919 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
2920 version_type=linux # correct to gnu/linux during the next big refactor
2921 need_lib_prefix=no
2922 need_version=no
2923 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2924 soname_spec='$libname$release$shared_ext$major'
2925 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2926 shlibpath_var=LD_LIBRARY_PATH
2927 shlibpath_overrides_runpath=no
2928
2929 # Some binutils ld are patched to set DT_RUNPATH
2930 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
2931 [lt_cv_shlibpath_overrides_runpath=no
2932 save_LDFLAGS=$LDFLAGS
2933 save_libdir=$libdir
2934 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
2935 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
2936 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2937 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
2938 [lt_cv_shlibpath_overrides_runpath=yes])])
2939 LDFLAGS=$save_LDFLAGS
2940 libdir=$save_libdir
2941 ])
2942 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
2943
2944 # This implies no fast_install, which is unacceptable.
2945 # Some rework will be needed to allow for fast_install
2946 # before this can be enabled.
2947 hardcode_into_libs=yes
2948
2949 # Add ABI-specific directories to the system library path.
2950 sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
2951
2952 # Ideally, we could use ldconfig to report *all* directories which are
2953 # searched for libraries, however this is still not possible. Aside from not
2954 # being certain /sbin/ldconfig is available, command
2955 # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
2956 # even though it is searched at run-time. Try to do the best guess by
2957 # appending ld.so.conf contents (and includes) to the search path.
2958 if test -f /etc/ld.so.conf; then
2959 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' ' '`
2960 sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
2961 fi
2962
2963 # We used to test for /lib/ld.so.1 and disable shared libraries on
2964 # powerpc, because MkLinux only supported shared libraries with the
2965 # GNU dynamic linker. Since this was broken with cross compilers,
2966 # most powerpc-linux boxes support dynamic linking these days and
2967 # people can always --disable-shared, the test was removed, and we
2968 # assume the GNU/Linux dynamic linker is in use.
2969 dynamic_linker='GNU/Linux ld.so'
2970 ;;
2971
2972 netbsdelf*-gnu)
2973 version_type=linux
2974 need_lib_prefix=no
2975 need_version=no
2976 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2977 soname_spec='$libname$release$shared_ext$major'
2978 shlibpath_var=LD_LIBRARY_PATH
2979 shlibpath_overrides_runpath=no
2980 hardcode_into_libs=yes
2981 dynamic_linker='NetBSD ld.elf_so'
2982 ;;
2983
2984 netbsd*)
2985 version_type=sunos
2986 need_lib_prefix=no
2987 need_version=no
2988 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
2989 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
2990 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2991 dynamic_linker='NetBSD (a.out) ld.so'
2992 else
2993 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2994 soname_spec='$libname$release$shared_ext$major'
2995 dynamic_linker='NetBSD ld.elf_so'
2996 fi
2997 shlibpath_var=LD_LIBRARY_PATH
2998 shlibpath_overrides_runpath=yes
2999 hardcode_into_libs=yes
3000 ;;
3001
3002 *-mlibc)
3003 version_type=linux # correct to gnu/linux during the next big refactor
3004 need_lib_prefix=no
3005 need_version=no
3006 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3007 soname_spec='$libname$release$shared_ext$major'
3008 dynamic_linker='mlibc ld.so'
3009 shlibpath_var=LD_LIBRARY_PATH
3010 shlibpath_overrides_runpath=no
3011 hardcode_into_libs=yes
3012 ;;
3013
3014 newsos6)
3015 version_type=linux # correct to gnu/linux during the next big refactor
3016 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3017 shlibpath_var=LD_LIBRARY_PATH
3018 shlibpath_overrides_runpath=yes
3019 ;;
3020
3021 *nto* | *qnx*)
3022 version_type=qnx
3023 need_lib_prefix=no
3024 need_version=no
3025 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3026 soname_spec='$libname$release$shared_ext$major'
3027 shlibpath_var=LD_LIBRARY_PATH
3028 shlibpath_overrides_runpath=no
3029 hardcode_into_libs=yes
3030 dynamic_linker='ldqnx.so'
3031 ;;
3032
3033 openbsd*)
3034 version_type=sunos
3035 sys_lib_dlsearch_path_spec=/usr/lib
3036 need_lib_prefix=no
3037 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
3038 need_version=no
3039 else
3040 need_version=yes
3041 fi
3042 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
3043 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3044 shlibpath_var=LD_LIBRARY_PATH
3045 shlibpath_overrides_runpath=yes
3046 ;;
3047
3048 os2*)
3049 libname_spec='$name'
3050 version_type=windows
3051 shrext_cmds=.dll
3052 need_version=no
3053 need_lib_prefix=no
3054 # OS/2 can only load a DLL with a base name of 8 characters or less.
3055 soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
3056 v=$($ECHO $release$versuffix | tr -d .-);
3057 n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
3058 $ECHO $n$v`$shared_ext'
3059 library_names_spec='${libname}_dll.$libext'
3060 dynamic_linker='OS/2 ld.exe'
3061 shlibpath_var=BEGINLIBPATH
3062 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
3063 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3064 postinstall_cmds='base_file=`basename \$file`~
3065 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
3066 dldir=$destdir/`dirname \$dlpath`~
3067 test -d \$dldir || mkdir -p \$dldir~
3068 $install_prog $dir/$dlname \$dldir/$dlname~
3069 chmod a+x \$dldir/$dlname~
3070 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
3071 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
3072 fi'
3073 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
3074 dlpath=$dir/\$dldll~
3075 $RM \$dlpath'
3076 ;;
3077
3078 osf3* | osf4* | osf5*)
3079 version_type=osf
3080 need_lib_prefix=no
3081 need_version=no
3082 soname_spec='$libname$release$shared_ext$major'
3083 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3084 shlibpath_var=LD_LIBRARY_PATH
3085 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3086 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3087 ;;
3088
3089 rdos*)
3090 dynamic_linker=no
3091 ;;
3092
3093 serenity*)
3094 version_type=linux # correct to gnu/linux during the next big refactor
3095 need_lib_prefix=no
3096 need_version=no
3097 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3098 soname_spec='$libname$release$shared_ext$major'
3099 shlibpath_var=LD_LIBRARY_PATH
3100 shlibpath_overrides_runpath=no
3101 dynamic_linker='SerenityOS LibELF'
3102 ;;
3103
3104 solaris*)
3105 version_type=linux # correct to gnu/linux during the next big refactor
3106 need_lib_prefix=no
3107 need_version=no
3108 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3109 soname_spec='$libname$release$shared_ext$major'
3110 shlibpath_var=LD_LIBRARY_PATH
3111 shlibpath_overrides_runpath=yes
3112 hardcode_into_libs=yes
3113 # ldd complains unless libraries are executable
3114 postinstall_cmds='chmod +x $lib'
3115 ;;
3116
3117 sunos4*)
3118 version_type=sunos
3119 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
3120 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3121 shlibpath_var=LD_LIBRARY_PATH
3122 shlibpath_overrides_runpath=yes
3123 if test yes = "$with_gnu_ld"; then
3124 need_lib_prefix=no
3125 fi
3126 need_version=yes
3127 ;;
3128
3129 sysv4 | sysv4.3*)
3130 version_type=linux # correct to gnu/linux during the next big refactor
3131 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3132 soname_spec='$libname$release$shared_ext$major'
3133 shlibpath_var=LD_LIBRARY_PATH
3134 case $host_vendor in
3135 sni)
3136 shlibpath_overrides_runpath=no
3137 need_lib_prefix=no
3138 runpath_var=LD_RUN_PATH
3139 ;;
3140 siemens)
3141 need_lib_prefix=no
3142 ;;
3143 motorola)
3144 need_lib_prefix=no
3145 need_version=no
3146 shlibpath_overrides_runpath=no
3147 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3148 ;;
3149 esac
3150 ;;
3151
3152 sysv4*MP*)
3153 if test -d /usr/nec; then
3154 version_type=linux # correct to gnu/linux during the next big refactor
3155 library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
3156 soname_spec='$libname$shared_ext.$major'
3157 shlibpath_var=LD_LIBRARY_PATH
3158 fi
3159 ;;
3160
3161 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3162 version_type=sco
3163 need_lib_prefix=no
3164 need_version=no
3165 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
3166 soname_spec='$libname$release$shared_ext$major'
3167 shlibpath_var=LD_LIBRARY_PATH
3168 shlibpath_overrides_runpath=yes
3169 hardcode_into_libs=yes
3170 if test yes = "$with_gnu_ld"; then
3171 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
3172 else
3173 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
3174 case $host_os in
3175 sco3.2v5*)
3176 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
3177 ;;
3178 esac
3179 fi
3180 sys_lib_dlsearch_path_spec='/usr/lib'
3181 ;;
3182
3183 tpf*)
3184 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
3185 version_type=linux # correct to gnu/linux during the next big refactor
3186 need_lib_prefix=no
3187 need_version=no
3188 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3189 shlibpath_var=LD_LIBRARY_PATH
3190 shlibpath_overrides_runpath=no
3191 hardcode_into_libs=yes
3192 ;;
3193
3194 uts4*)
3195 version_type=linux # correct to gnu/linux during the next big refactor
3196 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3197 soname_spec='$libname$release$shared_ext$major'
3198 shlibpath_var=LD_LIBRARY_PATH
3199 ;;
3200
3201 emscripten*)
3202 version_type=none
3203 need_lib_prefix=no
3204 need_version=no
3205 library_names_spec='$libname$release$shared_ext'
3206 soname_spec='$libname$release$shared_ext'
3207 finish_cmds=
3208 dynamic_linker="Emscripten linker"
3209 _LT_COMPILER_PIC($1)='-fPIC'
3210 _LT_TAGVAR(archive_cmds, $1)='$CC -sSIDE_MODULE=2 -shared $libobjs $deplibs $compiler_flags -o $lib'
3211 _LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -sSIDE_MODULE=2 -shared $libobjs $deplibs $compiler_flags -o $lib -s EXPORTED_FUNCTIONS=@$output_objdir/$soname.expsym'
3212 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
3213 _LT_TAGVAR(no_undefined_flag, $1)=
3214 ;;
3215
3216 *)
3217 dynamic_linker=no
3218 ;;
3219 esac
3220 AC_MSG_RESULT([$dynamic_linker])
3221 test no = "$dynamic_linker" && can_build_shared=no
3222
3223 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3224 if test yes = "$GCC"; then
3225 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3226 fi
3227
3228 if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
3229 sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
3230 fi
3231
3232 if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
3233 sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
3234 fi
3235
3236 # remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
3237 configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
3238
3239 # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
3240 func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
3241
3242 # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
3243 configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
3244
3245 _LT_DECL([], [variables_saved_for_relink], [1],
3246 [Variables whose values should be saved in libtool wrapper scripts and
3247 restored at link time])
3248 _LT_DECL([], [need_lib_prefix], [0],
3249 [Do we need the "lib" prefix for modules?])
3250 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
3251 _LT_DECL([], [version_type], [0], [Library versioning type])
3252 _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
3253 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
3254 _LT_DECL([], [shlibpath_overrides_runpath], [0],
3255 [Is shlibpath searched before the hard-coded library search path?])
3256 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
3257 _LT_DECL([], [library_names_spec], [1],
3258 [[List of archive names. First name is the real one, the rest are links.
3259 The last name is the one that the linker finds with -lNAME]])
3260 _LT_DECL([], [soname_spec], [1],
3261 [[The coded name of the library, if different from the real name]])
3262 _LT_DECL([], [install_override_mode], [1],
3263 [Permission mode override for installation of shared libraries])
3264 _LT_DECL([], [postinstall_cmds], [2],
3265 [Command to use after installation of a shared archive])
3266 _LT_DECL([], [postuninstall_cmds], [2],
3267 [Command to use after uninstallation of a shared archive])
3268 _LT_DECL([], [finish_cmds], [2],
3269 [Commands used to finish a libtool library installation in a directory])
3270 _LT_DECL([], [finish_eval], [1],
3271 [[As "finish_cmds", except a single script fragment to be evaled but
3272 not shown]])
3273 _LT_DECL([], [hardcode_into_libs], [0],
3274 [Whether we should hardcode library paths into libraries])
3275 _LT_DECL([], [sys_lib_search_path_spec], [2],
3276 [Compile-time system search path for libraries])
3277 _LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
3278 [Detected run-time system search path for libraries])
3279 _LT_DECL([], [configure_time_lt_sys_library_path], [2],
3280 [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
3281 ])# _LT_SYS_DYNAMIC_LINKER
3282
3283
3284 # _LT_PATH_TOOL_PREFIX(TOOL)
3285 # --------------------------
3286 # find a file program that can recognize shared library
3287 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
3288 [m4_require([_LT_DECL_EGREP])dnl
3289 AC_MSG_CHECKING([for $1])
3290 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3291 [case $MAGIC_CMD in
3292 [[\\/*] | ?:[\\/]*])
3293 lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
3294 ;;
3295 *)
3296 lt_save_MAGIC_CMD=$MAGIC_CMD
3297 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
3298 dnl $ac_dummy forces splitting on constant user-supplied paths.
3299 dnl POSIX.2 word splitting is done only on the output of word expansions,
3300 dnl not every word. This closes a longstanding sh security hole.
3301 ac_dummy="m4_if([$2], , $PATH, [$2])"
3302 for ac_dir in $ac_dummy; do
3303 IFS=$lt_save_ifs
3304 test -z "$ac_dir" && ac_dir=.
3305 if test -f "$ac_dir/$1"; then
3306 lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
3307 if test -n "$file_magic_test_file"; then
3308 case $deplibs_check_method in
3309 "file_magic "*)
3310 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3311 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
3312 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3313 $EGREP "$file_magic_regex" > /dev/null; then
3314 :
3315 else
3316 cat <<_LT_EOF 1>&2
3317
3318 *** Warning: the command libtool uses to detect shared libraries,
3319 *** $file_magic_cmd, produces output that libtool cannot recognize.
3320 *** The result is that libtool may fail to recognize shared libraries
3321 *** as such. This will affect the creation of libtool libraries that
3322 *** depend on shared libraries, but programs linked with such libtool
3323 *** libraries will work regardless of this problem. Nevertheless, you
3324 *** may want to report the problem to your system manager and/or to
3325 *** [email protected]
3326
3327 _LT_EOF
3328 fi ;;
3329 esac
3330 fi
3331 break
3332 fi
3333 done
3334 IFS=$lt_save_ifs
3335 MAGIC_CMD=$lt_save_MAGIC_CMD
3336 ;;
3337 esac])
3338 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
3339 if test -n "$MAGIC_CMD"; then
3340 AC_MSG_RESULT($MAGIC_CMD)
3341 else
3342 AC_MSG_RESULT(no)
3343 fi
3344 _LT_DECL([], [MAGIC_CMD], [0],
3345 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
3346 ])# _LT_PATH_TOOL_PREFIX
3347
3348 # Old name:
3349 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
3350 dnl aclocal-1.4 backwards compatibility:
3351 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
3352
3353
3354 # _LT_PATH_MAGIC
3355 # --------------
3356 # find a file program that can recognize a shared library
3357 m4_defun([_LT_PATH_MAGIC],
3358 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3359 if test -z "$lt_cv_path_MAGIC_CMD"; then
3360 if test -n "$ac_tool_prefix"; then
3361 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3362 else
3363 MAGIC_CMD=:
3364 fi
3365 fi
3366 ])# _LT_PATH_MAGIC
3367
3368
3369 # LT_PATH_LD
3370 # ----------
3371 # find the pathname to the GNU or non-GNU linker
3372 AC_DEFUN([LT_PATH_LD],
3373 [AC_REQUIRE([AC_PROG_CC])dnl
3374 AC_REQUIRE([AC_CANONICAL_HOST])dnl
3375 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3376 m4_require([_LT_DECL_SED])dnl
3377 m4_require([_LT_DECL_EGREP])dnl
3378 m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
3379
3380 AC_ARG_WITH([gnu-ld],
3381 [AS_HELP_STRING([--with-gnu-ld],
3382 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
3383 [test no = "$withval" || with_gnu_ld=yes],
3384 [with_gnu_ld=no])dnl
3385
3386 ac_prog=ld
3387 if test yes = "$GCC"; then
3388 # Check if gcc -print-prog-name=ld gives a path.
3389 AC_MSG_CHECKING([for ld used by $CC])
3390 case $host in
3391 *-*-mingw* | *-*-windows*)
3392 # gcc leaves a trailing carriage return, which upsets mingw
3393 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3394 *)
3395 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3396 esac
3397 case $ac_prog in
3398 # Accept absolute paths.
3399 [[\\/]]* | ?:[[\\/]]*)
3400 re_direlt='/[[^/]][[^/]]*/\.\./'
3401 # Canonicalize the pathname of ld
3402 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
3403 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
3404 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
3405 done
3406 test -z "$LD" && LD=$ac_prog
3407 ;;
3408 "")
3409 # If it fails, then pretend we aren't using GCC.
3410 ac_prog=ld
3411 ;;
3412 *)
3413 # If it is relative, then search for the first ld in PATH.
3414 with_gnu_ld=unknown
3415 ;;
3416 esac
3417 elif test yes = "$with_gnu_ld"; then
3418 AC_MSG_CHECKING([for GNU ld])
3419 else
3420 AC_MSG_CHECKING([for non-GNU ld])
3421 fi
3422 AC_CACHE_VAL(lt_cv_path_LD,
3423 [if test -z "$LD"; then
3424 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
3425 for ac_dir in $PATH; do
3426 IFS=$lt_save_ifs
3427 test -z "$ac_dir" && ac_dir=.
3428 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3429 lt_cv_path_LD=$ac_dir/$ac_prog
3430 # Check to see if the program is GNU ld. I'd rather use --version,
3431 # but apparently some variants of GNU ld only accept -v.
3432 # Break only if it was the GNU/non-GNU ld that we prefer.
3433 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3434 *GNU* | *'with BFD'*)
3435 test no != "$with_gnu_ld" && break
3436 ;;
3437 *)
3438 test yes != "$with_gnu_ld" && break
3439 ;;
3440 esac
3441 fi
3442 done
3443 IFS=$lt_save_ifs
3444 else
3445 lt_cv_path_LD=$LD # Let the user override the test with a path.
3446 fi])
3447 LD=$lt_cv_path_LD
3448 if test -n "$LD"; then
3449 AC_MSG_RESULT($LD)
3450 else
3451 AC_MSG_RESULT(no)
3452 fi
3453 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3454 _LT_PATH_LD_GNU
3455 AC_SUBST([LD])
3456
3457 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
3458 ])# LT_PATH_LD
3459
3460 # Old names:
3461 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
3462 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
3463 dnl aclocal-1.4 backwards compatibility:
3464 dnl AC_DEFUN([AM_PROG_LD], [])
3465 dnl AC_DEFUN([AC_PROG_LD], [])
3466
3467
3468 # _LT_PATH_LD_GNU
3469 #- --------------
3470 m4_defun([_LT_PATH_LD_GNU],
3471 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3472 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
3473 case `$LD -v 2>&1 </dev/null` in
3474 *GNU* | *'with BFD'*)
3475 lt_cv_prog_gnu_ld=yes
3476 ;;
3477 *)
3478 lt_cv_prog_gnu_ld=no
3479 ;;
3480 esac])
3481 with_gnu_ld=$lt_cv_prog_gnu_ld
3482 ])# _LT_PATH_LD_GNU
3483
3484
3485 # _LT_CMD_RELOAD
3486 # --------------
3487 # find reload flag for linker
3488 # -- PORTME Some linkers may need a different reload flag.
3489 m4_defun([_LT_CMD_RELOAD],
3490 [AC_CACHE_CHECK([for $LD option to reload object files],
3491 lt_cv_ld_reload_flag,
3492 [lt_cv_ld_reload_flag='-r'])
3493 reload_flag=$lt_cv_ld_reload_flag
3494 case $reload_flag in
3495 "" | " "*) ;;
3496 *) reload_flag=" $reload_flag" ;;
3497 esac
3498 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3499 case $host_os in
3500 cygwin* | mingw* | windows* | pw32* | cegcc*)
3501 if test yes != "$GCC"; then
3502 reload_cmds=false
3503 fi
3504 ;;
3505 darwin*)
3506 if test yes = "$GCC"; then
3507 reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
3508 else
3509 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3510 fi
3511 ;;
3512 esac
3513 _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
3514 _LT_TAGDECL([], [reload_cmds], [2])dnl
3515 ])# _LT_CMD_RELOAD
3516
3517
3518 # _LT_PATH_DD
3519 # -----------
3520 # find a working dd
3521 m4_defun([_LT_PATH_DD],
3522 [AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
3523 [printf 0123456789abcdef0123456789abcdef >conftest.i
3524 cat conftest.i conftest.i >conftest2.i
3525 : ${lt_DD:=$DD}
3526 AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
3527 [if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
3528 cmp -s conftest.i conftest.out \
3529 && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
3530 fi])
3531 rm -f conftest.i conftest2.i conftest.out])
3532 ])# _LT_PATH_DD
3533
3534
3535 # _LT_CMD_TRUNCATE
3536 # ----------------
3537 # find command to truncate a binary pipe
3538 m4_defun([_LT_CMD_TRUNCATE],
3539 [m4_require([_LT_PATH_DD])
3540 AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
3541 [printf 0123456789abcdef0123456789abcdef >conftest.i
3542 cat conftest.i conftest.i >conftest2.i
3543 lt_cv_truncate_bin=
3544 if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
3545 cmp -s conftest.i conftest.out \
3546 && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
3547 fi
3548 rm -f conftest.i conftest2.i conftest.out
3549 test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
3550 _LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
3551 [Command to truncate a binary pipe])
3552 ])# _LT_CMD_TRUNCATE
3553
3554
3555 # _LT_CHECK_MAGIC_METHOD
3556 # ----------------------
3557 # how to check for library dependencies
3558 # -- PORTME fill in with the dynamic library characteristics
3559 m4_defun([_LT_CHECK_MAGIC_METHOD],
3560 [m4_require([_LT_DECL_EGREP])
3561 m4_require([_LT_DECL_OBJDUMP])
3562 AC_CACHE_CHECK([how to recognize dependent libraries],
3563 lt_cv_deplibs_check_method,
3564 [lt_cv_file_magic_cmd='$MAGIC_CMD'
3565 lt_cv_file_magic_test_file=
3566 lt_cv_deplibs_check_method='unknown'
3567 # Need to set the preceding variable on all platforms that support
3568 # interlibrary dependencies.
3569 # 'none' -- dependencies not supported.
3570 # 'unknown' -- same as none, but documents that we really don't know.
3571 # 'pass_all' -- all dependencies passed with no checks.
3572 # 'file_magic [[regex]]' -- check by looking for files in library path
3573 # that responds to the $file_magic_cmd with a given extended regex.
3574 # If you have 'file' or equivalent on your system and you're not sure
3575 # whether 'pass_all' will *always* work, you probably want this one.
3576
3577 case $host_os in
3578 aix[[4-9]]*)
3579 lt_cv_deplibs_check_method=pass_all
3580 ;;
3581
3582 beos*)
3583 lt_cv_deplibs_check_method=pass_all
3584 ;;
3585
3586 bsdi[[45]]*)
3587 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3588 lt_cv_file_magic_cmd='$FILECMD -L'
3589 lt_cv_file_magic_test_file=/shlib/libc.so
3590 ;;
3591
3592 cygwin*)
3593 # func_win32_libid is a shell function defined in ltmain.sh
3594 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3595 lt_cv_file_magic_cmd='func_win32_libid'
3596 ;;
3597
3598 mingw* | windows* | pw32*)
3599 # Base MSYS/MinGW do not provide the 'file' command needed by
3600 # func_win32_libid shell function, so use a weaker test based on 'objdump',
3601 # unless we find 'file', for example because we are cross-compiling.
3602 if ( file / ) >/dev/null 2>&1; then
3603 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3604 lt_cv_file_magic_cmd='func_win32_libid'
3605 else
3606 # Keep this pattern in sync with the one in func_win32_libid.
3607 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64|pe-aarch64)'
3608 lt_cv_file_magic_cmd='$OBJDUMP -f'
3609 fi
3610 ;;
3611
3612 cegcc*)
3613 # use the weaker test based on 'objdump'. See mingw*.
3614 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3615 lt_cv_file_magic_cmd='$OBJDUMP -f'
3616 ;;
3617
3618 darwin* | rhapsody*)
3619 lt_cv_deplibs_check_method=pass_all
3620 ;;
3621
3622 freebsd* | dragonfly* | midnightbsd*)
3623 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3624 case $host_cpu in
3625 i*86 )
3626 # Not sure whether the presence of OpenBSD here was a mistake.
3627 # Let's accept both of them until this is cleared up.
3628 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3629 lt_cv_file_magic_cmd=$FILECMD
3630 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3631 ;;
3632 esac
3633 else
3634 lt_cv_deplibs_check_method=pass_all
3635 fi
3636 ;;
3637
3638 haiku*)
3639 lt_cv_deplibs_check_method=pass_all
3640 ;;
3641
3642 hpux10.20* | hpux11*)
3643 lt_cv_file_magic_cmd=$FILECMD
3644 case $host_cpu in
3645 ia64*)
3646 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3647 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3648 ;;
3649 hppa*64*)
3650 [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]']
3651 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3652 ;;
3653 *)
3654 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
3655 lt_cv_file_magic_test_file=/usr/lib/libc.sl
3656 ;;
3657 esac
3658 ;;
3659
3660 interix[[3-9]]*)
3661 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3662 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3663 ;;
3664
3665 irix5* | irix6* | nonstopux*)
3666 case $LD in
3667 *-32|*"-32 ") libmagic=32-bit;;
3668 *-n32|*"-n32 ") libmagic=N32;;
3669 *-64|*"-64 ") libmagic=64-bit;;
3670 *) libmagic=never-match;;
3671 esac
3672 lt_cv_deplibs_check_method=pass_all
3673 ;;
3674
3675 # This must be glibc/ELF.
3676 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
3677 lt_cv_deplibs_check_method=pass_all
3678 ;;
3679
3680 *-mlibc)
3681 lt_cv_deplibs_check_method=pass_all
3682 ;;
3683
3684 netbsd* | netbsdelf*-gnu)
3685 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3686 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3687 else
3688 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3689 fi
3690 ;;
3691
3692 newos6*)
3693 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3694 lt_cv_file_magic_cmd=$FILECMD
3695 lt_cv_file_magic_test_file=/usr/lib/libnls.so
3696 ;;
3697
3698 *nto* | *qnx*)
3699 lt_cv_deplibs_check_method=pass_all
3700 ;;
3701
3702 openbsd*)
3703 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
3704 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3705 else
3706 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3707 fi
3708 ;;
3709
3710 osf3* | osf4* | osf5*)
3711 lt_cv_deplibs_check_method=pass_all
3712 ;;
3713
3714 rdos*)
3715 lt_cv_deplibs_check_method=pass_all
3716 ;;
3717
3718 serenity*)
3719 lt_cv_deplibs_check_method=pass_all
3720 ;;
3721
3722 solaris*)
3723 lt_cv_deplibs_check_method=pass_all
3724 ;;
3725
3726 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3727 lt_cv_deplibs_check_method=pass_all
3728 ;;
3729
3730 sysv4 | sysv4.3*)
3731 case $host_vendor in
3732 motorola)
3733 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]]'
3734 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3735 ;;
3736 ncr)
3737 lt_cv_deplibs_check_method=pass_all
3738 ;;
3739 sequent)
3740 lt_cv_file_magic_cmd='/bin/file'
3741 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3742 ;;
3743 sni)
3744 lt_cv_file_magic_cmd='/bin/file'
3745 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3746 lt_cv_file_magic_test_file=/lib/libc.so
3747 ;;
3748 siemens)
3749 lt_cv_deplibs_check_method=pass_all
3750 ;;
3751 pc)
3752 lt_cv_deplibs_check_method=pass_all
3753 ;;
3754 esac
3755 ;;
3756
3757 tpf*)
3758 lt_cv_deplibs_check_method=pass_all
3759 ;;
3760 os2*)
3761 lt_cv_deplibs_check_method=pass_all
3762 ;;
3763 esac
3764 ])
3765
3766 file_magic_glob=
3767 want_nocaseglob=no
3768 if test "$build" = "$host"; then
3769 case $host_os in
3770 mingw* | windows* | pw32*)
3771 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
3772 want_nocaseglob=yes
3773 else
3774 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
3775 fi
3776 ;;
3777 esac
3778 fi
3779
3780 file_magic_cmd=$lt_cv_file_magic_cmd
3781 deplibs_check_method=$lt_cv_deplibs_check_method
3782 test -z "$deplibs_check_method" && deplibs_check_method=unknown
3783
3784 _LT_DECL([], [deplibs_check_method], [1],
3785 [Method to check whether dependent libraries are shared objects])
3786 _LT_DECL([], [file_magic_cmd], [1],
3787 [Command to use when deplibs_check_method = "file_magic"])
3788 _LT_DECL([], [file_magic_glob], [1],
3789 [How to find potential files when deplibs_check_method = "file_magic"])
3790 _LT_DECL([], [want_nocaseglob], [1],
3791 [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
3792 ])# _LT_CHECK_MAGIC_METHOD
3793
3794
3795 # LT_PATH_NM
3796 # ----------
3797 # find the pathname to a BSD- or MS-compatible name lister
3798 AC_DEFUN([LT_PATH_NM],
3799 [AC_REQUIRE([AC_PROG_CC])dnl
3800 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
3801 [if test -n "$NM"; then
3802 # Let the user override the test.
3803 lt_cv_path_NM=$NM
3804 else
3805 lt_nm_to_check=${ac_tool_prefix}nm
3806 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3807 lt_nm_to_check="$lt_nm_to_check nm"
3808 fi
3809 for lt_tmp_nm in $lt_nm_to_check; do
3810 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
3811 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3812 IFS=$lt_save_ifs
3813 test -z "$ac_dir" && ac_dir=.
3814 tmp_nm=$ac_dir/$lt_tmp_nm
3815 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
3816 # Check to see if the nm accepts a BSD-compat flag.
3817 # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
3818 # nm: unknown option "B" ignored
3819 # Tru64's nm complains that /dev/null is an invalid object file
3820 # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
3821 case $build_os in
3822 mingw* | windows*) lt_bad_file=conftest.nm/nofile ;;
3823 *) lt_bad_file=/dev/null ;;
3824 esac
3825 case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in
3826 *$lt_bad_file* | *'Invalid file or object type'*)
3827 lt_cv_path_NM="$tmp_nm -B"
3828 break 2
3829 ;;
3830 *)
3831 case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in
3832 */dev/null*)
3833 lt_cv_path_NM="$tmp_nm -p"
3834 break 2
3835 ;;
3836 *)
3837 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3838 continue # so that we can try to find one that supports BSD flags
3839 ;;
3840 esac
3841 ;;
3842 esac
3843 fi
3844 done
3845 IFS=$lt_save_ifs
3846 done
3847 : ${lt_cv_path_NM=no}
3848 fi])
3849 if test no != "$lt_cv_path_NM"; then
3850 NM=$lt_cv_path_NM
3851 else
3852 # Didn't find any BSD compatible name lister, look for dumpbin.
3853 if test -n "$DUMPBIN"; then :
3854 # Let the user override the test.
3855 else
3856 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
3857 case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in
3858 *COFF*)
3859 DUMPBIN="$DUMPBIN -symbols -headers"
3860 ;;
3861 *)
3862 DUMPBIN=:
3863 ;;
3864 esac
3865 fi
3866 AC_SUBST([DUMPBIN])
3867 if test : != "$DUMPBIN"; then
3868 NM=$DUMPBIN
3869 fi
3870 fi
3871 test -z "$NM" && NM=nm
3872 AC_SUBST([NM])
3873 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3874
3875 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3876 [lt_cv_nm_interface="BSD nm"
3877 echo "int some_variable = 0;" > conftest.$ac_ext
3878 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3879 (eval "$ac_compile" 2>conftest.err)
3880 cat conftest.err >&AS_MESSAGE_LOG_FD
3881 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3882 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3883 cat conftest.err >&AS_MESSAGE_LOG_FD
3884 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
3885 cat conftest.out >&AS_MESSAGE_LOG_FD
3886 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3887 lt_cv_nm_interface="MS dumpbin"
3888 fi
3889 rm -f conftest*])
3890 ])# LT_PATH_NM
3891
3892 # Old names:
3893 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3894 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3895 dnl aclocal-1.4 backwards compatibility:
3896 dnl AC_DEFUN([AM_PROG_NM], [])
3897 dnl AC_DEFUN([AC_PROG_NM], [])
3898
3899 # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3900 # --------------------------------
3901 # how to determine the name of the shared library
3902 # associated with a specific link library.
3903 # -- PORTME fill in with the dynamic library characteristics
3904 m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
3905 [m4_require([_LT_DECL_EGREP])
3906 m4_require([_LT_DECL_OBJDUMP])
3907 m4_require([_LT_DECL_DLLTOOL])
3908 AC_CACHE_CHECK([how to associate runtime and link libraries],
3909 lt_cv_sharedlib_from_linklib_cmd,
3910 [lt_cv_sharedlib_from_linklib_cmd='unknown'
3911
3912 case $host_os in
3913 cygwin* | mingw* | windows* | pw32* | cegcc*)
3914 # two different shell functions defined in ltmain.sh;
3915 # decide which one to use based on capabilities of $DLLTOOL
3916 case `$DLLTOOL --help 2>&1` in
3917 *--identify-strict*)
3918 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
3919 ;;
3920 *)
3921 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
3922 ;;
3923 esac
3924 ;;
3925 *)
3926 # fallback: assume linklib IS sharedlib
3927 lt_cv_sharedlib_from_linklib_cmd=$ECHO
3928 ;;
3929 esac
3930 ])
3931 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
3932 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
3933
3934 _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
3935 [Command to associate shared and link libraries])
3936 ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3937
3938
3939 # _LT_PATH_MANIFEST_TOOL
3940 # ----------------------
3941 # locate the manifest tool
3942 m4_defun([_LT_PATH_MANIFEST_TOOL],
3943 [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
3944 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
3945 AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_manifest_tool],
3946 [lt_cv_path_manifest_tool=no
3947 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
3948 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
3949 cat conftest.err >&AS_MESSAGE_LOG_FD
3950 if $GREP 'Manifest Tool' conftest.out > /dev/null; then
3951 lt_cv_path_manifest_tool=yes
3952 fi
3953 rm -f conftest*])
3954 if test yes != "$lt_cv_path_manifest_tool"; then
3955 MANIFEST_TOOL=:
3956 fi
3957 _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
3958 ])# _LT_PATH_MANIFEST_TOOL
3959
3960
3961 # _LT_DLL_DEF_P([FILE])
3962 # ---------------------
3963 # True iff FILE is a Windows DLL '.def' file.
3964 # Keep in sync with func_dll_def_p in the libtool script
3965 AC_DEFUN([_LT_DLL_DEF_P],
3966 [dnl
3967 test DEF = "`$SED -n dnl
3968 -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace
3969 -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments
3970 -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl
3971 -e q dnl Only consider the first "real" line
3972 $1`" dnl
3973 ])# _LT_DLL_DEF_P
3974
3975
3976 # LT_LIB_M
3977 # --------
3978 # check for math library
3979 AC_DEFUN([LT_LIB_M],
3980 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3981 LIBM=
3982 case $host in
3983 *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-mingw* | *-*-pw32* | *-*-darwin*)
3984 # These system don't have libm, or don't need it
3985 ;;
3986 *-ncr-sysv4.3*)
3987 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
3988 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3989 ;;
3990 *)
3991 AC_CHECK_LIB(m, cos, LIBM=-lm)
3992 ;;
3993 esac
3994 AC_SUBST([LIBM])
3995 ])# LT_LIB_M
3996
3997 # Old name:
3998 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
3999 dnl aclocal-1.4 backwards compatibility:
4000 dnl AC_DEFUN([AC_CHECK_LIBM], [])
4001
4002
4003 # _LT_COMPILER_NO_RTTI([TAGNAME])
4004 # -------------------------------
4005 m4_defun([_LT_COMPILER_NO_RTTI],
4006 [m4_require([_LT_TAG_COMPILER])dnl
4007
4008 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4009
4010 if test yes = "$GCC"; then
4011 case $cc_basename in
4012 nvcc*)
4013 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
4014 *)
4015 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
4016 esac
4017
4018 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4019 lt_cv_prog_compiler_rtti_exceptions,
4020 [-fno-rtti -fno-exceptions], [],
4021 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4022 fi
4023 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
4024 [Compiler flag to turn off builtin functions])
4025 ])# _LT_COMPILER_NO_RTTI
4026
4027
4028 # _LT_CMD_GLOBAL_SYMBOLS
4029 # ----------------------
4030 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
4031 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4032 AC_REQUIRE([AC_PROG_CC])dnl
4033 AC_REQUIRE([AC_PROG_AWK])dnl
4034 AC_REQUIRE([LT_PATH_NM])dnl
4035 AC_REQUIRE([LT_PATH_LD])dnl
4036 m4_require([_LT_DECL_SED])dnl
4037 m4_require([_LT_DECL_EGREP])dnl
4038 m4_require([_LT_TAG_COMPILER])dnl
4039
4040 # Check for command to grab the raw symbol name followed by C symbol from nm.
4041 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4042 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4043 [
4044 # These are sane defaults that work on at least a few old systems.
4045 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
4046
4047 # Character class describing NM global symbol codes.
4048 symcode='[[BCDEGRST]]'
4049
4050 # Regexp to match symbols that can be accessed directly from C.
4051 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4052
4053 # Define system-specific variables.
4054 case $host_os in
4055 aix*)
4056 symcode='[[BCDT]]'
4057 ;;
4058 cygwin* | mingw* | windows* | pw32* | cegcc*)
4059 symcode='[[ABCDGISTW]]'
4060 ;;
4061 hpux*)
4062 if test ia64 = "$host_cpu"; then
4063 symcode='[[ABCDEGRST]]'
4064 fi
4065 ;;
4066 irix* | nonstopux*)
4067 symcode='[[BCDEGRST]]'
4068 ;;
4069 osf*)
4070 symcode='[[BCDEGQRST]]'
4071 ;;
4072 solaris*)
4073 symcode='[[BCDRT]]'
4074 ;;
4075 sco3.2v5*)
4076 symcode='[[DT]]'
4077 ;;
4078 sysv4.2uw2*)
4079 symcode='[[DT]]'
4080 ;;
4081 sysv5* | sco5v6* | unixware* | OpenUNIX*)
4082 symcode='[[ABDT]]'
4083 ;;
4084 sysv4)
4085 symcode='[[DFNSTU]]'
4086 ;;
4087 esac
4088
4089 # If we're using GNU nm, then use its standard symbol codes.
4090 case `$NM -V 2>&1` in
4091 *GNU* | *'with BFD'*)
4092 symcode='[[ABCDGIRSTW]]' ;;
4093 esac
4094
4095 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4096 # Gets list of data symbols to import.
4097 lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'"
4098 # Adjust the below global symbol transforms to fixup imported variables.
4099 lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
4100 lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
4101 lt_c_name_lib_hook="\
4102 -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\
4103 -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'"
4104 else
4105 # Disable hooks by default.
4106 lt_cv_sys_global_symbol_to_import=
4107 lt_cdecl_hook=
4108 lt_c_name_hook=
4109 lt_c_name_lib_hook=
4110 fi
4111
4112 # Transform an extracted symbol line into a proper C declaration.
4113 # Some systems (esp. on ia64) link data and code symbols differently,
4114 # so use this general approach.
4115 lt_cv_sys_global_symbol_to_cdecl="$SED -n"\
4116 $lt_cdecl_hook\
4117 " -e 's/^T .* \(.*\)$/extern int \1();/p'"\
4118 " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
4119
4120 # Transform an extracted symbol line into symbol name and symbol address
4121 lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\
4122 $lt_c_name_hook\
4123 " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
4124 " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
4125
4126 # Transform an extracted symbol line into symbol name with lib prefix and
4127 # symbol address.
4128 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\
4129 $lt_c_name_lib_hook\
4130 " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
4131 " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
4132 " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'"
4133
4134 # Handle CRLF in mingw tool chain
4135 opt_cr=
4136 case $build_os in
4137 mingw* | windows*)
4138 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4139 ;;
4140 esac
4141
4142 # Try without a prefix underscore, then with it.
4143 for ac_symprfx in "" "_"; do
4144
4145 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4146 symxfrm="\\1 $ac_symprfx\\2 \\2"
4147
4148 # Write the raw and C identifiers.
4149 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4150 # Fake it for dumpbin and say T for any non-static function,
4151 # D for any global variable and I for any imported variable.
4152 # Also find C++ and __fastcall symbols from MSVC++ or ICC,
4153 # which start with @ or ?.
4154 lt_cv_sys_global_symbol_pipe="$AWK ['"\
4155 " {last_section=section; section=\$ 3};"\
4156 " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
4157 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
4158 " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
4159 " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
4160 " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
4161 " \$ 0!~/External *\|/{next};"\
4162 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
4163 " {if(hide[section]) next};"\
4164 " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
4165 " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
4166 " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
4167 " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
4168 " ' prfx=^$ac_symprfx]"
4169 else
4170 lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4171 fi
4172 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'"
4173
4174 # Check to see that the pipe works correctly.
4175 pipe_works=no
4176
4177 rm -f conftest*
4178 cat > conftest.$ac_ext <<_LT_EOF
4179 #ifdef __cplusplus
4180 extern "C" {
4181 #endif
4182 char nm_test_var;
4183 void nm_test_func(void);
4184 void nm_test_func(void){}
4185 #ifdef __cplusplus
4186 }
4187 #endif
4188 int main(void){nm_test_var='a';nm_test_func();return(0);}
4189 _LT_EOF
4190
4191 if AC_TRY_EVAL(ac_compile); then
4192 # Now try to grab the symbols.
4193 nlist=conftest.nm
4194 $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&AS_MESSAGE_LOG_FD
4195 if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&AS_MESSAGE_LOG_FD && test -s "$nlist"; then
4196 # Try sorting and uniquifying the output.
4197 if sort "$nlist" | uniq > "$nlist"T; then
4198 mv -f "$nlist"T "$nlist"
4199 else
4200 rm -f "$nlist"T
4201 fi
4202
4203 # Make sure that we snagged all the symbols we need.
4204 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
4205 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
4206 cat <<_LT_EOF > conftest.$ac_ext
4207 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
4208 #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
4209 /* DATA imports from DLLs on WIN32 can't be const, because runtime
4210 relocations are performed -- see ld's documentation on pseudo-relocs. */
4211 # define LT@&t@_DLSYM_CONST
4212 #elif defined __osf__
4213 /* This system does not cope well with relocations in const data. */
4214 # define LT@&t@_DLSYM_CONST
4215 #else
4216 # define LT@&t@_DLSYM_CONST const
4217 #endif
4218
4219 #ifdef __cplusplus
4220 extern "C" {
4221 #endif
4222
4223 _LT_EOF
4224 # Now generate the symbol file.
4225 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
4226
4227 cat <<_LT_EOF >> conftest.$ac_ext
4228
4229 /* The mapping between symbol names and symbols. */
4230 LT@&t@_DLSYM_CONST struct {
4231 const char *name;
4232 void *address;
4233 }
4234 lt__PROGRAM__LTX_preloaded_symbols[[]] =
4235 {
4236 { "@PROGRAM@", (void *) 0 },
4237 _LT_EOF
4238 $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
4239 cat <<\_LT_EOF >> conftest.$ac_ext
4240 {0, (void *) 0}
4241 };
4242
4243 /* This works around a problem in FreeBSD linker */
4244 #ifdef FREEBSD_WORKAROUND
4245 static const void *lt_preloaded_setup() {
4246 return lt__PROGRAM__LTX_preloaded_symbols;
4247 }
4248 #endif
4249
4250 #ifdef __cplusplus
4251 }
4252 #endif
4253 _LT_EOF
4254 # Now try linking the two files.
4255 mv conftest.$ac_objext conftstm.$ac_objext
4256 lt_globsym_save_LIBS=$LIBS
4257 lt_globsym_save_CFLAGS=$CFLAGS
4258 LIBS=conftstm.$ac_objext
4259 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4260 if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
4261 pipe_works=yes
4262 fi
4263 LIBS=$lt_globsym_save_LIBS
4264 CFLAGS=$lt_globsym_save_CFLAGS
4265 else
4266 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4267 fi
4268 else
4269 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4270 fi
4271 else
4272 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4273 fi
4274 else
4275 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4276 cat conftest.$ac_ext >&5
4277 fi
4278 rm -rf conftest* conftst*
4279
4280 # Do not use the global_symbol_pipe unless it works.
4281 if test yes = "$pipe_works"; then
4282 break
4283 else
4284 lt_cv_sys_global_symbol_pipe=
4285 fi
4286 done
4287 ])
4288 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4289 lt_cv_sys_global_symbol_to_cdecl=
4290 fi
4291 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4292 AC_MSG_RESULT(failed)
4293 else
4294 AC_MSG_RESULT(ok)
4295 fi
4296
4297 # Response file support.
4298 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4299 nm_file_list_spec='@'
4300 elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
4301 nm_file_list_spec='@'
4302 fi
4303
4304 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
4305 [Take the output of nm and produce a listing of raw symbols and C names])
4306 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
4307 [Transform the output of nm in a proper C declaration])
4308 _LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
4309 [Transform the output of nm into a list of symbols to manually relocate])
4310 _LT_DECL([global_symbol_to_c_name_address],
4311 [lt_cv_sys_global_symbol_to_c_name_address], [1],
4312 [Transform the output of nm in a C name address pair])
4313 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
4314 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
4315 [Transform the output of nm in a C name address pair when lib prefix is needed])
4316 _LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
4317 [The name lister interface])
4318 _LT_DECL([], [nm_file_list_spec], [1],
4319 [Specify filename containing input files for $NM])
4320 ]) # _LT_CMD_GLOBAL_SYMBOLS
4321
4322
4323 # _LT_COMPILER_PIC([TAGNAME])
4324 # ---------------------------
4325 m4_defun([_LT_COMPILER_PIC],
4326 [m4_require([_LT_TAG_COMPILER])dnl
4327 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
4328 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4329 _LT_TAGVAR(lt_prog_compiler_static, $1)=
4330
4331 m4_if([$1], [CXX], [
4332 # C++ specific cases for pic, static, wl, etc.
4333 if test yes = "$GXX"; then
4334 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4335 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4336
4337 case $host_os in
4338 aix*)
4339 # All AIX code is PIC.
4340 if test ia64 = "$host_cpu"; then
4341 # AIX 5 now supports IA64 processor
4342 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4343 fi
4344 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4345 ;;
4346
4347 amigaos*)
4348 case $host_cpu in
4349 powerpc)
4350 # see comment about AmigaOS4 .so support
4351 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4352 ;;
4353 m68k)
4354 # FIXME: we need at least 68020 code to build shared libraries, but
4355 # adding the '-m68020' flag to GCC prevents building anything better,
4356 # like '-m68040'.
4357 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4358 ;;
4359 esac
4360 ;;
4361
4362 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4363 # PIC is the default for these OSes.
4364 ;;
4365 mingw* | windows* | cygwin* | os2* | pw32* | cegcc*)
4366 # This hack is so that the source file can tell whether it is being
4367 # built for inclusion in a dll (and should export symbols for example).
4368 # Although the cygwin gcc ignores -fPIC, still need this for old-style
4369 # (--disable-auto-import) libraries
4370 m4_if([$1], [GCJ], [],
4371 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4372 case $host_os in
4373 os2*)
4374 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
4375 ;;
4376 esac
4377 ;;
4378 darwin* | rhapsody*)
4379 # PIC is the default on this platform
4380 # Common symbols not allowed in MH_DYLIB files
4381 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4382 ;;
4383 *djgpp*)
4384 # DJGPP does not support shared libraries at all
4385 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4386 ;;
4387 haiku*)
4388 # PIC is the default for Haiku.
4389 # The "-static" flag exists, but is broken.
4390 _LT_TAGVAR(lt_prog_compiler_static, $1)=
4391 ;;
4392 interix[[3-9]]*)
4393 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4394 # Instead, we relocate shared libraries at runtime.
4395 ;;
4396 sysv4*MP*)
4397 if test -d /usr/nec; then
4398 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4399 fi
4400 ;;
4401 hpux*)
4402 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4403 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
4404 # sets the default TLS model and affects inlining.
4405 case $host_cpu in
4406 hppa*64*)
4407 ;;
4408 *)
4409 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4410 ;;
4411 esac
4412 ;;
4413 *qnx* | *nto*)
4414 # QNX uses GNU C++, but need to define -shared option too, otherwise
4415 # it will coredump.
4416 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4417 ;;
4418 *)
4419 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4420 ;;
4421 esac
4422 else
4423 case $host_os in
4424 aix[[4-9]]*)
4425 # All AIX code is PIC.
4426 if test ia64 = "$host_cpu"; then
4427 # AIX 5 now supports IA64 processor
4428 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4429 else
4430 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4431 fi
4432 ;;
4433 chorus*)
4434 case $cc_basename in
4435 cxch68*)
4436 # Green Hills C++ Compiler
4437 # _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"
4438 ;;
4439 esac
4440 ;;
4441 mingw* | windows* | cygwin* | os2* | pw32* | cegcc*)
4442 # This hack is so that the source file can tell whether it is being
4443 # built for inclusion in a dll (and should export symbols for example).
4444 m4_if([$1], [GCJ], [],
4445 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4446 ;;
4447 dgux*)
4448 case $cc_basename in
4449 ec++*)
4450 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4451 ;;
4452 ghcx*)
4453 # Green Hills C++ Compiler
4454 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4455 ;;
4456 *)
4457 ;;
4458 esac
4459 ;;
4460 freebsd* | dragonfly* | midnightbsd*)
4461 # FreeBSD uses GNU C++
4462 ;;
4463 hpux9* | hpux10* | hpux11*)
4464 case $cc_basename in
4465 CC*)
4466 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4467 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
4468 if test ia64 != "$host_cpu"; then
4469 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4470 fi
4471 ;;
4472 aCC*)
4473 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4474 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
4475 case $host_cpu in
4476 hppa*64*|ia64*)
4477 # +Z the default
4478 ;;
4479 *)
4480 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4481 ;;
4482 esac
4483 ;;
4484 *)
4485 ;;
4486 esac
4487 ;;
4488 interix*)
4489 # This is c89, which is MS Visual C++ (no shared libs)
4490 # Anyone wants to do a port?
4491 ;;
4492 irix5* | irix6* | nonstopux*)
4493 case $cc_basename in
4494 CC*)
4495 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4496 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4497 # CC pic flag -KPIC is the default.
4498 ;;
4499 *)
4500 ;;
4501 esac
4502 ;;
4503 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
4504 case $cc_basename in
4505 KCC*)
4506 # KAI C++ Compiler
4507 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4508 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4509 ;;
4510 ecpc* )
4511 # old Intel C++ for x86_64, which still supported -KPIC.
4512 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4513 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4514 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4515 ;;
4516 icpc* )
4517 # Intel C++, used to be incompatible with GCC.
4518 # ICC 10 doesn't accept -KPIC any more.
4519 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4520 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4521 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4522 ;;
4523 pgCC* | pgcpp*)
4524 # Portland Group C++ compiler
4525 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4526 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4527 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4528 ;;
4529 cxx*)
4530 # Compaq C++
4531 # Make sure the PIC flag is empty. It appears that all Alpha
4532 # Linux and Compaq Tru64 Unix objects are PIC.
4533 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4534 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4535 ;;
4536 xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
4537 # IBM XL 8.0, 9.0 on PPC and BlueGene
4538 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4539 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4540 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4541 ;;
4542 *)
4543 case `$CC -V 2>&1 | $SED 5q` in
4544 *Sun\ C*)
4545 # Sun C++ 5.9
4546 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4547 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4548 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4549 ;;
4550 esac
4551 ;;
4552 esac
4553 ;;
4554 lynxos*)
4555 ;;
4556 m88k*)
4557 ;;
4558 mvs*)
4559 case $cc_basename in
4560 cxx*)
4561 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4562 ;;
4563 *)
4564 ;;
4565 esac
4566 ;;
4567 netbsd* | netbsdelf*-gnu)
4568 ;;
4569 *-mlibc)
4570 ;;
4571 *qnx* | *nto*)
4572 # QNX uses GNU C++, but need to define -shared option too, otherwise
4573 # it will coredump.
4574 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4575 ;;
4576 osf3* | osf4* | osf5*)
4577 case $cc_basename in
4578 KCC*)
4579 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4580 ;;
4581 RCC*)
4582 # Rational C++ 2.4.1
4583 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4584 ;;
4585 cxx*)
4586 # Digital/Compaq C++
4587 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4588 # Make sure the PIC flag is empty. It appears that all Alpha
4589 # Linux and Compaq Tru64 Unix objects are PIC.
4590 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4591 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4592 ;;
4593 *)
4594 ;;
4595 esac
4596 ;;
4597 psos*)
4598 ;;
4599 serenity*)
4600 ;;
4601 solaris*)
4602 case $cc_basename in
4603 CC* | sunCC*)
4604 # Sun C++ 4.2, 5.x and Centerline C++
4605 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4606 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4607 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4608 ;;
4609 gcx*)
4610 # Green Hills C++ Compiler
4611 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4612 ;;
4613 *)
4614 ;;
4615 esac
4616 ;;
4617 sunos4*)
4618 case $cc_basename in
4619 CC*)
4620 # Sun C++ 4.x
4621 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4622 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4623 ;;
4624 lcc*)
4625 # Lucid
4626 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4627 ;;
4628 *)
4629 ;;
4630 esac
4631 ;;
4632 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4633 case $cc_basename in
4634 CC*)
4635 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4636 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4637 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4638 ;;
4639 esac
4640 ;;
4641 tandem*)
4642 case $cc_basename in
4643 NCC*)
4644 # NonStop-UX NCC 3.20
4645 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4646 ;;
4647 *)
4648 ;;
4649 esac
4650 ;;
4651 vxworks*)
4652 ;;
4653 *)
4654 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4655 ;;
4656 esac
4657 fi
4658 ],
4659 [
4660 if test yes = "$GCC"; then
4661 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4662 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4663
4664 case $host_os in
4665 aix*)
4666 # All AIX code is PIC.
4667 if test ia64 = "$host_cpu"; then
4668 # AIX 5 now supports IA64 processor
4669 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4670 fi
4671 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4672 ;;
4673
4674 amigaos*)
4675 case $host_cpu in
4676 powerpc)
4677 # see comment about AmigaOS4 .so support
4678 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4679 ;;
4680 m68k)
4681 # FIXME: we need at least 68020 code to build shared libraries, but
4682 # adding the '-m68020' flag to GCC prevents building anything better,
4683 # like '-m68040'.
4684 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4685 ;;
4686 esac
4687 ;;
4688
4689 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4690 # PIC is the default for these OSes.
4691 ;;
4692
4693 mingw* | windows* | cygwin* | pw32* | os2* | cegcc*)
4694 # This hack is so that the source file can tell whether it is being
4695 # built for inclusion in a dll (and should export symbols for example).
4696 # Although the cygwin gcc ignores -fPIC, still need this for old-style
4697 # (--disable-auto-import) libraries
4698 m4_if([$1], [GCJ], [],
4699 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4700 case $host_os in
4701 os2*)
4702 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
4703 ;;
4704 esac
4705 ;;
4706
4707 darwin* | rhapsody*)
4708 # PIC is the default on this platform
4709 # Common symbols not allowed in MH_DYLIB files
4710 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4711 ;;
4712
4713 haiku*)
4714 # PIC is the default for Haiku.
4715 # The "-static" flag exists, but is broken.
4716 _LT_TAGVAR(lt_prog_compiler_static, $1)=
4717 ;;
4718
4719 hpux*)
4720 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4721 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
4722 # sets the default TLS model and affects inlining.
4723 case $host_cpu in
4724 hppa*64*)
4725 # +Z the default
4726 ;;
4727 *)
4728 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4729 ;;
4730 esac
4731 ;;
4732
4733 interix[[3-9]]*)
4734 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4735 # Instead, we relocate shared libraries at runtime.
4736 ;;
4737
4738 msdosdjgpp*)
4739 # Just because we use GCC doesn't mean we suddenly get shared libraries
4740 # on systems that don't support them.
4741 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4742 enable_shared=no
4743 ;;
4744
4745 *nto* | *qnx*)
4746 # QNX uses GNU C++, but need to define -shared option too, otherwise
4747 # it will coredump.
4748 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4749 ;;
4750
4751 sysv4*MP*)
4752 if test -d /usr/nec; then
4753 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4754 fi
4755 ;;
4756
4757 *)
4758 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4759 ;;
4760 esac
4761
4762 case $cc_basename in
4763 nvcc*) # Cuda Compiler Driver 2.2
4764 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
4765 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4766 _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
4767 fi
4768 ;;
4769 esac
4770 else
4771 # PORTME Check for flag to pass linker flags through the system compiler.
4772 case $host_os in
4773 aix*)
4774 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4775 if test ia64 = "$host_cpu"; then
4776 # AIX 5 now supports IA64 processor
4777 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4778 else
4779 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4780 fi
4781 ;;
4782
4783 darwin* | rhapsody*)
4784 # PIC is the default on this platform
4785 # Common symbols not allowed in MH_DYLIB files
4786 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4787 case $cc_basename in
4788 nagfor*)
4789 # NAG Fortran compiler
4790 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
4791 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4792 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4793 ;;
4794 esac
4795 ;;
4796
4797 mingw* | windows* | cygwin* | pw32* | os2* | cegcc*)
4798 # This hack is so that the source file can tell whether it is being
4799 # built for inclusion in a dll (and should export symbols for example).
4800 m4_if([$1], [GCJ], [],
4801 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4802 case $host_os in
4803 os2*)
4804 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
4805 ;;
4806 esac
4807 ;;
4808
4809 hpux9* | hpux10* | hpux11*)
4810 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4811 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4812 # not for PA HP-UX.
4813 case $host_cpu in
4814 hppa*64*|ia64*)
4815 # +Z the default
4816 ;;
4817 *)
4818 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4819 ;;
4820 esac
4821 # Is there a better lt_prog_compiler_static that works with the bundled CC?
4822 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
4823 ;;
4824
4825 irix5* | irix6* | nonstopux*)
4826 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4827 # PIC (with -KPIC) is the default.
4828 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4829 ;;
4830
4831 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
4832 case $cc_basename in
4833 # old Intel for x86_64, which still supported -KPIC.
4834 ecc*)
4835 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4836 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4837 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4838 ;;
4839 *flang* | ftn | f18* | f95*)
4840 # Flang compiler.
4841 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4842 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4843 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4844 ;;
4845 # icc used to be incompatible with GCC.
4846 # ICC 10 doesn't accept -KPIC any more.
4847 icc* | ifort*)
4848 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4849 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4850 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4851 ;;
4852 # Lahey Fortran 8.1.
4853 lf95*)
4854 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4855 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4856 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4857 ;;
4858 nagfor*)
4859 # NAG Fortran compiler
4860 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
4861 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4862 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4863 ;;
4864 tcc*)
4865 # Fabrice Bellard et al's Tiny C Compiler
4866 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4867 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4868 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4869 ;;
4870 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
4871 # Portland Group compilers (*not* the Pentium gcc compiler,
4872 # which looks to be a dead project)
4873 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4874 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4875 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4876 ;;
4877 ccc*)
4878 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4879 # All Alpha code is PIC.
4880 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4881 ;;
4882 xl* | bgxl* | bgf* | mpixl*)
4883 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
4884 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4885 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4886 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4887 ;;
4888 *)
4889 case `$CC -V 2>&1 | $SED 5q` in
4890 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
4891 # Sun Fortran 8.3 passes all unrecognized flags to the linker
4892 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4893 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4894 _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4895 ;;
4896 *Sun\ F* | *Sun*Fortran*)
4897 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4898 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4899 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4900 ;;
4901 *Sun\ C*)
4902 # Sun C 5.9
4903 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4904 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4905 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4906 ;;
4907 *Intel*\ [[CF]]*Compiler*)
4908 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4909 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4910 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4911 ;;
4912 *Portland\ Group*)
4913 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4914 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4915 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4916 ;;
4917 esac
4918 ;;
4919 esac
4920 ;;
4921
4922 newsos6)
4923 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4924 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4925 ;;
4926
4927 *-mlibc)
4928 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4929 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4930 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4931 ;;
4932
4933 *nto* | *qnx*)
4934 # QNX uses GNU C++, but need to define -shared option too, otherwise
4935 # it will coredump.
4936 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4937 ;;
4938
4939 osf3* | osf4* | osf5*)
4940 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4941 # All OSF/1 code is PIC.
4942 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4943 ;;
4944
4945 rdos*)
4946 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4947 ;;
4948
4949 serenity*)
4950 ;;
4951
4952 solaris*)
4953 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4954 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4955 case $cc_basename in
4956 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
4957 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
4958 *)
4959 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
4960 esac
4961 ;;
4962
4963 sunos4*)
4964 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4965 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4966 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4967 ;;
4968
4969 sysv4 | sysv4.2uw2* | sysv4.3*)
4970 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4971 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4972 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4973 ;;
4974
4975 sysv4*MP*)
4976 if test -d /usr/nec; then
4977 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4978 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4979 fi
4980 ;;
4981
4982 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4983 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4984 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4985 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4986 ;;
4987
4988 unicos*)
4989 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4990 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4991 ;;
4992
4993 uts4*)
4994 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4995 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4996 ;;
4997
4998 *)
4999 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5000 ;;
5001 esac
5002 fi
5003 ])
5004 case $host_os in
5005 # For platforms that do not support PIC, -DPIC is meaningless:
5006 *djgpp*)
5007 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5008 ;;
5009 *)
5010 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
5011 ;;
5012 esac
5013
5014 AC_CACHE_CHECK([for $compiler option to produce PIC],
5015 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
5016 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
5017 _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
5018
5019 #
5020 # Check to make sure the PIC flag actually works.
5021 #
5022 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
5023 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
5024 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
5025 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
5026 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
5027 "" | " "*) ;;
5028 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5029 esac],
5030 [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
5031 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5032 fi
5033 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
5034 [Additional compiler flags for building library objects])
5035
5036 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
5037 [How to pass a linker flag through the compiler])
5038 #
5039 # Check to make sure the static flag actually works.
5040 #
5041 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
5042 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
5043 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
5044 $lt_tmp_static_flag,
5045 [],
5046 [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
5047 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
5048 [Compiler flag to prevent dynamic linking])
5049 ])# _LT_COMPILER_PIC
5050
5051
5052 # _LT_LINKER_SHLIBS([TAGNAME])
5053 # ----------------------------
5054 # See if the linker supports building shared libraries.
5055 m4_defun([_LT_LINKER_SHLIBS],
5056 [AC_REQUIRE([LT_PATH_LD])dnl
5057 AC_REQUIRE([LT_PATH_NM])dnl
5058 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
5059 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5060 m4_require([_LT_DECL_EGREP])dnl
5061 m4_require([_LT_DECL_SED])dnl
5062 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
5063 m4_require([_LT_TAG_COMPILER])dnl
5064 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5065 m4_if([$1], [CXX], [
5066 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5067 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5068 case $host_os in
5069 aix[[4-9]]*)
5070 # If we're using GNU nm, then we don't want the "-C" option.
5071 # -C means demangle to GNU nm, but means don't demangle to AIX nm.
5072 # Without the "-l" option, or with the "-B" option, AIX nm treats
5073 # weak defined symbols like other global defined symbols, whereas
5074 # GNU nm marks them as "W".
5075 # While the 'weak' keyword is ignored in the Export File, we need
5076 # it in the Import File for the 'aix-soname' feature, so we have
5077 # to replace the "-B" option with "-P" for AIX nm.
5078 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5079 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
5080 else
5081 _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
5082 fi
5083 ;;
5084 pw32*)
5085 _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
5086 ;;
5087 cygwin* | mingw* | windows* | cegcc*)
5088 case $cc_basename in
5089 cl* | icl*)
5090 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
5091 ;;
5092 *)
5093 _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'
5094 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5095 ;;
5096 esac
5097 ;;
5098 *)
5099 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5100 ;;
5101 esac
5102 ], [
5103 runpath_var=
5104 _LT_TAGVAR(allow_undefined_flag, $1)=
5105 _LT_TAGVAR(always_export_symbols, $1)=no
5106 _LT_TAGVAR(archive_cmds, $1)=
5107 _LT_TAGVAR(archive_expsym_cmds, $1)=
5108 _LT_TAGVAR(compiler_needs_object, $1)=no
5109 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5110 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5111 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5112 _LT_TAGVAR(hardcode_automatic, $1)=no
5113 _LT_TAGVAR(hardcode_direct, $1)=no
5114 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5115 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5116 _LT_TAGVAR(hardcode_libdir_separator, $1)=
5117 _LT_TAGVAR(hardcode_minus_L, $1)=no
5118 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5119 _LT_TAGVAR(inherit_rpath, $1)=no
5120 _LT_TAGVAR(link_all_deplibs, $1)=unknown
5121 _LT_TAGVAR(module_cmds, $1)=
5122 _LT_TAGVAR(module_expsym_cmds, $1)=
5123 _LT_TAGVAR(old_archive_from_new_cmds, $1)=
5124 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5125 _LT_TAGVAR(thread_safe_flag_spec, $1)=
5126 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5127 # include_expsyms should be a list of space-separated symbols to be *always*
5128 # included in the symbol list
5129 _LT_TAGVAR(include_expsyms, $1)=
5130 # exclude_expsyms can be an extended regexp of symbols to exclude
5131 # it will be wrapped by ' (' and ')$', so one must not match beginning or
5132 # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
5133 # as well as any symbol that contains 'd'.
5134 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5135 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5136 # platforms (ab)use it in PIC code, but their linkers get confused if
5137 # the symbol is explicitly referenced. Since portable code cannot
5138 # rely on this symbol name, it's probably fine to never include it in
5139 # preloaded symbol tables.
5140 # Exclude shared library initialization/finalization symbols.
5141 dnl Note also adjust exclude_expsyms for C++ above.
5142 extract_expsyms_cmds=
5143
5144 case $host_os in
5145 cygwin* | mingw* | windows* | pw32* | cegcc*)
5146 # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
5147 # When not using gcc, we currently assume that we are using
5148 # Microsoft Visual C++ or Intel C++ Compiler.
5149 if test yes != "$GCC"; then
5150 with_gnu_ld=no
5151 fi
5152 ;;
5153 interix*)
5154 # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC)
5155 with_gnu_ld=yes
5156 ;;
5157 esac
5158
5159 _LT_TAGVAR(ld_shlibs, $1)=yes
5160
5161 # On some targets, GNU ld is compatible enough with the native linker
5162 # that we're better off using the native interface for both.
5163 lt_use_gnu_ld_interface=no
5164 if test yes = "$with_gnu_ld"; then
5165 case $host_os in
5166 aix*)
5167 # The AIX port of GNU ld has always aspired to compatibility
5168 # with the native linker. However, as the warning in the GNU ld
5169 # block says, versions before 2.19.5* couldn't really create working
5170 # shared libraries, regardless of the interface used.
5171 case `$LD -v 2>&1` in
5172 *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
5173 *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
5174 *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
5175 *)
5176 lt_use_gnu_ld_interface=yes
5177 ;;
5178 esac
5179 ;;
5180 *)
5181 lt_use_gnu_ld_interface=yes
5182 ;;
5183 esac
5184 fi
5185
5186 if test yes = "$lt_use_gnu_ld_interface"; then
5187 # If archive_cmds runs LD, not CC, wlarc should be empty
5188 wlarc='$wl'
5189
5190 # Set some defaults for GNU ld with shared library support. These
5191 # are reset later if shared libraries are not supported. Putting them
5192 # here allows them to be overridden if necessary.
5193 runpath_var=LD_RUN_PATH
5194 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5195 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
5196 # ancient GNU ld didn't support --whole-archive et. al.
5197 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
5198 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
5199 else
5200 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5201 fi
5202 supports_anon_versioning=no
5203 case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in
5204 *GNU\ gold*) supports_anon_versioning=yes ;;
5205 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5206 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5207 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5208 *\ 2.11.*) ;; # other 2.11 versions
5209 *) supports_anon_versioning=yes ;;
5210 esac
5211
5212 # See if GNU ld supports shared libraries.
5213 case $host_os in
5214 aix[[3-9]]*)
5215 # On AIX/PPC, the GNU linker is very broken
5216 if test ia64 != "$host_cpu"; then
5217 _LT_TAGVAR(ld_shlibs, $1)=no
5218 cat <<_LT_EOF 1>&2
5219
5220 *** Warning: the GNU linker, at least up to release 2.19, is reported
5221 *** to be unable to reliably create shared libraries on AIX.
5222 *** Therefore, libtool is disabling shared libraries support. If you
5223 *** really care for shared libraries, you may want to install binutils
5224 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
5225 *** You will then need to restart the configuration process.
5226
5227 _LT_EOF
5228 fi
5229 ;;
5230
5231 amigaos*)
5232 case $host_cpu in
5233 powerpc)
5234 # see comment about AmigaOS4 .so support
5235 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5236 _LT_TAGVAR(archive_expsym_cmds, $1)=''
5237 ;;
5238 m68k)
5239 _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)'
5240 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5241 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5242 ;;
5243 esac
5244 ;;
5245
5246 beos*)
5247 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5248 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5249 # Joseph Beckenbach <[email protected]> says some releases of gcc
5250 # support --undefined. This deserves some investigation. FIXME
5251 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5252 else
5253 _LT_TAGVAR(ld_shlibs, $1)=no
5254 fi
5255 ;;
5256
5257 cygwin* | mingw* | windows* | pw32* | cegcc*)
5258 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5259 # as there is no search path for DLLs.
5260 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5261 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
5262 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5263 _LT_TAGVAR(always_export_symbols, $1)=no
5264 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5265 _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'
5266 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5267 _LT_TAGVAR(file_list_spec, $1)='@'
5268
5269 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5270 _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'
5271 # If the export-symbols file already is a .def file, use it as
5272 # is; otherwise, prepend EXPORTS...
5273 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
5274 cp $export_symbols $output_objdir/$soname.def;
5275 else
5276 echo EXPORTS > $output_objdir/$soname.def;
5277 cat $export_symbols >> $output_objdir/$soname.def;
5278 fi~
5279 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5280 else
5281 _LT_TAGVAR(ld_shlibs, $1)=no
5282 fi
5283 ;;
5284
5285 haiku*)
5286 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5287 _LT_TAGVAR(link_all_deplibs, $1)=no
5288 ;;
5289
5290 os2*)
5291 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5292 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5293 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5294 shrext_cmds=.dll
5295 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5296 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5297 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5298 $ECHO EXPORTS >> $output_objdir/$libname.def~
5299 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
5300 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5301 emximp -o $lib $output_objdir/$libname.def'
5302 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5303 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5304 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5305 $ECHO EXPORTS >> $output_objdir/$libname.def~
5306 prefix_cmds="$SED"~
5307 if test EXPORTS = "`$SED 1q $export_symbols`"; then
5308 prefix_cmds="$prefix_cmds -e 1d";
5309 fi~
5310 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
5311 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
5312 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5313 emximp -o $lib $output_objdir/$libname.def'
5314 _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
5315 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5316 _LT_TAGVAR(file_list_spec, $1)='@'
5317 ;;
5318
5319 interix[[3-9]]*)
5320 _LT_TAGVAR(hardcode_direct, $1)=no
5321 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5322 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
5323 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5324 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5325 # Instead, shared libraries are loaded at an image base (0x10000000 by
5326 # default) and relocated if they conflict, which is a slow very memory
5327 # consuming and fragmenting process. To avoid this, we pick a random,
5328 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5329 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
5330 _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'
5331 _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'
5332 ;;
5333
5334 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
5335 tmp_diet=no
5336 if test linux-dietlibc = "$host_os"; then
5337 case $cc_basename in
5338 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
5339 esac
5340 fi
5341 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
5342 && test no = "$tmp_diet"
5343 then
5344 tmp_addflag=' $pic_flag'
5345 tmp_sharedflag='-shared'
5346 case $cc_basename,$host_cpu in
5347 pgcc*) # Portland Group C compiler
5348 _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'
5349 tmp_addflag=' $pic_flag'
5350 ;;
5351 pgf77* | pgf90* | pgf95* | pgfortran*)
5352 # Portland Group f77 and f90 compilers
5353 _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'
5354 tmp_addflag=' $pic_flag -Mnomain' ;;
5355 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
5356 tmp_addflag=' -i_dynamic' ;;
5357 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
5358 tmp_addflag=' -i_dynamic -nofor_main' ;;
5359 ifc* | ifort*) # Intel Fortran compiler
5360 tmp_addflag=' -nofor_main' ;;
5361 lf95*) # Lahey Fortran 8.1
5362 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5363 tmp_sharedflag='--shared' ;;
5364 nagfor*) # NAGFOR 5.3
5365 tmp_sharedflag='-Wl,-shared' ;;
5366 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
5367 tmp_sharedflag='-qmkshrobj'
5368 tmp_addflag= ;;
5369 nvcc*) # Cuda Compiler Driver 2.2
5370 _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'
5371 _LT_TAGVAR(compiler_needs_object, $1)=yes
5372 ;;
5373 esac
5374 case `$CC -V 2>&1 | $SED 5q` in
5375 *Sun\ C*) # Sun C 5.9
5376 _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'
5377 _LT_TAGVAR(compiler_needs_object, $1)=yes
5378 tmp_sharedflag='-G' ;;
5379 *Sun\ F*) # Sun Fortran 8.3
5380 tmp_sharedflag='-G' ;;
5381 esac
5382 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5383
5384 if test yes = "$supports_anon_versioning"; then
5385 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5386 cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5387 echo "local: *; };" >> $output_objdir/$libname.ver~
5388 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
5389 fi
5390
5391 case $cc_basename in
5392 tcc*)
5393 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5394 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
5395 ;;
5396 xlf* | bgf* | bgxlf* | mpixlf*)
5397 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
5398 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
5399 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5400 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
5401 if test yes = "$supports_anon_versioning"; then
5402 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5403 cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5404 echo "local: *; };" >> $output_objdir/$libname.ver~
5405 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
5406 fi
5407 ;;
5408 esac
5409 else
5410 _LT_TAGVAR(ld_shlibs, $1)=no
5411 fi
5412 ;;
5413
5414 *-mlibc)
5415 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5416 _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'
5417 ;;
5418
5419 netbsd* | netbsdelf*-gnu)
5420 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5421 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5422 wlarc=
5423 else
5424 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5425 _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'
5426 fi
5427 ;;
5428
5429 solaris*)
5430 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
5431 _LT_TAGVAR(ld_shlibs, $1)=no
5432 cat <<_LT_EOF 1>&2
5433
5434 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5435 *** create shared libraries on Solaris systems. Therefore, libtool
5436 *** is disabling shared libraries support. We urge you to upgrade GNU
5437 *** binutils to release 2.9.1 or newer. Another option is to modify
5438 *** your PATH or compiler configuration so that the native linker is
5439 *** used, and then restart.
5440
5441 _LT_EOF
5442 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5443 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5444 _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'
5445 else
5446 _LT_TAGVAR(ld_shlibs, $1)=no
5447 fi
5448 ;;
5449
5450 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5451 case `$LD -v 2>&1` in
5452 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5453 _LT_TAGVAR(ld_shlibs, $1)=no
5454 cat <<_LT_EOF 1>&2
5455
5456 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
5457 *** reliably create shared libraries on SCO systems. Therefore, libtool
5458 *** is disabling shared libraries support. We urge you to upgrade GNU
5459 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
5460 *** your PATH or compiler configuration so that the native linker is
5461 *** used, and then restart.
5462
5463 _LT_EOF
5464 ;;
5465 *)
5466 # For security reasons, it is highly recommended that you always
5467 # use absolute paths for naming shared libraries, and exclude the
5468 # DT_RUNPATH tag from executables and libraries. But doing so
5469 # requires that you compile everything twice, which is a pain.
5470 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5471 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5472 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5473 _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'
5474 else
5475 _LT_TAGVAR(ld_shlibs, $1)=no
5476 fi
5477 ;;
5478 esac
5479 ;;
5480
5481 sunos4*)
5482 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5483 wlarc=
5484 _LT_TAGVAR(hardcode_direct, $1)=yes
5485 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5486 ;;
5487
5488 *)
5489 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5490 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5491 _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'
5492 else
5493 _LT_TAGVAR(ld_shlibs, $1)=no
5494 fi
5495 ;;
5496 esac
5497
5498 if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
5499 runpath_var=
5500 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5501 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5502 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5503 fi
5504 else
5505 # PORTME fill in a description of your system's linker (not GNU ld)
5506 case $host_os in
5507 aix3*)
5508 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5509 _LT_TAGVAR(always_export_symbols, $1)=yes
5510 _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'
5511 # Note: this linker hardcodes the directories in LIBPATH if there
5512 # are no directories specified by -L.
5513 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5514 if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
5515 # Neither direct hardcoding nor static linking is supported with a
5516 # broken collect2.
5517 _LT_TAGVAR(hardcode_direct, $1)=unsupported
5518 fi
5519 ;;
5520
5521 aix[[4-9]]*)
5522 if test ia64 = "$host_cpu"; then
5523 # On IA64, the linker does run time linking by default, so we don't
5524 # have to do anything special.
5525 aix_use_runtimelinking=no
5526 exp_sym_flag='-Bexport'
5527 no_entry_flag=
5528 else
5529 # If we're using GNU nm, then we don't want the "-C" option.
5530 # -C means demangle to GNU nm, but means don't demangle to AIX nm.
5531 # Without the "-l" option, or with the "-B" option, AIX nm treats
5532 # weak defined symbols like other global defined symbols, whereas
5533 # GNU nm marks them as "W".
5534 # While the 'weak' keyword is ignored in the Export File, we need
5535 # it in the Import File for the 'aix-soname' feature, so we have
5536 # to replace the "-B" option with "-P" for AIX nm.
5537 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5538 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
5539 else
5540 _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
5541 fi
5542 aix_use_runtimelinking=no
5543
5544 # Test if we are trying to use run time linking or normal
5545 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5546 # have runtime linking enabled, and use it for executables.
5547 # For shared libraries, we enable/disable runtime linking
5548 # depending on the kind of the shared library created -
5549 # when "with_aix_soname,aix_use_runtimelinking" is:
5550 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
5551 # "aix,yes" lib.so shared, rtl:yes, for executables
5552 # lib.a static archive
5553 # "both,no" lib.so.V(shr.o) shared, rtl:yes
5554 # lib.a(lib.so.V) shared, rtl:no, for executables
5555 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
5556 # lib.a(lib.so.V) shared, rtl:no
5557 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
5558 # lib.a static archive
5559 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5560 for ld_flag in $LDFLAGS; do
5561 if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
5562 aix_use_runtimelinking=yes
5563 break
5564 fi
5565 done
5566 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
5567 # With aix-soname=svr4, we create the lib.so.V shared archives only,
5568 # so we don't have lib.a shared libs to link our executables.
5569 # We have to force runtime linking in this case.
5570 aix_use_runtimelinking=yes
5571 LDFLAGS="$LDFLAGS -Wl,-brtl"
5572 fi
5573 ;;
5574 esac
5575
5576 exp_sym_flag='-bexport'
5577 no_entry_flag='-bnoentry'
5578 fi
5579
5580 # When large executables or shared objects are built, AIX ld can
5581 # have problems creating the table of contents. If linking a library
5582 # or program results in "error TOC overflow" add -mminimal-toc to
5583 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5584 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5585
5586 _LT_TAGVAR(archive_cmds, $1)=''
5587 _LT_TAGVAR(hardcode_direct, $1)=yes
5588 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5589 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5590 _LT_TAGVAR(link_all_deplibs, $1)=yes
5591 _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
5592 case $with_aix_soname,$aix_use_runtimelinking in
5593 aix,*) ;; # traditional, no import file
5594 svr4,* | *,yes) # use import file
5595 # The Import File defines what to hardcode.
5596 _LT_TAGVAR(hardcode_direct, $1)=no
5597 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5598 ;;
5599 esac
5600
5601 if test yes = "$GCC"; then
5602 case $host_os in aix4.[[012]]|aix4.[[012]].*)
5603 # We only want to do this on AIX 4.2 and lower, the check
5604 # below for broken collect2 doesn't work under 4.3+
5605 collect2name=`$CC -print-prog-name=collect2`
5606 if test -f "$collect2name" &&
5607 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5608 then
5609 # We have reworked collect2
5610 :
5611 else
5612 # We have old collect2
5613 _LT_TAGVAR(hardcode_direct, $1)=unsupported
5614 # It fails to find uninstalled libraries when the uninstalled
5615 # path is not listed in the libpath. Setting hardcode_minus_L
5616 # to unsupported forces relinking
5617 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5618 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5619 _LT_TAGVAR(hardcode_libdir_separator, $1)=
5620 fi
5621 ;;
5622 esac
5623 shared_flag='-shared'
5624 if test yes = "$aix_use_runtimelinking"; then
5625 shared_flag="$shared_flag "'$wl-G'
5626 fi
5627 # Need to ensure runtime linking is disabled for the traditional
5628 # shared library, or the linker may eventually find shared libraries
5629 # /with/ Import File - we do not want to mix them.
5630 shared_flag_aix='-shared'
5631 shared_flag_svr4='-shared $wl-G'
5632 else
5633 # not using gcc
5634 if test ia64 = "$host_cpu"; then
5635 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5636 # chokes on -Wl,-G. The following line is correct:
5637 shared_flag='-G'
5638 else
5639 if test yes = "$aix_use_runtimelinking"; then
5640 shared_flag='$wl-G'
5641 else
5642 shared_flag='$wl-bM:SRE'
5643 fi
5644 shared_flag_aix='$wl-bM:SRE'
5645 shared_flag_svr4='$wl-G'
5646 fi
5647 fi
5648
5649 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
5650 # It seems that -bexpall does not export symbols beginning with
5651 # underscore (_), so it is better to generate a list of symbols to export.
5652 _LT_TAGVAR(always_export_symbols, $1)=yes
5653 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
5654 # Warning - without using the other runtime loading flags (-brtl),
5655 # -berok will link without error, but may produce a broken library.
5656 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5657 # Determine the default libpath from the value encoded in an
5658 # empty executable.
5659 _LT_SYS_MODULE_PATH_AIX([$1])
5660 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
5661 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
5662 else
5663 if test ia64 = "$host_cpu"; then
5664 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
5665 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5666 _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"
5667 else
5668 # Determine the default libpath from the value encoded in an
5669 # empty executable.
5670 _LT_SYS_MODULE_PATH_AIX([$1])
5671 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
5672 # Warning - without using the other run time loading flags,
5673 # -berok will link without error, but may produce a broken library.
5674 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
5675 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
5676 if test yes = "$with_gnu_ld"; then
5677 # We only use this code for GNU lds that support --whole-archive.
5678 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
5679 else
5680 # Exported symbols can be pulled into shared objects from archives
5681 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5682 fi
5683 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5684 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
5685 # -brtl affects multiple linker settings, -berok does not and is overridden later
5686 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
5687 if test svr4 != "$with_aix_soname"; then
5688 # This is similar to how AIX traditionally builds its shared libraries.
5689 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
5690 fi
5691 if test aix != "$with_aix_soname"; then
5692 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
5693 else
5694 # used by -dlpreopen to get the symbols
5695 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
5696 fi
5697 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
5698 fi
5699 fi
5700 ;;
5701
5702 amigaos*)
5703 case $host_cpu in
5704 powerpc)
5705 # see comment about AmigaOS4 .so support
5706 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5707 _LT_TAGVAR(archive_expsym_cmds, $1)=''
5708 ;;
5709 m68k)
5710 _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)'
5711 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5712 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5713 ;;
5714 esac
5715 ;;
5716
5717 bsdi[[45]]*)
5718 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5719 ;;
5720
5721 cygwin* | mingw* | windows* | pw32* | cegcc*)
5722 # When not using gcc, we currently assume that we are using
5723 # Microsoft Visual C++ or Intel C++ Compiler.
5724 # hardcode_libdir_flag_spec is actually meaningless, as there is
5725 # no search path for DLLs.
5726 case $cc_basename in
5727 cl* | icl*)
5728 # Native MSVC or ICC
5729 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5730 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5731 _LT_TAGVAR(always_export_symbols, $1)=yes
5732 _LT_TAGVAR(file_list_spec, $1)='@'
5733 # Tell ltmain to make .lib files, not .a files.
5734 libext=lib
5735 # Tell ltmain to make .dll files, not .so files.
5736 shrext_cmds=.dll
5737 # FIXME: Setting linknames here is a bad hack.
5738 _LT_TAGVAR(archive_cmds, $1)='$CC -Fe$output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
5739 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
5740 cp "$export_symbols" "$output_objdir/$soname.def";
5741 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
5742 else
5743 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
5744 fi~
5745 $CC -Fe$tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
5746 linknames='
5747 # The linker will not automatically build a static lib if we build a DLL.
5748 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5749 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5750 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
5751 _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'
5752 # Don't use ranlib
5753 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
5754 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
5755 lt_tool_outputfile="@TOOL_OUTPUT@"~
5756 case $lt_outputfile in
5757 *.exe|*.EXE) ;;
5758 *)
5759 lt_outputfile=$lt_outputfile.exe
5760 lt_tool_outputfile=$lt_tool_outputfile.exe
5761 ;;
5762 esac~
5763 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
5764 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
5765 $RM "$lt_outputfile.manifest";
5766 fi'
5767 ;;
5768 *)
5769 # Assume MSVC and ICC wrapper
5770 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5771 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5772 # Tell ltmain to make .lib files, not .a files.
5773 libext=lib
5774 # Tell ltmain to make .dll files, not .so files.
5775 shrext_cmds=.dll
5776 # FIXME: Setting linknames here is a bad hack.
5777 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
5778 # The linker will automatically build a .lib file if we build a DLL.
5779 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5780 # FIXME: Should let the user specify the lib program.
5781 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5782 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5783 ;;
5784 esac
5785 ;;
5786
5787 darwin* | rhapsody*)
5788 _LT_DARWIN_LINKER_FEATURES($1)
5789 ;;
5790
5791 dgux*)
5792 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5793 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5794 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5795 ;;
5796
5797 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5798 # support. Future versions do this automatically, but an explicit c++rt0.o
5799 # does not break anything, and helps significantly (at the cost of a little
5800 # extra space).
5801 freebsd2.2*)
5802 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5803 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5804 _LT_TAGVAR(hardcode_direct, $1)=yes
5805 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5806 ;;
5807
5808 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5809 freebsd2.*)
5810 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5811 _LT_TAGVAR(hardcode_direct, $1)=yes
5812 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5813 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5814 ;;
5815
5816 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5817 freebsd* | dragonfly* | midnightbsd*)
5818 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5819 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5820 _LT_TAGVAR(hardcode_direct, $1)=yes
5821 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5822 ;;
5823
5824 hpux9*)
5825 if test yes = "$GCC"; then
5826 _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 "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
5827 else
5828 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
5829 fi
5830 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
5831 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5832 _LT_TAGVAR(hardcode_direct, $1)=yes
5833
5834 # hardcode_minus_L: Not really in the search PATH,
5835 # but as the default location of the library.
5836 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5837 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5838 ;;
5839
5840 hpux10*)
5841 if test yes,no = "$GCC,$with_gnu_ld"; then
5842 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5843 else
5844 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5845 fi
5846 if test no = "$with_gnu_ld"; then
5847 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
5848 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5849 _LT_TAGVAR(hardcode_direct, $1)=yes
5850 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5851 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5852 # hardcode_minus_L: Not really in the search PATH,
5853 # but as the default location of the library.
5854 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5855 fi
5856 ;;
5857
5858 hpux11*)
5859 if test yes,no = "$GCC,$with_gnu_ld"; then
5860 case $host_cpu in
5861 hppa*64*)
5862 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
5863 ;;
5864 ia64*)
5865 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5866 ;;
5867 *)
5868 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5869 ;;
5870 esac
5871 else
5872 case $host_cpu in
5873 hppa*64*)
5874 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
5875 ;;
5876 ia64*)
5877 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5878 ;;
5879 *)
5880 m4_if($1, [], [
5881 # Older versions of the 11.00 compiler do not understand -b yet
5882 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
5883 _LT_LINKER_OPTION([if $CC understands -b],
5884 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
5885 [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
5886 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
5887 [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
5888 ;;
5889 esac
5890 fi
5891 if test no = "$with_gnu_ld"; then
5892 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
5893 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5894
5895 case $host_cpu in
5896 hppa*64*|ia64*)
5897 _LT_TAGVAR(hardcode_direct, $1)=no
5898 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5899 ;;
5900 *)
5901 _LT_TAGVAR(hardcode_direct, $1)=yes
5902 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5903 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5904
5905 # hardcode_minus_L: Not really in the search PATH,
5906 # but as the default location of the library.
5907 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5908 ;;
5909 esac
5910 fi
5911 ;;
5912
5913 irix5* | irix6* | nonstopux*)
5914 if test yes = "$GCC"; then
5915 _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'
5916 # Try to use the -exported_symbol ld option, if it does not
5917 # work, assume that -exports_file does not work either and
5918 # implicitly export all symbols.
5919 # This should be the same for all languages, so no per-tag cache variable.
5920 AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
5921 [lt_cv_irix_exported_symbol],
5922 [save_LDFLAGS=$LDFLAGS
5923 LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
5924 AC_LINK_IFELSE(
5925 [AC_LANG_SOURCE(
5926 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
5927 [C++], [[int foo (void) { return 0; }]],
5928 [Fortran 77], [[
5929 subroutine foo
5930 end]],
5931 [Fortran], [[
5932 subroutine foo
5933 end]])])],
5934 [lt_cv_irix_exported_symbol=yes],
5935 [lt_cv_irix_exported_symbol=no])
5936 LDFLAGS=$save_LDFLAGS])
5937 if test yes = "$lt_cv_irix_exported_symbol"; then
5938 _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'
5939 fi
5940 else
5941 _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'
5942 _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'
5943 fi
5944 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5945 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5946 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5947 _LT_TAGVAR(inherit_rpath, $1)=yes
5948 _LT_TAGVAR(link_all_deplibs, $1)=yes
5949 ;;
5950
5951 linux*)
5952 case $cc_basename in
5953 tcc*)
5954 # Fabrice Bellard et al's Tiny C Compiler
5955 _LT_TAGVAR(ld_shlibs, $1)=yes
5956 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5957 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5958 ;;
5959 esac
5960 ;;
5961
5962 *-mlibc)
5963 ;;
5964
5965 netbsd* | netbsdelf*-gnu)
5966 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5967 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
5968 else
5969 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
5970 fi
5971 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5972 _LT_TAGVAR(hardcode_direct, $1)=yes
5973 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5974 ;;
5975
5976 newsos6)
5977 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5978 _LT_TAGVAR(hardcode_direct, $1)=yes
5979 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5980 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5981 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5982 ;;
5983
5984 *nto* | *qnx*)
5985 ;;
5986
5987 openbsd*)
5988 if test -f /usr/libexec/ld.so; then
5989 _LT_TAGVAR(hardcode_direct, $1)=yes
5990 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5991 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5992 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
5993 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5994 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
5995 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
5996 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5997 else
5998 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5999 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
6000 fi
6001 else
6002 _LT_TAGVAR(ld_shlibs, $1)=no
6003 fi
6004 ;;
6005
6006 os2*)
6007 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6008 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6009 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6010 shrext_cmds=.dll
6011 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
6012 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
6013 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
6014 $ECHO EXPORTS >> $output_objdir/$libname.def~
6015 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
6016 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
6017 emximp -o $lib $output_objdir/$libname.def'
6018 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
6019 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
6020 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
6021 $ECHO EXPORTS >> $output_objdir/$libname.def~
6022 prefix_cmds="$SED"~
6023 if test EXPORTS = "`$SED 1q $export_symbols`"; then
6024 prefix_cmds="$prefix_cmds -e 1d";
6025 fi~
6026 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
6027 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
6028 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
6029 emximp -o $lib $output_objdir/$libname.def'
6030 _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
6031 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6032 _LT_TAGVAR(file_list_spec, $1)='@'
6033 ;;
6034
6035 osf3*)
6036 if test yes = "$GCC"; then
6037 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
6038 _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'
6039 else
6040 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6041 _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'
6042 fi
6043 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6044 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
6045 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6046 ;;
6047
6048 osf4* | osf5*) # as osf3* with the addition of -msym flag
6049 if test yes = "$GCC"; then
6050 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
6051 _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'
6052 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
6053 else
6054 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6055 _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'
6056 _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~
6057 $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'
6058
6059 # Both c and cxx compiler support -rpath directly
6060 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6061 fi
6062 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6063 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6064 ;;
6065
6066 serenity*)
6067 ;;
6068
6069 solaris*)
6070 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
6071 if test yes = "$GCC"; then
6072 wlarc='$wl'
6073 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
6074 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6075 $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'
6076 else
6077 case `$CC -V 2>&1` in
6078 *"Compilers 5.0"*)
6079 wlarc=''
6080 _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
6081 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6082 $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
6083 ;;
6084 *)
6085 wlarc='$wl'
6086 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
6087 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6088 $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
6089 ;;
6090 esac
6091 fi
6092 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6093 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6094 case $host_os in
6095 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6096 *)
6097 # The compiler driver will combine and reorder linker options,
6098 # but understands '-z linker_flag'. GCC discards it without '$wl',
6099 # but is careful enough not to reorder.
6100 # Supported since Solaris 2.6 (maybe 2.5.1?)
6101 if test yes = "$GCC"; then
6102 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
6103 else
6104 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6105 fi
6106 ;;
6107 esac
6108 _LT_TAGVAR(link_all_deplibs, $1)=yes
6109 ;;
6110
6111 sunos4*)
6112 if test sequent = "$host_vendor"; then
6113 # Use $CC to link under sequent, because it throws in some extra .o
6114 # files that make .init and .fini sections work.
6115 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6116 else
6117 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6118 fi
6119 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6120 _LT_TAGVAR(hardcode_direct, $1)=yes
6121 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6122 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6123 ;;
6124
6125 sysv4)
6126 case $host_vendor in
6127 sni)
6128 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6129 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6130 ;;
6131 siemens)
6132 ## LD is ld it makes a PLAMLIB
6133 ## CC just makes a GrossModule.
6134 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6135 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6136 _LT_TAGVAR(hardcode_direct, $1)=no
6137 ;;
6138 motorola)
6139 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6140 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6141 ;;
6142 esac
6143 runpath_var='LD_RUN_PATH'
6144 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6145 ;;
6146
6147 sysv4.3*)
6148 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6149 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6150 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6151 ;;
6152
6153 sysv4*MP*)
6154 if test -d /usr/nec; then
6155 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6156 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6157 runpath_var=LD_RUN_PATH
6158 hardcode_runpath_var=yes
6159 _LT_TAGVAR(ld_shlibs, $1)=yes
6160 fi
6161 ;;
6162
6163 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6164 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
6165 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6166 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6167 runpath_var='LD_RUN_PATH'
6168
6169 if test yes = "$GCC"; then
6170 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6171 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6172 else
6173 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6174 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6175 fi
6176 ;;
6177
6178 sysv5* | sco3.2v5* | sco5v6*)
6179 # Note: We CANNOT use -z defs as we might desire, because we do not
6180 # link with -lc, and that would cause any symbols used from libc to
6181 # always be unresolved, which means just about no library would
6182 # ever link correctly. If we're not using GNU ld we use -z text
6183 # though, which does catch some bad symbols but isn't as heavy-handed
6184 # as -z defs.
6185 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
6186 _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
6187 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6188 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6189 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
6190 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6191 _LT_TAGVAR(link_all_deplibs, $1)=yes
6192 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
6193 runpath_var='LD_RUN_PATH'
6194
6195 if test yes = "$GCC"; then
6196 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6197 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6198 else
6199 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6200 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6201 fi
6202 ;;
6203
6204 uts4*)
6205 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6206 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6207 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6208 ;;
6209
6210 *)
6211 _LT_TAGVAR(ld_shlibs, $1)=no
6212 ;;
6213 esac
6214
6215 if test sni = "$host_vendor"; then
6216 case $host in
6217 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6218 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
6219 ;;
6220 esac
6221 fi
6222 fi
6223 ])
6224 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6225 test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
6226
6227 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
6228
6229 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
6230 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
6231 _LT_DECL([], [extract_expsyms_cmds], [2],
6232 [The commands to extract the exported symbol list from a shared archive])
6233
6234 #
6235 # Do we need to explicitly link libc?
6236 #
6237 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
6238 x|xyes)
6239 # Assume -lc should be added
6240 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6241
6242 if test yes,yes = "$GCC,$enable_shared"; then
6243 case $_LT_TAGVAR(archive_cmds, $1) in
6244 *'~'*)
6245 # FIXME: we may have to deal with multi-command sequences.
6246 ;;
6247 '$CC '*)
6248 # Test whether the compiler implicitly links with -lc since on some
6249 # systems, -lgcc has to come before -lc. If gcc already passes -lc
6250 # to ld, don't add -lc before -lgcc.
6251 AC_CACHE_CHECK([whether -lc should be explicitly linked in],
6252 [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
6253 [$RM conftest*
6254 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6255
6256 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6257 soname=conftest
6258 lib=conftest
6259 libobjs=conftest.$ac_objext
6260 deplibs=
6261 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
6262 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
6263 compiler_flags=-v
6264 linker_flags=-v
6265 verstring=
6266 output_objdir=.
6267 libname=conftest
6268 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
6269 _LT_TAGVAR(allow_undefined_flag, $1)=
6270 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
6271 then
6272 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6273 else
6274 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6275 fi
6276 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6277 else
6278 cat conftest.err 1>&5
6279 fi
6280 $RM conftest*
6281 ])
6282 _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
6283 ;;
6284 esac
6285 fi
6286 ;;
6287 esac
6288
6289 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
6290 [Whether or not to add -lc for building shared libraries])
6291 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
6292 [enable_shared_with_static_runtimes], [0],
6293 [Whether or not to disallow shared libs when runtime libs are static])
6294 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
6295 [Compiler flag to allow reflexive dlopens])
6296 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
6297 [Compiler flag to generate shared objects directly from archives])
6298 _LT_TAGDECL([], [compiler_needs_object], [1],
6299 [Whether the compiler copes with passing no objects directly])
6300 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
6301 [Create an old-style archive from a shared archive])
6302 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
6303 [Create a temporary old-style archive to link instead of a shared archive])
6304 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
6305 _LT_TAGDECL([], [archive_expsym_cmds], [2])
6306 _LT_TAGDECL([], [module_cmds], [2],
6307 [Commands used to build a loadable module if different from building
6308 a shared archive.])
6309 _LT_TAGDECL([], [module_expsym_cmds], [2])
6310 _LT_TAGDECL([], [with_gnu_ld], [1],
6311 [Whether we are building with GNU ld or not])
6312 _LT_TAGDECL([], [allow_undefined_flag], [1],
6313 [Flag that allows shared libraries with undefined symbols to be built])
6314 _LT_TAGDECL([], [no_undefined_flag], [1],
6315 [Flag that enforces no undefined symbols])
6316 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
6317 [Flag to hardcode $libdir into a binary during linking.
6318 This must work even if $libdir does not exist])
6319 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
6320 [Whether we need a single "-rpath" flag with a separated argument])
6321 _LT_TAGDECL([], [hardcode_direct], [0],
6322 [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
6323 DIR into the resulting binary])
6324 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
6325 [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
6326 DIR into the resulting binary and the resulting library dependency is
6327 "absolute", i.e. impossible to change by setting $shlibpath_var if the
6328 library is relocated])
6329 _LT_TAGDECL([], [hardcode_minus_L], [0],
6330 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
6331 into the resulting binary])
6332 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
6333 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
6334 into the resulting binary])
6335 _LT_TAGDECL([], [hardcode_automatic], [0],
6336 [Set to "yes" if building a shared library automatically hardcodes DIR
6337 into the library and all subsequent libraries and executables linked
6338 against it])
6339 _LT_TAGDECL([], [inherit_rpath], [0],
6340 [Set to yes if linker adds runtime paths of dependent libraries
6341 to runtime path list])
6342 _LT_TAGDECL([], [link_all_deplibs], [0],
6343 [Whether libtool must link a program against all its dependency libraries])
6344 _LT_TAGDECL([], [always_export_symbols], [0],
6345 [Set to "yes" if exported symbols are required])
6346 _LT_TAGDECL([], [export_symbols_cmds], [2],
6347 [The commands to list exported symbols])
6348 _LT_TAGDECL([], [exclude_expsyms], [1],
6349 [Symbols that should not be listed in the preloaded symbols])
6350 _LT_TAGDECL([], [include_expsyms], [1],
6351 [Symbols that must always be exported])
6352 _LT_TAGDECL([], [prelink_cmds], [2],
6353 [Commands necessary for linking programs (against libraries) with templates])
6354 _LT_TAGDECL([], [postlink_cmds], [2],
6355 [Commands necessary for finishing linking programs])
6356 _LT_TAGDECL([], [file_list_spec], [1],
6357 [Specify filename containing input files])
6358 dnl FIXME: Not yet implemented
6359 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
6360 dnl [Compiler flag to generate thread safe objects])
6361 ])# _LT_LINKER_SHLIBS
6362
6363
6364 # _LT_LANG_C_CONFIG([TAG])
6365 # ------------------------
6366 # Ensure that the configuration variables for a C compiler are suitably
6367 # defined. These variables are subsequently used by _LT_CONFIG to write
6368 # the compiler configuration to 'libtool'.
6369 m4_defun([_LT_LANG_C_CONFIG],
6370 [m4_require([_LT_DECL_EGREP])dnl
6371 lt_save_CC=$CC
6372 AC_LANG_PUSH(C)
6373
6374 # Source file extension for C test sources.
6375 ac_ext=c
6376
6377 # Object file extension for compiled C test sources.
6378 objext=o
6379 _LT_TAGVAR(objext, $1)=$objext
6380
6381 # Code to be used in simple compile tests
6382 lt_simple_compile_test_code="int some_variable = 0;"
6383
6384 # Code to be used in simple link tests
6385 lt_simple_link_test_code='int main(void){return(0);}'
6386
6387 _LT_TAG_COMPILER
6388 # Save the default compiler, since it gets overwritten when the other
6389 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
6390 compiler_DEFAULT=$CC
6391
6392 # save warnings/boilerplate of simple test code
6393 _LT_COMPILER_BOILERPLATE
6394 _LT_LINKER_BOILERPLATE
6395
6396 ## CAVEAT EMPTOR:
6397 ## There is no encapsulation within the following macros, do not change
6398 ## the running order or otherwise move them around unless you know exactly
6399 ## what you are doing...
6400 if test -n "$compiler"; then
6401 _LT_COMPILER_NO_RTTI($1)
6402 _LT_COMPILER_PIC($1)
6403 _LT_COMPILER_C_O($1)
6404 _LT_COMPILER_FILE_LOCKS($1)
6405 _LT_LINKER_SHLIBS($1)
6406 _LT_SYS_DYNAMIC_LINKER($1)
6407 _LT_LINKER_HARDCODE_LIBPATH($1)
6408 LT_SYS_DLOPEN_SELF
6409 _LT_CMD_STRIPLIB
6410
6411 # Report what library types will actually be built
6412 AC_MSG_CHECKING([if libtool supports shared libraries])
6413 AC_MSG_RESULT([$can_build_shared])
6414
6415 AC_MSG_CHECKING([whether to build shared libraries])
6416 test no = "$can_build_shared" && enable_shared=no
6417
6418 # On AIX, shared libraries and static libraries use the same namespace, and
6419 # are all built from PIC.
6420 case $host_os in
6421 aix3*)
6422 test yes = "$enable_shared" && enable_static=no
6423 if test -n "$RANLIB"; then
6424 archive_cmds="$archive_cmds~\$RANLIB \$lib"
6425 postinstall_cmds='$RANLIB $lib'
6426 fi
6427 ;;
6428
6429 aix[[4-9]]*)
6430 if test ia64 != "$host_cpu"; then
6431 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
6432 yes,aix,yes) ;; # shared object as lib.so file only
6433 yes,svr4,*) ;; # shared object as lib.so archive member only
6434 yes,*) enable_static=no ;; # shared object in lib.a archive as well
6435 esac
6436 fi
6437 ;;
6438 esac
6439 AC_MSG_RESULT([$enable_shared])
6440
6441 AC_MSG_CHECKING([whether to build static libraries])
6442 # Make sure either enable_shared or enable_static is yes.
6443 test yes = "$enable_shared" || enable_static=yes
6444 AC_MSG_RESULT([$enable_static])
6445
6446 _LT_CONFIG($1)
6447 fi
6448 AC_LANG_POP
6449 CC=$lt_save_CC
6450 ])# _LT_LANG_C_CONFIG
6451
6452
6453 # _LT_LANG_CXX_CONFIG([TAG])
6454 # --------------------------
6455 # Ensure that the configuration variables for a C++ compiler are suitably
6456 # defined. These variables are subsequently used by _LT_CONFIG to write
6457 # the compiler configuration to 'libtool'.
6458 m4_defun([_LT_LANG_CXX_CONFIG],
6459 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6460 m4_require([_LT_DECL_EGREP])dnl
6461 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
6462 if test -n "$CXX" && ( test no != "$CXX" &&
6463 ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
6464 (test g++ != "$CXX"))); then
6465 AC_PROG_CXXCPP
6466 else
6467 _lt_caught_CXX_error=yes
6468 fi
6469
6470 AC_LANG_PUSH(C++)
6471 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6472 _LT_TAGVAR(allow_undefined_flag, $1)=
6473 _LT_TAGVAR(always_export_symbols, $1)=no
6474 _LT_TAGVAR(archive_expsym_cmds, $1)=
6475 _LT_TAGVAR(compiler_needs_object, $1)=no
6476 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6477 _LT_TAGVAR(hardcode_direct, $1)=no
6478 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6479 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6480 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6481 _LT_TAGVAR(hardcode_minus_L, $1)=no
6482 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6483 _LT_TAGVAR(hardcode_automatic, $1)=no
6484 _LT_TAGVAR(inherit_rpath, $1)=no
6485 _LT_TAGVAR(module_cmds, $1)=
6486 _LT_TAGVAR(module_expsym_cmds, $1)=
6487 _LT_TAGVAR(link_all_deplibs, $1)=unknown
6488 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6489 _LT_TAGVAR(reload_flag, $1)=$reload_flag
6490 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
6491 _LT_TAGVAR(no_undefined_flag, $1)=
6492 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6493 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6494
6495 # Source file extension for C++ test sources.
6496 ac_ext=cpp
6497
6498 # Object file extension for compiled C++ test sources.
6499 objext=o
6500 _LT_TAGVAR(objext, $1)=$objext
6501
6502 # No sense in running all these tests if we already determined that
6503 # the CXX compiler isn't working. Some variables (like enable_shared)
6504 # are currently assumed to apply to all compilers on this platform,
6505 # and will be corrupted by setting them based on a non-working compiler.
6506 if test yes != "$_lt_caught_CXX_error"; then
6507 # Code to be used in simple compile tests
6508 lt_simple_compile_test_code="int some_variable = 0;"
6509
6510 # Code to be used in simple link tests
6511 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
6512
6513 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6514 _LT_TAG_COMPILER
6515
6516 # save warnings/boilerplate of simple test code
6517 _LT_COMPILER_BOILERPLATE
6518 _LT_LINKER_BOILERPLATE
6519
6520 # Allow CC to be a program name with arguments.
6521 lt_save_CC=$CC
6522 lt_save_CFLAGS=$CFLAGS
6523 lt_save_LD=$LD
6524 lt_save_GCC=$GCC
6525 GCC=$GXX
6526 lt_save_with_gnu_ld=$with_gnu_ld
6527 lt_save_path_LD=$lt_cv_path_LD
6528 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
6529 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
6530 else
6531 $as_unset lt_cv_prog_gnu_ld
6532 fi
6533 if test -n "${lt_cv_path_LDCXX+set}"; then
6534 lt_cv_path_LD=$lt_cv_path_LDCXX
6535 else
6536 $as_unset lt_cv_path_LD
6537 fi
6538 test -z "${LDCXX+set}" || LD=$LDCXX
6539 CC=${CXX-"c++"}
6540 CFLAGS=$CXXFLAGS
6541 compiler=$CC
6542 _LT_TAGVAR(compiler, $1)=$CC
6543 _LT_CC_BASENAME([$compiler])
6544
6545 if test -n "$compiler"; then
6546 # We don't want -fno-exception when compiling C++ code, so set the
6547 # no_builtin_flag separately
6548 if test yes = "$GXX"; then
6549 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
6550 else
6551 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6552 fi
6553
6554 if test yes = "$GXX"; then
6555 # Set up default GNU C++ configuration
6556
6557 LT_PATH_LD
6558
6559 # Check if GNU C++ uses GNU ld as the underlying linker, since the
6560 # archiving commands below assume that GNU ld is being used.
6561 if test yes = "$with_gnu_ld"; then
6562 _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
6563 _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'
6564
6565 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
6566 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
6567
6568 # If archive_cmds runs LD, not CC, wlarc should be empty
6569 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
6570 # investigate it a little bit more. (MM)
6571 wlarc='$wl'
6572
6573 # ancient GNU ld didn't support --whole-archive et. al.
6574 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
6575 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
6576 else
6577 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6578 fi
6579 else
6580 with_gnu_ld=no
6581 wlarc=
6582
6583 # A generic and very simple default shared library creation
6584 # command for GNU C++ for the case where it uses the native
6585 # linker, instead of GNU ld. If possible, this setting should
6586 # overridden to take advantage of the native linker features on
6587 # the platform it is being used on.
6588 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6589 fi
6590
6591 # Commands to make compiler produce verbose output that lists
6592 # what "hidden" libraries, object files and flags are used when
6593 # linking a shared library.
6594 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " [[-]]L"'
6595
6596 else
6597 GXX=no
6598 with_gnu_ld=no
6599 wlarc=
6600 fi
6601
6602 # PORTME: fill in a description of your system's C++ link characteristics
6603 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6604 _LT_TAGVAR(ld_shlibs, $1)=yes
6605 case $host_os in
6606 aix3*)
6607 # FIXME: insert proper C++ library support
6608 _LT_TAGVAR(ld_shlibs, $1)=no
6609 ;;
6610 aix[[4-9]]*)
6611 if test ia64 = "$host_cpu"; then
6612 # On IA64, the linker does run time linking by default, so we don't
6613 # have to do anything special.
6614 aix_use_runtimelinking=no
6615 exp_sym_flag='-Bexport'
6616 no_entry_flag=
6617 else
6618 aix_use_runtimelinking=no
6619
6620 # Test if we are trying to use run time linking or normal
6621 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6622 # have runtime linking enabled, and use it for executables.
6623 # For shared libraries, we enable/disable runtime linking
6624 # depending on the kind of the shared library created -
6625 # when "with_aix_soname,aix_use_runtimelinking" is:
6626 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
6627 # "aix,yes" lib.so shared, rtl:yes, for executables
6628 # lib.a static archive
6629 # "both,no" lib.so.V(shr.o) shared, rtl:yes
6630 # lib.a(lib.so.V) shared, rtl:no, for executables
6631 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
6632 # lib.a(lib.so.V) shared, rtl:no
6633 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
6634 # lib.a static archive
6635 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6636 for ld_flag in $LDFLAGS; do
6637 case $ld_flag in
6638 *-brtl*)
6639 aix_use_runtimelinking=yes
6640 break
6641 ;;
6642 esac
6643 done
6644 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
6645 # With aix-soname=svr4, we create the lib.so.V shared archives only,
6646 # so we don't have lib.a shared libs to link our executables.
6647 # We have to force runtime linking in this case.
6648 aix_use_runtimelinking=yes
6649 LDFLAGS="$LDFLAGS -Wl,-brtl"
6650 fi
6651 ;;
6652 esac
6653
6654 exp_sym_flag='-bexport'
6655 no_entry_flag='-bnoentry'
6656 fi
6657
6658 # When large executables or shared objects are built, AIX ld can
6659 # have problems creating the table of contents. If linking a library
6660 # or program results in "error TOC overflow" add -mminimal-toc to
6661 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
6662 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6663
6664 _LT_TAGVAR(archive_cmds, $1)=''
6665 _LT_TAGVAR(hardcode_direct, $1)=yes
6666 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6667 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6668 _LT_TAGVAR(link_all_deplibs, $1)=yes
6669 _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
6670 case $with_aix_soname,$aix_use_runtimelinking in
6671 aix,*) ;; # no import file
6672 svr4,* | *,yes) # use import file
6673 # The Import File defines what to hardcode.
6674 _LT_TAGVAR(hardcode_direct, $1)=no
6675 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6676 ;;
6677 esac
6678
6679 if test yes = "$GXX"; then
6680 case $host_os in aix4.[[012]]|aix4.[[012]].*)
6681 # We only want to do this on AIX 4.2 and lower, the check
6682 # below for broken collect2 doesn't work under 4.3+
6683 collect2name=`$CC -print-prog-name=collect2`
6684 if test -f "$collect2name" &&
6685 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6686 then
6687 # We have reworked collect2
6688 :
6689 else
6690 # We have old collect2
6691 _LT_TAGVAR(hardcode_direct, $1)=unsupported
6692 # It fails to find uninstalled libraries when the uninstalled
6693 # path is not listed in the libpath. Setting hardcode_minus_L
6694 # to unsupported forces relinking
6695 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6696 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6697 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6698 fi
6699 esac
6700 shared_flag='-shared'
6701 if test yes = "$aix_use_runtimelinking"; then
6702 shared_flag=$shared_flag' $wl-G'
6703 fi
6704 # Need to ensure runtime linking is disabled for the traditional
6705 # shared library, or the linker may eventually find shared libraries
6706 # /with/ Import File - we do not want to mix them.
6707 shared_flag_aix='-shared'
6708 shared_flag_svr4='-shared $wl-G'
6709 else
6710 # not using gcc
6711 if test ia64 = "$host_cpu"; then
6712 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6713 # chokes on -Wl,-G. The following line is correct:
6714 shared_flag='-G'
6715 else
6716 if test yes = "$aix_use_runtimelinking"; then
6717 shared_flag='$wl-G'
6718 else
6719 shared_flag='$wl-bM:SRE'
6720 fi
6721 shared_flag_aix='$wl-bM:SRE'
6722 shared_flag_svr4='$wl-G'
6723 fi
6724 fi
6725
6726 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
6727 # It seems that -bexpall does not export symbols beginning with
6728 # underscore (_), so it is better to generate a list of symbols to
6729 # export.
6730 _LT_TAGVAR(always_export_symbols, $1)=yes
6731 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
6732 # Warning - without using the other runtime loading flags (-brtl),
6733 # -berok will link without error, but may produce a broken library.
6734 # The "-G" linker flag allows undefined symbols.
6735 _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
6736 # Determine the default libpath from the value encoded in an empty
6737 # executable.
6738 _LT_SYS_MODULE_PATH_AIX([$1])
6739 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
6740
6741 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
6742 else
6743 if test ia64 = "$host_cpu"; then
6744 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
6745 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6746 _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"
6747 else
6748 # Determine the default libpath from the value encoded in an
6749 # empty executable.
6750 _LT_SYS_MODULE_PATH_AIX([$1])
6751 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
6752 # Warning - without using the other run time loading flags,
6753 # -berok will link without error, but may produce a broken library.
6754 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
6755 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
6756 if test yes = "$with_gnu_ld"; then
6757 # We only use this code for GNU lds that support --whole-archive.
6758 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
6759 else
6760 # Exported symbols can be pulled into shared objects from archives
6761 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6762 fi
6763 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6764 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
6765 # -brtl affects multiple linker settings, -berok does not and is overridden later
6766 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
6767 if test svr4 != "$with_aix_soname"; then
6768 # This is similar to how AIX traditionally builds its shared
6769 # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
6770 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
6771 fi
6772 if test aix != "$with_aix_soname"; then
6773 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
6774 else
6775 # used by -dlpreopen to get the symbols
6776 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
6777 fi
6778 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
6779 fi
6780 fi
6781 ;;
6782
6783 beos*)
6784 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6785 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6786 # Joseph Beckenbach <[email protected]> says some releases of gcc
6787 # support --undefined. This deserves some investigation. FIXME
6788 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6789 else
6790 _LT_TAGVAR(ld_shlibs, $1)=no
6791 fi
6792 ;;
6793
6794 chorus*)
6795 case $cc_basename in
6796 *)
6797 # FIXME: insert proper C++ library support
6798 _LT_TAGVAR(ld_shlibs, $1)=no
6799 ;;
6800 esac
6801 ;;
6802
6803 cygwin* | mingw* | windows* | pw32* | cegcc*)
6804 case $GXX,$cc_basename in
6805 ,cl* | no,cl* | ,icl* | no,icl*)
6806 # Native MSVC or ICC
6807 # hardcode_libdir_flag_spec is actually meaningless, as there is
6808 # no search path for DLLs.
6809 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6810 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6811 _LT_TAGVAR(always_export_symbols, $1)=yes
6812 _LT_TAGVAR(file_list_spec, $1)='@'
6813 # Tell ltmain to make .lib files, not .a files.
6814 libext=lib
6815 # Tell ltmain to make .dll files, not .so files.
6816 shrext_cmds=.dll
6817 # FIXME: Setting linknames here is a bad hack.
6818 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
6819 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
6820 cp "$export_symbols" "$output_objdir/$soname.def";
6821 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
6822 else
6823 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
6824 fi~
6825 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6826 linknames='
6827 # The linker will not automatically build a static lib if we build a DLL.
6828 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6829 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6830 # Don't use ranlib
6831 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6832 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6833 lt_tool_outputfile="@TOOL_OUTPUT@"~
6834 case $lt_outputfile in
6835 *.exe|*.EXE) ;;
6836 *)
6837 lt_outputfile=$lt_outputfile.exe
6838 lt_tool_outputfile=$lt_tool_outputfile.exe
6839 ;;
6840 esac~
6841 func_to_tool_file "$lt_outputfile"~
6842 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
6843 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6844 $RM "$lt_outputfile.manifest";
6845 fi'
6846 ;;
6847 *)
6848 # g++
6849 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6850 # as there is no search path for DLLs.
6851 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6852 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
6853 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6854 _LT_TAGVAR(always_export_symbols, $1)=no
6855 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6856 _LT_TAGVAR(file_list_spec, $1)='@'
6857
6858 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6859 _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'
6860 # If the export-symbols file already is a .def file, use it as
6861 # is; otherwise, prepend EXPORTS...
6862 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
6863 cp $export_symbols $output_objdir/$soname.def;
6864 else
6865 echo EXPORTS > $output_objdir/$soname.def;
6866 cat $export_symbols >> $output_objdir/$soname.def;
6867 fi~
6868 $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'
6869 else
6870 _LT_TAGVAR(ld_shlibs, $1)=no
6871 fi
6872 ;;
6873 esac
6874 ;;
6875 darwin* | rhapsody*)
6876 _LT_DARWIN_LINKER_FEATURES($1)
6877 ;;
6878
6879 os2*)
6880 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6881 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6882 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6883 shrext_cmds=.dll
6884 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
6885 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
6886 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
6887 $ECHO EXPORTS >> $output_objdir/$libname.def~
6888 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
6889 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
6890 emximp -o $lib $output_objdir/$libname.def'
6891 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
6892 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
6893 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
6894 $ECHO EXPORTS >> $output_objdir/$libname.def~
6895 prefix_cmds="$SED"~
6896 if test EXPORTS = "`$SED 1q $export_symbols`"; then
6897 prefix_cmds="$prefix_cmds -e 1d";
6898 fi~
6899 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
6900 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
6901 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
6902 emximp -o $lib $output_objdir/$libname.def'
6903 _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
6904 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6905 _LT_TAGVAR(file_list_spec, $1)='@'
6906 ;;
6907
6908 dgux*)
6909 case $cc_basename in
6910 ec++*)
6911 # FIXME: insert proper C++ library support
6912 _LT_TAGVAR(ld_shlibs, $1)=no
6913 ;;
6914 ghcx*)
6915 # Green Hills C++ Compiler
6916 # FIXME: insert proper C++ library support
6917 _LT_TAGVAR(ld_shlibs, $1)=no
6918 ;;
6919 *)
6920 # FIXME: insert proper C++ library support
6921 _LT_TAGVAR(ld_shlibs, $1)=no
6922 ;;
6923 esac
6924 ;;
6925
6926 freebsd2.*)
6927 # C++ shared libraries reported to be fairly broken before
6928 # switch to ELF
6929 _LT_TAGVAR(ld_shlibs, $1)=no
6930 ;;
6931
6932 freebsd-elf*)
6933 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6934 ;;
6935
6936 freebsd* | dragonfly* | midnightbsd*)
6937 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
6938 # conventions
6939 _LT_TAGVAR(ld_shlibs, $1)=yes
6940 ;;
6941
6942 haiku*)
6943 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6944 _LT_TAGVAR(link_all_deplibs, $1)=no
6945 ;;
6946
6947 hpux9*)
6948 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
6949 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6950 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
6951 _LT_TAGVAR(hardcode_direct, $1)=yes
6952 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6953 # but as the default
6954 # location of the library.
6955
6956 case $cc_basename in
6957 CC*)
6958 # FIXME: insert proper C++ library support
6959 _LT_TAGVAR(ld_shlibs, $1)=no
6960 ;;
6961 aCC*)
6962 _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 "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
6963 # Commands to make compiler produce verbose output that lists
6964 # what "hidden" libraries, object files and flags are used when
6965 # linking a shared library.
6966 #
6967 # There doesn't appear to be a way to prevent this compiler from
6968 # explicitly linking system object files so we need to strip them
6969 # from the output so that they don't get included in the library
6970 # dependencies.
6971 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"'
6972 ;;
6973 *)
6974 if test yes = "$GXX"; then
6975 _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 "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
6976 else
6977 # FIXME: insert proper C++ library support
6978 _LT_TAGVAR(ld_shlibs, $1)=no
6979 fi
6980 ;;
6981 esac
6982 ;;
6983
6984 hpux10*|hpux11*)
6985 if test no = "$with_gnu_ld"; then
6986 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
6987 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6988
6989 case $host_cpu in
6990 hppa*64*|ia64*)
6991 ;;
6992 *)
6993 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
6994 ;;
6995 esac
6996 fi
6997 case $host_cpu in
6998 hppa*64*|ia64*)
6999 _LT_TAGVAR(hardcode_direct, $1)=no
7000 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7001 ;;
7002 *)
7003 _LT_TAGVAR(hardcode_direct, $1)=yes
7004 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7005 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7006 # but as the default
7007 # location of the library.
7008 ;;
7009 esac
7010
7011 case $cc_basename in
7012 CC*)
7013 # FIXME: insert proper C++ library support
7014 _LT_TAGVAR(ld_shlibs, $1)=no
7015 ;;
7016 aCC*)
7017 case $host_cpu in
7018 hppa*64*)
7019 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7020 ;;
7021 ia64*)
7022 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7023 ;;
7024 *)
7025 _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'
7026 ;;
7027 esac
7028 # Commands to make compiler produce verbose output that lists
7029 # what "hidden" libraries, object files and flags are used when
7030 # linking a shared library.
7031 #
7032 # There doesn't appear to be a way to prevent this compiler from
7033 # explicitly linking system object files so we need to strip them
7034 # from the output so that they don't get included in the library
7035 # dependencies.
7036 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"'
7037 ;;
7038 *)
7039 if test yes = "$GXX"; then
7040 if test no = "$with_gnu_ld"; then
7041 case $host_cpu in
7042 hppa*64*)
7043 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7044 ;;
7045 ia64*)
7046 _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'
7047 ;;
7048 *)
7049 _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'
7050 ;;
7051 esac
7052 fi
7053 else
7054 # FIXME: insert proper C++ library support
7055 _LT_TAGVAR(ld_shlibs, $1)=no
7056 fi
7057 ;;
7058 esac
7059 ;;
7060
7061 interix[[3-9]]*)
7062 _LT_TAGVAR(hardcode_direct, $1)=no
7063 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7064 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7065 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
7066 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
7067 # Instead, shared libraries are loaded at an image base (0x10000000 by
7068 # default) and relocated if they conflict, which is a slow very memory
7069 # consuming and fragmenting process. To avoid this, we pick a random,
7070 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
7071 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
7072 _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'
7073 _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'
7074 ;;
7075 irix5* | irix6*)
7076 case $cc_basename in
7077 CC*)
7078 # SGI C++
7079 _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'
7080
7081 # Archives containing C++ object files must be created using
7082 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
7083 # necessary to make sure instantiated templates are included
7084 # in the archive.
7085 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
7086 ;;
7087 *)
7088 if test yes = "$GXX"; then
7089 if test no = "$with_gnu_ld"; then
7090 _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'
7091 else
7092 _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'
7093 fi
7094 fi
7095 _LT_TAGVAR(link_all_deplibs, $1)=yes
7096 ;;
7097 esac
7098 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7099 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7100 _LT_TAGVAR(inherit_rpath, $1)=yes
7101 ;;
7102
7103 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
7104 case $cc_basename in
7105 KCC*)
7106 # Kuck and Associates, Inc. (KAI) C++ Compiler
7107
7108 # KCC will only create a shared library if the output file
7109 # ends with ".so" (or ".sl" for HP-UX), so rename the library
7110 # to its proper name (with version) after linking.
7111 _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'
7112 _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'
7113 # Commands to make compiler produce verbose output that lists
7114 # what "hidden" libraries, object files and flags are used when
7115 # linking a shared library.
7116 #
7117 # There doesn't appear to be a way to prevent this compiler from
7118 # explicitly linking system object files so we need to strip them
7119 # from the output so that they don't get included in the library
7120 # dependencies.
7121 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"'
7122
7123 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7124 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7125
7126 # Archives containing C++ object files must be created using
7127 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
7128 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
7129 ;;
7130 icpc* | ecpc* )
7131 # Intel C++
7132 with_gnu_ld=yes
7133 # version 8.0 and above of icpc choke on multiply defined symbols
7134 # if we add $predep_objects and $postdep_objects, however 7.1 and
7135 # earlier do not add the objects themselves.
7136 case `$CC -V 2>&1` in
7137 *"Version 7."*)
7138 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7139 _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'
7140 ;;
7141 *) # Version 8.0 or newer
7142 tmp_idyn=
7143 case $host_cpu in
7144 ia64*) tmp_idyn=' -i_dynamic';;
7145 esac
7146 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
7147 _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'
7148 ;;
7149 esac
7150 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7151 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7152 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7153 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
7154 ;;
7155 pgCC* | pgcpp*)
7156 # Portland Group C++ compiler
7157 case `$CC -V` in
7158 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
7159 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
7160 rm -rf $tpldir~
7161 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
7162 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
7163 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
7164 rm -rf $tpldir~
7165 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
7166 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
7167 $RANLIB $oldlib'
7168 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
7169 rm -rf $tpldir~
7170 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7171 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7172 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
7173 rm -rf $tpldir~
7174 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7175 $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'
7176 ;;
7177 *) # Version 6 and above use weak symbols
7178 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7179 _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'
7180 ;;
7181 esac
7182
7183 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
7184 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7185 _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'
7186 ;;
7187 cxx*)
7188 # Compaq C++
7189 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7190 _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'
7191
7192 runpath_var=LD_RUN_PATH
7193 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7194 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7195
7196 # Commands to make compiler produce verbose output that lists
7197 # what "hidden" libraries, object files and flags are used when
7198 # linking a shared library.
7199 #
7200 # There doesn't appear to be a way to prevent this compiler from
7201 # explicitly linking system object files so we need to strip them
7202 # from the output so that they don't get included in the library
7203 # dependencies.
7204 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'
7205 ;;
7206 xl* | mpixl* | bgxl*)
7207 # IBM XL 8.0 on PPC, with GNU ld
7208 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7209 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7210 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
7211 if test yes = "$supports_anon_versioning"; then
7212 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7213 cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7214 echo "local: *; };" >> $output_objdir/$libname.ver~
7215 $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
7216 fi
7217 ;;
7218 *)
7219 case `$CC -V 2>&1 | $SED 5q` in
7220 *Sun\ C*)
7221 # Sun C++ 5.9
7222 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7223 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7224 _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'
7225 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7226 _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'
7227 _LT_TAGVAR(compiler_needs_object, $1)=yes
7228
7229 # Not sure whether something based on
7230 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
7231 # would be better.
7232 output_verbose_link_cmd='func_echo_all'
7233
7234 # Archives containing C++ object files must be created using
7235 # "CC -xar", where "CC" is the Sun C++ compiler. This is
7236 # necessary to make sure instantiated templates are included
7237 # in the archive.
7238 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7239 ;;
7240 esac
7241 ;;
7242 esac
7243 ;;
7244
7245 lynxos*)
7246 # FIXME: insert proper C++ library support
7247 _LT_TAGVAR(ld_shlibs, $1)=no
7248 ;;
7249
7250 m88k*)
7251 # FIXME: insert proper C++ library support
7252 _LT_TAGVAR(ld_shlibs, $1)=no
7253 ;;
7254
7255 mvs*)
7256 case $cc_basename in
7257 cxx*)
7258 # FIXME: insert proper C++ library support
7259 _LT_TAGVAR(ld_shlibs, $1)=no
7260 ;;
7261 *)
7262 # FIXME: insert proper C++ library support
7263 _LT_TAGVAR(ld_shlibs, $1)=no
7264 ;;
7265 esac
7266 ;;
7267
7268 *-mlibc)
7269 _LT_TAGVAR(ld_shlibs, $1)=yes
7270 ;;
7271
7272 netbsd*)
7273 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7274 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
7275 wlarc=
7276 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7277 _LT_TAGVAR(hardcode_direct, $1)=yes
7278 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7279 fi
7280 # Workaround some broken pre-1.5 toolchains
7281 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
7282 ;;
7283
7284 *nto* | *qnx*)
7285 _LT_TAGVAR(ld_shlibs, $1)=yes
7286 ;;
7287
7288 openbsd*)
7289 if test -f /usr/libexec/ld.so; then
7290 _LT_TAGVAR(hardcode_direct, $1)=yes
7291 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7292 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7293 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7294 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7295 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
7296 _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'
7297 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
7298 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
7299 fi
7300 output_verbose_link_cmd=func_echo_all
7301 else
7302 _LT_TAGVAR(ld_shlibs, $1)=no
7303 fi
7304 ;;
7305
7306 osf3* | osf4* | osf5*)
7307 case $cc_basename in
7308 KCC*)
7309 # Kuck and Associates, Inc. (KAI) C++ Compiler
7310
7311 # KCC will only create a shared library if the output file
7312 # ends with ".so" (or ".sl" for HP-UX), so rename the library
7313 # to its proper name (with version) after linking.
7314 _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'
7315
7316 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7317 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7318
7319 # Archives containing C++ object files must be created using
7320 # the KAI C++ compiler.
7321 case $host in
7322 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
7323 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
7324 esac
7325 ;;
7326 RCC*)
7327 # Rational C++ 2.4.1
7328 # FIXME: insert proper C++ library support
7329 _LT_TAGVAR(ld_shlibs, $1)=no
7330 ;;
7331 cxx*)
7332 case $host in
7333 osf3*)
7334 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
7335 _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'
7336 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7337 ;;
7338 *)
7339 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7340 _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'
7341 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
7342 echo "-hidden">> $lib.exp~
7343 $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~
7344 $RM $lib.exp'
7345 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7346 ;;
7347 esac
7348
7349 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7350
7351 # Commands to make compiler produce verbose output that lists
7352 # what "hidden" libraries, object files and flags are used when
7353 # linking a shared library.
7354 #
7355 # There doesn't appear to be a way to prevent this compiler from
7356 # explicitly linking system object files so we need to strip them
7357 # from the output so that they don't get included in the library
7358 # dependencies.
7359 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"'
7360 ;;
7361 *)
7362 if test yes,no = "$GXX,$with_gnu_ld"; then
7363 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
7364 case $host in
7365 osf3*)
7366 _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'
7367 ;;
7368 *)
7369 _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'
7370 ;;
7371 esac
7372
7373 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7374 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7375
7376 # Commands to make compiler produce verbose output that lists
7377 # what "hidden" libraries, object files and flags are used when
7378 # linking a shared library.
7379 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " [[-]]L"'
7380
7381 else
7382 # FIXME: insert proper C++ library support
7383 _LT_TAGVAR(ld_shlibs, $1)=no
7384 fi
7385 ;;
7386 esac
7387 ;;
7388
7389 psos*)
7390 # FIXME: insert proper C++ library support
7391 _LT_TAGVAR(ld_shlibs, $1)=no
7392 ;;
7393
7394 serenity*)
7395 ;;
7396
7397 sunos4*)
7398 case $cc_basename in
7399 CC*)
7400 # Sun C++ 4.x
7401 # FIXME: insert proper C++ library support
7402 _LT_TAGVAR(ld_shlibs, $1)=no
7403 ;;
7404 lcc*)
7405 # Lucid
7406 # FIXME: insert proper C++ library support
7407 _LT_TAGVAR(ld_shlibs, $1)=no
7408 ;;
7409 *)
7410 # FIXME: insert proper C++ library support
7411 _LT_TAGVAR(ld_shlibs, $1)=no
7412 ;;
7413 esac
7414 ;;
7415
7416 solaris*)
7417 case $cc_basename in
7418 CC* | sunCC*)
7419 # Sun C++ 4.2, 5.x and Centerline C++
7420 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
7421 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7422 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7423 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7424 $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'
7425
7426 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7427 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7428 case $host_os in
7429 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7430 *)
7431 # The compiler driver will combine and reorder linker options,
7432 # but understands '-z linker_flag'.
7433 # Supported since Solaris 2.6 (maybe 2.5.1?)
7434 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7435 ;;
7436 esac
7437 _LT_TAGVAR(link_all_deplibs, $1)=yes
7438
7439 output_verbose_link_cmd='func_echo_all'
7440
7441 # Archives containing C++ object files must be created using
7442 # "CC -xar", where "CC" is the Sun C++ compiler. This is
7443 # necessary to make sure instantiated templates are included
7444 # in the archive.
7445 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7446 ;;
7447 gcx*)
7448 # Green Hills C++ Compiler
7449 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
7450
7451 # The C++ compiler must be used to create the archive.
7452 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
7453 ;;
7454 *)
7455 # GNU C++ compiler with Solaris linker
7456 if test yes,no = "$GXX,$with_gnu_ld"; then
7457 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
7458 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
7459 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
7460 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7461 $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7462
7463 # Commands to make compiler produce verbose output that lists
7464 # what "hidden" libraries, object files and flags are used when
7465 # linking a shared library.
7466 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " [[-]]L"'
7467 else
7468 # g++ 2.7 appears to require '-G' NOT '-shared' on this
7469 # platform.
7470 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
7471 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7472 $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7473
7474 # Commands to make compiler produce verbose output that lists
7475 # what "hidden" libraries, object files and flags are used when
7476 # linking a shared library.
7477 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " [[-]]L"'
7478 fi
7479
7480 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
7481 case $host_os in
7482 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7483 *)
7484 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
7485 ;;
7486 esac
7487 fi
7488 ;;
7489 esac
7490 ;;
7491
7492 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7493 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
7494 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7495 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7496 runpath_var='LD_RUN_PATH'
7497
7498 case $cc_basename in
7499 CC*)
7500 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7501 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7502 ;;
7503 *)
7504 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7505 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7506 ;;
7507 esac
7508 ;;
7509
7510 sysv5* | sco3.2v5* | sco5v6*)
7511 # Note: We CANNOT use -z defs as we might desire, because we do not
7512 # link with -lc, and that would cause any symbols used from libc to
7513 # always be unresolved, which means just about no library would
7514 # ever link correctly. If we're not using GNU ld we use -z text
7515 # though, which does catch some bad symbols but isn't as heavy-handed
7516 # as -z defs.
7517 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
7518 _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
7519 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7520 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7521 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
7522 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7523 _LT_TAGVAR(link_all_deplibs, $1)=yes
7524 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
7525 runpath_var='LD_RUN_PATH'
7526
7527 case $cc_basename in
7528 CC*)
7529 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7530 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7531 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
7532 '"$_LT_TAGVAR(old_archive_cmds, $1)"
7533 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
7534 '"$_LT_TAGVAR(reload_cmds, $1)"
7535 ;;
7536 *)
7537 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7538 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7539 ;;
7540 esac
7541 ;;
7542
7543 tandem*)
7544 case $cc_basename in
7545 NCC*)
7546 # NonStop-UX NCC 3.20
7547 # FIXME: insert proper C++ library support
7548 _LT_TAGVAR(ld_shlibs, $1)=no
7549 ;;
7550 *)
7551 # FIXME: insert proper C++ library support
7552 _LT_TAGVAR(ld_shlibs, $1)=no
7553 ;;
7554 esac
7555 ;;
7556
7557 vxworks*)
7558 # FIXME: insert proper C++ library support
7559 _LT_TAGVAR(ld_shlibs, $1)=no
7560 ;;
7561
7562 *)
7563 # FIXME: insert proper C++ library support
7564 _LT_TAGVAR(ld_shlibs, $1)=no
7565 ;;
7566 esac
7567
7568 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7569 test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
7570
7571 _LT_TAGVAR(GCC, $1)=$GXX
7572 _LT_TAGVAR(LD, $1)=$LD
7573
7574 ## CAVEAT EMPTOR:
7575 ## There is no encapsulation within the following macros, do not change
7576 ## the running order or otherwise move them around unless you know exactly
7577 ## what you are doing...
7578 _LT_SYS_HIDDEN_LIBDEPS($1)
7579 _LT_COMPILER_PIC($1)
7580 _LT_COMPILER_C_O($1)
7581 _LT_COMPILER_FILE_LOCKS($1)
7582 _LT_LINKER_SHLIBS($1)
7583 _LT_SYS_DYNAMIC_LINKER($1)
7584 _LT_LINKER_HARDCODE_LIBPATH($1)
7585
7586 _LT_CONFIG($1)
7587 fi # test -n "$compiler"
7588
7589 CC=$lt_save_CC
7590 CFLAGS=$lt_save_CFLAGS
7591 LDCXX=$LD
7592 LD=$lt_save_LD
7593 GCC=$lt_save_GCC
7594 with_gnu_ld=$lt_save_with_gnu_ld
7595 lt_cv_path_LDCXX=$lt_cv_path_LD
7596 lt_cv_path_LD=$lt_save_path_LD
7597 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
7598 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
7599 fi # test yes != "$_lt_caught_CXX_error"
7600
7601 AC_LANG_POP
7602 ])# _LT_LANG_CXX_CONFIG
7603
7604
7605 # _LT_FUNC_STRIPNAME_CNF
7606 # ----------------------
7607 # func_stripname_cnf prefix suffix name
7608 # strip PREFIX and SUFFIX off of NAME.
7609 # PREFIX and SUFFIX must not contain globbing or regex special
7610 # characters, hashes, percent signs, but SUFFIX may contain a leading
7611 # dot (in which case that matches only a dot).
7612 #
7613 # This function is identical to the (non-XSI) version of func_stripname,
7614 # except this one can be used by m4 code that may be executed by configure,
7615 # rather than the libtool script.
7616 m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
7617 AC_REQUIRE([_LT_DECL_SED])
7618 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
7619 func_stripname_cnf ()
7620 {
7621 case @S|@2 in
7622 .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
7623 *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
7624 esac
7625 } # func_stripname_cnf
7626 ])# _LT_FUNC_STRIPNAME_CNF
7627
7628
7629 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
7630 # ---------------------------------
7631 # Figure out "hidden" library dependencies from verbose
7632 # compiler output when linking a shared library.
7633 # Parse the compiler output and extract the necessary
7634 # objects, libraries and library flags.
7635 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
7636 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7637 AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
7638 # Dependencies to place before and after the object being linked:
7639 _LT_TAGVAR(predep_objects, $1)=
7640 _LT_TAGVAR(postdep_objects, $1)=
7641 _LT_TAGVAR(predeps, $1)=
7642 _LT_TAGVAR(postdeps, $1)=
7643 _LT_TAGVAR(compiler_lib_search_path, $1)=
7644
7645 dnl we can't use the lt_simple_compile_test_code here,
7646 dnl because it contains code intended for an executable,
7647 dnl not a library. It's possible we should let each
7648 dnl tag define a new lt_????_link_test_code variable,
7649 dnl but it's only used here...
7650 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
7651 int a;
7652 void foo (void) { a = 0; }
7653 _LT_EOF
7654 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
7655 class Foo
7656 {
7657 public:
7658 Foo (void) { a = 0; }
7659 private:
7660 int a;
7661 };
7662 _LT_EOF
7663 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
7664 subroutine foo
7665 implicit none
7666 integer*4 a
7667 a=0
7668 return
7669 end
7670 _LT_EOF
7671 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
7672 subroutine foo
7673 implicit none
7674 integer a
7675 a=0
7676 return
7677 end
7678 _LT_EOF
7679 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
7680 public class foo {
7681 private int a;
7682 public void bar (void) {
7683 a = 0;
7684 }
7685 };
7686 _LT_EOF
7687 ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
7688 package foo
7689 func foo() {
7690 }
7691 _LT_EOF
7692 ])
7693
7694 _lt_libdeps_save_CFLAGS=$CFLAGS
7695 case "$CC $CFLAGS " in #(
7696 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
7697 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
7698 *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
7699 esac
7700
7701 dnl Parse the compiler output and extract the necessary
7702 dnl objects, libraries and library flags.
7703 if AC_TRY_EVAL(ac_compile); then
7704 # Parse the compiler output and extract the necessary
7705 # objects, libraries and library flags.
7706
7707 # Sentinel used to keep track of whether or not we are before
7708 # the conftest object file.
7709 pre_test_object_deps_done=no
7710
7711 for p in `eval "$output_verbose_link_cmd"`; do
7712 case $prev$p in
7713
7714 -L* | -R* | -l*)
7715 # Some compilers place space between "-{L,R,l}" and the path.
7716 # Remove the space.
7717 if test x-L = x"$p" ||
7718 test x-R = x"$p" ||
7719 test x-l = x"$p"; then
7720 prev=$p
7721 continue
7722 fi
7723
7724 # Expand the sysroot to ease extracting the directories later.
7725 if test -z "$prev"; then
7726 case $p in
7727 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
7728 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
7729 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
7730 esac
7731 fi
7732 case $p in
7733 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
7734 esac
7735 if test no = "$pre_test_object_deps_done"; then
7736 case $prev in
7737 -L | -R)
7738 # Internal compiler library paths should come after those
7739 # provided the user. The postdeps already come after the
7740 # user supplied libs so there is no need to process them.
7741 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
7742 _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
7743 else
7744 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
7745 fi
7746 ;;
7747 # The "-l" case would never come before the object being
7748 # linked, so don't bother handling this case.
7749 esac
7750 else
7751 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
7752 _LT_TAGVAR(postdeps, $1)=$prev$p
7753 else
7754 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
7755 fi
7756 fi
7757 prev=
7758 ;;
7759
7760 *.lto.$objext) ;; # Ignore GCC LTO objects
7761 *.$objext)
7762 # This assumes that the test object file only shows up
7763 # once in the compiler output.
7764 if test "$p" = "conftest.$objext"; then
7765 pre_test_object_deps_done=yes
7766 continue
7767 fi
7768
7769 if test no = "$pre_test_object_deps_done"; then
7770 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
7771 _LT_TAGVAR(predep_objects, $1)=$p
7772 else
7773 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
7774 fi
7775 else
7776 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
7777 _LT_TAGVAR(postdep_objects, $1)=$p
7778 else
7779 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
7780 fi
7781 fi
7782 ;;
7783
7784 *) ;; # Ignore the rest.
7785
7786 esac
7787 done
7788
7789 # Clean up.
7790 rm -f a.out a.exe
7791 else
7792 echo "libtool.m4: error: problem compiling $1 test program"
7793 fi
7794
7795 $RM -f confest.$objext
7796 CFLAGS=$_lt_libdeps_save_CFLAGS
7797
7798 # PORTME: override above test on systems where it is broken
7799 m4_if([$1], [CXX],
7800 [case $host_os in
7801 interix[[3-9]]*)
7802 # Interix 3.5 installs completely hosed .la files for C++, so rather than
7803 # hack all around it, let's just trust "g++" to DTRT.
7804 _LT_TAGVAR(predep_objects,$1)=
7805 _LT_TAGVAR(postdep_objects,$1)=
7806 _LT_TAGVAR(postdeps,$1)=
7807 ;;
7808 esac
7809 ])
7810
7811 case " $_LT_TAGVAR(postdeps, $1) " in
7812 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
7813 esac
7814 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
7815 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
7816 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
7817 fi
7818 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
7819 [The directories searched by this compiler when creating a shared library])
7820 _LT_TAGDECL([], [predep_objects], [1],
7821 [Dependencies to place before and after the objects being linked to
7822 create a shared library])
7823 _LT_TAGDECL([], [postdep_objects], [1])
7824 _LT_TAGDECL([], [predeps], [1])
7825 _LT_TAGDECL([], [postdeps], [1])
7826 _LT_TAGDECL([], [compiler_lib_search_path], [1],
7827 [The library search path used internally by the compiler when linking
7828 a shared library])
7829 ])# _LT_SYS_HIDDEN_LIBDEPS
7830
7831
7832 # _LT_LANG_F77_CONFIG([TAG])
7833 # --------------------------
7834 # Ensure that the configuration variables for a Fortran 77 compiler are
7835 # suitably defined. These variables are subsequently used by _LT_CONFIG
7836 # to write the compiler configuration to 'libtool'.
7837 m4_defun([_LT_LANG_F77_CONFIG],
7838 [AC_LANG_PUSH(Fortran 77)
7839 if test -z "$F77" || test no = "$F77"; then
7840 _lt_disable_F77=yes
7841 fi
7842
7843 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7844 _LT_TAGVAR(allow_undefined_flag, $1)=
7845 _LT_TAGVAR(always_export_symbols, $1)=no
7846 _LT_TAGVAR(archive_expsym_cmds, $1)=
7847 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7848 _LT_TAGVAR(hardcode_direct, $1)=no
7849 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7850 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7851 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7852 _LT_TAGVAR(hardcode_minus_L, $1)=no
7853 _LT_TAGVAR(hardcode_automatic, $1)=no
7854 _LT_TAGVAR(inherit_rpath, $1)=no
7855 _LT_TAGVAR(module_cmds, $1)=
7856 _LT_TAGVAR(module_expsym_cmds, $1)=
7857 _LT_TAGVAR(link_all_deplibs, $1)=unknown
7858 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7859 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7860 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7861 _LT_TAGVAR(no_undefined_flag, $1)=
7862 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7863 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7864
7865 # Source file extension for f77 test sources.
7866 ac_ext=f
7867
7868 # Object file extension for compiled f77 test sources.
7869 objext=o
7870 _LT_TAGVAR(objext, $1)=$objext
7871
7872 # No sense in running all these tests if we already determined that
7873 # the F77 compiler isn't working. Some variables (like enable_shared)
7874 # are currently assumed to apply to all compilers on this platform,
7875 # and will be corrupted by setting them based on a non-working compiler.
7876 if test yes != "$_lt_disable_F77"; then
7877 # Code to be used in simple compile tests
7878 lt_simple_compile_test_code="\
7879 subroutine t
7880 return
7881 end
7882 "
7883
7884 # Code to be used in simple link tests
7885 lt_simple_link_test_code="\
7886 program t
7887 end
7888 "
7889
7890 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7891 _LT_TAG_COMPILER
7892
7893 # save warnings/boilerplate of simple test code
7894 _LT_COMPILER_BOILERPLATE
7895 _LT_LINKER_BOILERPLATE
7896
7897 # Allow CC to be a program name with arguments.
7898 lt_save_CC=$CC
7899 lt_save_GCC=$GCC
7900 lt_save_CFLAGS=$CFLAGS
7901 CC=${F77-"f77"}
7902 CFLAGS=$FFLAGS
7903 compiler=$CC
7904 _LT_TAGVAR(compiler, $1)=$CC
7905 _LT_CC_BASENAME([$compiler])
7906 GCC=$G77
7907 if test -n "$compiler"; then
7908 AC_MSG_CHECKING([if libtool supports shared libraries])
7909 AC_MSG_RESULT([$can_build_shared])
7910
7911 AC_MSG_CHECKING([whether to build shared libraries])
7912 test no = "$can_build_shared" && enable_shared=no
7913
7914 # On AIX, shared libraries and static libraries use the same namespace, and
7915 # are all built from PIC.
7916 case $host_os in
7917 aix3*)
7918 test yes = "$enable_shared" && enable_static=no
7919 if test -n "$RANLIB"; then
7920 archive_cmds="$archive_cmds~\$RANLIB \$lib"
7921 postinstall_cmds='$RANLIB $lib'
7922 fi
7923 ;;
7924 aix[[4-9]]*)
7925 if test ia64 != "$host_cpu"; then
7926 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
7927 yes,aix,yes) ;; # shared object as lib.so file only
7928 yes,svr4,*) ;; # shared object as lib.so archive member only
7929 yes,*) enable_static=no ;; # shared object in lib.a archive as well
7930 esac
7931 fi
7932 ;;
7933 esac
7934 AC_MSG_RESULT([$enable_shared])
7935
7936 AC_MSG_CHECKING([whether to build static libraries])
7937 # Make sure either enable_shared or enable_static is yes.
7938 test yes = "$enable_shared" || enable_static=yes
7939 AC_MSG_RESULT([$enable_static])
7940
7941 _LT_TAGVAR(GCC, $1)=$G77
7942 _LT_TAGVAR(LD, $1)=$LD
7943
7944 ## CAVEAT EMPTOR:
7945 ## There is no encapsulation within the following macros, do not change
7946 ## the running order or otherwise move them around unless you know exactly
7947 ## what you are doing...
7948 _LT_COMPILER_PIC($1)
7949 _LT_COMPILER_C_O($1)
7950 _LT_COMPILER_FILE_LOCKS($1)
7951 _LT_LINKER_SHLIBS($1)
7952 _LT_SYS_DYNAMIC_LINKER($1)
7953 _LT_LINKER_HARDCODE_LIBPATH($1)
7954
7955 _LT_CONFIG($1)
7956 fi # test -n "$compiler"
7957
7958 GCC=$lt_save_GCC
7959 CC=$lt_save_CC
7960 CFLAGS=$lt_save_CFLAGS
7961 fi # test yes != "$_lt_disable_F77"
7962
7963 AC_LANG_POP
7964 ])# _LT_LANG_F77_CONFIG
7965
7966
7967 # _LT_LANG_FC_CONFIG([TAG])
7968 # -------------------------
7969 # Ensure that the configuration variables for a Fortran compiler are
7970 # suitably defined. These variables are subsequently used by _LT_CONFIG
7971 # to write the compiler configuration to 'libtool'.
7972 m4_defun([_LT_LANG_FC_CONFIG],
7973 [AC_LANG_PUSH(Fortran)
7974
7975 if test -z "$FC" || test no = "$FC"; then
7976 _lt_disable_FC=yes
7977 fi
7978
7979 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7980 _LT_TAGVAR(allow_undefined_flag, $1)=
7981 _LT_TAGVAR(always_export_symbols, $1)=no
7982 _LT_TAGVAR(archive_expsym_cmds, $1)=
7983 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7984 _LT_TAGVAR(hardcode_direct, $1)=no
7985 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7986 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7987 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7988 _LT_TAGVAR(hardcode_minus_L, $1)=no
7989 _LT_TAGVAR(hardcode_automatic, $1)=no
7990 _LT_TAGVAR(inherit_rpath, $1)=no
7991 _LT_TAGVAR(module_cmds, $1)=
7992 _LT_TAGVAR(module_expsym_cmds, $1)=
7993 _LT_TAGVAR(link_all_deplibs, $1)=unknown
7994 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7995 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7996 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7997 _LT_TAGVAR(no_undefined_flag, $1)=
7998 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7999 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8000
8001 # Source file extension for fc test sources.
8002 ac_ext=${ac_fc_srcext-f}
8003
8004 # Object file extension for compiled fc test sources.
8005 objext=o
8006 _LT_TAGVAR(objext, $1)=$objext
8007
8008 # No sense in running all these tests if we already determined that
8009 # the FC compiler isn't working. Some variables (like enable_shared)
8010 # are currently assumed to apply to all compilers on this platform,
8011 # and will be corrupted by setting them based on a non-working compiler.
8012 if test yes != "$_lt_disable_FC"; then
8013 # Code to be used in simple compile tests
8014 lt_simple_compile_test_code="\
8015 subroutine t
8016 return
8017 end
8018 "
8019
8020 # Code to be used in simple link tests
8021 lt_simple_link_test_code="\
8022 program t
8023 end
8024 "
8025
8026 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8027 _LT_TAG_COMPILER
8028
8029 # save warnings/boilerplate of simple test code
8030 _LT_COMPILER_BOILERPLATE
8031 _LT_LINKER_BOILERPLATE
8032
8033 # Allow CC to be a program name with arguments.
8034 lt_save_CC=$CC
8035 lt_save_GCC=$GCC
8036 lt_save_CFLAGS=$CFLAGS
8037 CC=${FC-"f95"}
8038 CFLAGS=$FCFLAGS
8039 compiler=$CC
8040 GCC=$ac_cv_fc_compiler_gnu
8041
8042 _LT_TAGVAR(compiler, $1)=$CC
8043 _LT_CC_BASENAME([$compiler])
8044
8045 if test -n "$compiler"; then
8046 AC_MSG_CHECKING([if libtool supports shared libraries])
8047 AC_MSG_RESULT([$can_build_shared])
8048
8049 AC_MSG_CHECKING([whether to build shared libraries])
8050 test no = "$can_build_shared" && enable_shared=no
8051
8052 # On AIX, shared libraries and static libraries use the same namespace, and
8053 # are all built from PIC.
8054 case $host_os in
8055 aix3*)
8056 test yes = "$enable_shared" && enable_static=no
8057 if test -n "$RANLIB"; then
8058 archive_cmds="$archive_cmds~\$RANLIB \$lib"
8059 postinstall_cmds='$RANLIB $lib'
8060 fi
8061 ;;
8062 aix[[4-9]]*)
8063 if test ia64 != "$host_cpu"; then
8064 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
8065 yes,aix,yes) ;; # shared object as lib.so file only
8066 yes,svr4,*) ;; # shared object as lib.so archive member only
8067 yes,*) enable_static=no ;; # shared object in lib.a archive as well
8068 esac
8069 fi
8070 ;;
8071 esac
8072 AC_MSG_RESULT([$enable_shared])
8073
8074 AC_MSG_CHECKING([whether to build static libraries])
8075 # Make sure either enable_shared or enable_static is yes.
8076 test yes = "$enable_shared" || enable_static=yes
8077 AC_MSG_RESULT([$enable_static])
8078
8079 _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
8080 _LT_TAGVAR(LD, $1)=$LD
8081
8082 ## CAVEAT EMPTOR:
8083 ## There is no encapsulation within the following macros, do not change
8084 ## the running order or otherwise move them around unless you know exactly
8085 ## what you are doing...
8086 _LT_SYS_HIDDEN_LIBDEPS($1)
8087 _LT_COMPILER_PIC($1)
8088 _LT_COMPILER_C_O($1)
8089 _LT_COMPILER_FILE_LOCKS($1)
8090 _LT_LINKER_SHLIBS($1)
8091 _LT_SYS_DYNAMIC_LINKER($1)
8092 _LT_LINKER_HARDCODE_LIBPATH($1)
8093
8094 _LT_CONFIG($1)
8095 fi # test -n "$compiler"
8096
8097 GCC=$lt_save_GCC
8098 CC=$lt_save_CC
8099 CFLAGS=$lt_save_CFLAGS
8100 fi # test yes != "$_lt_disable_FC"
8101
8102 AC_LANG_POP
8103 ])# _LT_LANG_FC_CONFIG
8104
8105
8106 # _LT_LANG_GCJ_CONFIG([TAG])
8107 # --------------------------
8108 # Ensure that the configuration variables for the GNU Java Compiler compiler
8109 # are suitably defined. These variables are subsequently used by _LT_CONFIG
8110 # to write the compiler configuration to 'libtool'.
8111 m4_defun([_LT_LANG_GCJ_CONFIG],
8112 [AC_REQUIRE([LT_PROG_GCJ])dnl
8113 AC_LANG_SAVE
8114
8115 # Source file extension for Java test sources.
8116 ac_ext=java
8117
8118 # Object file extension for compiled Java test sources.
8119 objext=o
8120 _LT_TAGVAR(objext, $1)=$objext
8121
8122 # Code to be used in simple compile tests
8123 lt_simple_compile_test_code="class foo {}"
8124
8125 # Code to be used in simple link tests
8126 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
8127
8128 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8129 _LT_TAG_COMPILER
8130
8131 # save warnings/boilerplate of simple test code
8132 _LT_COMPILER_BOILERPLATE
8133 _LT_LINKER_BOILERPLATE
8134
8135 # Allow CC to be a program name with arguments.
8136 lt_save_CC=$CC
8137 lt_save_CFLAGS=$CFLAGS
8138 lt_save_GCC=$GCC
8139 GCC=yes
8140 CC=${GCJ-"gcj"}
8141 CFLAGS=$GCJFLAGS
8142 compiler=$CC
8143 _LT_TAGVAR(compiler, $1)=$CC
8144 _LT_TAGVAR(LD, $1)=$LD
8145 _LT_CC_BASENAME([$compiler])
8146
8147 # GCJ did not exist at the time GCC didn't implicitly link libc in.
8148 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8149
8150 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8151 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8152 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8153
8154 ## CAVEAT EMPTOR:
8155 ## There is no encapsulation within the following macros, do not change
8156 ## the running order or otherwise move them around unless you know exactly
8157 ## what you are doing...
8158 if test -n "$compiler"; then
8159 _LT_COMPILER_NO_RTTI($1)
8160 _LT_COMPILER_PIC($1)
8161 _LT_COMPILER_C_O($1)
8162 _LT_COMPILER_FILE_LOCKS($1)
8163 _LT_LINKER_SHLIBS($1)
8164 _LT_LINKER_HARDCODE_LIBPATH($1)
8165
8166 _LT_CONFIG($1)
8167 fi
8168
8169 AC_LANG_RESTORE
8170
8171 GCC=$lt_save_GCC
8172 CC=$lt_save_CC
8173 CFLAGS=$lt_save_CFLAGS
8174 ])# _LT_LANG_GCJ_CONFIG
8175
8176
8177 # _LT_LANG_GO_CONFIG([TAG])
8178 # --------------------------
8179 # Ensure that the configuration variables for the GNU Go compiler
8180 # are suitably defined. These variables are subsequently used by _LT_CONFIG
8181 # to write the compiler configuration to 'libtool'.
8182 m4_defun([_LT_LANG_GO_CONFIG],
8183 [AC_REQUIRE([LT_PROG_GO])dnl
8184 AC_LANG_SAVE
8185
8186 # Source file extension for Go test sources.
8187 ac_ext=go
8188
8189 # Object file extension for compiled Go test sources.
8190 objext=o
8191 _LT_TAGVAR(objext, $1)=$objext
8192
8193 # Code to be used in simple compile tests
8194 lt_simple_compile_test_code="package main; func main() { }"
8195
8196 # Code to be used in simple link tests
8197 lt_simple_link_test_code='package main; func main() { }'
8198
8199 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8200 _LT_TAG_COMPILER
8201
8202 # save warnings/boilerplate of simple test code
8203 _LT_COMPILER_BOILERPLATE
8204 _LT_LINKER_BOILERPLATE
8205
8206 # Allow CC to be a program name with arguments.
8207 lt_save_CC=$CC
8208 lt_save_CFLAGS=$CFLAGS
8209 lt_save_GCC=$GCC
8210 GCC=yes
8211 CC=${GOC-"gccgo"}
8212 CFLAGS=$GOFLAGS
8213 compiler=$CC
8214 _LT_TAGVAR(compiler, $1)=$CC
8215 _LT_TAGVAR(LD, $1)=$LD
8216 _LT_CC_BASENAME([$compiler])
8217
8218 # Go did not exist at the time GCC didn't implicitly link libc in.
8219 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8220
8221 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8222 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8223 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8224
8225 ## CAVEAT EMPTOR:
8226 ## There is no encapsulation within the following macros, do not change
8227 ## the running order or otherwise move them around unless you know exactly
8228 ## what you are doing...
8229 if test -n "$compiler"; then
8230 _LT_COMPILER_NO_RTTI($1)
8231 _LT_COMPILER_PIC($1)
8232 _LT_COMPILER_C_O($1)
8233 _LT_COMPILER_FILE_LOCKS($1)
8234 _LT_LINKER_SHLIBS($1)
8235 _LT_LINKER_HARDCODE_LIBPATH($1)
8236
8237 _LT_CONFIG($1)
8238 fi
8239
8240 AC_LANG_RESTORE
8241
8242 GCC=$lt_save_GCC
8243 CC=$lt_save_CC
8244 CFLAGS=$lt_save_CFLAGS
8245 ])# _LT_LANG_GO_CONFIG
8246
8247
8248 # _LT_LANG_RC_CONFIG([TAG])
8249 # -------------------------
8250 # Ensure that the configuration variables for the Windows resource compiler
8251 # are suitably defined. These variables are subsequently used by _LT_CONFIG
8252 # to write the compiler configuration to 'libtool'.
8253 m4_defun([_LT_LANG_RC_CONFIG],
8254 [AC_REQUIRE([LT_PROG_RC])dnl
8255 AC_LANG_SAVE
8256
8257 # Source file extension for RC test sources.
8258 ac_ext=rc
8259
8260 # Object file extension for compiled RC test sources.
8261 objext=o
8262 _LT_TAGVAR(objext, $1)=$objext
8263
8264 # Code to be used in simple compile tests
8265 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
8266
8267 # Code to be used in simple link tests
8268 lt_simple_link_test_code=$lt_simple_compile_test_code
8269
8270 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8271 _LT_TAG_COMPILER
8272
8273 # save warnings/boilerplate of simple test code
8274 _LT_COMPILER_BOILERPLATE
8275 _LT_LINKER_BOILERPLATE
8276
8277 # Allow CC to be a program name with arguments.
8278 lt_save_CC=$CC
8279 lt_save_CFLAGS=$CFLAGS
8280 lt_save_GCC=$GCC
8281 GCC=
8282 CC=${RC-"windres"}
8283 CFLAGS=
8284 compiler=$CC
8285 _LT_TAGVAR(compiler, $1)=$CC
8286 _LT_CC_BASENAME([$compiler])
8287 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
8288
8289 if test -n "$compiler"; then
8290 :
8291 _LT_CONFIG($1)
8292 fi
8293
8294 GCC=$lt_save_GCC
8295 AC_LANG_RESTORE
8296 CC=$lt_save_CC
8297 CFLAGS=$lt_save_CFLAGS
8298 ])# _LT_LANG_RC_CONFIG
8299
8300
8301 # LT_PROG_GCJ
8302 # -----------
8303 AC_DEFUN([LT_PROG_GCJ],
8304 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
8305 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
8306 [AC_CHECK_TOOL(GCJ, gcj,)
8307 test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
8308 AC_SUBST(GCJFLAGS)])])[]dnl
8309 ])
8310
8311 # Old name:
8312 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
8313 dnl aclocal-1.4 backwards compatibility:
8314 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
8315
8316
8317 # LT_PROG_GO
8318 # ----------
8319 AC_DEFUN([LT_PROG_GO],
8320 [AC_CHECK_TOOL(GOC, gccgo,)
8321 ])
8322
8323
8324 # LT_PROG_RC
8325 # ----------
8326 AC_DEFUN([LT_PROG_RC],
8327 [AC_CHECK_TOOL(RC, windres,)
8328 ])
8329
8330 # Old name:
8331 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
8332 dnl aclocal-1.4 backwards compatibility:
8333 dnl AC_DEFUN([LT_AC_PROG_RC], [])
8334
8335
8336 # _LT_DECL_EGREP
8337 # --------------
8338 # If we don't have a new enough Autoconf to choose the best grep
8339 # available, choose the one first in the user's PATH.
8340 m4_defun([_LT_DECL_EGREP],
8341 [AC_REQUIRE([AC_PROG_EGREP])dnl
8342 AC_REQUIRE([AC_PROG_FGREP])dnl
8343 test -z "$GREP" && GREP=grep
8344 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
8345 _LT_DECL([], [EGREP], [1], [An ERE matcher])
8346 _LT_DECL([], [FGREP], [1], [A literal string matcher])
8347 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
8348 AC_SUBST([GREP])
8349 ])
8350
8351
8352 # _LT_DECL_OBJDUMP
8353 # --------------
8354 # If we don't have a new enough Autoconf to choose the best objdump
8355 # available, choose the one first in the user's PATH.
8356 m4_defun([_LT_DECL_OBJDUMP],
8357 [AC_CHECK_TOOL(OBJDUMP, objdump, false)
8358 test -z "$OBJDUMP" && OBJDUMP=objdump
8359 _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
8360 AC_SUBST([OBJDUMP])
8361 ])
8362
8363 # _LT_DECL_DLLTOOL
8364 # ----------------
8365 # Ensure DLLTOOL variable is set.
8366 m4_defun([_LT_DECL_DLLTOOL],
8367 [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8368 test -z "$DLLTOOL" && DLLTOOL=dlltool
8369 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
8370 AC_SUBST([DLLTOOL])
8371 ])
8372
8373 # _LT_DECL_FILECMD
8374 # ----------------
8375 # Check for a file(cmd) program that can be used to detect file type and magic
8376 m4_defun([_LT_DECL_FILECMD],
8377 [AC_CHECK_PROG([FILECMD], [file], [file], [:])
8378 _LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types])
8379 ])# _LD_DECL_FILECMD
8380
8381 # _LT_DECL_SED
8382 # ------------
8383 # Check for a fully-functional sed program, that truncates
8384 # as few characters as possible. Prefer GNU sed if found.
8385 m4_defun([_LT_DECL_SED],
8386 [AC_PROG_SED
8387 test -z "$SED" && SED=sed
8388 Xsed="$SED -e 1s/^X//"
8389 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
8390 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
8391 [Sed that helps us avoid accidentally triggering echo(1) options like -n])
8392 ])# _LT_DECL_SED
8393 dnl aclocal-1.4 backwards compatibility:
8394 dnl AC_DEFUN([LT_AC_PROG_SED], [])
8395
8396
8397 # _LT_CHECK_SHELL_FEATURES
8398 # ------------------------
8399 # Find out whether the shell is Bourne or XSI compatible,
8400 # or has some other useful features.
8401 m4_defun([_LT_CHECK_SHELL_FEATURES],
8402 [if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
8403 lt_unset=unset
8404 else
8405 lt_unset=false
8406 fi
8407 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
8408
8409 # test EBCDIC or ASCII
8410 case `echo X|tr X '\101'` in
8411 A) # ASCII based system
8412 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
8413 lt_SP2NL='tr \040 \012'
8414 lt_NL2SP='tr \015\012 \040\040'
8415 ;;
8416 *) # EBCDIC based system
8417 lt_SP2NL='tr \100 \n'
8418 lt_NL2SP='tr \r\n \100\100'
8419 ;;
8420 esac
8421 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
8422 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
8423 ])# _LT_CHECK_SHELL_FEATURES
8424
8425
8426 # _LT_PATH_CONVERSION_FUNCTIONS
8427 # -----------------------------
8428 # Determine what file name conversion functions should be used by
8429 # func_to_host_file (and, implicitly, by func_to_host_path). These are needed
8430 # for certain cross-compile configurations and native mingw.
8431 m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
8432 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
8433 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
8434 AC_MSG_CHECKING([how to convert $build file names to $host format])
8435 AC_CACHE_VAL(lt_cv_to_host_file_cmd,
8436 [case $host in
8437 *-*-mingw* )
8438 case $build in
8439 *-*-mingw* | *-*-windows* ) # actually msys
8440 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
8441 ;;
8442 *-*-cygwin* )
8443 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
8444 ;;
8445 * ) # otherwise, assume *nix
8446 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
8447 ;;
8448 esac
8449 ;;
8450 *-*-cygwin* )
8451 case $build in
8452 *-*-mingw* | *-*-windows* ) # actually msys
8453 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
8454 ;;
8455 *-*-cygwin* )
8456 lt_cv_to_host_file_cmd=func_convert_file_noop
8457 ;;
8458 * ) # otherwise, assume *nix
8459 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
8460 ;;
8461 esac
8462 ;;
8463 * ) # unhandled hosts (and "normal" native builds)
8464 lt_cv_to_host_file_cmd=func_convert_file_noop
8465 ;;
8466 esac
8467 ])
8468 to_host_file_cmd=$lt_cv_to_host_file_cmd
8469 AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
8470 _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
8471 [0], [convert $build file names to $host format])dnl
8472
8473 AC_MSG_CHECKING([how to convert $build file names to toolchain format])
8474 AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
8475 [#assume ordinary cross tools, or native build.
8476 lt_cv_to_tool_file_cmd=func_convert_file_noop
8477 case $host in
8478 *-*-mingw* | *-*-windows* )
8479 case $build in
8480 *-*-mingw* | *-*-windows* ) # actually msys
8481 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
8482 ;;
8483 esac
8484 ;;
8485 esac
8486 ])
8487 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
8488 AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
8489 _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
8490 [0], [convert $build files to toolchain format])dnl
8491 ])# _LT_PATH_CONVERSION_FUNCTIONS