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