OSDN Git Service

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