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