OSDN Git Service

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