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