Debian Codegraph @

m4/libtool.m4

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