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