ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/branches/8.2.x/m4/libtool.m4
Revision: 4960
Committed: Sun Nov 30 17:50:57 2014 UTC (9 years, 4 months ago) by michael
File size: 303626 byte(s)
Log Message:
- libtool 2.4.4

File Contents

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