Debian Codegraph @

lib/libltdl/m4/libtool.m4

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