test release infrastructure
[profile/ivi/pango.git] / aclocal.m4
1 # generated automatically by aclocal 1.11.3 -*- Autoconf -*-
2
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 # 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
5 # Inc.
6 # This file is free software; the Free Software Foundation
7 # gives unlimited permission to copy and/or distribute it,
8 # with or without modifications, as long as this notice is preserved.
9
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
12 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
13 # PARTICULAR PURPOSE.
14
15 m4_ifndef([AC_AUTOCONF_VERSION],
16   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
17 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
18 [m4_warning([this file was generated for autoconf 2.68.
19 You have another version of autoconf.  It may work, but is not guaranteed to.
20 If you have problems, you may need to regenerate the build system entirely.
21 To do so, use the procedure documented by the package, typically `autoreconf'.])])
22
23 # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
24 # Foundation, Inc.
25 #
26 # This file is free software; the Free Software Foundation
27 # gives unlimited permission to copy and/or distribute it,
28 # with or without modifications, as long as this notice is preserved.
29
30 # serial 1
31
32 # AM_AUTOMAKE_VERSION(VERSION)
33 # ----------------------------
34 # Automake X.Y traces this macro to ensure aclocal.m4 has been
35 # generated from the m4 files accompanying Automake X.Y.
36 # (This private macro should not be called outside this file.)
37 AC_DEFUN([AM_AUTOMAKE_VERSION],
38 [am__api_version='1.11'
39 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
40 dnl require some minimum version.  Point them to the right macro.
41 m4_if([$1], [1.11.3], [],
42       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
43 ])
44
45 # _AM_AUTOCONF_VERSION(VERSION)
46 # -----------------------------
47 # aclocal traces this macro to find the Autoconf version.
48 # This is a private macro too.  Using m4_define simplifies
49 # the logic in aclocal, which can simply ignore this definition.
50 m4_define([_AM_AUTOCONF_VERSION], [])
51
52 # AM_SET_CURRENT_AUTOMAKE_VERSION
53 # -------------------------------
54 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
55 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
56 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
57 [AM_AUTOMAKE_VERSION([1.11.3])dnl
58 m4_ifndef([AC_AUTOCONF_VERSION],
59   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
60 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
61
62 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
63
64 # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
65 #
66 # This file is free software; the Free Software Foundation
67 # gives unlimited permission to copy and/or distribute it,
68 # with or without modifications, as long as this notice is preserved.
69
70 # serial 1
71
72 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
73 # $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
74 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
75 #
76 # Of course, Automake must honor this variable whenever it calls a
77 # tool from the auxiliary directory.  The problem is that $srcdir (and
78 # therefore $ac_aux_dir as well) can be either absolute or relative,
79 # depending on how configure is run.  This is pretty annoying, since
80 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
81 # source directory, any form will work fine, but in subdirectories a
82 # relative path needs to be adjusted first.
83 #
84 # $ac_aux_dir/missing
85 #    fails when called from a subdirectory if $ac_aux_dir is relative
86 # $top_srcdir/$ac_aux_dir/missing
87 #    fails if $ac_aux_dir is absolute,
88 #    fails when called from a subdirectory in a VPATH build with
89 #          a relative $ac_aux_dir
90 #
91 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
92 # are both prefixed by $srcdir.  In an in-source build this is usually
93 # harmless because $srcdir is `.', but things will broke when you
94 # start a VPATH build or use an absolute $srcdir.
95 #
96 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
97 # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
98 #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
99 # and then we would define $MISSING as
100 #   MISSING="\${SHELL} $am_aux_dir/missing"
101 # This will work as long as MISSING is not called from configure, because
102 # unfortunately $(top_srcdir) has no meaning in configure.
103 # However there are other variables, like CC, which are often used in
104 # configure, and could therefore not use this "fixed" $ac_aux_dir.
105 #
106 # Another solution, used here, is to always expand $ac_aux_dir to an
107 # absolute PATH.  The drawback is that using absolute paths prevent a
108 # configured tree to be moved without reconfiguration.
109
110 AC_DEFUN([AM_AUX_DIR_EXPAND],
111 [dnl Rely on autoconf to set up CDPATH properly.
112 AC_PREREQ([2.50])dnl
113 # expand $ac_aux_dir to an absolute path
114 am_aux_dir=`cd $ac_aux_dir && pwd`
115 ])
116
117 # AM_CONDITIONAL                                            -*- Autoconf -*-
118
119 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
120 # Free Software Foundation, Inc.
121 #
122 # This file is free software; the Free Software Foundation
123 # gives unlimited permission to copy and/or distribute it,
124 # with or without modifications, as long as this notice is preserved.
125
126 # serial 9
127
128 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
129 # -------------------------------------
130 # Define a conditional.
131 AC_DEFUN([AM_CONDITIONAL],
132 [AC_PREREQ(2.52)dnl
133  ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
134         [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
135 AC_SUBST([$1_TRUE])dnl
136 AC_SUBST([$1_FALSE])dnl
137 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
138 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
139 m4_define([_AM_COND_VALUE_$1], [$2])dnl
140 if $2; then
141   $1_TRUE=
142   $1_FALSE='#'
143 else
144   $1_TRUE='#'
145   $1_FALSE=
146 fi
147 AC_CONFIG_COMMANDS_PRE(
148 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
149   AC_MSG_ERROR([[conditional "$1" was never defined.
150 Usually this means the macro was only invoked conditionally.]])
151 fi])])
152
153 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
154 # 2010, 2011 Free Software Foundation, Inc.
155 #
156 # This file is free software; the Free Software Foundation
157 # gives unlimited permission to copy and/or distribute it,
158 # with or without modifications, as long as this notice is preserved.
159
160 # serial 12
161
162 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
163 # written in clear, in which case automake, when reading aclocal.m4,
164 # will think it sees a *use*, and therefore will trigger all it's
165 # C support machinery.  Also note that it means that autoscan, seeing
166 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
167
168
169 # _AM_DEPENDENCIES(NAME)
170 # ----------------------
171 # See how the compiler implements dependency checking.
172 # NAME is "CC", "CXX", "GCJ", or "OBJC".
173 # We try a few techniques and use that to set a single cache variable.
174 #
175 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
176 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
177 # dependency, and given that the user is not expected to run this macro,
178 # just rely on AC_PROG_CC.
179 AC_DEFUN([_AM_DEPENDENCIES],
180 [AC_REQUIRE([AM_SET_DEPDIR])dnl
181 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
182 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
183 AC_REQUIRE([AM_DEP_TRACK])dnl
184
185 ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
186        [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
187        [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
188        [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
189        [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
190                    [depcc="$$1"   am_compiler_list=])
191
192 AC_CACHE_CHECK([dependency style of $depcc],
193                [am_cv_$1_dependencies_compiler_type],
194 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
195   # We make a subdir and do the tests there.  Otherwise we can end up
196   # making bogus files that we don't know about and never remove.  For
197   # instance it was reported that on HP-UX the gcc test will end up
198   # making a dummy file named `D' -- because `-MD' means `put the output
199   # in D'.
200   rm -rf conftest.dir
201   mkdir conftest.dir
202   # Copy depcomp to subdir because otherwise we won't find it if we're
203   # using a relative directory.
204   cp "$am_depcomp" conftest.dir
205   cd conftest.dir
206   # We will build objects and dependencies in a subdirectory because
207   # it helps to detect inapplicable dependency modes.  For instance
208   # both Tru64's cc and ICC support -MD to output dependencies as a
209   # side effect of compilation, but ICC will put the dependencies in
210   # the current directory while Tru64 will put them in the object
211   # directory.
212   mkdir sub
213
214   am_cv_$1_dependencies_compiler_type=none
215   if test "$am_compiler_list" = ""; then
216      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
217   fi
218   am__universal=false
219   m4_case([$1], [CC],
220     [case " $depcc " in #(
221      *\ -arch\ *\ -arch\ *) am__universal=true ;;
222      esac],
223     [CXX],
224     [case " $depcc " in #(
225      *\ -arch\ *\ -arch\ *) am__universal=true ;;
226      esac])
227
228   for depmode in $am_compiler_list; do
229     # Setup a source with many dependencies, because some compilers
230     # like to wrap large dependency lists on column 80 (with \), and
231     # we should not choose a depcomp mode which is confused by this.
232     #
233     # We need to recreate these files for each test, as the compiler may
234     # overwrite some of them when testing with obscure command lines.
235     # This happens at least with the AIX C compiler.
236     : > sub/conftest.c
237     for i in 1 2 3 4 5 6; do
238       echo '#include "conftst'$i'.h"' >> sub/conftest.c
239       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
240       # Solaris 8's {/usr,}/bin/sh.
241       touch sub/conftst$i.h
242     done
243     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
244
245     # We check with `-c' and `-o' for the sake of the "dashmstdout"
246     # mode.  It turns out that the SunPro C++ compiler does not properly
247     # handle `-M -o', and we need to detect this.  Also, some Intel
248     # versions had trouble with output in subdirs
249     am__obj=sub/conftest.${OBJEXT-o}
250     am__minus_obj="-o $am__obj"
251     case $depmode in
252     gcc)
253       # This depmode causes a compiler race in universal mode.
254       test "$am__universal" = false || continue
255       ;;
256     nosideeffect)
257       # after this tag, mechanisms are not by side-effect, so they'll
258       # only be used when explicitly requested
259       if test "x$enable_dependency_tracking" = xyes; then
260         continue
261       else
262         break
263       fi
264       ;;
265     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
266       # This compiler won't grok `-c -o', but also, the minuso test has
267       # not run yet.  These depmodes are late enough in the game, and
268       # so weak that their functioning should not be impacted.
269       am__obj=conftest.${OBJEXT-o}
270       am__minus_obj=
271       ;;
272     none) break ;;
273     esac
274     if depmode=$depmode \
275        source=sub/conftest.c object=$am__obj \
276        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
277        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
278          >/dev/null 2>conftest.err &&
279        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
280        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
281        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
282        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
283       # icc doesn't choke on unknown options, it will just issue warnings
284       # or remarks (even with -Werror).  So we grep stderr for any message
285       # that says an option was ignored or not supported.
286       # When given -MP, icc 7.0 and 7.1 complain thusly:
287       #   icc: Command line warning: ignoring option '-M'; no argument required
288       # The diagnosis changed in icc 8.0:
289       #   icc: Command line remark: option '-MP' not supported
290       if (grep 'ignoring option' conftest.err ||
291           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
292         am_cv_$1_dependencies_compiler_type=$depmode
293         break
294       fi
295     fi
296   done
297
298   cd ..
299   rm -rf conftest.dir
300 else
301   am_cv_$1_dependencies_compiler_type=none
302 fi
303 ])
304 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
305 AM_CONDITIONAL([am__fastdep$1], [
306   test "x$enable_dependency_tracking" != xno \
307   && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
308 ])
309
310
311 # AM_SET_DEPDIR
312 # -------------
313 # Choose a directory name for dependency files.
314 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
315 AC_DEFUN([AM_SET_DEPDIR],
316 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
317 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
318 ])
319
320
321 # AM_DEP_TRACK
322 # ------------
323 AC_DEFUN([AM_DEP_TRACK],
324 [AC_ARG_ENABLE(dependency-tracking,
325 [  --disable-dependency-tracking  speeds up one-time build
326   --enable-dependency-tracking   do not reject slow dependency extractors])
327 if test "x$enable_dependency_tracking" != xno; then
328   am_depcomp="$ac_aux_dir/depcomp"
329   AMDEPBACKSLASH='\'
330   am__nodep='_no'
331 fi
332 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
333 AC_SUBST([AMDEPBACKSLASH])dnl
334 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
335 AC_SUBST([am__nodep])dnl
336 _AM_SUBST_NOTMAKE([am__nodep])dnl
337 ])
338
339 # Generate code to set up dependency tracking.              -*- Autoconf -*-
340
341 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
342 # Free Software Foundation, Inc.
343 #
344 # This file is free software; the Free Software Foundation
345 # gives unlimited permission to copy and/or distribute it,
346 # with or without modifications, as long as this notice is preserved.
347
348 #serial 5
349
350 # _AM_OUTPUT_DEPENDENCY_COMMANDS
351 # ------------------------------
352 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
353 [{
354   # Autoconf 2.62 quotes --file arguments for eval, but not when files
355   # are listed without --file.  Let's play safe and only enable the eval
356   # if we detect the quoting.
357   case $CONFIG_FILES in
358   *\'*) eval set x "$CONFIG_FILES" ;;
359   *)   set x $CONFIG_FILES ;;
360   esac
361   shift
362   for mf
363   do
364     # Strip MF so we end up with the name of the file.
365     mf=`echo "$mf" | sed -e 's/:.*$//'`
366     # Check whether this is an Automake generated Makefile or not.
367     # We used to match only the files named `Makefile.in', but
368     # some people rename them; so instead we look at the file content.
369     # Grep'ing the first line is not enough: some people post-process
370     # each Makefile.in and add a new line on top of each file to say so.
371     # Grep'ing the whole file is not good either: AIX grep has a line
372     # limit of 2048, but all sed's we know have understand at least 4000.
373     if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
374       dirpart=`AS_DIRNAME("$mf")`
375     else
376       continue
377     fi
378     # Extract the definition of DEPDIR, am__include, and am__quote
379     # from the Makefile without running `make'.
380     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
381     test -z "$DEPDIR" && continue
382     am__include=`sed -n 's/^am__include = //p' < "$mf"`
383     test -z "am__include" && continue
384     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
385     # When using ansi2knr, U may be empty or an underscore; expand it
386     U=`sed -n 's/^U = //p' < "$mf"`
387     # Find all dependency output files, they are included files with
388     # $(DEPDIR) in their names.  We invoke sed twice because it is the
389     # simplest approach to changing $(DEPDIR) to its actual value in the
390     # expansion.
391     for file in `sed -n "
392       s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
393          sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
394       # Make sure the directory exists.
395       test -f "$dirpart/$file" && continue
396       fdir=`AS_DIRNAME(["$file"])`
397       AS_MKDIR_P([$dirpart/$fdir])
398       # echo "creating $dirpart/$file"
399       echo '# dummy' > "$dirpart/$file"
400     done
401   done
402 }
403 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
404
405
406 # AM_OUTPUT_DEPENDENCY_COMMANDS
407 # -----------------------------
408 # This macro should only be invoked once -- use via AC_REQUIRE.
409 #
410 # This code is only required when automatic dependency tracking
411 # is enabled.  FIXME.  This creates each `.P' file that we will
412 # need in order to bootstrap the dependency handling code.
413 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
414 [AC_CONFIG_COMMANDS([depfiles],
415      [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
416      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
417 ])
418
419 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
420 # Free Software Foundation, Inc.
421 #
422 # This file is free software; the Free Software Foundation
423 # gives unlimited permission to copy and/or distribute it,
424 # with or without modifications, as long as this notice is preserved.
425
426 # serial 8
427
428 # AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
429 AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
430
431 # Do all the work for Automake.                             -*- Autoconf -*-
432
433 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
434 # 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
435 #
436 # This file is free software; the Free Software Foundation
437 # gives unlimited permission to copy and/or distribute it,
438 # with or without modifications, as long as this notice is preserved.
439
440 # serial 16
441
442 # This macro actually does too much.  Some checks are only needed if
443 # your package does certain things.  But this isn't really a big deal.
444
445 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
446 # AM_INIT_AUTOMAKE([OPTIONS])
447 # -----------------------------------------------
448 # The call with PACKAGE and VERSION arguments is the old style
449 # call (pre autoconf-2.50), which is being phased out.  PACKAGE
450 # and VERSION should now be passed to AC_INIT and removed from
451 # the call to AM_INIT_AUTOMAKE.
452 # We support both call styles for the transition.  After
453 # the next Automake release, Autoconf can make the AC_INIT
454 # arguments mandatory, and then we can depend on a new Autoconf
455 # release and drop the old call support.
456 AC_DEFUN([AM_INIT_AUTOMAKE],
457 [AC_PREREQ([2.62])dnl
458 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
459 dnl the ones we care about.
460 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
461 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
462 AC_REQUIRE([AC_PROG_INSTALL])dnl
463 if test "`cd $srcdir && pwd`" != "`pwd`"; then
464   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
465   # is not polluted with repeated "-I."
466   AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
467   # test to see if srcdir already configured
468   if test -f $srcdir/config.status; then
469     AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
470   fi
471 fi
472
473 # test whether we have cygpath
474 if test -z "$CYGPATH_W"; then
475   if (cygpath --version) >/dev/null 2>/dev/null; then
476     CYGPATH_W='cygpath -w'
477   else
478     CYGPATH_W=echo
479   fi
480 fi
481 AC_SUBST([CYGPATH_W])
482
483 # Define the identity of the package.
484 dnl Distinguish between old-style and new-style calls.
485 m4_ifval([$2],
486 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
487  AC_SUBST([PACKAGE], [$1])dnl
488  AC_SUBST([VERSION], [$2])],
489 [_AM_SET_OPTIONS([$1])dnl
490 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
491 m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
492   [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
493  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
494  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
495
496 _AM_IF_OPTION([no-define],,
497 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
498  AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
499
500 # Some tools Automake needs.
501 AC_REQUIRE([AM_SANITY_CHECK])dnl
502 AC_REQUIRE([AC_ARG_PROGRAM])dnl
503 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
504 AM_MISSING_PROG(AUTOCONF, autoconf)
505 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
506 AM_MISSING_PROG(AUTOHEADER, autoheader)
507 AM_MISSING_PROG(MAKEINFO, makeinfo)
508 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
509 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
510 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
511 # We need awk for the "check" target.  The system "awk" is bad on
512 # some platforms.
513 AC_REQUIRE([AC_PROG_AWK])dnl
514 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
515 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
516 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
517               [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
518                              [_AM_PROG_TAR([v7])])])
519 _AM_IF_OPTION([no-dependencies],,
520 [AC_PROVIDE_IFELSE([AC_PROG_CC],
521                   [_AM_DEPENDENCIES(CC)],
522                   [define([AC_PROG_CC],
523                           defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
524 AC_PROVIDE_IFELSE([AC_PROG_CXX],
525                   [_AM_DEPENDENCIES(CXX)],
526                   [define([AC_PROG_CXX],
527                           defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
528 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
529                   [_AM_DEPENDENCIES(OBJC)],
530                   [define([AC_PROG_OBJC],
531                           defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
532 ])
533 _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
534 dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
535 dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
536 dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
537 AC_CONFIG_COMMANDS_PRE(dnl
538 [m4_provide_if([_AM_COMPILER_EXEEXT],
539   [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
540 ])
541
542 dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
543 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
544 dnl mangled by Autoconf and run in a shell conditional statement.
545 m4_define([_AC_COMPILER_EXEEXT],
546 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
547
548
549 # When config.status generates a header, we must update the stamp-h file.
550 # This file resides in the same directory as the config header
551 # that is generated.  The stamp files are numbered to have different names.
552
553 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
554 # loop where config.status creates the headers, so we can generate
555 # our stamp files there.
556 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
557 [# Compute $1's index in $config_headers.
558 _am_arg=$1
559 _am_stamp_count=1
560 for _am_header in $config_headers :; do
561   case $_am_header in
562     $_am_arg | $_am_arg:* )
563       break ;;
564     * )
565       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
566   esac
567 done
568 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
569
570 # Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
571 # Inc.
572 #
573 # This file is free software; the Free Software Foundation
574 # gives unlimited permission to copy and/or distribute it,
575 # with or without modifications, as long as this notice is preserved.
576
577 # serial 1
578
579 # AM_PROG_INSTALL_SH
580 # ------------------
581 # Define $install_sh.
582 AC_DEFUN([AM_PROG_INSTALL_SH],
583 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
584 if test x"${install_sh}" != xset; then
585   case $am_aux_dir in
586   *\ * | *\     *)
587     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
588   *)
589     install_sh="\${SHELL} $am_aux_dir/install-sh"
590   esac
591 fi
592 AC_SUBST(install_sh)])
593
594 # Copyright (C) 2003, 2005  Free Software Foundation, Inc.
595 #
596 # This file is free software; the Free Software Foundation
597 # gives unlimited permission to copy and/or distribute it,
598 # with or without modifications, as long as this notice is preserved.
599
600 # serial 2
601
602 # Check whether the underlying file-system supports filenames
603 # with a leading dot.  For instance MS-DOS doesn't.
604 AC_DEFUN([AM_SET_LEADING_DOT],
605 [rm -rf .tst 2>/dev/null
606 mkdir .tst 2>/dev/null
607 if test -d .tst; then
608   am__leading_dot=.
609 else
610   am__leading_dot=_
611 fi
612 rmdir .tst 2>/dev/null
613 AC_SUBST([am__leading_dot])])
614
615 # Check to see how 'make' treats includes.                  -*- Autoconf -*-
616
617 # Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
618 #
619 # This file is free software; the Free Software Foundation
620 # gives unlimited permission to copy and/or distribute it,
621 # with or without modifications, as long as this notice is preserved.
622
623 # serial 4
624
625 # AM_MAKE_INCLUDE()
626 # -----------------
627 # Check to see how make treats includes.
628 AC_DEFUN([AM_MAKE_INCLUDE],
629 [am_make=${MAKE-make}
630 cat > confinc << 'END'
631 am__doit:
632         @echo this is the am__doit target
633 .PHONY: am__doit
634 END
635 # If we don't find an include directive, just comment out the code.
636 AC_MSG_CHECKING([for style of include used by $am_make])
637 am__include="#"
638 am__quote=
639 _am_result=none
640 # First try GNU make style include.
641 echo "include confinc" > confmf
642 # Ignore all kinds of additional output from `make'.
643 case `$am_make -s -f confmf 2> /dev/null` in #(
644 *the\ am__doit\ target*)
645   am__include=include
646   am__quote=
647   _am_result=GNU
648   ;;
649 esac
650 # Now try BSD make style include.
651 if test "$am__include" = "#"; then
652    echo '.include "confinc"' > confmf
653    case `$am_make -s -f confmf 2> /dev/null` in #(
654    *the\ am__doit\ target*)
655      am__include=.include
656      am__quote="\""
657      _am_result=BSD
658      ;;
659    esac
660 fi
661 AC_SUBST([am__include])
662 AC_SUBST([am__quote])
663 AC_MSG_RESULT([$_am_result])
664 rm -f confinc confmf
665 ])
666
667 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
668
669 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
670 # Free Software Foundation, Inc.
671 #
672 # This file is free software; the Free Software Foundation
673 # gives unlimited permission to copy and/or distribute it,
674 # with or without modifications, as long as this notice is preserved.
675
676 # serial 6
677
678 # AM_MISSING_PROG(NAME, PROGRAM)
679 # ------------------------------
680 AC_DEFUN([AM_MISSING_PROG],
681 [AC_REQUIRE([AM_MISSING_HAS_RUN])
682 $1=${$1-"${am_missing_run}$2"}
683 AC_SUBST($1)])
684
685
686 # AM_MISSING_HAS_RUN
687 # ------------------
688 # Define MISSING if not defined so far and test if it supports --run.
689 # If it does, set am_missing_run to use it, otherwise, to nothing.
690 AC_DEFUN([AM_MISSING_HAS_RUN],
691 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
692 AC_REQUIRE_AUX_FILE([missing])dnl
693 if test x"${MISSING+set}" != xset; then
694   case $am_aux_dir in
695   *\ * | *\     *)
696     MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
697   *)
698     MISSING="\${SHELL} $am_aux_dir/missing" ;;
699   esac
700 fi
701 # Use eval to expand $SHELL
702 if eval "$MISSING --run true"; then
703   am_missing_run="$MISSING --run "
704 else
705   am_missing_run=
706   AC_MSG_WARN([`missing' script is too old or missing])
707 fi
708 ])
709
710 # Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
711 # Inc.
712 #
713 # This file is free software; the Free Software Foundation
714 # gives unlimited permission to copy and/or distribute it,
715 # with or without modifications, as long as this notice is preserved.
716
717 # serial 1
718
719 # AM_PROG_MKDIR_P
720 # ---------------
721 # Check for `mkdir -p'.
722 AC_DEFUN([AM_PROG_MKDIR_P],
723 [AC_PREREQ([2.60])dnl
724 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
725 dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
726 dnl while keeping a definition of mkdir_p for backward compatibility.
727 dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
728 dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
729 dnl Makefile.ins that do not define MKDIR_P, so we do our own
730 dnl adjustment using top_builddir (which is defined more often than
731 dnl MKDIR_P).
732 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
733 case $mkdir_p in
734   [[\\/$]]* | ?:[[\\/]]*) ;;
735   */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
736 esac
737 ])
738
739 # Helper functions for option handling.                     -*- Autoconf -*-
740
741 # Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
742 # Foundation, Inc.
743 #
744 # This file is free software; the Free Software Foundation
745 # gives unlimited permission to copy and/or distribute it,
746 # with or without modifications, as long as this notice is preserved.
747
748 # serial 5
749
750 # _AM_MANGLE_OPTION(NAME)
751 # -----------------------
752 AC_DEFUN([_AM_MANGLE_OPTION],
753 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
754
755 # _AM_SET_OPTION(NAME)
756 # --------------------
757 # Set option NAME.  Presently that only means defining a flag for this option.
758 AC_DEFUN([_AM_SET_OPTION],
759 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
760
761 # _AM_SET_OPTIONS(OPTIONS)
762 # ------------------------
763 # OPTIONS is a space-separated list of Automake options.
764 AC_DEFUN([_AM_SET_OPTIONS],
765 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
766
767 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
768 # -------------------------------------------
769 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
770 AC_DEFUN([_AM_IF_OPTION],
771 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
772
773 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
774
775 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
776 # Free Software Foundation, Inc.
777 #
778 # This file is free software; the Free Software Foundation
779 # gives unlimited permission to copy and/or distribute it,
780 # with or without modifications, as long as this notice is preserved.
781
782 # serial 5
783
784 # AM_SANITY_CHECK
785 # ---------------
786 AC_DEFUN([AM_SANITY_CHECK],
787 [AC_MSG_CHECKING([whether build environment is sane])
788 # Just in case
789 sleep 1
790 echo timestamp > conftest.file
791 # Reject unsafe characters in $srcdir or the absolute working directory
792 # name.  Accept space and tab only in the latter.
793 am_lf='
794 '
795 case `pwd` in
796   *[[\\\"\#\$\&\'\`$am_lf]]*)
797     AC_MSG_ERROR([unsafe absolute working directory name]);;
798 esac
799 case $srcdir in
800   *[[\\\"\#\$\&\'\`$am_lf\ \    ]]*)
801     AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
802 esac
803
804 # Do `set' in a subshell so we don't clobber the current shell's
805 # arguments.  Must try -L first in case configure is actually a
806 # symlink; some systems play weird games with the mod time of symlinks
807 # (eg FreeBSD returns the mod time of the symlink's containing
808 # directory).
809 if (
810    set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
811    if test "$[*]" = "X"; then
812       # -L didn't work.
813       set X `ls -t "$srcdir/configure" conftest.file`
814    fi
815    rm -f conftest.file
816    if test "$[*]" != "X $srcdir/configure conftest.file" \
817       && test "$[*]" != "X conftest.file $srcdir/configure"; then
818
819       # If neither matched, then we have a broken ls.  This can happen
820       # if, for instance, CONFIG_SHELL is bash and it inherits a
821       # broken ls alias from the environment.  This has actually
822       # happened.  Such a system could not be considered "sane".
823       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
824 alias in your environment])
825    fi
826
827    test "$[2]" = conftest.file
828    )
829 then
830    # Ok.
831    :
832 else
833    AC_MSG_ERROR([newly created file is older than distributed files!
834 Check your system clock])
835 fi
836 AC_MSG_RESULT(yes)])
837
838 # Copyright (C) 2009, 2011  Free Software Foundation, Inc.
839 #
840 # This file is free software; the Free Software Foundation
841 # gives unlimited permission to copy and/or distribute it,
842 # with or without modifications, as long as this notice is preserved.
843
844 # serial 2
845
846 # AM_SILENT_RULES([DEFAULT])
847 # --------------------------
848 # Enable less verbose build rules; with the default set to DEFAULT
849 # (`yes' being less verbose, `no' or empty being verbose).
850 AC_DEFUN([AM_SILENT_RULES],
851 [AC_ARG_ENABLE([silent-rules],
852 [  --enable-silent-rules          less verbose build output (undo: `make V=1')
853   --disable-silent-rules         verbose build output (undo: `make V=0')])
854 case $enable_silent_rules in
855 yes) AM_DEFAULT_VERBOSITY=0;;
856 no)  AM_DEFAULT_VERBOSITY=1;;
857 *)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
858 esac
859 dnl
860 dnl A few `make' implementations (e.g., NonStop OS and NextStep)
861 dnl do not support nested variable expansions.
862 dnl See automake bug#9928 and bug#10237.
863 am_make=${MAKE-make}
864 AC_CACHE_CHECK([whether $am_make supports nested variables],
865    [am_cv_make_support_nested_variables],
866    [if AS_ECHO([['TRUE=$(BAR$(V))
867 BAR0=false
868 BAR1=true
869 V=1
870 am__doit:
871         @$(TRUE)
872 .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
873   am_cv_make_support_nested_variables=yes
874 else
875   am_cv_make_support_nested_variables=no
876 fi])
877 if test $am_cv_make_support_nested_variables = yes; then
878   dnl Using `$V' instead of `$(V)' breaks IRIX make.
879   AM_V='$(V)'
880   AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
881 else
882   AM_V=$AM_DEFAULT_VERBOSITY
883   AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
884 fi
885 AC_SUBST([AM_V])dnl
886 AM_SUBST_NOTMAKE([AM_V])dnl
887 AC_SUBST([AM_DEFAULT_V])dnl
888 AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
889 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
890 AM_BACKSLASH='\'
891 AC_SUBST([AM_BACKSLASH])dnl
892 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
893 ])
894
895 # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
896 #
897 # This file is free software; the Free Software Foundation
898 # gives unlimited permission to copy and/or distribute it,
899 # with or without modifications, as long as this notice is preserved.
900
901 # serial 1
902
903 # AM_PROG_INSTALL_STRIP
904 # ---------------------
905 # One issue with vendor `install' (even GNU) is that you can't
906 # specify the program used to strip binaries.  This is especially
907 # annoying in cross-compiling environments, where the build's strip
908 # is unlikely to handle the host's binaries.
909 # Fortunately install-sh will honor a STRIPPROG variable, so we
910 # always use install-sh in `make install-strip', and initialize
911 # STRIPPROG with the value of the STRIP variable (set by the user).
912 AC_DEFUN([AM_PROG_INSTALL_STRIP],
913 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
914 # Installed binaries are usually stripped using `strip' when the user
915 # run `make install-strip'.  However `strip' might not be the right
916 # tool to use in cross-compilation environments, therefore Automake
917 # will honor the `STRIP' environment variable to overrule this program.
918 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
919 if test "$cross_compiling" != no; then
920   AC_CHECK_TOOL([STRIP], [strip], :)
921 fi
922 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
923 AC_SUBST([INSTALL_STRIP_PROGRAM])])
924
925 # Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
926 #
927 # This file is free software; the Free Software Foundation
928 # gives unlimited permission to copy and/or distribute it,
929 # with or without modifications, as long as this notice is preserved.
930
931 # serial 3
932
933 # _AM_SUBST_NOTMAKE(VARIABLE)
934 # ---------------------------
935 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
936 # This macro is traced by Automake.
937 AC_DEFUN([_AM_SUBST_NOTMAKE])
938
939 # AM_SUBST_NOTMAKE(VARIABLE)
940 # --------------------------
941 # Public sister of _AM_SUBST_NOTMAKE.
942 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
943
944 # Check how to create a tarball.                            -*- Autoconf -*-
945
946 # Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
947 #
948 # This file is free software; the Free Software Foundation
949 # gives unlimited permission to copy and/or distribute it,
950 # with or without modifications, as long as this notice is preserved.
951
952 # serial 2
953
954 # _AM_PROG_TAR(FORMAT)
955 # --------------------
956 # Check how to create a tarball in format FORMAT.
957 # FORMAT should be one of `v7', `ustar', or `pax'.
958 #
959 # Substitute a variable $(am__tar) that is a command
960 # writing to stdout a FORMAT-tarball containing the directory
961 # $tardir.
962 #     tardir=directory && $(am__tar) > result.tar
963 #
964 # Substitute a variable $(am__untar) that extract such
965 # a tarball read from stdin.
966 #     $(am__untar) < result.tar
967 AC_DEFUN([_AM_PROG_TAR],
968 [# Always define AMTAR for backward compatibility.  Yes, it's still used
969 # in the wild :-(  We should find a proper way to deprecate it ...
970 AC_SUBST([AMTAR], ['$${TAR-tar}'])
971 m4_if([$1], [v7],
972      [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
973      [m4_case([$1], [ustar],, [pax],,
974               [m4_fatal([Unknown tar format])])
975 AC_MSG_CHECKING([how to create a $1 tar archive])
976 # Loop over all known methods to create a tar archive until one works.
977 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
978 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
979 # Do not fold the above two line into one, because Tru64 sh and
980 # Solaris sh will not grok spaces in the rhs of `-'.
981 for _am_tool in $_am_tools
982 do
983   case $_am_tool in
984   gnutar)
985     for _am_tar in tar gnutar gtar;
986     do
987       AM_RUN_LOG([$_am_tar --version]) && break
988     done
989     am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
990     am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
991     am__untar="$_am_tar -xf -"
992     ;;
993   plaintar)
994     # Must skip GNU tar: if it does not support --format= it doesn't create
995     # ustar tarball either.
996     (tar --version) >/dev/null 2>&1 && continue
997     am__tar='tar chf - "$$tardir"'
998     am__tar_='tar chf - "$tardir"'
999     am__untar='tar xf -'
1000     ;;
1001   pax)
1002     am__tar='pax -L -x $1 -w "$$tardir"'
1003     am__tar_='pax -L -x $1 -w "$tardir"'
1004     am__untar='pax -r'
1005     ;;
1006   cpio)
1007     am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1008     am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1009     am__untar='cpio -i -H $1 -d'
1010     ;;
1011   none)
1012     am__tar=false
1013     am__tar_=false
1014     am__untar=false
1015     ;;
1016   esac
1017
1018   # If the value was cached, stop now.  We just wanted to have am__tar
1019   # and am__untar set.
1020   test -n "${am_cv_prog_tar_$1}" && break
1021
1022   # tar/untar a dummy directory, and stop if the command works
1023   rm -rf conftest.dir
1024   mkdir conftest.dir
1025   echo GrepMe > conftest.dir/file
1026   AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1027   rm -rf conftest.dir
1028   if test -s conftest.tar; then
1029     AM_RUN_LOG([$am__untar <conftest.tar])
1030     grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1031   fi
1032 done
1033 rm -rf conftest.dir
1034
1035 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1036 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1037 AC_SUBST([am__tar])
1038 AC_SUBST([am__untar])
1039 ]) # _AM_PROG_TAR
1040
1041 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1042 #
1043 #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1044 #                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
1045 #                 Foundation, Inc.
1046 #   Written by Gordon Matzigkeit, 1996
1047 #
1048 # This file is free software; the Free Software Foundation gives
1049 # unlimited permission to copy and/or distribute it, with or without
1050 # modifications, as long as this notice is preserved.
1051
1052 m4_define([_LT_COPYING], [dnl
1053 #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1054 #                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
1055 #                 Foundation, Inc.
1056 #   Written by Gordon Matzigkeit, 1996
1057 #
1058 #   This file is part of GNU Libtool.
1059 #
1060 # GNU Libtool is free software; you can redistribute it and/or
1061 # modify it under the terms of the GNU General Public License as
1062 # published by the Free Software Foundation; either version 2 of
1063 # the License, or (at your option) any later version.
1064 #
1065 # As a special exception to the GNU General Public License,
1066 # if you distribute this file as part of a program or library that
1067 # is built using GNU Libtool, you may include this file under the
1068 # same distribution terms that you use for the rest of that program.
1069 #
1070 # GNU Libtool is distributed in the hope that it will be useful,
1071 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1072 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1073 # GNU General Public License for more details.
1074 #
1075 # You should have received a copy of the GNU General Public License
1076 # along with GNU Libtool; see the file COPYING.  If not, a copy
1077 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
1078 # obtained by writing to the Free Software Foundation, Inc.,
1079 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1080 ])
1081
1082 # serial 57 LT_INIT
1083
1084
1085 # LT_PREREQ(VERSION)
1086 # ------------------
1087 # Complain and exit if this libtool version is less that VERSION.
1088 m4_defun([LT_PREREQ],
1089 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
1090        [m4_default([$3],
1091                    [m4_fatal([Libtool version $1 or higher is required],
1092                              63)])],
1093        [$2])])
1094
1095
1096 # _LT_CHECK_BUILDDIR
1097 # ------------------
1098 # Complain if the absolute build directory name contains unusual characters
1099 m4_defun([_LT_CHECK_BUILDDIR],
1100 [case `pwd` in
1101   *\ * | *\     *)
1102     AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
1103 esac
1104 ])
1105
1106
1107 # LT_INIT([OPTIONS])
1108 # ------------------
1109 AC_DEFUN([LT_INIT],
1110 [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
1111 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
1112 AC_BEFORE([$0], [LT_LANG])dnl
1113 AC_BEFORE([$0], [LT_OUTPUT])dnl
1114 AC_BEFORE([$0], [LTDL_INIT])dnl
1115 m4_require([_LT_CHECK_BUILDDIR])dnl
1116
1117 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
1118 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
1119 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
1120 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
1121 dnl unless we require an AC_DEFUNed macro:
1122 AC_REQUIRE([LTOPTIONS_VERSION])dnl
1123 AC_REQUIRE([LTSUGAR_VERSION])dnl
1124 AC_REQUIRE([LTVERSION_VERSION])dnl
1125 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
1126 m4_require([_LT_PROG_LTMAIN])dnl
1127
1128 _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
1129
1130 dnl Parse OPTIONS
1131 _LT_SET_OPTIONS([$0], [$1])
1132
1133 # This can be used to rebuild libtool when needed
1134 LIBTOOL_DEPS="$ltmain"
1135
1136 # Always use our own libtool.
1137 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1138 AC_SUBST(LIBTOOL)dnl
1139
1140 _LT_SETUP
1141
1142 # Only expand once:
1143 m4_define([LT_INIT])
1144 ])# LT_INIT
1145
1146 # Old names:
1147 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
1148 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
1149 dnl aclocal-1.4 backwards compatibility:
1150 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
1151 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
1152
1153
1154 # _LT_CC_BASENAME(CC)
1155 # -------------------
1156 # Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
1157 m4_defun([_LT_CC_BASENAME],
1158 [for cc_temp in $1""; do
1159   case $cc_temp in
1160     compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1161     distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1162     \-*) ;;
1163     *) break;;
1164   esac
1165 done
1166 cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
1167 ])
1168
1169
1170 # _LT_FILEUTILS_DEFAULTS
1171 # ----------------------
1172 # It is okay to use these file commands and assume they have been set
1173 # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
1174 m4_defun([_LT_FILEUTILS_DEFAULTS],
1175 [: ${CP="cp -f"}
1176 : ${MV="mv -f"}
1177 : ${RM="rm -f"}
1178 ])# _LT_FILEUTILS_DEFAULTS
1179
1180
1181 # _LT_SETUP
1182 # ---------
1183 m4_defun([_LT_SETUP],
1184 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1185 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1186 AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
1187 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
1188
1189 _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
1190 dnl
1191 _LT_DECL([], [host_alias], [0], [The host system])dnl
1192 _LT_DECL([], [host], [0])dnl
1193 _LT_DECL([], [host_os], [0])dnl
1194 dnl
1195 _LT_DECL([], [build_alias], [0], [The build system])dnl
1196 _LT_DECL([], [build], [0])dnl
1197 _LT_DECL([], [build_os], [0])dnl
1198 dnl
1199 AC_REQUIRE([AC_PROG_CC])dnl
1200 AC_REQUIRE([LT_PATH_LD])dnl
1201 AC_REQUIRE([LT_PATH_NM])dnl
1202 dnl
1203 AC_REQUIRE([AC_PROG_LN_S])dnl
1204 test -z "$LN_S" && LN_S="ln -s"
1205 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
1206 dnl
1207 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
1208 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
1209 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
1210 dnl
1211 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1212 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
1213 m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
1214 m4_require([_LT_CMD_RELOAD])dnl
1215 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
1216 m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
1217 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
1218 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
1219 m4_require([_LT_WITH_SYSROOT])dnl
1220
1221 _LT_CONFIG_LIBTOOL_INIT([
1222 # See if we are running on zsh, and set the options which allow our
1223 # commands through without removal of \ escapes INIT.
1224 if test -n "\${ZSH_VERSION+set}" ; then
1225    setopt NO_GLOB_SUBST
1226 fi
1227 ])
1228 if test -n "${ZSH_VERSION+set}" ; then
1229    setopt NO_GLOB_SUBST
1230 fi
1231
1232 _LT_CHECK_OBJDIR
1233
1234 m4_require([_LT_TAG_COMPILER])dnl
1235
1236 case $host_os in
1237 aix3*)
1238   # AIX sometimes has problems with the GCC collect2 program.  For some
1239   # reason, if we set the COLLECT_NAMES environment variable, the problems
1240   # vanish in a puff of smoke.
1241   if test "X${COLLECT_NAMES+set}" != Xset; then
1242     COLLECT_NAMES=
1243     export COLLECT_NAMES
1244   fi
1245   ;;
1246 esac
1247
1248 # Global variables:
1249 ofile=libtool
1250 can_build_shared=yes
1251
1252 # All known linkers require a `.a' archive for static linking (except MSVC,
1253 # which needs '.lib').
1254 libext=a
1255
1256 with_gnu_ld="$lt_cv_prog_gnu_ld"
1257
1258 old_CC="$CC"
1259 old_CFLAGS="$CFLAGS"
1260
1261 # Set sane defaults for various variables
1262 test -z "$CC" && CC=cc
1263 test -z "$LTCC" && LTCC=$CC
1264 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
1265 test -z "$LD" && LD=ld
1266 test -z "$ac_objext" && ac_objext=o
1267
1268 _LT_CC_BASENAME([$compiler])
1269
1270 # Only perform the check for file, if the check method requires it
1271 test -z "$MAGIC_CMD" && MAGIC_CMD=file
1272 case $deplibs_check_method in
1273 file_magic*)
1274   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1275     _LT_PATH_MAGIC
1276   fi
1277   ;;
1278 esac
1279
1280 # Use C for the default configuration in the libtool script
1281 LT_SUPPORTED_TAG([CC])
1282 _LT_LANG_C_CONFIG
1283 _LT_LANG_DEFAULT_CONFIG
1284 _LT_CONFIG_COMMANDS
1285 ])# _LT_SETUP
1286
1287
1288 # _LT_PREPARE_SED_QUOTE_VARS
1289 # --------------------------
1290 # Define a few sed substitution that help us do robust quoting.
1291 m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
1292 [# Backslashify metacharacters that are still active within
1293 # double-quoted strings.
1294 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
1295
1296 # Same as above, but do not quote variable references.
1297 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
1298
1299 # Sed substitution to delay expansion of an escaped shell variable in a
1300 # double_quote_subst'ed string.
1301 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1302
1303 # Sed substitution to delay expansion of an escaped single quote.
1304 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
1305
1306 # Sed substitution to avoid accidental globbing in evaled expressions
1307 no_glob_subst='s/\*/\\\*/g'
1308 ])
1309
1310 # _LT_PROG_LTMAIN
1311 # ---------------
1312 # Note that this code is called both from `configure', and `config.status'
1313 # now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
1314 # `config.status' has no value for ac_aux_dir unless we are using Automake,
1315 # so we pass a copy along to make sure it has a sensible value anyway.
1316 m4_defun([_LT_PROG_LTMAIN],
1317 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
1318 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
1319 ltmain="$ac_aux_dir/ltmain.sh"
1320 ])# _LT_PROG_LTMAIN
1321
1322
1323
1324 # So that we can recreate a full libtool script including additional
1325 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
1326 # in macros and then make a single call at the end using the `libtool'
1327 # label.
1328
1329
1330 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
1331 # ----------------------------------------
1332 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1333 m4_define([_LT_CONFIG_LIBTOOL_INIT],
1334 [m4_ifval([$1],
1335           [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
1336                      [$1
1337 ])])])
1338
1339 # Initialize.
1340 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
1341
1342
1343 # _LT_CONFIG_LIBTOOL([COMMANDS])
1344 # ------------------------------
1345 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1346 m4_define([_LT_CONFIG_LIBTOOL],
1347 [m4_ifval([$1],
1348           [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
1349                      [$1
1350 ])])])
1351
1352 # Initialize.
1353 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
1354
1355
1356 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
1357 # -----------------------------------------------------
1358 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
1359 [_LT_CONFIG_LIBTOOL([$1])
1360 _LT_CONFIG_LIBTOOL_INIT([$2])
1361 ])
1362
1363
1364 # _LT_FORMAT_COMMENT([COMMENT])
1365 # -----------------------------
1366 # Add leading comment marks to the start of each line, and a trailing
1367 # full-stop to the whole comment if one is not present already.
1368 m4_define([_LT_FORMAT_COMMENT],
1369 [m4_ifval([$1], [
1370 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
1371               [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
1372 )])
1373
1374
1375
1376
1377
1378 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
1379 # -------------------------------------------------------------------
1380 # CONFIGNAME is the name given to the value in the libtool script.
1381 # VARNAME is the (base) name used in the configure script.
1382 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
1383 # VARNAME.  Any other value will be used directly.
1384 m4_define([_LT_DECL],
1385 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
1386     [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
1387         [m4_ifval([$1], [$1], [$2])])
1388     lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
1389     m4_ifval([$4],
1390         [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
1391     lt_dict_add_subkey([lt_decl_dict], [$2],
1392         [tagged?], [m4_ifval([$5], [yes], [no])])])
1393 ])
1394
1395
1396 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
1397 # --------------------------------------------------------
1398 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
1399
1400
1401 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
1402 # ------------------------------------------------
1403 m4_define([lt_decl_tag_varnames],
1404 [_lt_decl_filter([tagged?], [yes], $@)])
1405
1406
1407 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
1408 # ---------------------------------------------------------
1409 m4_define([_lt_decl_filter],
1410 [m4_case([$#],
1411   [0], [m4_fatal([$0: too few arguments: $#])],
1412   [1], [m4_fatal([$0: too few arguments: $#: $1])],
1413   [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
1414   [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
1415   [lt_dict_filter([lt_decl_dict], $@)])[]dnl
1416 ])
1417
1418
1419 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
1420 # --------------------------------------------------
1421 m4_define([lt_decl_quote_varnames],
1422 [_lt_decl_filter([value], [1], $@)])
1423
1424
1425 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
1426 # ---------------------------------------------------
1427 m4_define([lt_decl_dquote_varnames],
1428 [_lt_decl_filter([value], [2], $@)])
1429
1430
1431 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
1432 # ---------------------------------------------------
1433 m4_define([lt_decl_varnames_tagged],
1434 [m4_assert([$# <= 2])dnl
1435 _$0(m4_quote(m4_default([$1], [[, ]])),
1436     m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
1437     m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
1438 m4_define([_lt_decl_varnames_tagged],
1439 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
1440
1441
1442 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
1443 # ------------------------------------------------
1444 m4_define([lt_decl_all_varnames],
1445 [_$0(m4_quote(m4_default([$1], [[, ]])),
1446      m4_if([$2], [],
1447            m4_quote(lt_decl_varnames),
1448         m4_quote(m4_shift($@))))[]dnl
1449 ])
1450 m4_define([_lt_decl_all_varnames],
1451 [lt_join($@, lt_decl_varnames_tagged([$1],
1452                         lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
1453 ])
1454
1455
1456 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
1457 # ------------------------------------
1458 # Quote a variable value, and forward it to `config.status' so that its
1459 # declaration there will have the same value as in `configure'.  VARNAME
1460 # must have a single quote delimited value for this to work.
1461 m4_define([_LT_CONFIG_STATUS_DECLARE],
1462 [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
1463
1464
1465 # _LT_CONFIG_STATUS_DECLARATIONS
1466 # ------------------------------
1467 # We delimit libtool config variables with single quotes, so when
1468 # we write them to config.status, we have to be sure to quote all
1469 # embedded single quotes properly.  In configure, this macro expands
1470 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
1471 #
1472 #    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
1473 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
1474 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
1475     [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
1476
1477
1478 # _LT_LIBTOOL_TAGS
1479 # ----------------
1480 # Output comment and list of tags supported by the script
1481 m4_defun([_LT_LIBTOOL_TAGS],
1482 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
1483 available_tags="_LT_TAGS"dnl
1484 ])
1485
1486
1487 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
1488 # -----------------------------------
1489 # Extract the dictionary values for VARNAME (optionally with TAG) and
1490 # expand to a commented shell variable setting:
1491 #
1492 #    # Some comment about what VAR is for.
1493 #    visible_name=$lt_internal_name
1494 m4_define([_LT_LIBTOOL_DECLARE],
1495 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
1496                                            [description])))[]dnl
1497 m4_pushdef([_libtool_name],
1498     m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
1499 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
1500     [0], [_libtool_name=[$]$1],
1501     [1], [_libtool_name=$lt_[]$1],
1502     [2], [_libtool_name=$lt_[]$1],
1503     [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
1504 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
1505 ])
1506
1507
1508 # _LT_LIBTOOL_CONFIG_VARS
1509 # -----------------------
1510 # Produce commented declarations of non-tagged libtool config variables
1511 # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
1512 # script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
1513 # section) are produced by _LT_LIBTOOL_TAG_VARS.
1514 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
1515 [m4_foreach([_lt_var],
1516     m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
1517     [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
1518
1519
1520 # _LT_LIBTOOL_TAG_VARS(TAG)
1521 # -------------------------
1522 m4_define([_LT_LIBTOOL_TAG_VARS],
1523 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
1524     [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
1525
1526
1527 # _LT_TAGVAR(VARNAME, [TAGNAME])
1528 # ------------------------------
1529 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
1530
1531
1532 # _LT_CONFIG_COMMANDS
1533 # -------------------
1534 # Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
1535 # variables for single and double quote escaping we saved from calls
1536 # to _LT_DECL, we can put quote escaped variables declarations
1537 # into `config.status', and then the shell code to quote escape them in
1538 # for loops in `config.status'.  Finally, any additional code accumulated
1539 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
1540 m4_defun([_LT_CONFIG_COMMANDS],
1541 [AC_PROVIDE_IFELSE([LT_OUTPUT],
1542         dnl If the libtool generation code has been placed in $CONFIG_LT,
1543         dnl instead of duplicating it all over again into config.status,
1544         dnl then we will have config.status run $CONFIG_LT later, so it
1545         dnl needs to know what name is stored there:
1546         [AC_CONFIG_COMMANDS([libtool],
1547             [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
1548     dnl If the libtool generation code is destined for config.status,
1549     dnl expand the accumulated commands and init code now:
1550     [AC_CONFIG_COMMANDS([libtool],
1551         [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
1552 ])#_LT_CONFIG_COMMANDS
1553
1554
1555 # Initialize.
1556 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
1557 [
1558
1559 # The HP-UX ksh and POSIX shell print the target directory to stdout
1560 # if CDPATH is set.
1561 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1562
1563 sed_quote_subst='$sed_quote_subst'
1564 double_quote_subst='$double_quote_subst'
1565 delay_variable_subst='$delay_variable_subst'
1566 _LT_CONFIG_STATUS_DECLARATIONS
1567 LTCC='$LTCC'
1568 LTCFLAGS='$LTCFLAGS'
1569 compiler='$compiler_DEFAULT'
1570
1571 # A function that is used when there is no print builtin or printf.
1572 func_fallback_echo ()
1573 {
1574   eval 'cat <<_LTECHO_EOF
1575 \$[]1
1576 _LTECHO_EOF'
1577 }
1578
1579 # Quote evaled strings.
1580 for var in lt_decl_all_varnames([[ \
1581 ]], lt_decl_quote_varnames); do
1582     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
1583     *[[\\\\\\\`\\"\\\$]]*)
1584       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
1585       ;;
1586     *)
1587       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1588       ;;
1589     esac
1590 done
1591
1592 # Double-quote double-evaled strings.
1593 for var in lt_decl_all_varnames([[ \
1594 ]], lt_decl_dquote_varnames); do
1595     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
1596     *[[\\\\\\\`\\"\\\$]]*)
1597       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
1598       ;;
1599     *)
1600       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1601       ;;
1602     esac
1603 done
1604
1605 _LT_OUTPUT_LIBTOOL_INIT
1606 ])
1607
1608 # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
1609 # ------------------------------------
1610 # Generate a child script FILE with all initialization necessary to
1611 # reuse the environment learned by the parent script, and make the
1612 # file executable.  If COMMENT is supplied, it is inserted after the
1613 # `#!' sequence but before initialization text begins.  After this
1614 # macro, additional text can be appended to FILE to form the body of
1615 # the child script.  The macro ends with non-zero status if the
1616 # file could not be fully written (such as if the disk is full).
1617 m4_ifdef([AS_INIT_GENERATED],
1618 [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
1619 [m4_defun([_LT_GENERATED_FILE_INIT],
1620 [m4_require([AS_PREPARE])]dnl
1621 [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
1622 [lt_write_fail=0
1623 cat >$1 <<_ASEOF || lt_write_fail=1
1624 #! $SHELL
1625 # Generated by $as_me.
1626 $2
1627 SHELL=\${CONFIG_SHELL-$SHELL}
1628 export SHELL
1629 _ASEOF
1630 cat >>$1 <<\_ASEOF || lt_write_fail=1
1631 AS_SHELL_SANITIZE
1632 _AS_PREPARE
1633 exec AS_MESSAGE_FD>&1
1634 _ASEOF
1635 test $lt_write_fail = 0 && chmod +x $1[]dnl
1636 m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
1637
1638 # LT_OUTPUT
1639 # ---------
1640 # This macro allows early generation of the libtool script (before
1641 # AC_OUTPUT is called), incase it is used in configure for compilation
1642 # tests.
1643 AC_DEFUN([LT_OUTPUT],
1644 [: ${CONFIG_LT=./config.lt}
1645 AC_MSG_NOTICE([creating $CONFIG_LT])
1646 _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
1647 [# Run this file to recreate a libtool stub with the current configuration.])
1648
1649 cat >>"$CONFIG_LT" <<\_LTEOF
1650 lt_cl_silent=false
1651 exec AS_MESSAGE_LOG_FD>>config.log
1652 {
1653   echo
1654   AS_BOX([Running $as_me.])
1655 } >&AS_MESSAGE_LOG_FD
1656
1657 lt_cl_help="\
1658 \`$as_me' creates a local libtool stub from the current configuration,
1659 for use in further configure time tests before the real libtool is
1660 generated.
1661
1662 Usage: $[0] [[OPTIONS]]
1663
1664   -h, --help      print this help, then exit
1665   -V, --version   print version number, then exit
1666   -q, --quiet     do not print progress messages
1667   -d, --debug     don't remove temporary files
1668
1669 Report bugs to <bug-libtool@gnu.org>."
1670
1671 lt_cl_version="\
1672 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
1673 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
1674 configured by $[0], generated by m4_PACKAGE_STRING.
1675
1676 Copyright (C) 2011 Free Software Foundation, Inc.
1677 This config.lt script is free software; the Free Software Foundation
1678 gives unlimited permision to copy, distribute and modify it."
1679
1680 while test $[#] != 0
1681 do
1682   case $[1] in
1683     --version | --v* | -V )
1684       echo "$lt_cl_version"; exit 0 ;;
1685     --help | --h* | -h )
1686       echo "$lt_cl_help"; exit 0 ;;
1687     --debug | --d* | -d )
1688       debug=: ;;
1689     --quiet | --q* | --silent | --s* | -q )
1690       lt_cl_silent=: ;;
1691
1692     -*) AC_MSG_ERROR([unrecognized option: $[1]
1693 Try \`$[0] --help' for more information.]) ;;
1694
1695     *) AC_MSG_ERROR([unrecognized argument: $[1]
1696 Try \`$[0] --help' for more information.]) ;;
1697   esac
1698   shift
1699 done
1700
1701 if $lt_cl_silent; then
1702   exec AS_MESSAGE_FD>/dev/null
1703 fi
1704 _LTEOF
1705
1706 cat >>"$CONFIG_LT" <<_LTEOF
1707 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
1708 _LTEOF
1709
1710 cat >>"$CONFIG_LT" <<\_LTEOF
1711 AC_MSG_NOTICE([creating $ofile])
1712 _LT_OUTPUT_LIBTOOL_COMMANDS
1713 AS_EXIT(0)
1714 _LTEOF
1715 chmod +x "$CONFIG_LT"
1716
1717 # configure is writing to config.log, but config.lt does its own redirection,
1718 # appending to config.log, which fails on DOS, as config.log is still kept
1719 # open by configure.  Here we exec the FD to /dev/null, effectively closing
1720 # config.log, so it can be properly (re)opened and appended to by config.lt.
1721 lt_cl_success=:
1722 test "$silent" = yes &&
1723   lt_config_lt_args="$lt_config_lt_args --quiet"
1724 exec AS_MESSAGE_LOG_FD>/dev/null
1725 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
1726 exec AS_MESSAGE_LOG_FD>>config.log
1727 $lt_cl_success || AS_EXIT(1)
1728 ])# LT_OUTPUT
1729
1730
1731 # _LT_CONFIG(TAG)
1732 # ---------------
1733 # If TAG is the built-in tag, create an initial libtool script with a
1734 # default configuration from the untagged config vars.  Otherwise add code
1735 # to config.status for appending the configuration named by TAG from the
1736 # matching tagged config vars.
1737 m4_defun([_LT_CONFIG],
1738 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1739 _LT_CONFIG_SAVE_COMMANDS([
1740   m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
1741   m4_if(_LT_TAG, [C], [
1742     # See if we are running on zsh, and set the options which allow our
1743     # commands through without removal of \ escapes.
1744     if test -n "${ZSH_VERSION+set}" ; then
1745       setopt NO_GLOB_SUBST
1746     fi
1747
1748     cfgfile="${ofile}T"
1749     trap "$RM \"$cfgfile\"; exit 1" 1 2 15
1750     $RM "$cfgfile"
1751
1752     cat <<_LT_EOF >> "$cfgfile"
1753 #! $SHELL
1754
1755 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
1756 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
1757 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1758 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
1759 #
1760 _LT_COPYING
1761 _LT_LIBTOOL_TAGS
1762
1763 # ### BEGIN LIBTOOL CONFIG
1764 _LT_LIBTOOL_CONFIG_VARS
1765 _LT_LIBTOOL_TAG_VARS
1766 # ### END LIBTOOL CONFIG
1767
1768 _LT_EOF
1769
1770   case $host_os in
1771   aix3*)
1772     cat <<\_LT_EOF >> "$cfgfile"
1773 # AIX sometimes has problems with the GCC collect2 program.  For some
1774 # reason, if we set the COLLECT_NAMES environment variable, the problems
1775 # vanish in a puff of smoke.
1776 if test "X${COLLECT_NAMES+set}" != Xset; then
1777   COLLECT_NAMES=
1778   export COLLECT_NAMES
1779 fi
1780 _LT_EOF
1781     ;;
1782   esac
1783
1784   _LT_PROG_LTMAIN
1785
1786   # We use sed instead of cat because bash on DJGPP gets confused if
1787   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
1788   # text mode, it properly converts lines to CR/LF.  This bash problem
1789   # is reportedly fixed, but why not run on old versions too?
1790   sed '$q' "$ltmain" >> "$cfgfile" \
1791      || (rm -f "$cfgfile"; exit 1)
1792
1793   _LT_PROG_REPLACE_SHELLFNS
1794
1795    mv -f "$cfgfile" "$ofile" ||
1796     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
1797   chmod +x "$ofile"
1798 ],
1799 [cat <<_LT_EOF >> "$ofile"
1800
1801 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
1802 dnl in a comment (ie after a #).
1803 # ### BEGIN LIBTOOL TAG CONFIG: $1
1804 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
1805 # ### END LIBTOOL TAG CONFIG: $1
1806 _LT_EOF
1807 ])dnl /m4_if
1808 ],
1809 [m4_if([$1], [], [
1810     PACKAGE='$PACKAGE'
1811     VERSION='$VERSION'
1812     TIMESTAMP='$TIMESTAMP'
1813     RM='$RM'
1814     ofile='$ofile'], [])
1815 ])dnl /_LT_CONFIG_SAVE_COMMANDS
1816 ])# _LT_CONFIG
1817
1818
1819 # LT_SUPPORTED_TAG(TAG)
1820 # ---------------------
1821 # Trace this macro to discover what tags are supported by the libtool
1822 # --tag option, using:
1823 #    autoconf --trace 'LT_SUPPORTED_TAG:$1'
1824 AC_DEFUN([LT_SUPPORTED_TAG], [])
1825
1826
1827 # C support is built-in for now
1828 m4_define([_LT_LANG_C_enabled], [])
1829 m4_define([_LT_TAGS], [])
1830
1831
1832 # LT_LANG(LANG)
1833 # -------------
1834 # Enable libtool support for the given language if not already enabled.
1835 AC_DEFUN([LT_LANG],
1836 [AC_BEFORE([$0], [LT_OUTPUT])dnl
1837 m4_case([$1],
1838   [C],                  [_LT_LANG(C)],
1839   [C++],                [_LT_LANG(CXX)],
1840   [Go],                 [_LT_LANG(GO)],
1841   [Java],               [_LT_LANG(GCJ)],
1842   [Fortran 77],         [_LT_LANG(F77)],
1843   [Fortran],            [_LT_LANG(FC)],
1844   [Windows Resource],   [_LT_LANG(RC)],
1845   [m4_ifdef([_LT_LANG_]$1[_CONFIG],
1846     [_LT_LANG($1)],
1847     [m4_fatal([$0: unsupported language: "$1"])])])dnl
1848 ])# LT_LANG
1849
1850
1851 # _LT_LANG(LANGNAME)
1852 # ------------------
1853 m4_defun([_LT_LANG],
1854 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
1855   [LT_SUPPORTED_TAG([$1])dnl
1856   m4_append([_LT_TAGS], [$1 ])dnl
1857   m4_define([_LT_LANG_]$1[_enabled], [])dnl
1858   _LT_LANG_$1_CONFIG($1)])dnl
1859 ])# _LT_LANG
1860
1861
1862 m4_ifndef([AC_PROG_GO], [
1863 # NOTE: This macro has been submitted for inclusion into   #
1864 #  GNU Autoconf as AC_PROG_GO.  When it is available in    #
1865 #  a released version of Autoconf we should remove this    #
1866 #  macro and use it instead.                               #
1867 m4_defun([AC_PROG_GO],
1868 [AC_LANG_PUSH(Go)dnl
1869 AC_ARG_VAR([GOC],     [Go compiler command])dnl
1870 AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
1871 _AC_ARG_VAR_LDFLAGS()dnl
1872 AC_CHECK_TOOL(GOC, gccgo)
1873 if test -z "$GOC"; then
1874   if test -n "$ac_tool_prefix"; then
1875     AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
1876   fi
1877 fi
1878 if test -z "$GOC"; then
1879   AC_CHECK_PROG(GOC, gccgo, gccgo, false)
1880 fi
1881 ])#m4_defun
1882 ])#m4_ifndef
1883
1884
1885 # _LT_LANG_DEFAULT_CONFIG
1886 # -----------------------
1887 m4_defun([_LT_LANG_DEFAULT_CONFIG],
1888 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
1889   [LT_LANG(CXX)],
1890   [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
1891
1892 AC_PROVIDE_IFELSE([AC_PROG_F77],
1893   [LT_LANG(F77)],
1894   [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
1895
1896 AC_PROVIDE_IFELSE([AC_PROG_FC],
1897   [LT_LANG(FC)],
1898   [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
1899
1900 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
1901 dnl pulling things in needlessly.
1902 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
1903   [LT_LANG(GCJ)],
1904   [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
1905     [LT_LANG(GCJ)],
1906     [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
1907       [LT_LANG(GCJ)],
1908       [m4_ifdef([AC_PROG_GCJ],
1909         [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
1910        m4_ifdef([A][M_PROG_GCJ],
1911         [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
1912        m4_ifdef([LT_PROG_GCJ],
1913         [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
1914
1915 AC_PROVIDE_IFELSE([AC_PROG_GO],
1916   [LT_LANG(GO)],
1917   [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
1918
1919 AC_PROVIDE_IFELSE([LT_PROG_RC],
1920   [LT_LANG(RC)],
1921   [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
1922 ])# _LT_LANG_DEFAULT_CONFIG
1923
1924 # Obsolete macros:
1925 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
1926 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
1927 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
1928 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
1929 AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
1930 dnl aclocal-1.4 backwards compatibility:
1931 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
1932 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
1933 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
1934 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
1935 dnl AC_DEFUN([AC_LIBTOOL_RC], [])
1936
1937
1938 # _LT_TAG_COMPILER
1939 # ----------------
1940 m4_defun([_LT_TAG_COMPILER],
1941 [AC_REQUIRE([AC_PROG_CC])dnl
1942
1943 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
1944 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
1945 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
1946 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
1947
1948 # If no C compiler was specified, use CC.
1949 LTCC=${LTCC-"$CC"}
1950
1951 # If no C compiler flags were specified, use CFLAGS.
1952 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
1953
1954 # Allow CC to be a program name with arguments.
1955 compiler=$CC
1956 ])# _LT_TAG_COMPILER
1957
1958
1959 # _LT_COMPILER_BOILERPLATE
1960 # ------------------------
1961 # Check for compiler boilerplate output or warnings with
1962 # the simple compiler test code.
1963 m4_defun([_LT_COMPILER_BOILERPLATE],
1964 [m4_require([_LT_DECL_SED])dnl
1965 ac_outfile=conftest.$ac_objext
1966 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
1967 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1968 _lt_compiler_boilerplate=`cat conftest.err`
1969 $RM conftest*
1970 ])# _LT_COMPILER_BOILERPLATE
1971
1972
1973 # _LT_LINKER_BOILERPLATE
1974 # ----------------------
1975 # Check for linker boilerplate output or warnings with
1976 # the simple link test code.
1977 m4_defun([_LT_LINKER_BOILERPLATE],
1978 [m4_require([_LT_DECL_SED])dnl
1979 ac_outfile=conftest.$ac_objext
1980 echo "$lt_simple_link_test_code" >conftest.$ac_ext
1981 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1982 _lt_linker_boilerplate=`cat conftest.err`
1983 $RM -r conftest*
1984 ])# _LT_LINKER_BOILERPLATE
1985
1986 # _LT_REQUIRED_DARWIN_CHECKS
1987 # -------------------------
1988 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
1989   case $host_os in
1990     rhapsody* | darwin*)
1991     AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
1992     AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
1993     AC_CHECK_TOOL([LIPO], [lipo], [:])
1994     AC_CHECK_TOOL([OTOOL], [otool], [:])
1995     AC_CHECK_TOOL([OTOOL64], [otool64], [:])
1996     _LT_DECL([], [DSYMUTIL], [1],
1997       [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
1998     _LT_DECL([], [NMEDIT], [1],
1999       [Tool to change global to local symbols on Mac OS X])
2000     _LT_DECL([], [LIPO], [1],
2001       [Tool to manipulate fat objects and archives on Mac OS X])
2002     _LT_DECL([], [OTOOL], [1],
2003       [ldd/readelf like tool for Mach-O binaries on Mac OS X])
2004     _LT_DECL([], [OTOOL64], [1],
2005       [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
2006
2007     AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
2008       [lt_cv_apple_cc_single_mod=no
2009       if test -z "${LT_MULTI_MODULE}"; then
2010         # By default we will add the -single_module flag. You can override
2011         # by either setting the environment variable LT_MULTI_MODULE
2012         # non-empty at configure time, or by adding -multi_module to the
2013         # link flags.
2014         rm -rf libconftest.dylib*
2015         echo "int foo(void){return 1;}" > conftest.c
2016         echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
2017 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
2018         $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
2019           -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
2020         _lt_result=$?
2021         # If there is a non-empty error log, and "single_module"
2022         # appears in it, assume the flag caused a linker warning
2023         if test -s conftest.err && $GREP single_module conftest.err; then
2024           cat conftest.err >&AS_MESSAGE_LOG_FD
2025         # Otherwise, if the output was created with a 0 exit code from
2026         # the compiler, it worked.
2027         elif test -f libconftest.dylib && test $_lt_result -eq 0; then
2028           lt_cv_apple_cc_single_mod=yes
2029         else
2030           cat conftest.err >&AS_MESSAGE_LOG_FD
2031         fi
2032         rm -rf libconftest.dylib*
2033         rm -f conftest.*
2034       fi])
2035
2036     AC_CACHE_CHECK([for -exported_symbols_list linker flag],
2037       [lt_cv_ld_exported_symbols_list],
2038       [lt_cv_ld_exported_symbols_list=no
2039       save_LDFLAGS=$LDFLAGS
2040       echo "_main" > conftest.sym
2041       LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
2042       AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2043         [lt_cv_ld_exported_symbols_list=yes],
2044         [lt_cv_ld_exported_symbols_list=no])
2045         LDFLAGS="$save_LDFLAGS"
2046     ])
2047
2048     AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
2049       [lt_cv_ld_force_load=no
2050       cat > conftest.c << _LT_EOF
2051 int forced_loaded() { return 2;}
2052 _LT_EOF
2053       echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
2054       $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
2055       echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
2056       $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
2057       echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
2058       $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
2059       cat > conftest.c << _LT_EOF
2060 int main() { return 0;}
2061 _LT_EOF
2062       echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
2063       $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
2064       _lt_result=$?
2065       if test -s conftest.err && $GREP force_load conftest.err; then
2066         cat conftest.err >&AS_MESSAGE_LOG_FD
2067       elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
2068         lt_cv_ld_force_load=yes
2069       else
2070         cat conftest.err >&AS_MESSAGE_LOG_FD
2071       fi
2072         rm -f conftest.err libconftest.a conftest conftest.c
2073         rm -rf conftest.dSYM
2074     ])
2075     case $host_os in
2076     rhapsody* | darwin1.[[012]])
2077       _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
2078     darwin1.*)
2079       _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
2080     darwin*) # darwin 5.x on
2081       # if running on 10.5 or later, the deployment target defaults
2082       # to the OS version, if on x86, and 10.4, the deployment
2083       # target defaults to 10.4. Don't you love it?
2084       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
2085         10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
2086           _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2087         10.[[012]]*)
2088           _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
2089         10.*)
2090           _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2091       esac
2092     ;;
2093   esac
2094     if test "$lt_cv_apple_cc_single_mod" = "yes"; then
2095       _lt_dar_single_mod='$single_module'
2096     fi
2097     if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
2098       _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
2099     else
2100       _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
2101     fi
2102     if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
2103       _lt_dsymutil='~$DSYMUTIL $lib || :'
2104     else
2105       _lt_dsymutil=
2106     fi
2107     ;;
2108   esac
2109 ])
2110
2111
2112 # _LT_DARWIN_LINKER_FEATURES([TAG])
2113 # ---------------------------------
2114 # Checks for linker and compiler features on darwin
2115 m4_defun([_LT_DARWIN_LINKER_FEATURES],
2116 [
2117   m4_require([_LT_REQUIRED_DARWIN_CHECKS])
2118   _LT_TAGVAR(archive_cmds_need_lc, $1)=no
2119   _LT_TAGVAR(hardcode_direct, $1)=no
2120   _LT_TAGVAR(hardcode_automatic, $1)=yes
2121   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2122   if test "$lt_cv_ld_force_load" = "yes"; then
2123     _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
2124     m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
2125                   [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
2126   else
2127     _LT_TAGVAR(whole_archive_flag_spec, $1)=''
2128   fi
2129   _LT_TAGVAR(link_all_deplibs, $1)=yes
2130   _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
2131   case $cc_basename in
2132      ifort*) _lt_dar_can_shared=yes ;;
2133      *) _lt_dar_can_shared=$GCC ;;
2134   esac
2135   if test "$_lt_dar_can_shared" = "yes"; then
2136     output_verbose_link_cmd=func_echo_all
2137     _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
2138     _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
2139     _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
2140     _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
2141     m4_if([$1], [CXX],
2142 [   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
2143       _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
2144       _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
2145     fi
2146 ],[])
2147   else
2148   _LT_TAGVAR(ld_shlibs, $1)=no
2149   fi
2150 ])
2151
2152 # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
2153 # ----------------------------------
2154 # Links a minimal program and checks the executable
2155 # for the system default hardcoded library path. In most cases,
2156 # this is /usr/lib:/lib, but when the MPI compilers are used
2157 # the location of the communication and MPI libs are included too.
2158 # If we don't find anything, use the default library path according
2159 # to the aix ld manual.
2160 # Store the results from the different compilers for each TAGNAME.
2161 # Allow to override them for all tags through lt_cv_aix_libpath.
2162 m4_defun([_LT_SYS_MODULE_PATH_AIX],
2163 [m4_require([_LT_DECL_SED])dnl
2164 if test "${lt_cv_aix_libpath+set}" = set; then
2165   aix_libpath=$lt_cv_aix_libpath
2166 else
2167   AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
2168   [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
2169   lt_aix_libpath_sed='[
2170       /Import File Strings/,/^$/ {
2171           /^0/ {
2172               s/^0  *\([^ ]*\) *$/\1/
2173               p
2174           }
2175       }]'
2176   _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2177   # Check for a 64-bit object if we didn't find anything.
2178   if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
2179     _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2180   fi],[])
2181   if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
2182     _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
2183   fi
2184   ])
2185   aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
2186 fi
2187 ])# _LT_SYS_MODULE_PATH_AIX
2188
2189
2190 # _LT_SHELL_INIT(ARG)
2191 # -------------------
2192 m4_define([_LT_SHELL_INIT],
2193 [m4_divert_text([M4SH-INIT], [$1
2194 ])])# _LT_SHELL_INIT
2195
2196
2197
2198 # _LT_PROG_ECHO_BACKSLASH
2199 # -----------------------
2200 # Find how we can fake an echo command that does not interpret backslash.
2201 # In particular, with Autoconf 2.60 or later we add some code to the start
2202 # of the generated configure script which will find a shell with a builtin
2203 # printf (which we can use as an echo command).
2204 m4_defun([_LT_PROG_ECHO_BACKSLASH],
2205 [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
2206 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
2207 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
2208
2209 AC_MSG_CHECKING([how to print strings])
2210 # Test print first, because it will be a builtin if present.
2211 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
2212    test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
2213   ECHO='print -r --'
2214 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
2215   ECHO='printf %s\n'
2216 else
2217   # Use this function as a fallback that always works.
2218   func_fallback_echo ()
2219   {
2220     eval 'cat <<_LTECHO_EOF
2221 $[]1
2222 _LTECHO_EOF'
2223   }
2224   ECHO='func_fallback_echo'
2225 fi
2226
2227 # func_echo_all arg...
2228 # Invoke $ECHO with all args, space-separated.
2229 func_echo_all ()
2230 {
2231     $ECHO "$*" 
2232 }
2233
2234 case "$ECHO" in
2235   printf*) AC_MSG_RESULT([printf]) ;;
2236   print*) AC_MSG_RESULT([print -r]) ;;
2237   *) AC_MSG_RESULT([cat]) ;;
2238 esac
2239
2240 m4_ifdef([_AS_DETECT_SUGGESTED],
2241 [_AS_DETECT_SUGGESTED([
2242   test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
2243     ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
2244     ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
2245     ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
2246     PATH=/empty FPATH=/empty; export PATH FPATH
2247     test "X`printf %s $ECHO`" = "X$ECHO" \
2248       || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
2249
2250 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
2251 _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
2252 ])# _LT_PROG_ECHO_BACKSLASH
2253
2254
2255 # _LT_WITH_SYSROOT
2256 # ----------------
2257 AC_DEFUN([_LT_WITH_SYSROOT],
2258 [AC_MSG_CHECKING([for sysroot])
2259 AC_ARG_WITH([sysroot],
2260 [  --with-sysroot[=DIR] Search for dependent libraries within DIR
2261                         (or the compiler's sysroot if not specified).],
2262 [], [with_sysroot=no])
2263
2264 dnl lt_sysroot will always be passed unquoted.  We quote it here
2265 dnl in case the user passed a directory name.
2266 lt_sysroot=
2267 case ${with_sysroot} in #(
2268  yes)
2269    if test "$GCC" = yes; then
2270      lt_sysroot=`$CC --print-sysroot 2>/dev/null`
2271    fi
2272    ;; #(
2273  /*)
2274    lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
2275    ;; #(
2276  no|'')
2277    ;; #(
2278  *)
2279    AC_MSG_RESULT([${with_sysroot}])
2280    AC_MSG_ERROR([The sysroot must be an absolute path.])
2281    ;;
2282 esac
2283
2284  AC_MSG_RESULT([${lt_sysroot:-no}])
2285 _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
2286 [dependent libraries, and in which our libraries should be installed.])])
2287
2288 # _LT_ENABLE_LOCK
2289 # ---------------
2290 m4_defun([_LT_ENABLE_LOCK],
2291 [AC_ARG_ENABLE([libtool-lock],
2292   [AS_HELP_STRING([--disable-libtool-lock],
2293     [avoid locking (might break parallel builds)])])
2294 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
2295
2296 # Some flags need to be propagated to the compiler or linker for good
2297 # libtool support.
2298 case $host in
2299 ia64-*-hpux*)
2300   # Find out which ABI we are using.
2301   echo 'int i;' > conftest.$ac_ext
2302   if AC_TRY_EVAL(ac_compile); then
2303     case `/usr/bin/file conftest.$ac_objext` in
2304       *ELF-32*)
2305         HPUX_IA64_MODE="32"
2306         ;;
2307       *ELF-64*)
2308         HPUX_IA64_MODE="64"
2309         ;;
2310     esac
2311   fi
2312   rm -rf conftest*
2313   ;;
2314 *-*-irix6*)
2315   # Find out which ABI we are using.
2316   echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
2317   if AC_TRY_EVAL(ac_compile); then
2318     if test "$lt_cv_prog_gnu_ld" = yes; then
2319       case `/usr/bin/file conftest.$ac_objext` in
2320         *32-bit*)
2321           LD="${LD-ld} -melf32bsmip"
2322           ;;
2323         *N32*)
2324           LD="${LD-ld} -melf32bmipn32"
2325           ;;
2326         *64-bit*)
2327           LD="${LD-ld} -melf64bmip"
2328         ;;
2329       esac
2330     else
2331       case `/usr/bin/file conftest.$ac_objext` in
2332         *32-bit*)
2333           LD="${LD-ld} -32"
2334           ;;
2335         *N32*)
2336           LD="${LD-ld} -n32"
2337           ;;
2338         *64-bit*)
2339           LD="${LD-ld} -64"
2340           ;;
2341       esac
2342     fi
2343   fi
2344   rm -rf conftest*
2345   ;;
2346
2347 x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
2348 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
2349   # Find out which ABI we are using.
2350   echo 'int i;' > conftest.$ac_ext
2351   if AC_TRY_EVAL(ac_compile); then
2352     case `/usr/bin/file conftest.o` in
2353       *32-bit*)
2354         case $host in
2355           x86_64-*kfreebsd*-gnu)
2356             LD="${LD-ld} -m elf_i386_fbsd"
2357             ;;
2358           x86_64-*linux*)
2359             LD="${LD-ld} -m elf_i386"
2360             ;;
2361           ppc64-*linux*|powerpc64-*linux*)
2362             LD="${LD-ld} -m elf32ppclinux"
2363             ;;
2364           s390x-*linux*)
2365             LD="${LD-ld} -m elf_s390"
2366             ;;
2367           sparc64-*linux*)
2368             LD="${LD-ld} -m elf32_sparc"
2369             ;;
2370         esac
2371         ;;
2372       *64-bit*)
2373         case $host in
2374           x86_64-*kfreebsd*-gnu)
2375             LD="${LD-ld} -m elf_x86_64_fbsd"
2376             ;;
2377           x86_64-*linux*)
2378             LD="${LD-ld} -m elf_x86_64"
2379             ;;
2380           ppc*-*linux*|powerpc*-*linux*)
2381             LD="${LD-ld} -m elf64ppc"
2382             ;;
2383           s390*-*linux*|s390*-*tpf*)
2384             LD="${LD-ld} -m elf64_s390"
2385             ;;
2386           sparc*-*linux*)
2387             LD="${LD-ld} -m elf64_sparc"
2388             ;;
2389         esac
2390         ;;
2391     esac
2392   fi
2393   rm -rf conftest*
2394   ;;
2395
2396 *-*-sco3.2v5*)
2397   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2398   SAVE_CFLAGS="$CFLAGS"
2399   CFLAGS="$CFLAGS -belf"
2400   AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
2401     [AC_LANG_PUSH(C)
2402      AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
2403      AC_LANG_POP])
2404   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2405     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2406     CFLAGS="$SAVE_CFLAGS"
2407   fi
2408   ;;
2409 *-*solaris*)
2410   # Find out which ABI we are using.
2411   echo 'int i;' > conftest.$ac_ext
2412   if AC_TRY_EVAL(ac_compile); then
2413     case `/usr/bin/file conftest.o` in
2414     *64-bit*)
2415       case $lt_cv_prog_gnu_ld in
2416       yes*)
2417         case $host in
2418         i?86-*-solaris*)
2419           LD="${LD-ld} -m elf_x86_64"
2420           ;;
2421         sparc*-*-solaris*)
2422           LD="${LD-ld} -m elf64_sparc"
2423           ;;
2424         esac
2425         # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
2426         if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
2427           LD="${LD-ld}_sol2"
2428         fi
2429         ;;
2430       *)
2431         if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
2432           LD="${LD-ld} -64"
2433         fi
2434         ;;
2435       esac
2436       ;;
2437     esac
2438   fi
2439   rm -rf conftest*
2440   ;;
2441 esac
2442
2443 need_locks="$enable_libtool_lock"
2444 ])# _LT_ENABLE_LOCK
2445
2446
2447 # _LT_PROG_AR
2448 # -----------
2449 m4_defun([_LT_PROG_AR],
2450 [AC_CHECK_TOOLS(AR, [ar], false)
2451 : ${AR=ar}
2452 : ${AR_FLAGS=cru}
2453 _LT_DECL([], [AR], [1], [The archiver])
2454 _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
2455
2456 AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
2457   [lt_cv_ar_at_file=no
2458    AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
2459      [echo conftest.$ac_objext > conftest.lst
2460       lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
2461       AC_TRY_EVAL([lt_ar_try])
2462       if test "$ac_status" -eq 0; then
2463         # Ensure the archiver fails upon bogus file names.
2464         rm -f conftest.$ac_objext libconftest.a
2465         AC_TRY_EVAL([lt_ar_try])
2466         if test "$ac_status" -ne 0; then
2467           lt_cv_ar_at_file=@
2468         fi
2469       fi
2470       rm -f conftest.* libconftest.a
2471      ])
2472   ])
2473
2474 if test "x$lt_cv_ar_at_file" = xno; then
2475   archiver_list_spec=
2476 else
2477   archiver_list_spec=$lt_cv_ar_at_file
2478 fi
2479 _LT_DECL([], [archiver_list_spec], [1],
2480   [How to feed a file listing to the archiver])
2481 ])# _LT_PROG_AR
2482
2483
2484 # _LT_CMD_OLD_ARCHIVE
2485 # -------------------
2486 m4_defun([_LT_CMD_OLD_ARCHIVE],
2487 [_LT_PROG_AR
2488
2489 AC_CHECK_TOOL(STRIP, strip, :)
2490 test -z "$STRIP" && STRIP=:
2491 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
2492
2493 AC_CHECK_TOOL(RANLIB, ranlib, :)
2494 test -z "$RANLIB" && RANLIB=:
2495 _LT_DECL([], [RANLIB], [1],
2496     [Commands used to install an old-style archive])
2497
2498 # Determine commands to create old-style static archives.
2499 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
2500 old_postinstall_cmds='chmod 644 $oldlib'
2501 old_postuninstall_cmds=
2502
2503 if test -n "$RANLIB"; then
2504   case $host_os in
2505   openbsd*)
2506     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
2507     ;;
2508   *)
2509     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
2510     ;;
2511   esac
2512   old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
2513 fi
2514
2515 case $host_os in
2516   darwin*)
2517     lock_old_archive_extraction=yes ;;
2518   *)
2519     lock_old_archive_extraction=no ;;
2520 esac
2521 _LT_DECL([], [old_postinstall_cmds], [2])
2522 _LT_DECL([], [old_postuninstall_cmds], [2])
2523 _LT_TAGDECL([], [old_archive_cmds], [2],
2524     [Commands used to build an old-style archive])
2525 _LT_DECL([], [lock_old_archive_extraction], [0],
2526     [Whether to use a lock for old archive extraction])
2527 ])# _LT_CMD_OLD_ARCHIVE
2528
2529
2530 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2531 #               [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
2532 # ----------------------------------------------------------------
2533 # Check whether the given compiler option works
2534 AC_DEFUN([_LT_COMPILER_OPTION],
2535 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2536 m4_require([_LT_DECL_SED])dnl
2537 AC_CACHE_CHECK([$1], [$2],
2538   [$2=no
2539    m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
2540    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2541    lt_compiler_flag="$3"
2542    # Insert the option either (1) after the last *FLAGS variable, or
2543    # (2) before a word containing "conftest.", or (3) at the end.
2544    # Note that $ac_compile itself does not contain backslashes and begins
2545    # with a dollar sign (not a hyphen), so the echo should work correctly.
2546    # The option is referenced via a variable to avoid confusing sed.
2547    lt_compile=`echo "$ac_compile" | $SED \
2548    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2549    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2550    -e 's:$: $lt_compiler_flag:'`
2551    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2552    (eval "$lt_compile" 2>conftest.err)
2553    ac_status=$?
2554    cat conftest.err >&AS_MESSAGE_LOG_FD
2555    echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2556    if (exit $ac_status) && test -s "$ac_outfile"; then
2557      # The compiler can only warn and ignore the option if not recognized
2558      # So say no if there are warnings other than the usual output.
2559      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
2560      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2561      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
2562        $2=yes
2563      fi
2564    fi
2565    $RM conftest*
2566 ])
2567
2568 if test x"[$]$2" = xyes; then
2569     m4_if([$5], , :, [$5])
2570 else
2571     m4_if([$6], , :, [$6])
2572 fi
2573 ])# _LT_COMPILER_OPTION
2574
2575 # Old name:
2576 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
2577 dnl aclocal-1.4 backwards compatibility:
2578 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
2579
2580
2581 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2582 #                  [ACTION-SUCCESS], [ACTION-FAILURE])
2583 # ----------------------------------------------------
2584 # Check whether the given linker option works
2585 AC_DEFUN([_LT_LINKER_OPTION],
2586 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2587 m4_require([_LT_DECL_SED])dnl
2588 AC_CACHE_CHECK([$1], [$2],
2589   [$2=no
2590    save_LDFLAGS="$LDFLAGS"
2591    LDFLAGS="$LDFLAGS $3"
2592    echo "$lt_simple_link_test_code" > conftest.$ac_ext
2593    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
2594      # The linker can only warn and ignore the option if not recognized
2595      # So say no if there are warnings
2596      if test -s conftest.err; then
2597        # Append any errors to the config.log.
2598        cat conftest.err 1>&AS_MESSAGE_LOG_FD
2599        $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
2600        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2601        if diff conftest.exp conftest.er2 >/dev/null; then
2602          $2=yes
2603        fi
2604      else
2605        $2=yes
2606      fi
2607    fi
2608    $RM -r conftest*
2609    LDFLAGS="$save_LDFLAGS"
2610 ])
2611
2612 if test x"[$]$2" = xyes; then
2613     m4_if([$4], , :, [$4])
2614 else
2615     m4_if([$5], , :, [$5])
2616 fi
2617 ])# _LT_LINKER_OPTION
2618
2619 # Old name:
2620 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
2621 dnl aclocal-1.4 backwards compatibility:
2622 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
2623
2624
2625 # LT_CMD_MAX_LEN
2626 #---------------
2627 AC_DEFUN([LT_CMD_MAX_LEN],
2628 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2629 # find the maximum length of command line arguments
2630 AC_MSG_CHECKING([the maximum length of command line arguments])
2631 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
2632   i=0
2633   teststring="ABCD"
2634
2635   case $build_os in
2636   msdosdjgpp*)
2637     # On DJGPP, this test can blow up pretty badly due to problems in libc
2638     # (any single argument exceeding 2000 bytes causes a buffer overrun
2639     # during glob expansion).  Even if it were fixed, the result of this
2640     # check would be larger than it should be.
2641     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
2642     ;;
2643
2644   gnu*)
2645     # Under GNU Hurd, this test is not required because there is
2646     # no limit to the length of command line arguments.
2647     # Libtool will interpret -1 as no limit whatsoever
2648     lt_cv_sys_max_cmd_len=-1;
2649     ;;
2650
2651   cygwin* | mingw* | cegcc*)
2652     # On Win9x/ME, this test blows up -- it succeeds, but takes
2653     # about 5 minutes as the teststring grows exponentially.
2654     # Worse, since 9x/ME are not pre-emptively multitasking,
2655     # you end up with a "frozen" computer, even though with patience
2656     # the test eventually succeeds (with a max line length of 256k).
2657     # Instead, let's just punt: use the minimum linelength reported by
2658     # all of the supported platforms: 8192 (on NT/2K/XP).
2659     lt_cv_sys_max_cmd_len=8192;
2660     ;;
2661
2662   mint*)
2663     # On MiNT this can take a long time and run out of memory.
2664     lt_cv_sys_max_cmd_len=8192;
2665     ;;
2666
2667   amigaos*)
2668     # On AmigaOS with pdksh, this test takes hours, literally.
2669     # So we just punt and use a minimum line length of 8192.
2670     lt_cv_sys_max_cmd_len=8192;
2671     ;;
2672
2673   netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
2674     # This has been around since 386BSD, at least.  Likely further.
2675     if test -x /sbin/sysctl; then
2676       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
2677     elif test -x /usr/sbin/sysctl; then
2678       lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
2679     else
2680       lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
2681     fi
2682     # And add a safety zone
2683     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2684     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2685     ;;
2686
2687   interix*)
2688     # We know the value 262144 and hardcode it with a safety zone (like BSD)
2689     lt_cv_sys_max_cmd_len=196608
2690     ;;
2691
2692   os2*)
2693     # The test takes a long time on OS/2.
2694     lt_cv_sys_max_cmd_len=8192
2695     ;;
2696
2697   osf*)
2698     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
2699     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
2700     # nice to cause kernel panics so lets avoid the loop below.
2701     # First set a reasonable default.
2702     lt_cv_sys_max_cmd_len=16384
2703     #
2704     if test -x /sbin/sysconfig; then
2705       case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
2706         *1*) lt_cv_sys_max_cmd_len=-1 ;;
2707       esac
2708     fi
2709     ;;
2710   sco3.2v5*)
2711     lt_cv_sys_max_cmd_len=102400
2712     ;;
2713   sysv5* | sco5v6* | sysv4.2uw2*)
2714     kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
2715     if test -n "$kargmax"; then
2716       lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[         ]]//'`
2717     else
2718       lt_cv_sys_max_cmd_len=32768
2719     fi
2720     ;;
2721   *)
2722     lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
2723     if test -n "$lt_cv_sys_max_cmd_len"; then
2724       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2725       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2726     else
2727       # Make teststring a little bigger before we do anything with it.
2728       # a 1K string should be a reasonable start.
2729       for i in 1 2 3 4 5 6 7 8 ; do
2730         teststring=$teststring$teststring
2731       done
2732       SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
2733       # If test is not a shell built-in, we'll probably end up computing a
2734       # maximum length that is only half of the actual maximum length, but
2735       # we can't tell.
2736       while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
2737                  = "X$teststring$teststring"; } >/dev/null 2>&1 &&
2738               test $i != 17 # 1/2 MB should be enough
2739       do
2740         i=`expr $i + 1`
2741         teststring=$teststring$teststring
2742       done
2743       # Only check the string length outside the loop.
2744       lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
2745       teststring=
2746       # Add a significant safety factor because C++ compilers can tack on
2747       # massive amounts of additional arguments before passing them to the
2748       # linker.  It appears as though 1/2 is a usable value.
2749       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
2750     fi
2751     ;;
2752   esac
2753 ])
2754 if test -n $lt_cv_sys_max_cmd_len ; then
2755   AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
2756 else
2757   AC_MSG_RESULT(none)
2758 fi
2759 max_cmd_len=$lt_cv_sys_max_cmd_len
2760 _LT_DECL([], [max_cmd_len], [0],
2761     [What is the maximum length of a command?])
2762 ])# LT_CMD_MAX_LEN
2763
2764 # Old name:
2765 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
2766 dnl aclocal-1.4 backwards compatibility:
2767 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
2768
2769
2770 # _LT_HEADER_DLFCN
2771 # ----------------
2772 m4_defun([_LT_HEADER_DLFCN],
2773 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
2774 ])# _LT_HEADER_DLFCN
2775
2776
2777 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
2778 #                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
2779 # ----------------------------------------------------------------
2780 m4_defun([_LT_TRY_DLOPEN_SELF],
2781 [m4_require([_LT_HEADER_DLFCN])dnl
2782 if test "$cross_compiling" = yes; then :
2783   [$4]
2784 else
2785   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2786   lt_status=$lt_dlunknown
2787   cat > conftest.$ac_ext <<_LT_EOF
2788 [#line $LINENO "configure"
2789 #include "confdefs.h"
2790
2791 #if HAVE_DLFCN_H
2792 #include <dlfcn.h>
2793 #endif
2794
2795 #include <stdio.h>
2796
2797 #ifdef RTLD_GLOBAL
2798 #  define LT_DLGLOBAL           RTLD_GLOBAL
2799 #else
2800 #  ifdef DL_GLOBAL
2801 #    define LT_DLGLOBAL         DL_GLOBAL
2802 #  else
2803 #    define LT_DLGLOBAL         0
2804 #  endif
2805 #endif
2806
2807 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
2808    find out it does not work in some platform. */
2809 #ifndef LT_DLLAZY_OR_NOW
2810 #  ifdef RTLD_LAZY
2811 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
2812 #  else
2813 #    ifdef DL_LAZY
2814 #      define LT_DLLAZY_OR_NOW          DL_LAZY
2815 #    else
2816 #      ifdef RTLD_NOW
2817 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
2818 #      else
2819 #        ifdef DL_NOW
2820 #          define LT_DLLAZY_OR_NOW      DL_NOW
2821 #        else
2822 #          define LT_DLLAZY_OR_NOW      0
2823 #        endif
2824 #      endif
2825 #    endif
2826 #  endif
2827 #endif
2828
2829 /* When -fvisbility=hidden is used, assume the code has been annotated
2830    correspondingly for the symbols needed.  */
2831 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
2832 int fnord () __attribute__((visibility("default")));
2833 #endif
2834
2835 int fnord () { return 42; }
2836 int main ()
2837 {
2838   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
2839   int status = $lt_dlunknown;
2840
2841   if (self)
2842     {
2843       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
2844       else
2845         {
2846           if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
2847           else puts (dlerror ());
2848         }
2849       /* dlclose (self); */
2850     }
2851   else
2852     puts (dlerror ());
2853
2854   return status;
2855 }]
2856 _LT_EOF
2857   if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
2858     (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
2859     lt_status=$?
2860     case x$lt_status in
2861       x$lt_dlno_uscore) $1 ;;
2862       x$lt_dlneed_uscore) $2 ;;
2863       x$lt_dlunknown|x*) $3 ;;
2864     esac
2865   else :
2866     # compilation failed
2867     $3
2868   fi
2869 fi
2870 rm -fr conftest*
2871 ])# _LT_TRY_DLOPEN_SELF
2872
2873
2874 # LT_SYS_DLOPEN_SELF
2875 # ------------------
2876 AC_DEFUN([LT_SYS_DLOPEN_SELF],
2877 [m4_require([_LT_HEADER_DLFCN])dnl
2878 if test "x$enable_dlopen" != xyes; then
2879   enable_dlopen=unknown
2880   enable_dlopen_self=unknown
2881   enable_dlopen_self_static=unknown
2882 else
2883   lt_cv_dlopen=no
2884   lt_cv_dlopen_libs=
2885
2886   case $host_os in
2887   beos*)
2888     lt_cv_dlopen="load_add_on"
2889     lt_cv_dlopen_libs=
2890     lt_cv_dlopen_self=yes
2891     ;;
2892
2893   mingw* | pw32* | cegcc*)
2894     lt_cv_dlopen="LoadLibrary"
2895     lt_cv_dlopen_libs=
2896     ;;
2897
2898   cygwin*)
2899     lt_cv_dlopen="dlopen"
2900     lt_cv_dlopen_libs=
2901     ;;
2902
2903   darwin*)
2904   # if libdl is installed we need to link against it
2905     AC_CHECK_LIB([dl], [dlopen],
2906                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
2907     lt_cv_dlopen="dyld"
2908     lt_cv_dlopen_libs=
2909     lt_cv_dlopen_self=yes
2910     ])
2911     ;;
2912
2913   *)
2914     AC_CHECK_FUNC([shl_load],
2915           [lt_cv_dlopen="shl_load"],
2916       [AC_CHECK_LIB([dld], [shl_load],
2917             [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
2918         [AC_CHECK_FUNC([dlopen],
2919               [lt_cv_dlopen="dlopen"],
2920           [AC_CHECK_LIB([dl], [dlopen],
2921                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
2922             [AC_CHECK_LIB([svld], [dlopen],
2923                   [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
2924               [AC_CHECK_LIB([dld], [dld_link],
2925                     [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
2926               ])
2927             ])
2928           ])
2929         ])
2930       ])
2931     ;;
2932   esac
2933
2934   if test "x$lt_cv_dlopen" != xno; then
2935     enable_dlopen=yes
2936   else
2937     enable_dlopen=no
2938   fi
2939
2940   case $lt_cv_dlopen in
2941   dlopen)
2942     save_CPPFLAGS="$CPPFLAGS"
2943     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2944
2945     save_LDFLAGS="$LDFLAGS"
2946     wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2947
2948     save_LIBS="$LIBS"
2949     LIBS="$lt_cv_dlopen_libs $LIBS"
2950
2951     AC_CACHE_CHECK([whether a program can dlopen itself],
2952           lt_cv_dlopen_self, [dnl
2953           _LT_TRY_DLOPEN_SELF(
2954             lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2955             lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2956     ])
2957
2958     if test "x$lt_cv_dlopen_self" = xyes; then
2959       wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2960       AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2961           lt_cv_dlopen_self_static, [dnl
2962           _LT_TRY_DLOPEN_SELF(
2963             lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2964             lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
2965       ])
2966     fi
2967
2968     CPPFLAGS="$save_CPPFLAGS"
2969     LDFLAGS="$save_LDFLAGS"
2970     LIBS="$save_LIBS"
2971     ;;
2972   esac
2973
2974   case $lt_cv_dlopen_self in
2975   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2976   *) enable_dlopen_self=unknown ;;
2977   esac
2978
2979   case $lt_cv_dlopen_self_static in
2980   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2981   *) enable_dlopen_self_static=unknown ;;
2982   esac
2983 fi
2984 _LT_DECL([dlopen_support], [enable_dlopen], [0],
2985          [Whether dlopen is supported])
2986 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
2987          [Whether dlopen of programs is supported])
2988 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
2989          [Whether dlopen of statically linked programs is supported])
2990 ])# LT_SYS_DLOPEN_SELF
2991
2992 # Old name:
2993 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
2994 dnl aclocal-1.4 backwards compatibility:
2995 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
2996
2997
2998 # _LT_COMPILER_C_O([TAGNAME])
2999 # ---------------------------
3000 # Check to see if options -c and -o are simultaneously supported by compiler.
3001 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
3002 m4_defun([_LT_COMPILER_C_O],
3003 [m4_require([_LT_DECL_SED])dnl
3004 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3005 m4_require([_LT_TAG_COMPILER])dnl
3006 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
3007   [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
3008   [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
3009    $RM -r conftest 2>/dev/null
3010    mkdir conftest
3011    cd conftest
3012    mkdir out
3013    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
3014
3015    lt_compiler_flag="-o out/conftest2.$ac_objext"
3016    # Insert the option either (1) after the last *FLAGS variable, or
3017    # (2) before a word containing "conftest.", or (3) at the end.
3018    # Note that $ac_compile itself does not contain backslashes and begins
3019    # with a dollar sign (not a hyphen), so the echo should work correctly.
3020    lt_compile=`echo "$ac_compile" | $SED \
3021    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
3022    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
3023    -e 's:$: $lt_compiler_flag:'`
3024    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
3025    (eval "$lt_compile" 2>out/conftest.err)
3026    ac_status=$?
3027    cat out/conftest.err >&AS_MESSAGE_LOG_FD
3028    echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
3029    if (exit $ac_status) && test -s out/conftest2.$ac_objext
3030    then
3031      # The compiler can only warn and ignore the option if not recognized
3032      # So say no if there are warnings
3033      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
3034      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
3035      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
3036        _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
3037      fi
3038    fi
3039    chmod u+w . 2>&AS_MESSAGE_LOG_FD
3040    $RM conftest*
3041    # SGI C++ compiler will create directory out/ii_files/ for
3042    # template instantiation
3043    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
3044    $RM out/* && rmdir out
3045    cd ..
3046    $RM -r conftest
3047    $RM conftest*
3048 ])
3049 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
3050         [Does compiler simultaneously support -c and -o options?])
3051 ])# _LT_COMPILER_C_O
3052
3053
3054 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
3055 # ----------------------------------
3056 # Check to see if we can do hard links to lock some files if needed
3057 m4_defun([_LT_COMPILER_FILE_LOCKS],
3058 [m4_require([_LT_ENABLE_LOCK])dnl
3059 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3060 _LT_COMPILER_C_O([$1])
3061
3062 hard_links="nottested"
3063 if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
3064   # do not overwrite the value of need_locks provided by the user
3065   AC_MSG_CHECKING([if we can lock with hard links])
3066   hard_links=yes
3067   $RM conftest*
3068   ln conftest.a conftest.b 2>/dev/null && hard_links=no
3069   touch conftest.a
3070   ln conftest.a conftest.b 2>&5 || hard_links=no
3071   ln conftest.a conftest.b 2>/dev/null && hard_links=no
3072   AC_MSG_RESULT([$hard_links])
3073   if test "$hard_links" = no; then
3074     AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
3075     need_locks=warn
3076   fi
3077 else
3078   need_locks=no
3079 fi
3080 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
3081 ])# _LT_COMPILER_FILE_LOCKS
3082
3083
3084 # _LT_CHECK_OBJDIR
3085 # ----------------
3086 m4_defun([_LT_CHECK_OBJDIR],
3087 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
3088 [rm -f .libs 2>/dev/null
3089 mkdir .libs 2>/dev/null
3090 if test -d .libs; then
3091   lt_cv_objdir=.libs
3092 else
3093   # MS-DOS does not allow filenames that begin with a dot.
3094   lt_cv_objdir=_libs
3095 fi
3096 rmdir .libs 2>/dev/null])
3097 objdir=$lt_cv_objdir
3098 _LT_DECL([], [objdir], [0],
3099          [The name of the directory that contains temporary libtool files])dnl
3100 m4_pattern_allow([LT_OBJDIR])dnl
3101 AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
3102   [Define to the sub-directory in which libtool stores uninstalled libraries.])
3103 ])# _LT_CHECK_OBJDIR
3104
3105
3106 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
3107 # --------------------------------------
3108 # Check hardcoding attributes.
3109 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
3110 [AC_MSG_CHECKING([how to hardcode library paths into programs])
3111 _LT_TAGVAR(hardcode_action, $1)=
3112 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
3113    test -n "$_LT_TAGVAR(runpath_var, $1)" ||
3114    test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
3115
3116   # We can hardcode non-existent directories.
3117   if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
3118      # If the only mechanism to avoid hardcoding is shlibpath_var, we
3119      # have to relink, otherwise we might link with an installed library
3120      # when we should be linking with a yet-to-be-installed one
3121      ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
3122      test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
3123     # Linking always hardcodes the temporary library directory.
3124     _LT_TAGVAR(hardcode_action, $1)=relink
3125   else
3126     # We can link without hardcoding, and we can hardcode nonexisting dirs.
3127     _LT_TAGVAR(hardcode_action, $1)=immediate
3128   fi
3129 else
3130   # We cannot hardcode anything, or else we can only hardcode existing
3131   # directories.
3132   _LT_TAGVAR(hardcode_action, $1)=unsupported
3133 fi
3134 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
3135
3136 if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
3137    test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
3138   # Fast installation is not supported
3139   enable_fast_install=no
3140 elif test "$shlibpath_overrides_runpath" = yes ||
3141      test "$enable_shared" = no; then
3142   # Fast installation is not necessary
3143   enable_fast_install=needless
3144 fi
3145 _LT_TAGDECL([], [hardcode_action], [0],
3146     [How to hardcode a shared library path into an executable])
3147 ])# _LT_LINKER_HARDCODE_LIBPATH
3148
3149
3150 # _LT_CMD_STRIPLIB
3151 # ----------------
3152 m4_defun([_LT_CMD_STRIPLIB],
3153 [m4_require([_LT_DECL_EGREP])
3154 striplib=
3155 old_striplib=
3156 AC_MSG_CHECKING([whether stripping libraries is possible])
3157 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
3158   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
3159   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
3160   AC_MSG_RESULT([yes])
3161 else
3162 # FIXME - insert some real tests, host_os isn't really good enough
3163   case $host_os in
3164   darwin*)
3165     if test -n "$STRIP" ; then
3166       striplib="$STRIP -x"
3167       old_striplib="$STRIP -S"
3168       AC_MSG_RESULT([yes])
3169     else
3170       AC_MSG_RESULT([no])
3171     fi
3172     ;;
3173   *)
3174     AC_MSG_RESULT([no])
3175     ;;
3176   esac
3177 fi
3178 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
3179 _LT_DECL([], [striplib], [1])
3180 ])# _LT_CMD_STRIPLIB
3181
3182
3183 # _LT_SYS_DYNAMIC_LINKER([TAG])
3184 # -----------------------------
3185 # PORTME Fill in your ld.so characteristics
3186 m4_defun([_LT_SYS_DYNAMIC_LINKER],
3187 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3188 m4_require([_LT_DECL_EGREP])dnl
3189 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3190 m4_require([_LT_DECL_OBJDUMP])dnl
3191 m4_require([_LT_DECL_SED])dnl
3192 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
3193 AC_MSG_CHECKING([dynamic linker characteristics])
3194 m4_if([$1],
3195         [], [
3196 if test "$GCC" = yes; then
3197   case $host_os in
3198     darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
3199     *) lt_awk_arg="/^libraries:/" ;;
3200   esac
3201   case $host_os in
3202     mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
3203     *) lt_sed_strip_eq="s,=/,/,g" ;;
3204   esac
3205   lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
3206   case $lt_search_path_spec in
3207   *\;*)
3208     # if the path contains ";" then we assume it to be the separator
3209     # otherwise default to the standard path separator (i.e. ":") - it is
3210     # assumed that no part of a normal pathname contains ";" but that should
3211     # okay in the real world where ";" in dirpaths is itself problematic.
3212     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
3213     ;;
3214   *)
3215     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
3216     ;;
3217   esac
3218   # Ok, now we have the path, separated by spaces, we can step through it
3219   # and add multilib dir if necessary.
3220   lt_tmp_lt_search_path_spec=
3221   lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
3222   for lt_sys_path in $lt_search_path_spec; do
3223     if test -d "$lt_sys_path/$lt_multi_os_dir"; then
3224       lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
3225     else
3226       test -d "$lt_sys_path" && \
3227         lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
3228     fi
3229   done
3230   lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
3231 BEGIN {RS=" "; FS="/|\n";} {
3232   lt_foo="";
3233   lt_count=0;
3234   for (lt_i = NF; lt_i > 0; lt_i--) {
3235     if ($lt_i != "" && $lt_i != ".") {
3236       if ($lt_i == "..") {
3237         lt_count++;
3238       } else {
3239         if (lt_count == 0) {
3240           lt_foo="/" $lt_i lt_foo;
3241         } else {
3242           lt_count--;
3243         }
3244       }
3245     }
3246   }
3247   if (lt_foo != "") { lt_freq[[lt_foo]]++; }
3248   if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
3249 }'`
3250   # AWK program above erroneously prepends '/' to C:/dos/paths
3251   # for these hosts.
3252   case $host_os in
3253     mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
3254       $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
3255   esac
3256   sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
3257 else
3258   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
3259 fi])
3260 library_names_spec=
3261 libname_spec='lib$name'
3262 soname_spec=
3263 shrext_cmds=".so"
3264 postinstall_cmds=
3265 postuninstall_cmds=
3266 finish_cmds=
3267 finish_eval=
3268 shlibpath_var=
3269 shlibpath_overrides_runpath=unknown
3270 version_type=none
3271 dynamic_linker="$host_os ld.so"
3272 sys_lib_dlsearch_path_spec="/lib /usr/lib"
3273 need_lib_prefix=unknown
3274 hardcode_into_libs=no
3275
3276 # when you set need_version to no, make sure it does not cause -set_version
3277 # flags to be left without arguments
3278 need_version=unknown
3279
3280 case $host_os in
3281 aix3*)
3282   version_type=linux # correct to gnu/linux during the next big refactor
3283   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
3284   shlibpath_var=LIBPATH
3285
3286   # AIX 3 has no versioning support, so we append a major version to the name.
3287   soname_spec='${libname}${release}${shared_ext}$major'
3288   ;;
3289
3290 aix[[4-9]]*)
3291   version_type=linux # correct to gnu/linux during the next big refactor
3292   need_lib_prefix=no
3293   need_version=no
3294   hardcode_into_libs=yes
3295   if test "$host_cpu" = ia64; then
3296     # AIX 5 supports IA64
3297     library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
3298     shlibpath_var=LD_LIBRARY_PATH
3299   else
3300     # With GCC up to 2.95.x, collect2 would create an import file
3301     # for dependence libraries.  The import file would start with
3302     # the line `#! .'.  This would cause the generated library to
3303     # depend on `.', always an invalid library.  This was fixed in
3304     # development snapshots of GCC prior to 3.0.
3305     case $host_os in
3306       aix4 | aix4.[[01]] | aix4.[[01]].*)
3307       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
3308            echo ' yes '
3309            echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
3310         :
3311       else
3312         can_build_shared=no
3313       fi
3314       ;;
3315     esac
3316     # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
3317     # soname into executable. Probably we can add versioning support to
3318     # collect2, so additional links can be useful in future.
3319     if test "$aix_use_runtimelinking" = yes; then
3320       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
3321       # instead of lib<name>.a to let people know that these are not
3322       # typical AIX shared libraries.
3323       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3324     else
3325       # We preserve .a as extension for shared libraries through AIX4.2
3326       # and later when we are not doing run time linking.
3327       library_names_spec='${libname}${release}.a $libname.a'
3328       soname_spec='${libname}${release}${shared_ext}$major'
3329     fi
3330     shlibpath_var=LIBPATH
3331   fi
3332   ;;
3333
3334 amigaos*)
3335   case $host_cpu in
3336   powerpc)
3337     # Since July 2007 AmigaOS4 officially supports .so libraries.
3338     # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
3339     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3340     ;;
3341   m68k)
3342     library_names_spec='$libname.ixlibrary $libname.a'
3343     # Create ${libname}_ixlibrary.a entries in /sys/libs.
3344     finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''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'
3345     ;;
3346   esac
3347   ;;
3348
3349 beos*)
3350   library_names_spec='${libname}${shared_ext}'
3351   dynamic_linker="$host_os ld.so"
3352   shlibpath_var=LIBRARY_PATH
3353   ;;
3354
3355 bsdi[[45]]*)
3356   version_type=linux # correct to gnu/linux during the next big refactor
3357   need_version=no
3358   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3359   soname_spec='${libname}${release}${shared_ext}$major'
3360   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
3361   shlibpath_var=LD_LIBRARY_PATH
3362   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
3363   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
3364   # the default ld.so.conf also contains /usr/contrib/lib and
3365   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
3366   # libtool to hard-code these into programs
3367   ;;
3368
3369 cygwin* | mingw* | pw32* | cegcc*)
3370   version_type=windows
3371   shrext_cmds=".dll"
3372   need_version=no
3373   need_lib_prefix=no
3374
3375   case $GCC,$cc_basename in
3376   yes,*)
3377     # gcc
3378     library_names_spec='$libname.dll.a'
3379     # DLL is installed to $(libdir)/../bin by postinstall_cmds
3380     postinstall_cmds='base_file=`basename \${file}`~
3381       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
3382       dldir=$destdir/`dirname \$dlpath`~
3383       test -d \$dldir || mkdir -p \$dldir~
3384       $install_prog $dir/$dlname \$dldir/$dlname~
3385       chmod a+x \$dldir/$dlname~
3386       if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
3387         eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
3388       fi'
3389     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3390       dlpath=$dir/\$dldll~
3391        $RM \$dlpath'
3392     shlibpath_overrides_runpath=yes
3393
3394     case $host_os in
3395     cygwin*)
3396       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
3397       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3398 m4_if([$1], [],[
3399       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
3400       ;;
3401     mingw* | cegcc*)
3402       # MinGW DLLs use traditional 'lib' prefix
3403       soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3404       ;;
3405     pw32*)
3406       # pw32 DLLs use 'pw' prefix rather than 'lib'
3407       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3408       ;;
3409     esac
3410     dynamic_linker='Win32 ld.exe'
3411     ;;
3412
3413   *,cl*)
3414     # Native MSVC
3415     libname_spec='$name'
3416     soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3417     library_names_spec='${libname}.dll.lib'
3418
3419     case $build_os in
3420     mingw*)
3421       sys_lib_search_path_spec=
3422       lt_save_ifs=$IFS
3423       IFS=';'
3424       for lt_path in $LIB
3425       do
3426         IFS=$lt_save_ifs
3427         # Let DOS variable expansion print the short 8.3 style file name.
3428         lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
3429         sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
3430       done
3431       IFS=$lt_save_ifs
3432       # Convert to MSYS style.
3433       sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
3434       ;;
3435     cygwin*)
3436       # Convert to unix form, then to dos form, then back to unix form
3437       # but this time dos style (no spaces!) so that the unix form looks
3438       # like /cygdrive/c/PROGRA~1:/cygdr...
3439       sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
3440       sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
3441       sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3442       ;;
3443     *)
3444       sys_lib_search_path_spec="$LIB"
3445       if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
3446         # It is most probably a Windows format PATH.
3447         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
3448       else
3449         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3450       fi
3451       # FIXME: find the short name or the path components, as spaces are
3452       # common. (e.g. "Program Files" -> "PROGRA~1")
3453       ;;
3454     esac
3455
3456     # DLL is installed to $(libdir)/../bin by postinstall_cmds
3457     postinstall_cmds='base_file=`basename \${file}`~
3458       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
3459       dldir=$destdir/`dirname \$dlpath`~
3460       test -d \$dldir || mkdir -p \$dldir~
3461       $install_prog $dir/$dlname \$dldir/$dlname'
3462     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3463       dlpath=$dir/\$dldll~
3464        $RM \$dlpath'
3465     shlibpath_overrides_runpath=yes
3466     dynamic_linker='Win32 link.exe'
3467     ;;
3468
3469   *)
3470     # Assume MSVC wrapper
3471     library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
3472     dynamic_linker='Win32 ld.exe'
3473     ;;
3474   esac
3475   # FIXME: first we should search . and the directory the executable is in
3476   shlibpath_var=PATH
3477   ;;
3478
3479 darwin* | rhapsody*)
3480   dynamic_linker="$host_os dyld"
3481   version_type=darwin
3482   need_lib_prefix=no
3483   need_version=no
3484   library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
3485   soname_spec='${libname}${release}${major}$shared_ext'
3486   shlibpath_overrides_runpath=yes
3487   shlibpath_var=DYLD_LIBRARY_PATH
3488   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
3489 m4_if([$1], [],[
3490   sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
3491   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
3492   ;;
3493
3494 dgux*)
3495   version_type=linux # correct to gnu/linux during the next big refactor
3496   need_lib_prefix=no
3497   need_version=no
3498   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
3499   soname_spec='${libname}${release}${shared_ext}$major'
3500   shlibpath_var=LD_LIBRARY_PATH
3501   ;;
3502
3503 freebsd* | dragonfly*)
3504   # DragonFly does not have aout.  When/if they implement a new
3505   # versioning mechanism, adjust this.
3506   if test -x /usr/bin/objformat; then
3507     objformat=`/usr/bin/objformat`
3508   else
3509     case $host_os in
3510     freebsd[[23]].*) objformat=aout ;;
3511     *) objformat=elf ;;
3512     esac
3513   fi
3514   version_type=freebsd-$objformat
3515   case $version_type in
3516     freebsd-elf*)
3517       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3518       need_version=no
3519       need_lib_prefix=no
3520       ;;
3521     freebsd-*)
3522       library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
3523       need_version=yes
3524       ;;
3525   esac
3526   shlibpath_var=LD_LIBRARY_PATH
3527   case $host_os in
3528   freebsd2.*)
3529     shlibpath_overrides_runpath=yes
3530     ;;
3531   freebsd3.[[01]]* | freebsdelf3.[[01]]*)
3532     shlibpath_overrides_runpath=yes
3533     hardcode_into_libs=yes
3534     ;;
3535   freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
3536   freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
3537     shlibpath_overrides_runpath=no
3538     hardcode_into_libs=yes
3539     ;;
3540   *) # from 4.6 on, and DragonFly
3541     shlibpath_overrides_runpath=yes
3542     hardcode_into_libs=yes
3543     ;;
3544   esac
3545   ;;
3546
3547 gnu*)
3548   version_type=linux # correct to gnu/linux during the next big refactor
3549   need_lib_prefix=no
3550   need_version=no
3551   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
3552   soname_spec='${libname}${release}${shared_ext}$major'
3553   shlibpath_var=LD_LIBRARY_PATH
3554   shlibpath_overrides_runpath=no
3555   hardcode_into_libs=yes
3556   ;;
3557
3558 haiku*)
3559   version_type=linux # correct to gnu/linux during the next big refactor
3560   need_lib_prefix=no
3561   need_version=no
3562   dynamic_linker="$host_os runtime_loader"
3563   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
3564   soname_spec='${libname}${release}${shared_ext}$major'
3565   shlibpath_var=LIBRARY_PATH
3566   shlibpath_overrides_runpath=yes
3567   sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
3568   hardcode_into_libs=yes
3569   ;;
3570
3571 hpux9* | hpux10* | hpux11*)
3572   # Give a soname corresponding to the major version so that dld.sl refuses to
3573   # link against other versions.
3574   version_type=sunos
3575   need_lib_prefix=no
3576   need_version=no
3577   case $host_cpu in
3578   ia64*)
3579     shrext_cmds='.so'
3580     hardcode_into_libs=yes
3581     dynamic_linker="$host_os dld.so"
3582     shlibpath_var=LD_LIBRARY_PATH
3583     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3584     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3585     soname_spec='${libname}${release}${shared_ext}$major'
3586     if test "X$HPUX_IA64_MODE" = X32; then
3587       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
3588     else
3589       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
3590     fi
3591     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3592     ;;
3593   hppa*64*)
3594     shrext_cmds='.sl'
3595     hardcode_into_libs=yes
3596     dynamic_linker="$host_os dld.sl"
3597     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
3598     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3599     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3600     soname_spec='${libname}${release}${shared_ext}$major'
3601     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
3602     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3603     ;;
3604   *)
3605     shrext_cmds='.sl'
3606     dynamic_linker="$host_os dld.sl"
3607     shlibpath_var=SHLIB_PATH
3608     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
3609     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3610     soname_spec='${libname}${release}${shared_ext}$major'
3611     ;;
3612   esac
3613   # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
3614   postinstall_cmds='chmod 555 $lib'
3615   # or fails outright, so override atomically:
3616   install_override_mode=555
3617   ;;
3618
3619 interix[[3-9]]*)
3620   version_type=linux # correct to gnu/linux during the next big refactor
3621   need_lib_prefix=no
3622   need_version=no
3623   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3624   soname_spec='${libname}${release}${shared_ext}$major'
3625   dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
3626   shlibpath_var=LD_LIBRARY_PATH
3627   shlibpath_overrides_runpath=no
3628   hardcode_into_libs=yes
3629   ;;
3630
3631 irix5* | irix6* | nonstopux*)
3632   case $host_os in
3633     nonstopux*) version_type=nonstopux ;;
3634     *)
3635         if test "$lt_cv_prog_gnu_ld" = yes; then
3636                 version_type=linux # correct to gnu/linux during the next big refactor
3637         else
3638                 version_type=irix
3639         fi ;;
3640   esac
3641   need_lib_prefix=no
3642   need_version=no
3643   soname_spec='${libname}${release}${shared_ext}$major'
3644   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
3645   case $host_os in
3646   irix5* | nonstopux*)
3647     libsuff= shlibsuff=
3648     ;;
3649   *)
3650     case $LD in # libtool.m4 will add one of these switches to LD
3651     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
3652       libsuff= shlibsuff= libmagic=32-bit;;
3653     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
3654       libsuff=32 shlibsuff=N32 libmagic=N32;;
3655     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
3656       libsuff=64 shlibsuff=64 libmagic=64-bit;;
3657     *) libsuff= shlibsuff= libmagic=never-match;;
3658     esac
3659     ;;
3660   esac
3661   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
3662   shlibpath_overrides_runpath=no
3663   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
3664   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
3665   hardcode_into_libs=yes
3666   ;;
3667
3668 # No shared lib support for Linux oldld, aout, or coff.
3669 linux*oldld* | linux*aout* | linux*coff*)
3670   dynamic_linker=no
3671   ;;
3672
3673 # This must be glibc/ELF.
3674 linux* | k*bsd*-gnu | kopensolaris*-gnu)
3675   version_type=linux # correct to gnu/linux during the next big refactor
3676   need_lib_prefix=no
3677   need_version=no
3678   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3679   soname_spec='${libname}${release}${shared_ext}$major'
3680   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
3681   shlibpath_var=LD_LIBRARY_PATH
3682   shlibpath_overrides_runpath=no
3683
3684   # Some binutils ld are patched to set DT_RUNPATH
3685   AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
3686     [lt_cv_shlibpath_overrides_runpath=no
3687     save_LDFLAGS=$LDFLAGS
3688     save_libdir=$libdir
3689     eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
3690          LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
3691     AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
3692       [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
3693          [lt_cv_shlibpath_overrides_runpath=yes])])
3694     LDFLAGS=$save_LDFLAGS
3695     libdir=$save_libdir
3696     ])
3697   shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
3698
3699   # This implies no fast_install, which is unacceptable.
3700   # Some rework will be needed to allow for fast_install
3701   # before this can be enabled.
3702   hardcode_into_libs=yes
3703
3704   # Add ABI-specific directories to the system library path.
3705   sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
3706
3707   # Append ld.so.conf contents to the search path
3708   if test -f /etc/ld.so.conf; then
3709     lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[   ]*hwcap[        ]/d;s/[:,      ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
3710     sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
3711
3712   fi
3713
3714   # We used to test for /lib/ld.so.1 and disable shared libraries on
3715   # powerpc, because MkLinux only supported shared libraries with the
3716   # GNU dynamic linker.  Since this was broken with cross compilers,
3717   # most powerpc-linux boxes support dynamic linking these days and
3718   # people can always --disable-shared, the test was removed, and we
3719   # assume the GNU/Linux dynamic linker is in use.
3720   dynamic_linker='GNU/Linux ld.so'
3721   ;;
3722
3723 netbsd*)
3724   version_type=sunos
3725   need_lib_prefix=no
3726   need_version=no
3727   if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
3728     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3729     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3730     dynamic_linker='NetBSD (a.out) ld.so'
3731   else
3732     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3733     soname_spec='${libname}${release}${shared_ext}$major'
3734     dynamic_linker='NetBSD ld.elf_so'
3735   fi
3736   shlibpath_var=LD_LIBRARY_PATH
3737   shlibpath_overrides_runpath=yes
3738   hardcode_into_libs=yes
3739   ;;
3740
3741 newsos6)
3742   version_type=linux # correct to gnu/linux during the next big refactor
3743   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3744   shlibpath_var=LD_LIBRARY_PATH
3745   shlibpath_overrides_runpath=yes
3746   ;;
3747
3748 *nto* | *qnx*)
3749   version_type=qnx
3750   need_lib_prefix=no
3751   need_version=no
3752   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3753   soname_spec='${libname}${release}${shared_ext}$major'
3754   shlibpath_var=LD_LIBRARY_PATH
3755   shlibpath_overrides_runpath=no
3756   hardcode_into_libs=yes
3757   dynamic_linker='ldqnx.so'
3758   ;;
3759
3760 openbsd*)
3761   version_type=sunos
3762   sys_lib_dlsearch_path_spec="/usr/lib"
3763   need_lib_prefix=no
3764   # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
3765   case $host_os in
3766     openbsd3.3 | openbsd3.3.*)  need_version=yes ;;
3767     *)                          need_version=no  ;;
3768   esac
3769   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3770   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3771   shlibpath_var=LD_LIBRARY_PATH
3772   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3773     case $host_os in
3774       openbsd2.[[89]] | openbsd2.[[89]].*)
3775         shlibpath_overrides_runpath=no
3776         ;;
3777       *)
3778         shlibpath_overrides_runpath=yes
3779         ;;
3780       esac
3781   else
3782     shlibpath_overrides_runpath=yes
3783   fi
3784   ;;
3785
3786 os2*)
3787   libname_spec='$name'
3788   shrext_cmds=".dll"
3789   need_lib_prefix=no
3790   library_names_spec='$libname${shared_ext} $libname.a'
3791   dynamic_linker='OS/2 ld.exe'
3792   shlibpath_var=LIBPATH
3793   ;;
3794
3795 osf3* | osf4* | osf5*)
3796   version_type=osf
3797   need_lib_prefix=no
3798   need_version=no
3799   soname_spec='${libname}${release}${shared_ext}$major'
3800   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3801   shlibpath_var=LD_LIBRARY_PATH
3802   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3803   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
3804   ;;
3805
3806 rdos*)
3807   dynamic_linker=no
3808   ;;
3809
3810 solaris*)
3811   version_type=linux # correct to gnu/linux during the next big refactor
3812   need_lib_prefix=no
3813   need_version=no
3814   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3815   soname_spec='${libname}${release}${shared_ext}$major'
3816   shlibpath_var=LD_LIBRARY_PATH
3817   shlibpath_overrides_runpath=yes
3818   hardcode_into_libs=yes
3819   # ldd complains unless libraries are executable
3820   postinstall_cmds='chmod +x $lib'
3821   ;;
3822
3823 sunos4*)
3824   version_type=sunos
3825   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3826   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3827   shlibpath_var=LD_LIBRARY_PATH
3828   shlibpath_overrides_runpath=yes
3829   if test "$with_gnu_ld" = yes; then
3830     need_lib_prefix=no
3831   fi
3832   need_version=yes
3833   ;;
3834
3835 sysv4 | sysv4.3*)
3836   version_type=linux # correct to gnu/linux during the next big refactor
3837   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3838   soname_spec='${libname}${release}${shared_ext}$major'
3839   shlibpath_var=LD_LIBRARY_PATH
3840   case $host_vendor in
3841     sni)
3842       shlibpath_overrides_runpath=no
3843       need_lib_prefix=no
3844       runpath_var=LD_RUN_PATH
3845       ;;
3846     siemens)
3847       need_lib_prefix=no
3848       ;;
3849     motorola)
3850       need_lib_prefix=no
3851       need_version=no
3852       shlibpath_overrides_runpath=no
3853       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3854       ;;
3855   esac
3856   ;;
3857
3858 sysv4*MP*)
3859   if test -d /usr/nec ;then
3860     version_type=linux # correct to gnu/linux during the next big refactor
3861     library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
3862     soname_spec='$libname${shared_ext}.$major'
3863     shlibpath_var=LD_LIBRARY_PATH
3864   fi
3865   ;;
3866
3867 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3868   version_type=freebsd-elf
3869   need_lib_prefix=no
3870   need_version=no
3871   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3872   soname_spec='${libname}${release}${shared_ext}$major'
3873   shlibpath_var=LD_LIBRARY_PATH
3874   shlibpath_overrides_runpath=yes
3875   hardcode_into_libs=yes
3876   if test "$with_gnu_ld" = yes; then
3877     sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
3878   else
3879     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
3880     case $host_os in
3881       sco3.2v5*)
3882         sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
3883         ;;
3884     esac
3885   fi
3886   sys_lib_dlsearch_path_spec='/usr/lib'
3887   ;;
3888
3889 tpf*)
3890   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
3891   version_type=linux # correct to gnu/linux during the next big refactor
3892   need_lib_prefix=no
3893   need_version=no
3894   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3895   shlibpath_var=LD_LIBRARY_PATH
3896   shlibpath_overrides_runpath=no
3897   hardcode_into_libs=yes
3898   ;;
3899
3900 uts4*)
3901   version_type=linux # correct to gnu/linux during the next big refactor
3902   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3903   soname_spec='${libname}${release}${shared_ext}$major'
3904   shlibpath_var=LD_LIBRARY_PATH
3905   ;;
3906
3907 *)
3908   dynamic_linker=no
3909   ;;
3910 esac
3911 AC_MSG_RESULT([$dynamic_linker])
3912 test "$dynamic_linker" = no && can_build_shared=no
3913
3914 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3915 if test "$GCC" = yes; then
3916   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3917 fi
3918
3919 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
3920   sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
3921 fi
3922 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
3923   sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
3924 fi
3925
3926 _LT_DECL([], [variables_saved_for_relink], [1],
3927     [Variables whose values should be saved in libtool wrapper scripts and
3928     restored at link time])
3929 _LT_DECL([], [need_lib_prefix], [0],
3930     [Do we need the "lib" prefix for modules?])
3931 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
3932 _LT_DECL([], [version_type], [0], [Library versioning type])
3933 _LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
3934 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
3935 _LT_DECL([], [shlibpath_overrides_runpath], [0],
3936     [Is shlibpath searched before the hard-coded library search path?])
3937 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
3938 _LT_DECL([], [library_names_spec], [1],
3939     [[List of archive names.  First name is the real one, the rest are links.
3940     The last name is the one that the linker finds with -lNAME]])
3941 _LT_DECL([], [soname_spec], [1],
3942     [[The coded name of the library, if different from the real name]])
3943 _LT_DECL([], [install_override_mode], [1],
3944     [Permission mode override for installation of shared libraries])
3945 _LT_DECL([], [postinstall_cmds], [2],
3946     [Command to use after installation of a shared archive])
3947 _LT_DECL([], [postuninstall_cmds], [2],
3948     [Command to use after uninstallation of a shared archive])
3949 _LT_DECL([], [finish_cmds], [2],
3950     [Commands used to finish a libtool library installation in a directory])
3951 _LT_DECL([], [finish_eval], [1],
3952     [[As "finish_cmds", except a single script fragment to be evaled but
3953     not shown]])
3954 _LT_DECL([], [hardcode_into_libs], [0],
3955     [Whether we should hardcode library paths into libraries])
3956 _LT_DECL([], [sys_lib_search_path_spec], [2],
3957     [Compile-time system search path for libraries])
3958 _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
3959     [Run-time system search path for libraries])
3960 ])# _LT_SYS_DYNAMIC_LINKER
3961
3962
3963 # _LT_PATH_TOOL_PREFIX(TOOL)
3964 # --------------------------
3965 # find a file program which can recognize shared library
3966 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
3967 [m4_require([_LT_DECL_EGREP])dnl
3968 AC_MSG_CHECKING([for $1])
3969 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3970 [case $MAGIC_CMD in
3971 [[\\/*] |  ?:[\\/]*])
3972   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3973   ;;
3974 *)
3975   lt_save_MAGIC_CMD="$MAGIC_CMD"
3976   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3977 dnl $ac_dummy forces splitting on constant user-supplied paths.
3978 dnl POSIX.2 word splitting is done only on the output of word expansions,
3979 dnl not every word.  This closes a longstanding sh security hole.
3980   ac_dummy="m4_if([$2], , $PATH, [$2])"
3981   for ac_dir in $ac_dummy; do
3982     IFS="$lt_save_ifs"
3983     test -z "$ac_dir" && ac_dir=.
3984     if test -f $ac_dir/$1; then
3985       lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3986       if test -n "$file_magic_test_file"; then
3987         case $deplibs_check_method in
3988         "file_magic "*)
3989           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3990           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3991           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3992             $EGREP "$file_magic_regex" > /dev/null; then
3993             :
3994           else
3995             cat <<_LT_EOF 1>&2
3996
3997 *** Warning: the command libtool uses to detect shared libraries,
3998 *** $file_magic_cmd, produces output that libtool cannot recognize.
3999 *** The result is that libtool may fail to recognize shared libraries
4000 *** as such.  This will affect the creation of libtool libraries that
4001 *** depend on shared libraries, but programs linked with such libtool
4002 *** libraries will work regardless of this problem.  Nevertheless, you
4003 *** may want to report the problem to your system manager and/or to
4004 *** bug-libtool@gnu.org
4005
4006 _LT_EOF
4007           fi ;;
4008         esac
4009       fi
4010       break
4011     fi
4012   done
4013   IFS="$lt_save_ifs"
4014   MAGIC_CMD="$lt_save_MAGIC_CMD"
4015   ;;
4016 esac])
4017 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4018 if test -n "$MAGIC_CMD"; then
4019   AC_MSG_RESULT($MAGIC_CMD)
4020 else
4021   AC_MSG_RESULT(no)
4022 fi
4023 _LT_DECL([], [MAGIC_CMD], [0],
4024          [Used to examine libraries when file_magic_cmd begins with "file"])dnl
4025 ])# _LT_PATH_TOOL_PREFIX
4026
4027 # Old name:
4028 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
4029 dnl aclocal-1.4 backwards compatibility:
4030 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
4031
4032
4033 # _LT_PATH_MAGIC
4034 # --------------
4035 # find a file program which can recognize a shared library
4036 m4_defun([_LT_PATH_MAGIC],
4037 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
4038 if test -z "$lt_cv_path_MAGIC_CMD"; then
4039   if test -n "$ac_tool_prefix"; then
4040     _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
4041   else
4042     MAGIC_CMD=:
4043   fi
4044 fi
4045 ])# _LT_PATH_MAGIC
4046
4047
4048 # LT_PATH_LD
4049 # ----------
4050 # find the pathname to the GNU or non-GNU linker
4051 AC_DEFUN([LT_PATH_LD],
4052 [AC_REQUIRE([AC_PROG_CC])dnl
4053 AC_REQUIRE([AC_CANONICAL_HOST])dnl
4054 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
4055 m4_require([_LT_DECL_SED])dnl
4056 m4_require([_LT_DECL_EGREP])dnl
4057 m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
4058
4059 AC_ARG_WITH([gnu-ld],
4060     [AS_HELP_STRING([--with-gnu-ld],
4061         [assume the C compiler uses GNU ld @<:@default=no@:>@])],
4062     [test "$withval" = no || with_gnu_ld=yes],
4063     [with_gnu_ld=no])dnl
4064
4065 ac_prog=ld
4066 if test "$GCC" = yes; then
4067   # Check if gcc -print-prog-name=ld gives a path.
4068   AC_MSG_CHECKING([for ld used by $CC])
4069   case $host in
4070   *-*-mingw*)
4071     # gcc leaves a trailing carriage return which upsets mingw
4072     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4073   *)
4074     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4075   esac
4076   case $ac_prog in
4077     # Accept absolute paths.
4078     [[\\/]]* | ?:[[\\/]]*)
4079       re_direlt='/[[^/]][[^/]]*/\.\./'
4080       # Canonicalize the pathname of ld
4081       ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
4082       while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
4083         ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
4084       done
4085       test -z "$LD" && LD="$ac_prog"
4086       ;;
4087   "")
4088     # If it fails, then pretend we aren't using GCC.
4089     ac_prog=ld
4090     ;;
4091   *)
4092     # If it is relative, then search for the first ld in PATH.
4093     with_gnu_ld=unknown
4094     ;;
4095   esac
4096 elif test "$with_gnu_ld" = yes; then
4097   AC_MSG_CHECKING([for GNU ld])
4098 else
4099   AC_MSG_CHECKING([for non-GNU ld])
4100 fi
4101 AC_CACHE_VAL(lt_cv_path_LD,
4102 [if test -z "$LD"; then
4103   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4104   for ac_dir in $PATH; do
4105     IFS="$lt_save_ifs"
4106     test -z "$ac_dir" && ac_dir=.
4107     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4108       lt_cv_path_LD="$ac_dir/$ac_prog"
4109       # Check to see if the program is GNU ld.  I'd rather use --version,
4110       # but apparently some variants of GNU ld only accept -v.
4111       # Break only if it was the GNU/non-GNU ld that we prefer.
4112       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
4113       *GNU* | *'with BFD'*)
4114         test "$with_gnu_ld" != no && break
4115         ;;
4116       *)
4117         test "$with_gnu_ld" != yes && break
4118         ;;
4119       esac
4120     fi
4121   done
4122   IFS="$lt_save_ifs"
4123 else
4124   lt_cv_path_LD="$LD" # Let the user override the test with a path.
4125 fi])
4126 LD="$lt_cv_path_LD"
4127 if test -n "$LD"; then
4128   AC_MSG_RESULT($LD)
4129 else
4130   AC_MSG_RESULT(no)
4131 fi
4132 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
4133 _LT_PATH_LD_GNU
4134 AC_SUBST([LD])
4135
4136 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
4137 ])# LT_PATH_LD
4138
4139 # Old names:
4140 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
4141 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
4142 dnl aclocal-1.4 backwards compatibility:
4143 dnl AC_DEFUN([AM_PROG_LD], [])
4144 dnl AC_DEFUN([AC_PROG_LD], [])
4145
4146
4147 # _LT_PATH_LD_GNU
4148 #- --------------
4149 m4_defun([_LT_PATH_LD_GNU],
4150 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
4151 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
4152 case `$LD -v 2>&1 </dev/null` in
4153 *GNU* | *'with BFD'*)
4154   lt_cv_prog_gnu_ld=yes
4155   ;;
4156 *)
4157   lt_cv_prog_gnu_ld=no
4158   ;;
4159 esac])
4160 with_gnu_ld=$lt_cv_prog_gnu_ld
4161 ])# _LT_PATH_LD_GNU
4162
4163
4164 # _LT_CMD_RELOAD
4165 # --------------
4166 # find reload flag for linker
4167 #   -- PORTME Some linkers may need a different reload flag.
4168 m4_defun([_LT_CMD_RELOAD],
4169 [AC_CACHE_CHECK([for $LD option to reload object files],
4170   lt_cv_ld_reload_flag,
4171   [lt_cv_ld_reload_flag='-r'])
4172 reload_flag=$lt_cv_ld_reload_flag
4173 case $reload_flag in
4174 "" | " "*) ;;
4175 *) reload_flag=" $reload_flag" ;;
4176 esac
4177 reload_cmds='$LD$reload_flag -o $output$reload_objs'
4178 case $host_os in
4179   cygwin* | mingw* | pw32* | cegcc*)
4180     if test "$GCC" != yes; then
4181       reload_cmds=false
4182     fi
4183     ;;
4184   darwin*)
4185     if test "$GCC" = yes; then
4186       reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
4187     else
4188       reload_cmds='$LD$reload_flag -o $output$reload_objs'
4189     fi
4190     ;;
4191 esac
4192 _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
4193 _LT_TAGDECL([], [reload_cmds], [2])dnl
4194 ])# _LT_CMD_RELOAD
4195
4196
4197 # _LT_CHECK_MAGIC_METHOD
4198 # ----------------------
4199 # how to check for library dependencies
4200 #  -- PORTME fill in with the dynamic library characteristics
4201 m4_defun([_LT_CHECK_MAGIC_METHOD],
4202 [m4_require([_LT_DECL_EGREP])
4203 m4_require([_LT_DECL_OBJDUMP])
4204 AC_CACHE_CHECK([how to recognize dependent libraries],
4205 lt_cv_deplibs_check_method,
4206 [lt_cv_file_magic_cmd='$MAGIC_CMD'
4207 lt_cv_file_magic_test_file=
4208 lt_cv_deplibs_check_method='unknown'
4209 # Need to set the preceding variable on all platforms that support
4210 # interlibrary dependencies.
4211 # 'none' -- dependencies not supported.
4212 # `unknown' -- same as none, but documents that we really don't know.
4213 # 'pass_all' -- all dependencies passed with no checks.
4214 # 'test_compile' -- check by making test program.
4215 # 'file_magic [[regex]]' -- check by looking for files in library path
4216 # which responds to the $file_magic_cmd with a given extended regex.
4217 # If you have `file' or equivalent on your system and you're not sure
4218 # whether `pass_all' will *always* work, you probably want this one.
4219
4220 case $host_os in
4221 aix[[4-9]]*)
4222   lt_cv_deplibs_check_method=pass_all
4223   ;;
4224
4225 beos*)
4226   lt_cv_deplibs_check_method=pass_all
4227   ;;
4228
4229 bsdi[[45]]*)
4230   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
4231   lt_cv_file_magic_cmd='/usr/bin/file -L'
4232   lt_cv_file_magic_test_file=/shlib/libc.so
4233   ;;
4234
4235 cygwin*)
4236   # func_win32_libid is a shell function defined in ltmain.sh
4237   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4238   lt_cv_file_magic_cmd='func_win32_libid'
4239   ;;
4240
4241 mingw* | pw32*)
4242   # Base MSYS/MinGW do not provide the 'file' command needed by
4243   # func_win32_libid shell function, so use a weaker test based on 'objdump',
4244   # unless we find 'file', for example because we are cross-compiling.
4245   # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
4246   if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
4247     lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4248     lt_cv_file_magic_cmd='func_win32_libid'
4249   else
4250     # Keep this pattern in sync with the one in func_win32_libid.
4251     lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
4252     lt_cv_file_magic_cmd='$OBJDUMP -f'
4253   fi
4254   ;;
4255
4256 cegcc*)
4257   # use the weaker test based on 'objdump'. See mingw*.
4258   lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
4259   lt_cv_file_magic_cmd='$OBJDUMP -f'
4260   ;;
4261
4262 darwin* | rhapsody*)
4263   lt_cv_deplibs_check_method=pass_all
4264   ;;
4265
4266 freebsd* | dragonfly*)
4267   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4268     case $host_cpu in
4269     i*86 )
4270       # Not sure whether the presence of OpenBSD here was a mistake.
4271       # Let's accept both of them until this is cleared up.
4272       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
4273       lt_cv_file_magic_cmd=/usr/bin/file
4274       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4275       ;;
4276     esac
4277   else
4278     lt_cv_deplibs_check_method=pass_all
4279   fi
4280   ;;
4281
4282 gnu*)
4283   lt_cv_deplibs_check_method=pass_all
4284   ;;
4285
4286 haiku*)
4287   lt_cv_deplibs_check_method=pass_all
4288   ;;
4289
4290 hpux10.20* | hpux11*)
4291   lt_cv_file_magic_cmd=/usr/bin/file
4292   case $host_cpu in
4293   ia64*)
4294     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
4295     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
4296     ;;
4297   hppa*64*)
4298     [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
4299     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
4300     ;;
4301   *)
4302     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
4303     lt_cv_file_magic_test_file=/usr/lib/libc.sl
4304     ;;
4305   esac
4306   ;;
4307
4308 interix[[3-9]]*)
4309   # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
4310   lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
4311   ;;
4312
4313 irix5* | irix6* | nonstopux*)
4314   case $LD in
4315   *-32|*"-32 ") libmagic=32-bit;;
4316   *-n32|*"-n32 ") libmagic=N32;;
4317   *-64|*"-64 ") libmagic=64-bit;;
4318   *) libmagic=never-match;;
4319   esac
4320   lt_cv_deplibs_check_method=pass_all
4321   ;;
4322
4323 # This must be glibc/ELF.
4324 linux* | k*bsd*-gnu | kopensolaris*-gnu)
4325   lt_cv_deplibs_check_method=pass_all
4326   ;;
4327
4328 netbsd*)
4329   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4330     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4331   else
4332     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
4333   fi
4334   ;;
4335
4336 newos6*)
4337   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
4338   lt_cv_file_magic_cmd=/usr/bin/file
4339   lt_cv_file_magic_test_file=/usr/lib/libnls.so
4340   ;;
4341
4342 *nto* | *qnx*)
4343   lt_cv_deplibs_check_method=pass_all
4344   ;;
4345
4346 openbsd*)
4347   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4348     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
4349   else
4350     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4351   fi
4352   ;;
4353
4354 osf3* | osf4* | osf5*)
4355   lt_cv_deplibs_check_method=pass_all
4356   ;;
4357
4358 rdos*)
4359   lt_cv_deplibs_check_method=pass_all
4360   ;;
4361
4362 solaris*)
4363   lt_cv_deplibs_check_method=pass_all
4364   ;;
4365
4366 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4367   lt_cv_deplibs_check_method=pass_all
4368   ;;
4369
4370 sysv4 | sysv4.3*)
4371   case $host_vendor in
4372   motorola)
4373     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]]'
4374     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4375     ;;
4376   ncr)
4377     lt_cv_deplibs_check_method=pass_all
4378     ;;
4379   sequent)
4380     lt_cv_file_magic_cmd='/bin/file'
4381     lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
4382     ;;
4383   sni)
4384     lt_cv_file_magic_cmd='/bin/file'
4385     lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4386     lt_cv_file_magic_test_file=/lib/libc.so
4387     ;;
4388   siemens)
4389     lt_cv_deplibs_check_method=pass_all
4390     ;;
4391   pc)
4392     lt_cv_deplibs_check_method=pass_all
4393     ;;
4394   esac
4395   ;;
4396
4397 tpf*)
4398   lt_cv_deplibs_check_method=pass_all
4399   ;;
4400 esac
4401 ])
4402
4403 file_magic_glob=
4404 want_nocaseglob=no
4405 if test "$build" = "$host"; then
4406   case $host_os in
4407   mingw* | pw32*)
4408     if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
4409       want_nocaseglob=yes
4410     else
4411       file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
4412     fi
4413     ;;
4414   esac
4415 fi
4416
4417 file_magic_cmd=$lt_cv_file_magic_cmd
4418 deplibs_check_method=$lt_cv_deplibs_check_method
4419 test -z "$deplibs_check_method" && deplibs_check_method=unknown
4420
4421 _LT_DECL([], [deplibs_check_method], [1],
4422     [Method to check whether dependent libraries are shared objects])
4423 _LT_DECL([], [file_magic_cmd], [1],
4424     [Command to use when deplibs_check_method = "file_magic"])
4425 _LT_DECL([], [file_magic_glob], [1],
4426     [How to find potential files when deplibs_check_method = "file_magic"])
4427 _LT_DECL([], [want_nocaseglob], [1],
4428     [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
4429 ])# _LT_CHECK_MAGIC_METHOD
4430
4431
4432 # LT_PATH_NM
4433 # ----------
4434 # find the pathname to a BSD- or MS-compatible name lister
4435 AC_DEFUN([LT_PATH_NM],
4436 [AC_REQUIRE([AC_PROG_CC])dnl
4437 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
4438 [if test -n "$NM"; then
4439   # Let the user override the test.
4440   lt_cv_path_NM="$NM"
4441 else
4442   lt_nm_to_check="${ac_tool_prefix}nm"
4443   if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
4444     lt_nm_to_check="$lt_nm_to_check nm"
4445   fi
4446   for lt_tmp_nm in $lt_nm_to_check; do
4447     lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4448     for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
4449       IFS="$lt_save_ifs"
4450       test -z "$ac_dir" && ac_dir=.
4451       tmp_nm="$ac_dir/$lt_tmp_nm"
4452       if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
4453         # Check to see if the nm accepts a BSD-compat flag.
4454         # Adding the `sed 1q' prevents false positives on HP-UX, which says:
4455         #   nm: unknown option "B" ignored
4456         # Tru64's nm complains that /dev/null is an invalid object file
4457         case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
4458         */dev/null* | *'Invalid file or object type'*)
4459           lt_cv_path_NM="$tmp_nm -B"
4460           break
4461           ;;
4462         *)
4463           case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
4464           */dev/null*)
4465             lt_cv_path_NM="$tmp_nm -p"
4466             break
4467             ;;
4468           *)
4469             lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4470             continue # so that we can try to find one that supports BSD flags
4471             ;;
4472           esac
4473           ;;
4474         esac
4475       fi
4476     done
4477     IFS="$lt_save_ifs"
4478   done
4479   : ${lt_cv_path_NM=no}
4480 fi])
4481 if test "$lt_cv_path_NM" != "no"; then
4482   NM="$lt_cv_path_NM"
4483 else
4484   # Didn't find any BSD compatible name lister, look for dumpbin.
4485   if test -n "$DUMPBIN"; then :
4486     # Let the user override the test.
4487   else
4488     AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
4489     case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
4490     *COFF*)
4491       DUMPBIN="$DUMPBIN -symbols"
4492       ;;
4493     *)
4494       DUMPBIN=:
4495       ;;
4496     esac
4497   fi
4498   AC_SUBST([DUMPBIN])
4499   if test "$DUMPBIN" != ":"; then
4500     NM="$DUMPBIN"
4501   fi
4502 fi
4503 test -z "$NM" && NM=nm
4504 AC_SUBST([NM])
4505 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
4506
4507 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
4508   [lt_cv_nm_interface="BSD nm"
4509   echo "int some_variable = 0;" > conftest.$ac_ext
4510   (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
4511   (eval "$ac_compile" 2>conftest.err)
4512   cat conftest.err >&AS_MESSAGE_LOG_FD
4513   (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
4514   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
4515   cat conftest.err >&AS_MESSAGE_LOG_FD
4516   (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
4517   cat conftest.out >&AS_MESSAGE_LOG_FD
4518   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
4519     lt_cv_nm_interface="MS dumpbin"
4520   fi
4521   rm -f conftest*])
4522 ])# LT_PATH_NM
4523
4524 # Old names:
4525 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
4526 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
4527 dnl aclocal-1.4 backwards compatibility:
4528 dnl AC_DEFUN([AM_PROG_NM], [])
4529 dnl AC_DEFUN([AC_PROG_NM], [])
4530
4531 # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
4532 # --------------------------------
4533 # how to determine the name of the shared library
4534 # associated with a specific link library.
4535 #  -- PORTME fill in with the dynamic library characteristics
4536 m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
4537 [m4_require([_LT_DECL_EGREP])
4538 m4_require([_LT_DECL_OBJDUMP])
4539 m4_require([_LT_DECL_DLLTOOL])
4540 AC_CACHE_CHECK([how to associate runtime and link libraries],
4541 lt_cv_sharedlib_from_linklib_cmd,
4542 [lt_cv_sharedlib_from_linklib_cmd='unknown'
4543
4544 case $host_os in
4545 cygwin* | mingw* | pw32* | cegcc*)
4546   # two different shell functions defined in ltmain.sh
4547   # decide which to use based on capabilities of $DLLTOOL
4548   case `$DLLTOOL --help 2>&1` in
4549   *--identify-strict*)
4550     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
4551     ;;
4552   *)
4553     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
4554     ;;
4555   esac
4556   ;;
4557 *)
4558   # fallback: assume linklib IS sharedlib
4559   lt_cv_sharedlib_from_linklib_cmd="$ECHO"
4560   ;;
4561 esac
4562 ])
4563 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
4564 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
4565
4566 _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
4567     [Command to associate shared and link libraries])
4568 ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
4569
4570
4571 # _LT_PATH_MANIFEST_TOOL
4572 # ----------------------
4573 # locate the manifest tool
4574 m4_defun([_LT_PATH_MANIFEST_TOOL],
4575 [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
4576 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
4577 AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
4578   [lt_cv_path_mainfest_tool=no
4579   echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
4580   $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
4581   cat conftest.err >&AS_MESSAGE_LOG_FD
4582   if $GREP 'Manifest Tool' conftest.out > /dev/null; then
4583     lt_cv_path_mainfest_tool=yes
4584   fi
4585   rm -f conftest*])
4586 if test "x$lt_cv_path_mainfest_tool" != xyes; then
4587   MANIFEST_TOOL=:
4588 fi
4589 _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
4590 ])# _LT_PATH_MANIFEST_TOOL
4591
4592
4593 # LT_LIB_M
4594 # --------
4595 # check for math library
4596 AC_DEFUN([LT_LIB_M],
4597 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4598 LIBM=
4599 case $host in
4600 *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
4601   # These system don't have libm, or don't need it
4602   ;;
4603 *-ncr-sysv4.3*)
4604   AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4605   AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
4606   ;;
4607 *)
4608   AC_CHECK_LIB(m, cos, LIBM="-lm")
4609   ;;
4610 esac
4611 AC_SUBST([LIBM])
4612 ])# LT_LIB_M
4613
4614 # Old name:
4615 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
4616 dnl aclocal-1.4 backwards compatibility:
4617 dnl AC_DEFUN([AC_CHECK_LIBM], [])
4618
4619
4620 # _LT_COMPILER_NO_RTTI([TAGNAME])
4621 # -------------------------------
4622 m4_defun([_LT_COMPILER_NO_RTTI],
4623 [m4_require([_LT_TAG_COMPILER])dnl
4624
4625 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4626
4627 if test "$GCC" = yes; then
4628   case $cc_basename in
4629   nvcc*)
4630     _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
4631   *)
4632     _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
4633   esac
4634
4635   _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4636     lt_cv_prog_compiler_rtti_exceptions,
4637     [-fno-rtti -fno-exceptions], [],
4638     [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4639 fi
4640 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
4641         [Compiler flag to turn off builtin functions])
4642 ])# _LT_COMPILER_NO_RTTI
4643
4644
4645 # _LT_CMD_GLOBAL_SYMBOLS
4646 # ----------------------
4647 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
4648 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4649 AC_REQUIRE([AC_PROG_CC])dnl
4650 AC_REQUIRE([AC_PROG_AWK])dnl
4651 AC_REQUIRE([LT_PATH_NM])dnl
4652 AC_REQUIRE([LT_PATH_LD])dnl
4653 m4_require([_LT_DECL_SED])dnl
4654 m4_require([_LT_DECL_EGREP])dnl
4655 m4_require([_LT_TAG_COMPILER])dnl
4656
4657 # Check for command to grab the raw symbol name followed by C symbol from nm.
4658 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4659 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4660 [
4661 # These are sane defaults that work on at least a few old systems.
4662 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4663
4664 # Character class describing NM global symbol codes.
4665 symcode='[[BCDEGRST]]'
4666
4667 # Regexp to match symbols that can be accessed directly from C.
4668 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4669
4670 # Define system-specific variables.
4671 case $host_os in
4672 aix*)
4673   symcode='[[BCDT]]'
4674   ;;
4675 cygwin* | mingw* | pw32* | cegcc*)
4676   symcode='[[ABCDGISTW]]'
4677   ;;
4678 hpux*)
4679   if test "$host_cpu" = ia64; then
4680     symcode='[[ABCDEGRST]]'
4681   fi
4682   ;;
4683 irix* | nonstopux*)
4684   symcode='[[BCDEGRST]]'
4685   ;;
4686 osf*)
4687   symcode='[[BCDEGQRST]]'
4688   ;;
4689 solaris*)
4690   symcode='[[BDRT]]'
4691   ;;
4692 sco3.2v5*)
4693   symcode='[[DT]]'
4694   ;;
4695 sysv4.2uw2*)
4696   symcode='[[DT]]'
4697   ;;
4698 sysv5* | sco5v6* | unixware* | OpenUNIX*)
4699   symcode='[[ABDT]]'
4700   ;;
4701 sysv4)
4702   symcode='[[DFNSTU]]'
4703   ;;
4704 esac
4705
4706 # If we're using GNU nm, then use its standard symbol codes.
4707 case `$NM -V 2>&1` in
4708 *GNU* | *'with BFD'*)
4709   symcode='[[ABCDGIRSTW]]' ;;
4710 esac
4711
4712 # Transform an extracted symbol line into a proper C declaration.
4713 # Some systems (esp. on ia64) link data and code symbols differently,
4714 # so use this general approach.
4715 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4716
4717 # Transform an extracted symbol line into symbol name and symbol address
4718 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
4719 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
4720
4721 # Handle CRLF in mingw tool chain
4722 opt_cr=
4723 case $build_os in
4724 mingw*)
4725   opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4726   ;;
4727 esac
4728
4729 # Try without a prefix underscore, then with it.
4730 for ac_symprfx in "" "_"; do
4731
4732   # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4733   symxfrm="\\1 $ac_symprfx\\2 \\2"
4734
4735   # Write the raw and C identifiers.
4736   if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4737     # Fake it for dumpbin and say T for any non-static function
4738     # and D for any global variable.
4739     # Also find C++ and __fastcall symbols from MSVC++,
4740     # which start with @ or ?.
4741     lt_cv_sys_global_symbol_pipe="$AWK ['"\
4742 "     {last_section=section; section=\$ 3};"\
4743 "     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
4744 "     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
4745 "     \$ 0!~/External *\|/{next};"\
4746 "     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
4747 "     {if(hide[section]) next};"\
4748 "     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
4749 "     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
4750 "     s[1]~/^[@?]/{print s[1], s[1]; next};"\
4751 "     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
4752 "     ' prfx=^$ac_symprfx]"
4753   else
4754     lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[     ]]\($symcode$symcode*\)[[       ]][[    ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4755   fi
4756   lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
4757
4758   # Check to see that the pipe works correctly.
4759   pipe_works=no
4760
4761   rm -f conftest*
4762   cat > conftest.$ac_ext <<_LT_EOF
4763 #ifdef __cplusplus
4764 extern "C" {
4765 #endif
4766 char nm_test_var;
4767 void nm_test_func(void);
4768 void nm_test_func(void){}
4769 #ifdef __cplusplus
4770 }
4771 #endif
4772 int main(){nm_test_var='a';nm_test_func();return(0);}
4773 _LT_EOF
4774
4775   if AC_TRY_EVAL(ac_compile); then
4776     # Now try to grab the symbols.
4777     nlist=conftest.nm
4778     if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
4779       # Try sorting and uniquifying the output.
4780       if sort "$nlist" | uniq > "$nlist"T; then
4781         mv -f "$nlist"T "$nlist"
4782       else
4783         rm -f "$nlist"T
4784       fi
4785
4786       # Make sure that we snagged all the symbols we need.
4787       if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
4788         if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
4789           cat <<_LT_EOF > conftest.$ac_ext
4790 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
4791 #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
4792 /* DATA imports from DLLs on WIN32 con't be const, because runtime
4793    relocations are performed -- see ld's documentation on pseudo-relocs.  */
4794 # define LT@&t@_DLSYM_CONST
4795 #elif defined(__osf__)
4796 /* This system does not cope well with relocations in const data.  */
4797 # define LT@&t@_DLSYM_CONST
4798 #else
4799 # define LT@&t@_DLSYM_CONST const
4800 #endif
4801
4802 #ifdef __cplusplus
4803 extern "C" {
4804 #endif
4805
4806 _LT_EOF
4807           # Now generate the symbol file.
4808           eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
4809
4810           cat <<_LT_EOF >> conftest.$ac_ext
4811
4812 /* The mapping between symbol names and symbols.  */
4813 LT@&t@_DLSYM_CONST struct {
4814   const char *name;
4815   void       *address;
4816 }
4817 lt__PROGRAM__LTX_preloaded_symbols[[]] =
4818 {
4819   { "@PROGRAM@", (void *) 0 },
4820 _LT_EOF
4821           $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
4822           cat <<\_LT_EOF >> conftest.$ac_ext
4823   {0, (void *) 0}
4824 };
4825
4826 /* This works around a problem in FreeBSD linker */
4827 #ifdef FREEBSD_WORKAROUND
4828 static const void *lt_preloaded_setup() {
4829   return lt__PROGRAM__LTX_preloaded_symbols;
4830 }
4831 #endif
4832
4833 #ifdef __cplusplus
4834 }
4835 #endif
4836 _LT_EOF
4837           # Now try linking the two files.
4838           mv conftest.$ac_objext conftstm.$ac_objext
4839           lt_globsym_save_LIBS=$LIBS
4840           lt_globsym_save_CFLAGS=$CFLAGS
4841           LIBS="conftstm.$ac_objext"
4842           CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4843           if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4844             pipe_works=yes
4845           fi
4846           LIBS=$lt_globsym_save_LIBS
4847           CFLAGS=$lt_globsym_save_CFLAGS
4848         else
4849           echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4850         fi
4851       else
4852         echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4853       fi
4854     else
4855       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4856     fi
4857   else
4858     echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4859     cat conftest.$ac_ext >&5
4860   fi
4861   rm -rf conftest* conftst*
4862
4863   # Do not use the global_symbol_pipe unless it works.
4864   if test "$pipe_works" = yes; then
4865     break
4866   else
4867     lt_cv_sys_global_symbol_pipe=
4868   fi
4869 done
4870 ])
4871 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4872   lt_cv_sys_global_symbol_to_cdecl=
4873 fi
4874 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4875   AC_MSG_RESULT(failed)
4876 else
4877   AC_MSG_RESULT(ok)
4878 fi
4879
4880 # Response file support.
4881 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4882   nm_file_list_spec='@'
4883 elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
4884   nm_file_list_spec='@'
4885 fi
4886
4887 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
4888     [Take the output of nm and produce a listing of raw symbols and C names])
4889 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
4890     [Transform the output of nm in a proper C declaration])
4891 _LT_DECL([global_symbol_to_c_name_address],
4892     [lt_cv_sys_global_symbol_to_c_name_address], [1],
4893     [Transform the output of nm in a C name address pair])
4894 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
4895     [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
4896     [Transform the output of nm in a C name address pair when lib prefix is needed])
4897 _LT_DECL([], [nm_file_list_spec], [1],
4898     [Specify filename containing input files for $NM])
4899 ]) # _LT_CMD_GLOBAL_SYMBOLS
4900
4901
4902 # _LT_COMPILER_PIC([TAGNAME])
4903 # ---------------------------
4904 m4_defun([_LT_COMPILER_PIC],
4905 [m4_require([_LT_TAG_COMPILER])dnl
4906 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
4907 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4908 _LT_TAGVAR(lt_prog_compiler_static, $1)=
4909
4910 m4_if([$1], [CXX], [
4911   # C++ specific cases for pic, static, wl, etc.
4912   if test "$GXX" = yes; then
4913     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4914     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4915
4916     case $host_os in
4917     aix*)
4918       # All AIX code is PIC.
4919       if test "$host_cpu" = ia64; then
4920         # AIX 5 now supports IA64 processor
4921         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4922       fi
4923       ;;
4924
4925     amigaos*)
4926       case $host_cpu in
4927       powerpc)
4928             # see comment about AmigaOS4 .so support
4929             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4930         ;;
4931       m68k)
4932             # FIXME: we need at least 68020 code to build shared libraries, but
4933             # adding the `-m68020' flag to GCC prevents building anything better,
4934             # like `-m68040'.
4935             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4936         ;;
4937       esac
4938       ;;
4939
4940     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4941       # PIC is the default for these OSes.
4942       ;;
4943     mingw* | cygwin* | os2* | pw32* | cegcc*)
4944       # This hack is so that the source file can tell whether it is being
4945       # built for inclusion in a dll (and should export symbols for example).
4946       # Although the cygwin gcc ignores -fPIC, still need this for old-style
4947       # (--disable-auto-import) libraries
4948       m4_if([$1], [GCJ], [],
4949         [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4950       ;;
4951     darwin* | rhapsody*)
4952       # PIC is the default on this platform
4953       # Common symbols not allowed in MH_DYLIB files
4954       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4955       ;;
4956     *djgpp*)
4957       # DJGPP does not support shared libraries at all
4958       _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4959       ;;
4960     haiku*)
4961       # PIC is the default for Haiku.
4962       # The "-static" flag exists, but is broken.
4963       _LT_TAGVAR(lt_prog_compiler_static, $1)=
4964       ;;
4965     interix[[3-9]]*)
4966       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4967       # Instead, we relocate shared libraries at runtime.
4968       ;;
4969     sysv4*MP*)
4970       if test -d /usr/nec; then
4971         _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4972       fi
4973       ;;
4974     hpux*)
4975       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4976       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
4977       # sets the default TLS model and affects inlining.
4978       case $host_cpu in
4979       hppa*64*)
4980         ;;
4981       *)
4982         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4983         ;;
4984       esac
4985       ;;
4986     *qnx* | *nto*)
4987       # QNX uses GNU C++, but need to define -shared option too, otherwise
4988       # it will coredump.
4989       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4990       ;;
4991     *)
4992       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4993       ;;
4994     esac
4995   else
4996     case $host_os in
4997       aix[[4-9]]*)
4998         # All AIX code is PIC.
4999         if test "$host_cpu" = ia64; then
5000           # AIX 5 now supports IA64 processor
5001           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5002         else
5003           _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5004         fi
5005         ;;
5006       chorus*)
5007         case $cc_basename in
5008         cxch68*)
5009           # Green Hills C++ Compiler
5010           # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
5011           ;;
5012         esac
5013         ;;
5014       mingw* | cygwin* | os2* | pw32* | cegcc*)
5015         # This hack is so that the source file can tell whether it is being
5016         # built for inclusion in a dll (and should export symbols for example).
5017         m4_if([$1], [GCJ], [],
5018           [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5019         ;;
5020       dgux*)
5021         case $cc_basename in
5022           ec++*)
5023             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5024             ;;
5025           ghcx*)
5026             # Green Hills C++ Compiler
5027             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5028             ;;
5029           *)
5030             ;;
5031         esac
5032         ;;
5033       freebsd* | dragonfly*)
5034         # FreeBSD uses GNU C++
5035         ;;
5036       hpux9* | hpux10* | hpux11*)
5037         case $cc_basename in
5038           CC*)
5039             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5040             _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5041             if test "$host_cpu" != ia64; then
5042               _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5043             fi
5044             ;;
5045           aCC*)
5046             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5047             _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5048             case $host_cpu in
5049             hppa*64*|ia64*)
5050               # +Z the default
5051               ;;
5052             *)
5053               _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5054               ;;
5055             esac
5056             ;;
5057           *)
5058             ;;
5059         esac
5060         ;;
5061       interix*)
5062         # This is c89, which is MS Visual C++ (no shared libs)
5063         # Anyone wants to do a port?
5064         ;;
5065       irix5* | irix6* | nonstopux*)
5066         case $cc_basename in
5067           CC*)
5068             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5069             _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5070             # CC pic flag -KPIC is the default.
5071             ;;
5072           *)
5073             ;;
5074         esac
5075         ;;
5076       linux* | k*bsd*-gnu | kopensolaris*-gnu)
5077         case $cc_basename in
5078           KCC*)
5079             # KAI C++ Compiler
5080             _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5081             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5082             ;;
5083           ecpc* )
5084             # old Intel C++ for x86_64 which still supported -KPIC.
5085             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5086             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5087             _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5088             ;;
5089           icpc* )
5090             # Intel C++, used to be incompatible with GCC.
5091             # ICC 10 doesn't accept -KPIC any more.
5092             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5093             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5094             _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5095             ;;
5096           pgCC* | pgcpp*)
5097             # Portland Group C++ compiler
5098             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5099             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5100             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5101             ;;
5102           cxx*)
5103             # Compaq C++
5104             # Make sure the PIC flag is empty.  It appears that all Alpha
5105             # Linux and Compaq Tru64 Unix objects are PIC.
5106             _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5107             _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5108             ;;
5109           xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
5110             # IBM XL 8.0, 9.0 on PPC and BlueGene
5111             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5112             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5113             _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5114             ;;
5115           *)
5116             case `$CC -V 2>&1 | sed 5q` in
5117             *Sun\ C*)
5118               # Sun C++ 5.9
5119               _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5120               _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5121               _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5122               ;;
5123             esac
5124             ;;
5125         esac
5126         ;;
5127       lynxos*)
5128         ;;
5129       m88k*)
5130         ;;
5131       mvs*)
5132         case $cc_basename in
5133           cxx*)
5134             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5135             ;;
5136           *)
5137             ;;
5138         esac
5139         ;;
5140       netbsd*)
5141         ;;
5142       *qnx* | *nto*)
5143         # QNX uses GNU C++, but need to define -shared option too, otherwise
5144         # it will coredump.
5145         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5146         ;;
5147       osf3* | osf4* | osf5*)
5148         case $cc_basename in
5149           KCC*)
5150             _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5151             ;;
5152           RCC*)
5153             # Rational C++ 2.4.1
5154             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5155             ;;
5156           cxx*)
5157             # Digital/Compaq C++
5158             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5159             # Make sure the PIC flag is empty.  It appears that all Alpha
5160             # Linux and Compaq Tru64 Unix objects are PIC.
5161             _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5162             _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5163             ;;
5164           *)
5165             ;;
5166         esac
5167         ;;
5168       psos*)
5169         ;;
5170       solaris*)
5171         case $cc_basename in
5172           CC* | sunCC*)
5173             # Sun C++ 4.2, 5.x and Centerline C++
5174             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5175             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5176             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5177             ;;
5178           gcx*)
5179             # Green Hills C++ Compiler
5180             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5181             ;;
5182           *)
5183             ;;
5184         esac
5185         ;;
5186       sunos4*)
5187         case $cc_basename in
5188           CC*)
5189             # Sun C++ 4.x
5190             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5191             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5192             ;;
5193           lcc*)
5194             # Lucid
5195             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5196             ;;
5197           *)
5198             ;;
5199         esac
5200         ;;
5201       sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5202         case $cc_basename in
5203           CC*)
5204             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5205             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5206             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5207             ;;
5208         esac
5209         ;;
5210       tandem*)
5211         case $cc_basename in
5212           NCC*)
5213             # NonStop-UX NCC 3.20
5214             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5215             ;;
5216           *)
5217             ;;
5218         esac
5219         ;;
5220       vxworks*)
5221         ;;
5222       *)
5223         _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5224         ;;
5225     esac
5226   fi
5227 ],
5228 [
5229   if test "$GCC" = yes; then
5230     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5231     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5232
5233     case $host_os in
5234       aix*)
5235       # All AIX code is PIC.
5236       if test "$host_cpu" = ia64; then
5237         # AIX 5 now supports IA64 processor
5238         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5239       fi
5240       ;;
5241
5242     amigaos*)
5243       case $host_cpu in
5244       powerpc)
5245             # see comment about AmigaOS4 .so support
5246             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5247         ;;
5248       m68k)
5249             # FIXME: we need at least 68020 code to build shared libraries, but
5250             # adding the `-m68020' flag to GCC prevents building anything better,
5251             # like `-m68040'.
5252             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5253         ;;
5254       esac
5255       ;;
5256
5257     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5258       # PIC is the default for these OSes.
5259       ;;
5260
5261     mingw* | cygwin* | pw32* | os2* | cegcc*)
5262       # This hack is so that the source file can tell whether it is being
5263       # built for inclusion in a dll (and should export symbols for example).
5264       # Although the cygwin gcc ignores -fPIC, still need this for old-style
5265       # (--disable-auto-import) libraries
5266       m4_if([$1], [GCJ], [],
5267         [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5268       ;;
5269
5270     darwin* | rhapsody*)
5271       # PIC is the default on this platform
5272       # Common symbols not allowed in MH_DYLIB files
5273       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5274       ;;
5275
5276     haiku*)
5277       # PIC is the default for Haiku.
5278       # The "-static" flag exists, but is broken.
5279       _LT_TAGVAR(lt_prog_compiler_static, $1)=
5280       ;;
5281
5282     hpux*)
5283       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
5284       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
5285       # sets the default TLS model and affects inlining.
5286       case $host_cpu in
5287       hppa*64*)
5288         # +Z the default
5289         ;;
5290       *)
5291         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5292         ;;
5293       esac
5294       ;;
5295
5296     interix[[3-9]]*)
5297       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5298       # Instead, we relocate shared libraries at runtime.
5299       ;;
5300
5301     msdosdjgpp*)
5302       # Just because we use GCC doesn't mean we suddenly get shared libraries
5303       # on systems that don't support them.
5304       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5305       enable_shared=no
5306       ;;
5307
5308     *nto* | *qnx*)
5309       # QNX uses GNU C++, but need to define -shared option too, otherwise
5310       # it will coredump.
5311       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5312       ;;
5313
5314     sysv4*MP*)
5315       if test -d /usr/nec; then
5316         _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5317       fi
5318       ;;
5319
5320     *)
5321       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5322       ;;
5323     esac
5324
5325     case $cc_basename in
5326     nvcc*) # Cuda Compiler Driver 2.2
5327       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
5328       if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
5329         _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
5330       fi
5331       ;;
5332     esac
5333   else
5334     # PORTME Check for flag to pass linker flags through the system compiler.
5335     case $host_os in
5336     aix*)
5337       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5338       if test "$host_cpu" = ia64; then
5339         # AIX 5 now supports IA64 processor
5340         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5341       else
5342         _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5343       fi
5344       ;;
5345
5346     mingw* | cygwin* | pw32* | os2* | cegcc*)
5347       # This hack is so that the source file can tell whether it is being
5348       # built for inclusion in a dll (and should export symbols for example).
5349       m4_if([$1], [GCJ], [],
5350         [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5351       ;;
5352
5353     hpux9* | hpux10* | hpux11*)
5354       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5355       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5356       # not for PA HP-UX.
5357       case $host_cpu in
5358       hppa*64*|ia64*)
5359         # +Z the default
5360         ;;
5361       *)
5362         _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5363         ;;
5364       esac
5365       # Is there a better lt_prog_compiler_static that works with the bundled CC?
5366       _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5367       ;;
5368
5369     irix5* | irix6* | nonstopux*)
5370       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5371       # PIC (with -KPIC) is the default.
5372       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5373       ;;
5374
5375     linux* | k*bsd*-gnu | kopensolaris*-gnu)
5376       case $cc_basename in
5377       # old Intel for x86_64 which still supported -KPIC.
5378       ecc*)
5379         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5380         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5381         _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5382         ;;
5383       # icc used to be incompatible with GCC.
5384       # ICC 10 doesn't accept -KPIC any more.
5385       icc* | ifort*)
5386         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5387         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5388         _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5389         ;;
5390       # Lahey Fortran 8.1.
5391       lf95*)
5392         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5393         _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
5394         _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
5395         ;;
5396       nagfor*)
5397         # NAG Fortran compiler
5398         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
5399         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5400         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5401         ;;
5402       pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
5403         # Portland Group compilers (*not* the Pentium gcc compiler,
5404         # which looks to be a dead project)
5405         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5406         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5407         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5408         ;;
5409       ccc*)
5410         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5411         # All Alpha code is PIC.
5412         _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5413         ;;
5414       xl* | bgxl* | bgf* | mpixl*)
5415         # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
5416         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5417         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5418         _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5419         ;;
5420       *)
5421         case `$CC -V 2>&1 | sed 5q` in
5422         *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
5423           # Sun Fortran 8.3 passes all unrecognized flags to the linker
5424           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5425           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5426           _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
5427           ;;
5428         *Sun\ F* | *Sun*Fortran*)
5429           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5430           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5431           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5432           ;;
5433         *Sun\ C*)
5434           # Sun C 5.9
5435           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5436           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5437           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5438           ;;
5439         *Intel*\ [[CF]]*Compiler*)
5440           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5441           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5442           _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5443           ;;
5444         *Portland\ Group*)
5445           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5446           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5447           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5448           ;;
5449         esac
5450         ;;
5451       esac
5452       ;;
5453
5454     newsos6)
5455       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5456       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5457       ;;
5458
5459     *nto* | *qnx*)
5460       # QNX uses GNU C++, but need to define -shared option too, otherwise
5461       # it will coredump.
5462       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5463       ;;
5464
5465     osf3* | osf4* | osf5*)
5466       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5467       # All OSF/1 code is PIC.
5468       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5469       ;;
5470
5471     rdos*)
5472       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5473       ;;
5474
5475     solaris*)
5476       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5477       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5478       case $cc_basename in
5479       f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
5480         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5481       *)
5482         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5483       esac
5484       ;;
5485
5486     sunos4*)
5487       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5488       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5489       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5490       ;;
5491
5492     sysv4 | sysv4.2uw2* | sysv4.3*)
5493       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5494       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5495       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5496       ;;
5497
5498     sysv4*MP*)
5499       if test -d /usr/nec ;then
5500         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5501         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5502       fi
5503       ;;
5504
5505     sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5506       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5507       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5508       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5509       ;;
5510
5511     unicos*)
5512       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5513       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5514       ;;
5515
5516     uts4*)
5517       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5518       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5519       ;;
5520
5521     *)
5522       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5523       ;;
5524     esac
5525   fi
5526 ])
5527 case $host_os in
5528   # For platforms which do not support PIC, -DPIC is meaningless:
5529   *djgpp*)
5530     _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5531     ;;
5532   *)
5533     _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
5534     ;;
5535 esac
5536
5537 AC_CACHE_CHECK([for $compiler option to produce PIC],
5538   [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
5539   [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
5540 _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
5541
5542 #
5543 # Check to make sure the PIC flag actually works.
5544 #
5545 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
5546   _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
5547     [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
5548     [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
5549     [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
5550      "" | " "*) ;;
5551      *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5552      esac],
5553     [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
5554      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5555 fi
5556 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
5557         [Additional compiler flags for building library objects])
5558
5559 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
5560         [How to pass a linker flag through the compiler])
5561 #
5562 # Check to make sure the static flag actually works.
5563 #
5564 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
5565 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
5566   _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
5567   $lt_tmp_static_flag,
5568   [],
5569   [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
5570 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
5571         [Compiler flag to prevent dynamic linking])
5572 ])# _LT_COMPILER_PIC
5573
5574
5575 # _LT_LINKER_SHLIBS([TAGNAME])
5576 # ----------------------------
5577 # See if the linker supports building shared libraries.
5578 m4_defun([_LT_LINKER_SHLIBS],
5579 [AC_REQUIRE([LT_PATH_LD])dnl
5580 AC_REQUIRE([LT_PATH_NM])dnl
5581 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
5582 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5583 m4_require([_LT_DECL_EGREP])dnl
5584 m4_require([_LT_DECL_SED])dnl
5585 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
5586 m4_require([_LT_TAG_COMPILER])dnl
5587 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5588 m4_if([$1], [CXX], [
5589   _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5590   _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5591   case $host_os in
5592   aix[[4-9]]*)
5593     # If we're using GNU nm, then we don't want the "-C" option.
5594     # -C means demangle to AIX nm, but means don't demangle with GNU nm
5595     # Also, AIX nm treats weak defined symbols like other global defined
5596     # symbols, whereas GNU nm marks them as "W".
5597     if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5598       _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
5599     else
5600       _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
5601     fi
5602     ;;
5603   pw32*)
5604     _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5605     ;;
5606   cygwin* | mingw* | cegcc*)
5607     case $cc_basename in
5608     cl*)
5609       _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
5610       ;;
5611     *)
5612       _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
5613       _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5614       ;;
5615     esac
5616     ;;
5617   *)
5618     _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5619     ;;
5620   esac
5621 ], [
5622   runpath_var=
5623   _LT_TAGVAR(allow_undefined_flag, $1)=
5624   _LT_TAGVAR(always_export_symbols, $1)=no
5625   _LT_TAGVAR(archive_cmds, $1)=
5626   _LT_TAGVAR(archive_expsym_cmds, $1)=
5627   _LT_TAGVAR(compiler_needs_object, $1)=no
5628   _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5629   _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5630   _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5631   _LT_TAGVAR(hardcode_automatic, $1)=no
5632   _LT_TAGVAR(hardcode_direct, $1)=no
5633   _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5634   _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5635   _LT_TAGVAR(hardcode_libdir_separator, $1)=
5636   _LT_TAGVAR(hardcode_minus_L, $1)=no
5637   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5638   _LT_TAGVAR(inherit_rpath, $1)=no
5639   _LT_TAGVAR(link_all_deplibs, $1)=unknown
5640   _LT_TAGVAR(module_cmds, $1)=
5641   _LT_TAGVAR(module_expsym_cmds, $1)=
5642   _LT_TAGVAR(old_archive_from_new_cmds, $1)=
5643   _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5644   _LT_TAGVAR(thread_safe_flag_spec, $1)=
5645   _LT_TAGVAR(whole_archive_flag_spec, $1)=
5646   # include_expsyms should be a list of space-separated symbols to be *always*
5647   # included in the symbol list
5648   _LT_TAGVAR(include_expsyms, $1)=
5649   # exclude_expsyms can be an extended regexp of symbols to exclude
5650   # it will be wrapped by ` (' and `)$', so one must not match beginning or
5651   # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5652   # as well as any symbol that contains `d'.
5653   _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5654   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5655   # platforms (ab)use it in PIC code, but their linkers get confused if
5656   # the symbol is explicitly referenced.  Since portable code cannot
5657   # rely on this symbol name, it's probably fine to never include it in
5658   # preloaded symbol tables.
5659   # Exclude shared library initialization/finalization symbols.
5660 dnl Note also adjust exclude_expsyms for C++ above.
5661   extract_expsyms_cmds=
5662
5663   case $host_os in
5664   cygwin* | mingw* | pw32* | cegcc*)
5665     # FIXME: the MSVC++ port hasn't been tested in a loooong time
5666     # When not using gcc, we currently assume that we are using
5667     # Microsoft Visual C++.
5668     if test "$GCC" != yes; then
5669       with_gnu_ld=no
5670     fi
5671     ;;
5672   interix*)
5673     # we just hope/assume this is gcc and not c89 (= MSVC++)
5674     with_gnu_ld=yes
5675     ;;
5676   openbsd*)
5677     with_gnu_ld=no
5678     ;;
5679   esac
5680
5681   _LT_TAGVAR(ld_shlibs, $1)=yes
5682
5683   # On some targets, GNU ld is compatible enough with the native linker
5684   # that we're better off using the native interface for both.
5685   lt_use_gnu_ld_interface=no
5686   if test "$with_gnu_ld" = yes; then
5687     case $host_os in
5688       aix*)
5689         # The AIX port of GNU ld has always aspired to compatibility
5690         # with the native linker.  However, as the warning in the GNU ld
5691         # block says, versions before 2.19.5* couldn't really create working
5692         # shared libraries, regardless of the interface used.
5693         case `$LD -v 2>&1` in
5694           *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
5695           *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
5696           *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
5697           *)
5698             lt_use_gnu_ld_interface=yes
5699             ;;
5700         esac
5701         ;;
5702       *)
5703         lt_use_gnu_ld_interface=yes
5704         ;;
5705     esac
5706   fi
5707
5708   if test "$lt_use_gnu_ld_interface" = yes; then
5709     # If archive_cmds runs LD, not CC, wlarc should be empty
5710     wlarc='${wl}'
5711
5712     # Set some defaults for GNU ld with shared library support. These
5713     # are reset later if shared libraries are not supported. Putting them
5714     # here allows them to be overridden if necessary.
5715     runpath_var=LD_RUN_PATH
5716     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5717     _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5718     # ancient GNU ld didn't support --whole-archive et. al.
5719     if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
5720       _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5721     else
5722       _LT_TAGVAR(whole_archive_flag_spec, $1)=
5723     fi
5724     supports_anon_versioning=no
5725     case `$LD -v 2>&1` in
5726       *GNU\ gold*) supports_anon_versioning=yes ;;
5727       *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5728       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5729       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5730       *\ 2.11.*) ;; # other 2.11 versions
5731       *) supports_anon_versioning=yes ;;
5732     esac
5733
5734     # See if GNU ld supports shared libraries.
5735     case $host_os in
5736     aix[[3-9]]*)
5737       # On AIX/PPC, the GNU linker is very broken
5738       if test "$host_cpu" != ia64; then
5739         _LT_TAGVAR(ld_shlibs, $1)=no
5740         cat <<_LT_EOF 1>&2
5741
5742 *** Warning: the GNU linker, at least up to release 2.19, is reported
5743 *** to be unable to reliably create shared libraries on AIX.
5744 *** Therefore, libtool is disabling shared libraries support.  If you
5745 *** really care for shared libraries, you may want to install binutils
5746 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
5747 *** You will then need to restart the configuration process.
5748
5749 _LT_EOF
5750       fi
5751       ;;
5752
5753     amigaos*)
5754       case $host_cpu in
5755       powerpc)
5756             # see comment about AmigaOS4 .so support
5757             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5758             _LT_TAGVAR(archive_expsym_cmds, $1)=''
5759         ;;
5760       m68k)
5761             _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
5762             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5763             _LT_TAGVAR(hardcode_minus_L, $1)=yes
5764         ;;
5765       esac
5766       ;;
5767
5768     beos*)
5769       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5770         _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5771         # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5772         # support --undefined.  This deserves some investigation.  FIXME
5773         _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5774       else
5775         _LT_TAGVAR(ld_shlibs, $1)=no
5776       fi
5777       ;;
5778
5779     cygwin* | mingw* | pw32* | cegcc*)
5780       # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5781       # as there is no search path for DLLs.
5782       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5783       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
5784       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5785       _LT_TAGVAR(always_export_symbols, $1)=no
5786       _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5787       _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
5788       _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5789
5790       if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5791         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5792         # If the export-symbols file already is a .def file (1st line
5793         # is EXPORTS), use it as is; otherwise, prepend...
5794         _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5795           cp $export_symbols $output_objdir/$soname.def;
5796         else
5797           echo EXPORTS > $output_objdir/$soname.def;
5798           cat $export_symbols >> $output_objdir/$soname.def;
5799         fi~
5800         $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5801       else
5802         _LT_TAGVAR(ld_shlibs, $1)=no
5803       fi
5804       ;;
5805
5806     haiku*)
5807       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5808       _LT_TAGVAR(link_all_deplibs, $1)=yes
5809       ;;
5810
5811     interix[[3-9]]*)
5812       _LT_TAGVAR(hardcode_direct, $1)=no
5813       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5814       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5815       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5816       # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5817       # Instead, shared libraries are loaded at an image base (0x10000000 by
5818       # default) and relocated if they conflict, which is a slow very memory
5819       # consuming and fragmenting process.  To avoid this, we pick a random,
5820       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5821       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
5822       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
5823       _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
5824       ;;
5825
5826     gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
5827       tmp_diet=no
5828       if test "$host_os" = linux-dietlibc; then
5829         case $cc_basename in
5830           diet\ *) tmp_diet=yes;;       # linux-dietlibc with static linking (!diet-dyn)
5831         esac
5832       fi
5833       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
5834          && test "$tmp_diet" = no
5835       then
5836         tmp_addflag=' $pic_flag'
5837         tmp_sharedflag='-shared'
5838         case $cc_basename,$host_cpu in
5839         pgcc*)                          # Portland Group C compiler
5840           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
5841           tmp_addflag=' $pic_flag'
5842           ;;
5843         pgf77* | pgf90* | pgf95* | pgfortran*)
5844                                         # Portland Group f77 and f90 compilers
5845           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
5846           tmp_addflag=' $pic_flag -Mnomain' ;;
5847         ecc*,ia64* | icc*,ia64*)        # Intel C compiler on ia64
5848           tmp_addflag=' -i_dynamic' ;;
5849         efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
5850           tmp_addflag=' -i_dynamic -nofor_main' ;;
5851         ifc* | ifort*)                  # Intel Fortran compiler
5852           tmp_addflag=' -nofor_main' ;;
5853         lf95*)                          # Lahey Fortran 8.1
5854           _LT_TAGVAR(whole_archive_flag_spec, $1)=
5855           tmp_sharedflag='--shared' ;;
5856         xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
5857           tmp_sharedflag='-qmkshrobj'
5858           tmp_addflag= ;;
5859         nvcc*)  # Cuda Compiler Driver 2.2
5860           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
5861           _LT_TAGVAR(compiler_needs_object, $1)=yes
5862           ;;
5863         esac
5864         case `$CC -V 2>&1 | sed 5q` in
5865         *Sun\ C*)                       # Sun C 5.9
5866           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
5867           _LT_TAGVAR(compiler_needs_object, $1)=yes
5868           tmp_sharedflag='-G' ;;
5869         *Sun\ F*)                       # Sun Fortran 8.3
5870           tmp_sharedflag='-G' ;;
5871         esac
5872         _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5873
5874         if test "x$supports_anon_versioning" = xyes; then
5875           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5876             cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5877             echo "local: *; };" >> $output_objdir/$libname.ver~
5878             $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5879         fi
5880
5881         case $cc_basename in
5882         xlf* | bgf* | bgxlf* | mpixlf*)
5883           # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
5884           _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
5885           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5886           _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
5887           if test "x$supports_anon_versioning" = xyes; then
5888             _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5889               cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5890               echo "local: *; };" >> $output_objdir/$libname.ver~
5891               $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
5892           fi
5893           ;;
5894         esac
5895       else
5896         _LT_TAGVAR(ld_shlibs, $1)=no
5897       fi
5898       ;;
5899
5900     netbsd*)
5901       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5902         _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5903         wlarc=
5904       else
5905         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5906         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5907       fi
5908       ;;
5909
5910     solaris*)
5911       if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
5912         _LT_TAGVAR(ld_shlibs, $1)=no
5913         cat <<_LT_EOF 1>&2
5914
5915 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5916 *** create shared libraries on Solaris systems.  Therefore, libtool
5917 *** is disabling shared libraries support.  We urge you to upgrade GNU
5918 *** binutils to release 2.9.1 or newer.  Another option is to modify
5919 *** your PATH or compiler configuration so that the native linker is
5920 *** used, and then restart.
5921
5922 _LT_EOF
5923       elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5924         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5925         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5926       else
5927         _LT_TAGVAR(ld_shlibs, $1)=no
5928       fi
5929       ;;
5930
5931     sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5932       case `$LD -v 2>&1` in
5933         *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5934         _LT_TAGVAR(ld_shlibs, $1)=no
5935         cat <<_LT_EOF 1>&2
5936
5937 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
5938 *** reliably create shared libraries on SCO systems.  Therefore, libtool
5939 *** is disabling shared libraries support.  We urge you to upgrade GNU
5940 *** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
5941 *** your PATH or compiler configuration so that the native linker is
5942 *** used, and then restart.
5943
5944 _LT_EOF
5945         ;;
5946         *)
5947           # For security reasons, it is highly recommended that you always
5948           # use absolute paths for naming shared libraries, and exclude the
5949           # DT_RUNPATH tag from executables and libraries.  But doing so
5950           # requires that you compile everything twice, which is a pain.
5951           if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5952             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5953             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5954             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5955           else
5956             _LT_TAGVAR(ld_shlibs, $1)=no
5957           fi
5958         ;;
5959       esac
5960       ;;
5961
5962     sunos4*)
5963       _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5964       wlarc=
5965       _LT_TAGVAR(hardcode_direct, $1)=yes
5966       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5967       ;;
5968
5969     *)
5970       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5971         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5972         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5973       else
5974         _LT_TAGVAR(ld_shlibs, $1)=no
5975       fi
5976       ;;
5977     esac
5978
5979     if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
5980       runpath_var=
5981       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5982       _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5983       _LT_TAGVAR(whole_archive_flag_spec, $1)=
5984     fi
5985   else
5986     # PORTME fill in a description of your system's linker (not GNU ld)
5987     case $host_os in
5988     aix3*)
5989       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5990       _LT_TAGVAR(always_export_symbols, $1)=yes
5991       _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
5992       # Note: this linker hardcodes the directories in LIBPATH if there
5993       # are no directories specified by -L.
5994       _LT_TAGVAR(hardcode_minus_L, $1)=yes
5995       if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
5996         # Neither direct hardcoding nor static linking is supported with a
5997         # broken collect2.
5998         _LT_TAGVAR(hardcode_direct, $1)=unsupported
5999       fi
6000       ;;
6001
6002     aix[[4-9]]*)
6003       if test "$host_cpu" = ia64; then
6004         # On IA64, the linker does run time linking by default, so we don't
6005         # have to do anything special.
6006         aix_use_runtimelinking=no
6007         exp_sym_flag='-Bexport'
6008         no_entry_flag=""
6009       else
6010         # If we're using GNU nm, then we don't want the "-C" option.
6011         # -C means demangle to AIX nm, but means don't demangle with GNU nm
6012         # Also, AIX nm treats weak defined symbols like other global
6013         # defined symbols, whereas GNU nm marks them as "W".
6014         if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
6015           _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
6016         else
6017           _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
6018         fi
6019         aix_use_runtimelinking=no
6020
6021         # Test if we are trying to use run time linking or normal
6022         # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6023         # need to do runtime linking.
6024         case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6025           for ld_flag in $LDFLAGS; do
6026           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
6027             aix_use_runtimelinking=yes
6028             break
6029           fi
6030           done
6031           ;;
6032         esac
6033
6034         exp_sym_flag='-bexport'
6035         no_entry_flag='-bnoentry'
6036       fi
6037
6038       # When large executables or shared objects are built, AIX ld can
6039       # have problems creating the table of contents.  If linking a library
6040       # or program results in "error TOC overflow" add -mminimal-toc to
6041       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
6042       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6043
6044       _LT_TAGVAR(archive_cmds, $1)=''
6045       _LT_TAGVAR(hardcode_direct, $1)=yes
6046       _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6047       _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6048       _LT_TAGVAR(link_all_deplibs, $1)=yes
6049       _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6050
6051       if test "$GCC" = yes; then
6052         case $host_os in aix4.[[012]]|aix4.[[012]].*)
6053         # We only want to do this on AIX 4.2 and lower, the check
6054         # below for broken collect2 doesn't work under 4.3+
6055           collect2name=`${CC} -print-prog-name=collect2`
6056           if test -f "$collect2name" &&
6057            strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6058           then
6059           # We have reworked collect2
6060           :
6061           else
6062           # We have old collect2
6063           _LT_TAGVAR(hardcode_direct, $1)=unsupported
6064           # It fails to find uninstalled libraries when the uninstalled
6065           # path is not listed in the libpath.  Setting hardcode_minus_L
6066           # to unsupported forces relinking
6067           _LT_TAGVAR(hardcode_minus_L, $1)=yes
6068           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6069           _LT_TAGVAR(hardcode_libdir_separator, $1)=
6070           fi
6071           ;;
6072         esac
6073         shared_flag='-shared'
6074         if test "$aix_use_runtimelinking" = yes; then
6075           shared_flag="$shared_flag "'${wl}-G'
6076         fi
6077       else
6078         # not using gcc
6079         if test "$host_cpu" = ia64; then
6080         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6081         # chokes on -Wl,-G. The following line is correct:
6082           shared_flag='-G'
6083         else
6084           if test "$aix_use_runtimelinking" = yes; then
6085             shared_flag='${wl}-G'
6086           else
6087             shared_flag='${wl}-bM:SRE'
6088           fi
6089         fi
6090       fi
6091
6092       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6093       # It seems that -bexpall does not export symbols beginning with
6094       # underscore (_), so it is better to generate a list of symbols to export.
6095       _LT_TAGVAR(always_export_symbols, $1)=yes
6096       if test "$aix_use_runtimelinking" = yes; then
6097         # Warning - without using the other runtime loading flags (-brtl),
6098         # -berok will link without error, but may produce a broken library.
6099         _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6100         # Determine the default libpath from the value encoded in an
6101         # empty executable.
6102         _LT_SYS_MODULE_PATH_AIX([$1])
6103         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6104         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
6105       else
6106         if test "$host_cpu" = ia64; then
6107           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6108           _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6109           _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
6110         else
6111          # Determine the default libpath from the value encoded in an
6112          # empty executable.
6113          _LT_SYS_MODULE_PATH_AIX([$1])
6114          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6115           # Warning - without using the other run time loading flags,
6116           # -berok will link without error, but may produce a broken library.
6117           _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6118           _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6119           if test "$with_gnu_ld" = yes; then
6120             # We only use this code for GNU lds that support --whole-archive.
6121             _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6122           else
6123             # Exported symbols can be pulled into shared objects from archives
6124             _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6125           fi
6126           _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6127           # This is similar to how AIX traditionally builds its shared libraries.
6128           _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
6129         fi
6130       fi
6131       ;;
6132
6133     amigaos*)
6134       case $host_cpu in
6135       powerpc)
6136             # see comment about AmigaOS4 .so support
6137             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6138             _LT_TAGVAR(archive_expsym_cmds, $1)=''
6139         ;;
6140       m68k)
6141             _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
6142             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6143             _LT_TAGVAR(hardcode_minus_L, $1)=yes
6144         ;;
6145       esac
6146       ;;
6147
6148     bsdi[[45]]*)
6149       _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6150       ;;
6151
6152     cygwin* | mingw* | pw32* | cegcc*)
6153       # When not using gcc, we currently assume that we are using
6154       # Microsoft Visual C++.
6155       # hardcode_libdir_flag_spec is actually meaningless, as there is
6156       # no search path for DLLs.
6157       case $cc_basename in
6158       cl*)
6159         # Native MSVC
6160         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6161         _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6162         _LT_TAGVAR(always_export_symbols, $1)=yes
6163         _LT_TAGVAR(file_list_spec, $1)='@'
6164         # Tell ltmain to make .lib files, not .a files.
6165         libext=lib
6166         # Tell ltmain to make .dll files, not .so files.
6167         shrext_cmds=".dll"
6168         # FIXME: Setting linknames here is a bad hack.
6169         _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
6170         _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6171             sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
6172           else
6173             sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
6174           fi~
6175           $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6176           linknames='
6177         # The linker will not automatically build a static lib if we build a DLL.
6178         # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6179         _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6180         _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
6181         _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
6182         # Don't use ranlib
6183         _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6184         _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6185           lt_tool_outputfile="@TOOL_OUTPUT@"~
6186           case $lt_outputfile in
6187             *.exe|*.EXE) ;;
6188             *)
6189               lt_outputfile="$lt_outputfile.exe"
6190               lt_tool_outputfile="$lt_tool_outputfile.exe"
6191               ;;
6192           esac~
6193           if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
6194             $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6195             $RM "$lt_outputfile.manifest";
6196           fi'
6197         ;;
6198       *)
6199         # Assume MSVC wrapper
6200         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6201         _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6202         # Tell ltmain to make .lib files, not .a files.
6203         libext=lib
6204         # Tell ltmain to make .dll files, not .so files.
6205         shrext_cmds=".dll"
6206         # FIXME: Setting linknames here is a bad hack.
6207         _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
6208         # The linker will automatically build a .lib file if we build a DLL.
6209         _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6210         # FIXME: Should let the user specify the lib program.
6211         _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
6212         _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6213         ;;
6214       esac
6215       ;;
6216
6217     darwin* | rhapsody*)
6218       _LT_DARWIN_LINKER_FEATURES($1)
6219       ;;
6220
6221     dgux*)
6222       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6223       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6224       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6225       ;;
6226
6227     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6228     # support.  Future versions do this automatically, but an explicit c++rt0.o
6229     # does not break anything, and helps significantly (at the cost of a little
6230     # extra space).
6231     freebsd2.2*)
6232       _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6233       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6234       _LT_TAGVAR(hardcode_direct, $1)=yes
6235       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6236       ;;
6237
6238     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6239     freebsd2.*)
6240       _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6241       _LT_TAGVAR(hardcode_direct, $1)=yes
6242       _LT_TAGVAR(hardcode_minus_L, $1)=yes
6243       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6244       ;;
6245
6246     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6247     freebsd* | dragonfly*)
6248       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6249       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6250       _LT_TAGVAR(hardcode_direct, $1)=yes
6251       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6252       ;;
6253
6254     hpux9*)
6255       if test "$GCC" = yes; then
6256         _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6257       else
6258         _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6259       fi
6260       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6261       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6262       _LT_TAGVAR(hardcode_direct, $1)=yes
6263
6264       # hardcode_minus_L: Not really in the search PATH,
6265       # but as the default location of the library.
6266       _LT_TAGVAR(hardcode_minus_L, $1)=yes
6267       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6268       ;;
6269
6270     hpux10*)
6271       if test "$GCC" = yes && test "$with_gnu_ld" = no; then
6272         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6273       else
6274         _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6275       fi
6276       if test "$with_gnu_ld" = no; then
6277         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6278         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6279         _LT_TAGVAR(hardcode_direct, $1)=yes
6280         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6281         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6282         # hardcode_minus_L: Not really in the search PATH,
6283         # but as the default location of the library.
6284         _LT_TAGVAR(hardcode_minus_L, $1)=yes
6285       fi
6286       ;;
6287
6288     hpux11*)
6289       if test "$GCC" = yes && test "$with_gnu_ld" = no; then
6290         case $host_cpu in
6291         hppa*64*)
6292           _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6293           ;;
6294         ia64*)
6295           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6296           ;;
6297         *)
6298           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6299           ;;
6300         esac
6301       else
6302         case $host_cpu in
6303         hppa*64*)
6304           _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6305           ;;
6306         ia64*)
6307           _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6308           ;;
6309         *)
6310         m4_if($1, [], [
6311           # Older versions of the 11.00 compiler do not understand -b yet
6312           # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
6313           _LT_LINKER_OPTION([if $CC understands -b],
6314             _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
6315             [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
6316             [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
6317           [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
6318           ;;
6319         esac
6320       fi
6321       if test "$with_gnu_ld" = no; then
6322         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6323         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6324
6325         case $host_cpu in
6326         hppa*64*|ia64*)
6327           _LT_TAGVAR(hardcode_direct, $1)=no
6328           _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6329           ;;
6330         *)
6331           _LT_TAGVAR(hardcode_direct, $1)=yes
6332           _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6333           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6334
6335           # hardcode_minus_L: Not really in the search PATH,
6336           # but as the default location of the library.
6337           _LT_TAGVAR(hardcode_minus_L, $1)=yes
6338           ;;
6339         esac
6340       fi
6341       ;;
6342
6343     irix5* | irix6* | nonstopux*)
6344       if test "$GCC" = yes; then
6345         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6346         # Try to use the -exported_symbol ld option, if it does not
6347         # work, assume that -exports_file does not work either and
6348         # implicitly export all symbols.
6349         # This should be the same for all languages, so no per-tag cache variable.
6350         AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
6351           [lt_cv_irix_exported_symbol],
6352           [save_LDFLAGS="$LDFLAGS"
6353            LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
6354            AC_LINK_IFELSE(
6355              [AC_LANG_SOURCE(
6356                 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
6357                               [C++], [[int foo (void) { return 0; }]],
6358                               [Fortran 77], [[
6359       subroutine foo
6360       end]],
6361                               [Fortran], [[
6362       subroutine foo
6363       end]])])],
6364               [lt_cv_irix_exported_symbol=yes],
6365               [lt_cv_irix_exported_symbol=no])
6366            LDFLAGS="$save_LDFLAGS"])
6367         if test "$lt_cv_irix_exported_symbol" = yes; then
6368           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
6369         fi
6370       else
6371         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6372         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
6373       fi
6374       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6375       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6376       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6377       _LT_TAGVAR(inherit_rpath, $1)=yes
6378       _LT_TAGVAR(link_all_deplibs, $1)=yes
6379       ;;
6380
6381     netbsd*)
6382       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6383         _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
6384       else
6385         _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
6386       fi
6387       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6388       _LT_TAGVAR(hardcode_direct, $1)=yes
6389       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6390       ;;
6391
6392     newsos6)
6393       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6394       _LT_TAGVAR(hardcode_direct, $1)=yes
6395       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6396       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6397       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6398       ;;
6399
6400     *nto* | *qnx*)
6401       ;;
6402
6403     openbsd*)
6404       if test -f /usr/libexec/ld.so; then
6405         _LT_TAGVAR(hardcode_direct, $1)=yes
6406         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6407         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6408         if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6409           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6410           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6411           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6412           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6413         else
6414           case $host_os in
6415            openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6416              _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6417              _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6418              ;;
6419            *)
6420              _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6421              _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6422              ;;
6423           esac
6424         fi
6425       else
6426         _LT_TAGVAR(ld_shlibs, $1)=no
6427       fi
6428       ;;
6429
6430     os2*)
6431       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6432       _LT_TAGVAR(hardcode_minus_L, $1)=yes
6433       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6434       _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
6435       _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6436       ;;
6437
6438     osf3*)
6439       if test "$GCC" = yes; then
6440         _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6441         _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6442       else
6443         _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6444         _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6445       fi
6446       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6447       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6448       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6449       ;;
6450
6451     osf4* | osf5*)      # as osf3* with the addition of -msym flag
6452       if test "$GCC" = yes; then
6453         _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6454         _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6455         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6456       else
6457         _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6458         _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6459         _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
6460         $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
6461
6462         # Both c and cxx compiler support -rpath directly
6463         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6464       fi
6465       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6466       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6467       ;;
6468
6469     solaris*)
6470       _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
6471       if test "$GCC" = yes; then
6472         wlarc='${wl}'
6473         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6474         _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6475           $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
6476       else
6477         case `$CC -V 2>&1` in
6478         *"Compilers 5.0"*)
6479           wlarc=''
6480           _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6481           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6482           $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
6483           ;;
6484         *)
6485           wlarc='${wl}'
6486           _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
6487           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6488           $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
6489           ;;
6490         esac
6491       fi
6492       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6493       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6494       case $host_os in
6495       solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6496       *)
6497         # The compiler driver will combine and reorder linker options,
6498         # but understands `-z linker_flag'.  GCC discards it without `$wl',
6499         # but is careful enough not to reorder.
6500         # Supported since Solaris 2.6 (maybe 2.5.1?)
6501         if test "$GCC" = yes; then
6502           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6503         else
6504           _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6505         fi
6506         ;;
6507       esac
6508       _LT_TAGVAR(link_all_deplibs, $1)=yes
6509       ;;
6510
6511     sunos4*)
6512       if test "x$host_vendor" = xsequent; then
6513         # Use $CC to link under sequent, because it throws in some extra .o
6514         # files that make .init and .fini sections work.
6515         _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6516       else
6517         _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6518       fi
6519       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6520       _LT_TAGVAR(hardcode_direct, $1)=yes
6521       _LT_TAGVAR(hardcode_minus_L, $1)=yes
6522       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6523       ;;
6524
6525     sysv4)
6526       case $host_vendor in
6527         sni)
6528           _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6529           _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6530         ;;
6531         siemens)
6532           ## LD is ld it makes a PLAMLIB
6533           ## CC just makes a GrossModule.
6534           _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6535           _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6536           _LT_TAGVAR(hardcode_direct, $1)=no
6537         ;;
6538         motorola)
6539           _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6540           _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6541         ;;
6542       esac
6543       runpath_var='LD_RUN_PATH'
6544       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6545       ;;
6546
6547     sysv4.3*)
6548       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6549       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6550       _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6551       ;;
6552
6553     sysv4*MP*)
6554       if test -d /usr/nec; then
6555         _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6556         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6557         runpath_var=LD_RUN_PATH
6558         hardcode_runpath_var=yes
6559         _LT_TAGVAR(ld_shlibs, $1)=yes
6560       fi
6561       ;;
6562
6563     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6564       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6565       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6566       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6567       runpath_var='LD_RUN_PATH'
6568
6569       if test "$GCC" = yes; then
6570         _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6571         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6572       else
6573         _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6574         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6575       fi
6576       ;;
6577
6578     sysv5* | sco3.2v5* | sco5v6*)
6579       # Note: We can NOT use -z defs as we might desire, because we do not
6580       # link with -lc, and that would cause any symbols used from libc to
6581       # always be unresolved, which means just about no library would
6582       # ever link correctly.  If we're not using GNU ld we use -z text
6583       # though, which does catch some bad symbols but isn't as heavy-handed
6584       # as -z defs.
6585       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6586       _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6587       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6588       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6589       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6590       _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6591       _LT_TAGVAR(link_all_deplibs, $1)=yes
6592       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6593       runpath_var='LD_RUN_PATH'
6594
6595       if test "$GCC" = yes; then
6596         _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6597         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6598       else
6599         _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6600         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6601       fi
6602       ;;
6603
6604     uts4*)
6605       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6606       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6607       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6608       ;;
6609
6610     *)
6611       _LT_TAGVAR(ld_shlibs, $1)=no
6612       ;;
6613     esac
6614
6615     if test x$host_vendor = xsni; then
6616       case $host in
6617       sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6618         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
6619         ;;
6620       esac
6621     fi
6622   fi
6623 ])
6624 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6625 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6626
6627 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
6628
6629 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
6630 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
6631 _LT_DECL([], [extract_expsyms_cmds], [2],
6632     [The commands to extract the exported symbol list from a shared archive])
6633
6634 #
6635 # Do we need to explicitly link libc?
6636 #
6637 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
6638 x|xyes)
6639   # Assume -lc should be added
6640   _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6641
6642   if test "$enable_shared" = yes && test "$GCC" = yes; then
6643     case $_LT_TAGVAR(archive_cmds, $1) in
6644     *'~'*)
6645       # FIXME: we may have to deal with multi-command sequences.
6646       ;;
6647     '$CC '*)
6648       # Test whether the compiler implicitly links with -lc since on some
6649       # systems, -lgcc has to come before -lc. If gcc already passes -lc
6650       # to ld, don't add -lc before -lgcc.
6651       AC_CACHE_CHECK([whether -lc should be explicitly linked in],
6652         [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
6653         [$RM conftest*
6654         echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6655
6656         if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6657           soname=conftest
6658           lib=conftest
6659           libobjs=conftest.$ac_objext
6660           deplibs=
6661           wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
6662           pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
6663           compiler_flags=-v
6664           linker_flags=-v
6665           verstring=
6666           output_objdir=.
6667           libname=conftest
6668           lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
6669           _LT_TAGVAR(allow_undefined_flag, $1)=
6670           if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
6671           then
6672             lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6673           else
6674             lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6675           fi
6676           _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6677         else
6678           cat conftest.err 1>&5
6679         fi
6680         $RM conftest*
6681         ])
6682       _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
6683       ;;
6684     esac
6685   fi
6686   ;;
6687 esac
6688
6689 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
6690     [Whether or not to add -lc for building shared libraries])
6691 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
6692     [enable_shared_with_static_runtimes], [0],
6693     [Whether or not to disallow shared libs when runtime libs are static])
6694 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
6695     [Compiler flag to allow reflexive dlopens])
6696 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
6697     [Compiler flag to generate shared objects directly from archives])
6698 _LT_TAGDECL([], [compiler_needs_object], [1],
6699     [Whether the compiler copes with passing no objects directly])
6700 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
6701     [Create an old-style archive from a shared archive])
6702 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
6703     [Create a temporary old-style archive to link instead of a shared archive])
6704 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
6705 _LT_TAGDECL([], [archive_expsym_cmds], [2])
6706 _LT_TAGDECL([], [module_cmds], [2],
6707     [Commands used to build a loadable module if different from building
6708     a shared archive.])
6709 _LT_TAGDECL([], [module_expsym_cmds], [2])
6710 _LT_TAGDECL([], [with_gnu_ld], [1],
6711     [Whether we are building with GNU ld or not])
6712 _LT_TAGDECL([], [allow_undefined_flag], [1],
6713     [Flag that allows shared libraries with undefined symbols to be built])
6714 _LT_TAGDECL([], [no_undefined_flag], [1],
6715     [Flag that enforces no undefined symbols])
6716 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
6717     [Flag to hardcode $libdir into a binary during linking.
6718     This must work even if $libdir does not exist])
6719 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
6720     [Whether we need a single "-rpath" flag with a separated argument])
6721 _LT_TAGDECL([], [hardcode_direct], [0],
6722     [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6723     DIR into the resulting binary])
6724 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
6725     [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6726     DIR into the resulting binary and the resulting library dependency is
6727     "absolute", i.e impossible to change by setting ${shlibpath_var} if the
6728     library is relocated])
6729 _LT_TAGDECL([], [hardcode_minus_L], [0],
6730     [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
6731     into the resulting binary])
6732 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
6733     [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
6734     into the resulting binary])
6735 _LT_TAGDECL([], [hardcode_automatic], [0],
6736     [Set to "yes" if building a shared library automatically hardcodes DIR
6737     into the library and all subsequent libraries and executables linked
6738     against it])
6739 _LT_TAGDECL([], [inherit_rpath], [0],
6740     [Set to yes if linker adds runtime paths of dependent libraries
6741     to runtime path list])
6742 _LT_TAGDECL([], [link_all_deplibs], [0],
6743     [Whether libtool must link a program against all its dependency libraries])
6744 _LT_TAGDECL([], [always_export_symbols], [0],
6745     [Set to "yes" if exported symbols are required])
6746 _LT_TAGDECL([], [export_symbols_cmds], [2],
6747     [The commands to list exported symbols])
6748 _LT_TAGDECL([], [exclude_expsyms], [1],
6749     [Symbols that should not be listed in the preloaded symbols])
6750 _LT_TAGDECL([], [include_expsyms], [1],
6751     [Symbols that must always be exported])
6752 _LT_TAGDECL([], [prelink_cmds], [2],
6753     [Commands necessary for linking programs (against libraries) with templates])
6754 _LT_TAGDECL([], [postlink_cmds], [2],
6755     [Commands necessary for finishing linking programs])
6756 _LT_TAGDECL([], [file_list_spec], [1],
6757     [Specify filename containing input files])
6758 dnl FIXME: Not yet implemented
6759 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
6760 dnl    [Compiler flag to generate thread safe objects])
6761 ])# _LT_LINKER_SHLIBS
6762
6763
6764 # _LT_LANG_C_CONFIG([TAG])
6765 # ------------------------
6766 # Ensure that the configuration variables for a C compiler are suitably
6767 # defined.  These variables are subsequently used by _LT_CONFIG to write
6768 # the compiler configuration to `libtool'.
6769 m4_defun([_LT_LANG_C_CONFIG],
6770 [m4_require([_LT_DECL_EGREP])dnl
6771 lt_save_CC="$CC"
6772 AC_LANG_PUSH(C)
6773
6774 # Source file extension for C test sources.
6775 ac_ext=c
6776
6777 # Object file extension for compiled C test sources.
6778 objext=o
6779 _LT_TAGVAR(objext, $1)=$objext
6780
6781 # Code to be used in simple compile tests
6782 lt_simple_compile_test_code="int some_variable = 0;"
6783
6784 # Code to be used in simple link tests
6785 lt_simple_link_test_code='int main(){return(0);}'
6786
6787 _LT_TAG_COMPILER
6788 # Save the default compiler, since it gets overwritten when the other
6789 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
6790 compiler_DEFAULT=$CC
6791
6792 # save warnings/boilerplate of simple test code
6793 _LT_COMPILER_BOILERPLATE
6794 _LT_LINKER_BOILERPLATE
6795
6796 if test -n "$compiler"; then
6797   _LT_COMPILER_NO_RTTI($1)
6798   _LT_COMPILER_PIC($1)
6799   _LT_COMPILER_C_O($1)
6800   _LT_COMPILER_FILE_LOCKS($1)
6801   _LT_LINKER_SHLIBS($1)
6802   _LT_SYS_DYNAMIC_LINKER($1)
6803   _LT_LINKER_HARDCODE_LIBPATH($1)
6804   LT_SYS_DLOPEN_SELF
6805   _LT_CMD_STRIPLIB
6806
6807   # Report which library types will actually be built
6808   AC_MSG_CHECKING([if libtool supports shared libraries])
6809   AC_MSG_RESULT([$can_build_shared])
6810
6811   AC_MSG_CHECKING([whether to build shared libraries])
6812   test "$can_build_shared" = "no" && enable_shared=no
6813
6814   # On AIX, shared libraries and static libraries use the same namespace, and
6815   # are all built from PIC.
6816   case $host_os in
6817   aix3*)
6818     test "$enable_shared" = yes && enable_static=no
6819     if test -n "$RANLIB"; then
6820       archive_cmds="$archive_cmds~\$RANLIB \$lib"
6821       postinstall_cmds='$RANLIB $lib'
6822     fi
6823     ;;
6824
6825   aix[[4-9]]*)
6826     if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6827       test "$enable_shared" = yes && enable_static=no
6828     fi
6829     ;;
6830   esac
6831   AC_MSG_RESULT([$enable_shared])
6832
6833   AC_MSG_CHECKING([whether to build static libraries])
6834   # Make sure either enable_shared or enable_static is yes.
6835   test "$enable_shared" = yes || enable_static=yes
6836   AC_MSG_RESULT([$enable_static])
6837
6838   _LT_CONFIG($1)
6839 fi
6840 AC_LANG_POP
6841 CC="$lt_save_CC"
6842 ])# _LT_LANG_C_CONFIG
6843
6844
6845 # _LT_LANG_CXX_CONFIG([TAG])
6846 # --------------------------
6847 # Ensure that the configuration variables for a C++ compiler are suitably
6848 # defined.  These variables are subsequently used by _LT_CONFIG to write
6849 # the compiler configuration to `libtool'.
6850 m4_defun([_LT_LANG_CXX_CONFIG],
6851 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6852 m4_require([_LT_DECL_EGREP])dnl
6853 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
6854 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
6855     ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
6856     (test "X$CXX" != "Xg++"))) ; then
6857   AC_PROG_CXXCPP
6858 else
6859   _lt_caught_CXX_error=yes
6860 fi
6861
6862 AC_LANG_PUSH(C++)
6863 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6864 _LT_TAGVAR(allow_undefined_flag, $1)=
6865 _LT_TAGVAR(always_export_symbols, $1)=no
6866 _LT_TAGVAR(archive_expsym_cmds, $1)=
6867 _LT_TAGVAR(compiler_needs_object, $1)=no
6868 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6869 _LT_TAGVAR(hardcode_direct, $1)=no
6870 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6871 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6872 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6873 _LT_TAGVAR(hardcode_minus_L, $1)=no
6874 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6875 _LT_TAGVAR(hardcode_automatic, $1)=no
6876 _LT_TAGVAR(inherit_rpath, $1)=no
6877 _LT_TAGVAR(module_cmds, $1)=
6878 _LT_TAGVAR(module_expsym_cmds, $1)=
6879 _LT_TAGVAR(link_all_deplibs, $1)=unknown
6880 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6881 _LT_TAGVAR(reload_flag, $1)=$reload_flag
6882 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
6883 _LT_TAGVAR(no_undefined_flag, $1)=
6884 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6885 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6886
6887 # Source file extension for C++ test sources.
6888 ac_ext=cpp
6889
6890 # Object file extension for compiled C++ test sources.
6891 objext=o
6892 _LT_TAGVAR(objext, $1)=$objext
6893
6894 # No sense in running all these tests if we already determined that
6895 # the CXX compiler isn't working.  Some variables (like enable_shared)
6896 # are currently assumed to apply to all compilers on this platform,
6897 # and will be corrupted by setting them based on a non-working compiler.
6898 if test "$_lt_caught_CXX_error" != yes; then
6899   # Code to be used in simple compile tests
6900   lt_simple_compile_test_code="int some_variable = 0;"
6901
6902   # Code to be used in simple link tests
6903   lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
6904
6905   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6906   _LT_TAG_COMPILER
6907
6908   # save warnings/boilerplate of simple test code
6909   _LT_COMPILER_BOILERPLATE
6910   _LT_LINKER_BOILERPLATE
6911
6912   # Allow CC to be a program name with arguments.
6913   lt_save_CC=$CC
6914   lt_save_CFLAGS=$CFLAGS
6915   lt_save_LD=$LD
6916   lt_save_GCC=$GCC
6917   GCC=$GXX
6918   lt_save_with_gnu_ld=$with_gnu_ld
6919   lt_save_path_LD=$lt_cv_path_LD
6920   if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
6921     lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
6922   else
6923     $as_unset lt_cv_prog_gnu_ld
6924   fi
6925   if test -n "${lt_cv_path_LDCXX+set}"; then
6926     lt_cv_path_LD=$lt_cv_path_LDCXX
6927   else
6928     $as_unset lt_cv_path_LD
6929   fi
6930   test -z "${LDCXX+set}" || LD=$LDCXX
6931   CC=${CXX-"c++"}
6932   CFLAGS=$CXXFLAGS
6933   compiler=$CC
6934   _LT_TAGVAR(compiler, $1)=$CC
6935   _LT_CC_BASENAME([$compiler])
6936
6937   if test -n "$compiler"; then
6938     # We don't want -fno-exception when compiling C++ code, so set the
6939     # no_builtin_flag separately
6940     if test "$GXX" = yes; then
6941       _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
6942     else
6943       _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6944     fi
6945
6946     if test "$GXX" = yes; then
6947       # Set up default GNU C++ configuration
6948
6949       LT_PATH_LD
6950
6951       # Check if GNU C++ uses GNU ld as the underlying linker, since the
6952       # archiving commands below assume that GNU ld is being used.
6953       if test "$with_gnu_ld" = yes; then
6954         _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6955         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6956
6957         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6958         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6959
6960         # If archive_cmds runs LD, not CC, wlarc should be empty
6961         # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
6962         #     investigate it a little bit more. (MM)
6963         wlarc='${wl}'
6964
6965         # ancient GNU ld didn't support --whole-archive et. al.
6966         if eval "`$CC -print-prog-name=ld` --help 2>&1" |
6967           $GREP 'no-whole-archive' > /dev/null; then
6968           _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6969         else
6970           _LT_TAGVAR(whole_archive_flag_spec, $1)=
6971         fi
6972       else
6973         with_gnu_ld=no
6974         wlarc=
6975
6976         # A generic and very simple default shared library creation
6977         # command for GNU C++ for the case where it uses the native
6978         # linker, instead of GNU ld.  If possible, this setting should
6979         # overridden to take advantage of the native linker features on
6980         # the platform it is being used on.
6981         _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6982       fi
6983
6984       # Commands to make compiler produce verbose output that lists
6985       # what "hidden" libraries, object files and flags are used when
6986       # linking a shared library.
6987       output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6988
6989     else
6990       GXX=no
6991       with_gnu_ld=no
6992       wlarc=
6993     fi
6994
6995     # PORTME: fill in a description of your system's C++ link characteristics
6996     AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6997     _LT_TAGVAR(ld_shlibs, $1)=yes
6998     case $host_os in
6999       aix3*)
7000         # FIXME: insert proper C++ library support
7001         _LT_TAGVAR(ld_shlibs, $1)=no
7002         ;;
7003       aix[[4-9]]*)
7004         if test "$host_cpu" = ia64; then
7005           # On IA64, the linker does run time linking by default, so we don't
7006           # have to do anything special.
7007           aix_use_runtimelinking=no
7008           exp_sym_flag='-Bexport'
7009           no_entry_flag=""
7010         else
7011           aix_use_runtimelinking=no
7012
7013           # Test if we are trying to use run time linking or normal
7014           # AIX style linking. If -brtl is somewhere in LDFLAGS, we
7015           # need to do runtime linking.
7016           case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
7017             for ld_flag in $LDFLAGS; do
7018               case $ld_flag in
7019               *-brtl*)
7020                 aix_use_runtimelinking=yes
7021                 break
7022                 ;;
7023               esac
7024             done
7025             ;;
7026           esac
7027
7028           exp_sym_flag='-bexport'
7029           no_entry_flag='-bnoentry'
7030         fi
7031
7032         # When large executables or shared objects are built, AIX ld can
7033         # have problems creating the table of contents.  If linking a library
7034         # or program results in "error TOC overflow" add -mminimal-toc to
7035         # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
7036         # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7037
7038         _LT_TAGVAR(archive_cmds, $1)=''
7039         _LT_TAGVAR(hardcode_direct, $1)=yes
7040         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7041         _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7042         _LT_TAGVAR(link_all_deplibs, $1)=yes
7043         _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
7044
7045         if test "$GXX" = yes; then
7046           case $host_os in aix4.[[012]]|aix4.[[012]].*)
7047           # We only want to do this on AIX 4.2 and lower, the check
7048           # below for broken collect2 doesn't work under 4.3+
7049           collect2name=`${CC} -print-prog-name=collect2`
7050           if test -f "$collect2name" &&
7051              strings "$collect2name" | $GREP resolve_lib_name >/dev/null
7052           then
7053             # We have reworked collect2
7054             :
7055           else
7056             # We have old collect2
7057             _LT_TAGVAR(hardcode_direct, $1)=unsupported
7058             # It fails to find uninstalled libraries when the uninstalled
7059             # path is not listed in the libpath.  Setting hardcode_minus_L
7060             # to unsupported forces relinking
7061             _LT_TAGVAR(hardcode_minus_L, $1)=yes
7062             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7063             _LT_TAGVAR(hardcode_libdir_separator, $1)=
7064           fi
7065           esac
7066           shared_flag='-shared'
7067           if test "$aix_use_runtimelinking" = yes; then
7068             shared_flag="$shared_flag "'${wl}-G'
7069           fi
7070         else
7071           # not using gcc
7072           if test "$host_cpu" = ia64; then
7073           # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
7074           # chokes on -Wl,-G. The following line is correct:
7075           shared_flag='-G'
7076           else
7077             if test "$aix_use_runtimelinking" = yes; then
7078               shared_flag='${wl}-G'
7079             else
7080               shared_flag='${wl}-bM:SRE'
7081             fi
7082           fi
7083         fi
7084
7085         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
7086         # It seems that -bexpall does not export symbols beginning with
7087         # underscore (_), so it is better to generate a list of symbols to
7088         # export.
7089         _LT_TAGVAR(always_export_symbols, $1)=yes
7090         if test "$aix_use_runtimelinking" = yes; then
7091           # Warning - without using the other runtime loading flags (-brtl),
7092           # -berok will link without error, but may produce a broken library.
7093           _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
7094           # Determine the default libpath from the value encoded in an empty
7095           # executable.
7096           _LT_SYS_MODULE_PATH_AIX([$1])
7097           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7098
7099           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
7100         else
7101           if test "$host_cpu" = ia64; then
7102             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
7103             _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
7104             _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
7105           else
7106             # Determine the default libpath from the value encoded in an
7107             # empty executable.
7108             _LT_SYS_MODULE_PATH_AIX([$1])
7109             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7110             # Warning - without using the other run time loading flags,
7111             # -berok will link without error, but may produce a broken library.
7112             _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
7113             _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
7114             if test "$with_gnu_ld" = yes; then
7115               # We only use this code for GNU lds that support --whole-archive.
7116               _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
7117             else
7118               # Exported symbols can be pulled into shared objects from archives
7119               _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
7120             fi
7121             _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7122             # This is similar to how AIX traditionally builds its shared
7123             # libraries.
7124             _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
7125           fi
7126         fi
7127         ;;
7128
7129       beos*)
7130         if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
7131           _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7132           # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
7133           # support --undefined.  This deserves some investigation.  FIXME
7134           _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7135         else
7136           _LT_TAGVAR(ld_shlibs, $1)=no
7137         fi
7138         ;;
7139
7140       chorus*)
7141         case $cc_basename in
7142           *)
7143           # FIXME: insert proper C++ library support
7144           _LT_TAGVAR(ld_shlibs, $1)=no
7145           ;;
7146         esac
7147         ;;
7148
7149       cygwin* | mingw* | pw32* | cegcc*)
7150         case $GXX,$cc_basename in
7151         ,cl* | no,cl*)
7152           # Native MSVC
7153           # hardcode_libdir_flag_spec is actually meaningless, as there is
7154           # no search path for DLLs.
7155           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
7156           _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7157           _LT_TAGVAR(always_export_symbols, $1)=yes
7158           _LT_TAGVAR(file_list_spec, $1)='@'
7159           # Tell ltmain to make .lib files, not .a files.
7160           libext=lib
7161           # Tell ltmain to make .dll files, not .so files.
7162           shrext_cmds=".dll"
7163           # FIXME: Setting linknames here is a bad hack.
7164           _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
7165           _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7166               $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
7167             else
7168               $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
7169             fi~
7170             $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
7171             linknames='
7172           # The linker will not automatically build a static lib if we build a DLL.
7173           # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
7174           _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7175           # Don't use ranlib
7176           _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
7177           _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
7178             lt_tool_outputfile="@TOOL_OUTPUT@"~
7179             case $lt_outputfile in
7180               *.exe|*.EXE) ;;
7181               *)
7182                 lt_outputfile="$lt_outputfile.exe"
7183                 lt_tool_outputfile="$lt_tool_outputfile.exe"
7184                 ;;
7185             esac~
7186             func_to_tool_file "$lt_outputfile"~
7187             if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
7188               $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
7189               $RM "$lt_outputfile.manifest";
7190             fi'
7191           ;;
7192         *)
7193           # g++
7194           # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
7195           # as there is no search path for DLLs.
7196           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7197           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
7198           _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7199           _LT_TAGVAR(always_export_symbols, $1)=no
7200           _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7201
7202           if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
7203             _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
7204             # If the export-symbols file already is a .def file (1st line
7205             # is EXPORTS), use it as is; otherwise, prepend...
7206             _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7207               cp $export_symbols $output_objdir/$soname.def;
7208             else
7209               echo EXPORTS > $output_objdir/$soname.def;
7210               cat $export_symbols >> $output_objdir/$soname.def;
7211             fi~
7212             $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
7213           else
7214             _LT_TAGVAR(ld_shlibs, $1)=no
7215           fi
7216           ;;
7217         esac
7218         ;;
7219       darwin* | rhapsody*)
7220         _LT_DARWIN_LINKER_FEATURES($1)
7221         ;;
7222
7223       dgux*)
7224         case $cc_basename in
7225           ec++*)
7226             # FIXME: insert proper C++ library support
7227             _LT_TAGVAR(ld_shlibs, $1)=no
7228             ;;
7229           ghcx*)
7230             # Green Hills C++ Compiler
7231             # FIXME: insert proper C++ library support
7232             _LT_TAGVAR(ld_shlibs, $1)=no
7233             ;;
7234           *)
7235             # FIXME: insert proper C++ library support
7236             _LT_TAGVAR(ld_shlibs, $1)=no
7237             ;;
7238         esac
7239         ;;
7240
7241       freebsd2.*)
7242         # C++ shared libraries reported to be fairly broken before
7243         # switch to ELF
7244         _LT_TAGVAR(ld_shlibs, $1)=no
7245         ;;
7246
7247       freebsd-elf*)
7248         _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7249         ;;
7250
7251       freebsd* | dragonfly*)
7252         # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
7253         # conventions
7254         _LT_TAGVAR(ld_shlibs, $1)=yes
7255         ;;
7256
7257       gnu*)
7258         ;;
7259
7260       haiku*)
7261         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7262         _LT_TAGVAR(link_all_deplibs, $1)=yes
7263         ;;
7264
7265       hpux9*)
7266         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7267         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7268         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7269         _LT_TAGVAR(hardcode_direct, $1)=yes
7270         _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7271                                              # but as the default
7272                                              # location of the library.
7273
7274         case $cc_basename in
7275           CC*)
7276             # FIXME: insert proper C++ library support
7277             _LT_TAGVAR(ld_shlibs, $1)=no
7278             ;;
7279           aCC*)
7280             _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
7281             # Commands to make compiler produce verbose output that lists
7282             # what "hidden" libraries, object files and flags are used when
7283             # linking a shared library.
7284             #
7285             # There doesn't appear to be a way to prevent this compiler from
7286             # explicitly linking system object files so we need to strip them
7287             # from the output so that they don't get included in the library
7288             # dependencies.
7289             output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
7290             ;;
7291           *)
7292             if test "$GXX" = yes; then
7293               _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${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'
7294             else
7295               # FIXME: insert proper C++ library support
7296               _LT_TAGVAR(ld_shlibs, $1)=no
7297             fi
7298             ;;
7299         esac
7300         ;;
7301
7302       hpux10*|hpux11*)
7303         if test $with_gnu_ld = no; then
7304           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7305           _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7306
7307           case $host_cpu in
7308             hppa*64*|ia64*)
7309               ;;
7310             *)
7311               _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7312               ;;
7313           esac
7314         fi
7315         case $host_cpu in
7316           hppa*64*|ia64*)
7317             _LT_TAGVAR(hardcode_direct, $1)=no
7318             _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7319             ;;
7320           *)
7321             _LT_TAGVAR(hardcode_direct, $1)=yes
7322             _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7323             _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7324                                                  # but as the default
7325                                                  # location of the library.
7326             ;;
7327         esac
7328
7329         case $cc_basename in
7330           CC*)
7331             # FIXME: insert proper C++ library support
7332             _LT_TAGVAR(ld_shlibs, $1)=no
7333             ;;
7334           aCC*)
7335             case $host_cpu in
7336               hppa*64*)
7337                 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7338                 ;;
7339               ia64*)
7340                 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7341                 ;;
7342               *)
7343                 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7344                 ;;
7345             esac
7346             # Commands to make compiler produce verbose output that lists
7347             # what "hidden" libraries, object files and flags are used when
7348             # linking a shared library.
7349             #
7350             # There doesn't appear to be a way to prevent this compiler from
7351             # explicitly linking system object files so we need to strip them
7352             # from the output so that they don't get included in the library
7353             # dependencies.
7354             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; func_echo_all "$list"'
7355             ;;
7356           *)
7357             if test "$GXX" = yes; then
7358               if test $with_gnu_ld = no; then
7359                 case $host_cpu in
7360                   hppa*64*)
7361                     _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7362                     ;;
7363                   ia64*)
7364                     _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7365                     ;;
7366                   *)
7367                     _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7368                     ;;
7369                 esac
7370               fi
7371             else
7372               # FIXME: insert proper C++ library support
7373               _LT_TAGVAR(ld_shlibs, $1)=no
7374             fi
7375             ;;
7376         esac
7377         ;;
7378
7379       interix[[3-9]]*)
7380         _LT_TAGVAR(hardcode_direct, $1)=no
7381         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7382         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7383         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7384         # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
7385         # Instead, shared libraries are loaded at an image base (0x10000000 by
7386         # default) and relocated if they conflict, which is a slow very memory
7387         # consuming and fragmenting process.  To avoid this, we pick a random,
7388         # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
7389         # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
7390         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
7391         _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
7392         ;;
7393       irix5* | irix6*)
7394         case $cc_basename in
7395           CC*)
7396             # SGI C++
7397             _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
7398
7399             # Archives containing C++ object files must be created using
7400             # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
7401             # necessary to make sure instantiated templates are included
7402             # in the archive.
7403             _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
7404             ;;
7405           *)
7406             if test "$GXX" = yes; then
7407               if test "$with_gnu_ld" = no; then
7408                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7409               else
7410                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
7411               fi
7412             fi
7413             _LT_TAGVAR(link_all_deplibs, $1)=yes
7414             ;;
7415         esac
7416         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7417         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7418         _LT_TAGVAR(inherit_rpath, $1)=yes
7419         ;;
7420
7421       linux* | k*bsd*-gnu | kopensolaris*-gnu)
7422         case $cc_basename in
7423           KCC*)
7424             # Kuck and Associates, Inc. (KAI) C++ Compiler
7425
7426             # KCC will only create a shared library if the output file
7427             # ends with ".so" (or ".sl" for HP-UX), so rename the library
7428             # to its proper name (with version) after linking.
7429             _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
7430             _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
7431             # Commands to make compiler produce verbose output that lists
7432             # what "hidden" libraries, object files and flags are used when
7433             # linking a shared library.
7434             #
7435             # There doesn't appear to be a way to prevent this compiler from
7436             # explicitly linking system object files so we need to strip them
7437             # from the output so that they don't get included in the library
7438             # dependencies.
7439             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; func_echo_all "$list"'
7440
7441             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7442             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7443
7444             # Archives containing C++ object files must be created using
7445             # "CC -Bstatic", where "CC" is the KAI C++ compiler.
7446             _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
7447             ;;
7448           icpc* | ecpc* )
7449             # Intel C++
7450             with_gnu_ld=yes
7451             # version 8.0 and above of icpc choke on multiply defined symbols
7452             # if we add $predep_objects and $postdep_objects, however 7.1 and
7453             # earlier do not add the objects themselves.
7454             case `$CC -V 2>&1` in
7455               *"Version 7."*)
7456                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7457                 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7458                 ;;
7459               *)  # Version 8.0 or newer
7460                 tmp_idyn=
7461                 case $host_cpu in
7462                   ia64*) tmp_idyn=' -i_dynamic';;
7463                 esac
7464                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7465                 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7466                 ;;
7467             esac
7468             _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7469             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7470             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7471             _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
7472             ;;
7473           pgCC* | pgcpp*)
7474             # Portland Group C++ compiler
7475             case `$CC -V` in
7476             *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
7477               _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
7478                 rm -rf $tpldir~
7479                 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
7480                 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
7481               _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
7482                 rm -rf $tpldir~
7483                 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
7484                 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
7485                 $RANLIB $oldlib'
7486               _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
7487                 rm -rf $tpldir~
7488                 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7489                 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7490               _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
7491                 rm -rf $tpldir~
7492                 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7493                 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
7494               ;;
7495             *) # Version 6 and above use weak symbols
7496               _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7497               _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
7498               ;;
7499             esac
7500
7501             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
7502             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7503             _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
7504             ;;
7505           cxx*)
7506             # Compaq C++
7507             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7508             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
7509
7510             runpath_var=LD_RUN_PATH
7511             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7512             _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7513
7514             # Commands to make compiler produce verbose output that lists
7515             # what "hidden" libraries, object files and flags are used when
7516             # linking a shared library.
7517             #
7518             # There doesn't appear to be a way to prevent this compiler from
7519             # explicitly linking system object files so we need to strip them
7520             # from the output so that they don't get included in the library
7521             # dependencies.
7522             output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$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; func_echo_all "X$list" | $Xsed'
7523             ;;
7524           xl* | mpixl* | bgxl*)
7525             # IBM XL 8.0 on PPC, with GNU ld
7526             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7527             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7528             _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7529             if test "x$supports_anon_versioning" = xyes; then
7530               _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7531                 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7532                 echo "local: *; };" >> $output_objdir/$libname.ver~
7533                 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
7534             fi
7535             ;;
7536           *)
7537             case `$CC -V 2>&1 | sed 5q` in
7538             *Sun\ C*)
7539               # Sun C++ 5.9
7540               _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7541               _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7542               _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
7543               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7544               _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
7545               _LT_TAGVAR(compiler_needs_object, $1)=yes
7546
7547               # Not sure whether something based on
7548               # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
7549               # would be better.
7550               output_verbose_link_cmd='func_echo_all'
7551
7552               # Archives containing C++ object files must be created using
7553               # "CC -xar", where "CC" is the Sun C++ compiler.  This is
7554               # necessary to make sure instantiated templates are included
7555               # in the archive.
7556               _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7557               ;;
7558             esac
7559             ;;
7560         esac
7561         ;;
7562
7563       lynxos*)
7564         # FIXME: insert proper C++ library support
7565         _LT_TAGVAR(ld_shlibs, $1)=no
7566         ;;
7567
7568       m88k*)
7569         # FIXME: insert proper C++ library support
7570         _LT_TAGVAR(ld_shlibs, $1)=no
7571         ;;
7572
7573       mvs*)
7574         case $cc_basename in
7575           cxx*)
7576             # FIXME: insert proper C++ library support
7577             _LT_TAGVAR(ld_shlibs, $1)=no
7578             ;;
7579           *)
7580             # FIXME: insert proper C++ library support
7581             _LT_TAGVAR(ld_shlibs, $1)=no
7582             ;;
7583         esac
7584         ;;
7585
7586       netbsd*)
7587         if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7588           _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
7589           wlarc=
7590           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7591           _LT_TAGVAR(hardcode_direct, $1)=yes
7592           _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7593         fi
7594         # Workaround some broken pre-1.5 toolchains
7595         output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
7596         ;;
7597
7598       *nto* | *qnx*)
7599         _LT_TAGVAR(ld_shlibs, $1)=yes
7600         ;;
7601
7602       openbsd2*)
7603         # C++ shared libraries are fairly broken
7604         _LT_TAGVAR(ld_shlibs, $1)=no
7605         ;;
7606
7607       openbsd*)
7608         if test -f /usr/libexec/ld.so; then
7609           _LT_TAGVAR(hardcode_direct, $1)=yes
7610           _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7611           _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7612           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7613           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7614           if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7615             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
7616             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7617             _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7618           fi
7619           output_verbose_link_cmd=func_echo_all
7620         else
7621           _LT_TAGVAR(ld_shlibs, $1)=no
7622         fi
7623         ;;
7624
7625       osf3* | osf4* | osf5*)
7626         case $cc_basename in
7627           KCC*)
7628             # Kuck and Associates, Inc. (KAI) C++ Compiler
7629
7630             # KCC will only create a shared library if the output file
7631             # ends with ".so" (or ".sl" for HP-UX), so rename the library
7632             # to its proper name (with version) after linking.
7633             _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
7634
7635             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7636             _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7637
7638             # Archives containing C++ object files must be created using
7639             # the KAI C++ compiler.
7640             case $host in
7641               osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
7642               *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
7643             esac
7644             ;;
7645           RCC*)
7646             # Rational C++ 2.4.1
7647             # FIXME: insert proper C++ library support
7648             _LT_TAGVAR(ld_shlibs, $1)=no
7649             ;;
7650           cxx*)
7651             case $host in
7652               osf3*)
7653                 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7654                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
7655                 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7656                 ;;
7657               *)
7658                 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7659                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
7660                 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
7661                   echo "-hidden">> $lib.exp~
7662                   $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~
7663                   $RM $lib.exp'
7664                 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7665                 ;;
7666             esac
7667
7668             _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7669
7670             # Commands to make compiler produce verbose output that lists
7671             # what "hidden" libraries, object files and flags are used when
7672             # linking a shared library.
7673             #
7674             # There doesn't appear to be a way to prevent this compiler from
7675             # explicitly linking system object files so we need to strip them
7676             # from the output so that they don't get included in the library
7677             # dependencies.
7678             output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$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; func_echo_all "$list"'
7679             ;;
7680           *)
7681             if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7682               _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7683               case $host in
7684                 osf3*)
7685                   _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7686                   ;;
7687                 *)
7688                   _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7689                   ;;
7690               esac
7691
7692               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7693               _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7694
7695               # Commands to make compiler produce verbose output that lists
7696               # what "hidden" libraries, object files and flags are used when
7697               # linking a shared library.
7698               output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7699
7700             else
7701               # FIXME: insert proper C++ library support
7702               _LT_TAGVAR(ld_shlibs, $1)=no
7703             fi
7704             ;;
7705         esac
7706         ;;
7707
7708       psos*)
7709         # FIXME: insert proper C++ library support
7710         _LT_TAGVAR(ld_shlibs, $1)=no
7711         ;;
7712
7713       sunos4*)
7714         case $cc_basename in
7715           CC*)
7716             # Sun C++ 4.x
7717             # FIXME: insert proper C++ library support
7718             _LT_TAGVAR(ld_shlibs, $1)=no
7719             ;;
7720           lcc*)
7721             # Lucid
7722             # FIXME: insert proper C++ library support
7723             _LT_TAGVAR(ld_shlibs, $1)=no
7724             ;;
7725           *)
7726             # FIXME: insert proper C++ library support
7727             _LT_TAGVAR(ld_shlibs, $1)=no
7728             ;;
7729         esac
7730         ;;
7731
7732       solaris*)
7733         case $cc_basename in
7734           CC* | sunCC*)
7735             # Sun C++ 4.2, 5.x and Centerline C++
7736             _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
7737             _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7738             _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7739             _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7740               $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7741
7742             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7743             _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7744             case $host_os in
7745               solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7746               *)
7747                 # The compiler driver will combine and reorder linker options,
7748                 # but understands `-z linker_flag'.
7749                 # Supported since Solaris 2.6 (maybe 2.5.1?)
7750                 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7751                 ;;
7752             esac
7753             _LT_TAGVAR(link_all_deplibs, $1)=yes
7754
7755             output_verbose_link_cmd='func_echo_all'
7756
7757             # Archives containing C++ object files must be created using
7758             # "CC -xar", where "CC" is the Sun C++ compiler.  This is
7759             # necessary to make sure instantiated templates are included
7760             # in the archive.
7761             _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7762             ;;
7763           gcx*)
7764             # Green Hills C++ Compiler
7765             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7766
7767             # The C++ compiler must be used to create the archive.
7768             _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
7769             ;;
7770           *)
7771             # GNU C++ compiler with Solaris linker
7772             if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7773               _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
7774               if $CC --version | $GREP -v '^2\.7' > /dev/null; then
7775                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7776                 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7777                   $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7778
7779                 # Commands to make compiler produce verbose output that lists
7780                 # what "hidden" libraries, object files and flags are used when
7781                 # linking a shared library.
7782                 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7783               else
7784                 # g++ 2.7 appears to require `-G' NOT `-shared' on this
7785                 # platform.
7786                 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7787                 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7788                   $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7789
7790                 # Commands to make compiler produce verbose output that lists
7791                 # what "hidden" libraries, object files and flags are used when
7792                 # linking a shared library.
7793                 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7794               fi
7795
7796               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
7797               case $host_os in
7798                 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7799                 *)
7800                   _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
7801                   ;;
7802               esac
7803             fi
7804             ;;
7805         esac
7806         ;;
7807
7808     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7809       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7810       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7811       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7812       runpath_var='LD_RUN_PATH'
7813
7814       case $cc_basename in
7815         CC*)
7816           _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7817           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7818           ;;
7819         *)
7820           _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7821           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7822           ;;
7823       esac
7824       ;;
7825
7826       sysv5* | sco3.2v5* | sco5v6*)
7827         # Note: We can NOT use -z defs as we might desire, because we do not
7828         # link with -lc, and that would cause any symbols used from libc to
7829         # always be unresolved, which means just about no library would
7830         # ever link correctly.  If we're not using GNU ld we use -z text
7831         # though, which does catch some bad symbols but isn't as heavy-handed
7832         # as -z defs.
7833         _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7834         _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
7835         _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7836         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7837         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
7838         _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7839         _LT_TAGVAR(link_all_deplibs, $1)=yes
7840         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
7841         runpath_var='LD_RUN_PATH'
7842
7843         case $cc_basename in
7844           CC*)
7845             _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7846             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7847             _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
7848               '"$_LT_TAGVAR(old_archive_cmds, $1)"
7849             _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
7850               '"$_LT_TAGVAR(reload_cmds, $1)"
7851             ;;
7852           *)
7853             _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7854             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7855             ;;
7856         esac
7857       ;;
7858
7859       tandem*)
7860         case $cc_basename in
7861           NCC*)
7862             # NonStop-UX NCC 3.20
7863             # FIXME: insert proper C++ library support
7864             _LT_TAGVAR(ld_shlibs, $1)=no
7865             ;;
7866           *)
7867             # FIXME: insert proper C++ library support
7868             _LT_TAGVAR(ld_shlibs, $1)=no
7869             ;;
7870         esac
7871         ;;
7872
7873       vxworks*)
7874         # FIXME: insert proper C++ library support
7875         _LT_TAGVAR(ld_shlibs, $1)=no
7876         ;;
7877
7878       *)
7879         # FIXME: insert proper C++ library support
7880         _LT_TAGVAR(ld_shlibs, $1)=no
7881         ;;
7882     esac
7883
7884     AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7885     test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7886
7887     _LT_TAGVAR(GCC, $1)="$GXX"
7888     _LT_TAGVAR(LD, $1)="$LD"
7889
7890     ## CAVEAT EMPTOR:
7891     ## There is no encapsulation within the following macros, do not change
7892     ## the running order or otherwise move them around unless you know exactly
7893     ## what you are doing...
7894     _LT_SYS_HIDDEN_LIBDEPS($1)
7895     _LT_COMPILER_PIC($1)
7896     _LT_COMPILER_C_O($1)
7897     _LT_COMPILER_FILE_LOCKS($1)
7898     _LT_LINKER_SHLIBS($1)
7899     _LT_SYS_DYNAMIC_LINKER($1)
7900     _LT_LINKER_HARDCODE_LIBPATH($1)
7901
7902     _LT_CONFIG($1)
7903   fi # test -n "$compiler"
7904
7905   CC=$lt_save_CC
7906   CFLAGS=$lt_save_CFLAGS
7907   LDCXX=$LD
7908   LD=$lt_save_LD
7909   GCC=$lt_save_GCC
7910   with_gnu_ld=$lt_save_with_gnu_ld
7911   lt_cv_path_LDCXX=$lt_cv_path_LD
7912   lt_cv_path_LD=$lt_save_path_LD
7913   lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
7914   lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
7915 fi # test "$_lt_caught_CXX_error" != yes
7916
7917 AC_LANG_POP
7918 ])# _LT_LANG_CXX_CONFIG
7919
7920
7921 # _LT_FUNC_STRIPNAME_CNF
7922 # ----------------------
7923 # func_stripname_cnf prefix suffix name
7924 # strip PREFIX and SUFFIX off of NAME.
7925 # PREFIX and SUFFIX must not contain globbing or regex special
7926 # characters, hashes, percent signs, but SUFFIX may contain a leading
7927 # dot (in which case that matches only a dot).
7928 #
7929 # This function is identical to the (non-XSI) version of func_stripname,
7930 # except this one can be used by m4 code that may be executed by configure,
7931 # rather than the libtool script.
7932 m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
7933 AC_REQUIRE([_LT_DECL_SED])
7934 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
7935 func_stripname_cnf ()
7936 {
7937   case ${2} in
7938   .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
7939   *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
7940   esac
7941 } # func_stripname_cnf
7942 ])# _LT_FUNC_STRIPNAME_CNF
7943
7944 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
7945 # ---------------------------------
7946 # Figure out "hidden" library dependencies from verbose
7947 # compiler output when linking a shared library.
7948 # Parse the compiler output and extract the necessary
7949 # objects, libraries and library flags.
7950 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
7951 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7952 AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
7953 # Dependencies to place before and after the object being linked:
7954 _LT_TAGVAR(predep_objects, $1)=
7955 _LT_TAGVAR(postdep_objects, $1)=
7956 _LT_TAGVAR(predeps, $1)=
7957 _LT_TAGVAR(postdeps, $1)=
7958 _LT_TAGVAR(compiler_lib_search_path, $1)=
7959
7960 dnl we can't use the lt_simple_compile_test_code here,
7961 dnl because it contains code intended for an executable,
7962 dnl not a library.  It's possible we should let each
7963 dnl tag define a new lt_????_link_test_code variable,
7964 dnl but it's only used here...
7965 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
7966 int a;
7967 void foo (void) { a = 0; }
7968 _LT_EOF
7969 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
7970 class Foo
7971 {
7972 public:
7973   Foo (void) { a = 0; }
7974 private:
7975   int a;
7976 };
7977 _LT_EOF
7978 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
7979       subroutine foo
7980       implicit none
7981       integer*4 a
7982       a=0
7983       return
7984       end
7985 _LT_EOF
7986 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
7987       subroutine foo
7988       implicit none
7989       integer a
7990       a=0
7991       return
7992       end
7993 _LT_EOF
7994 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
7995 public class foo {
7996   private int a;
7997   public void bar (void) {
7998     a = 0;
7999   }
8000 };
8001 _LT_EOF
8002 ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
8003 package foo
8004 func foo() {
8005 }
8006 _LT_EOF
8007 ])
8008
8009 _lt_libdeps_save_CFLAGS=$CFLAGS
8010 case "$CC $CFLAGS " in #(
8011 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
8012 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
8013 *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
8014 esac
8015
8016 dnl Parse the compiler output and extract the necessary
8017 dnl objects, libraries and library flags.
8018 if AC_TRY_EVAL(ac_compile); then
8019   # Parse the compiler output and extract the necessary
8020   # objects, libraries and library flags.
8021
8022   # Sentinel used to keep track of whether or not we are before
8023   # the conftest object file.
8024   pre_test_object_deps_done=no
8025
8026   for p in `eval "$output_verbose_link_cmd"`; do
8027     case ${prev}${p} in
8028
8029     -L* | -R* | -l*)
8030        # Some compilers place space between "-{L,R}" and the path.
8031        # Remove the space.
8032        if test $p = "-L" ||
8033           test $p = "-R"; then
8034          prev=$p
8035          continue
8036        fi
8037
8038        # Expand the sysroot to ease extracting the directories later.
8039        if test -z "$prev"; then
8040          case $p in
8041          -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
8042          -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
8043          -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
8044          esac
8045        fi
8046        case $p in
8047        =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
8048        esac
8049        if test "$pre_test_object_deps_done" = no; then
8050          case ${prev} in
8051          -L | -R)
8052            # Internal compiler library paths should come after those
8053            # provided the user.  The postdeps already come after the
8054            # user supplied libs so there is no need to process them.
8055            if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
8056              _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
8057            else
8058              _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
8059            fi
8060            ;;
8061          # The "-l" case would never come before the object being
8062          # linked, so don't bother handling this case.
8063          esac
8064        else
8065          if test -z "$_LT_TAGVAR(postdeps, $1)"; then
8066            _LT_TAGVAR(postdeps, $1)="${prev}${p}"
8067          else
8068            _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
8069          fi
8070        fi
8071        prev=
8072        ;;
8073
8074     *.lto.$objext) ;; # Ignore GCC LTO objects
8075     *.$objext)
8076        # This assumes that the test object file only shows up
8077        # once in the compiler output.
8078        if test "$p" = "conftest.$objext"; then
8079          pre_test_object_deps_done=yes
8080          continue
8081        fi
8082
8083        if test "$pre_test_object_deps_done" = no; then
8084          if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
8085            _LT_TAGVAR(predep_objects, $1)="$p"
8086          else
8087            _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
8088          fi
8089        else
8090          if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
8091            _LT_TAGVAR(postdep_objects, $1)="$p"
8092          else
8093            _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
8094          fi
8095        fi
8096        ;;
8097
8098     *) ;; # Ignore the rest.
8099
8100     esac
8101   done
8102
8103   # Clean up.
8104   rm -f a.out a.exe
8105 else
8106   echo "libtool.m4: error: problem compiling $1 test program"
8107 fi
8108
8109 $RM -f confest.$objext
8110 CFLAGS=$_lt_libdeps_save_CFLAGS
8111
8112 # PORTME: override above test on systems where it is broken
8113 m4_if([$1], [CXX],
8114 [case $host_os in
8115 interix[[3-9]]*)
8116   # Interix 3.5 installs completely hosed .la files for C++, so rather than
8117   # hack all around it, let's just trust "g++" to DTRT.
8118   _LT_TAGVAR(predep_objects,$1)=
8119   _LT_TAGVAR(postdep_objects,$1)=
8120   _LT_TAGVAR(postdeps,$1)=
8121   ;;
8122
8123 linux*)
8124   case `$CC -V 2>&1 | sed 5q` in
8125   *Sun\ C*)
8126     # Sun C++ 5.9
8127
8128     # The more standards-conforming stlport4 library is
8129     # incompatible with the Cstd library. Avoid specifying
8130     # it if it's in CXXFLAGS. Ignore libCrun as
8131     # -library=stlport4 depends on it.
8132     case " $CXX $CXXFLAGS " in
8133     *" -library=stlport4 "*)
8134       solaris_use_stlport4=yes
8135       ;;
8136     esac
8137
8138     if test "$solaris_use_stlport4" != yes; then
8139       _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8140     fi
8141     ;;
8142   esac
8143   ;;
8144
8145 solaris*)
8146   case $cc_basename in
8147   CC* | sunCC*)
8148     # The more standards-conforming stlport4 library is
8149     # incompatible with the Cstd library. Avoid specifying
8150     # it if it's in CXXFLAGS. Ignore libCrun as
8151     # -library=stlport4 depends on it.
8152     case " $CXX $CXXFLAGS " in
8153     *" -library=stlport4 "*)
8154       solaris_use_stlport4=yes
8155       ;;
8156     esac
8157
8158     # Adding this requires a known-good setup of shared libraries for
8159     # Sun compiler versions before 5.6, else PIC objects from an old
8160     # archive will be linked into the output, leading to subtle bugs.
8161     if test "$solaris_use_stlport4" != yes; then
8162       _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8163     fi
8164     ;;
8165   esac
8166   ;;
8167 esac
8168 ])
8169
8170 case " $_LT_TAGVAR(postdeps, $1) " in
8171 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
8172 esac
8173  _LT_TAGVAR(compiler_lib_search_dirs, $1)=
8174 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
8175  _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
8176 fi
8177 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
8178     [The directories searched by this compiler when creating a shared library])
8179 _LT_TAGDECL([], [predep_objects], [1],
8180     [Dependencies to place before and after the objects being linked to
8181     create a shared library])
8182 _LT_TAGDECL([], [postdep_objects], [1])
8183 _LT_TAGDECL([], [predeps], [1])
8184 _LT_TAGDECL([], [postdeps], [1])
8185 _LT_TAGDECL([], [compiler_lib_search_path], [1],
8186     [The library search path used internally by the compiler when linking
8187     a shared library])
8188 ])# _LT_SYS_HIDDEN_LIBDEPS
8189
8190
8191 # _LT_LANG_F77_CONFIG([TAG])
8192 # --------------------------
8193 # Ensure that the configuration variables for a Fortran 77 compiler are
8194 # suitably defined.  These variables are subsequently used by _LT_CONFIG
8195 # to write the compiler configuration to `libtool'.
8196 m4_defun([_LT_LANG_F77_CONFIG],
8197 [AC_LANG_PUSH(Fortran 77)
8198 if test -z "$F77" || test "X$F77" = "Xno"; then
8199   _lt_disable_F77=yes
8200 fi
8201
8202 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8203 _LT_TAGVAR(allow_undefined_flag, $1)=
8204 _LT_TAGVAR(always_export_symbols, $1)=no
8205 _LT_TAGVAR(archive_expsym_cmds, $1)=
8206 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
8207 _LT_TAGVAR(hardcode_direct, $1)=no
8208 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
8209 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8210 _LT_TAGVAR(hardcode_libdir_separator, $1)=
8211 _LT_TAGVAR(hardcode_minus_L, $1)=no
8212 _LT_TAGVAR(hardcode_automatic, $1)=no
8213 _LT_TAGVAR(inherit_rpath, $1)=no
8214 _LT_TAGVAR(module_cmds, $1)=
8215 _LT_TAGVAR(module_expsym_cmds, $1)=
8216 _LT_TAGVAR(link_all_deplibs, $1)=unknown
8217 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8218 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8219 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8220 _LT_TAGVAR(no_undefined_flag, $1)=
8221 _LT_TAGVAR(whole_archive_flag_spec, $1)=
8222 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8223
8224 # Source file extension for f77 test sources.
8225 ac_ext=f
8226
8227 # Object file extension for compiled f77 test sources.
8228 objext=o
8229 _LT_TAGVAR(objext, $1)=$objext
8230
8231 # No sense in running all these tests if we already determined that
8232 # the F77 compiler isn't working.  Some variables (like enable_shared)
8233 # are currently assumed to apply to all compilers on this platform,
8234 # and will be corrupted by setting them based on a non-working compiler.
8235 if test "$_lt_disable_F77" != yes; then
8236   # Code to be used in simple compile tests
8237   lt_simple_compile_test_code="\
8238       subroutine t
8239       return
8240       end
8241 "
8242
8243   # Code to be used in simple link tests
8244   lt_simple_link_test_code="\
8245       program t
8246       end
8247 "
8248
8249   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8250   _LT_TAG_COMPILER
8251
8252   # save warnings/boilerplate of simple test code
8253   _LT_COMPILER_BOILERPLATE
8254   _LT_LINKER_BOILERPLATE
8255
8256   # Allow CC to be a program name with arguments.
8257   lt_save_CC="$CC"
8258   lt_save_GCC=$GCC
8259   lt_save_CFLAGS=$CFLAGS
8260   CC=${F77-"f77"}
8261   CFLAGS=$FFLAGS
8262   compiler=$CC
8263   _LT_TAGVAR(compiler, $1)=$CC
8264   _LT_CC_BASENAME([$compiler])
8265   GCC=$G77
8266   if test -n "$compiler"; then
8267     AC_MSG_CHECKING([if libtool supports shared libraries])
8268     AC_MSG_RESULT([$can_build_shared])
8269
8270     AC_MSG_CHECKING([whether to build shared libraries])
8271     test "$can_build_shared" = "no" && enable_shared=no
8272
8273     # On AIX, shared libraries and static libraries use the same namespace, and
8274     # are all built from PIC.
8275     case $host_os in
8276       aix3*)
8277         test "$enable_shared" = yes && enable_static=no
8278         if test -n "$RANLIB"; then
8279           archive_cmds="$archive_cmds~\$RANLIB \$lib"
8280           postinstall_cmds='$RANLIB $lib'
8281         fi
8282         ;;
8283       aix[[4-9]]*)
8284         if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8285           test "$enable_shared" = yes && enable_static=no
8286         fi
8287         ;;
8288     esac
8289     AC_MSG_RESULT([$enable_shared])
8290
8291     AC_MSG_CHECKING([whether to build static libraries])
8292     # Make sure either enable_shared or enable_static is yes.
8293     test "$enable_shared" = yes || enable_static=yes
8294     AC_MSG_RESULT([$enable_static])
8295
8296     _LT_TAGVAR(GCC, $1)="$G77"
8297     _LT_TAGVAR(LD, $1)="$LD"
8298
8299     ## CAVEAT EMPTOR:
8300     ## There is no encapsulation within the following macros, do not change
8301     ## the running order or otherwise move them around unless you know exactly
8302     ## what you are doing...
8303     _LT_COMPILER_PIC($1)
8304     _LT_COMPILER_C_O($1)
8305     _LT_COMPILER_FILE_LOCKS($1)
8306     _LT_LINKER_SHLIBS($1)
8307     _LT_SYS_DYNAMIC_LINKER($1)
8308     _LT_LINKER_HARDCODE_LIBPATH($1)
8309
8310     _LT_CONFIG($1)
8311   fi # test -n "$compiler"
8312
8313   GCC=$lt_save_GCC
8314   CC="$lt_save_CC"
8315   CFLAGS="$lt_save_CFLAGS"
8316 fi # test "$_lt_disable_F77" != yes
8317
8318 AC_LANG_POP
8319 ])# _LT_LANG_F77_CONFIG
8320
8321
8322 # _LT_LANG_FC_CONFIG([TAG])
8323 # -------------------------
8324 # Ensure that the configuration variables for a Fortran compiler are
8325 # suitably defined.  These variables are subsequently used by _LT_CONFIG
8326 # to write the compiler configuration to `libtool'.
8327 m4_defun([_LT_LANG_FC_CONFIG],
8328 [AC_LANG_PUSH(Fortran)
8329
8330 if test -z "$FC" || test "X$FC" = "Xno"; then
8331   _lt_disable_FC=yes
8332 fi
8333
8334 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8335 _LT_TAGVAR(allow_undefined_flag, $1)=
8336 _LT_TAGVAR(always_export_symbols, $1)=no
8337 _LT_TAGVAR(archive_expsym_cmds, $1)=
8338 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
8339 _LT_TAGVAR(hardcode_direct, $1)=no
8340 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
8341 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8342 _LT_TAGVAR(hardcode_libdir_separator, $1)=
8343 _LT_TAGVAR(hardcode_minus_L, $1)=no
8344 _LT_TAGVAR(hardcode_automatic, $1)=no
8345 _LT_TAGVAR(inherit_rpath, $1)=no
8346 _LT_TAGVAR(module_cmds, $1)=
8347 _LT_TAGVAR(module_expsym_cmds, $1)=
8348 _LT_TAGVAR(link_all_deplibs, $1)=unknown
8349 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8350 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8351 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8352 _LT_TAGVAR(no_undefined_flag, $1)=
8353 _LT_TAGVAR(whole_archive_flag_spec, $1)=
8354 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8355
8356 # Source file extension for fc test sources.
8357 ac_ext=${ac_fc_srcext-f}
8358
8359 # Object file extension for compiled fc test sources.
8360 objext=o
8361 _LT_TAGVAR(objext, $1)=$objext
8362
8363 # No sense in running all these tests if we already determined that
8364 # the FC compiler isn't working.  Some variables (like enable_shared)
8365 # are currently assumed to apply to all compilers on this platform,
8366 # and will be corrupted by setting them based on a non-working compiler.
8367 if test "$_lt_disable_FC" != yes; then
8368   # Code to be used in simple compile tests
8369   lt_simple_compile_test_code="\
8370       subroutine t
8371       return
8372       end
8373 "
8374
8375   # Code to be used in simple link tests
8376   lt_simple_link_test_code="\
8377       program t
8378       end
8379 "
8380
8381   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8382   _LT_TAG_COMPILER
8383
8384   # save warnings/boilerplate of simple test code
8385   _LT_COMPILER_BOILERPLATE
8386   _LT_LINKER_BOILERPLATE
8387
8388   # Allow CC to be a program name with arguments.
8389   lt_save_CC="$CC"
8390   lt_save_GCC=$GCC
8391   lt_save_CFLAGS=$CFLAGS
8392   CC=${FC-"f95"}
8393   CFLAGS=$FCFLAGS
8394   compiler=$CC
8395   GCC=$ac_cv_fc_compiler_gnu
8396
8397   _LT_TAGVAR(compiler, $1)=$CC
8398   _LT_CC_BASENAME([$compiler])
8399
8400   if test -n "$compiler"; then
8401     AC_MSG_CHECKING([if libtool supports shared libraries])
8402     AC_MSG_RESULT([$can_build_shared])
8403
8404     AC_MSG_CHECKING([whether to build shared libraries])
8405     test "$can_build_shared" = "no" && enable_shared=no
8406
8407     # On AIX, shared libraries and static libraries use the same namespace, and
8408     # are all built from PIC.
8409     case $host_os in
8410       aix3*)
8411         test "$enable_shared" = yes && enable_static=no
8412         if test -n "$RANLIB"; then
8413           archive_cmds="$archive_cmds~\$RANLIB \$lib"
8414           postinstall_cmds='$RANLIB $lib'
8415         fi
8416         ;;
8417       aix[[4-9]]*)
8418         if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8419           test "$enable_shared" = yes && enable_static=no
8420         fi
8421         ;;
8422     esac
8423     AC_MSG_RESULT([$enable_shared])
8424
8425     AC_MSG_CHECKING([whether to build static libraries])
8426     # Make sure either enable_shared or enable_static is yes.
8427     test "$enable_shared" = yes || enable_static=yes
8428     AC_MSG_RESULT([$enable_static])
8429
8430     _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
8431     _LT_TAGVAR(LD, $1)="$LD"
8432
8433     ## CAVEAT EMPTOR:
8434     ## There is no encapsulation within the following macros, do not change
8435     ## the running order or otherwise move them around unless you know exactly
8436     ## what you are doing...
8437     _LT_SYS_HIDDEN_LIBDEPS($1)
8438     _LT_COMPILER_PIC($1)
8439     _LT_COMPILER_C_O($1)
8440     _LT_COMPILER_FILE_LOCKS($1)
8441     _LT_LINKER_SHLIBS($1)
8442     _LT_SYS_DYNAMIC_LINKER($1)
8443     _LT_LINKER_HARDCODE_LIBPATH($1)
8444
8445     _LT_CONFIG($1)
8446   fi # test -n "$compiler"
8447
8448   GCC=$lt_save_GCC
8449   CC=$lt_save_CC
8450   CFLAGS=$lt_save_CFLAGS
8451 fi # test "$_lt_disable_FC" != yes
8452
8453 AC_LANG_POP
8454 ])# _LT_LANG_FC_CONFIG
8455
8456
8457 # _LT_LANG_GCJ_CONFIG([TAG])
8458 # --------------------------
8459 # Ensure that the configuration variables for the GNU Java Compiler compiler
8460 # are suitably defined.  These variables are subsequently used by _LT_CONFIG
8461 # to write the compiler configuration to `libtool'.
8462 m4_defun([_LT_LANG_GCJ_CONFIG],
8463 [AC_REQUIRE([LT_PROG_GCJ])dnl
8464 AC_LANG_SAVE
8465
8466 # Source file extension for Java test sources.
8467 ac_ext=java
8468
8469 # Object file extension for compiled Java test sources.
8470 objext=o
8471 _LT_TAGVAR(objext, $1)=$objext
8472
8473 # Code to be used in simple compile tests
8474 lt_simple_compile_test_code="class foo {}"
8475
8476 # Code to be used in simple link tests
8477 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
8478
8479 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8480 _LT_TAG_COMPILER
8481
8482 # save warnings/boilerplate of simple test code
8483 _LT_COMPILER_BOILERPLATE
8484 _LT_LINKER_BOILERPLATE
8485
8486 # Allow CC to be a program name with arguments.
8487 lt_save_CC=$CC
8488 lt_save_CFLAGS=$CFLAGS
8489 lt_save_GCC=$GCC
8490 GCC=yes
8491 CC=${GCJ-"gcj"}
8492 CFLAGS=$GCJFLAGS
8493 compiler=$CC
8494 _LT_TAGVAR(compiler, $1)=$CC
8495 _LT_TAGVAR(LD, $1)="$LD"
8496 _LT_CC_BASENAME([$compiler])
8497
8498 # GCJ did not exist at the time GCC didn't implicitly link libc in.
8499 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8500
8501 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8502 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8503 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8504
8505 if test -n "$compiler"; then
8506   _LT_COMPILER_NO_RTTI($1)
8507   _LT_COMPILER_PIC($1)
8508   _LT_COMPILER_C_O($1)
8509   _LT_COMPILER_FILE_LOCKS($1)
8510   _LT_LINKER_SHLIBS($1)
8511   _LT_LINKER_HARDCODE_LIBPATH($1)
8512
8513   _LT_CONFIG($1)
8514 fi
8515
8516 AC_LANG_RESTORE
8517
8518 GCC=$lt_save_GCC
8519 CC=$lt_save_CC
8520 CFLAGS=$lt_save_CFLAGS
8521 ])# _LT_LANG_GCJ_CONFIG
8522
8523
8524 # _LT_LANG_GO_CONFIG([TAG])
8525 # --------------------------
8526 # Ensure that the configuration variables for the GNU Go compiler
8527 # are suitably defined.  These variables are subsequently used by _LT_CONFIG
8528 # to write the compiler configuration to `libtool'.
8529 m4_defun([_LT_LANG_GO_CONFIG],
8530 [AC_REQUIRE([LT_PROG_GO])dnl
8531 AC_LANG_SAVE
8532
8533 # Source file extension for Go test sources.
8534 ac_ext=go
8535
8536 # Object file extension for compiled Go test sources.
8537 objext=o
8538 _LT_TAGVAR(objext, $1)=$objext
8539
8540 # Code to be used in simple compile tests
8541 lt_simple_compile_test_code="package main; func main() { }"
8542
8543 # Code to be used in simple link tests
8544 lt_simple_link_test_code='package main; func main() { }'
8545
8546 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8547 _LT_TAG_COMPILER
8548
8549 # save warnings/boilerplate of simple test code
8550 _LT_COMPILER_BOILERPLATE
8551 _LT_LINKER_BOILERPLATE
8552
8553 # Allow CC to be a program name with arguments.
8554 lt_save_CC=$CC
8555 lt_save_CFLAGS=$CFLAGS
8556 lt_save_GCC=$GCC
8557 GCC=yes
8558 CC=${GOC-"gccgo"}
8559 CFLAGS=$GOFLAGS
8560 compiler=$CC
8561 _LT_TAGVAR(compiler, $1)=$CC
8562 _LT_TAGVAR(LD, $1)="$LD"
8563 _LT_CC_BASENAME([$compiler])
8564
8565 # Go did not exist at the time GCC didn't implicitly link libc in.
8566 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8567
8568 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8569 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8570 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8571
8572 if test -n "$compiler"; then
8573   _LT_COMPILER_NO_RTTI($1)
8574   _LT_COMPILER_PIC($1)
8575   _LT_COMPILER_C_O($1)
8576   _LT_COMPILER_FILE_LOCKS($1)
8577   _LT_LINKER_SHLIBS($1)
8578   _LT_LINKER_HARDCODE_LIBPATH($1)
8579
8580   _LT_CONFIG($1)
8581 fi
8582
8583 AC_LANG_RESTORE
8584
8585 GCC=$lt_save_GCC
8586 CC=$lt_save_CC
8587 CFLAGS=$lt_save_CFLAGS
8588 ])# _LT_LANG_GO_CONFIG
8589
8590
8591 # _LT_LANG_RC_CONFIG([TAG])
8592 # -------------------------
8593 # Ensure that the configuration variables for the Windows resource compiler
8594 # are suitably defined.  These variables are subsequently used by _LT_CONFIG
8595 # to write the compiler configuration to `libtool'.
8596 m4_defun([_LT_LANG_RC_CONFIG],
8597 [AC_REQUIRE([LT_PROG_RC])dnl
8598 AC_LANG_SAVE
8599
8600 # Source file extension for RC test sources.
8601 ac_ext=rc
8602
8603 # Object file extension for compiled RC test sources.
8604 objext=o
8605 _LT_TAGVAR(objext, $1)=$objext
8606
8607 # Code to be used in simple compile tests
8608 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
8609
8610 # Code to be used in simple link tests
8611 lt_simple_link_test_code="$lt_simple_compile_test_code"
8612
8613 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8614 _LT_TAG_COMPILER
8615
8616 # save warnings/boilerplate of simple test code
8617 _LT_COMPILER_BOILERPLATE
8618 _LT_LINKER_BOILERPLATE
8619
8620 # Allow CC to be a program name with arguments.
8621 lt_save_CC="$CC"
8622 lt_save_CFLAGS=$CFLAGS
8623 lt_save_GCC=$GCC
8624 GCC=
8625 CC=${RC-"windres"}
8626 CFLAGS=
8627 compiler=$CC
8628 _LT_TAGVAR(compiler, $1)=$CC
8629 _LT_CC_BASENAME([$compiler])
8630 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
8631
8632 if test -n "$compiler"; then
8633   :
8634   _LT_CONFIG($1)
8635 fi
8636
8637 GCC=$lt_save_GCC
8638 AC_LANG_RESTORE
8639 CC=$lt_save_CC
8640 CFLAGS=$lt_save_CFLAGS
8641 ])# _LT_LANG_RC_CONFIG
8642
8643
8644 # LT_PROG_GCJ
8645 # -----------
8646 AC_DEFUN([LT_PROG_GCJ],
8647 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
8648   [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
8649     [AC_CHECK_TOOL(GCJ, gcj,)
8650       test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
8651       AC_SUBST(GCJFLAGS)])])[]dnl
8652 ])
8653
8654 # Old name:
8655 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
8656 dnl aclocal-1.4 backwards compatibility:
8657 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
8658
8659
8660 # LT_PROG_GO
8661 # ----------
8662 AC_DEFUN([LT_PROG_GO],
8663 [AC_CHECK_TOOL(GOC, gccgo,)
8664 ])
8665
8666
8667 # LT_PROG_RC
8668 # ----------
8669 AC_DEFUN([LT_PROG_RC],
8670 [AC_CHECK_TOOL(RC, windres,)
8671 ])
8672
8673 # Old name:
8674 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
8675 dnl aclocal-1.4 backwards compatibility:
8676 dnl AC_DEFUN([LT_AC_PROG_RC], [])
8677
8678
8679 # _LT_DECL_EGREP
8680 # --------------
8681 # If we don't have a new enough Autoconf to choose the best grep
8682 # available, choose the one first in the user's PATH.
8683 m4_defun([_LT_DECL_EGREP],
8684 [AC_REQUIRE([AC_PROG_EGREP])dnl
8685 AC_REQUIRE([AC_PROG_FGREP])dnl
8686 test -z "$GREP" && GREP=grep
8687 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
8688 _LT_DECL([], [EGREP], [1], [An ERE matcher])
8689 _LT_DECL([], [FGREP], [1], [A literal string matcher])
8690 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
8691 AC_SUBST([GREP])
8692 ])
8693
8694
8695 # _LT_DECL_OBJDUMP
8696 # --------------
8697 # If we don't have a new enough Autoconf to choose the best objdump
8698 # available, choose the one first in the user's PATH.
8699 m4_defun([_LT_DECL_OBJDUMP],
8700 [AC_CHECK_TOOL(OBJDUMP, objdump, false)
8701 test -z "$OBJDUMP" && OBJDUMP=objdump
8702 _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
8703 AC_SUBST([OBJDUMP])
8704 ])
8705
8706 # _LT_DECL_DLLTOOL
8707 # ----------------
8708 # Ensure DLLTOOL variable is set.
8709 m4_defun([_LT_DECL_DLLTOOL],
8710 [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8711 test -z "$DLLTOOL" && DLLTOOL=dlltool
8712 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
8713 AC_SUBST([DLLTOOL])
8714 ])
8715
8716 # _LT_DECL_SED
8717 # ------------
8718 # Check for a fully-functional sed program, that truncates
8719 # as few characters as possible.  Prefer GNU sed if found.
8720 m4_defun([_LT_DECL_SED],
8721 [AC_PROG_SED
8722 test -z "$SED" && SED=sed
8723 Xsed="$SED -e 1s/^X//"
8724 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
8725 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
8726     [Sed that helps us avoid accidentally triggering echo(1) options like -n])
8727 ])# _LT_DECL_SED
8728
8729 m4_ifndef([AC_PROG_SED], [
8730 # NOTE: This macro has been submitted for inclusion into   #
8731 #  GNU Autoconf as AC_PROG_SED.  When it is available in   #
8732 #  a released version of Autoconf we should remove this    #
8733 #  macro and use it instead.                               #
8734
8735 m4_defun([AC_PROG_SED],
8736 [AC_MSG_CHECKING([for a sed that does not truncate output])
8737 AC_CACHE_VAL(lt_cv_path_SED,
8738 [# Loop through the user's path and test for sed and gsed.
8739 # Then use that list of sed's as ones to test for truncation.
8740 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8741 for as_dir in $PATH
8742 do
8743   IFS=$as_save_IFS
8744   test -z "$as_dir" && as_dir=.
8745   for lt_ac_prog in sed gsed; do
8746     for ac_exec_ext in '' $ac_executable_extensions; do
8747       if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
8748         lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
8749       fi
8750     done
8751   done
8752 done
8753 IFS=$as_save_IFS
8754 lt_ac_max=0
8755 lt_ac_count=0
8756 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
8757 # along with /bin/sed that truncates output.
8758 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
8759   test ! -f $lt_ac_sed && continue
8760   cat /dev/null > conftest.in
8761   lt_ac_count=0
8762   echo $ECHO_N "0123456789$ECHO_C" >conftest.in
8763   # Check for GNU sed and select it if it is found.
8764   if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
8765     lt_cv_path_SED=$lt_ac_sed
8766     break
8767   fi
8768   while true; do
8769     cat conftest.in conftest.in >conftest.tmp
8770     mv conftest.tmp conftest.in
8771     cp conftest.in conftest.nl
8772     echo >>conftest.nl
8773     $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
8774     cmp -s conftest.out conftest.nl || break
8775     # 10000 chars as input seems more than enough
8776     test $lt_ac_count -gt 10 && break
8777     lt_ac_count=`expr $lt_ac_count + 1`
8778     if test $lt_ac_count -gt $lt_ac_max; then
8779       lt_ac_max=$lt_ac_count
8780       lt_cv_path_SED=$lt_ac_sed
8781     fi
8782   done
8783 done
8784 ])
8785 SED=$lt_cv_path_SED
8786 AC_SUBST([SED])
8787 AC_MSG_RESULT([$SED])
8788 ])#AC_PROG_SED
8789 ])#m4_ifndef
8790
8791 # Old name:
8792 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
8793 dnl aclocal-1.4 backwards compatibility:
8794 dnl AC_DEFUN([LT_AC_PROG_SED], [])
8795
8796
8797 # _LT_CHECK_SHELL_FEATURES
8798 # ------------------------
8799 # Find out whether the shell is Bourne or XSI compatible,
8800 # or has some other useful features.
8801 m4_defun([_LT_CHECK_SHELL_FEATURES],
8802 [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
8803 # Try some XSI features
8804 xsi_shell=no
8805 ( _lt_dummy="a/b/c"
8806   test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
8807       = c,a/b,b/c, \
8808     && eval 'test $(( 1 + 1 )) -eq 2 \
8809     && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
8810   && xsi_shell=yes
8811 AC_MSG_RESULT([$xsi_shell])
8812 _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
8813
8814 AC_MSG_CHECKING([whether the shell understands "+="])
8815 lt_shell_append=no
8816 ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
8817     >/dev/null 2>&1 \
8818   && lt_shell_append=yes
8819 AC_MSG_RESULT([$lt_shell_append])
8820 _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
8821
8822 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
8823   lt_unset=unset
8824 else
8825   lt_unset=false
8826 fi
8827 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
8828
8829 # test EBCDIC or ASCII
8830 case `echo X|tr X '\101'` in
8831  A) # ASCII based system
8832     # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
8833   lt_SP2NL='tr \040 \012'
8834   lt_NL2SP='tr \015\012 \040\040'
8835   ;;
8836  *) # EBCDIC based system
8837   lt_SP2NL='tr \100 \n'
8838   lt_NL2SP='tr \r\n \100\100'
8839   ;;
8840 esac
8841 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
8842 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
8843 ])# _LT_CHECK_SHELL_FEATURES
8844
8845
8846 # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
8847 # ------------------------------------------------------
8848 # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
8849 # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
8850 m4_defun([_LT_PROG_FUNCTION_REPLACE],
8851 [dnl {
8852 sed -e '/^$1 ()$/,/^} # $1 /c\
8853 $1 ()\
8854 {\
8855 m4_bpatsubsts([$2], [$], [\\], [^\([     ]\)], [\\\1])
8856 } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
8857   && mv -f "$cfgfile.tmp" "$cfgfile" \
8858     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8859 test 0 -eq $? || _lt_function_replace_fail=:
8860 ])
8861
8862
8863 # _LT_PROG_REPLACE_SHELLFNS
8864 # -------------------------
8865 # Replace existing portable implementations of several shell functions with
8866 # equivalent extended shell implementations where those features are available..
8867 m4_defun([_LT_PROG_REPLACE_SHELLFNS],
8868 [if test x"$xsi_shell" = xyes; then
8869   _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
8870     case ${1} in
8871       */*) func_dirname_result="${1%/*}${2}" ;;
8872       *  ) func_dirname_result="${3}" ;;
8873     esac])
8874
8875   _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
8876     func_basename_result="${1##*/}"])
8877
8878   _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
8879     case ${1} in
8880       */*) func_dirname_result="${1%/*}${2}" ;;
8881       *  ) func_dirname_result="${3}" ;;
8882     esac
8883     func_basename_result="${1##*/}"])
8884
8885   _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
8886     # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
8887     # positional parameters, so assign one to ordinary parameter first.
8888     func_stripname_result=${3}
8889     func_stripname_result=${func_stripname_result#"${1}"}
8890     func_stripname_result=${func_stripname_result%"${2}"}])
8891
8892   _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
8893     func_split_long_opt_name=${1%%=*}
8894     func_split_long_opt_arg=${1#*=}])
8895
8896   _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
8897     func_split_short_opt_arg=${1#??}
8898     func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
8899
8900   _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
8901     case ${1} in
8902       *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
8903       *)    func_lo2o_result=${1} ;;
8904     esac])
8905
8906   _LT_PROG_FUNCTION_REPLACE([func_xform], [    func_xform_result=${1%.*}.lo])
8907
8908   _LT_PROG_FUNCTION_REPLACE([func_arith], [    func_arith_result=$(( $[*] ))])
8909
8910   _LT_PROG_FUNCTION_REPLACE([func_len], [    func_len_result=${#1}])
8911 fi
8912
8913 if test x"$lt_shell_append" = xyes; then
8914   _LT_PROG_FUNCTION_REPLACE([func_append], [    eval "${1}+=\\${2}"])
8915
8916   _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
8917     func_quote_for_eval "${2}"
8918 dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
8919     eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
8920
8921   # Save a `func_append' function call where possible by direct use of '+='
8922   sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
8923     && mv -f "$cfgfile.tmp" "$cfgfile" \
8924       || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8925   test 0 -eq $? || _lt_function_replace_fail=:
8926 else
8927   # Save a `func_append' function call even when '+=' is not available
8928   sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
8929     && mv -f "$cfgfile.tmp" "$cfgfile" \
8930       || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8931   test 0 -eq $? || _lt_function_replace_fail=:
8932 fi
8933
8934 if test x"$_lt_function_replace_fail" = x":"; then
8935   AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
8936 fi
8937 ])
8938
8939 # _LT_PATH_CONVERSION_FUNCTIONS
8940 # -----------------------------
8941 # Determine which file name conversion functions should be used by
8942 # func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
8943 # for certain cross-compile configurations and native mingw.
8944 m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
8945 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
8946 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
8947 AC_MSG_CHECKING([how to convert $build file names to $host format])
8948 AC_CACHE_VAL(lt_cv_to_host_file_cmd,
8949 [case $host in
8950   *-*-mingw* )
8951     case $build in
8952       *-*-mingw* ) # actually msys
8953         lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
8954         ;;
8955       *-*-cygwin* )
8956         lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
8957         ;;
8958       * ) # otherwise, assume *nix
8959         lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
8960         ;;
8961     esac
8962     ;;
8963   *-*-cygwin* )
8964     case $build in
8965       *-*-mingw* ) # actually msys
8966         lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
8967         ;;
8968       *-*-cygwin* )
8969         lt_cv_to_host_file_cmd=func_convert_file_noop
8970         ;;
8971       * ) # otherwise, assume *nix
8972         lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
8973         ;;
8974     esac
8975     ;;
8976   * ) # unhandled hosts (and "normal" native builds)
8977     lt_cv_to_host_file_cmd=func_convert_file_noop
8978     ;;
8979 esac
8980 ])
8981 to_host_file_cmd=$lt_cv_to_host_file_cmd
8982 AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
8983 _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
8984          [0], [convert $build file names to $host format])dnl
8985
8986 AC_MSG_CHECKING([how to convert $build file names to toolchain format])
8987 AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
8988 [#assume ordinary cross tools, or native build.
8989 lt_cv_to_tool_file_cmd=func_convert_file_noop
8990 case $host in
8991   *-*-mingw* )
8992     case $build in
8993       *-*-mingw* ) # actually msys
8994         lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
8995         ;;
8996     esac
8997     ;;
8998 esac
8999 ])
9000 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
9001 AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
9002 _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
9003          [0], [convert $build files to toolchain format])dnl
9004 ])# _LT_PATH_CONVERSION_FUNCTIONS
9005
9006 # Helper functions for option handling.                    -*- Autoconf -*-
9007 #
9008 #   Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
9009 #   Inc.
9010 #   Written by Gary V. Vaughan, 2004
9011 #
9012 # This file is free software; the Free Software Foundation gives
9013 # unlimited permission to copy and/or distribute it, with or without
9014 # modifications, as long as this notice is preserved.
9015
9016 # serial 7 ltoptions.m4
9017
9018 # This is to help aclocal find these macros, as it can't see m4_define.
9019 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
9020
9021
9022 # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
9023 # ------------------------------------------
9024 m4_define([_LT_MANGLE_OPTION],
9025 [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
9026
9027
9028 # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
9029 # ---------------------------------------
9030 # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
9031 # matching handler defined, dispatch to it.  Other OPTION-NAMEs are
9032 # saved as a flag.
9033 m4_define([_LT_SET_OPTION],
9034 [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
9035 m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
9036         _LT_MANGLE_DEFUN([$1], [$2]),
9037     [m4_warning([Unknown $1 option `$2'])])[]dnl
9038 ])
9039
9040
9041 # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
9042 # ------------------------------------------------------------
9043 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
9044 m4_define([_LT_IF_OPTION],
9045 [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
9046
9047
9048 # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
9049 # -------------------------------------------------------
9050 # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
9051 # are set.
9052 m4_define([_LT_UNLESS_OPTIONS],
9053 [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9054             [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
9055                       [m4_define([$0_found])])])[]dnl
9056 m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
9057 ])[]dnl
9058 ])
9059
9060
9061 # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
9062 # ----------------------------------------
9063 # OPTION-LIST is a space-separated list of Libtool options associated
9064 # with MACRO-NAME.  If any OPTION has a matching handler declared with
9065 # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
9066 # the unknown option and exit.
9067 m4_defun([_LT_SET_OPTIONS],
9068 [# Set options
9069 m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9070     [_LT_SET_OPTION([$1], _LT_Option)])
9071
9072 m4_if([$1],[LT_INIT],[
9073   dnl
9074   dnl Simply set some default values (i.e off) if boolean options were not
9075   dnl specified:
9076   _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
9077   ])
9078   _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
9079   ])
9080   dnl
9081   dnl If no reference was made to various pairs of opposing options, then
9082   dnl we run the default mode handler for the pair.  For example, if neither
9083   dnl `shared' nor `disable-shared' was passed, we enable building of shared
9084   dnl archives by default:
9085   _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
9086   _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
9087   _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
9088   _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
9089                    [_LT_ENABLE_FAST_INSTALL])
9090   ])
9091 ])# _LT_SET_OPTIONS
9092
9093
9094
9095 # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
9096 # -----------------------------------------
9097 m4_define([_LT_MANGLE_DEFUN],
9098 [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
9099
9100
9101 # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
9102 # -----------------------------------------------
9103 m4_define([LT_OPTION_DEFINE],
9104 [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
9105 ])# LT_OPTION_DEFINE
9106
9107
9108 # dlopen
9109 # ------
9110 LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
9111 ])
9112
9113 AU_DEFUN([AC_LIBTOOL_DLOPEN],
9114 [_LT_SET_OPTION([LT_INIT], [dlopen])
9115 AC_DIAGNOSE([obsolete],
9116 [$0: Remove this warning and the call to _LT_SET_OPTION when you
9117 put the `dlopen' option into LT_INIT's first parameter.])
9118 ])
9119
9120 dnl aclocal-1.4 backwards compatibility:
9121 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
9122
9123
9124 # win32-dll
9125 # ---------
9126 # Declare package support for building win32 dll's.
9127 LT_OPTION_DEFINE([LT_INIT], [win32-dll],
9128 [enable_win32_dll=yes
9129
9130 case $host in
9131 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
9132   AC_CHECK_TOOL(AS, as, false)
9133   AC_CHECK_TOOL(DLLTOOL, dlltool, false)
9134   AC_CHECK_TOOL(OBJDUMP, objdump, false)
9135   ;;
9136 esac
9137
9138 test -z "$AS" && AS=as
9139 _LT_DECL([], [AS],      [1], [Assembler program])dnl
9140
9141 test -z "$DLLTOOL" && DLLTOOL=dlltool
9142 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
9143
9144 test -z "$OBJDUMP" && OBJDUMP=objdump
9145 _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
9146 ])# win32-dll
9147
9148 AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
9149 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
9150 _LT_SET_OPTION([LT_INIT], [win32-dll])
9151 AC_DIAGNOSE([obsolete],
9152 [$0: Remove this warning and the call to _LT_SET_OPTION when you
9153 put the `win32-dll' option into LT_INIT's first parameter.])
9154 ])
9155
9156 dnl aclocal-1.4 backwards compatibility:
9157 dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
9158
9159
9160 # _LT_ENABLE_SHARED([DEFAULT])
9161 # ----------------------------
9162 # implement the --enable-shared flag, and supports the `shared' and
9163 # `disable-shared' LT_INIT options.
9164 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9165 m4_define([_LT_ENABLE_SHARED],
9166 [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
9167 AC_ARG_ENABLE([shared],
9168     [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
9169         [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
9170     [p=${PACKAGE-default}
9171     case $enableval in
9172     yes) enable_shared=yes ;;
9173     no) enable_shared=no ;;
9174     *)
9175       enable_shared=no
9176       # Look at the argument we got.  We use all the common list separators.
9177       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9178       for pkg in $enableval; do
9179         IFS="$lt_save_ifs"
9180         if test "X$pkg" = "X$p"; then
9181           enable_shared=yes
9182         fi
9183       done
9184       IFS="$lt_save_ifs"
9185       ;;
9186     esac],
9187     [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
9188
9189     _LT_DECL([build_libtool_libs], [enable_shared], [0],
9190         [Whether or not to build shared libraries])
9191 ])# _LT_ENABLE_SHARED
9192
9193 LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
9194 LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
9195
9196 # Old names:
9197 AC_DEFUN([AC_ENABLE_SHARED],
9198 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
9199 ])
9200
9201 AC_DEFUN([AC_DISABLE_SHARED],
9202 [_LT_SET_OPTION([LT_INIT], [disable-shared])
9203 ])
9204
9205 AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
9206 AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
9207
9208 dnl aclocal-1.4 backwards compatibility:
9209 dnl AC_DEFUN([AM_ENABLE_SHARED], [])
9210 dnl AC_DEFUN([AM_DISABLE_SHARED], [])
9211
9212
9213
9214 # _LT_ENABLE_STATIC([DEFAULT])
9215 # ----------------------------
9216 # implement the --enable-static flag, and support the `static' and
9217 # `disable-static' LT_INIT options.
9218 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9219 m4_define([_LT_ENABLE_STATIC],
9220 [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
9221 AC_ARG_ENABLE([static],
9222     [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
9223         [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
9224     [p=${PACKAGE-default}
9225     case $enableval in
9226     yes) enable_static=yes ;;
9227     no) enable_static=no ;;
9228     *)
9229      enable_static=no
9230       # Look at the argument we got.  We use all the common list separators.
9231       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9232       for pkg in $enableval; do
9233         IFS="$lt_save_ifs"
9234         if test "X$pkg" = "X$p"; then
9235           enable_static=yes
9236         fi
9237       done
9238       IFS="$lt_save_ifs"
9239       ;;
9240     esac],
9241     [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
9242
9243     _LT_DECL([build_old_libs], [enable_static], [0],
9244         [Whether or not to build static libraries])
9245 ])# _LT_ENABLE_STATIC
9246
9247 LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
9248 LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
9249
9250 # Old names:
9251 AC_DEFUN([AC_ENABLE_STATIC],
9252 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
9253 ])
9254
9255 AC_DEFUN([AC_DISABLE_STATIC],
9256 [_LT_SET_OPTION([LT_INIT], [disable-static])
9257 ])
9258
9259 AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
9260 AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
9261
9262 dnl aclocal-1.4 backwards compatibility:
9263 dnl AC_DEFUN([AM_ENABLE_STATIC], [])
9264 dnl AC_DEFUN([AM_DISABLE_STATIC], [])
9265
9266
9267
9268 # _LT_ENABLE_FAST_INSTALL([DEFAULT])
9269 # ----------------------------------
9270 # implement the --enable-fast-install flag, and support the `fast-install'
9271 # and `disable-fast-install' LT_INIT options.
9272 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9273 m4_define([_LT_ENABLE_FAST_INSTALL],
9274 [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
9275 AC_ARG_ENABLE([fast-install],
9276     [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
9277     [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
9278     [p=${PACKAGE-default}
9279     case $enableval in
9280     yes) enable_fast_install=yes ;;
9281     no) enable_fast_install=no ;;
9282     *)
9283       enable_fast_install=no
9284       # Look at the argument we got.  We use all the common list separators.
9285       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9286       for pkg in $enableval; do
9287         IFS="$lt_save_ifs"
9288         if test "X$pkg" = "X$p"; then
9289           enable_fast_install=yes
9290         fi
9291       done
9292       IFS="$lt_save_ifs"
9293       ;;
9294     esac],
9295     [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
9296
9297 _LT_DECL([fast_install], [enable_fast_install], [0],
9298          [Whether or not to optimize for fast installation])dnl
9299 ])# _LT_ENABLE_FAST_INSTALL
9300
9301 LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
9302 LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
9303
9304 # Old names:
9305 AU_DEFUN([AC_ENABLE_FAST_INSTALL],
9306 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
9307 AC_DIAGNOSE([obsolete],
9308 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
9309 the `fast-install' option into LT_INIT's first parameter.])
9310 ])
9311
9312 AU_DEFUN([AC_DISABLE_FAST_INSTALL],
9313 [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
9314 AC_DIAGNOSE([obsolete],
9315 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
9316 the `disable-fast-install' option into LT_INIT's first parameter.])
9317 ])
9318
9319 dnl aclocal-1.4 backwards compatibility:
9320 dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
9321 dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
9322
9323
9324 # _LT_WITH_PIC([MODE])
9325 # --------------------
9326 # implement the --with-pic flag, and support the `pic-only' and `no-pic'
9327 # LT_INIT options.
9328 # MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
9329 m4_define([_LT_WITH_PIC],
9330 [AC_ARG_WITH([pic],
9331     [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
9332         [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
9333     [lt_p=${PACKAGE-default}
9334     case $withval in
9335     yes|no) pic_mode=$withval ;;
9336     *)
9337       pic_mode=default
9338       # Look at the argument we got.  We use all the common list separators.
9339       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9340       for lt_pkg in $withval; do
9341         IFS="$lt_save_ifs"
9342         if test "X$lt_pkg" = "X$lt_p"; then
9343           pic_mode=yes
9344         fi
9345       done
9346       IFS="$lt_save_ifs"
9347       ;;
9348     esac],
9349     [pic_mode=default])
9350
9351 test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
9352
9353 _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
9354 ])# _LT_WITH_PIC
9355
9356 LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
9357 LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
9358
9359 # Old name:
9360 AU_DEFUN([AC_LIBTOOL_PICMODE],
9361 [_LT_SET_OPTION([LT_INIT], [pic-only])
9362 AC_DIAGNOSE([obsolete],
9363 [$0: Remove this warning and the call to _LT_SET_OPTION when you
9364 put the `pic-only' option into LT_INIT's first parameter.])
9365 ])
9366
9367 dnl aclocal-1.4 backwards compatibility:
9368 dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
9369
9370
9371 m4_define([_LTDL_MODE], [])
9372 LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
9373                  [m4_define([_LTDL_MODE], [nonrecursive])])
9374 LT_OPTION_DEFINE([LTDL_INIT], [recursive],
9375                  [m4_define([_LTDL_MODE], [recursive])])
9376 LT_OPTION_DEFINE([LTDL_INIT], [subproject],
9377                  [m4_define([_LTDL_MODE], [subproject])])
9378
9379 m4_define([_LTDL_TYPE], [])
9380 LT_OPTION_DEFINE([LTDL_INIT], [installable],
9381                  [m4_define([_LTDL_TYPE], [installable])])
9382 LT_OPTION_DEFINE([LTDL_INIT], [convenience],
9383                  [m4_define([_LTDL_TYPE], [convenience])])
9384
9385 # ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
9386 #
9387 # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
9388 # Written by Gary V. Vaughan, 2004
9389 #
9390 # This file is free software; the Free Software Foundation gives
9391 # unlimited permission to copy and/or distribute it, with or without
9392 # modifications, as long as this notice is preserved.
9393
9394 # serial 6 ltsugar.m4
9395
9396 # This is to help aclocal find these macros, as it can't see m4_define.
9397 AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
9398
9399
9400 # lt_join(SEP, ARG1, [ARG2...])
9401 # -----------------------------
9402 # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
9403 # associated separator.
9404 # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
9405 # versions in m4sugar had bugs.
9406 m4_define([lt_join],
9407 [m4_if([$#], [1], [],
9408        [$#], [2], [[$2]],
9409        [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
9410 m4_define([_lt_join],
9411 [m4_if([$#$2], [2], [],
9412        [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
9413
9414
9415 # lt_car(LIST)
9416 # lt_cdr(LIST)
9417 # ------------
9418 # Manipulate m4 lists.
9419 # These macros are necessary as long as will still need to support
9420 # Autoconf-2.59 which quotes differently.
9421 m4_define([lt_car], [[$1]])
9422 m4_define([lt_cdr],
9423 [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
9424        [$#], 1, [],
9425        [m4_dquote(m4_shift($@))])])
9426 m4_define([lt_unquote], $1)
9427
9428
9429 # lt_append(MACRO-NAME, STRING, [SEPARATOR])
9430 # ------------------------------------------
9431 # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
9432 # Note that neither SEPARATOR nor STRING are expanded; they are appended
9433 # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
9434 # No SEPARATOR is output if MACRO-NAME was previously undefined (different
9435 # than defined and empty).
9436 #
9437 # This macro is needed until we can rely on Autoconf 2.62, since earlier
9438 # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
9439 m4_define([lt_append],
9440 [m4_define([$1],
9441            m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
9442
9443
9444
9445 # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
9446 # ----------------------------------------------------------
9447 # Produce a SEP delimited list of all paired combinations of elements of
9448 # PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
9449 # has the form PREFIXmINFIXSUFFIXn.
9450 # Needed until we can rely on m4_combine added in Autoconf 2.62.
9451 m4_define([lt_combine],
9452 [m4_if(m4_eval([$# > 3]), [1],
9453        [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
9454 [[m4_foreach([_Lt_prefix], [$2],
9455              [m4_foreach([_Lt_suffix],
9456                 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
9457         [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
9458
9459
9460 # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
9461 # -----------------------------------------------------------------------
9462 # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
9463 # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
9464 m4_define([lt_if_append_uniq],
9465 [m4_ifdef([$1],
9466           [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
9467                  [lt_append([$1], [$2], [$3])$4],
9468                  [$5])],
9469           [lt_append([$1], [$2], [$3])$4])])
9470
9471
9472 # lt_dict_add(DICT, KEY, VALUE)
9473 # -----------------------------
9474 m4_define([lt_dict_add],
9475 [m4_define([$1($2)], [$3])])
9476
9477
9478 # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
9479 # --------------------------------------------
9480 m4_define([lt_dict_add_subkey],
9481 [m4_define([$1($2:$3)], [$4])])
9482
9483
9484 # lt_dict_fetch(DICT, KEY, [SUBKEY])
9485 # ----------------------------------
9486 m4_define([lt_dict_fetch],
9487 [m4_ifval([$3],
9488         m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
9489     m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
9490
9491
9492 # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
9493 # -----------------------------------------------------------------
9494 m4_define([lt_if_dict_fetch],
9495 [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
9496         [$5],
9497     [$6])])
9498
9499
9500 # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
9501 # --------------------------------------------------------------
9502 m4_define([lt_dict_filter],
9503 [m4_if([$5], [], [],
9504   [lt_join(m4_quote(m4_default([$4], [[, ]])),
9505            lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
9506                       [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
9507 ])
9508
9509 # ltversion.m4 -- version numbers                       -*- Autoconf -*-
9510 #
9511 #   Copyright (C) 2004 Free Software Foundation, Inc.
9512 #   Written by Scott James Remnant, 2004
9513 #
9514 # This file is free software; the Free Software Foundation gives
9515 # unlimited permission to copy and/or distribute it, with or without
9516 # modifications, as long as this notice is preserved.
9517
9518 # @configure_input@
9519
9520 # serial 3337 ltversion.m4
9521 # This file is part of GNU Libtool
9522
9523 m4_define([LT_PACKAGE_VERSION], [2.4.2])
9524 m4_define([LT_PACKAGE_REVISION], [1.3337])
9525
9526 AC_DEFUN([LTVERSION_VERSION],
9527 [macro_version='2.4.2'
9528 macro_revision='1.3337'
9529 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
9530 _LT_DECL(, macro_revision, 0)
9531 ])
9532
9533 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
9534 #
9535 #   Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
9536 #   Written by Scott James Remnant, 2004.
9537 #
9538 # This file is free software; the Free Software Foundation gives
9539 # unlimited permission to copy and/or distribute it, with or without
9540 # modifications, as long as this notice is preserved.
9541
9542 # serial 5 lt~obsolete.m4
9543
9544 # These exist entirely to fool aclocal when bootstrapping libtool.
9545 #
9546 # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
9547 # which have later been changed to m4_define as they aren't part of the
9548 # exported API, or moved to Autoconf or Automake where they belong.
9549 #
9550 # The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
9551 # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
9552 # using a macro with the same name in our local m4/libtool.m4 it'll
9553 # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
9554 # and doesn't know about Autoconf macros at all.)
9555 #
9556 # So we provide this file, which has a silly filename so it's always
9557 # included after everything else.  This provides aclocal with the
9558 # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
9559 # because those macros already exist, or will be overwritten later.
9560 # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
9561 #
9562 # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
9563 # Yes, that means every name once taken will need to remain here until
9564 # we give up compatibility with versions before 1.7, at which point
9565 # we need to keep only those names which we still refer to.
9566
9567 # This is to help aclocal find these macros, as it can't see m4_define.
9568 AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
9569
9570 m4_ifndef([AC_LIBTOOL_LINKER_OPTION],   [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
9571 m4_ifndef([AC_PROG_EGREP],              [AC_DEFUN([AC_PROG_EGREP])])
9572 m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
9573 m4_ifndef([_LT_AC_SHELL_INIT],          [AC_DEFUN([_LT_AC_SHELL_INIT])])
9574 m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],     [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
9575 m4_ifndef([_LT_PROG_LTMAIN],            [AC_DEFUN([_LT_PROG_LTMAIN])])
9576 m4_ifndef([_LT_AC_TAGVAR],              [AC_DEFUN([_LT_AC_TAGVAR])])
9577 m4_ifndef([AC_LTDL_ENABLE_INSTALL],     [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
9578 m4_ifndef([AC_LTDL_PREOPEN],            [AC_DEFUN([AC_LTDL_PREOPEN])])
9579 m4_ifndef([_LT_AC_SYS_COMPILER],        [AC_DEFUN([_LT_AC_SYS_COMPILER])])
9580 m4_ifndef([_LT_AC_LOCK],                [AC_DEFUN([_LT_AC_LOCK])])
9581 m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
9582 m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],     [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
9583 m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],     [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
9584 m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
9585 m4_ifndef([AC_LIBTOOL_OBJDIR],          [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
9586 m4_ifndef([AC_LTDL_OBJDIR],             [AC_DEFUN([AC_LTDL_OBJDIR])])
9587 m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
9588 m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],   [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
9589 m4_ifndef([AC_PATH_MAGIC],              [AC_DEFUN([AC_PATH_MAGIC])])
9590 m4_ifndef([AC_PROG_LD_GNU],             [AC_DEFUN([AC_PROG_LD_GNU])])
9591 m4_ifndef([AC_PROG_LD_RELOAD_FLAG],     [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
9592 m4_ifndef([AC_DEPLIBS_CHECK_METHOD],    [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
9593 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
9594 m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
9595 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
9596 m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],  [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
9597 m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],  [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
9598 m4_ifndef([LT_AC_PROG_EGREP],           [AC_DEFUN([LT_AC_PROG_EGREP])])
9599 m4_ifndef([LT_AC_PROG_SED],             [AC_DEFUN([LT_AC_PROG_SED])])
9600 m4_ifndef([_LT_CC_BASENAME],            [AC_DEFUN([_LT_CC_BASENAME])])
9601 m4_ifndef([_LT_COMPILER_BOILERPLATE],   [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
9602 m4_ifndef([_LT_LINKER_BOILERPLATE],     [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
9603 m4_ifndef([_AC_PROG_LIBTOOL],           [AC_DEFUN([_AC_PROG_LIBTOOL])])
9604 m4_ifndef([AC_LIBTOOL_SETUP],           [AC_DEFUN([AC_LIBTOOL_SETUP])])
9605 m4_ifndef([_LT_AC_CHECK_DLFCN],         [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
9606 m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],      [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
9607 m4_ifndef([_LT_AC_TAGCONFIG],           [AC_DEFUN([_LT_AC_TAGCONFIG])])
9608 m4_ifndef([AC_DISABLE_FAST_INSTALL],    [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
9609 m4_ifndef([_LT_AC_LANG_CXX],            [AC_DEFUN([_LT_AC_LANG_CXX])])
9610 m4_ifndef([_LT_AC_LANG_F77],            [AC_DEFUN([_LT_AC_LANG_F77])])
9611 m4_ifndef([_LT_AC_LANG_GCJ],            [AC_DEFUN([_LT_AC_LANG_GCJ])])
9612 m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],   [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
9613 m4_ifndef([_LT_AC_LANG_C_CONFIG],       [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
9614 m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
9615 m4_ifndef([_LT_AC_LANG_CXX_CONFIG],     [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
9616 m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
9617 m4_ifndef([_LT_AC_LANG_F77_CONFIG],     [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
9618 m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
9619 m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],     [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
9620 m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],  [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
9621 m4_ifndef([_LT_AC_LANG_RC_CONFIG],      [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
9622 m4_ifndef([AC_LIBTOOL_CONFIG],          [AC_DEFUN([AC_LIBTOOL_CONFIG])])
9623 m4_ifndef([_LT_AC_FILE_LTDLL_C],        [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
9624 m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
9625 m4_ifndef([_LT_AC_PROG_CXXCPP],         [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
9626 m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
9627 m4_ifndef([_LT_PROG_ECHO_BACKSLASH],    [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
9628 m4_ifndef([_LT_PROG_F77],               [AC_DEFUN([_LT_PROG_F77])])
9629 m4_ifndef([_LT_PROG_FC],                [AC_DEFUN([_LT_PROG_FC])])
9630 m4_ifndef([_LT_PROG_CXX],               [AC_DEFUN([_LT_PROG_CXX])])
9631
9632 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
9633 # serial 1 (pkg-config-0.24)
9634
9635 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
9636 #
9637 # This program is free software; you can redistribute it and/or modify
9638 # it under the terms of the GNU General Public License as published by
9639 # the Free Software Foundation; either version 2 of the License, or
9640 # (at your option) any later version.
9641 #
9642 # This program is distributed in the hope that it will be useful, but
9643 # WITHOUT ANY WARRANTY; without even the implied warranty of
9644 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
9645 # General Public License for more details.
9646 #
9647 # You should have received a copy of the GNU General Public License
9648 # along with this program; if not, write to the Free Software
9649 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
9650 #
9651 # As a special exception to the GNU General Public License, if you
9652 # distribute this file as part of a program that contains a
9653 # configuration script generated by Autoconf, you may include it under
9654 # the same distribution terms that you use for the rest of that program.
9655
9656 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
9657 # ----------------------------------
9658 AC_DEFUN([PKG_PROG_PKG_CONFIG],
9659 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
9660 m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
9661 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
9662 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
9663 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
9664
9665 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9666         AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
9667 fi
9668 if test -n "$PKG_CONFIG"; then
9669         _pkg_min_version=m4_default([$1], [0.9.0])
9670         AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
9671         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9672                 AC_MSG_RESULT([yes])
9673         else
9674                 AC_MSG_RESULT([no])
9675                 PKG_CONFIG=""
9676         fi
9677 fi[]dnl
9678 ])# PKG_PROG_PKG_CONFIG
9679
9680 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
9681 #
9682 # Check to see whether a particular set of modules exists.  Similar
9683 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
9684 #
9685 # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9686 # only at the first occurence in configure.ac, so if the first place
9687 # it's called might be skipped (such as if it is within an "if", you
9688 # have to call PKG_CHECK_EXISTS manually
9689 # --------------------------------------------------------------
9690 AC_DEFUN([PKG_CHECK_EXISTS],
9691 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9692 if test -n "$PKG_CONFIG" && \
9693     AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
9694   m4_default([$2], [:])
9695 m4_ifvaln([$3], [else
9696   $3])dnl
9697 fi])
9698
9699 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
9700 # ---------------------------------------------
9701 m4_define([_PKG_CONFIG],
9702 [if test -n "$$1"; then
9703     pkg_cv_[]$1="$$1"
9704  elif test -n "$PKG_CONFIG"; then
9705     PKG_CHECK_EXISTS([$3],
9706                      [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
9707                      [pkg_failed=yes])
9708  else
9709     pkg_failed=untried
9710 fi[]dnl
9711 ])# _PKG_CONFIG
9712
9713 # _PKG_SHORT_ERRORS_SUPPORTED
9714 # -----------------------------
9715 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
9716 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9717 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9718         _pkg_short_errors_supported=yes
9719 else
9720         _pkg_short_errors_supported=no
9721 fi[]dnl
9722 ])# _PKG_SHORT_ERRORS_SUPPORTED
9723
9724
9725 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
9726 # [ACTION-IF-NOT-FOUND])
9727 #
9728 #
9729 # Note that if there is a possibility the first call to
9730 # PKG_CHECK_MODULES might not happen, you should be sure to include an
9731 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
9732 #
9733 #
9734 # --------------------------------------------------------------
9735 AC_DEFUN([PKG_CHECK_MODULES],
9736 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9737 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
9738 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
9739
9740 pkg_failed=no
9741 AC_MSG_CHECKING([for $1])
9742
9743 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
9744 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
9745
9746 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
9747 and $1[]_LIBS to avoid the need to call pkg-config.
9748 See the pkg-config man page for more details.])
9749
9750 if test $pkg_failed = yes; then
9751         AC_MSG_RESULT([no])
9752         _PKG_SHORT_ERRORS_SUPPORTED
9753         if test $_pkg_short_errors_supported = yes; then
9754                 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
9755         else 
9756                 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
9757         fi
9758         # Put the nasty error message in config.log where it belongs
9759         echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
9760
9761         m4_default([$4], [AC_MSG_ERROR(
9762 [Package requirements ($2) were not met:
9763
9764 $$1_PKG_ERRORS
9765
9766 Consider adjusting the PKG_CONFIG_PATH environment variable if you
9767 installed software in a non-standard prefix.
9768
9769 _PKG_TEXT])
9770         ])
9771 elif test $pkg_failed = untried; then
9772         AC_MSG_RESULT([no])
9773         m4_default([$4], [AC_MSG_FAILURE(
9774 [The pkg-config script could not be found or is too old.  Make sure it
9775 is in your PATH or set the PKG_CONFIG environment variable to the full
9776 path to pkg-config.
9777
9778 _PKG_TEXT
9779
9780 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])
9781         ])
9782 else
9783         $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
9784         $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
9785         AC_MSG_RESULT([yes])
9786         $3
9787 fi[]dnl
9788 ])# PKG_CHECK_MODULES
9789
9790 dnl -*- mode: autoconf -*-
9791
9792 # serial 1
9793
9794 dnl Usage:
9795 dnl   GTK_DOC_CHECK([minimum-gtk-doc-version])
9796 AC_DEFUN([GTK_DOC_CHECK],
9797 [
9798   AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9799   AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
9800   AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
9801
9802   dnl check for tools we added during development
9803   AC_PATH_PROG([GTKDOC_CHECK],[gtkdoc-check])
9804   AC_PATH_PROGS([GTKDOC_REBASE],[gtkdoc-rebase],[true])
9805   AC_PATH_PROG([GTKDOC_MKPDF],[gtkdoc-mkpdf])
9806
9807   dnl for overriding the documentation installation directory
9808   AC_ARG_WITH([html-dir],
9809     AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),,
9810     [with_html_dir='${datadir}/gtk-doc/html'])
9811   HTML_DIR="$with_html_dir"
9812   AC_SUBST([HTML_DIR])
9813
9814   dnl enable/disable documentation building
9815   AC_ARG_ENABLE([gtk-doc],
9816     AS_HELP_STRING([--enable-gtk-doc],
9817                    [use gtk-doc to build documentation [[default=no]]]),,
9818     [enable_gtk_doc=no])
9819
9820   if test x$enable_gtk_doc = xyes; then
9821     ifelse([$1],[],
9822       [PKG_CHECK_EXISTS([gtk-doc],,
9823                         AC_MSG_ERROR([gtk-doc not installed and --enable-gtk-doc requested]))],
9824       [PKG_CHECK_EXISTS([gtk-doc >= $1],,
9825                         AC_MSG_ERROR([You need to have gtk-doc >= $1 installed to build $PACKAGE_NAME]))])
9826     dnl don't check for glib if we build glib
9827     if test "x$PACKAGE_NAME" != "xglib"; then
9828       dnl don't fail if someone does not have glib
9829       PKG_CHECK_MODULES(GTKDOC_DEPS, glib-2.0 >= 2.10.0 gobject-2.0  >= 2.10.0,,)
9830     fi
9831   fi
9832
9833   AC_MSG_CHECKING([whether to build gtk-doc documentation])
9834   AC_MSG_RESULT($enable_gtk_doc)
9835
9836   dnl enable/disable output formats
9837   AC_ARG_ENABLE([gtk-doc-html],
9838     AS_HELP_STRING([--enable-gtk-doc-html],
9839                    [build documentation in html format [[default=yes]]]),,
9840     [enable_gtk_doc_html=yes])
9841     AC_ARG_ENABLE([gtk-doc-pdf],
9842       AS_HELP_STRING([--enable-gtk-doc-pdf],
9843                      [build documentation in pdf format [[default=no]]]),,
9844       [enable_gtk_doc_pdf=no])
9845
9846   if test -z "$GTKDOC_MKPDF"; then
9847     enable_gtk_doc_pdf=no
9848   fi
9849
9850
9851   AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes])
9852   AM_CONDITIONAL([GTK_DOC_BUILD_HTML], [test x$enable_gtk_doc_html = xyes])
9853   AM_CONDITIONAL([GTK_DOC_BUILD_PDF], [test x$enable_gtk_doc_pdf = xyes])
9854   AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"])
9855   AM_CONDITIONAL([GTK_DOC_USE_REBASE], [test -n "$GTKDOC_REBASE"])
9856 ])
9857
9858 m4_include([acinclude.m4])