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