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