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