Imported Upstream version 3.10.0
[platform/upstream/python-gobject.git] / aclocal.m4
1 # generated automatically by aclocal 1.11.6 -*- 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.69],,
18 [m4_warning([this file was generated for autoconf 2.69.
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.6], [],
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.6])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 # Do all the work for Automake.                             -*- Autoconf -*-
420
421 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
422 # 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
423 #
424 # This file is free software; the Free Software Foundation
425 # gives unlimited permission to copy and/or distribute it,
426 # with or without modifications, as long as this notice is preserved.
427
428 # serial 16
429
430 # This macro actually does too much.  Some checks are only needed if
431 # your package does certain things.  But this isn't really a big deal.
432
433 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
434 # AM_INIT_AUTOMAKE([OPTIONS])
435 # -----------------------------------------------
436 # The call with PACKAGE and VERSION arguments is the old style
437 # call (pre autoconf-2.50), which is being phased out.  PACKAGE
438 # and VERSION should now be passed to AC_INIT and removed from
439 # the call to AM_INIT_AUTOMAKE.
440 # We support both call styles for the transition.  After
441 # the next Automake release, Autoconf can make the AC_INIT
442 # arguments mandatory, and then we can depend on a new Autoconf
443 # release and drop the old call support.
444 AC_DEFUN([AM_INIT_AUTOMAKE],
445 [AC_PREREQ([2.62])dnl
446 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
447 dnl the ones we care about.
448 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
449 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
450 AC_REQUIRE([AC_PROG_INSTALL])dnl
451 if test "`cd $srcdir && pwd`" != "`pwd`"; then
452   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
453   # is not polluted with repeated "-I."
454   AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
455   # test to see if srcdir already configured
456   if test -f $srcdir/config.status; then
457     AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
458   fi
459 fi
460
461 # test whether we have cygpath
462 if test -z "$CYGPATH_W"; then
463   if (cygpath --version) >/dev/null 2>/dev/null; then
464     CYGPATH_W='cygpath -w'
465   else
466     CYGPATH_W=echo
467   fi
468 fi
469 AC_SUBST([CYGPATH_W])
470
471 # Define the identity of the package.
472 dnl Distinguish between old-style and new-style calls.
473 m4_ifval([$2],
474 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
475  AC_SUBST([PACKAGE], [$1])dnl
476  AC_SUBST([VERSION], [$2])],
477 [_AM_SET_OPTIONS([$1])dnl
478 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
479 m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
480   [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
481  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
482  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
483
484 _AM_IF_OPTION([no-define],,
485 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
486  AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
487
488 # Some tools Automake needs.
489 AC_REQUIRE([AM_SANITY_CHECK])dnl
490 AC_REQUIRE([AC_ARG_PROGRAM])dnl
491 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
492 AM_MISSING_PROG(AUTOCONF, autoconf)
493 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
494 AM_MISSING_PROG(AUTOHEADER, autoheader)
495 AM_MISSING_PROG(MAKEINFO, makeinfo)
496 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
497 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
498 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
499 # We need awk for the "check" target.  The system "awk" is bad on
500 # some platforms.
501 AC_REQUIRE([AC_PROG_AWK])dnl
502 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
503 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
504 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
505               [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
506                              [_AM_PROG_TAR([v7])])])
507 _AM_IF_OPTION([no-dependencies],,
508 [AC_PROVIDE_IFELSE([AC_PROG_CC],
509                   [_AM_DEPENDENCIES(CC)],
510                   [define([AC_PROG_CC],
511                           defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
512 AC_PROVIDE_IFELSE([AC_PROG_CXX],
513                   [_AM_DEPENDENCIES(CXX)],
514                   [define([AC_PROG_CXX],
515                           defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
516 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
517                   [_AM_DEPENDENCIES(OBJC)],
518                   [define([AC_PROG_OBJC],
519                           defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
520 ])
521 _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
522 dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
523 dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
524 dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
525 AC_CONFIG_COMMANDS_PRE(dnl
526 [m4_provide_if([_AM_COMPILER_EXEEXT],
527   [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
528 ])
529
530 dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
531 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
532 dnl mangled by Autoconf and run in a shell conditional statement.
533 m4_define([_AC_COMPILER_EXEEXT],
534 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
535
536
537 # When config.status generates a header, we must update the stamp-h file.
538 # This file resides in the same directory as the config header
539 # that is generated.  The stamp files are numbered to have different names.
540
541 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
542 # loop where config.status creates the headers, so we can generate
543 # our stamp files there.
544 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
545 [# Compute $1's index in $config_headers.
546 _am_arg=$1
547 _am_stamp_count=1
548 for _am_header in $config_headers :; do
549   case $_am_header in
550     $_am_arg | $_am_arg:* )
551       break ;;
552     * )
553       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
554   esac
555 done
556 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
557
558 # Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
559 # Inc.
560 #
561 # This file is free software; the Free Software Foundation
562 # gives unlimited permission to copy and/or distribute it,
563 # with or without modifications, as long as this notice is preserved.
564
565 # serial 1
566
567 # AM_PROG_INSTALL_SH
568 # ------------------
569 # Define $install_sh.
570 AC_DEFUN([AM_PROG_INSTALL_SH],
571 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
572 if test x"${install_sh}" != xset; then
573   case $am_aux_dir in
574   *\ * | *\     *)
575     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
576   *)
577     install_sh="\${SHELL} $am_aux_dir/install-sh"
578   esac
579 fi
580 AC_SUBST(install_sh)])
581
582 # Copyright (C) 2003, 2005  Free Software Foundation, Inc.
583 #
584 # This file is free software; the Free Software Foundation
585 # gives unlimited permission to copy and/or distribute it,
586 # with or without modifications, as long as this notice is preserved.
587
588 # serial 2
589
590 # Check whether the underlying file-system supports filenames
591 # with a leading dot.  For instance MS-DOS doesn't.
592 AC_DEFUN([AM_SET_LEADING_DOT],
593 [rm -rf .tst 2>/dev/null
594 mkdir .tst 2>/dev/null
595 if test -d .tst; then
596   am__leading_dot=.
597 else
598   am__leading_dot=_
599 fi
600 rmdir .tst 2>/dev/null
601 AC_SUBST([am__leading_dot])])
602
603 # Check to see how 'make' treats includes.                  -*- Autoconf -*-
604
605 # Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
606 #
607 # This file is free software; the Free Software Foundation
608 # gives unlimited permission to copy and/or distribute it,
609 # with or without modifications, as long as this notice is preserved.
610
611 # serial 4
612
613 # AM_MAKE_INCLUDE()
614 # -----------------
615 # Check to see how make treats includes.
616 AC_DEFUN([AM_MAKE_INCLUDE],
617 [am_make=${MAKE-make}
618 cat > confinc << 'END'
619 am__doit:
620         @echo this is the am__doit target
621 .PHONY: am__doit
622 END
623 # If we don't find an include directive, just comment out the code.
624 AC_MSG_CHECKING([for style of include used by $am_make])
625 am__include="#"
626 am__quote=
627 _am_result=none
628 # First try GNU make style include.
629 echo "include confinc" > confmf
630 # Ignore all kinds of additional output from `make'.
631 case `$am_make -s -f confmf 2> /dev/null` in #(
632 *the\ am__doit\ target*)
633   am__include=include
634   am__quote=
635   _am_result=GNU
636   ;;
637 esac
638 # Now try BSD make style include.
639 if test "$am__include" = "#"; then
640    echo '.include "confinc"' > confmf
641    case `$am_make -s -f confmf 2> /dev/null` in #(
642    *the\ am__doit\ target*)
643      am__include=.include
644      am__quote="\""
645      _am_result=BSD
646      ;;
647    esac
648 fi
649 AC_SUBST([am__include])
650 AC_SUBST([am__quote])
651 AC_MSG_RESULT([$_am_result])
652 rm -f confinc confmf
653 ])
654
655 # Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008
656 # Free Software Foundation, Inc.
657 #
658 # This file is free software; the Free Software Foundation
659 # gives unlimited permission to copy and/or distribute it,
660 # with or without modifications, as long as this notice is preserved.
661
662 # serial 6
663
664 # AM_PROG_CC_C_O
665 # --------------
666 # Like AC_PROG_CC_C_O, but changed for automake.
667 AC_DEFUN([AM_PROG_CC_C_O],
668 [AC_REQUIRE([AC_PROG_CC_C_O])dnl
669 AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
670 AC_REQUIRE_AUX_FILE([compile])dnl
671 # FIXME: we rely on the cache variable name because
672 # there is no other way.
673 set dummy $CC
674 am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
675 eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
676 if test "$am_t" != yes; then
677    # Losing compiler, so override with the script.
678    # FIXME: It is wrong to rewrite CC.
679    # But if we don't then we get into trouble of one sort or another.
680    # A longer-term fix would be to have automake use am__CC in this case,
681    # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
682    CC="$am_aux_dir/compile $CC"
683 fi
684 dnl Make sure AC_PROG_CC is never called again, or it will override our
685 dnl setting of CC.
686 m4_define([AC_PROG_CC],
687           [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
688 ])
689
690 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
691
692 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
693 # Free Software Foundation, Inc.
694 #
695 # This file is free software; the Free Software Foundation
696 # gives unlimited permission to copy and/or distribute it,
697 # with or without modifications, as long as this notice is preserved.
698
699 # serial 6
700
701 # AM_MISSING_PROG(NAME, PROGRAM)
702 # ------------------------------
703 AC_DEFUN([AM_MISSING_PROG],
704 [AC_REQUIRE([AM_MISSING_HAS_RUN])
705 $1=${$1-"${am_missing_run}$2"}
706 AC_SUBST($1)])
707
708
709 # AM_MISSING_HAS_RUN
710 # ------------------
711 # Define MISSING if not defined so far and test if it supports --run.
712 # If it does, set am_missing_run to use it, otherwise, to nothing.
713 AC_DEFUN([AM_MISSING_HAS_RUN],
714 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
715 AC_REQUIRE_AUX_FILE([missing])dnl
716 if test x"${MISSING+set}" != xset; then
717   case $am_aux_dir in
718   *\ * | *\     *)
719     MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
720   *)
721     MISSING="\${SHELL} $am_aux_dir/missing" ;;
722   esac
723 fi
724 # Use eval to expand $SHELL
725 if eval "$MISSING --run true"; then
726   am_missing_run="$MISSING --run "
727 else
728   am_missing_run=
729   AC_MSG_WARN([`missing' script is too old or missing])
730 fi
731 ])
732
733 # Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
734 # Inc.
735 #
736 # This file is free software; the Free Software Foundation
737 # gives unlimited permission to copy and/or distribute it,
738 # with or without modifications, as long as this notice is preserved.
739
740 # serial 1
741
742 # AM_PROG_MKDIR_P
743 # ---------------
744 # Check for `mkdir -p'.
745 AC_DEFUN([AM_PROG_MKDIR_P],
746 [AC_PREREQ([2.60])dnl
747 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
748 dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
749 dnl while keeping a definition of mkdir_p for backward compatibility.
750 dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
751 dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
752 dnl Makefile.ins that do not define MKDIR_P, so we do our own
753 dnl adjustment using top_builddir (which is defined more often than
754 dnl MKDIR_P).
755 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
756 case $mkdir_p in
757   [[\\/$]]* | ?:[[\\/]]*) ;;
758   */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
759 esac
760 ])
761
762 # Helper functions for option handling.                     -*- Autoconf -*-
763
764 # Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
765 # Foundation, Inc.
766 #
767 # This file is free software; the Free Software Foundation
768 # gives unlimited permission to copy and/or distribute it,
769 # with or without modifications, as long as this notice is preserved.
770
771 # serial 5
772
773 # _AM_MANGLE_OPTION(NAME)
774 # -----------------------
775 AC_DEFUN([_AM_MANGLE_OPTION],
776 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
777
778 # _AM_SET_OPTION(NAME)
779 # --------------------
780 # Set option NAME.  Presently that only means defining a flag for this option.
781 AC_DEFUN([_AM_SET_OPTION],
782 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
783
784 # _AM_SET_OPTIONS(OPTIONS)
785 # ------------------------
786 # OPTIONS is a space-separated list of Automake options.
787 AC_DEFUN([_AM_SET_OPTIONS],
788 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
789
790 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
791 # -------------------------------------------
792 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
793 AC_DEFUN([_AM_IF_OPTION],
794 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
795
796 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009,
797 # 2011 Free Software Foundation, Inc.
798 #
799 # This file is free software; the Free Software Foundation
800 # gives unlimited permission to copy and/or distribute it,
801 # with or without modifications, as long as this notice is preserved.
802
803 # serial 2
804
805 # AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
806 # ---------------------------------------------------------------------------
807 # Adds support for distributing Python modules and packages.  To
808 # install modules, copy them to $(pythondir), using the python_PYTHON
809 # automake variable.  To install a package with the same name as the
810 # automake package, install to $(pkgpythondir), or use the
811 # pkgpython_PYTHON automake variable.
812 #
813 # The variables $(pyexecdir) and $(pkgpyexecdir) are provided as
814 # locations to install python extension modules (shared libraries).
815 # Another macro is required to find the appropriate flags to compile
816 # extension modules.
817 #
818 # If your package is configured with a different prefix to python,
819 # users will have to add the install directory to the PYTHONPATH
820 # environment variable, or create a .pth file (see the python
821 # documentation for details).
822 #
823 # If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will
824 # cause an error if the version of python installed on the system
825 # doesn't meet the requirement.  MINIMUM-VERSION should consist of
826 # numbers and dots only.
827 AC_DEFUN([AM_PATH_PYTHON],
828  [
829   dnl Find a Python interpreter.  Python versions prior to 2.0 are not
830   dnl supported. (2.0 was released on October 16, 2000).
831   m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
832 [python python2 python3 python3.2 python3.1 python3.0 python2.7 dnl
833  python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0])
834
835   AC_ARG_VAR([PYTHON], [the Python interpreter])
836
837   m4_if([$1],[],[
838     dnl No version check is needed.
839     # Find any Python interpreter.
840     if test -z "$PYTHON"; then
841       AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :)
842     fi
843     am_display_PYTHON=python
844   ], [
845     dnl A version check is needed.
846     if test -n "$PYTHON"; then
847       # If the user set $PYTHON, use it and don't search something else.
848       AC_MSG_CHECKING([whether $PYTHON version >= $1])
849       AM_PYTHON_CHECK_VERSION([$PYTHON], [$1],
850                               [AC_MSG_RESULT(yes)],
851                               [AC_MSG_ERROR(too old)])
852       am_display_PYTHON=$PYTHON
853     else
854       # Otherwise, try each interpreter until we find one that satisfies
855       # VERSION.
856       AC_CACHE_CHECK([for a Python interpreter with version >= $1],
857         [am_cv_pathless_PYTHON],[
858         for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do
859           test "$am_cv_pathless_PYTHON" = none && break
860           AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break])
861         done])
862       # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
863       if test "$am_cv_pathless_PYTHON" = none; then
864         PYTHON=:
865       else
866         AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON])
867       fi
868       am_display_PYTHON=$am_cv_pathless_PYTHON
869     fi
870   ])
871
872   if test "$PYTHON" = :; then
873   dnl Run any user-specified action, or abort.
874     m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])])
875   else
876
877   dnl Query Python for its version number.  Getting [:3] seems to be
878   dnl the best way to do this; it's what "site.py" does in the standard
879   dnl library.
880
881   AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version],
882     [am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`])
883   AC_SUBST([PYTHON_VERSION], [$am_cv_python_version])
884
885   dnl Use the values of $prefix and $exec_prefix for the corresponding
886   dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX.  These are made
887   dnl distinct variables so they can be overridden if need be.  However,
888   dnl general consensus is that you shouldn't need this ability.
889
890   AC_SUBST([PYTHON_PREFIX], ['${prefix}'])
891   AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}'])
892
893   dnl At times (like when building shared libraries) you may want
894   dnl to know which OS platform Python thinks this is.
895
896   AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform],
897     [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`])
898   AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform])
899
900
901   dnl Set up 4 directories:
902
903   dnl pythondir -- where to install python scripts.  This is the
904   dnl   site-packages directory, not the python standard library
905   dnl   directory like in previous automake betas.  This behavior
906   dnl   is more consistent with lispdir.m4 for example.
907   dnl Query distutils for this directory.
908   AC_CACHE_CHECK([for $am_display_PYTHON script directory],
909     [am_cv_python_pythondir],
910     [if test "x$prefix" = xNONE
911      then
912        am_py_prefix=$ac_default_prefix
913      else
914        am_py_prefix=$prefix
915      fi
916      am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null`
917      case $am_cv_python_pythondir in
918      $am_py_prefix*)
919        am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
920        am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"`
921        ;;
922      *)
923        case $am_py_prefix in
924          /usr|/System*) ;;
925          *)
926           am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages
927           ;;
928        esac
929        ;;
930      esac
931     ])
932   AC_SUBST([pythondir], [$am_cv_python_pythondir])
933
934   dnl pkgpythondir -- $PACKAGE directory under pythondir.  Was
935   dnl   PYTHON_SITE_PACKAGE in previous betas, but this naming is
936   dnl   more consistent with the rest of automake.
937
938   AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE])
939
940   dnl pyexecdir -- directory for installing python extension modules
941   dnl   (shared libraries)
942   dnl Query distutils for this directory.
943   AC_CACHE_CHECK([for $am_display_PYTHON extension module directory],
944     [am_cv_python_pyexecdir],
945     [if test "x$exec_prefix" = xNONE
946      then
947        am_py_exec_prefix=$am_py_prefix
948      else
949        am_py_exec_prefix=$exec_prefix
950      fi
951      am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null`
952      case $am_cv_python_pyexecdir in
953      $am_py_exec_prefix*)
954        am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`
955        am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"`
956        ;;
957      *)
958        case $am_py_exec_prefix in
959          /usr|/System*) ;;
960          *)
961            am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages
962            ;;
963        esac
964        ;;
965      esac
966     ])
967   AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir])
968
969   dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE)
970
971   AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE])
972
973   dnl Run any user-specified action.
974   $2
975   fi
976
977 ])
978
979
980 # AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
981 # ---------------------------------------------------------------------------
982 # Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION.
983 # Run ACTION-IF-FALSE otherwise.
984 # This test uses sys.hexversion instead of the string equivalent (first
985 # word of sys.version), in order to cope with versions such as 2.2c1.
986 # This supports Python 2.0 or higher. (2.0 was released on October 16, 2000).
987 AC_DEFUN([AM_PYTHON_CHECK_VERSION],
988  [prog="import sys
989 # split strings by '.' and convert to numeric.  Append some zeros
990 # because we need at least 4 digits for the hex conversion.
991 # map returns an iterator in Python 3.0 and a list in 2.x
992 minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]]
993 minverhex = 0
994 # xrange is not present in Python 3.0 and range returns an iterator
995 for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]]
996 sys.exit(sys.hexversion < minverhex)"
997   AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])
998
999 # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
1000 #
1001 # This file is free software; the Free Software Foundation
1002 # gives unlimited permission to copy and/or distribute it,
1003 # with or without modifications, as long as this notice is preserved.
1004
1005 # serial 1
1006
1007 # AM_RUN_LOG(COMMAND)
1008 # -------------------
1009 # Run COMMAND, save the exit status in ac_status, and log it.
1010 # (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
1011 AC_DEFUN([AM_RUN_LOG],
1012 [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
1013    ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
1014    ac_status=$?
1015    echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1016    (exit $ac_status); }])
1017
1018 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
1019
1020 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
1021 # Free Software Foundation, Inc.
1022 #
1023 # This file is free software; the Free Software Foundation
1024 # gives unlimited permission to copy and/or distribute it,
1025 # with or without modifications, as long as this notice is preserved.
1026
1027 # serial 5
1028
1029 # AM_SANITY_CHECK
1030 # ---------------
1031 AC_DEFUN([AM_SANITY_CHECK],
1032 [AC_MSG_CHECKING([whether build environment is sane])
1033 # Just in case
1034 sleep 1
1035 echo timestamp > conftest.file
1036 # Reject unsafe characters in $srcdir or the absolute working directory
1037 # name.  Accept space and tab only in the latter.
1038 am_lf='
1039 '
1040 case `pwd` in
1041   *[[\\\"\#\$\&\'\`$am_lf]]*)
1042     AC_MSG_ERROR([unsafe absolute working directory name]);;
1043 esac
1044 case $srcdir in
1045   *[[\\\"\#\$\&\'\`$am_lf\ \    ]]*)
1046     AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
1047 esac
1048
1049 # Do `set' in a subshell so we don't clobber the current shell's
1050 # arguments.  Must try -L first in case configure is actually a
1051 # symlink; some systems play weird games with the mod time of symlinks
1052 # (eg FreeBSD returns the mod time of the symlink's containing
1053 # directory).
1054 if (
1055    set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
1056    if test "$[*]" = "X"; then
1057       # -L didn't work.
1058       set X `ls -t "$srcdir/configure" conftest.file`
1059    fi
1060    rm -f conftest.file
1061    if test "$[*]" != "X $srcdir/configure conftest.file" \
1062       && test "$[*]" != "X conftest.file $srcdir/configure"; then
1063
1064       # If neither matched, then we have a broken ls.  This can happen
1065       # if, for instance, CONFIG_SHELL is bash and it inherits a
1066       # broken ls alias from the environment.  This has actually
1067       # happened.  Such a system could not be considered "sane".
1068       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
1069 alias in your environment])
1070    fi
1071
1072    test "$[2]" = conftest.file
1073    )
1074 then
1075    # Ok.
1076    :
1077 else
1078    AC_MSG_ERROR([newly created file is older than distributed files!
1079 Check your system clock])
1080 fi
1081 AC_MSG_RESULT(yes)])
1082
1083 # Copyright (C) 2009, 2011  Free Software Foundation, Inc.
1084 #
1085 # This file is free software; the Free Software Foundation
1086 # gives unlimited permission to copy and/or distribute it,
1087 # with or without modifications, as long as this notice is preserved.
1088
1089 # serial 2
1090
1091 # AM_SILENT_RULES([DEFAULT])
1092 # --------------------------
1093 # Enable less verbose build rules; with the default set to DEFAULT
1094 # (`yes' being less verbose, `no' or empty being verbose).
1095 AC_DEFUN([AM_SILENT_RULES],
1096 [AC_ARG_ENABLE([silent-rules],
1097 [  --enable-silent-rules          less verbose build output (undo: `make V=1')
1098   --disable-silent-rules         verbose build output (undo: `make V=0')])
1099 case $enable_silent_rules in
1100 yes) AM_DEFAULT_VERBOSITY=0;;
1101 no)  AM_DEFAULT_VERBOSITY=1;;
1102 *)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
1103 esac
1104 dnl
1105 dnl A few `make' implementations (e.g., NonStop OS and NextStep)
1106 dnl do not support nested variable expansions.
1107 dnl See automake bug#9928 and bug#10237.
1108 am_make=${MAKE-make}
1109 AC_CACHE_CHECK([whether $am_make supports nested variables],
1110    [am_cv_make_support_nested_variables],
1111    [if AS_ECHO([['TRUE=$(BAR$(V))
1112 BAR0=false
1113 BAR1=true
1114 V=1
1115 am__doit:
1116         @$(TRUE)
1117 .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
1118   am_cv_make_support_nested_variables=yes
1119 else
1120   am_cv_make_support_nested_variables=no
1121 fi])
1122 if test $am_cv_make_support_nested_variables = yes; then
1123   dnl Using `$V' instead of `$(V)' breaks IRIX make.
1124   AM_V='$(V)'
1125   AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
1126 else
1127   AM_V=$AM_DEFAULT_VERBOSITY
1128   AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
1129 fi
1130 AC_SUBST([AM_V])dnl
1131 AM_SUBST_NOTMAKE([AM_V])dnl
1132 AC_SUBST([AM_DEFAULT_V])dnl
1133 AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
1134 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
1135 AM_BACKSLASH='\'
1136 AC_SUBST([AM_BACKSLASH])dnl
1137 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
1138 ])
1139
1140 # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
1141 #
1142 # This file is free software; the Free Software Foundation
1143 # gives unlimited permission to copy and/or distribute it,
1144 # with or without modifications, as long as this notice is preserved.
1145
1146 # serial 1
1147
1148 # AM_PROG_INSTALL_STRIP
1149 # ---------------------
1150 # One issue with vendor `install' (even GNU) is that you can't
1151 # specify the program used to strip binaries.  This is especially
1152 # annoying in cross-compiling environments, where the build's strip
1153 # is unlikely to handle the host's binaries.
1154 # Fortunately install-sh will honor a STRIPPROG variable, so we
1155 # always use install-sh in `make install-strip', and initialize
1156 # STRIPPROG with the value of the STRIP variable (set by the user).
1157 AC_DEFUN([AM_PROG_INSTALL_STRIP],
1158 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1159 # Installed binaries are usually stripped using `strip' when the user
1160 # run `make install-strip'.  However `strip' might not be the right
1161 # tool to use in cross-compilation environments, therefore Automake
1162 # will honor the `STRIP' environment variable to overrule this program.
1163 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
1164 if test "$cross_compiling" != no; then
1165   AC_CHECK_TOOL([STRIP], [strip], :)
1166 fi
1167 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1168 AC_SUBST([INSTALL_STRIP_PROGRAM])])
1169
1170 # Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
1171 #
1172 # This file is free software; the Free Software Foundation
1173 # gives unlimited permission to copy and/or distribute it,
1174 # with or without modifications, as long as this notice is preserved.
1175
1176 # serial 3
1177
1178 # _AM_SUBST_NOTMAKE(VARIABLE)
1179 # ---------------------------
1180 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1181 # This macro is traced by Automake.
1182 AC_DEFUN([_AM_SUBST_NOTMAKE])
1183
1184 # AM_SUBST_NOTMAKE(VARIABLE)
1185 # --------------------------
1186 # Public sister of _AM_SUBST_NOTMAKE.
1187 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1188
1189 # Check how to create a tarball.                            -*- Autoconf -*-
1190
1191 # Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
1192 #
1193 # This file is free software; the Free Software Foundation
1194 # gives unlimited permission to copy and/or distribute it,
1195 # with or without modifications, as long as this notice is preserved.
1196
1197 # serial 2
1198
1199 # _AM_PROG_TAR(FORMAT)
1200 # --------------------
1201 # Check how to create a tarball in format FORMAT.
1202 # FORMAT should be one of `v7', `ustar', or `pax'.
1203 #
1204 # Substitute a variable $(am__tar) that is a command
1205 # writing to stdout a FORMAT-tarball containing the directory
1206 # $tardir.
1207 #     tardir=directory && $(am__tar) > result.tar
1208 #
1209 # Substitute a variable $(am__untar) that extract such
1210 # a tarball read from stdin.
1211 #     $(am__untar) < result.tar
1212 AC_DEFUN([_AM_PROG_TAR],
1213 [# Always define AMTAR for backward compatibility.  Yes, it's still used
1214 # in the wild :-(  We should find a proper way to deprecate it ...
1215 AC_SUBST([AMTAR], ['$${TAR-tar}'])
1216 m4_if([$1], [v7],
1217      [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
1218      [m4_case([$1], [ustar],, [pax],,
1219               [m4_fatal([Unknown tar format])])
1220 AC_MSG_CHECKING([how to create a $1 tar archive])
1221 # Loop over all known methods to create a tar archive until one works.
1222 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1223 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1224 # Do not fold the above two line into one, because Tru64 sh and
1225 # Solaris sh will not grok spaces in the rhs of `-'.
1226 for _am_tool in $_am_tools
1227 do
1228   case $_am_tool in
1229   gnutar)
1230     for _am_tar in tar gnutar gtar;
1231     do
1232       AM_RUN_LOG([$_am_tar --version]) && break
1233     done
1234     am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1235     am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1236     am__untar="$_am_tar -xf -"
1237     ;;
1238   plaintar)
1239     # Must skip GNU tar: if it does not support --format= it doesn't create
1240     # ustar tarball either.
1241     (tar --version) >/dev/null 2>&1 && continue
1242     am__tar='tar chf - "$$tardir"'
1243     am__tar_='tar chf - "$tardir"'
1244     am__untar='tar xf -'
1245     ;;
1246   pax)
1247     am__tar='pax -L -x $1 -w "$$tardir"'
1248     am__tar_='pax -L -x $1 -w "$tardir"'
1249     am__untar='pax -r'
1250     ;;
1251   cpio)
1252     am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1253     am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1254     am__untar='cpio -i -H $1 -d'
1255     ;;
1256   none)
1257     am__tar=false
1258     am__tar_=false
1259     am__untar=false
1260     ;;
1261   esac
1262
1263   # If the value was cached, stop now.  We just wanted to have am__tar
1264   # and am__untar set.
1265   test -n "${am_cv_prog_tar_$1}" && break
1266
1267   # tar/untar a dummy directory, and stop if the command works
1268   rm -rf conftest.dir
1269   mkdir conftest.dir
1270   echo GrepMe > conftest.dir/file
1271   AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1272   rm -rf conftest.dir
1273   if test -s conftest.tar; then
1274     AM_RUN_LOG([$am__untar <conftest.tar])
1275     grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1276   fi
1277 done
1278 rm -rf conftest.dir
1279
1280 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1281 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1282 AC_SUBST([am__tar])
1283 AC_SUBST([am__untar])
1284 ]) # _AM_PROG_TAR
1285
1286 m4_include([m4/as-ac-expand.m4])
1287 m4_include([m4/jhflags.m4])
1288 m4_include([m4/python.m4])
1289 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1290 #
1291 #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1292 #                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
1293 #                 Foundation, Inc.
1294 #   Written by Gordon Matzigkeit, 1996
1295 #
1296 # This file is free software; the Free Software Foundation gives
1297 # unlimited permission to copy and/or distribute it, with or without
1298 # modifications, as long as this notice is preserved.
1299
1300 m4_define([_LT_COPYING], [dnl
1301 #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1302 #                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
1303 #                 Foundation, Inc.
1304 #   Written by Gordon Matzigkeit, 1996
1305 #
1306 #   This file is part of GNU Libtool.
1307 #
1308 # GNU Libtool is free software; you can redistribute it and/or
1309 # modify it under the terms of the GNU General Public License as
1310 # published by the Free Software Foundation; either version 2 of
1311 # the License, or (at your option) any later version.
1312 #
1313 # As a special exception to the GNU General Public License,
1314 # if you distribute this file as part of a program or library that
1315 # is built using GNU Libtool, you may include this file under the
1316 # same distribution terms that you use for the rest of that program.
1317 #
1318 # GNU Libtool is distributed in the hope that it will be useful,
1319 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1320 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1321 # GNU General Public License for more details.
1322 #
1323 # You should have received a copy of the GNU General Public License
1324 # along with GNU Libtool; see the file COPYING.  If not, a copy
1325 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
1326 # obtained by writing to the Free Software Foundation, Inc.,
1327 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1328 ])
1329
1330 # serial 57 LT_INIT
1331
1332
1333 # LT_PREREQ(VERSION)
1334 # ------------------
1335 # Complain and exit if this libtool version is less that VERSION.
1336 m4_defun([LT_PREREQ],
1337 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
1338        [m4_default([$3],
1339                    [m4_fatal([Libtool version $1 or higher is required],
1340                              63)])],
1341        [$2])])
1342
1343
1344 # _LT_CHECK_BUILDDIR
1345 # ------------------
1346 # Complain if the absolute build directory name contains unusual characters
1347 m4_defun([_LT_CHECK_BUILDDIR],
1348 [case `pwd` in
1349   *\ * | *\     *)
1350     AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
1351 esac
1352 ])
1353
1354
1355 # LT_INIT([OPTIONS])
1356 # ------------------
1357 AC_DEFUN([LT_INIT],
1358 [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
1359 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
1360 AC_BEFORE([$0], [LT_LANG])dnl
1361 AC_BEFORE([$0], [LT_OUTPUT])dnl
1362 AC_BEFORE([$0], [LTDL_INIT])dnl
1363 m4_require([_LT_CHECK_BUILDDIR])dnl
1364
1365 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
1366 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
1367 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
1368 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
1369 dnl unless we require an AC_DEFUNed macro:
1370 AC_REQUIRE([LTOPTIONS_VERSION])dnl
1371 AC_REQUIRE([LTSUGAR_VERSION])dnl
1372 AC_REQUIRE([LTVERSION_VERSION])dnl
1373 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
1374 m4_require([_LT_PROG_LTMAIN])dnl
1375
1376 _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
1377
1378 dnl Parse OPTIONS
1379 _LT_SET_OPTIONS([$0], [$1])
1380
1381 # This can be used to rebuild libtool when needed
1382 LIBTOOL_DEPS="$ltmain"
1383
1384 # Always use our own libtool.
1385 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1386 AC_SUBST(LIBTOOL)dnl
1387
1388 _LT_SETUP
1389
1390 # Only expand once:
1391 m4_define([LT_INIT])
1392 ])# LT_INIT
1393
1394 # Old names:
1395 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
1396 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
1397 dnl aclocal-1.4 backwards compatibility:
1398 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
1399 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
1400
1401
1402 # _LT_CC_BASENAME(CC)
1403 # -------------------
1404 # Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
1405 m4_defun([_LT_CC_BASENAME],
1406 [for cc_temp in $1""; do
1407   case $cc_temp in
1408     compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1409     distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1410     \-*) ;;
1411     *) break;;
1412   esac
1413 done
1414 cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
1415 ])
1416
1417
1418 # _LT_FILEUTILS_DEFAULTS
1419 # ----------------------
1420 # It is okay to use these file commands and assume they have been set
1421 # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
1422 m4_defun([_LT_FILEUTILS_DEFAULTS],
1423 [: ${CP="cp -f"}
1424 : ${MV="mv -f"}
1425 : ${RM="rm -f"}
1426 ])# _LT_FILEUTILS_DEFAULTS
1427
1428
1429 # _LT_SETUP
1430 # ---------
1431 m4_defun([_LT_SETUP],
1432 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1433 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1434 AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
1435 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
1436
1437 _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
1438 dnl
1439 _LT_DECL([], [host_alias], [0], [The host system])dnl
1440 _LT_DECL([], [host], [0])dnl
1441 _LT_DECL([], [host_os], [0])dnl
1442 dnl
1443 _LT_DECL([], [build_alias], [0], [The build system])dnl
1444 _LT_DECL([], [build], [0])dnl
1445 _LT_DECL([], [build_os], [0])dnl
1446 dnl
1447 AC_REQUIRE([AC_PROG_CC])dnl
1448 AC_REQUIRE([LT_PATH_LD])dnl
1449 AC_REQUIRE([LT_PATH_NM])dnl
1450 dnl
1451 AC_REQUIRE([AC_PROG_LN_S])dnl
1452 test -z "$LN_S" && LN_S="ln -s"
1453 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
1454 dnl
1455 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
1456 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
1457 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
1458 dnl
1459 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1460 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
1461 m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
1462 m4_require([_LT_CMD_RELOAD])dnl
1463 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
1464 m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
1465 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
1466 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
1467 m4_require([_LT_WITH_SYSROOT])dnl
1468
1469 _LT_CONFIG_LIBTOOL_INIT([
1470 # See if we are running on zsh, and set the options which allow our
1471 # commands through without removal of \ escapes INIT.
1472 if test -n "\${ZSH_VERSION+set}" ; then
1473    setopt NO_GLOB_SUBST
1474 fi
1475 ])
1476 if test -n "${ZSH_VERSION+set}" ; then
1477    setopt NO_GLOB_SUBST
1478 fi
1479
1480 _LT_CHECK_OBJDIR
1481
1482 m4_require([_LT_TAG_COMPILER])dnl
1483
1484 case $host_os in
1485 aix3*)
1486   # AIX sometimes has problems with the GCC collect2 program.  For some
1487   # reason, if we set the COLLECT_NAMES environment variable, the problems
1488   # vanish in a puff of smoke.
1489   if test "X${COLLECT_NAMES+set}" != Xset; then
1490     COLLECT_NAMES=
1491     export COLLECT_NAMES
1492   fi
1493   ;;
1494 esac
1495
1496 # Global variables:
1497 ofile=libtool
1498 can_build_shared=yes
1499
1500 # All known linkers require a `.a' archive for static linking (except MSVC,
1501 # which needs '.lib').
1502 libext=a
1503
1504 with_gnu_ld="$lt_cv_prog_gnu_ld"
1505
1506 old_CC="$CC"
1507 old_CFLAGS="$CFLAGS"
1508
1509 # Set sane defaults for various variables
1510 test -z "$CC" && CC=cc
1511 test -z "$LTCC" && LTCC=$CC
1512 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
1513 test -z "$LD" && LD=ld
1514 test -z "$ac_objext" && ac_objext=o
1515
1516 _LT_CC_BASENAME([$compiler])
1517
1518 # Only perform the check for file, if the check method requires it
1519 test -z "$MAGIC_CMD" && MAGIC_CMD=file
1520 case $deplibs_check_method in
1521 file_magic*)
1522   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1523     _LT_PATH_MAGIC
1524   fi
1525   ;;
1526 esac
1527
1528 # Use C for the default configuration in the libtool script
1529 LT_SUPPORTED_TAG([CC])
1530 _LT_LANG_C_CONFIG
1531 _LT_LANG_DEFAULT_CONFIG
1532 _LT_CONFIG_COMMANDS
1533 ])# _LT_SETUP
1534
1535
1536 # _LT_PREPARE_SED_QUOTE_VARS
1537 # --------------------------
1538 # Define a few sed substitution that help us do robust quoting.
1539 m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
1540 [# Backslashify metacharacters that are still active within
1541 # double-quoted strings.
1542 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
1543
1544 # Same as above, but do not quote variable references.
1545 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
1546
1547 # Sed substitution to delay expansion of an escaped shell variable in a
1548 # double_quote_subst'ed string.
1549 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1550
1551 # Sed substitution to delay expansion of an escaped single quote.
1552 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
1553
1554 # Sed substitution to avoid accidental globbing in evaled expressions
1555 no_glob_subst='s/\*/\\\*/g'
1556 ])
1557
1558 # _LT_PROG_LTMAIN
1559 # ---------------
1560 # Note that this code is called both from `configure', and `config.status'
1561 # now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
1562 # `config.status' has no value for ac_aux_dir unless we are using Automake,
1563 # so we pass a copy along to make sure it has a sensible value anyway.
1564 m4_defun([_LT_PROG_LTMAIN],
1565 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
1566 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
1567 ltmain="$ac_aux_dir/ltmain.sh"
1568 ])# _LT_PROG_LTMAIN
1569
1570
1571
1572 # So that we can recreate a full libtool script including additional
1573 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
1574 # in macros and then make a single call at the end using the `libtool'
1575 # label.
1576
1577
1578 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
1579 # ----------------------------------------
1580 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1581 m4_define([_LT_CONFIG_LIBTOOL_INIT],
1582 [m4_ifval([$1],
1583           [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
1584                      [$1
1585 ])])])
1586
1587 # Initialize.
1588 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
1589
1590
1591 # _LT_CONFIG_LIBTOOL([COMMANDS])
1592 # ------------------------------
1593 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1594 m4_define([_LT_CONFIG_LIBTOOL],
1595 [m4_ifval([$1],
1596           [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
1597                      [$1
1598 ])])])
1599
1600 # Initialize.
1601 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
1602
1603
1604 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
1605 # -----------------------------------------------------
1606 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
1607 [_LT_CONFIG_LIBTOOL([$1])
1608 _LT_CONFIG_LIBTOOL_INIT([$2])
1609 ])
1610
1611
1612 # _LT_FORMAT_COMMENT([COMMENT])
1613 # -----------------------------
1614 # Add leading comment marks to the start of each line, and a trailing
1615 # full-stop to the whole comment if one is not present already.
1616 m4_define([_LT_FORMAT_COMMENT],
1617 [m4_ifval([$1], [
1618 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
1619               [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
1620 )])
1621
1622
1623
1624
1625
1626 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
1627 # -------------------------------------------------------------------
1628 # CONFIGNAME is the name given to the value in the libtool script.
1629 # VARNAME is the (base) name used in the configure script.
1630 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
1631 # VARNAME.  Any other value will be used directly.
1632 m4_define([_LT_DECL],
1633 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
1634     [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
1635         [m4_ifval([$1], [$1], [$2])])
1636     lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
1637     m4_ifval([$4],
1638         [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
1639     lt_dict_add_subkey([lt_decl_dict], [$2],
1640         [tagged?], [m4_ifval([$5], [yes], [no])])])
1641 ])
1642
1643
1644 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
1645 # --------------------------------------------------------
1646 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
1647
1648
1649 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
1650 # ------------------------------------------------
1651 m4_define([lt_decl_tag_varnames],
1652 [_lt_decl_filter([tagged?], [yes], $@)])
1653
1654
1655 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
1656 # ---------------------------------------------------------
1657 m4_define([_lt_decl_filter],
1658 [m4_case([$#],
1659   [0], [m4_fatal([$0: too few arguments: $#])],
1660   [1], [m4_fatal([$0: too few arguments: $#: $1])],
1661   [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
1662   [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
1663   [lt_dict_filter([lt_decl_dict], $@)])[]dnl
1664 ])
1665
1666
1667 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
1668 # --------------------------------------------------
1669 m4_define([lt_decl_quote_varnames],
1670 [_lt_decl_filter([value], [1], $@)])
1671
1672
1673 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
1674 # ---------------------------------------------------
1675 m4_define([lt_decl_dquote_varnames],
1676 [_lt_decl_filter([value], [2], $@)])
1677
1678
1679 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
1680 # ---------------------------------------------------
1681 m4_define([lt_decl_varnames_tagged],
1682 [m4_assert([$# <= 2])dnl
1683 _$0(m4_quote(m4_default([$1], [[, ]])),
1684     m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
1685     m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
1686 m4_define([_lt_decl_varnames_tagged],
1687 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
1688
1689
1690 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
1691 # ------------------------------------------------
1692 m4_define([lt_decl_all_varnames],
1693 [_$0(m4_quote(m4_default([$1], [[, ]])),
1694      m4_if([$2], [],
1695            m4_quote(lt_decl_varnames),
1696         m4_quote(m4_shift($@))))[]dnl
1697 ])
1698 m4_define([_lt_decl_all_varnames],
1699 [lt_join($@, lt_decl_varnames_tagged([$1],
1700                         lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
1701 ])
1702
1703
1704 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
1705 # ------------------------------------
1706 # Quote a variable value, and forward it to `config.status' so that its
1707 # declaration there will have the same value as in `configure'.  VARNAME
1708 # must have a single quote delimited value for this to work.
1709 m4_define([_LT_CONFIG_STATUS_DECLARE],
1710 [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
1711
1712
1713 # _LT_CONFIG_STATUS_DECLARATIONS
1714 # ------------------------------
1715 # We delimit libtool config variables with single quotes, so when
1716 # we write them to config.status, we have to be sure to quote all
1717 # embedded single quotes properly.  In configure, this macro expands
1718 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
1719 #
1720 #    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
1721 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
1722 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
1723     [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
1724
1725
1726 # _LT_LIBTOOL_TAGS
1727 # ----------------
1728 # Output comment and list of tags supported by the script
1729 m4_defun([_LT_LIBTOOL_TAGS],
1730 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
1731 available_tags="_LT_TAGS"dnl
1732 ])
1733
1734
1735 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
1736 # -----------------------------------
1737 # Extract the dictionary values for VARNAME (optionally with TAG) and
1738 # expand to a commented shell variable setting:
1739 #
1740 #    # Some comment about what VAR is for.
1741 #    visible_name=$lt_internal_name
1742 m4_define([_LT_LIBTOOL_DECLARE],
1743 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
1744                                            [description])))[]dnl
1745 m4_pushdef([_libtool_name],
1746     m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
1747 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
1748     [0], [_libtool_name=[$]$1],
1749     [1], [_libtool_name=$lt_[]$1],
1750     [2], [_libtool_name=$lt_[]$1],
1751     [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
1752 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
1753 ])
1754
1755
1756 # _LT_LIBTOOL_CONFIG_VARS
1757 # -----------------------
1758 # Produce commented declarations of non-tagged libtool config variables
1759 # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
1760 # script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
1761 # section) are produced by _LT_LIBTOOL_TAG_VARS.
1762 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
1763 [m4_foreach([_lt_var],
1764     m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
1765     [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
1766
1767
1768 # _LT_LIBTOOL_TAG_VARS(TAG)
1769 # -------------------------
1770 m4_define([_LT_LIBTOOL_TAG_VARS],
1771 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
1772     [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
1773
1774
1775 # _LT_TAGVAR(VARNAME, [TAGNAME])
1776 # ------------------------------
1777 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
1778
1779
1780 # _LT_CONFIG_COMMANDS
1781 # -------------------
1782 # Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
1783 # variables for single and double quote escaping we saved from calls
1784 # to _LT_DECL, we can put quote escaped variables declarations
1785 # into `config.status', and then the shell code to quote escape them in
1786 # for loops in `config.status'.  Finally, any additional code accumulated
1787 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
1788 m4_defun([_LT_CONFIG_COMMANDS],
1789 [AC_PROVIDE_IFELSE([LT_OUTPUT],
1790         dnl If the libtool generation code has been placed in $CONFIG_LT,
1791         dnl instead of duplicating it all over again into config.status,
1792         dnl then we will have config.status run $CONFIG_LT later, so it
1793         dnl needs to know what name is stored there:
1794         [AC_CONFIG_COMMANDS([libtool],
1795             [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
1796     dnl If the libtool generation code is destined for config.status,
1797     dnl expand the accumulated commands and init code now:
1798     [AC_CONFIG_COMMANDS([libtool],
1799         [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
1800 ])#_LT_CONFIG_COMMANDS
1801
1802
1803 # Initialize.
1804 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
1805 [
1806
1807 # The HP-UX ksh and POSIX shell print the target directory to stdout
1808 # if CDPATH is set.
1809 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1810
1811 sed_quote_subst='$sed_quote_subst'
1812 double_quote_subst='$double_quote_subst'
1813 delay_variable_subst='$delay_variable_subst'
1814 _LT_CONFIG_STATUS_DECLARATIONS
1815 LTCC='$LTCC'
1816 LTCFLAGS='$LTCFLAGS'
1817 compiler='$compiler_DEFAULT'
1818
1819 # A function that is used when there is no print builtin or printf.
1820 func_fallback_echo ()
1821 {
1822   eval 'cat <<_LTECHO_EOF
1823 \$[]1
1824 _LTECHO_EOF'
1825 }
1826
1827 # Quote evaled strings.
1828 for var in lt_decl_all_varnames([[ \
1829 ]], lt_decl_quote_varnames); do
1830     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
1831     *[[\\\\\\\`\\"\\\$]]*)
1832       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
1833       ;;
1834     *)
1835       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1836       ;;
1837     esac
1838 done
1839
1840 # Double-quote double-evaled strings.
1841 for var in lt_decl_all_varnames([[ \
1842 ]], lt_decl_dquote_varnames); do
1843     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
1844     *[[\\\\\\\`\\"\\\$]]*)
1845       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
1846       ;;
1847     *)
1848       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1849       ;;
1850     esac
1851 done
1852
1853 _LT_OUTPUT_LIBTOOL_INIT
1854 ])
1855
1856 # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
1857 # ------------------------------------
1858 # Generate a child script FILE with all initialization necessary to
1859 # reuse the environment learned by the parent script, and make the
1860 # file executable.  If COMMENT is supplied, it is inserted after the
1861 # `#!' sequence but before initialization text begins.  After this
1862 # macro, additional text can be appended to FILE to form the body of
1863 # the child script.  The macro ends with non-zero status if the
1864 # file could not be fully written (such as if the disk is full).
1865 m4_ifdef([AS_INIT_GENERATED],
1866 [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
1867 [m4_defun([_LT_GENERATED_FILE_INIT],
1868 [m4_require([AS_PREPARE])]dnl
1869 [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
1870 [lt_write_fail=0
1871 cat >$1 <<_ASEOF || lt_write_fail=1
1872 #! $SHELL
1873 # Generated by $as_me.
1874 $2
1875 SHELL=\${CONFIG_SHELL-$SHELL}
1876 export SHELL
1877 _ASEOF
1878 cat >>$1 <<\_ASEOF || lt_write_fail=1
1879 AS_SHELL_SANITIZE
1880 _AS_PREPARE
1881 exec AS_MESSAGE_FD>&1
1882 _ASEOF
1883 test $lt_write_fail = 0 && chmod +x $1[]dnl
1884 m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
1885
1886 # LT_OUTPUT
1887 # ---------
1888 # This macro allows early generation of the libtool script (before
1889 # AC_OUTPUT is called), incase it is used in configure for compilation
1890 # tests.
1891 AC_DEFUN([LT_OUTPUT],
1892 [: ${CONFIG_LT=./config.lt}
1893 AC_MSG_NOTICE([creating $CONFIG_LT])
1894 _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
1895 [# Run this file to recreate a libtool stub with the current configuration.])
1896
1897 cat >>"$CONFIG_LT" <<\_LTEOF
1898 lt_cl_silent=false
1899 exec AS_MESSAGE_LOG_FD>>config.log
1900 {
1901   echo
1902   AS_BOX([Running $as_me.])
1903 } >&AS_MESSAGE_LOG_FD
1904
1905 lt_cl_help="\
1906 \`$as_me' creates a local libtool stub from the current configuration,
1907 for use in further configure time tests before the real libtool is
1908 generated.
1909
1910 Usage: $[0] [[OPTIONS]]
1911
1912   -h, --help      print this help, then exit
1913   -V, --version   print version number, then exit
1914   -q, --quiet     do not print progress messages
1915   -d, --debug     don't remove temporary files
1916
1917 Report bugs to <bug-libtool@gnu.org>."
1918
1919 lt_cl_version="\
1920 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
1921 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
1922 configured by $[0], generated by m4_PACKAGE_STRING.
1923
1924 Copyright (C) 2011 Free Software Foundation, Inc.
1925 This config.lt script is free software; the Free Software Foundation
1926 gives unlimited permision to copy, distribute and modify it."
1927
1928 while test $[#] != 0
1929 do
1930   case $[1] in
1931     --version | --v* | -V )
1932       echo "$lt_cl_version"; exit 0 ;;
1933     --help | --h* | -h )
1934       echo "$lt_cl_help"; exit 0 ;;
1935     --debug | --d* | -d )
1936       debug=: ;;
1937     --quiet | --q* | --silent | --s* | -q )
1938       lt_cl_silent=: ;;
1939
1940     -*) AC_MSG_ERROR([unrecognized option: $[1]
1941 Try \`$[0] --help' for more information.]) ;;
1942
1943     *) AC_MSG_ERROR([unrecognized argument: $[1]
1944 Try \`$[0] --help' for more information.]) ;;
1945   esac
1946   shift
1947 done
1948
1949 if $lt_cl_silent; then
1950   exec AS_MESSAGE_FD>/dev/null
1951 fi
1952 _LTEOF
1953
1954 cat >>"$CONFIG_LT" <<_LTEOF
1955 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
1956 _LTEOF
1957
1958 cat >>"$CONFIG_LT" <<\_LTEOF
1959 AC_MSG_NOTICE([creating $ofile])
1960 _LT_OUTPUT_LIBTOOL_COMMANDS
1961 AS_EXIT(0)
1962 _LTEOF
1963 chmod +x "$CONFIG_LT"
1964
1965 # configure is writing to config.log, but config.lt does its own redirection,
1966 # appending to config.log, which fails on DOS, as config.log is still kept
1967 # open by configure.  Here we exec the FD to /dev/null, effectively closing
1968 # config.log, so it can be properly (re)opened and appended to by config.lt.
1969 lt_cl_success=:
1970 test "$silent" = yes &&
1971   lt_config_lt_args="$lt_config_lt_args --quiet"
1972 exec AS_MESSAGE_LOG_FD>/dev/null
1973 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
1974 exec AS_MESSAGE_LOG_FD>>config.log
1975 $lt_cl_success || AS_EXIT(1)
1976 ])# LT_OUTPUT
1977
1978
1979 # _LT_CONFIG(TAG)
1980 # ---------------
1981 # If TAG is the built-in tag, create an initial libtool script with a
1982 # default configuration from the untagged config vars.  Otherwise add code
1983 # to config.status for appending the configuration named by TAG from the
1984 # matching tagged config vars.
1985 m4_defun([_LT_CONFIG],
1986 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1987 _LT_CONFIG_SAVE_COMMANDS([
1988   m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
1989   m4_if(_LT_TAG, [C], [
1990     # See if we are running on zsh, and set the options which allow our
1991     # commands through without removal of \ escapes.
1992     if test -n "${ZSH_VERSION+set}" ; then
1993       setopt NO_GLOB_SUBST
1994     fi
1995
1996     cfgfile="${ofile}T"
1997     trap "$RM \"$cfgfile\"; exit 1" 1 2 15
1998     $RM "$cfgfile"
1999
2000     cat <<_LT_EOF >> "$cfgfile"
2001 #! $SHELL
2002
2003 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
2004 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
2005 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2006 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
2007 #
2008 _LT_COPYING
2009 _LT_LIBTOOL_TAGS
2010
2011 # ### BEGIN LIBTOOL CONFIG
2012 _LT_LIBTOOL_CONFIG_VARS
2013 _LT_LIBTOOL_TAG_VARS
2014 # ### END LIBTOOL CONFIG
2015
2016 _LT_EOF
2017
2018   case $host_os in
2019   aix3*)
2020     cat <<\_LT_EOF >> "$cfgfile"
2021 # AIX sometimes has problems with the GCC collect2 program.  For some
2022 # reason, if we set the COLLECT_NAMES environment variable, the problems
2023 # vanish in a puff of smoke.
2024 if test "X${COLLECT_NAMES+set}" != Xset; then
2025   COLLECT_NAMES=
2026   export COLLECT_NAMES
2027 fi
2028 _LT_EOF
2029     ;;
2030   esac
2031
2032   _LT_PROG_LTMAIN
2033
2034   # We use sed instead of cat because bash on DJGPP gets confused if
2035   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
2036   # text mode, it properly converts lines to CR/LF.  This bash problem
2037   # is reportedly fixed, but why not run on old versions too?
2038   sed '$q' "$ltmain" >> "$cfgfile" \
2039      || (rm -f "$cfgfile"; exit 1)
2040
2041   _LT_PROG_REPLACE_SHELLFNS
2042
2043    mv -f "$cfgfile" "$ofile" ||
2044     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
2045   chmod +x "$ofile"
2046 ],
2047 [cat <<_LT_EOF >> "$ofile"
2048
2049 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
2050 dnl in a comment (ie after a #).
2051 # ### BEGIN LIBTOOL TAG CONFIG: $1
2052 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
2053 # ### END LIBTOOL TAG CONFIG: $1
2054 _LT_EOF
2055 ])dnl /m4_if
2056 ],
2057 [m4_if([$1], [], [
2058     PACKAGE='$PACKAGE'
2059     VERSION='$VERSION'
2060     TIMESTAMP='$TIMESTAMP'
2061     RM='$RM'
2062     ofile='$ofile'], [])
2063 ])dnl /_LT_CONFIG_SAVE_COMMANDS
2064 ])# _LT_CONFIG
2065
2066
2067 # LT_SUPPORTED_TAG(TAG)
2068 # ---------------------
2069 # Trace this macro to discover what tags are supported by the libtool
2070 # --tag option, using:
2071 #    autoconf --trace 'LT_SUPPORTED_TAG:$1'
2072 AC_DEFUN([LT_SUPPORTED_TAG], [])
2073
2074
2075 # C support is built-in for now
2076 m4_define([_LT_LANG_C_enabled], [])
2077 m4_define([_LT_TAGS], [])
2078
2079
2080 # LT_LANG(LANG)
2081 # -------------
2082 # Enable libtool support for the given language if not already enabled.
2083 AC_DEFUN([LT_LANG],
2084 [AC_BEFORE([$0], [LT_OUTPUT])dnl
2085 m4_case([$1],
2086   [C],                  [_LT_LANG(C)],
2087   [C++],                [_LT_LANG(CXX)],
2088   [Go],                 [_LT_LANG(GO)],
2089   [Java],               [_LT_LANG(GCJ)],
2090   [Fortran 77],         [_LT_LANG(F77)],
2091   [Fortran],            [_LT_LANG(FC)],
2092   [Windows Resource],   [_LT_LANG(RC)],
2093   [m4_ifdef([_LT_LANG_]$1[_CONFIG],
2094     [_LT_LANG($1)],
2095     [m4_fatal([$0: unsupported language: "$1"])])])dnl
2096 ])# LT_LANG
2097
2098
2099 # _LT_LANG(LANGNAME)
2100 # ------------------
2101 m4_defun([_LT_LANG],
2102 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
2103   [LT_SUPPORTED_TAG([$1])dnl
2104   m4_append([_LT_TAGS], [$1 ])dnl
2105   m4_define([_LT_LANG_]$1[_enabled], [])dnl
2106   _LT_LANG_$1_CONFIG($1)])dnl
2107 ])# _LT_LANG
2108
2109
2110 m4_ifndef([AC_PROG_GO], [
2111 # NOTE: This macro has been submitted for inclusion into   #
2112 #  GNU Autoconf as AC_PROG_GO.  When it is available in    #
2113 #  a released version of Autoconf we should remove this    #
2114 #  macro and use it instead.                               #
2115 m4_defun([AC_PROG_GO],
2116 [AC_LANG_PUSH(Go)dnl
2117 AC_ARG_VAR([GOC],     [Go compiler command])dnl
2118 AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
2119 _AC_ARG_VAR_LDFLAGS()dnl
2120 AC_CHECK_TOOL(GOC, gccgo)
2121 if test -z "$GOC"; then
2122   if test -n "$ac_tool_prefix"; then
2123     AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
2124   fi
2125 fi
2126 if test -z "$GOC"; then
2127   AC_CHECK_PROG(GOC, gccgo, gccgo, false)
2128 fi
2129 ])#m4_defun
2130 ])#m4_ifndef
2131
2132
2133 # _LT_LANG_DEFAULT_CONFIG
2134 # -----------------------
2135 m4_defun([_LT_LANG_DEFAULT_CONFIG],
2136 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
2137   [LT_LANG(CXX)],
2138   [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
2139
2140 AC_PROVIDE_IFELSE([AC_PROG_F77],
2141   [LT_LANG(F77)],
2142   [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
2143
2144 AC_PROVIDE_IFELSE([AC_PROG_FC],
2145   [LT_LANG(FC)],
2146   [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
2147
2148 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
2149 dnl pulling things in needlessly.
2150 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
2151   [LT_LANG(GCJ)],
2152   [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
2153     [LT_LANG(GCJ)],
2154     [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
2155       [LT_LANG(GCJ)],
2156       [m4_ifdef([AC_PROG_GCJ],
2157         [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
2158        m4_ifdef([A][M_PROG_GCJ],
2159         [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
2160        m4_ifdef([LT_PROG_GCJ],
2161         [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
2162
2163 AC_PROVIDE_IFELSE([AC_PROG_GO],
2164   [LT_LANG(GO)],
2165   [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
2166
2167 AC_PROVIDE_IFELSE([LT_PROG_RC],
2168   [LT_LANG(RC)],
2169   [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
2170 ])# _LT_LANG_DEFAULT_CONFIG
2171
2172 # Obsolete macros:
2173 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
2174 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
2175 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
2176 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
2177 AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
2178 dnl aclocal-1.4 backwards compatibility:
2179 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
2180 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
2181 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
2182 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
2183 dnl AC_DEFUN([AC_LIBTOOL_RC], [])
2184
2185
2186 # _LT_TAG_COMPILER
2187 # ----------------
2188 m4_defun([_LT_TAG_COMPILER],
2189 [AC_REQUIRE([AC_PROG_CC])dnl
2190
2191 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
2192 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
2193 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
2194 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
2195
2196 # If no C compiler was specified, use CC.
2197 LTCC=${LTCC-"$CC"}
2198
2199 # If no C compiler flags were specified, use CFLAGS.
2200 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
2201
2202 # Allow CC to be a program name with arguments.
2203 compiler=$CC
2204 ])# _LT_TAG_COMPILER
2205
2206
2207 # _LT_COMPILER_BOILERPLATE
2208 # ------------------------
2209 # Check for compiler boilerplate output or warnings with
2210 # the simple compiler test code.
2211 m4_defun([_LT_COMPILER_BOILERPLATE],
2212 [m4_require([_LT_DECL_SED])dnl
2213 ac_outfile=conftest.$ac_objext
2214 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
2215 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
2216 _lt_compiler_boilerplate=`cat conftest.err`
2217 $RM conftest*
2218 ])# _LT_COMPILER_BOILERPLATE
2219
2220
2221 # _LT_LINKER_BOILERPLATE
2222 # ----------------------
2223 # Check for linker boilerplate output or warnings with
2224 # the simple link test code.
2225 m4_defun([_LT_LINKER_BOILERPLATE],
2226 [m4_require([_LT_DECL_SED])dnl
2227 ac_outfile=conftest.$ac_objext
2228 echo "$lt_simple_link_test_code" >conftest.$ac_ext
2229 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
2230 _lt_linker_boilerplate=`cat conftest.err`
2231 $RM -r conftest*
2232 ])# _LT_LINKER_BOILERPLATE
2233
2234 # _LT_REQUIRED_DARWIN_CHECKS
2235 # -------------------------
2236 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
2237   case $host_os in
2238     rhapsody* | darwin*)
2239     AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
2240     AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
2241     AC_CHECK_TOOL([LIPO], [lipo], [:])
2242     AC_CHECK_TOOL([OTOOL], [otool], [:])
2243     AC_CHECK_TOOL([OTOOL64], [otool64], [:])
2244     _LT_DECL([], [DSYMUTIL], [1],
2245       [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
2246     _LT_DECL([], [NMEDIT], [1],
2247       [Tool to change global to local symbols on Mac OS X])
2248     _LT_DECL([], [LIPO], [1],
2249       [Tool to manipulate fat objects and archives on Mac OS X])
2250     _LT_DECL([], [OTOOL], [1],
2251       [ldd/readelf like tool for Mach-O binaries on Mac OS X])
2252     _LT_DECL([], [OTOOL64], [1],
2253       [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
2254
2255     AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
2256       [lt_cv_apple_cc_single_mod=no
2257       if test -z "${LT_MULTI_MODULE}"; then
2258         # By default we will add the -single_module flag. You can override
2259         # by either setting the environment variable LT_MULTI_MODULE
2260         # non-empty at configure time, or by adding -multi_module to the
2261         # link flags.
2262         rm -rf libconftest.dylib*
2263         echo "int foo(void){return 1;}" > conftest.c
2264         echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
2265 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
2266         $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
2267           -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
2268         _lt_result=$?
2269         # If there is a non-empty error log, and "single_module"
2270         # appears in it, assume the flag caused a linker warning
2271         if test -s conftest.err && $GREP single_module conftest.err; then
2272           cat conftest.err >&AS_MESSAGE_LOG_FD
2273         # Otherwise, if the output was created with a 0 exit code from
2274         # the compiler, it worked.
2275         elif test -f libconftest.dylib && test $_lt_result -eq 0; then
2276           lt_cv_apple_cc_single_mod=yes
2277         else
2278           cat conftest.err >&AS_MESSAGE_LOG_FD
2279         fi
2280         rm -rf libconftest.dylib*
2281         rm -f conftest.*
2282       fi])
2283
2284     AC_CACHE_CHECK([for -exported_symbols_list linker flag],
2285       [lt_cv_ld_exported_symbols_list],
2286       [lt_cv_ld_exported_symbols_list=no
2287       save_LDFLAGS=$LDFLAGS
2288       echo "_main" > conftest.sym
2289       LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
2290       AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2291         [lt_cv_ld_exported_symbols_list=yes],
2292         [lt_cv_ld_exported_symbols_list=no])
2293         LDFLAGS="$save_LDFLAGS"
2294     ])
2295
2296     AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
2297       [lt_cv_ld_force_load=no
2298       cat > conftest.c << _LT_EOF
2299 int forced_loaded() { return 2;}
2300 _LT_EOF
2301       echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
2302       $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
2303       echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
2304       $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
2305       echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
2306       $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
2307       cat > conftest.c << _LT_EOF
2308 int main() { return 0;}
2309 _LT_EOF
2310       echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
2311       $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
2312       _lt_result=$?
2313       if test -s conftest.err && $GREP force_load conftest.err; then
2314         cat conftest.err >&AS_MESSAGE_LOG_FD
2315       elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
2316         lt_cv_ld_force_load=yes
2317       else
2318         cat conftest.err >&AS_MESSAGE_LOG_FD
2319       fi
2320         rm -f conftest.err libconftest.a conftest conftest.c
2321         rm -rf conftest.dSYM
2322     ])
2323     case $host_os in
2324     rhapsody* | darwin1.[[012]])
2325       _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
2326     darwin1.*)
2327       _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
2328     darwin*) # darwin 5.x on
2329       # if running on 10.5 or later, the deployment target defaults
2330       # to the OS version, if on x86, and 10.4, the deployment
2331       # target defaults to 10.4. Don't you love it?
2332       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
2333         10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
2334           _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2335         10.[[012]]*)
2336           _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
2337         10.*)
2338           _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2339       esac
2340     ;;
2341   esac
2342     if test "$lt_cv_apple_cc_single_mod" = "yes"; then
2343       _lt_dar_single_mod='$single_module'
2344     fi
2345     if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
2346       _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
2347     else
2348       _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
2349     fi
2350     if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
2351       _lt_dsymutil='~$DSYMUTIL $lib || :'
2352     else
2353       _lt_dsymutil=
2354     fi
2355     ;;
2356   esac
2357 ])
2358
2359
2360 # _LT_DARWIN_LINKER_FEATURES([TAG])
2361 # ---------------------------------
2362 # Checks for linker and compiler features on darwin
2363 m4_defun([_LT_DARWIN_LINKER_FEATURES],
2364 [
2365   m4_require([_LT_REQUIRED_DARWIN_CHECKS])
2366   _LT_TAGVAR(archive_cmds_need_lc, $1)=no
2367   _LT_TAGVAR(hardcode_direct, $1)=no
2368   _LT_TAGVAR(hardcode_automatic, $1)=yes
2369   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2370   if test "$lt_cv_ld_force_load" = "yes"; then
2371     _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\"`'
2372     m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
2373                   [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
2374   else
2375     _LT_TAGVAR(whole_archive_flag_spec, $1)=''
2376   fi
2377   _LT_TAGVAR(link_all_deplibs, $1)=yes
2378   _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
2379   case $cc_basename in
2380      ifort*) _lt_dar_can_shared=yes ;;
2381      *) _lt_dar_can_shared=$GCC ;;
2382   esac
2383   if test "$_lt_dar_can_shared" = "yes"; then
2384     output_verbose_link_cmd=func_echo_all
2385     _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}"
2386     _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
2387     _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}"
2388     _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}"
2389     m4_if([$1], [CXX],
2390 [   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
2391       _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}"
2392       _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}"
2393     fi
2394 ],[])
2395   else
2396   _LT_TAGVAR(ld_shlibs, $1)=no
2397   fi
2398 ])
2399
2400 # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
2401 # ----------------------------------
2402 # Links a minimal program and checks the executable
2403 # for the system default hardcoded library path. In most cases,
2404 # this is /usr/lib:/lib, but when the MPI compilers are used
2405 # the location of the communication and MPI libs are included too.
2406 # If we don't find anything, use the default library path according
2407 # to the aix ld manual.
2408 # Store the results from the different compilers for each TAGNAME.
2409 # Allow to override them for all tags through lt_cv_aix_libpath.
2410 m4_defun([_LT_SYS_MODULE_PATH_AIX],
2411 [m4_require([_LT_DECL_SED])dnl
2412 if test "${lt_cv_aix_libpath+set}" = set; then
2413   aix_libpath=$lt_cv_aix_libpath
2414 else
2415   AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
2416   [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
2417   lt_aix_libpath_sed='[
2418       /Import File Strings/,/^$/ {
2419           /^0/ {
2420               s/^0  *\([^ ]*\) *$/\1/
2421               p
2422           }
2423       }]'
2424   _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2425   # Check for a 64-bit object if we didn't find anything.
2426   if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
2427     _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2428   fi],[])
2429   if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
2430     _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
2431   fi
2432   ])
2433   aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
2434 fi
2435 ])# _LT_SYS_MODULE_PATH_AIX
2436
2437
2438 # _LT_SHELL_INIT(ARG)
2439 # -------------------
2440 m4_define([_LT_SHELL_INIT],
2441 [m4_divert_text([M4SH-INIT], [$1
2442 ])])# _LT_SHELL_INIT
2443
2444
2445
2446 # _LT_PROG_ECHO_BACKSLASH
2447 # -----------------------
2448 # Find how we can fake an echo command that does not interpret backslash.
2449 # In particular, with Autoconf 2.60 or later we add some code to the start
2450 # of the generated configure script which will find a shell with a builtin
2451 # printf (which we can use as an echo command).
2452 m4_defun([_LT_PROG_ECHO_BACKSLASH],
2453 [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
2454 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
2455 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
2456
2457 AC_MSG_CHECKING([how to print strings])
2458 # Test print first, because it will be a builtin if present.
2459 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
2460    test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
2461   ECHO='print -r --'
2462 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
2463   ECHO='printf %s\n'
2464 else
2465   # Use this function as a fallback that always works.
2466   func_fallback_echo ()
2467   {
2468     eval 'cat <<_LTECHO_EOF
2469 $[]1
2470 _LTECHO_EOF'
2471   }
2472   ECHO='func_fallback_echo'
2473 fi
2474
2475 # func_echo_all arg...
2476 # Invoke $ECHO with all args, space-separated.
2477 func_echo_all ()
2478 {
2479     $ECHO "$*" 
2480 }
2481
2482 case "$ECHO" in
2483   printf*) AC_MSG_RESULT([printf]) ;;
2484   print*) AC_MSG_RESULT([print -r]) ;;
2485   *) AC_MSG_RESULT([cat]) ;;
2486 esac
2487
2488 m4_ifdef([_AS_DETECT_SUGGESTED],
2489 [_AS_DETECT_SUGGESTED([
2490   test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
2491     ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
2492     ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
2493     ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
2494     PATH=/empty FPATH=/empty; export PATH FPATH
2495     test "X`printf %s $ECHO`" = "X$ECHO" \
2496       || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
2497
2498 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
2499 _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
2500 ])# _LT_PROG_ECHO_BACKSLASH
2501
2502
2503 # _LT_WITH_SYSROOT
2504 # ----------------
2505 AC_DEFUN([_LT_WITH_SYSROOT],
2506 [AC_MSG_CHECKING([for sysroot])
2507 AC_ARG_WITH([sysroot],
2508 [  --with-sysroot[=DIR] Search for dependent libraries within DIR
2509                         (or the compiler's sysroot if not specified).],
2510 [], [with_sysroot=no])
2511
2512 dnl lt_sysroot will always be passed unquoted.  We quote it here
2513 dnl in case the user passed a directory name.
2514 lt_sysroot=
2515 case ${with_sysroot} in #(
2516  yes)
2517    if test "$GCC" = yes; then
2518      lt_sysroot=`$CC --print-sysroot 2>/dev/null`
2519    fi
2520    ;; #(
2521  /*)
2522    lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
2523    ;; #(
2524  no|'')
2525    ;; #(
2526  *)
2527    AC_MSG_RESULT([${with_sysroot}])
2528    AC_MSG_ERROR([The sysroot must be an absolute path.])
2529    ;;
2530 esac
2531
2532  AC_MSG_RESULT([${lt_sysroot:-no}])
2533 _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
2534 [dependent libraries, and in which our libraries should be installed.])])
2535
2536 # _LT_ENABLE_LOCK
2537 # ---------------
2538 m4_defun([_LT_ENABLE_LOCK],
2539 [AC_ARG_ENABLE([libtool-lock],
2540   [AS_HELP_STRING([--disable-libtool-lock],
2541     [avoid locking (might break parallel builds)])])
2542 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
2543
2544 # Some flags need to be propagated to the compiler or linker for good
2545 # libtool support.
2546 case $host in
2547 ia64-*-hpux*)
2548   # Find out which ABI we are using.
2549   echo 'int i;' > conftest.$ac_ext
2550   if AC_TRY_EVAL(ac_compile); then
2551     case `/usr/bin/file conftest.$ac_objext` in
2552       *ELF-32*)
2553         HPUX_IA64_MODE="32"
2554         ;;
2555       *ELF-64*)
2556         HPUX_IA64_MODE="64"
2557         ;;
2558     esac
2559   fi
2560   rm -rf conftest*
2561   ;;
2562 *-*-irix6*)
2563   # Find out which ABI we are using.
2564   echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
2565   if AC_TRY_EVAL(ac_compile); then
2566     if test "$lt_cv_prog_gnu_ld" = yes; then
2567       case `/usr/bin/file conftest.$ac_objext` in
2568         *32-bit*)
2569           LD="${LD-ld} -melf32bsmip"
2570           ;;
2571         *N32*)
2572           LD="${LD-ld} -melf32bmipn32"
2573           ;;
2574         *64-bit*)
2575           LD="${LD-ld} -melf64bmip"
2576         ;;
2577       esac
2578     else
2579       case `/usr/bin/file conftest.$ac_objext` in
2580         *32-bit*)
2581           LD="${LD-ld} -32"
2582           ;;
2583         *N32*)
2584           LD="${LD-ld} -n32"
2585           ;;
2586         *64-bit*)
2587           LD="${LD-ld} -64"
2588           ;;
2589       esac
2590     fi
2591   fi
2592   rm -rf conftest*
2593   ;;
2594
2595 x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
2596 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
2597   # Find out which ABI we are using.
2598   echo 'int i;' > conftest.$ac_ext
2599   if AC_TRY_EVAL(ac_compile); then
2600     case `/usr/bin/file conftest.o` in
2601       *32-bit*)
2602         case $host in
2603           x86_64-*kfreebsd*-gnu)
2604             LD="${LD-ld} -m elf_i386_fbsd"
2605             ;;
2606           x86_64-*linux*)
2607             case `/usr/bin/file conftest.o` in
2608               *x86-64*)
2609                 LD="${LD-ld} -m elf32_x86_64"
2610                 ;;
2611               *)
2612                 LD="${LD-ld} -m elf_i386"
2613                 ;;
2614             esac
2615             ;;
2616           ppc64-*linux*|powerpc64-*linux*)
2617             LD="${LD-ld} -m elf32ppclinux"
2618             ;;
2619           s390x-*linux*)
2620             LD="${LD-ld} -m elf_s390"
2621             ;;
2622           sparc64-*linux*)
2623             LD="${LD-ld} -m elf32_sparc"
2624             ;;
2625         esac
2626         ;;
2627       *64-bit*)
2628         case $host in
2629           x86_64-*kfreebsd*-gnu)
2630             LD="${LD-ld} -m elf_x86_64_fbsd"
2631             ;;
2632           x86_64-*linux*)
2633             LD="${LD-ld} -m elf_x86_64"
2634             ;;
2635           ppc*-*linux*|powerpc*-*linux*)
2636             LD="${LD-ld} -m elf64ppc"
2637             ;;
2638           s390*-*linux*|s390*-*tpf*)
2639             LD="${LD-ld} -m elf64_s390"
2640             ;;
2641           sparc*-*linux*)
2642             LD="${LD-ld} -m elf64_sparc"
2643             ;;
2644         esac
2645         ;;
2646     esac
2647   fi
2648   rm -rf conftest*
2649   ;;
2650
2651 *-*-sco3.2v5*)
2652   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2653   SAVE_CFLAGS="$CFLAGS"
2654   CFLAGS="$CFLAGS -belf"
2655   AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
2656     [AC_LANG_PUSH(C)
2657      AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
2658      AC_LANG_POP])
2659   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2660     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2661     CFLAGS="$SAVE_CFLAGS"
2662   fi
2663   ;;
2664 *-*solaris*)
2665   # Find out which ABI we are using.
2666   echo 'int i;' > conftest.$ac_ext
2667   if AC_TRY_EVAL(ac_compile); then
2668     case `/usr/bin/file conftest.o` in
2669     *64-bit*)
2670       case $lt_cv_prog_gnu_ld in
2671       yes*)
2672         case $host in
2673         i?86-*-solaris*)
2674           LD="${LD-ld} -m elf_x86_64"
2675           ;;
2676         sparc*-*-solaris*)
2677           LD="${LD-ld} -m elf64_sparc"
2678           ;;
2679         esac
2680         # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
2681         if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
2682           LD="${LD-ld}_sol2"
2683         fi
2684         ;;
2685       *)
2686         if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
2687           LD="${LD-ld} -64"
2688         fi
2689         ;;
2690       esac
2691       ;;
2692     esac
2693   fi
2694   rm -rf conftest*
2695   ;;
2696 esac
2697
2698 need_locks="$enable_libtool_lock"
2699 ])# _LT_ENABLE_LOCK
2700
2701
2702 # _LT_PROG_AR
2703 # -----------
2704 m4_defun([_LT_PROG_AR],
2705 [AC_CHECK_TOOLS(AR, [ar], false)
2706 : ${AR=ar}
2707 : ${AR_FLAGS=cru}
2708 _LT_DECL([], [AR], [1], [The archiver])
2709 _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
2710
2711 AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
2712   [lt_cv_ar_at_file=no
2713    AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
2714      [echo conftest.$ac_objext > conftest.lst
2715       lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
2716       AC_TRY_EVAL([lt_ar_try])
2717       if test "$ac_status" -eq 0; then
2718         # Ensure the archiver fails upon bogus file names.
2719         rm -f conftest.$ac_objext libconftest.a
2720         AC_TRY_EVAL([lt_ar_try])
2721         if test "$ac_status" -ne 0; then
2722           lt_cv_ar_at_file=@
2723         fi
2724       fi
2725       rm -f conftest.* libconftest.a
2726      ])
2727   ])
2728
2729 if test "x$lt_cv_ar_at_file" = xno; then
2730   archiver_list_spec=
2731 else
2732   archiver_list_spec=$lt_cv_ar_at_file
2733 fi
2734 _LT_DECL([], [archiver_list_spec], [1],
2735   [How to feed a file listing to the archiver])
2736 ])# _LT_PROG_AR
2737
2738
2739 # _LT_CMD_OLD_ARCHIVE
2740 # -------------------
2741 m4_defun([_LT_CMD_OLD_ARCHIVE],
2742 [_LT_PROG_AR
2743
2744 AC_CHECK_TOOL(STRIP, strip, :)
2745 test -z "$STRIP" && STRIP=:
2746 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
2747
2748 AC_CHECK_TOOL(RANLIB, ranlib, :)
2749 test -z "$RANLIB" && RANLIB=:
2750 _LT_DECL([], [RANLIB], [1],
2751     [Commands used to install an old-style archive])
2752
2753 # Determine commands to create old-style static archives.
2754 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
2755 old_postinstall_cmds='chmod 644 $oldlib'
2756 old_postuninstall_cmds=
2757
2758 if test -n "$RANLIB"; then
2759   case $host_os in
2760   openbsd*)
2761     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
2762     ;;
2763   *)
2764     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
2765     ;;
2766   esac
2767   old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
2768 fi
2769
2770 case $host_os in
2771   darwin*)
2772     lock_old_archive_extraction=yes ;;
2773   *)
2774     lock_old_archive_extraction=no ;;
2775 esac
2776 _LT_DECL([], [old_postinstall_cmds], [2])
2777 _LT_DECL([], [old_postuninstall_cmds], [2])
2778 _LT_TAGDECL([], [old_archive_cmds], [2],
2779     [Commands used to build an old-style archive])
2780 _LT_DECL([], [lock_old_archive_extraction], [0],
2781     [Whether to use a lock for old archive extraction])
2782 ])# _LT_CMD_OLD_ARCHIVE
2783
2784
2785 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2786 #               [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
2787 # ----------------------------------------------------------------
2788 # Check whether the given compiler option works
2789 AC_DEFUN([_LT_COMPILER_OPTION],
2790 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2791 m4_require([_LT_DECL_SED])dnl
2792 AC_CACHE_CHECK([$1], [$2],
2793   [$2=no
2794    m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
2795    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2796    lt_compiler_flag="$3"
2797    # Insert the option either (1) after the last *FLAGS variable, or
2798    # (2) before a word containing "conftest.", or (3) at the end.
2799    # Note that $ac_compile itself does not contain backslashes and begins
2800    # with a dollar sign (not a hyphen), so the echo should work correctly.
2801    # The option is referenced via a variable to avoid confusing sed.
2802    lt_compile=`echo "$ac_compile" | $SED \
2803    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2804    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2805    -e 's:$: $lt_compiler_flag:'`
2806    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2807    (eval "$lt_compile" 2>conftest.err)
2808    ac_status=$?
2809    cat conftest.err >&AS_MESSAGE_LOG_FD
2810    echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2811    if (exit $ac_status) && test -s "$ac_outfile"; then
2812      # The compiler can only warn and ignore the option if not recognized
2813      # So say no if there are warnings other than the usual output.
2814      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
2815      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2816      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
2817        $2=yes
2818      fi
2819    fi
2820    $RM conftest*
2821 ])
2822
2823 if test x"[$]$2" = xyes; then
2824     m4_if([$5], , :, [$5])
2825 else
2826     m4_if([$6], , :, [$6])
2827 fi
2828 ])# _LT_COMPILER_OPTION
2829
2830 # Old name:
2831 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
2832 dnl aclocal-1.4 backwards compatibility:
2833 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
2834
2835
2836 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2837 #                  [ACTION-SUCCESS], [ACTION-FAILURE])
2838 # ----------------------------------------------------
2839 # Check whether the given linker option works
2840 AC_DEFUN([_LT_LINKER_OPTION],
2841 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2842 m4_require([_LT_DECL_SED])dnl
2843 AC_CACHE_CHECK([$1], [$2],
2844   [$2=no
2845    save_LDFLAGS="$LDFLAGS"
2846    LDFLAGS="$LDFLAGS $3"
2847    echo "$lt_simple_link_test_code" > conftest.$ac_ext
2848    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
2849      # The linker can only warn and ignore the option if not recognized
2850      # So say no if there are warnings
2851      if test -s conftest.err; then
2852        # Append any errors to the config.log.
2853        cat conftest.err 1>&AS_MESSAGE_LOG_FD
2854        $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
2855        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2856        if diff conftest.exp conftest.er2 >/dev/null; then
2857          $2=yes
2858        fi
2859      else
2860        $2=yes
2861      fi
2862    fi
2863    $RM -r conftest*
2864    LDFLAGS="$save_LDFLAGS"
2865 ])
2866
2867 if test x"[$]$2" = xyes; then
2868     m4_if([$4], , :, [$4])
2869 else
2870     m4_if([$5], , :, [$5])
2871 fi
2872 ])# _LT_LINKER_OPTION
2873
2874 # Old name:
2875 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
2876 dnl aclocal-1.4 backwards compatibility:
2877 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
2878
2879
2880 # LT_CMD_MAX_LEN
2881 #---------------
2882 AC_DEFUN([LT_CMD_MAX_LEN],
2883 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2884 # find the maximum length of command line arguments
2885 AC_MSG_CHECKING([the maximum length of command line arguments])
2886 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
2887   i=0
2888   teststring="ABCD"
2889
2890   case $build_os in
2891   msdosdjgpp*)
2892     # On DJGPP, this test can blow up pretty badly due to problems in libc
2893     # (any single argument exceeding 2000 bytes causes a buffer overrun
2894     # during glob expansion).  Even if it were fixed, the result of this
2895     # check would be larger than it should be.
2896     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
2897     ;;
2898
2899   gnu*)
2900     # Under GNU Hurd, this test is not required because there is
2901     # no limit to the length of command line arguments.
2902     # Libtool will interpret -1 as no limit whatsoever
2903     lt_cv_sys_max_cmd_len=-1;
2904     ;;
2905
2906   cygwin* | mingw* | cegcc*)
2907     # On Win9x/ME, this test blows up -- it succeeds, but takes
2908     # about 5 minutes as the teststring grows exponentially.
2909     # Worse, since 9x/ME are not pre-emptively multitasking,
2910     # you end up with a "frozen" computer, even though with patience
2911     # the test eventually succeeds (with a max line length of 256k).
2912     # Instead, let's just punt: use the minimum linelength reported by
2913     # all of the supported platforms: 8192 (on NT/2K/XP).
2914     lt_cv_sys_max_cmd_len=8192;
2915     ;;
2916
2917   mint*)
2918     # On MiNT this can take a long time and run out of memory.
2919     lt_cv_sys_max_cmd_len=8192;
2920     ;;
2921
2922   amigaos*)
2923     # On AmigaOS with pdksh, this test takes hours, literally.
2924     # So we just punt and use a minimum line length of 8192.
2925     lt_cv_sys_max_cmd_len=8192;
2926     ;;
2927
2928   netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
2929     # This has been around since 386BSD, at least.  Likely further.
2930     if test -x /sbin/sysctl; then
2931       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
2932     elif test -x /usr/sbin/sysctl; then
2933       lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
2934     else
2935       lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
2936     fi
2937     # And add a safety zone
2938     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2939     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2940     ;;
2941
2942   interix*)
2943     # We know the value 262144 and hardcode it with a safety zone (like BSD)
2944     lt_cv_sys_max_cmd_len=196608
2945     ;;
2946
2947   os2*)
2948     # The test takes a long time on OS/2.
2949     lt_cv_sys_max_cmd_len=8192
2950     ;;
2951
2952   osf*)
2953     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
2954     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
2955     # nice to cause kernel panics so lets avoid the loop below.
2956     # First set a reasonable default.
2957     lt_cv_sys_max_cmd_len=16384
2958     #
2959     if test -x /sbin/sysconfig; then
2960       case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
2961         *1*) lt_cv_sys_max_cmd_len=-1 ;;
2962       esac
2963     fi
2964     ;;
2965   sco3.2v5*)
2966     lt_cv_sys_max_cmd_len=102400
2967     ;;
2968   sysv5* | sco5v6* | sysv4.2uw2*)
2969     kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
2970     if test -n "$kargmax"; then
2971       lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[         ]]//'`
2972     else
2973       lt_cv_sys_max_cmd_len=32768
2974     fi
2975     ;;
2976   *)
2977     lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
2978     if test -n "$lt_cv_sys_max_cmd_len" && \
2979         test undefined != "$lt_cv_sys_max_cmd_len"; then
2980       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2981       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2982     else
2983       # Make teststring a little bigger before we do anything with it.
2984       # a 1K string should be a reasonable start.
2985       for i in 1 2 3 4 5 6 7 8 ; do
2986         teststring=$teststring$teststring
2987       done
2988       SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
2989       # If test is not a shell built-in, we'll probably end up computing a
2990       # maximum length that is only half of the actual maximum length, but
2991       # we can't tell.
2992       while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
2993                  = "X$teststring$teststring"; } >/dev/null 2>&1 &&
2994               test $i != 17 # 1/2 MB should be enough
2995       do
2996         i=`expr $i + 1`
2997         teststring=$teststring$teststring
2998       done
2999       # Only check the string length outside the loop.
3000       lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
3001       teststring=
3002       # Add a significant safety factor because C++ compilers can tack on
3003       # massive amounts of additional arguments before passing them to the
3004       # linker.  It appears as though 1/2 is a usable value.
3005       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
3006     fi
3007     ;;
3008   esac
3009 ])
3010 if test -n $lt_cv_sys_max_cmd_len ; then
3011   AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
3012 else
3013   AC_MSG_RESULT(none)
3014 fi
3015 max_cmd_len=$lt_cv_sys_max_cmd_len
3016 _LT_DECL([], [max_cmd_len], [0],
3017     [What is the maximum length of a command?])
3018 ])# LT_CMD_MAX_LEN
3019
3020 # Old name:
3021 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
3022 dnl aclocal-1.4 backwards compatibility:
3023 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
3024
3025
3026 # _LT_HEADER_DLFCN
3027 # ----------------
3028 m4_defun([_LT_HEADER_DLFCN],
3029 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
3030 ])# _LT_HEADER_DLFCN
3031
3032
3033 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
3034 #                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
3035 # ----------------------------------------------------------------
3036 m4_defun([_LT_TRY_DLOPEN_SELF],
3037 [m4_require([_LT_HEADER_DLFCN])dnl
3038 if test "$cross_compiling" = yes; then :
3039   [$4]
3040 else
3041   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
3042   lt_status=$lt_dlunknown
3043   cat > conftest.$ac_ext <<_LT_EOF
3044 [#line $LINENO "configure"
3045 #include "confdefs.h"
3046
3047 #if HAVE_DLFCN_H
3048 #include <dlfcn.h>
3049 #endif
3050
3051 #include <stdio.h>
3052
3053 #ifdef RTLD_GLOBAL
3054 #  define LT_DLGLOBAL           RTLD_GLOBAL
3055 #else
3056 #  ifdef DL_GLOBAL
3057 #    define LT_DLGLOBAL         DL_GLOBAL
3058 #  else
3059 #    define LT_DLGLOBAL         0
3060 #  endif
3061 #endif
3062
3063 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
3064    find out it does not work in some platform. */
3065 #ifndef LT_DLLAZY_OR_NOW
3066 #  ifdef RTLD_LAZY
3067 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
3068 #  else
3069 #    ifdef DL_LAZY
3070 #      define LT_DLLAZY_OR_NOW          DL_LAZY
3071 #    else
3072 #      ifdef RTLD_NOW
3073 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
3074 #      else
3075 #        ifdef DL_NOW
3076 #          define LT_DLLAZY_OR_NOW      DL_NOW
3077 #        else
3078 #          define LT_DLLAZY_OR_NOW      0
3079 #        endif
3080 #      endif
3081 #    endif
3082 #  endif
3083 #endif
3084
3085 /* When -fvisbility=hidden is used, assume the code has been annotated
3086    correspondingly for the symbols needed.  */
3087 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
3088 int fnord () __attribute__((visibility("default")));
3089 #endif
3090
3091 int fnord () { return 42; }
3092 int main ()
3093 {
3094   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
3095   int status = $lt_dlunknown;
3096
3097   if (self)
3098     {
3099       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
3100       else
3101         {
3102           if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
3103           else puts (dlerror ());
3104         }
3105       /* dlclose (self); */
3106     }
3107   else
3108     puts (dlerror ());
3109
3110   return status;
3111 }]
3112 _LT_EOF
3113   if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
3114     (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
3115     lt_status=$?
3116     case x$lt_status in
3117       x$lt_dlno_uscore) $1 ;;
3118       x$lt_dlneed_uscore) $2 ;;
3119       x$lt_dlunknown|x*) $3 ;;
3120     esac
3121   else :
3122     # compilation failed
3123     $3
3124   fi
3125 fi
3126 rm -fr conftest*
3127 ])# _LT_TRY_DLOPEN_SELF
3128
3129
3130 # LT_SYS_DLOPEN_SELF
3131 # ------------------
3132 AC_DEFUN([LT_SYS_DLOPEN_SELF],
3133 [m4_require([_LT_HEADER_DLFCN])dnl
3134 if test "x$enable_dlopen" != xyes; then
3135   enable_dlopen=unknown
3136   enable_dlopen_self=unknown
3137   enable_dlopen_self_static=unknown
3138 else
3139   lt_cv_dlopen=no
3140   lt_cv_dlopen_libs=
3141
3142   case $host_os in
3143   beos*)
3144     lt_cv_dlopen="load_add_on"
3145     lt_cv_dlopen_libs=
3146     lt_cv_dlopen_self=yes
3147     ;;
3148
3149   mingw* | pw32* | cegcc*)
3150     lt_cv_dlopen="LoadLibrary"
3151     lt_cv_dlopen_libs=
3152     ;;
3153
3154   cygwin*)
3155     lt_cv_dlopen="dlopen"
3156     lt_cv_dlopen_libs=
3157     ;;
3158
3159   darwin*)
3160   # if libdl is installed we need to link against it
3161     AC_CHECK_LIB([dl], [dlopen],
3162                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
3163     lt_cv_dlopen="dyld"
3164     lt_cv_dlopen_libs=
3165     lt_cv_dlopen_self=yes
3166     ])
3167     ;;
3168
3169   *)
3170     AC_CHECK_FUNC([shl_load],
3171           [lt_cv_dlopen="shl_load"],
3172       [AC_CHECK_LIB([dld], [shl_load],
3173             [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
3174         [AC_CHECK_FUNC([dlopen],
3175               [lt_cv_dlopen="dlopen"],
3176           [AC_CHECK_LIB([dl], [dlopen],
3177                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
3178             [AC_CHECK_LIB([svld], [dlopen],
3179                   [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
3180               [AC_CHECK_LIB([dld], [dld_link],
3181                     [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
3182               ])
3183             ])
3184           ])
3185         ])
3186       ])
3187     ;;
3188   esac
3189
3190   if test "x$lt_cv_dlopen" != xno; then
3191     enable_dlopen=yes
3192   else
3193     enable_dlopen=no
3194   fi
3195
3196   case $lt_cv_dlopen in
3197   dlopen)
3198     save_CPPFLAGS="$CPPFLAGS"
3199     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
3200
3201     save_LDFLAGS="$LDFLAGS"
3202     wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
3203
3204     save_LIBS="$LIBS"
3205     LIBS="$lt_cv_dlopen_libs $LIBS"
3206
3207     AC_CACHE_CHECK([whether a program can dlopen itself],
3208           lt_cv_dlopen_self, [dnl
3209           _LT_TRY_DLOPEN_SELF(
3210             lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
3211             lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
3212     ])
3213
3214     if test "x$lt_cv_dlopen_self" = xyes; then
3215       wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
3216       AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
3217           lt_cv_dlopen_self_static, [dnl
3218           _LT_TRY_DLOPEN_SELF(
3219             lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
3220             lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
3221       ])
3222     fi
3223
3224     CPPFLAGS="$save_CPPFLAGS"
3225     LDFLAGS="$save_LDFLAGS"
3226     LIBS="$save_LIBS"
3227     ;;
3228   esac
3229
3230   case $lt_cv_dlopen_self in
3231   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
3232   *) enable_dlopen_self=unknown ;;
3233   esac
3234
3235   case $lt_cv_dlopen_self_static in
3236   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
3237   *) enable_dlopen_self_static=unknown ;;
3238   esac
3239 fi
3240 _LT_DECL([dlopen_support], [enable_dlopen], [0],
3241          [Whether dlopen is supported])
3242 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
3243          [Whether dlopen of programs is supported])
3244 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
3245          [Whether dlopen of statically linked programs is supported])
3246 ])# LT_SYS_DLOPEN_SELF
3247
3248 # Old name:
3249 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
3250 dnl aclocal-1.4 backwards compatibility:
3251 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
3252
3253
3254 # _LT_COMPILER_C_O([TAGNAME])
3255 # ---------------------------
3256 # Check to see if options -c and -o are simultaneously supported by compiler.
3257 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
3258 m4_defun([_LT_COMPILER_C_O],
3259 [m4_require([_LT_DECL_SED])dnl
3260 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3261 m4_require([_LT_TAG_COMPILER])dnl
3262 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
3263   [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
3264   [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
3265    $RM -r conftest 2>/dev/null
3266    mkdir conftest
3267    cd conftest
3268    mkdir out
3269    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
3270
3271    lt_compiler_flag="-o out/conftest2.$ac_objext"
3272    # Insert the option either (1) after the last *FLAGS variable, or
3273    # (2) before a word containing "conftest.", or (3) at the end.
3274    # Note that $ac_compile itself does not contain backslashes and begins
3275    # with a dollar sign (not a hyphen), so the echo should work correctly.
3276    lt_compile=`echo "$ac_compile" | $SED \
3277    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
3278    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
3279    -e 's:$: $lt_compiler_flag:'`
3280    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
3281    (eval "$lt_compile" 2>out/conftest.err)
3282    ac_status=$?
3283    cat out/conftest.err >&AS_MESSAGE_LOG_FD
3284    echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
3285    if (exit $ac_status) && test -s out/conftest2.$ac_objext
3286    then
3287      # The compiler can only warn and ignore the option if not recognized
3288      # So say no if there are warnings
3289      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
3290      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
3291      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
3292        _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
3293      fi
3294    fi
3295    chmod u+w . 2>&AS_MESSAGE_LOG_FD
3296    $RM conftest*
3297    # SGI C++ compiler will create directory out/ii_files/ for
3298    # template instantiation
3299    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
3300    $RM out/* && rmdir out
3301    cd ..
3302    $RM -r conftest
3303    $RM conftest*
3304 ])
3305 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
3306         [Does compiler simultaneously support -c and -o options?])
3307 ])# _LT_COMPILER_C_O
3308
3309
3310 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
3311 # ----------------------------------
3312 # Check to see if we can do hard links to lock some files if needed
3313 m4_defun([_LT_COMPILER_FILE_LOCKS],
3314 [m4_require([_LT_ENABLE_LOCK])dnl
3315 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3316 _LT_COMPILER_C_O([$1])
3317
3318 hard_links="nottested"
3319 if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
3320   # do not overwrite the value of need_locks provided by the user
3321   AC_MSG_CHECKING([if we can lock with hard links])
3322   hard_links=yes
3323   $RM conftest*
3324   ln conftest.a conftest.b 2>/dev/null && hard_links=no
3325   touch conftest.a
3326   ln conftest.a conftest.b 2>&5 || hard_links=no
3327   ln conftest.a conftest.b 2>/dev/null && hard_links=no
3328   AC_MSG_RESULT([$hard_links])
3329   if test "$hard_links" = no; then
3330     AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
3331     need_locks=warn
3332   fi
3333 else
3334   need_locks=no
3335 fi
3336 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
3337 ])# _LT_COMPILER_FILE_LOCKS
3338
3339
3340 # _LT_CHECK_OBJDIR
3341 # ----------------
3342 m4_defun([_LT_CHECK_OBJDIR],
3343 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
3344 [rm -f .libs 2>/dev/null
3345 mkdir .libs 2>/dev/null
3346 if test -d .libs; then
3347   lt_cv_objdir=.libs
3348 else
3349   # MS-DOS does not allow filenames that begin with a dot.
3350   lt_cv_objdir=_libs
3351 fi
3352 rmdir .libs 2>/dev/null])
3353 objdir=$lt_cv_objdir
3354 _LT_DECL([], [objdir], [0],
3355          [The name of the directory that contains temporary libtool files])dnl
3356 m4_pattern_allow([LT_OBJDIR])dnl
3357 AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
3358   [Define to the sub-directory in which libtool stores uninstalled libraries.])
3359 ])# _LT_CHECK_OBJDIR
3360
3361
3362 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
3363 # --------------------------------------
3364 # Check hardcoding attributes.
3365 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
3366 [AC_MSG_CHECKING([how to hardcode library paths into programs])
3367 _LT_TAGVAR(hardcode_action, $1)=
3368 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
3369    test -n "$_LT_TAGVAR(runpath_var, $1)" ||
3370    test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
3371
3372   # We can hardcode non-existent directories.
3373   if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
3374      # If the only mechanism to avoid hardcoding is shlibpath_var, we
3375      # have to relink, otherwise we might link with an installed library
3376      # when we should be linking with a yet-to-be-installed one
3377      ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
3378      test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
3379     # Linking always hardcodes the temporary library directory.
3380     _LT_TAGVAR(hardcode_action, $1)=relink
3381   else
3382     # We can link without hardcoding, and we can hardcode nonexisting dirs.
3383     _LT_TAGVAR(hardcode_action, $1)=immediate
3384   fi
3385 else
3386   # We cannot hardcode anything, or else we can only hardcode existing
3387   # directories.
3388   _LT_TAGVAR(hardcode_action, $1)=unsupported
3389 fi
3390 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
3391
3392 if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
3393    test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
3394   # Fast installation is not supported
3395   enable_fast_install=no
3396 elif test "$shlibpath_overrides_runpath" = yes ||
3397      test "$enable_shared" = no; then
3398   # Fast installation is not necessary
3399   enable_fast_install=needless
3400 fi
3401 _LT_TAGDECL([], [hardcode_action], [0],
3402     [How to hardcode a shared library path into an executable])
3403 ])# _LT_LINKER_HARDCODE_LIBPATH
3404
3405
3406 # _LT_CMD_STRIPLIB
3407 # ----------------
3408 m4_defun([_LT_CMD_STRIPLIB],
3409 [m4_require([_LT_DECL_EGREP])
3410 striplib=
3411 old_striplib=
3412 AC_MSG_CHECKING([whether stripping libraries is possible])
3413 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
3414   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
3415   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
3416   AC_MSG_RESULT([yes])
3417 else
3418 # FIXME - insert some real tests, host_os isn't really good enough
3419   case $host_os in
3420   darwin*)
3421     if test -n "$STRIP" ; then
3422       striplib="$STRIP -x"
3423       old_striplib="$STRIP -S"
3424       AC_MSG_RESULT([yes])
3425     else
3426       AC_MSG_RESULT([no])
3427     fi
3428     ;;
3429   *)
3430     AC_MSG_RESULT([no])
3431     ;;
3432   esac
3433 fi
3434 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
3435 _LT_DECL([], [striplib], [1])
3436 ])# _LT_CMD_STRIPLIB
3437
3438
3439 # _LT_SYS_DYNAMIC_LINKER([TAG])
3440 # -----------------------------
3441 # PORTME Fill in your ld.so characteristics
3442 m4_defun([_LT_SYS_DYNAMIC_LINKER],
3443 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3444 m4_require([_LT_DECL_EGREP])dnl
3445 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3446 m4_require([_LT_DECL_OBJDUMP])dnl
3447 m4_require([_LT_DECL_SED])dnl
3448 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
3449 AC_MSG_CHECKING([dynamic linker characteristics])
3450 m4_if([$1],
3451         [], [
3452 if test "$GCC" = yes; then
3453   case $host_os in
3454     darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
3455     *) lt_awk_arg="/^libraries:/" ;;
3456   esac
3457   case $host_os in
3458     mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
3459     *) lt_sed_strip_eq="s,=/,/,g" ;;
3460   esac
3461   lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
3462   case $lt_search_path_spec in
3463   *\;*)
3464     # if the path contains ";" then we assume it to be the separator
3465     # otherwise default to the standard path separator (i.e. ":") - it is
3466     # assumed that no part of a normal pathname contains ";" but that should
3467     # okay in the real world where ";" in dirpaths is itself problematic.
3468     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
3469     ;;
3470   *)
3471     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
3472     ;;
3473   esac
3474   # Ok, now we have the path, separated by spaces, we can step through it
3475   # and add multilib dir if necessary.
3476   lt_tmp_lt_search_path_spec=
3477   lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
3478   for lt_sys_path in $lt_search_path_spec; do
3479     if test -d "$lt_sys_path/$lt_multi_os_dir"; then
3480       lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
3481     else
3482       test -d "$lt_sys_path" && \
3483         lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
3484     fi
3485   done
3486   lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
3487 BEGIN {RS=" "; FS="/|\n";} {
3488   lt_foo="";
3489   lt_count=0;
3490   for (lt_i = NF; lt_i > 0; lt_i--) {
3491     if ($lt_i != "" && $lt_i != ".") {
3492       if ($lt_i == "..") {
3493         lt_count++;
3494       } else {
3495         if (lt_count == 0) {
3496           lt_foo="/" $lt_i lt_foo;
3497         } else {
3498           lt_count--;
3499         }
3500       }
3501     }
3502   }
3503   if (lt_foo != "") { lt_freq[[lt_foo]]++; }
3504   if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
3505 }'`
3506   # AWK program above erroneously prepends '/' to C:/dos/paths
3507   # for these hosts.
3508   case $host_os in
3509     mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
3510       $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
3511   esac
3512   sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
3513 else
3514   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
3515 fi])
3516 library_names_spec=
3517 libname_spec='lib$name'
3518 soname_spec=
3519 shrext_cmds=".so"
3520 postinstall_cmds=
3521 postuninstall_cmds=
3522 finish_cmds=
3523 finish_eval=
3524 shlibpath_var=
3525 shlibpath_overrides_runpath=unknown
3526 version_type=none
3527 dynamic_linker="$host_os ld.so"
3528 sys_lib_dlsearch_path_spec="/lib /usr/lib"
3529 need_lib_prefix=unknown
3530 hardcode_into_libs=no
3531
3532 # when you set need_version to no, make sure it does not cause -set_version
3533 # flags to be left without arguments
3534 need_version=unknown
3535
3536 case $host_os in
3537 aix3*)
3538   version_type=linux # correct to gnu/linux during the next big refactor
3539   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
3540   shlibpath_var=LIBPATH
3541
3542   # AIX 3 has no versioning support, so we append a major version to the name.
3543   soname_spec='${libname}${release}${shared_ext}$major'
3544   ;;
3545
3546 aix[[4-9]]*)
3547   version_type=linux # correct to gnu/linux during the next big refactor
3548   need_lib_prefix=no
3549   need_version=no
3550   hardcode_into_libs=yes
3551   if test "$host_cpu" = ia64; then
3552     # AIX 5 supports IA64
3553     library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
3554     shlibpath_var=LD_LIBRARY_PATH
3555   else
3556     # With GCC up to 2.95.x, collect2 would create an import file
3557     # for dependence libraries.  The import file would start with
3558     # the line `#! .'.  This would cause the generated library to
3559     # depend on `.', always an invalid library.  This was fixed in
3560     # development snapshots of GCC prior to 3.0.
3561     case $host_os in
3562       aix4 | aix4.[[01]] | aix4.[[01]].*)
3563       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
3564            echo ' yes '
3565            echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
3566         :
3567       else
3568         can_build_shared=no
3569       fi
3570       ;;
3571     esac
3572     # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
3573     # soname into executable. Probably we can add versioning support to
3574     # collect2, so additional links can be useful in future.
3575     if test "$aix_use_runtimelinking" = yes; then
3576       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
3577       # instead of lib<name>.a to let people know that these are not
3578       # typical AIX shared libraries.
3579       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3580     else
3581       # We preserve .a as extension for shared libraries through AIX4.2
3582       # and later when we are not doing run time linking.
3583       library_names_spec='${libname}${release}.a $libname.a'
3584       soname_spec='${libname}${release}${shared_ext}$major'
3585     fi
3586     shlibpath_var=LIBPATH
3587   fi
3588   ;;
3589
3590 amigaos*)
3591   case $host_cpu in
3592   powerpc)
3593     # Since July 2007 AmigaOS4 officially supports .so libraries.
3594     # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
3595     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3596     ;;
3597   m68k)
3598     library_names_spec='$libname.ixlibrary $libname.a'
3599     # Create ${libname}_ixlibrary.a entries in /sys/libs.
3600     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'
3601     ;;
3602   esac
3603   ;;
3604
3605 beos*)
3606   library_names_spec='${libname}${shared_ext}'
3607   dynamic_linker="$host_os ld.so"
3608   shlibpath_var=LIBRARY_PATH
3609   ;;
3610
3611 bsdi[[45]]*)
3612   version_type=linux # correct to gnu/linux during the next big refactor
3613   need_version=no
3614   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3615   soname_spec='${libname}${release}${shared_ext}$major'
3616   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
3617   shlibpath_var=LD_LIBRARY_PATH
3618   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
3619   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
3620   # the default ld.so.conf also contains /usr/contrib/lib and
3621   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
3622   # libtool to hard-code these into programs
3623   ;;
3624
3625 cygwin* | mingw* | pw32* | cegcc*)
3626   version_type=windows
3627   shrext_cmds=".dll"
3628   need_version=no
3629   need_lib_prefix=no
3630
3631   case $GCC,$cc_basename in
3632   yes,*)
3633     # gcc
3634     library_names_spec='$libname.dll.a'
3635     # DLL is installed to $(libdir)/../bin by postinstall_cmds
3636     postinstall_cmds='base_file=`basename \${file}`~
3637       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
3638       dldir=$destdir/`dirname \$dlpath`~
3639       test -d \$dldir || mkdir -p \$dldir~
3640       $install_prog $dir/$dlname \$dldir/$dlname~
3641       chmod a+x \$dldir/$dlname~
3642       if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
3643         eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
3644       fi'
3645     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3646       dlpath=$dir/\$dldll~
3647        $RM \$dlpath'
3648     shlibpath_overrides_runpath=yes
3649
3650     case $host_os in
3651     cygwin*)
3652       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
3653       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3654 m4_if([$1], [],[
3655       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
3656       ;;
3657     mingw* | cegcc*)
3658       # MinGW DLLs use traditional 'lib' prefix
3659       soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3660       ;;
3661     pw32*)
3662       # pw32 DLLs use 'pw' prefix rather than 'lib'
3663       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3664       ;;
3665     esac
3666     dynamic_linker='Win32 ld.exe'
3667     ;;
3668
3669   *,cl*)
3670     # Native MSVC
3671     libname_spec='$name'
3672     soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3673     library_names_spec='${libname}.dll.lib'
3674
3675     case $build_os in
3676     mingw*)
3677       sys_lib_search_path_spec=
3678       lt_save_ifs=$IFS
3679       IFS=';'
3680       for lt_path in $LIB
3681       do
3682         IFS=$lt_save_ifs
3683         # Let DOS variable expansion print the short 8.3 style file name.
3684         lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
3685         sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
3686       done
3687       IFS=$lt_save_ifs
3688       # Convert to MSYS style.
3689       sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
3690       ;;
3691     cygwin*)
3692       # Convert to unix form, then to dos form, then back to unix form
3693       # but this time dos style (no spaces!) so that the unix form looks
3694       # like /cygdrive/c/PROGRA~1:/cygdr...
3695       sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
3696       sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
3697       sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3698       ;;
3699     *)
3700       sys_lib_search_path_spec="$LIB"
3701       if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
3702         # It is most probably a Windows format PATH.
3703         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
3704       else
3705         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3706       fi
3707       # FIXME: find the short name or the path components, as spaces are
3708       # common. (e.g. "Program Files" -> "PROGRA~1")
3709       ;;
3710     esac
3711
3712     # DLL is installed to $(libdir)/../bin by postinstall_cmds
3713     postinstall_cmds='base_file=`basename \${file}`~
3714       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
3715       dldir=$destdir/`dirname \$dlpath`~
3716       test -d \$dldir || mkdir -p \$dldir~
3717       $install_prog $dir/$dlname \$dldir/$dlname'
3718     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3719       dlpath=$dir/\$dldll~
3720        $RM \$dlpath'
3721     shlibpath_overrides_runpath=yes
3722     dynamic_linker='Win32 link.exe'
3723     ;;
3724
3725   *)
3726     # Assume MSVC wrapper
3727     library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
3728     dynamic_linker='Win32 ld.exe'
3729     ;;
3730   esac
3731   # FIXME: first we should search . and the directory the executable is in
3732   shlibpath_var=PATH
3733   ;;
3734
3735 darwin* | rhapsody*)
3736   dynamic_linker="$host_os dyld"
3737   version_type=darwin
3738   need_lib_prefix=no
3739   need_version=no
3740   library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
3741   soname_spec='${libname}${release}${major}$shared_ext'
3742   shlibpath_overrides_runpath=yes
3743   shlibpath_var=DYLD_LIBRARY_PATH
3744   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
3745 m4_if([$1], [],[
3746   sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
3747   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
3748   ;;
3749
3750 dgux*)
3751   version_type=linux # correct to gnu/linux during the next big refactor
3752   need_lib_prefix=no
3753   need_version=no
3754   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
3755   soname_spec='${libname}${release}${shared_ext}$major'
3756   shlibpath_var=LD_LIBRARY_PATH
3757   ;;
3758
3759 freebsd* | dragonfly*)
3760   # DragonFly does not have aout.  When/if they implement a new
3761   # versioning mechanism, adjust this.
3762   if test -x /usr/bin/objformat; then
3763     objformat=`/usr/bin/objformat`
3764   else
3765     case $host_os in
3766     freebsd[[23]].*) objformat=aout ;;
3767     *) objformat=elf ;;
3768     esac
3769   fi
3770   version_type=freebsd-$objformat
3771   case $version_type in
3772     freebsd-elf*)
3773       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3774       need_version=no
3775       need_lib_prefix=no
3776       ;;
3777     freebsd-*)
3778       library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
3779       need_version=yes
3780       ;;
3781   esac
3782   shlibpath_var=LD_LIBRARY_PATH
3783   case $host_os in
3784   freebsd2.*)
3785     shlibpath_overrides_runpath=yes
3786     ;;
3787   freebsd3.[[01]]* | freebsdelf3.[[01]]*)
3788     shlibpath_overrides_runpath=yes
3789     hardcode_into_libs=yes
3790     ;;
3791   freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
3792   freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
3793     shlibpath_overrides_runpath=no
3794     hardcode_into_libs=yes
3795     ;;
3796   *) # from 4.6 on, and DragonFly
3797     shlibpath_overrides_runpath=yes
3798     hardcode_into_libs=yes
3799     ;;
3800   esac
3801   ;;
3802
3803 haiku*)
3804   version_type=linux # correct to gnu/linux during the next big refactor
3805   need_lib_prefix=no
3806   need_version=no
3807   dynamic_linker="$host_os runtime_loader"
3808   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
3809   soname_spec='${libname}${release}${shared_ext}$major'
3810   shlibpath_var=LIBRARY_PATH
3811   shlibpath_overrides_runpath=yes
3812   sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
3813   hardcode_into_libs=yes
3814   ;;
3815
3816 hpux9* | hpux10* | hpux11*)
3817   # Give a soname corresponding to the major version so that dld.sl refuses to
3818   # link against other versions.
3819   version_type=sunos
3820   need_lib_prefix=no
3821   need_version=no
3822   case $host_cpu in
3823   ia64*)
3824     shrext_cmds='.so'
3825     hardcode_into_libs=yes
3826     dynamic_linker="$host_os dld.so"
3827     shlibpath_var=LD_LIBRARY_PATH
3828     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3829     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3830     soname_spec='${libname}${release}${shared_ext}$major'
3831     if test "X$HPUX_IA64_MODE" = X32; then
3832       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
3833     else
3834       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
3835     fi
3836     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3837     ;;
3838   hppa*64*)
3839     shrext_cmds='.sl'
3840     hardcode_into_libs=yes
3841     dynamic_linker="$host_os dld.sl"
3842     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
3843     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3844     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3845     soname_spec='${libname}${release}${shared_ext}$major'
3846     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
3847     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3848     ;;
3849   *)
3850     shrext_cmds='.sl'
3851     dynamic_linker="$host_os dld.sl"
3852     shlibpath_var=SHLIB_PATH
3853     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
3854     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3855     soname_spec='${libname}${release}${shared_ext}$major'
3856     ;;
3857   esac
3858   # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
3859   postinstall_cmds='chmod 555 $lib'
3860   # or fails outright, so override atomically:
3861   install_override_mode=555
3862   ;;
3863
3864 interix[[3-9]]*)
3865   version_type=linux # correct to gnu/linux during the next big refactor
3866   need_lib_prefix=no
3867   need_version=no
3868   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3869   soname_spec='${libname}${release}${shared_ext}$major'
3870   dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
3871   shlibpath_var=LD_LIBRARY_PATH
3872   shlibpath_overrides_runpath=no
3873   hardcode_into_libs=yes
3874   ;;
3875
3876 irix5* | irix6* | nonstopux*)
3877   case $host_os in
3878     nonstopux*) version_type=nonstopux ;;
3879     *)
3880         if test "$lt_cv_prog_gnu_ld" = yes; then
3881                 version_type=linux # correct to gnu/linux during the next big refactor
3882         else
3883                 version_type=irix
3884         fi ;;
3885   esac
3886   need_lib_prefix=no
3887   need_version=no
3888   soname_spec='${libname}${release}${shared_ext}$major'
3889   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
3890   case $host_os in
3891   irix5* | nonstopux*)
3892     libsuff= shlibsuff=
3893     ;;
3894   *)
3895     case $LD in # libtool.m4 will add one of these switches to LD
3896     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
3897       libsuff= shlibsuff= libmagic=32-bit;;
3898     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
3899       libsuff=32 shlibsuff=N32 libmagic=N32;;
3900     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
3901       libsuff=64 shlibsuff=64 libmagic=64-bit;;
3902     *) libsuff= shlibsuff= libmagic=never-match;;
3903     esac
3904     ;;
3905   esac
3906   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
3907   shlibpath_overrides_runpath=no
3908   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
3909   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
3910   hardcode_into_libs=yes
3911   ;;
3912
3913 # No shared lib support for Linux oldld, aout, or coff.
3914 linux*oldld* | linux*aout* | linux*coff*)
3915   dynamic_linker=no
3916   ;;
3917
3918 # This must be glibc/ELF.
3919 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
3920   version_type=linux # correct to gnu/linux during the next big refactor
3921   need_lib_prefix=no
3922   need_version=no
3923   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3924   soname_spec='${libname}${release}${shared_ext}$major'
3925   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
3926   shlibpath_var=LD_LIBRARY_PATH
3927   shlibpath_overrides_runpath=no
3928
3929   # Some binutils ld are patched to set DT_RUNPATH
3930   AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
3931     [lt_cv_shlibpath_overrides_runpath=no
3932     save_LDFLAGS=$LDFLAGS
3933     save_libdir=$libdir
3934     eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
3935          LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
3936     AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
3937       [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
3938          [lt_cv_shlibpath_overrides_runpath=yes])])
3939     LDFLAGS=$save_LDFLAGS
3940     libdir=$save_libdir
3941     ])
3942   shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
3943
3944   # This implies no fast_install, which is unacceptable.
3945   # Some rework will be needed to allow for fast_install
3946   # before this can be enabled.
3947   hardcode_into_libs=yes
3948
3949   # Append ld.so.conf contents to the search path
3950   if test -f /etc/ld.so.conf; then
3951     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' ' '`
3952     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
3953   fi
3954
3955   # We used to test for /lib/ld.so.1 and disable shared libraries on
3956   # powerpc, because MkLinux only supported shared libraries with the
3957   # GNU dynamic linker.  Since this was broken with cross compilers,
3958   # most powerpc-linux boxes support dynamic linking these days and
3959   # people can always --disable-shared, the test was removed, and we
3960   # assume the GNU/Linux dynamic linker is in use.
3961   dynamic_linker='GNU/Linux ld.so'
3962   ;;
3963
3964 netbsdelf*-gnu)
3965   version_type=linux
3966   need_lib_prefix=no
3967   need_version=no
3968   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3969   soname_spec='${libname}${release}${shared_ext}$major'
3970   shlibpath_var=LD_LIBRARY_PATH
3971   shlibpath_overrides_runpath=no
3972   hardcode_into_libs=yes
3973   dynamic_linker='NetBSD ld.elf_so'
3974   ;;
3975
3976 netbsd*)
3977   version_type=sunos
3978   need_lib_prefix=no
3979   need_version=no
3980   if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
3981     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3982     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3983     dynamic_linker='NetBSD (a.out) ld.so'
3984   else
3985     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3986     soname_spec='${libname}${release}${shared_ext}$major'
3987     dynamic_linker='NetBSD ld.elf_so'
3988   fi
3989   shlibpath_var=LD_LIBRARY_PATH
3990   shlibpath_overrides_runpath=yes
3991   hardcode_into_libs=yes
3992   ;;
3993
3994 newsos6)
3995   version_type=linux # correct to gnu/linux during the next big refactor
3996   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3997   shlibpath_var=LD_LIBRARY_PATH
3998   shlibpath_overrides_runpath=yes
3999   ;;
4000
4001 *nto* | *qnx*)
4002   version_type=qnx
4003   need_lib_prefix=no
4004   need_version=no
4005   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4006   soname_spec='${libname}${release}${shared_ext}$major'
4007   shlibpath_var=LD_LIBRARY_PATH
4008   shlibpath_overrides_runpath=no
4009   hardcode_into_libs=yes
4010   dynamic_linker='ldqnx.so'
4011   ;;
4012
4013 openbsd*)
4014   version_type=sunos
4015   sys_lib_dlsearch_path_spec="/usr/lib"
4016   need_lib_prefix=no
4017   # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
4018   case $host_os in
4019     openbsd3.3 | openbsd3.3.*)  need_version=yes ;;
4020     *)                          need_version=no  ;;
4021   esac
4022   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4023   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
4024   shlibpath_var=LD_LIBRARY_PATH
4025   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4026     case $host_os in
4027       openbsd2.[[89]] | openbsd2.[[89]].*)
4028         shlibpath_overrides_runpath=no
4029         ;;
4030       *)
4031         shlibpath_overrides_runpath=yes
4032         ;;
4033       esac
4034   else
4035     shlibpath_overrides_runpath=yes
4036   fi
4037   ;;
4038
4039 os2*)
4040   libname_spec='$name'
4041   shrext_cmds=".dll"
4042   need_lib_prefix=no
4043   library_names_spec='$libname${shared_ext} $libname.a'
4044   dynamic_linker='OS/2 ld.exe'
4045   shlibpath_var=LIBPATH
4046   ;;
4047
4048 osf3* | osf4* | osf5*)
4049   version_type=osf
4050   need_lib_prefix=no
4051   need_version=no
4052   soname_spec='${libname}${release}${shared_ext}$major'
4053   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4054   shlibpath_var=LD_LIBRARY_PATH
4055   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
4056   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
4057   ;;
4058
4059 rdos*)
4060   dynamic_linker=no
4061   ;;
4062
4063 solaris*)
4064   version_type=linux # correct to gnu/linux during the next big refactor
4065   need_lib_prefix=no
4066   need_version=no
4067   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4068   soname_spec='${libname}${release}${shared_ext}$major'
4069   shlibpath_var=LD_LIBRARY_PATH
4070   shlibpath_overrides_runpath=yes
4071   hardcode_into_libs=yes
4072   # ldd complains unless libraries are executable
4073   postinstall_cmds='chmod +x $lib'
4074   ;;
4075
4076 sunos4*)
4077   version_type=sunos
4078   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4079   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
4080   shlibpath_var=LD_LIBRARY_PATH
4081   shlibpath_overrides_runpath=yes
4082   if test "$with_gnu_ld" = yes; then
4083     need_lib_prefix=no
4084   fi
4085   need_version=yes
4086   ;;
4087
4088 sysv4 | sysv4.3*)
4089   version_type=linux # correct to gnu/linux during the next big refactor
4090   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4091   soname_spec='${libname}${release}${shared_ext}$major'
4092   shlibpath_var=LD_LIBRARY_PATH
4093   case $host_vendor in
4094     sni)
4095       shlibpath_overrides_runpath=no
4096       need_lib_prefix=no
4097       runpath_var=LD_RUN_PATH
4098       ;;
4099     siemens)
4100       need_lib_prefix=no
4101       ;;
4102     motorola)
4103       need_lib_prefix=no
4104       need_version=no
4105       shlibpath_overrides_runpath=no
4106       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
4107       ;;
4108   esac
4109   ;;
4110
4111 sysv4*MP*)
4112   if test -d /usr/nec ;then
4113     version_type=linux # correct to gnu/linux during the next big refactor
4114     library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
4115     soname_spec='$libname${shared_ext}.$major'
4116     shlibpath_var=LD_LIBRARY_PATH
4117   fi
4118   ;;
4119
4120 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4121   version_type=freebsd-elf
4122   need_lib_prefix=no
4123   need_version=no
4124   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
4125   soname_spec='${libname}${release}${shared_ext}$major'
4126   shlibpath_var=LD_LIBRARY_PATH
4127   shlibpath_overrides_runpath=yes
4128   hardcode_into_libs=yes
4129   if test "$with_gnu_ld" = yes; then
4130     sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
4131   else
4132     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
4133     case $host_os in
4134       sco3.2v5*)
4135         sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
4136         ;;
4137     esac
4138   fi
4139   sys_lib_dlsearch_path_spec='/usr/lib'
4140   ;;
4141
4142 tpf*)
4143   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
4144   version_type=linux # correct to gnu/linux during the next big refactor
4145   need_lib_prefix=no
4146   need_version=no
4147   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4148   shlibpath_var=LD_LIBRARY_PATH
4149   shlibpath_overrides_runpath=no
4150   hardcode_into_libs=yes
4151   ;;
4152
4153 uts4*)
4154   version_type=linux # correct to gnu/linux during the next big refactor
4155   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4156   soname_spec='${libname}${release}${shared_ext}$major'
4157   shlibpath_var=LD_LIBRARY_PATH
4158   ;;
4159
4160 *)
4161   dynamic_linker=no
4162   ;;
4163 esac
4164 AC_MSG_RESULT([$dynamic_linker])
4165 test "$dynamic_linker" = no && can_build_shared=no
4166
4167 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
4168 if test "$GCC" = yes; then
4169   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
4170 fi
4171
4172 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
4173   sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
4174 fi
4175 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
4176   sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
4177 fi
4178
4179 _LT_DECL([], [variables_saved_for_relink], [1],
4180     [Variables whose values should be saved in libtool wrapper scripts and
4181     restored at link time])
4182 _LT_DECL([], [need_lib_prefix], [0],
4183     [Do we need the "lib" prefix for modules?])
4184 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
4185 _LT_DECL([], [version_type], [0], [Library versioning type])
4186 _LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
4187 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
4188 _LT_DECL([], [shlibpath_overrides_runpath], [0],
4189     [Is shlibpath searched before the hard-coded library search path?])
4190 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
4191 _LT_DECL([], [library_names_spec], [1],
4192     [[List of archive names.  First name is the real one, the rest are links.
4193     The last name is the one that the linker finds with -lNAME]])
4194 _LT_DECL([], [soname_spec], [1],
4195     [[The coded name of the library, if different from the real name]])
4196 _LT_DECL([], [install_override_mode], [1],
4197     [Permission mode override for installation of shared libraries])
4198 _LT_DECL([], [postinstall_cmds], [2],
4199     [Command to use after installation of a shared archive])
4200 _LT_DECL([], [postuninstall_cmds], [2],
4201     [Command to use after uninstallation of a shared archive])
4202 _LT_DECL([], [finish_cmds], [2],
4203     [Commands used to finish a libtool library installation in a directory])
4204 _LT_DECL([], [finish_eval], [1],
4205     [[As "finish_cmds", except a single script fragment to be evaled but
4206     not shown]])
4207 _LT_DECL([], [hardcode_into_libs], [0],
4208     [Whether we should hardcode library paths into libraries])
4209 _LT_DECL([], [sys_lib_search_path_spec], [2],
4210     [Compile-time system search path for libraries])
4211 _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
4212     [Run-time system search path for libraries])
4213 ])# _LT_SYS_DYNAMIC_LINKER
4214
4215
4216 # _LT_PATH_TOOL_PREFIX(TOOL)
4217 # --------------------------
4218 # find a file program which can recognize shared library
4219 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
4220 [m4_require([_LT_DECL_EGREP])dnl
4221 AC_MSG_CHECKING([for $1])
4222 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
4223 [case $MAGIC_CMD in
4224 [[\\/*] |  ?:[\\/]*])
4225   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4226   ;;
4227 *)
4228   lt_save_MAGIC_CMD="$MAGIC_CMD"
4229   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4230 dnl $ac_dummy forces splitting on constant user-supplied paths.
4231 dnl POSIX.2 word splitting is done only on the output of word expansions,
4232 dnl not every word.  This closes a longstanding sh security hole.
4233   ac_dummy="m4_if([$2], , $PATH, [$2])"
4234   for ac_dir in $ac_dummy; do
4235     IFS="$lt_save_ifs"
4236     test -z "$ac_dir" && ac_dir=.
4237     if test -f $ac_dir/$1; then
4238       lt_cv_path_MAGIC_CMD="$ac_dir/$1"
4239       if test -n "$file_magic_test_file"; then
4240         case $deplibs_check_method in
4241         "file_magic "*)
4242           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
4243           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4244           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4245             $EGREP "$file_magic_regex" > /dev/null; then
4246             :
4247           else
4248             cat <<_LT_EOF 1>&2
4249
4250 *** Warning: the command libtool uses to detect shared libraries,
4251 *** $file_magic_cmd, produces output that libtool cannot recognize.
4252 *** The result is that libtool may fail to recognize shared libraries
4253 *** as such.  This will affect the creation of libtool libraries that
4254 *** depend on shared libraries, but programs linked with such libtool
4255 *** libraries will work regardless of this problem.  Nevertheless, you
4256 *** may want to report the problem to your system manager and/or to
4257 *** bug-libtool@gnu.org
4258
4259 _LT_EOF
4260           fi ;;
4261         esac
4262       fi
4263       break
4264     fi
4265   done
4266   IFS="$lt_save_ifs"
4267   MAGIC_CMD="$lt_save_MAGIC_CMD"
4268   ;;
4269 esac])
4270 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4271 if test -n "$MAGIC_CMD"; then
4272   AC_MSG_RESULT($MAGIC_CMD)
4273 else
4274   AC_MSG_RESULT(no)
4275 fi
4276 _LT_DECL([], [MAGIC_CMD], [0],
4277          [Used to examine libraries when file_magic_cmd begins with "file"])dnl
4278 ])# _LT_PATH_TOOL_PREFIX
4279
4280 # Old name:
4281 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
4282 dnl aclocal-1.4 backwards compatibility:
4283 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
4284
4285
4286 # _LT_PATH_MAGIC
4287 # --------------
4288 # find a file program which can recognize a shared library
4289 m4_defun([_LT_PATH_MAGIC],
4290 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
4291 if test -z "$lt_cv_path_MAGIC_CMD"; then
4292   if test -n "$ac_tool_prefix"; then
4293     _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
4294   else
4295     MAGIC_CMD=:
4296   fi
4297 fi
4298 ])# _LT_PATH_MAGIC
4299
4300
4301 # LT_PATH_LD
4302 # ----------
4303 # find the pathname to the GNU or non-GNU linker
4304 AC_DEFUN([LT_PATH_LD],
4305 [AC_REQUIRE([AC_PROG_CC])dnl
4306 AC_REQUIRE([AC_CANONICAL_HOST])dnl
4307 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
4308 m4_require([_LT_DECL_SED])dnl
4309 m4_require([_LT_DECL_EGREP])dnl
4310 m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
4311
4312 AC_ARG_WITH([gnu-ld],
4313     [AS_HELP_STRING([--with-gnu-ld],
4314         [assume the C compiler uses GNU ld @<:@default=no@:>@])],
4315     [test "$withval" = no || with_gnu_ld=yes],
4316     [with_gnu_ld=no])dnl
4317
4318 ac_prog=ld
4319 if test "$GCC" = yes; then
4320   # Check if gcc -print-prog-name=ld gives a path.
4321   AC_MSG_CHECKING([for ld used by $CC])
4322   case $host in
4323   *-*-mingw*)
4324     # gcc leaves a trailing carriage return which upsets mingw
4325     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4326   *)
4327     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4328   esac
4329   case $ac_prog in
4330     # Accept absolute paths.
4331     [[\\/]]* | ?:[[\\/]]*)
4332       re_direlt='/[[^/]][[^/]]*/\.\./'
4333       # Canonicalize the pathname of ld
4334       ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
4335       while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
4336         ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
4337       done
4338       test -z "$LD" && LD="$ac_prog"
4339       ;;
4340   "")
4341     # If it fails, then pretend we aren't using GCC.
4342     ac_prog=ld
4343     ;;
4344   *)
4345     # If it is relative, then search for the first ld in PATH.
4346     with_gnu_ld=unknown
4347     ;;
4348   esac
4349 elif test "$with_gnu_ld" = yes; then
4350   AC_MSG_CHECKING([for GNU ld])
4351 else
4352   AC_MSG_CHECKING([for non-GNU ld])
4353 fi
4354 AC_CACHE_VAL(lt_cv_path_LD,
4355 [if test -z "$LD"; then
4356   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4357   for ac_dir in $PATH; do
4358     IFS="$lt_save_ifs"
4359     test -z "$ac_dir" && ac_dir=.
4360     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4361       lt_cv_path_LD="$ac_dir/$ac_prog"
4362       # Check to see if the program is GNU ld.  I'd rather use --version,
4363       # but apparently some variants of GNU ld only accept -v.
4364       # Break only if it was the GNU/non-GNU ld that we prefer.
4365       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
4366       *GNU* | *'with BFD'*)
4367         test "$with_gnu_ld" != no && break
4368         ;;
4369       *)
4370         test "$with_gnu_ld" != yes && break
4371         ;;
4372       esac
4373     fi
4374   done
4375   IFS="$lt_save_ifs"
4376 else
4377   lt_cv_path_LD="$LD" # Let the user override the test with a path.
4378 fi])
4379 LD="$lt_cv_path_LD"
4380 if test -n "$LD"; then
4381   AC_MSG_RESULT($LD)
4382 else
4383   AC_MSG_RESULT(no)
4384 fi
4385 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
4386 _LT_PATH_LD_GNU
4387 AC_SUBST([LD])
4388
4389 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
4390 ])# LT_PATH_LD
4391
4392 # Old names:
4393 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
4394 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
4395 dnl aclocal-1.4 backwards compatibility:
4396 dnl AC_DEFUN([AM_PROG_LD], [])
4397 dnl AC_DEFUN([AC_PROG_LD], [])
4398
4399
4400 # _LT_PATH_LD_GNU
4401 #- --------------
4402 m4_defun([_LT_PATH_LD_GNU],
4403 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
4404 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
4405 case `$LD -v 2>&1 </dev/null` in
4406 *GNU* | *'with BFD'*)
4407   lt_cv_prog_gnu_ld=yes
4408   ;;
4409 *)
4410   lt_cv_prog_gnu_ld=no
4411   ;;
4412 esac])
4413 with_gnu_ld=$lt_cv_prog_gnu_ld
4414 ])# _LT_PATH_LD_GNU
4415
4416
4417 # _LT_CMD_RELOAD
4418 # --------------
4419 # find reload flag for linker
4420 #   -- PORTME Some linkers may need a different reload flag.
4421 m4_defun([_LT_CMD_RELOAD],
4422 [AC_CACHE_CHECK([for $LD option to reload object files],
4423   lt_cv_ld_reload_flag,
4424   [lt_cv_ld_reload_flag='-r'])
4425 reload_flag=$lt_cv_ld_reload_flag
4426 case $reload_flag in
4427 "" | " "*) ;;
4428 *) reload_flag=" $reload_flag" ;;
4429 esac
4430 reload_cmds='$LD$reload_flag -o $output$reload_objs'
4431 case $host_os in
4432   cygwin* | mingw* | pw32* | cegcc*)
4433     if test "$GCC" != yes; then
4434       reload_cmds=false
4435     fi
4436     ;;
4437   darwin*)
4438     if test "$GCC" = yes; then
4439       reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
4440     else
4441       reload_cmds='$LD$reload_flag -o $output$reload_objs'
4442     fi
4443     ;;
4444 esac
4445 _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
4446 _LT_TAGDECL([], [reload_cmds], [2])dnl
4447 ])# _LT_CMD_RELOAD
4448
4449
4450 # _LT_CHECK_MAGIC_METHOD
4451 # ----------------------
4452 # how to check for library dependencies
4453 #  -- PORTME fill in with the dynamic library characteristics
4454 m4_defun([_LT_CHECK_MAGIC_METHOD],
4455 [m4_require([_LT_DECL_EGREP])
4456 m4_require([_LT_DECL_OBJDUMP])
4457 AC_CACHE_CHECK([how to recognize dependent libraries],
4458 lt_cv_deplibs_check_method,
4459 [lt_cv_file_magic_cmd='$MAGIC_CMD'
4460 lt_cv_file_magic_test_file=
4461 lt_cv_deplibs_check_method='unknown'
4462 # Need to set the preceding variable on all platforms that support
4463 # interlibrary dependencies.
4464 # 'none' -- dependencies not supported.
4465 # `unknown' -- same as none, but documents that we really don't know.
4466 # 'pass_all' -- all dependencies passed with no checks.
4467 # 'test_compile' -- check by making test program.
4468 # 'file_magic [[regex]]' -- check by looking for files in library path
4469 # which responds to the $file_magic_cmd with a given extended regex.
4470 # If you have `file' or equivalent on your system and you're not sure
4471 # whether `pass_all' will *always* work, you probably want this one.
4472
4473 case $host_os in
4474 aix[[4-9]]*)
4475   lt_cv_deplibs_check_method=pass_all
4476   ;;
4477
4478 beos*)
4479   lt_cv_deplibs_check_method=pass_all
4480   ;;
4481
4482 bsdi[[45]]*)
4483   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
4484   lt_cv_file_magic_cmd='/usr/bin/file -L'
4485   lt_cv_file_magic_test_file=/shlib/libc.so
4486   ;;
4487
4488 cygwin*)
4489   # func_win32_libid is a shell function defined in ltmain.sh
4490   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4491   lt_cv_file_magic_cmd='func_win32_libid'
4492   ;;
4493
4494 mingw* | pw32*)
4495   # Base MSYS/MinGW do not provide the 'file' command needed by
4496   # func_win32_libid shell function, so use a weaker test based on 'objdump',
4497   # unless we find 'file', for example because we are cross-compiling.
4498   # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
4499   if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
4500     lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4501     lt_cv_file_magic_cmd='func_win32_libid'
4502   else
4503     # Keep this pattern in sync with the one in func_win32_libid.
4504     lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
4505     lt_cv_file_magic_cmd='$OBJDUMP -f'
4506   fi
4507   ;;
4508
4509 cegcc*)
4510   # use the weaker test based on 'objdump'. See mingw*.
4511   lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
4512   lt_cv_file_magic_cmd='$OBJDUMP -f'
4513   ;;
4514
4515 darwin* | rhapsody*)
4516   lt_cv_deplibs_check_method=pass_all
4517   ;;
4518
4519 freebsd* | dragonfly*)
4520   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4521     case $host_cpu in
4522     i*86 )
4523       # Not sure whether the presence of OpenBSD here was a mistake.
4524       # Let's accept both of them until this is cleared up.
4525       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
4526       lt_cv_file_magic_cmd=/usr/bin/file
4527       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4528       ;;
4529     esac
4530   else
4531     lt_cv_deplibs_check_method=pass_all
4532   fi
4533   ;;
4534
4535 haiku*)
4536   lt_cv_deplibs_check_method=pass_all
4537   ;;
4538
4539 hpux10.20* | hpux11*)
4540   lt_cv_file_magic_cmd=/usr/bin/file
4541   case $host_cpu in
4542   ia64*)
4543     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
4544     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
4545     ;;
4546   hppa*64*)
4547     [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]']
4548     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
4549     ;;
4550   *)
4551     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
4552     lt_cv_file_magic_test_file=/usr/lib/libc.sl
4553     ;;
4554   esac
4555   ;;
4556
4557 interix[[3-9]]*)
4558   # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
4559   lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
4560   ;;
4561
4562 irix5* | irix6* | nonstopux*)
4563   case $LD in
4564   *-32|*"-32 ") libmagic=32-bit;;
4565   *-n32|*"-n32 ") libmagic=N32;;
4566   *-64|*"-64 ") libmagic=64-bit;;
4567   *) libmagic=never-match;;
4568   esac
4569   lt_cv_deplibs_check_method=pass_all
4570   ;;
4571
4572 # This must be glibc/ELF.
4573 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
4574   lt_cv_deplibs_check_method=pass_all
4575   ;;
4576
4577 netbsd* | netbsdelf*-gnu)
4578   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4579     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4580   else
4581     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
4582   fi
4583   ;;
4584
4585 newos6*)
4586   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
4587   lt_cv_file_magic_cmd=/usr/bin/file
4588   lt_cv_file_magic_test_file=/usr/lib/libnls.so
4589   ;;
4590
4591 *nto* | *qnx*)
4592   lt_cv_deplibs_check_method=pass_all
4593   ;;
4594
4595 openbsd*)
4596   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4597     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
4598   else
4599     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4600   fi
4601   ;;
4602
4603 osf3* | osf4* | osf5*)
4604   lt_cv_deplibs_check_method=pass_all
4605   ;;
4606
4607 rdos*)
4608   lt_cv_deplibs_check_method=pass_all
4609   ;;
4610
4611 solaris*)
4612   lt_cv_deplibs_check_method=pass_all
4613   ;;
4614
4615 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4616   lt_cv_deplibs_check_method=pass_all
4617   ;;
4618
4619 sysv4 | sysv4.3*)
4620   case $host_vendor in
4621   motorola)
4622     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]]'
4623     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4624     ;;
4625   ncr)
4626     lt_cv_deplibs_check_method=pass_all
4627     ;;
4628   sequent)
4629     lt_cv_file_magic_cmd='/bin/file'
4630     lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
4631     ;;
4632   sni)
4633     lt_cv_file_magic_cmd='/bin/file'
4634     lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4635     lt_cv_file_magic_test_file=/lib/libc.so
4636     ;;
4637   siemens)
4638     lt_cv_deplibs_check_method=pass_all
4639     ;;
4640   pc)
4641     lt_cv_deplibs_check_method=pass_all
4642     ;;
4643   esac
4644   ;;
4645
4646 tpf*)
4647   lt_cv_deplibs_check_method=pass_all
4648   ;;
4649 esac
4650 ])
4651
4652 file_magic_glob=
4653 want_nocaseglob=no
4654 if test "$build" = "$host"; then
4655   case $host_os in
4656   mingw* | pw32*)
4657     if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
4658       want_nocaseglob=yes
4659     else
4660       file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
4661     fi
4662     ;;
4663   esac
4664 fi
4665
4666 file_magic_cmd=$lt_cv_file_magic_cmd
4667 deplibs_check_method=$lt_cv_deplibs_check_method
4668 test -z "$deplibs_check_method" && deplibs_check_method=unknown
4669
4670 _LT_DECL([], [deplibs_check_method], [1],
4671     [Method to check whether dependent libraries are shared objects])
4672 _LT_DECL([], [file_magic_cmd], [1],
4673     [Command to use when deplibs_check_method = "file_magic"])
4674 _LT_DECL([], [file_magic_glob], [1],
4675     [How to find potential files when deplibs_check_method = "file_magic"])
4676 _LT_DECL([], [want_nocaseglob], [1],
4677     [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
4678 ])# _LT_CHECK_MAGIC_METHOD
4679
4680
4681 # LT_PATH_NM
4682 # ----------
4683 # find the pathname to a BSD- or MS-compatible name lister
4684 AC_DEFUN([LT_PATH_NM],
4685 [AC_REQUIRE([AC_PROG_CC])dnl
4686 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
4687 [if test -n "$NM"; then
4688   # Let the user override the test.
4689   lt_cv_path_NM="$NM"
4690 else
4691   lt_nm_to_check="${ac_tool_prefix}nm"
4692   if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
4693     lt_nm_to_check="$lt_nm_to_check nm"
4694   fi
4695   for lt_tmp_nm in $lt_nm_to_check; do
4696     lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4697     for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
4698       IFS="$lt_save_ifs"
4699       test -z "$ac_dir" && ac_dir=.
4700       tmp_nm="$ac_dir/$lt_tmp_nm"
4701       if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
4702         # Check to see if the nm accepts a BSD-compat flag.
4703         # Adding the `sed 1q' prevents false positives on HP-UX, which says:
4704         #   nm: unknown option "B" ignored
4705         # Tru64's nm complains that /dev/null is an invalid object file
4706         case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
4707         */dev/null* | *'Invalid file or object type'*)
4708           lt_cv_path_NM="$tmp_nm -B"
4709           break
4710           ;;
4711         *)
4712           case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
4713           */dev/null*)
4714             lt_cv_path_NM="$tmp_nm -p"
4715             break
4716             ;;
4717           *)
4718             lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4719             continue # so that we can try to find one that supports BSD flags
4720             ;;
4721           esac
4722           ;;
4723         esac
4724       fi
4725     done
4726     IFS="$lt_save_ifs"
4727   done
4728   : ${lt_cv_path_NM=no}
4729 fi])
4730 if test "$lt_cv_path_NM" != "no"; then
4731   NM="$lt_cv_path_NM"
4732 else
4733   # Didn't find any BSD compatible name lister, look for dumpbin.
4734   if test -n "$DUMPBIN"; then :
4735     # Let the user override the test.
4736   else
4737     AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
4738     case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
4739     *COFF*)
4740       DUMPBIN="$DUMPBIN -symbols"
4741       ;;
4742     *)
4743       DUMPBIN=:
4744       ;;
4745     esac
4746   fi
4747   AC_SUBST([DUMPBIN])
4748   if test "$DUMPBIN" != ":"; then
4749     NM="$DUMPBIN"
4750   fi
4751 fi
4752 test -z "$NM" && NM=nm
4753 AC_SUBST([NM])
4754 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
4755
4756 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
4757   [lt_cv_nm_interface="BSD nm"
4758   echo "int some_variable = 0;" > conftest.$ac_ext
4759   (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
4760   (eval "$ac_compile" 2>conftest.err)
4761   cat conftest.err >&AS_MESSAGE_LOG_FD
4762   (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
4763   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
4764   cat conftest.err >&AS_MESSAGE_LOG_FD
4765   (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
4766   cat conftest.out >&AS_MESSAGE_LOG_FD
4767   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
4768     lt_cv_nm_interface="MS dumpbin"
4769   fi
4770   rm -f conftest*])
4771 ])# LT_PATH_NM
4772
4773 # Old names:
4774 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
4775 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
4776 dnl aclocal-1.4 backwards compatibility:
4777 dnl AC_DEFUN([AM_PROG_NM], [])
4778 dnl AC_DEFUN([AC_PROG_NM], [])
4779
4780 # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
4781 # --------------------------------
4782 # how to determine the name of the shared library
4783 # associated with a specific link library.
4784 #  -- PORTME fill in with the dynamic library characteristics
4785 m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
4786 [m4_require([_LT_DECL_EGREP])
4787 m4_require([_LT_DECL_OBJDUMP])
4788 m4_require([_LT_DECL_DLLTOOL])
4789 AC_CACHE_CHECK([how to associate runtime and link libraries],
4790 lt_cv_sharedlib_from_linklib_cmd,
4791 [lt_cv_sharedlib_from_linklib_cmd='unknown'
4792
4793 case $host_os in
4794 cygwin* | mingw* | pw32* | cegcc*)
4795   # two different shell functions defined in ltmain.sh
4796   # decide which to use based on capabilities of $DLLTOOL
4797   case `$DLLTOOL --help 2>&1` in
4798   *--identify-strict*)
4799     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
4800     ;;
4801   *)
4802     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
4803     ;;
4804   esac
4805   ;;
4806 *)
4807   # fallback: assume linklib IS sharedlib
4808   lt_cv_sharedlib_from_linklib_cmd="$ECHO"
4809   ;;
4810 esac
4811 ])
4812 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
4813 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
4814
4815 _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
4816     [Command to associate shared and link libraries])
4817 ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
4818
4819
4820 # _LT_PATH_MANIFEST_TOOL
4821 # ----------------------
4822 # locate the manifest tool
4823 m4_defun([_LT_PATH_MANIFEST_TOOL],
4824 [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
4825 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
4826 AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
4827   [lt_cv_path_mainfest_tool=no
4828   echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
4829   $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
4830   cat conftest.err >&AS_MESSAGE_LOG_FD
4831   if $GREP 'Manifest Tool' conftest.out > /dev/null; then
4832     lt_cv_path_mainfest_tool=yes
4833   fi
4834   rm -f conftest*])
4835 if test "x$lt_cv_path_mainfest_tool" != xyes; then
4836   MANIFEST_TOOL=:
4837 fi
4838 _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
4839 ])# _LT_PATH_MANIFEST_TOOL
4840
4841
4842 # LT_LIB_M
4843 # --------
4844 # check for math library
4845 AC_DEFUN([LT_LIB_M],
4846 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4847 LIBM=
4848 case $host in
4849 *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
4850   # These system don't have libm, or don't need it
4851   ;;
4852 *-ncr-sysv4.3*)
4853   AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4854   AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
4855   ;;
4856 *)
4857   AC_CHECK_LIB(m, cos, LIBM="-lm")
4858   ;;
4859 esac
4860 AC_SUBST([LIBM])
4861 ])# LT_LIB_M
4862
4863 # Old name:
4864 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
4865 dnl aclocal-1.4 backwards compatibility:
4866 dnl AC_DEFUN([AC_CHECK_LIBM], [])
4867
4868
4869 # _LT_COMPILER_NO_RTTI([TAGNAME])
4870 # -------------------------------
4871 m4_defun([_LT_COMPILER_NO_RTTI],
4872 [m4_require([_LT_TAG_COMPILER])dnl
4873
4874 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4875
4876 if test "$GCC" = yes; then
4877   case $cc_basename in
4878   nvcc*)
4879     _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
4880   *)
4881     _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
4882   esac
4883
4884   _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4885     lt_cv_prog_compiler_rtti_exceptions,
4886     [-fno-rtti -fno-exceptions], [],
4887     [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4888 fi
4889 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
4890         [Compiler flag to turn off builtin functions])
4891 ])# _LT_COMPILER_NO_RTTI
4892
4893
4894 # _LT_CMD_GLOBAL_SYMBOLS
4895 # ----------------------
4896 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
4897 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4898 AC_REQUIRE([AC_PROG_CC])dnl
4899 AC_REQUIRE([AC_PROG_AWK])dnl
4900 AC_REQUIRE([LT_PATH_NM])dnl
4901 AC_REQUIRE([LT_PATH_LD])dnl
4902 m4_require([_LT_DECL_SED])dnl
4903 m4_require([_LT_DECL_EGREP])dnl
4904 m4_require([_LT_TAG_COMPILER])dnl
4905
4906 # Check for command to grab the raw symbol name followed by C symbol from nm.
4907 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4908 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4909 [
4910 # These are sane defaults that work on at least a few old systems.
4911 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4912
4913 # Character class describing NM global symbol codes.
4914 symcode='[[BCDEGRST]]'
4915
4916 # Regexp to match symbols that can be accessed directly from C.
4917 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4918
4919 # Define system-specific variables.
4920 case $host_os in
4921 aix*)
4922   symcode='[[BCDT]]'
4923   ;;
4924 cygwin* | mingw* | pw32* | cegcc*)
4925   symcode='[[ABCDGISTW]]'
4926   ;;
4927 hpux*)
4928   if test "$host_cpu" = ia64; then
4929     symcode='[[ABCDEGRST]]'
4930   fi
4931   ;;
4932 irix* | nonstopux*)
4933   symcode='[[BCDEGRST]]'
4934   ;;
4935 osf*)
4936   symcode='[[BCDEGQRST]]'
4937   ;;
4938 solaris*)
4939   symcode='[[BDRT]]'
4940   ;;
4941 sco3.2v5*)
4942   symcode='[[DT]]'
4943   ;;
4944 sysv4.2uw2*)
4945   symcode='[[DT]]'
4946   ;;
4947 sysv5* | sco5v6* | unixware* | OpenUNIX*)
4948   symcode='[[ABDT]]'
4949   ;;
4950 sysv4)
4951   symcode='[[DFNSTU]]'
4952   ;;
4953 esac
4954
4955 # If we're using GNU nm, then use its standard symbol codes.
4956 case `$NM -V 2>&1` in
4957 *GNU* | *'with BFD'*)
4958   symcode='[[ABCDGIRSTW]]' ;;
4959 esac
4960
4961 # Transform an extracted symbol line into a proper C declaration.
4962 # Some systems (esp. on ia64) link data and code symbols differently,
4963 # so use this general approach.
4964 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4965
4966 # Transform an extracted symbol line into symbol name and symbol address
4967 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
4968 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'"
4969
4970 # Handle CRLF in mingw tool chain
4971 opt_cr=
4972 case $build_os in
4973 mingw*)
4974   opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4975   ;;
4976 esac
4977
4978 # Try without a prefix underscore, then with it.
4979 for ac_symprfx in "" "_"; do
4980
4981   # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4982   symxfrm="\\1 $ac_symprfx\\2 \\2"
4983
4984   # Write the raw and C identifiers.
4985   if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4986     # Fake it for dumpbin and say T for any non-static function
4987     # and D for any global variable.
4988     # Also find C++ and __fastcall symbols from MSVC++,
4989     # which start with @ or ?.
4990     lt_cv_sys_global_symbol_pipe="$AWK ['"\
4991 "     {last_section=section; section=\$ 3};"\
4992 "     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
4993 "     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
4994 "     \$ 0!~/External *\|/{next};"\
4995 "     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
4996 "     {if(hide[section]) next};"\
4997 "     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
4998 "     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
4999 "     s[1]~/^[@?]/{print s[1], s[1]; next};"\
5000 "     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
5001 "     ' prfx=^$ac_symprfx]"
5002   else
5003     lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[     ]]\($symcode$symcode*\)[[       ]][[    ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
5004   fi
5005   lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
5006
5007   # Check to see that the pipe works correctly.
5008   pipe_works=no
5009
5010   rm -f conftest*
5011   cat > conftest.$ac_ext <<_LT_EOF
5012 #ifdef __cplusplus
5013 extern "C" {
5014 #endif
5015 char nm_test_var;
5016 void nm_test_func(void);
5017 void nm_test_func(void){}
5018 #ifdef __cplusplus
5019 }
5020 #endif
5021 int main(){nm_test_var='a';nm_test_func();return(0);}
5022 _LT_EOF
5023
5024   if AC_TRY_EVAL(ac_compile); then
5025     # Now try to grab the symbols.
5026     nlist=conftest.nm
5027     if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
5028       # Try sorting and uniquifying the output.
5029       if sort "$nlist" | uniq > "$nlist"T; then
5030         mv -f "$nlist"T "$nlist"
5031       else
5032         rm -f "$nlist"T
5033       fi
5034
5035       # Make sure that we snagged all the symbols we need.
5036       if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
5037         if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
5038           cat <<_LT_EOF > conftest.$ac_ext
5039 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
5040 #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
5041 /* DATA imports from DLLs on WIN32 con't be const, because runtime
5042    relocations are performed -- see ld's documentation on pseudo-relocs.  */
5043 # define LT@&t@_DLSYM_CONST
5044 #elif defined(__osf__)
5045 /* This system does not cope well with relocations in const data.  */
5046 # define LT@&t@_DLSYM_CONST
5047 #else
5048 # define LT@&t@_DLSYM_CONST const
5049 #endif
5050
5051 #ifdef __cplusplus
5052 extern "C" {
5053 #endif
5054
5055 _LT_EOF
5056           # Now generate the symbol file.
5057           eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
5058
5059           cat <<_LT_EOF >> conftest.$ac_ext
5060
5061 /* The mapping between symbol names and symbols.  */
5062 LT@&t@_DLSYM_CONST struct {
5063   const char *name;
5064   void       *address;
5065 }
5066 lt__PROGRAM__LTX_preloaded_symbols[[]] =
5067 {
5068   { "@PROGRAM@", (void *) 0 },
5069 _LT_EOF
5070           $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
5071           cat <<\_LT_EOF >> conftest.$ac_ext
5072   {0, (void *) 0}
5073 };
5074
5075 /* This works around a problem in FreeBSD linker */
5076 #ifdef FREEBSD_WORKAROUND
5077 static const void *lt_preloaded_setup() {
5078   return lt__PROGRAM__LTX_preloaded_symbols;
5079 }
5080 #endif
5081
5082 #ifdef __cplusplus
5083 }
5084 #endif
5085 _LT_EOF
5086           # Now try linking the two files.
5087           mv conftest.$ac_objext conftstm.$ac_objext
5088           lt_globsym_save_LIBS=$LIBS
5089           lt_globsym_save_CFLAGS=$CFLAGS
5090           LIBS="conftstm.$ac_objext"
5091           CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
5092           if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
5093             pipe_works=yes
5094           fi
5095           LIBS=$lt_globsym_save_LIBS
5096           CFLAGS=$lt_globsym_save_CFLAGS
5097         else
5098           echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
5099         fi
5100       else
5101         echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
5102       fi
5103     else
5104       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
5105     fi
5106   else
5107     echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
5108     cat conftest.$ac_ext >&5
5109   fi
5110   rm -rf conftest* conftst*
5111
5112   # Do not use the global_symbol_pipe unless it works.
5113   if test "$pipe_works" = yes; then
5114     break
5115   else
5116     lt_cv_sys_global_symbol_pipe=
5117   fi
5118 done
5119 ])
5120 if test -z "$lt_cv_sys_global_symbol_pipe"; then
5121   lt_cv_sys_global_symbol_to_cdecl=
5122 fi
5123 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
5124   AC_MSG_RESULT(failed)
5125 else
5126   AC_MSG_RESULT(ok)
5127 fi
5128
5129 # Response file support.
5130 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
5131   nm_file_list_spec='@'
5132 elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
5133   nm_file_list_spec='@'
5134 fi
5135
5136 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
5137     [Take the output of nm and produce a listing of raw symbols and C names])
5138 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
5139     [Transform the output of nm in a proper C declaration])
5140 _LT_DECL([global_symbol_to_c_name_address],
5141     [lt_cv_sys_global_symbol_to_c_name_address], [1],
5142     [Transform the output of nm in a C name address pair])
5143 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
5144     [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
5145     [Transform the output of nm in a C name address pair when lib prefix is needed])
5146 _LT_DECL([], [nm_file_list_spec], [1],
5147     [Specify filename containing input files for $NM])
5148 ]) # _LT_CMD_GLOBAL_SYMBOLS
5149
5150
5151 # _LT_COMPILER_PIC([TAGNAME])
5152 # ---------------------------
5153 m4_defun([_LT_COMPILER_PIC],
5154 [m4_require([_LT_TAG_COMPILER])dnl
5155 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
5156 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5157 _LT_TAGVAR(lt_prog_compiler_static, $1)=
5158
5159 m4_if([$1], [CXX], [
5160   # C++ specific cases for pic, static, wl, etc.
5161   if test "$GXX" = yes; then
5162     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5163     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5164
5165     case $host_os in
5166     aix*)
5167       # All AIX code is PIC.
5168       if test "$host_cpu" = ia64; then
5169         # AIX 5 now supports IA64 processor
5170         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5171       fi
5172       ;;
5173
5174     amigaos*)
5175       case $host_cpu in
5176       powerpc)
5177             # see comment about AmigaOS4 .so support
5178             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5179         ;;
5180       m68k)
5181             # FIXME: we need at least 68020 code to build shared libraries, but
5182             # adding the `-m68020' flag to GCC prevents building anything better,
5183             # like `-m68040'.
5184             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5185         ;;
5186       esac
5187       ;;
5188
5189     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5190       # PIC is the default for these OSes.
5191       ;;
5192     mingw* | cygwin* | os2* | pw32* | cegcc*)
5193       # This hack is so that the source file can tell whether it is being
5194       # built for inclusion in a dll (and should export symbols for example).
5195       # Although the cygwin gcc ignores -fPIC, still need this for old-style
5196       # (--disable-auto-import) libraries
5197       m4_if([$1], [GCJ], [],
5198         [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5199       ;;
5200     darwin* | rhapsody*)
5201       # PIC is the default on this platform
5202       # Common symbols not allowed in MH_DYLIB files
5203       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5204       ;;
5205     *djgpp*)
5206       # DJGPP does not support shared libraries at all
5207       _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5208       ;;
5209     haiku*)
5210       # PIC is the default for Haiku.
5211       # The "-static" flag exists, but is broken.
5212       _LT_TAGVAR(lt_prog_compiler_static, $1)=
5213       ;;
5214     interix[[3-9]]*)
5215       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5216       # Instead, we relocate shared libraries at runtime.
5217       ;;
5218     sysv4*MP*)
5219       if test -d /usr/nec; then
5220         _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5221       fi
5222       ;;
5223     hpux*)
5224       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
5225       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
5226       # sets the default TLS model and affects inlining.
5227       case $host_cpu in
5228       hppa*64*)
5229         ;;
5230       *)
5231         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5232         ;;
5233       esac
5234       ;;
5235     *qnx* | *nto*)
5236       # QNX uses GNU C++, but need to define -shared option too, otherwise
5237       # it will coredump.
5238       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5239       ;;
5240     *)
5241       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5242       ;;
5243     esac
5244   else
5245     case $host_os in
5246       aix[[4-9]]*)
5247         # All AIX code is PIC.
5248         if test "$host_cpu" = ia64; then
5249           # AIX 5 now supports IA64 processor
5250           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5251         else
5252           _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5253         fi
5254         ;;
5255       chorus*)
5256         case $cc_basename in
5257         cxch68*)
5258           # Green Hills C++ Compiler
5259           # _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"
5260           ;;
5261         esac
5262         ;;
5263       mingw* | cygwin* | os2* | pw32* | cegcc*)
5264         # This hack is so that the source file can tell whether it is being
5265         # built for inclusion in a dll (and should export symbols for example).
5266         m4_if([$1], [GCJ], [],
5267           [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5268         ;;
5269       dgux*)
5270         case $cc_basename in
5271           ec++*)
5272             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5273             ;;
5274           ghcx*)
5275             # Green Hills C++ Compiler
5276             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5277             ;;
5278           *)
5279             ;;
5280         esac
5281         ;;
5282       freebsd* | dragonfly*)
5283         # FreeBSD uses GNU C++
5284         ;;
5285       hpux9* | hpux10* | hpux11*)
5286         case $cc_basename in
5287           CC*)
5288             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5289             _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5290             if test "$host_cpu" != ia64; then
5291               _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5292             fi
5293             ;;
5294           aCC*)
5295             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5296             _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5297             case $host_cpu in
5298             hppa*64*|ia64*)
5299               # +Z the default
5300               ;;
5301             *)
5302               _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5303               ;;
5304             esac
5305             ;;
5306           *)
5307             ;;
5308         esac
5309         ;;
5310       interix*)
5311         # This is c89, which is MS Visual C++ (no shared libs)
5312         # Anyone wants to do a port?
5313         ;;
5314       irix5* | irix6* | nonstopux*)
5315         case $cc_basename in
5316           CC*)
5317             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5318             _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5319             # CC pic flag -KPIC is the default.
5320             ;;
5321           *)
5322             ;;
5323         esac
5324         ;;
5325       linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
5326         case $cc_basename in
5327           KCC*)
5328             # KAI C++ Compiler
5329             _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5330             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5331             ;;
5332           ecpc* )
5333             # old Intel C++ for x86_64 which still supported -KPIC.
5334             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5335             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5336             _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5337             ;;
5338           icpc* )
5339             # Intel C++, used to be incompatible with GCC.
5340             # ICC 10 doesn't accept -KPIC any more.
5341             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5342             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5343             _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5344             ;;
5345           pgCC* | pgcpp*)
5346             # Portland Group C++ compiler
5347             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5348             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5349             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5350             ;;
5351           cxx*)
5352             # Compaq C++
5353             # Make sure the PIC flag is empty.  It appears that all Alpha
5354             # Linux and Compaq Tru64 Unix objects are PIC.
5355             _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5356             _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5357             ;;
5358           xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
5359             # IBM XL 8.0, 9.0 on PPC and BlueGene
5360             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5361             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5362             _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5363             ;;
5364           *)
5365             case `$CC -V 2>&1 | sed 5q` in
5366             *Sun\ C*)
5367               # Sun C++ 5.9
5368               _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5369               _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5370               _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5371               ;;
5372             esac
5373             ;;
5374         esac
5375         ;;
5376       lynxos*)
5377         ;;
5378       m88k*)
5379         ;;
5380       mvs*)
5381         case $cc_basename in
5382           cxx*)
5383             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5384             ;;
5385           *)
5386             ;;
5387         esac
5388         ;;
5389       netbsd* | netbsdelf*-gnu)
5390         ;;
5391       *qnx* | *nto*)
5392         # QNX uses GNU C++, but need to define -shared option too, otherwise
5393         # it will coredump.
5394         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5395         ;;
5396       osf3* | osf4* | osf5*)
5397         case $cc_basename in
5398           KCC*)
5399             _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5400             ;;
5401           RCC*)
5402             # Rational C++ 2.4.1
5403             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5404             ;;
5405           cxx*)
5406             # Digital/Compaq C++
5407             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5408             # Make sure the PIC flag is empty.  It appears that all Alpha
5409             # Linux and Compaq Tru64 Unix objects are PIC.
5410             _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5411             _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5412             ;;
5413           *)
5414             ;;
5415         esac
5416         ;;
5417       psos*)
5418         ;;
5419       solaris*)
5420         case $cc_basename in
5421           CC* | sunCC*)
5422             # Sun C++ 4.2, 5.x and Centerline C++
5423             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5424             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5425             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5426             ;;
5427           gcx*)
5428             # Green Hills C++ Compiler
5429             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5430             ;;
5431           *)
5432             ;;
5433         esac
5434         ;;
5435       sunos4*)
5436         case $cc_basename in
5437           CC*)
5438             # Sun C++ 4.x
5439             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5440             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5441             ;;
5442           lcc*)
5443             # Lucid
5444             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5445             ;;
5446           *)
5447             ;;
5448         esac
5449         ;;
5450       sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5451         case $cc_basename in
5452           CC*)
5453             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5454             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5455             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5456             ;;
5457         esac
5458         ;;
5459       tandem*)
5460         case $cc_basename in
5461           NCC*)
5462             # NonStop-UX NCC 3.20
5463             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5464             ;;
5465           *)
5466             ;;
5467         esac
5468         ;;
5469       vxworks*)
5470         ;;
5471       *)
5472         _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5473         ;;
5474     esac
5475   fi
5476 ],
5477 [
5478   if test "$GCC" = yes; then
5479     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5480     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5481
5482     case $host_os in
5483       aix*)
5484       # All AIX code is PIC.
5485       if test "$host_cpu" = ia64; then
5486         # AIX 5 now supports IA64 processor
5487         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5488       fi
5489       ;;
5490
5491     amigaos*)
5492       case $host_cpu in
5493       powerpc)
5494             # see comment about AmigaOS4 .so support
5495             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5496         ;;
5497       m68k)
5498             # FIXME: we need at least 68020 code to build shared libraries, but
5499             # adding the `-m68020' flag to GCC prevents building anything better,
5500             # like `-m68040'.
5501             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5502         ;;
5503       esac
5504       ;;
5505
5506     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5507       # PIC is the default for these OSes.
5508       ;;
5509
5510     mingw* | cygwin* | pw32* | os2* | cegcc*)
5511       # This hack is so that the source file can tell whether it is being
5512       # built for inclusion in a dll (and should export symbols for example).
5513       # Although the cygwin gcc ignores -fPIC, still need this for old-style
5514       # (--disable-auto-import) libraries
5515       m4_if([$1], [GCJ], [],
5516         [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5517       ;;
5518
5519     darwin* | rhapsody*)
5520       # PIC is the default on this platform
5521       # Common symbols not allowed in MH_DYLIB files
5522       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5523       ;;
5524
5525     haiku*)
5526       # PIC is the default for Haiku.
5527       # The "-static" flag exists, but is broken.
5528       _LT_TAGVAR(lt_prog_compiler_static, $1)=
5529       ;;
5530
5531     hpux*)
5532       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
5533       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
5534       # sets the default TLS model and affects inlining.
5535       case $host_cpu in
5536       hppa*64*)
5537         # +Z the default
5538         ;;
5539       *)
5540         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5541         ;;
5542       esac
5543       ;;
5544
5545     interix[[3-9]]*)
5546       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5547       # Instead, we relocate shared libraries at runtime.
5548       ;;
5549
5550     msdosdjgpp*)
5551       # Just because we use GCC doesn't mean we suddenly get shared libraries
5552       # on systems that don't support them.
5553       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5554       enable_shared=no
5555       ;;
5556
5557     *nto* | *qnx*)
5558       # QNX uses GNU C++, but need to define -shared option too, otherwise
5559       # it will coredump.
5560       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5561       ;;
5562
5563     sysv4*MP*)
5564       if test -d /usr/nec; then
5565         _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5566       fi
5567       ;;
5568
5569     *)
5570       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5571       ;;
5572     esac
5573
5574     case $cc_basename in
5575     nvcc*) # Cuda Compiler Driver 2.2
5576       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
5577       if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
5578         _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
5579       fi
5580       ;;
5581     esac
5582   else
5583     # PORTME Check for flag to pass linker flags through the system compiler.
5584     case $host_os in
5585     aix*)
5586       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5587       if test "$host_cpu" = ia64; then
5588         # AIX 5 now supports IA64 processor
5589         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5590       else
5591         _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5592       fi
5593       ;;
5594
5595     mingw* | cygwin* | pw32* | os2* | cegcc*)
5596       # This hack is so that the source file can tell whether it is being
5597       # built for inclusion in a dll (and should export symbols for example).
5598       m4_if([$1], [GCJ], [],
5599         [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5600       ;;
5601
5602     hpux9* | hpux10* | hpux11*)
5603       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5604       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5605       # not for PA HP-UX.
5606       case $host_cpu in
5607       hppa*64*|ia64*)
5608         # +Z the default
5609         ;;
5610       *)
5611         _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5612         ;;
5613       esac
5614       # Is there a better lt_prog_compiler_static that works with the bundled CC?
5615       _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5616       ;;
5617
5618     irix5* | irix6* | nonstopux*)
5619       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5620       # PIC (with -KPIC) is the default.
5621       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5622       ;;
5623
5624     linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
5625       case $cc_basename in
5626       # old Intel for x86_64 which still supported -KPIC.
5627       ecc*)
5628         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5629         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5630         _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5631         ;;
5632       # icc used to be incompatible with GCC.
5633       # ICC 10 doesn't accept -KPIC any more.
5634       icc* | ifort*)
5635         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5636         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5637         _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5638         ;;
5639       # Lahey Fortran 8.1.
5640       lf95*)
5641         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5642         _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
5643         _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
5644         ;;
5645       nagfor*)
5646         # NAG Fortran compiler
5647         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
5648         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5649         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5650         ;;
5651       pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
5652         # Portland Group compilers (*not* the Pentium gcc compiler,
5653         # which looks to be a dead project)
5654         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5655         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5656         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5657         ;;
5658       ccc*)
5659         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5660         # All Alpha code is PIC.
5661         _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5662         ;;
5663       xl* | bgxl* | bgf* | mpixl*)
5664         # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
5665         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5666         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5667         _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5668         ;;
5669       *)
5670         case `$CC -V 2>&1 | sed 5q` in
5671         *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
5672           # Sun Fortran 8.3 passes all unrecognized flags to the linker
5673           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5674           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5675           _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
5676           ;;
5677         *Sun\ F* | *Sun*Fortran*)
5678           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5679           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5680           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5681           ;;
5682         *Sun\ C*)
5683           # Sun C 5.9
5684           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5685           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5686           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5687           ;;
5688         *Intel*\ [[CF]]*Compiler*)
5689           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5690           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5691           _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5692           ;;
5693         *Portland\ Group*)
5694           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5695           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5696           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5697           ;;
5698         esac
5699         ;;
5700       esac
5701       ;;
5702
5703     newsos6)
5704       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5705       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5706       ;;
5707
5708     *nto* | *qnx*)
5709       # QNX uses GNU C++, but need to define -shared option too, otherwise
5710       # it will coredump.
5711       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5712       ;;
5713
5714     osf3* | osf4* | osf5*)
5715       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5716       # All OSF/1 code is PIC.
5717       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5718       ;;
5719
5720     rdos*)
5721       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5722       ;;
5723
5724     solaris*)
5725       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5726       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5727       case $cc_basename in
5728       f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
5729         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5730       *)
5731         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5732       esac
5733       ;;
5734
5735     sunos4*)
5736       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5737       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5738       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5739       ;;
5740
5741     sysv4 | sysv4.2uw2* | sysv4.3*)
5742       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5743       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5744       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5745       ;;
5746
5747     sysv4*MP*)
5748       if test -d /usr/nec ;then
5749         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5750         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5751       fi
5752       ;;
5753
5754     sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5755       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5756       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5757       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5758       ;;
5759
5760     unicos*)
5761       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5762       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5763       ;;
5764
5765     uts4*)
5766       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5767       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5768       ;;
5769
5770     *)
5771       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5772       ;;
5773     esac
5774   fi
5775 ])
5776 case $host_os in
5777   # For platforms which do not support PIC, -DPIC is meaningless:
5778   *djgpp*)
5779     _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5780     ;;
5781   *)
5782     _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
5783     ;;
5784 esac
5785
5786 AC_CACHE_CHECK([for $compiler option to produce PIC],
5787   [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
5788   [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
5789 _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
5790
5791 #
5792 # Check to make sure the PIC flag actually works.
5793 #
5794 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
5795   _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
5796     [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
5797     [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
5798     [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
5799      "" | " "*) ;;
5800      *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5801      esac],
5802     [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
5803      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5804 fi
5805 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
5806         [Additional compiler flags for building library objects])
5807
5808 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
5809         [How to pass a linker flag through the compiler])
5810 #
5811 # Check to make sure the static flag actually works.
5812 #
5813 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
5814 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
5815   _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
5816   $lt_tmp_static_flag,
5817   [],
5818   [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
5819 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
5820         [Compiler flag to prevent dynamic linking])
5821 ])# _LT_COMPILER_PIC
5822
5823
5824 # _LT_LINKER_SHLIBS([TAGNAME])
5825 # ----------------------------
5826 # See if the linker supports building shared libraries.
5827 m4_defun([_LT_LINKER_SHLIBS],
5828 [AC_REQUIRE([LT_PATH_LD])dnl
5829 AC_REQUIRE([LT_PATH_NM])dnl
5830 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
5831 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5832 m4_require([_LT_DECL_EGREP])dnl
5833 m4_require([_LT_DECL_SED])dnl
5834 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
5835 m4_require([_LT_TAG_COMPILER])dnl
5836 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5837 m4_if([$1], [CXX], [
5838   _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5839   _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5840   case $host_os in
5841   aix[[4-9]]*)
5842     # If we're using GNU nm, then we don't want the "-C" option.
5843     # -C means demangle to AIX nm, but means don't demangle with GNU nm
5844     # Also, AIX nm treats weak defined symbols like other global defined
5845     # symbols, whereas GNU nm marks them as "W".
5846     if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5847       _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'
5848     else
5849       _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'
5850     fi
5851     ;;
5852   pw32*)
5853     _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5854     ;;
5855   cygwin* | mingw* | cegcc*)
5856     case $cc_basename in
5857     cl*)
5858       _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
5859       ;;
5860     *)
5861       _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'
5862       _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5863       ;;
5864     esac
5865     ;;
5866   linux* | k*bsd*-gnu | gnu*)
5867     _LT_TAGVAR(link_all_deplibs, $1)=no
5868     ;;
5869   *)
5870     _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5871     ;;
5872   esac
5873 ], [
5874   runpath_var=
5875   _LT_TAGVAR(allow_undefined_flag, $1)=
5876   _LT_TAGVAR(always_export_symbols, $1)=no
5877   _LT_TAGVAR(archive_cmds, $1)=
5878   _LT_TAGVAR(archive_expsym_cmds, $1)=
5879   _LT_TAGVAR(compiler_needs_object, $1)=no
5880   _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5881   _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5882   _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5883   _LT_TAGVAR(hardcode_automatic, $1)=no
5884   _LT_TAGVAR(hardcode_direct, $1)=no
5885   _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5886   _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5887   _LT_TAGVAR(hardcode_libdir_separator, $1)=
5888   _LT_TAGVAR(hardcode_minus_L, $1)=no
5889   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5890   _LT_TAGVAR(inherit_rpath, $1)=no
5891   _LT_TAGVAR(link_all_deplibs, $1)=unknown
5892   _LT_TAGVAR(module_cmds, $1)=
5893   _LT_TAGVAR(module_expsym_cmds, $1)=
5894   _LT_TAGVAR(old_archive_from_new_cmds, $1)=
5895   _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5896   _LT_TAGVAR(thread_safe_flag_spec, $1)=
5897   _LT_TAGVAR(whole_archive_flag_spec, $1)=
5898   # include_expsyms should be a list of space-separated symbols to be *always*
5899   # included in the symbol list
5900   _LT_TAGVAR(include_expsyms, $1)=
5901   # exclude_expsyms can be an extended regexp of symbols to exclude
5902   # it will be wrapped by ` (' and `)$', so one must not match beginning or
5903   # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5904   # as well as any symbol that contains `d'.
5905   _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5906   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5907   # platforms (ab)use it in PIC code, but their linkers get confused if
5908   # the symbol is explicitly referenced.  Since portable code cannot
5909   # rely on this symbol name, it's probably fine to never include it in
5910   # preloaded symbol tables.
5911   # Exclude shared library initialization/finalization symbols.
5912 dnl Note also adjust exclude_expsyms for C++ above.
5913   extract_expsyms_cmds=
5914
5915   case $host_os in
5916   cygwin* | mingw* | pw32* | cegcc*)
5917     # FIXME: the MSVC++ port hasn't been tested in a loooong time
5918     # When not using gcc, we currently assume that we are using
5919     # Microsoft Visual C++.
5920     if test "$GCC" != yes; then
5921       with_gnu_ld=no
5922     fi
5923     ;;
5924   interix*)
5925     # we just hope/assume this is gcc and not c89 (= MSVC++)
5926     with_gnu_ld=yes
5927     ;;
5928   openbsd*)
5929     with_gnu_ld=no
5930     ;;
5931   linux* | k*bsd*-gnu | gnu*)
5932     _LT_TAGVAR(link_all_deplibs, $1)=no
5933     ;;
5934   esac
5935
5936   _LT_TAGVAR(ld_shlibs, $1)=yes
5937
5938   # On some targets, GNU ld is compatible enough with the native linker
5939   # that we're better off using the native interface for both.
5940   lt_use_gnu_ld_interface=no
5941   if test "$with_gnu_ld" = yes; then
5942     case $host_os in
5943       aix*)
5944         # The AIX port of GNU ld has always aspired to compatibility
5945         # with the native linker.  However, as the warning in the GNU ld
5946         # block says, versions before 2.19.5* couldn't really create working
5947         # shared libraries, regardless of the interface used.
5948         case `$LD -v 2>&1` in
5949           *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
5950           *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
5951           *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
5952           *)
5953             lt_use_gnu_ld_interface=yes
5954             ;;
5955         esac
5956         ;;
5957       *)
5958         lt_use_gnu_ld_interface=yes
5959         ;;
5960     esac
5961   fi
5962
5963   if test "$lt_use_gnu_ld_interface" = yes; then
5964     # If archive_cmds runs LD, not CC, wlarc should be empty
5965     wlarc='${wl}'
5966
5967     # Set some defaults for GNU ld with shared library support. These
5968     # are reset later if shared libraries are not supported. Putting them
5969     # here allows them to be overridden if necessary.
5970     runpath_var=LD_RUN_PATH
5971     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5972     _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5973     # ancient GNU ld didn't support --whole-archive et. al.
5974     if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
5975       _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5976     else
5977       _LT_TAGVAR(whole_archive_flag_spec, $1)=
5978     fi
5979     supports_anon_versioning=no
5980     case `$LD -v 2>&1` in
5981       *GNU\ gold*) supports_anon_versioning=yes ;;
5982       *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5983       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5984       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5985       *\ 2.11.*) ;; # other 2.11 versions
5986       *) supports_anon_versioning=yes ;;
5987     esac
5988
5989     # See if GNU ld supports shared libraries.
5990     case $host_os in
5991     aix[[3-9]]*)
5992       # On AIX/PPC, the GNU linker is very broken
5993       if test "$host_cpu" != ia64; then
5994         _LT_TAGVAR(ld_shlibs, $1)=no
5995         cat <<_LT_EOF 1>&2
5996
5997 *** Warning: the GNU linker, at least up to release 2.19, is reported
5998 *** to be unable to reliably create shared libraries on AIX.
5999 *** Therefore, libtool is disabling shared libraries support.  If you
6000 *** really care for shared libraries, you may want to install binutils
6001 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
6002 *** You will then need to restart the configuration process.
6003
6004 _LT_EOF
6005       fi
6006       ;;
6007
6008     amigaos*)
6009       case $host_cpu in
6010       powerpc)
6011             # see comment about AmigaOS4 .so support
6012             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6013             _LT_TAGVAR(archive_expsym_cmds, $1)=''
6014         ;;
6015       m68k)
6016             _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)'
6017             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6018             _LT_TAGVAR(hardcode_minus_L, $1)=yes
6019         ;;
6020       esac
6021       ;;
6022
6023     beos*)
6024       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6025         _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6026         # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6027         # support --undefined.  This deserves some investigation.  FIXME
6028         _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6029       else
6030         _LT_TAGVAR(ld_shlibs, $1)=no
6031       fi
6032       ;;
6033
6034     cygwin* | mingw* | pw32* | cegcc*)
6035       # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6036       # as there is no search path for DLLs.
6037       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6038       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
6039       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6040       _LT_TAGVAR(always_export_symbols, $1)=no
6041       _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6042       _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'
6043       _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
6044
6045       if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6046         _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'
6047         # If the export-symbols file already is a .def file (1st line
6048         # is EXPORTS), use it as is; otherwise, prepend...
6049         _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6050           cp $export_symbols $output_objdir/$soname.def;
6051         else
6052           echo EXPORTS > $output_objdir/$soname.def;
6053           cat $export_symbols >> $output_objdir/$soname.def;
6054         fi~
6055         $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6056       else
6057         _LT_TAGVAR(ld_shlibs, $1)=no
6058       fi
6059       ;;
6060
6061     haiku*)
6062       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6063       _LT_TAGVAR(link_all_deplibs, $1)=yes
6064       ;;
6065
6066     interix[[3-9]]*)
6067       _LT_TAGVAR(hardcode_direct, $1)=no
6068       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6069       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6070       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6071       # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6072       # Instead, shared libraries are loaded at an image base (0x10000000 by
6073       # default) and relocated if they conflict, which is a slow very memory
6074       # consuming and fragmenting process.  To avoid this, we pick a random,
6075       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6076       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
6077       _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'
6078       _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'
6079       ;;
6080
6081     gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
6082       tmp_diet=no
6083       if test "$host_os" = linux-dietlibc; then
6084         case $cc_basename in
6085           diet\ *) tmp_diet=yes;;       # linux-dietlibc with static linking (!diet-dyn)
6086         esac
6087       fi
6088       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
6089          && test "$tmp_diet" = no
6090       then
6091         tmp_addflag=' $pic_flag'
6092         tmp_sharedflag='-shared'
6093         case $cc_basename,$host_cpu in
6094         pgcc*)                          # Portland Group C compiler
6095           _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'
6096           tmp_addflag=' $pic_flag'
6097           ;;
6098         pgf77* | pgf90* | pgf95* | pgfortran*)
6099                                         # Portland Group f77 and f90 compilers
6100           _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'
6101           tmp_addflag=' $pic_flag -Mnomain' ;;
6102         ecc*,ia64* | icc*,ia64*)        # Intel C compiler on ia64
6103           tmp_addflag=' -i_dynamic' ;;
6104         efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
6105           tmp_addflag=' -i_dynamic -nofor_main' ;;
6106         ifc* | ifort*)                  # Intel Fortran compiler
6107           tmp_addflag=' -nofor_main' ;;
6108         lf95*)                          # Lahey Fortran 8.1
6109           _LT_TAGVAR(whole_archive_flag_spec, $1)=
6110           tmp_sharedflag='--shared' ;;
6111         xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
6112           tmp_sharedflag='-qmkshrobj'
6113           tmp_addflag= ;;
6114         nvcc*)  # Cuda Compiler Driver 2.2
6115           _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'
6116           _LT_TAGVAR(compiler_needs_object, $1)=yes
6117           ;;
6118         esac
6119         case `$CC -V 2>&1 | sed 5q` in
6120         *Sun\ C*)                       # Sun C 5.9
6121           _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'
6122           _LT_TAGVAR(compiler_needs_object, $1)=yes
6123           tmp_sharedflag='-G' ;;
6124         *Sun\ F*)                       # Sun Fortran 8.3
6125           tmp_sharedflag='-G' ;;
6126         esac
6127         _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6128
6129         if test "x$supports_anon_versioning" = xyes; then
6130           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6131             cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6132             echo "local: *; };" >> $output_objdir/$libname.ver~
6133             $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6134         fi
6135
6136         case $cc_basename in
6137         xlf* | bgf* | bgxlf* | mpixlf*)
6138           # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
6139           _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
6140           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6141           _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
6142           if test "x$supports_anon_versioning" = xyes; then
6143             _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6144               cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6145               echo "local: *; };" >> $output_objdir/$libname.ver~
6146               $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
6147           fi
6148           ;;
6149         esac
6150       else
6151         _LT_TAGVAR(ld_shlibs, $1)=no
6152       fi
6153       ;;
6154
6155     netbsd* | netbsdelf*-gnu)
6156       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6157         _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
6158         wlarc=
6159       else
6160         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6161         _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'
6162       fi
6163       ;;
6164
6165     solaris*)
6166       if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
6167         _LT_TAGVAR(ld_shlibs, $1)=no
6168         cat <<_LT_EOF 1>&2
6169
6170 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
6171 *** create shared libraries on Solaris systems.  Therefore, libtool
6172 *** is disabling shared libraries support.  We urge you to upgrade GNU
6173 *** binutils to release 2.9.1 or newer.  Another option is to modify
6174 *** your PATH or compiler configuration so that the native linker is
6175 *** used, and then restart.
6176
6177 _LT_EOF
6178       elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6179         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6180         _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'
6181       else
6182         _LT_TAGVAR(ld_shlibs, $1)=no
6183       fi
6184       ;;
6185
6186     sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
6187       case `$LD -v 2>&1` in
6188         *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
6189         _LT_TAGVAR(ld_shlibs, $1)=no
6190         cat <<_LT_EOF 1>&2
6191
6192 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
6193 *** reliably create shared libraries on SCO systems.  Therefore, libtool
6194 *** is disabling shared libraries support.  We urge you to upgrade GNU
6195 *** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
6196 *** your PATH or compiler configuration so that the native linker is
6197 *** used, and then restart.
6198
6199 _LT_EOF
6200         ;;
6201         *)
6202           # For security reasons, it is highly recommended that you always
6203           # use absolute paths for naming shared libraries, and exclude the
6204           # DT_RUNPATH tag from executables and libraries.  But doing so
6205           # requires that you compile everything twice, which is a pain.
6206           if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6207             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6208             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6209             _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'
6210           else
6211             _LT_TAGVAR(ld_shlibs, $1)=no
6212           fi
6213         ;;
6214       esac
6215       ;;
6216
6217     sunos4*)
6218       _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6219       wlarc=
6220       _LT_TAGVAR(hardcode_direct, $1)=yes
6221       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6222       ;;
6223
6224     *)
6225       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6226         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6227         _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'
6228       else
6229         _LT_TAGVAR(ld_shlibs, $1)=no
6230       fi
6231       ;;
6232     esac
6233
6234     if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
6235       runpath_var=
6236       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6237       _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6238       _LT_TAGVAR(whole_archive_flag_spec, $1)=
6239     fi
6240   else
6241     # PORTME fill in a description of your system's linker (not GNU ld)
6242     case $host_os in
6243     aix3*)
6244       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6245       _LT_TAGVAR(always_export_symbols, $1)=yes
6246       _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'
6247       # Note: this linker hardcodes the directories in LIBPATH if there
6248       # are no directories specified by -L.
6249       _LT_TAGVAR(hardcode_minus_L, $1)=yes
6250       if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
6251         # Neither direct hardcoding nor static linking is supported with a
6252         # broken collect2.
6253         _LT_TAGVAR(hardcode_direct, $1)=unsupported
6254       fi
6255       ;;
6256
6257     aix[[4-9]]*)
6258       if test "$host_cpu" = ia64; then
6259         # On IA64, the linker does run time linking by default, so we don't
6260         # have to do anything special.
6261         aix_use_runtimelinking=no
6262         exp_sym_flag='-Bexport'
6263         no_entry_flag=""
6264       else
6265         # If we're using GNU nm, then we don't want the "-C" option.
6266         # -C means demangle to AIX nm, but means don't demangle with GNU nm
6267         # Also, AIX nm treats weak defined symbols like other global
6268         # defined symbols, whereas GNU nm marks them as "W".
6269         if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
6270           _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'
6271         else
6272           _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'
6273         fi
6274         aix_use_runtimelinking=no
6275
6276         # Test if we are trying to use run time linking or normal
6277         # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6278         # need to do runtime linking.
6279         case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6280           for ld_flag in $LDFLAGS; do
6281           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
6282             aix_use_runtimelinking=yes
6283             break
6284           fi
6285           done
6286           ;;
6287         esac
6288
6289         exp_sym_flag='-bexport'
6290         no_entry_flag='-bnoentry'
6291       fi
6292
6293       # When large executables or shared objects are built, AIX ld can
6294       # have problems creating the table of contents.  If linking a library
6295       # or program results in "error TOC overflow" add -mminimal-toc to
6296       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
6297       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6298
6299       _LT_TAGVAR(archive_cmds, $1)=''
6300       _LT_TAGVAR(hardcode_direct, $1)=yes
6301       _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6302       _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6303       _LT_TAGVAR(link_all_deplibs, $1)=yes
6304       _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6305
6306       if test "$GCC" = yes; then
6307         case $host_os in aix4.[[012]]|aix4.[[012]].*)
6308         # We only want to do this on AIX 4.2 and lower, the check
6309         # below for broken collect2 doesn't work under 4.3+
6310           collect2name=`${CC} -print-prog-name=collect2`
6311           if test -f "$collect2name" &&
6312            strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6313           then
6314           # We have reworked collect2
6315           :
6316           else
6317           # We have old collect2
6318           _LT_TAGVAR(hardcode_direct, $1)=unsupported
6319           # It fails to find uninstalled libraries when the uninstalled
6320           # path is not listed in the libpath.  Setting hardcode_minus_L
6321           # to unsupported forces relinking
6322           _LT_TAGVAR(hardcode_minus_L, $1)=yes
6323           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6324           _LT_TAGVAR(hardcode_libdir_separator, $1)=
6325           fi
6326           ;;
6327         esac
6328         shared_flag='-shared'
6329         if test "$aix_use_runtimelinking" = yes; then
6330           shared_flag="$shared_flag "'${wl}-G'
6331         fi
6332         _LT_TAGVAR(link_all_deplibs, $1)=no
6333       else
6334         # not using gcc
6335         if test "$host_cpu" = ia64; then
6336         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6337         # chokes on -Wl,-G. The following line is correct:
6338           shared_flag='-G'
6339         else
6340           if test "$aix_use_runtimelinking" = yes; then
6341             shared_flag='${wl}-G'
6342           else
6343             shared_flag='${wl}-bM:SRE'
6344           fi
6345         fi
6346       fi
6347
6348       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6349       # It seems that -bexpall does not export symbols beginning with
6350       # underscore (_), so it is better to generate a list of symbols to export.
6351       _LT_TAGVAR(always_export_symbols, $1)=yes
6352       if test "$aix_use_runtimelinking" = yes; then
6353         # Warning - without using the other runtime loading flags (-brtl),
6354         # -berok will link without error, but may produce a broken library.
6355         _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6356         # Determine the default libpath from the value encoded in an
6357         # empty executable.
6358         _LT_SYS_MODULE_PATH_AIX([$1])
6359         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6360         _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"
6361       else
6362         if test "$host_cpu" = ia64; then
6363           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6364           _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6365           _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"
6366         else
6367          # Determine the default libpath from the value encoded in an
6368          # empty executable.
6369          _LT_SYS_MODULE_PATH_AIX([$1])
6370          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6371           # Warning - without using the other run time loading flags,
6372           # -berok will link without error, but may produce a broken library.
6373           _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6374           _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6375           if test "$with_gnu_ld" = yes; then
6376             # We only use this code for GNU lds that support --whole-archive.
6377             _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6378           else
6379             # Exported symbols can be pulled into shared objects from archives
6380             _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6381           fi
6382           _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6383           # This is similar to how AIX traditionally builds its shared libraries.
6384           _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'
6385         fi
6386       fi
6387       ;;
6388
6389     amigaos*)
6390       case $host_cpu in
6391       powerpc)
6392             # see comment about AmigaOS4 .so support
6393             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6394             _LT_TAGVAR(archive_expsym_cmds, $1)=''
6395         ;;
6396       m68k)
6397             _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)'
6398             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6399             _LT_TAGVAR(hardcode_minus_L, $1)=yes
6400         ;;
6401       esac
6402       ;;
6403
6404     bsdi[[45]]*)
6405       _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6406       ;;
6407
6408     cygwin* | mingw* | pw32* | cegcc*)
6409       # When not using gcc, we currently assume that we are using
6410       # Microsoft Visual C++.
6411       # hardcode_libdir_flag_spec is actually meaningless, as there is
6412       # no search path for DLLs.
6413       case $cc_basename in
6414       cl*)
6415         # Native MSVC
6416         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6417         _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6418         _LT_TAGVAR(always_export_symbols, $1)=yes
6419         _LT_TAGVAR(file_list_spec, $1)='@'
6420         # Tell ltmain to make .lib files, not .a files.
6421         libext=lib
6422         # Tell ltmain to make .dll files, not .so files.
6423         shrext_cmds=".dll"
6424         # FIXME: Setting linknames here is a bad hack.
6425         _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
6426         _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6427             sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
6428           else
6429             sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
6430           fi~
6431           $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6432           linknames='
6433         # The linker will not automatically build a static lib if we build a DLL.
6434         # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6435         _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6436         _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
6437         _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'
6438         # Don't use ranlib
6439         _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6440         _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6441           lt_tool_outputfile="@TOOL_OUTPUT@"~
6442           case $lt_outputfile in
6443             *.exe|*.EXE) ;;
6444             *)
6445               lt_outputfile="$lt_outputfile.exe"
6446               lt_tool_outputfile="$lt_tool_outputfile.exe"
6447               ;;
6448           esac~
6449           if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
6450             $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6451             $RM "$lt_outputfile.manifest";
6452           fi'
6453         ;;
6454       *)
6455         # Assume MSVC wrapper
6456         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6457         _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6458         # Tell ltmain to make .lib files, not .a files.
6459         libext=lib
6460         # Tell ltmain to make .dll files, not .so files.
6461         shrext_cmds=".dll"
6462         # FIXME: Setting linknames here is a bad hack.
6463         _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
6464         # The linker will automatically build a .lib file if we build a DLL.
6465         _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6466         # FIXME: Should let the user specify the lib program.
6467         _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
6468         _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6469         ;;
6470       esac
6471       ;;
6472
6473     darwin* | rhapsody*)
6474       _LT_DARWIN_LINKER_FEATURES($1)
6475       ;;
6476
6477     dgux*)
6478       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6479       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6480       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6481       ;;
6482
6483     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6484     # support.  Future versions do this automatically, but an explicit c++rt0.o
6485     # does not break anything, and helps significantly (at the cost of a little
6486     # extra space).
6487     freebsd2.2*)
6488       _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6489       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6490       _LT_TAGVAR(hardcode_direct, $1)=yes
6491       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6492       ;;
6493
6494     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6495     freebsd2.*)
6496       _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6497       _LT_TAGVAR(hardcode_direct, $1)=yes
6498       _LT_TAGVAR(hardcode_minus_L, $1)=yes
6499       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6500       ;;
6501
6502     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6503     freebsd* | dragonfly*)
6504       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6505       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6506       _LT_TAGVAR(hardcode_direct, $1)=yes
6507       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6508       ;;
6509
6510     hpux9*)
6511       if test "$GCC" = yes; then
6512         _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'
6513       else
6514         _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'
6515       fi
6516       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6517       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6518       _LT_TAGVAR(hardcode_direct, $1)=yes
6519
6520       # hardcode_minus_L: Not really in the search PATH,
6521       # but as the default location of the library.
6522       _LT_TAGVAR(hardcode_minus_L, $1)=yes
6523       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6524       ;;
6525
6526     hpux10*)
6527       if test "$GCC" = yes && test "$with_gnu_ld" = no; then
6528         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6529       else
6530         _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6531       fi
6532       if test "$with_gnu_ld" = no; then
6533         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6534         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6535         _LT_TAGVAR(hardcode_direct, $1)=yes
6536         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6537         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6538         # hardcode_minus_L: Not really in the search PATH,
6539         # but as the default location of the library.
6540         _LT_TAGVAR(hardcode_minus_L, $1)=yes
6541       fi
6542       ;;
6543
6544     hpux11*)
6545       if test "$GCC" = yes && test "$with_gnu_ld" = no; then
6546         case $host_cpu in
6547         hppa*64*)
6548           _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6549           ;;
6550         ia64*)
6551           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6552           ;;
6553         *)
6554           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6555           ;;
6556         esac
6557       else
6558         case $host_cpu in
6559         hppa*64*)
6560           _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6561           ;;
6562         ia64*)
6563           _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6564           ;;
6565         *)
6566         m4_if($1, [], [
6567           # Older versions of the 11.00 compiler do not understand -b yet
6568           # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
6569           _LT_LINKER_OPTION([if $CC understands -b],
6570             _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
6571             [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
6572             [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
6573           [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
6574           ;;
6575         esac
6576       fi
6577       if test "$with_gnu_ld" = no; then
6578         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6579         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6580
6581         case $host_cpu in
6582         hppa*64*|ia64*)
6583           _LT_TAGVAR(hardcode_direct, $1)=no
6584           _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6585           ;;
6586         *)
6587           _LT_TAGVAR(hardcode_direct, $1)=yes
6588           _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6589           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6590
6591           # hardcode_minus_L: Not really in the search PATH,
6592           # but as the default location of the library.
6593           _LT_TAGVAR(hardcode_minus_L, $1)=yes
6594           ;;
6595         esac
6596       fi
6597       ;;
6598
6599     irix5* | irix6* | nonstopux*)
6600       if test "$GCC" = yes; then
6601         _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'
6602         # Try to use the -exported_symbol ld option, if it does not
6603         # work, assume that -exports_file does not work either and
6604         # implicitly export all symbols.
6605         # This should be the same for all languages, so no per-tag cache variable.
6606         AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
6607           [lt_cv_irix_exported_symbol],
6608           [save_LDFLAGS="$LDFLAGS"
6609            LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
6610            AC_LINK_IFELSE(
6611              [AC_LANG_SOURCE(
6612                 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
6613                               [C++], [[int foo (void) { return 0; }]],
6614                               [Fortran 77], [[
6615       subroutine foo
6616       end]],
6617                               [Fortran], [[
6618       subroutine foo
6619       end]])])],
6620               [lt_cv_irix_exported_symbol=yes],
6621               [lt_cv_irix_exported_symbol=no])
6622            LDFLAGS="$save_LDFLAGS"])
6623         if test "$lt_cv_irix_exported_symbol" = yes; then
6624           _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'
6625         fi
6626       else
6627         _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'
6628         _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'
6629       fi
6630       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6631       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6632       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6633       _LT_TAGVAR(inherit_rpath, $1)=yes
6634       _LT_TAGVAR(link_all_deplibs, $1)=yes
6635       ;;
6636
6637     netbsd* | netbsdelf*-gnu)
6638       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6639         _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
6640       else
6641         _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
6642       fi
6643       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6644       _LT_TAGVAR(hardcode_direct, $1)=yes
6645       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6646       ;;
6647
6648     newsos6)
6649       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6650       _LT_TAGVAR(hardcode_direct, $1)=yes
6651       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6652       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6653       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6654       ;;
6655
6656     *nto* | *qnx*)
6657       ;;
6658
6659     openbsd*)
6660       if test -f /usr/libexec/ld.so; then
6661         _LT_TAGVAR(hardcode_direct, $1)=yes
6662         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6663         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6664         if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6665           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6666           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6667           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6668           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6669         else
6670           case $host_os in
6671            openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6672              _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6673              _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6674              ;;
6675            *)
6676              _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6677              _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6678              ;;
6679           esac
6680         fi
6681       else
6682         _LT_TAGVAR(ld_shlibs, $1)=no
6683       fi
6684       ;;
6685
6686     os2*)
6687       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6688       _LT_TAGVAR(hardcode_minus_L, $1)=yes
6689       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6690       _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'
6691       _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6692       ;;
6693
6694     osf3*)
6695       if test "$GCC" = yes; then
6696         _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6697         _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'
6698       else
6699         _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6700         _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'
6701       fi
6702       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6703       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6704       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6705       ;;
6706
6707     osf4* | osf5*)      # as osf3* with the addition of -msym flag
6708       if test "$GCC" = yes; then
6709         _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6710         _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'
6711         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6712       else
6713         _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6714         _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'
6715         _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~
6716         $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'
6717
6718         # Both c and cxx compiler support -rpath directly
6719         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6720       fi
6721       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6722       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6723       ;;
6724
6725     solaris*)
6726       _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
6727       if test "$GCC" = yes; then
6728         wlarc='${wl}'
6729         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6730         _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6731           $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'
6732       else
6733         case `$CC -V 2>&1` in
6734         *"Compilers 5.0"*)
6735           wlarc=''
6736           _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6737           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6738           $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
6739           ;;
6740         *)
6741           wlarc='${wl}'
6742           _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
6743           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6744           $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
6745           ;;
6746         esac
6747       fi
6748       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6749       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6750       case $host_os in
6751       solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6752       *)
6753         # The compiler driver will combine and reorder linker options,
6754         # but understands `-z linker_flag'.  GCC discards it without `$wl',
6755         # but is careful enough not to reorder.
6756         # Supported since Solaris 2.6 (maybe 2.5.1?)
6757         if test "$GCC" = yes; then
6758           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6759         else
6760           _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6761         fi
6762         ;;
6763       esac
6764       _LT_TAGVAR(link_all_deplibs, $1)=yes
6765       ;;
6766
6767     sunos4*)
6768       if test "x$host_vendor" = xsequent; then
6769         # Use $CC to link under sequent, because it throws in some extra .o
6770         # files that make .init and .fini sections work.
6771         _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6772       else
6773         _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6774       fi
6775       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6776       _LT_TAGVAR(hardcode_direct, $1)=yes
6777       _LT_TAGVAR(hardcode_minus_L, $1)=yes
6778       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6779       ;;
6780
6781     sysv4)
6782       case $host_vendor in
6783         sni)
6784           _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6785           _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6786         ;;
6787         siemens)
6788           ## LD is ld it makes a PLAMLIB
6789           ## CC just makes a GrossModule.
6790           _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6791           _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6792           _LT_TAGVAR(hardcode_direct, $1)=no
6793         ;;
6794         motorola)
6795           _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6796           _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6797         ;;
6798       esac
6799       runpath_var='LD_RUN_PATH'
6800       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6801       ;;
6802
6803     sysv4.3*)
6804       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6805       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6806       _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6807       ;;
6808
6809     sysv4*MP*)
6810       if test -d /usr/nec; then
6811         _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6812         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6813         runpath_var=LD_RUN_PATH
6814         hardcode_runpath_var=yes
6815         _LT_TAGVAR(ld_shlibs, $1)=yes
6816       fi
6817       ;;
6818
6819     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6820       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6821       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6822       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6823       runpath_var='LD_RUN_PATH'
6824
6825       if test "$GCC" = yes; then
6826         _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6827         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6828       else
6829         _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6830         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6831       fi
6832       ;;
6833
6834     sysv5* | sco3.2v5* | sco5v6*)
6835       # Note: We can NOT use -z defs as we might desire, because we do not
6836       # link with -lc, and that would cause any symbols used from libc to
6837       # always be unresolved, which means just about no library would
6838       # ever link correctly.  If we're not using GNU ld we use -z text
6839       # though, which does catch some bad symbols but isn't as heavy-handed
6840       # as -z defs.
6841       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6842       _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6843       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6844       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6845       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6846       _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6847       _LT_TAGVAR(link_all_deplibs, $1)=yes
6848       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6849       runpath_var='LD_RUN_PATH'
6850
6851       if test "$GCC" = yes; then
6852         _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6853         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6854       else
6855         _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6856         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6857       fi
6858       ;;
6859
6860     uts4*)
6861       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6862       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6863       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6864       ;;
6865
6866     *)
6867       _LT_TAGVAR(ld_shlibs, $1)=no
6868       ;;
6869     esac
6870
6871     if test x$host_vendor = xsni; then
6872       case $host in
6873       sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6874         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
6875         ;;
6876       esac
6877     fi
6878   fi
6879 ])
6880 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6881 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6882
6883 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
6884
6885 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
6886 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
6887 _LT_DECL([], [extract_expsyms_cmds], [2],
6888     [The commands to extract the exported symbol list from a shared archive])
6889
6890 #
6891 # Do we need to explicitly link libc?
6892 #
6893 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
6894 x|xyes)
6895   # Assume -lc should be added
6896   _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6897
6898   if test "$enable_shared" = yes && test "$GCC" = yes; then
6899     case $_LT_TAGVAR(archive_cmds, $1) in
6900     *'~'*)
6901       # FIXME: we may have to deal with multi-command sequences.
6902       ;;
6903     '$CC '*)
6904       # Test whether the compiler implicitly links with -lc since on some
6905       # systems, -lgcc has to come before -lc. If gcc already passes -lc
6906       # to ld, don't add -lc before -lgcc.
6907       AC_CACHE_CHECK([whether -lc should be explicitly linked in],
6908         [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
6909         [$RM conftest*
6910         echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6911
6912         if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6913           soname=conftest
6914           lib=conftest
6915           libobjs=conftest.$ac_objext
6916           deplibs=
6917           wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
6918           pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
6919           compiler_flags=-v
6920           linker_flags=-v
6921           verstring=
6922           output_objdir=.
6923           libname=conftest
6924           lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
6925           _LT_TAGVAR(allow_undefined_flag, $1)=
6926           if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
6927           then
6928             lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6929           else
6930             lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6931           fi
6932           _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6933         else
6934           cat conftest.err 1>&5
6935         fi
6936         $RM conftest*
6937         ])
6938       _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
6939       ;;
6940     esac
6941   fi
6942   ;;
6943 esac
6944
6945 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
6946     [Whether or not to add -lc for building shared libraries])
6947 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
6948     [enable_shared_with_static_runtimes], [0],
6949     [Whether or not to disallow shared libs when runtime libs are static])
6950 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
6951     [Compiler flag to allow reflexive dlopens])
6952 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
6953     [Compiler flag to generate shared objects directly from archives])
6954 _LT_TAGDECL([], [compiler_needs_object], [1],
6955     [Whether the compiler copes with passing no objects directly])
6956 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
6957     [Create an old-style archive from a shared archive])
6958 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
6959     [Create a temporary old-style archive to link instead of a shared archive])
6960 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
6961 _LT_TAGDECL([], [archive_expsym_cmds], [2])
6962 _LT_TAGDECL([], [module_cmds], [2],
6963     [Commands used to build a loadable module if different from building
6964     a shared archive.])
6965 _LT_TAGDECL([], [module_expsym_cmds], [2])
6966 _LT_TAGDECL([], [with_gnu_ld], [1],
6967     [Whether we are building with GNU ld or not])
6968 _LT_TAGDECL([], [allow_undefined_flag], [1],
6969     [Flag that allows shared libraries with undefined symbols to be built])
6970 _LT_TAGDECL([], [no_undefined_flag], [1],
6971     [Flag that enforces no undefined symbols])
6972 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
6973     [Flag to hardcode $libdir into a binary during linking.
6974     This must work even if $libdir does not exist])
6975 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
6976     [Whether we need a single "-rpath" flag with a separated argument])
6977 _LT_TAGDECL([], [hardcode_direct], [0],
6978     [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6979     DIR into the resulting binary])
6980 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
6981     [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6982     DIR into the resulting binary and the resulting library dependency is
6983     "absolute", i.e impossible to change by setting ${shlibpath_var} if the
6984     library is relocated])
6985 _LT_TAGDECL([], [hardcode_minus_L], [0],
6986     [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
6987     into the resulting binary])
6988 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
6989     [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
6990     into the resulting binary])
6991 _LT_TAGDECL([], [hardcode_automatic], [0],
6992     [Set to "yes" if building a shared library automatically hardcodes DIR
6993     into the library and all subsequent libraries and executables linked
6994     against it])
6995 _LT_TAGDECL([], [inherit_rpath], [0],
6996     [Set to yes if linker adds runtime paths of dependent libraries
6997     to runtime path list])
6998 _LT_TAGDECL([], [link_all_deplibs], [0],
6999     [Whether libtool must link a program against all its dependency libraries])
7000 _LT_TAGDECL([], [always_export_symbols], [0],
7001     [Set to "yes" if exported symbols are required])
7002 _LT_TAGDECL([], [export_symbols_cmds], [2],
7003     [The commands to list exported symbols])
7004 _LT_TAGDECL([], [exclude_expsyms], [1],
7005     [Symbols that should not be listed in the preloaded symbols])
7006 _LT_TAGDECL([], [include_expsyms], [1],
7007     [Symbols that must always be exported])
7008 _LT_TAGDECL([], [prelink_cmds], [2],
7009     [Commands necessary for linking programs (against libraries) with templates])
7010 _LT_TAGDECL([], [postlink_cmds], [2],
7011     [Commands necessary for finishing linking programs])
7012 _LT_TAGDECL([], [file_list_spec], [1],
7013     [Specify filename containing input files])
7014 dnl FIXME: Not yet implemented
7015 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
7016 dnl    [Compiler flag to generate thread safe objects])
7017 ])# _LT_LINKER_SHLIBS
7018
7019
7020 # _LT_LANG_C_CONFIG([TAG])
7021 # ------------------------
7022 # Ensure that the configuration variables for a C compiler are suitably
7023 # defined.  These variables are subsequently used by _LT_CONFIG to write
7024 # the compiler configuration to `libtool'.
7025 m4_defun([_LT_LANG_C_CONFIG],
7026 [m4_require([_LT_DECL_EGREP])dnl
7027 lt_save_CC="$CC"
7028 AC_LANG_PUSH(C)
7029
7030 # Source file extension for C test sources.
7031 ac_ext=c
7032
7033 # Object file extension for compiled C test sources.
7034 objext=o
7035 _LT_TAGVAR(objext, $1)=$objext
7036
7037 # Code to be used in simple compile tests
7038 lt_simple_compile_test_code="int some_variable = 0;"
7039
7040 # Code to be used in simple link tests
7041 lt_simple_link_test_code='int main(){return(0);}'
7042
7043 _LT_TAG_COMPILER
7044 # Save the default compiler, since it gets overwritten when the other
7045 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
7046 compiler_DEFAULT=$CC
7047
7048 # save warnings/boilerplate of simple test code
7049 _LT_COMPILER_BOILERPLATE
7050 _LT_LINKER_BOILERPLATE
7051
7052 if test -n "$compiler"; then
7053   _LT_COMPILER_NO_RTTI($1)
7054   _LT_COMPILER_PIC($1)
7055   _LT_COMPILER_C_O($1)
7056   _LT_COMPILER_FILE_LOCKS($1)
7057   _LT_LINKER_SHLIBS($1)
7058   _LT_SYS_DYNAMIC_LINKER($1)
7059   _LT_LINKER_HARDCODE_LIBPATH($1)
7060   LT_SYS_DLOPEN_SELF
7061   _LT_CMD_STRIPLIB
7062
7063   # Report which library types will actually be built
7064   AC_MSG_CHECKING([if libtool supports shared libraries])
7065   AC_MSG_RESULT([$can_build_shared])
7066
7067   AC_MSG_CHECKING([whether to build shared libraries])
7068   test "$can_build_shared" = "no" && enable_shared=no
7069
7070   # On AIX, shared libraries and static libraries use the same namespace, and
7071   # are all built from PIC.
7072   case $host_os in
7073   aix3*)
7074     test "$enable_shared" = yes && enable_static=no
7075     if test -n "$RANLIB"; then
7076       archive_cmds="$archive_cmds~\$RANLIB \$lib"
7077       postinstall_cmds='$RANLIB $lib'
7078     fi
7079     ;;
7080
7081   aix[[4-9]]*)
7082     if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7083       test "$enable_shared" = yes && enable_static=no
7084     fi
7085     ;;
7086   esac
7087   AC_MSG_RESULT([$enable_shared])
7088
7089   AC_MSG_CHECKING([whether to build static libraries])
7090   # Make sure either enable_shared or enable_static is yes.
7091   test "$enable_shared" = yes || enable_static=yes
7092   AC_MSG_RESULT([$enable_static])
7093
7094   _LT_CONFIG($1)
7095 fi
7096 AC_LANG_POP
7097 CC="$lt_save_CC"
7098 ])# _LT_LANG_C_CONFIG
7099
7100
7101 # _LT_LANG_CXX_CONFIG([TAG])
7102 # --------------------------
7103 # Ensure that the configuration variables for a C++ compiler are suitably
7104 # defined.  These variables are subsequently used by _LT_CONFIG to write
7105 # the compiler configuration to `libtool'.
7106 m4_defun([_LT_LANG_CXX_CONFIG],
7107 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7108 m4_require([_LT_DECL_EGREP])dnl
7109 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
7110 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
7111     ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
7112     (test "X$CXX" != "Xg++"))) ; then
7113   AC_PROG_CXXCPP
7114 else
7115   _lt_caught_CXX_error=yes
7116 fi
7117
7118 AC_LANG_PUSH(C++)
7119 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7120 _LT_TAGVAR(allow_undefined_flag, $1)=
7121 _LT_TAGVAR(always_export_symbols, $1)=no
7122 _LT_TAGVAR(archive_expsym_cmds, $1)=
7123 _LT_TAGVAR(compiler_needs_object, $1)=no
7124 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7125 _LT_TAGVAR(hardcode_direct, $1)=no
7126 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7127 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7128 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7129 _LT_TAGVAR(hardcode_minus_L, $1)=no
7130 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
7131 _LT_TAGVAR(hardcode_automatic, $1)=no
7132 _LT_TAGVAR(inherit_rpath, $1)=no
7133 _LT_TAGVAR(module_cmds, $1)=
7134 _LT_TAGVAR(module_expsym_cmds, $1)=
7135 _LT_TAGVAR(link_all_deplibs, $1)=unknown
7136 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7137 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7138 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7139 _LT_TAGVAR(no_undefined_flag, $1)=
7140 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7141 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7142
7143 # Source file extension for C++ test sources.
7144 ac_ext=cpp
7145
7146 # Object file extension for compiled C++ test sources.
7147 objext=o
7148 _LT_TAGVAR(objext, $1)=$objext
7149
7150 # No sense in running all these tests if we already determined that
7151 # the CXX compiler isn't working.  Some variables (like enable_shared)
7152 # are currently assumed to apply to all compilers on this platform,
7153 # and will be corrupted by setting them based on a non-working compiler.
7154 if test "$_lt_caught_CXX_error" != yes; then
7155   # Code to be used in simple compile tests
7156   lt_simple_compile_test_code="int some_variable = 0;"
7157
7158   # Code to be used in simple link tests
7159   lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
7160
7161   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7162   _LT_TAG_COMPILER
7163
7164   # save warnings/boilerplate of simple test code
7165   _LT_COMPILER_BOILERPLATE
7166   _LT_LINKER_BOILERPLATE
7167
7168   # Allow CC to be a program name with arguments.
7169   lt_save_CC=$CC
7170   lt_save_CFLAGS=$CFLAGS
7171   lt_save_LD=$LD
7172   lt_save_GCC=$GCC
7173   GCC=$GXX
7174   lt_save_with_gnu_ld=$with_gnu_ld
7175   lt_save_path_LD=$lt_cv_path_LD
7176   if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
7177     lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
7178   else
7179     $as_unset lt_cv_prog_gnu_ld
7180   fi
7181   if test -n "${lt_cv_path_LDCXX+set}"; then
7182     lt_cv_path_LD=$lt_cv_path_LDCXX
7183   else
7184     $as_unset lt_cv_path_LD
7185   fi
7186   test -z "${LDCXX+set}" || LD=$LDCXX
7187   CC=${CXX-"c++"}
7188   CFLAGS=$CXXFLAGS
7189   compiler=$CC
7190   _LT_TAGVAR(compiler, $1)=$CC
7191   _LT_CC_BASENAME([$compiler])
7192
7193   if test -n "$compiler"; then
7194     # We don't want -fno-exception when compiling C++ code, so set the
7195     # no_builtin_flag separately
7196     if test "$GXX" = yes; then
7197       _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
7198     else
7199       _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
7200     fi
7201
7202     if test "$GXX" = yes; then
7203       # Set up default GNU C++ configuration
7204
7205       LT_PATH_LD
7206
7207       # Check if GNU C++ uses GNU ld as the underlying linker, since the
7208       # archiving commands below assume that GNU ld is being used.
7209       if test "$with_gnu_ld" = yes; then
7210         _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7211         _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'
7212
7213         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7214         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7215
7216         # If archive_cmds runs LD, not CC, wlarc should be empty
7217         # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
7218         #     investigate it a little bit more. (MM)
7219         wlarc='${wl}'
7220
7221         # ancient GNU ld didn't support --whole-archive et. al.
7222         if eval "`$CC -print-prog-name=ld` --help 2>&1" |
7223           $GREP 'no-whole-archive' > /dev/null; then
7224           _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7225         else
7226           _LT_TAGVAR(whole_archive_flag_spec, $1)=
7227         fi
7228       else
7229         with_gnu_ld=no
7230         wlarc=
7231
7232         # A generic and very simple default shared library creation
7233         # command for GNU C++ for the case where it uses the native
7234         # linker, instead of GNU ld.  If possible, this setting should
7235         # overridden to take advantage of the native linker features on
7236         # the platform it is being used on.
7237         _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7238       fi
7239
7240       # Commands to make compiler produce verbose output that lists
7241       # what "hidden" libraries, object files and flags are used when
7242       # linking a shared library.
7243       output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7244
7245     else
7246       GXX=no
7247       with_gnu_ld=no
7248       wlarc=
7249     fi
7250
7251     # PORTME: fill in a description of your system's C++ link characteristics
7252     AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
7253     _LT_TAGVAR(ld_shlibs, $1)=yes
7254     case $host_os in
7255       aix3*)
7256         # FIXME: insert proper C++ library support
7257         _LT_TAGVAR(ld_shlibs, $1)=no
7258         ;;
7259       aix[[4-9]]*)
7260         if test "$host_cpu" = ia64; then
7261           # On IA64, the linker does run time linking by default, so we don't
7262           # have to do anything special.
7263           aix_use_runtimelinking=no
7264           exp_sym_flag='-Bexport'
7265           no_entry_flag=""
7266         else
7267           aix_use_runtimelinking=no
7268
7269           # Test if we are trying to use run time linking or normal
7270           # AIX style linking. If -brtl is somewhere in LDFLAGS, we
7271           # need to do runtime linking.
7272           case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
7273             for ld_flag in $LDFLAGS; do
7274               case $ld_flag in
7275               *-brtl*)
7276                 aix_use_runtimelinking=yes
7277                 break
7278                 ;;
7279               esac
7280             done
7281             ;;
7282           esac
7283
7284           exp_sym_flag='-bexport'
7285           no_entry_flag='-bnoentry'
7286         fi
7287
7288         # When large executables or shared objects are built, AIX ld can
7289         # have problems creating the table of contents.  If linking a library
7290         # or program results in "error TOC overflow" add -mminimal-toc to
7291         # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
7292         # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7293
7294         _LT_TAGVAR(archive_cmds, $1)=''
7295         _LT_TAGVAR(hardcode_direct, $1)=yes
7296         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7297         _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7298         _LT_TAGVAR(link_all_deplibs, $1)=yes
7299         _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
7300
7301         if test "$GXX" = yes; then
7302           case $host_os in aix4.[[012]]|aix4.[[012]].*)
7303           # We only want to do this on AIX 4.2 and lower, the check
7304           # below for broken collect2 doesn't work under 4.3+
7305           collect2name=`${CC} -print-prog-name=collect2`
7306           if test -f "$collect2name" &&
7307              strings "$collect2name" | $GREP resolve_lib_name >/dev/null
7308           then
7309             # We have reworked collect2
7310             :
7311           else
7312             # We have old collect2
7313             _LT_TAGVAR(hardcode_direct, $1)=unsupported
7314             # It fails to find uninstalled libraries when the uninstalled
7315             # path is not listed in the libpath.  Setting hardcode_minus_L
7316             # to unsupported forces relinking
7317             _LT_TAGVAR(hardcode_minus_L, $1)=yes
7318             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7319             _LT_TAGVAR(hardcode_libdir_separator, $1)=
7320           fi
7321           esac
7322           shared_flag='-shared'
7323           if test "$aix_use_runtimelinking" = yes; then
7324             shared_flag="$shared_flag "'${wl}-G'
7325           fi
7326         else
7327           # not using gcc
7328           if test "$host_cpu" = ia64; then
7329           # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
7330           # chokes on -Wl,-G. The following line is correct:
7331           shared_flag='-G'
7332           else
7333             if test "$aix_use_runtimelinking" = yes; then
7334               shared_flag='${wl}-G'
7335             else
7336               shared_flag='${wl}-bM:SRE'
7337             fi
7338           fi
7339         fi
7340
7341         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
7342         # It seems that -bexpall does not export symbols beginning with
7343         # underscore (_), so it is better to generate a list of symbols to
7344         # export.
7345         _LT_TAGVAR(always_export_symbols, $1)=yes
7346         if test "$aix_use_runtimelinking" = yes; then
7347           # Warning - without using the other runtime loading flags (-brtl),
7348           # -berok will link without error, but may produce a broken library.
7349           _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
7350           # Determine the default libpath from the value encoded in an empty
7351           # executable.
7352           _LT_SYS_MODULE_PATH_AIX([$1])
7353           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7354
7355           _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"
7356         else
7357           if test "$host_cpu" = ia64; then
7358             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
7359             _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
7360             _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"
7361           else
7362             # Determine the default libpath from the value encoded in an
7363             # empty executable.
7364             _LT_SYS_MODULE_PATH_AIX([$1])
7365             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7366             # Warning - without using the other run time loading flags,
7367             # -berok will link without error, but may produce a broken library.
7368             _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
7369             _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
7370             if test "$with_gnu_ld" = yes; then
7371               # We only use this code for GNU lds that support --whole-archive.
7372               _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
7373             else
7374               # Exported symbols can be pulled into shared objects from archives
7375               _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
7376             fi
7377             _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7378             # This is similar to how AIX traditionally builds its shared
7379             # libraries.
7380             _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'
7381           fi
7382         fi
7383         ;;
7384
7385       beos*)
7386         if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
7387           _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7388           # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
7389           # support --undefined.  This deserves some investigation.  FIXME
7390           _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7391         else
7392           _LT_TAGVAR(ld_shlibs, $1)=no
7393         fi
7394         ;;
7395
7396       chorus*)
7397         case $cc_basename in
7398           *)
7399           # FIXME: insert proper C++ library support
7400           _LT_TAGVAR(ld_shlibs, $1)=no
7401           ;;
7402         esac
7403         ;;
7404
7405       cygwin* | mingw* | pw32* | cegcc*)
7406         case $GXX,$cc_basename in
7407         ,cl* | no,cl*)
7408           # Native MSVC
7409           # hardcode_libdir_flag_spec is actually meaningless, as there is
7410           # no search path for DLLs.
7411           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
7412           _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7413           _LT_TAGVAR(always_export_symbols, $1)=yes
7414           _LT_TAGVAR(file_list_spec, $1)='@'
7415           # Tell ltmain to make .lib files, not .a files.
7416           libext=lib
7417           # Tell ltmain to make .dll files, not .so files.
7418           shrext_cmds=".dll"
7419           # FIXME: Setting linknames here is a bad hack.
7420           _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
7421           _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7422               $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
7423             else
7424               $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
7425             fi~
7426             $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
7427             linknames='
7428           # The linker will not automatically build a static lib if we build a DLL.
7429           # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
7430           _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7431           # Don't use ranlib
7432           _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
7433           _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
7434             lt_tool_outputfile="@TOOL_OUTPUT@"~
7435             case $lt_outputfile in
7436               *.exe|*.EXE) ;;
7437               *)
7438                 lt_outputfile="$lt_outputfile.exe"
7439                 lt_tool_outputfile="$lt_tool_outputfile.exe"
7440                 ;;
7441             esac~
7442             func_to_tool_file "$lt_outputfile"~
7443             if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
7444               $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
7445               $RM "$lt_outputfile.manifest";
7446             fi'
7447           ;;
7448         *)
7449           # g++
7450           # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
7451           # as there is no search path for DLLs.
7452           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7453           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
7454           _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7455           _LT_TAGVAR(always_export_symbols, $1)=no
7456           _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7457
7458           if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
7459             _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'
7460             # If the export-symbols file already is a .def file (1st line
7461             # is EXPORTS), use it as is; otherwise, prepend...
7462             _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7463               cp $export_symbols $output_objdir/$soname.def;
7464             else
7465               echo EXPORTS > $output_objdir/$soname.def;
7466               cat $export_symbols >> $output_objdir/$soname.def;
7467             fi~
7468             $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'
7469           else
7470             _LT_TAGVAR(ld_shlibs, $1)=no
7471           fi
7472           ;;
7473         esac
7474         ;;
7475       darwin* | rhapsody*)
7476         _LT_DARWIN_LINKER_FEATURES($1)
7477         ;;
7478
7479       dgux*)
7480         case $cc_basename in
7481           ec++*)
7482             # FIXME: insert proper C++ library support
7483             _LT_TAGVAR(ld_shlibs, $1)=no
7484             ;;
7485           ghcx*)
7486             # Green Hills C++ Compiler
7487             # FIXME: insert proper C++ library support
7488             _LT_TAGVAR(ld_shlibs, $1)=no
7489             ;;
7490           *)
7491             # FIXME: insert proper C++ library support
7492             _LT_TAGVAR(ld_shlibs, $1)=no
7493             ;;
7494         esac
7495         ;;
7496
7497       freebsd2.*)
7498         # C++ shared libraries reported to be fairly broken before
7499         # switch to ELF
7500         _LT_TAGVAR(ld_shlibs, $1)=no
7501         ;;
7502
7503       freebsd-elf*)
7504         _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7505         ;;
7506
7507       freebsd* | dragonfly*)
7508         # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
7509         # conventions
7510         _LT_TAGVAR(ld_shlibs, $1)=yes
7511         ;;
7512
7513       haiku*)
7514         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7515         _LT_TAGVAR(link_all_deplibs, $1)=yes
7516         ;;
7517
7518       hpux9*)
7519         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7520         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7521         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7522         _LT_TAGVAR(hardcode_direct, $1)=yes
7523         _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7524                                              # but as the default
7525                                              # location of the library.
7526
7527         case $cc_basename in
7528           CC*)
7529             # FIXME: insert proper C++ library support
7530             _LT_TAGVAR(ld_shlibs, $1)=no
7531             ;;
7532           aCC*)
7533             _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'
7534             # Commands to make compiler produce verbose output that lists
7535             # what "hidden" libraries, object files and flags are used when
7536             # linking a shared library.
7537             #
7538             # There doesn't appear to be a way to prevent this compiler from
7539             # explicitly linking system object files so we need to strip them
7540             # from the output so that they don't get included in the library
7541             # dependencies.
7542             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"'
7543             ;;
7544           *)
7545             if test "$GXX" = yes; then
7546               _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'
7547             else
7548               # FIXME: insert proper C++ library support
7549               _LT_TAGVAR(ld_shlibs, $1)=no
7550             fi
7551             ;;
7552         esac
7553         ;;
7554
7555       hpux10*|hpux11*)
7556         if test $with_gnu_ld = no; then
7557           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7558           _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7559
7560           case $host_cpu in
7561             hppa*64*|ia64*)
7562               ;;
7563             *)
7564               _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7565               ;;
7566           esac
7567         fi
7568         case $host_cpu in
7569           hppa*64*|ia64*)
7570             _LT_TAGVAR(hardcode_direct, $1)=no
7571             _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7572             ;;
7573           *)
7574             _LT_TAGVAR(hardcode_direct, $1)=yes
7575             _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7576             _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7577                                                  # but as the default
7578                                                  # location of the library.
7579             ;;
7580         esac
7581
7582         case $cc_basename in
7583           CC*)
7584             # FIXME: insert proper C++ library support
7585             _LT_TAGVAR(ld_shlibs, $1)=no
7586             ;;
7587           aCC*)
7588             case $host_cpu in
7589               hppa*64*)
7590                 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7591                 ;;
7592               ia64*)
7593                 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7594                 ;;
7595               *)
7596                 _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'
7597                 ;;
7598             esac
7599             # Commands to make compiler produce verbose output that lists
7600             # what "hidden" libraries, object files and flags are used when
7601             # linking a shared library.
7602             #
7603             # There doesn't appear to be a way to prevent this compiler from
7604             # explicitly linking system object files so we need to strip them
7605             # from the output so that they don't get included in the library
7606             # dependencies.
7607             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"'
7608             ;;
7609           *)
7610             if test "$GXX" = yes; then
7611               if test $with_gnu_ld = no; then
7612                 case $host_cpu in
7613                   hppa*64*)
7614                     _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7615                     ;;
7616                   ia64*)
7617                     _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'
7618                     ;;
7619                   *)
7620                     _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'
7621                     ;;
7622                 esac
7623               fi
7624             else
7625               # FIXME: insert proper C++ library support
7626               _LT_TAGVAR(ld_shlibs, $1)=no
7627             fi
7628             ;;
7629         esac
7630         ;;
7631
7632       interix[[3-9]]*)
7633         _LT_TAGVAR(hardcode_direct, $1)=no
7634         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7635         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7636         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7637         # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
7638         # Instead, shared libraries are loaded at an image base (0x10000000 by
7639         # default) and relocated if they conflict, which is a slow very memory
7640         # consuming and fragmenting process.  To avoid this, we pick a random,
7641         # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
7642         # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
7643         _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'
7644         _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'
7645         ;;
7646       irix5* | irix6*)
7647         case $cc_basename in
7648           CC*)
7649             # SGI C++
7650             _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'
7651
7652             # Archives containing C++ object files must be created using
7653             # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
7654             # necessary to make sure instantiated templates are included
7655             # in the archive.
7656             _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
7657             ;;
7658           *)
7659             if test "$GXX" = yes; then
7660               if test "$with_gnu_ld" = no; then
7661                 _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'
7662               else
7663                 _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'
7664               fi
7665             fi
7666             _LT_TAGVAR(link_all_deplibs, $1)=yes
7667             ;;
7668         esac
7669         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7670         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7671         _LT_TAGVAR(inherit_rpath, $1)=yes
7672         ;;
7673
7674       linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
7675         case $cc_basename in
7676           KCC*)
7677             # Kuck and Associates, Inc. (KAI) C++ Compiler
7678
7679             # KCC will only create a shared library if the output file
7680             # ends with ".so" (or ".sl" for HP-UX), so rename the library
7681             # to its proper name (with version) after linking.
7682             _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'
7683             _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'
7684             # Commands to make compiler produce verbose output that lists
7685             # what "hidden" libraries, object files and flags are used when
7686             # linking a shared library.
7687             #
7688             # There doesn't appear to be a way to prevent this compiler from
7689             # explicitly linking system object files so we need to strip them
7690             # from the output so that they don't get included in the library
7691             # dependencies.
7692             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"'
7693
7694             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7695             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7696
7697             # Archives containing C++ object files must be created using
7698             # "CC -Bstatic", where "CC" is the KAI C++ compiler.
7699             _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
7700             ;;
7701           icpc* | ecpc* )
7702             # Intel C++
7703             with_gnu_ld=yes
7704             # version 8.0 and above of icpc choke on multiply defined symbols
7705             # if we add $predep_objects and $postdep_objects, however 7.1 and
7706             # earlier do not add the objects themselves.
7707             case `$CC -V 2>&1` in
7708               *"Version 7."*)
7709                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7710                 _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'
7711                 ;;
7712               *)  # Version 8.0 or newer
7713                 tmp_idyn=
7714                 case $host_cpu in
7715                   ia64*) tmp_idyn=' -i_dynamic';;
7716                 esac
7717                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7718                 _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'
7719                 ;;
7720             esac
7721             _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7722             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7723             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7724             _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
7725             ;;
7726           pgCC* | pgcpp*)
7727             # Portland Group C++ compiler
7728             case `$CC -V` in
7729             *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
7730               _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
7731                 rm -rf $tpldir~
7732                 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
7733                 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
7734               _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
7735                 rm -rf $tpldir~
7736                 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
7737                 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
7738                 $RANLIB $oldlib'
7739               _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
7740                 rm -rf $tpldir~
7741                 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7742                 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7743               _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
7744                 rm -rf $tpldir~
7745                 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7746                 $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'
7747               ;;
7748             *) # Version 6 and above use weak symbols
7749               _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7750               _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'
7751               ;;
7752             esac
7753
7754             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
7755             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7756             _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'
7757             ;;
7758           cxx*)
7759             # Compaq C++
7760             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7761             _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'
7762
7763             runpath_var=LD_RUN_PATH
7764             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7765             _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7766
7767             # Commands to make compiler produce verbose output that lists
7768             # what "hidden" libraries, object files and flags are used when
7769             # linking a shared library.
7770             #
7771             # There doesn't appear to be a way to prevent this compiler from
7772             # explicitly linking system object files so we need to strip them
7773             # from the output so that they don't get included in the library
7774             # dependencies.
7775             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'
7776             ;;
7777           xl* | mpixl* | bgxl*)
7778             # IBM XL 8.0 on PPC, with GNU ld
7779             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7780             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7781             _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7782             if test "x$supports_anon_versioning" = xyes; then
7783               _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7784                 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7785                 echo "local: *; };" >> $output_objdir/$libname.ver~
7786                 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
7787             fi
7788             ;;
7789           *)
7790             case `$CC -V 2>&1 | sed 5q` in
7791             *Sun\ C*)
7792               # Sun C++ 5.9
7793               _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7794               _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7795               _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'
7796               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7797               _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'
7798               _LT_TAGVAR(compiler_needs_object, $1)=yes
7799
7800               # Not sure whether something based on
7801               # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
7802               # would be better.
7803               output_verbose_link_cmd='func_echo_all'
7804
7805               # Archives containing C++ object files must be created using
7806               # "CC -xar", where "CC" is the Sun C++ compiler.  This is
7807               # necessary to make sure instantiated templates are included
7808               # in the archive.
7809               _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7810               ;;
7811             esac
7812             ;;
7813         esac
7814         ;;
7815
7816       lynxos*)
7817         # FIXME: insert proper C++ library support
7818         _LT_TAGVAR(ld_shlibs, $1)=no
7819         ;;
7820
7821       m88k*)
7822         # FIXME: insert proper C++ library support
7823         _LT_TAGVAR(ld_shlibs, $1)=no
7824         ;;
7825
7826       mvs*)
7827         case $cc_basename in
7828           cxx*)
7829             # FIXME: insert proper C++ library support
7830             _LT_TAGVAR(ld_shlibs, $1)=no
7831             ;;
7832           *)
7833             # FIXME: insert proper C++ library support
7834             _LT_TAGVAR(ld_shlibs, $1)=no
7835             ;;
7836         esac
7837         ;;
7838
7839       netbsd*)
7840         if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7841           _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
7842           wlarc=
7843           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7844           _LT_TAGVAR(hardcode_direct, $1)=yes
7845           _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7846         fi
7847         # Workaround some broken pre-1.5 toolchains
7848         output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
7849         ;;
7850
7851       *nto* | *qnx*)
7852         _LT_TAGVAR(ld_shlibs, $1)=yes
7853         ;;
7854
7855       openbsd2*)
7856         # C++ shared libraries are fairly broken
7857         _LT_TAGVAR(ld_shlibs, $1)=no
7858         ;;
7859
7860       openbsd*)
7861         if test -f /usr/libexec/ld.so; then
7862           _LT_TAGVAR(hardcode_direct, $1)=yes
7863           _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7864           _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7865           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7866           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7867           if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7868             _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'
7869             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7870             _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7871           fi
7872           output_verbose_link_cmd=func_echo_all
7873         else
7874           _LT_TAGVAR(ld_shlibs, $1)=no
7875         fi
7876         ;;
7877
7878       osf3* | osf4* | osf5*)
7879         case $cc_basename in
7880           KCC*)
7881             # Kuck and Associates, Inc. (KAI) C++ Compiler
7882
7883             # KCC will only create a shared library if the output file
7884             # ends with ".so" (or ".sl" for HP-UX), so rename the library
7885             # to its proper name (with version) after linking.
7886             _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'
7887
7888             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7889             _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7890
7891             # Archives containing C++ object files must be created using
7892             # the KAI C++ compiler.
7893             case $host in
7894               osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
7895               *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
7896             esac
7897             ;;
7898           RCC*)
7899             # Rational C++ 2.4.1
7900             # FIXME: insert proper C++ library support
7901             _LT_TAGVAR(ld_shlibs, $1)=no
7902             ;;
7903           cxx*)
7904             case $host in
7905               osf3*)
7906                 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7907                 _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'
7908                 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7909                 ;;
7910               *)
7911                 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7912                 _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'
7913                 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
7914                   echo "-hidden">> $lib.exp~
7915                   $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~
7916                   $RM $lib.exp'
7917                 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7918                 ;;
7919             esac
7920
7921             _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7922
7923             # Commands to make compiler produce verbose output that lists
7924             # what "hidden" libraries, object files and flags are used when
7925             # linking a shared library.
7926             #
7927             # There doesn't appear to be a way to prevent this compiler from
7928             # explicitly linking system object files so we need to strip them
7929             # from the output so that they don't get included in the library
7930             # dependencies.
7931             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"'
7932             ;;
7933           *)
7934             if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7935               _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7936               case $host in
7937                 osf3*)
7938                   _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'
7939                   ;;
7940                 *)
7941                   _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'
7942                   ;;
7943               esac
7944
7945               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7946               _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7947
7948               # Commands to make compiler produce verbose output that lists
7949               # what "hidden" libraries, object files and flags are used when
7950               # linking a shared library.
7951               output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7952
7953             else
7954               # FIXME: insert proper C++ library support
7955               _LT_TAGVAR(ld_shlibs, $1)=no
7956             fi
7957             ;;
7958         esac
7959         ;;
7960
7961       psos*)
7962         # FIXME: insert proper C++ library support
7963         _LT_TAGVAR(ld_shlibs, $1)=no
7964         ;;
7965
7966       sunos4*)
7967         case $cc_basename in
7968           CC*)
7969             # Sun C++ 4.x
7970             # FIXME: insert proper C++ library support
7971             _LT_TAGVAR(ld_shlibs, $1)=no
7972             ;;
7973           lcc*)
7974             # Lucid
7975             # FIXME: insert proper C++ library support
7976             _LT_TAGVAR(ld_shlibs, $1)=no
7977             ;;
7978           *)
7979             # FIXME: insert proper C++ library support
7980             _LT_TAGVAR(ld_shlibs, $1)=no
7981             ;;
7982         esac
7983         ;;
7984
7985       solaris*)
7986         case $cc_basename in
7987           CC* | sunCC*)
7988             # Sun C++ 4.2, 5.x and Centerline C++
7989             _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
7990             _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7991             _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7992             _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7993               $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'
7994
7995             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7996             _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7997             case $host_os in
7998               solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7999               *)
8000                 # The compiler driver will combine and reorder linker options,
8001                 # but understands `-z linker_flag'.
8002                 # Supported since Solaris 2.6 (maybe 2.5.1?)
8003                 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
8004                 ;;
8005             esac
8006             _LT_TAGVAR(link_all_deplibs, $1)=yes
8007
8008             output_verbose_link_cmd='func_echo_all'
8009
8010             # Archives containing C++ object files must be created using
8011             # "CC -xar", where "CC" is the Sun C++ compiler.  This is
8012             # necessary to make sure instantiated templates are included
8013             # in the archive.
8014             _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
8015             ;;
8016           gcx*)
8017             # Green Hills C++ Compiler
8018             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
8019
8020             # The C++ compiler must be used to create the archive.
8021             _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
8022             ;;
8023           *)
8024             # GNU C++ compiler with Solaris linker
8025             if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8026               _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
8027               if $CC --version | $GREP -v '^2\.7' > /dev/null; then
8028                 _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'
8029                 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8030                   $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
8031
8032                 # Commands to make compiler produce verbose output that lists
8033                 # what "hidden" libraries, object files and flags are used when
8034                 # linking a shared library.
8035                 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
8036               else
8037                 # g++ 2.7 appears to require `-G' NOT `-shared' on this
8038                 # platform.
8039                 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
8040                 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8041                   $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
8042
8043                 # Commands to make compiler produce verbose output that lists
8044                 # what "hidden" libraries, object files and flags are used when
8045                 # linking a shared library.
8046                 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
8047               fi
8048
8049               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
8050               case $host_os in
8051                 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
8052                 *)
8053                   _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
8054                   ;;
8055               esac
8056             fi
8057             ;;
8058         esac
8059         ;;
8060
8061     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
8062       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
8063       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8064       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8065       runpath_var='LD_RUN_PATH'
8066
8067       case $cc_basename in
8068         CC*)
8069           _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8070           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8071           ;;
8072         *)
8073           _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8074           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8075           ;;
8076       esac
8077       ;;
8078
8079       sysv5* | sco3.2v5* | sco5v6*)
8080         # Note: We can NOT use -z defs as we might desire, because we do not
8081         # link with -lc, and that would cause any symbols used from libc to
8082         # always be unresolved, which means just about no library would
8083         # ever link correctly.  If we're not using GNU ld we use -z text
8084         # though, which does catch some bad symbols but isn't as heavy-handed
8085         # as -z defs.
8086         _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
8087         _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
8088         _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8089         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8090         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
8091         _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
8092         _LT_TAGVAR(link_all_deplibs, $1)=yes
8093         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
8094         runpath_var='LD_RUN_PATH'
8095
8096         case $cc_basename in
8097           CC*)
8098             _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8099             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8100             _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
8101               '"$_LT_TAGVAR(old_archive_cmds, $1)"
8102             _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
8103               '"$_LT_TAGVAR(reload_cmds, $1)"
8104             ;;
8105           *)
8106             _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8107             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8108             ;;
8109         esac
8110       ;;
8111
8112       tandem*)
8113         case $cc_basename in
8114           NCC*)
8115             # NonStop-UX NCC 3.20
8116             # FIXME: insert proper C++ library support
8117             _LT_TAGVAR(ld_shlibs, $1)=no
8118             ;;
8119           *)
8120             # FIXME: insert proper C++ library support
8121             _LT_TAGVAR(ld_shlibs, $1)=no
8122             ;;
8123         esac
8124         ;;
8125
8126       vxworks*)
8127         # FIXME: insert proper C++ library support
8128         _LT_TAGVAR(ld_shlibs, $1)=no
8129         ;;
8130
8131       *)
8132         # FIXME: insert proper C++ library support
8133         _LT_TAGVAR(ld_shlibs, $1)=no
8134         ;;
8135     esac
8136
8137     AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
8138     test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
8139
8140     _LT_TAGVAR(GCC, $1)="$GXX"
8141     _LT_TAGVAR(LD, $1)="$LD"
8142
8143     ## CAVEAT EMPTOR:
8144     ## There is no encapsulation within the following macros, do not change
8145     ## the running order or otherwise move them around unless you know exactly
8146     ## what you are doing...
8147     _LT_SYS_HIDDEN_LIBDEPS($1)
8148     _LT_COMPILER_PIC($1)
8149     _LT_COMPILER_C_O($1)
8150     _LT_COMPILER_FILE_LOCKS($1)
8151     _LT_LINKER_SHLIBS($1)
8152     _LT_SYS_DYNAMIC_LINKER($1)
8153     _LT_LINKER_HARDCODE_LIBPATH($1)
8154
8155     _LT_CONFIG($1)
8156   fi # test -n "$compiler"
8157
8158   CC=$lt_save_CC
8159   CFLAGS=$lt_save_CFLAGS
8160   LDCXX=$LD
8161   LD=$lt_save_LD
8162   GCC=$lt_save_GCC
8163   with_gnu_ld=$lt_save_with_gnu_ld
8164   lt_cv_path_LDCXX=$lt_cv_path_LD
8165   lt_cv_path_LD=$lt_save_path_LD
8166   lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
8167   lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
8168 fi # test "$_lt_caught_CXX_error" != yes
8169
8170 AC_LANG_POP
8171 ])# _LT_LANG_CXX_CONFIG
8172
8173
8174 # _LT_FUNC_STRIPNAME_CNF
8175 # ----------------------
8176 # func_stripname_cnf prefix suffix name
8177 # strip PREFIX and SUFFIX off of NAME.
8178 # PREFIX and SUFFIX must not contain globbing or regex special
8179 # characters, hashes, percent signs, but SUFFIX may contain a leading
8180 # dot (in which case that matches only a dot).
8181 #
8182 # This function is identical to the (non-XSI) version of func_stripname,
8183 # except this one can be used by m4 code that may be executed by configure,
8184 # rather than the libtool script.
8185 m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
8186 AC_REQUIRE([_LT_DECL_SED])
8187 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
8188 func_stripname_cnf ()
8189 {
8190   case ${2} in
8191   .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
8192   *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
8193   esac
8194 } # func_stripname_cnf
8195 ])# _LT_FUNC_STRIPNAME_CNF
8196
8197 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
8198 # ---------------------------------
8199 # Figure out "hidden" library dependencies from verbose
8200 # compiler output when linking a shared library.
8201 # Parse the compiler output and extract the necessary
8202 # objects, libraries and library flags.
8203 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
8204 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
8205 AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
8206 # Dependencies to place before and after the object being linked:
8207 _LT_TAGVAR(predep_objects, $1)=
8208 _LT_TAGVAR(postdep_objects, $1)=
8209 _LT_TAGVAR(predeps, $1)=
8210 _LT_TAGVAR(postdeps, $1)=
8211 _LT_TAGVAR(compiler_lib_search_path, $1)=
8212
8213 dnl we can't use the lt_simple_compile_test_code here,
8214 dnl because it contains code intended for an executable,
8215 dnl not a library.  It's possible we should let each
8216 dnl tag define a new lt_????_link_test_code variable,
8217 dnl but it's only used here...
8218 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
8219 int a;
8220 void foo (void) { a = 0; }
8221 _LT_EOF
8222 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
8223 class Foo
8224 {
8225 public:
8226   Foo (void) { a = 0; }
8227 private:
8228   int a;
8229 };
8230 _LT_EOF
8231 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
8232       subroutine foo
8233       implicit none
8234       integer*4 a
8235       a=0
8236       return
8237       end
8238 _LT_EOF
8239 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
8240       subroutine foo
8241       implicit none
8242       integer a
8243       a=0
8244       return
8245       end
8246 _LT_EOF
8247 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
8248 public class foo {
8249   private int a;
8250   public void bar (void) {
8251     a = 0;
8252   }
8253 };
8254 _LT_EOF
8255 ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
8256 package foo
8257 func foo() {
8258 }
8259 _LT_EOF
8260 ])
8261
8262 _lt_libdeps_save_CFLAGS=$CFLAGS
8263 case "$CC $CFLAGS " in #(
8264 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
8265 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
8266 *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
8267 esac
8268
8269 dnl Parse the compiler output and extract the necessary
8270 dnl objects, libraries and library flags.
8271 if AC_TRY_EVAL(ac_compile); then
8272   # Parse the compiler output and extract the necessary
8273   # objects, libraries and library flags.
8274
8275   # Sentinel used to keep track of whether or not we are before
8276   # the conftest object file.
8277   pre_test_object_deps_done=no
8278
8279   for p in `eval "$output_verbose_link_cmd"`; do
8280     case ${prev}${p} in
8281
8282     -L* | -R* | -l*)
8283        # Some compilers place space between "-{L,R}" and the path.
8284        # Remove the space.
8285        if test $p = "-L" ||
8286           test $p = "-R"; then
8287          prev=$p
8288          continue
8289        fi
8290
8291        # Expand the sysroot to ease extracting the directories later.
8292        if test -z "$prev"; then
8293          case $p in
8294          -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
8295          -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
8296          -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
8297          esac
8298        fi
8299        case $p in
8300        =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
8301        esac
8302        if test "$pre_test_object_deps_done" = no; then
8303          case ${prev} in
8304          -L | -R)
8305            # Internal compiler library paths should come after those
8306            # provided the user.  The postdeps already come after the
8307            # user supplied libs so there is no need to process them.
8308            if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
8309              _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
8310            else
8311              _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
8312            fi
8313            ;;
8314          # The "-l" case would never come before the object being
8315          # linked, so don't bother handling this case.
8316          esac
8317        else
8318          if test -z "$_LT_TAGVAR(postdeps, $1)"; then
8319            _LT_TAGVAR(postdeps, $1)="${prev}${p}"
8320          else
8321            _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
8322          fi
8323        fi
8324        prev=
8325        ;;
8326
8327     *.lto.$objext) ;; # Ignore GCC LTO objects
8328     *.$objext)
8329        # This assumes that the test object file only shows up
8330        # once in the compiler output.
8331        if test "$p" = "conftest.$objext"; then
8332          pre_test_object_deps_done=yes
8333          continue
8334        fi
8335
8336        if test "$pre_test_object_deps_done" = no; then
8337          if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
8338            _LT_TAGVAR(predep_objects, $1)="$p"
8339          else
8340            _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
8341          fi
8342        else
8343          if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
8344            _LT_TAGVAR(postdep_objects, $1)="$p"
8345          else
8346            _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
8347          fi
8348        fi
8349        ;;
8350
8351     *) ;; # Ignore the rest.
8352
8353     esac
8354   done
8355
8356   # Clean up.
8357   rm -f a.out a.exe
8358 else
8359   echo "libtool.m4: error: problem compiling $1 test program"
8360 fi
8361
8362 $RM -f confest.$objext
8363 CFLAGS=$_lt_libdeps_save_CFLAGS
8364
8365 # PORTME: override above test on systems where it is broken
8366 m4_if([$1], [CXX],
8367 [case $host_os in
8368 interix[[3-9]]*)
8369   # Interix 3.5 installs completely hosed .la files for C++, so rather than
8370   # hack all around it, let's just trust "g++" to DTRT.
8371   _LT_TAGVAR(predep_objects,$1)=
8372   _LT_TAGVAR(postdep_objects,$1)=
8373   _LT_TAGVAR(postdeps,$1)=
8374   ;;
8375
8376 linux*)
8377   case `$CC -V 2>&1 | sed 5q` in
8378   *Sun\ C*)
8379     # Sun C++ 5.9
8380
8381     # The more standards-conforming stlport4 library is
8382     # incompatible with the Cstd library. Avoid specifying
8383     # it if it's in CXXFLAGS. Ignore libCrun as
8384     # -library=stlport4 depends on it.
8385     case " $CXX $CXXFLAGS " in
8386     *" -library=stlport4 "*)
8387       solaris_use_stlport4=yes
8388       ;;
8389     esac
8390
8391     if test "$solaris_use_stlport4" != yes; then
8392       _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8393     fi
8394     ;;
8395   esac
8396   ;;
8397
8398 solaris*)
8399   case $cc_basename in
8400   CC* | sunCC*)
8401     # The more standards-conforming stlport4 library is
8402     # incompatible with the Cstd library. Avoid specifying
8403     # it if it's in CXXFLAGS. Ignore libCrun as
8404     # -library=stlport4 depends on it.
8405     case " $CXX $CXXFLAGS " in
8406     *" -library=stlport4 "*)
8407       solaris_use_stlport4=yes
8408       ;;
8409     esac
8410
8411     # Adding this requires a known-good setup of shared libraries for
8412     # Sun compiler versions before 5.6, else PIC objects from an old
8413     # archive will be linked into the output, leading to subtle bugs.
8414     if test "$solaris_use_stlport4" != yes; then
8415       _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8416     fi
8417     ;;
8418   esac
8419   ;;
8420 esac
8421 ])
8422
8423 case " $_LT_TAGVAR(postdeps, $1) " in
8424 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
8425 esac
8426  _LT_TAGVAR(compiler_lib_search_dirs, $1)=
8427 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
8428  _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
8429 fi
8430 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
8431     [The directories searched by this compiler when creating a shared library])
8432 _LT_TAGDECL([], [predep_objects], [1],
8433     [Dependencies to place before and after the objects being linked to
8434     create a shared library])
8435 _LT_TAGDECL([], [postdep_objects], [1])
8436 _LT_TAGDECL([], [predeps], [1])
8437 _LT_TAGDECL([], [postdeps], [1])
8438 _LT_TAGDECL([], [compiler_lib_search_path], [1],
8439     [The library search path used internally by the compiler when linking
8440     a shared library])
8441 ])# _LT_SYS_HIDDEN_LIBDEPS
8442
8443
8444 # _LT_LANG_F77_CONFIG([TAG])
8445 # --------------------------
8446 # Ensure that the configuration variables for a Fortran 77 compiler are
8447 # suitably defined.  These variables are subsequently used by _LT_CONFIG
8448 # to write the compiler configuration to `libtool'.
8449 m4_defun([_LT_LANG_F77_CONFIG],
8450 [AC_LANG_PUSH(Fortran 77)
8451 if test -z "$F77" || test "X$F77" = "Xno"; then
8452   _lt_disable_F77=yes
8453 fi
8454
8455 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8456 _LT_TAGVAR(allow_undefined_flag, $1)=
8457 _LT_TAGVAR(always_export_symbols, $1)=no
8458 _LT_TAGVAR(archive_expsym_cmds, $1)=
8459 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
8460 _LT_TAGVAR(hardcode_direct, $1)=no
8461 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
8462 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8463 _LT_TAGVAR(hardcode_libdir_separator, $1)=
8464 _LT_TAGVAR(hardcode_minus_L, $1)=no
8465 _LT_TAGVAR(hardcode_automatic, $1)=no
8466 _LT_TAGVAR(inherit_rpath, $1)=no
8467 _LT_TAGVAR(module_cmds, $1)=
8468 _LT_TAGVAR(module_expsym_cmds, $1)=
8469 _LT_TAGVAR(link_all_deplibs, $1)=unknown
8470 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8471 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8472 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8473 _LT_TAGVAR(no_undefined_flag, $1)=
8474 _LT_TAGVAR(whole_archive_flag_spec, $1)=
8475 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8476
8477 # Source file extension for f77 test sources.
8478 ac_ext=f
8479
8480 # Object file extension for compiled f77 test sources.
8481 objext=o
8482 _LT_TAGVAR(objext, $1)=$objext
8483
8484 # No sense in running all these tests if we already determined that
8485 # the F77 compiler isn't working.  Some variables (like enable_shared)
8486 # are currently assumed to apply to all compilers on this platform,
8487 # and will be corrupted by setting them based on a non-working compiler.
8488 if test "$_lt_disable_F77" != yes; then
8489   # Code to be used in simple compile tests
8490   lt_simple_compile_test_code="\
8491       subroutine t
8492       return
8493       end
8494 "
8495
8496   # Code to be used in simple link tests
8497   lt_simple_link_test_code="\
8498       program t
8499       end
8500 "
8501
8502   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8503   _LT_TAG_COMPILER
8504
8505   # save warnings/boilerplate of simple test code
8506   _LT_COMPILER_BOILERPLATE
8507   _LT_LINKER_BOILERPLATE
8508
8509   # Allow CC to be a program name with arguments.
8510   lt_save_CC="$CC"
8511   lt_save_GCC=$GCC
8512   lt_save_CFLAGS=$CFLAGS
8513   CC=${F77-"f77"}
8514   CFLAGS=$FFLAGS
8515   compiler=$CC
8516   _LT_TAGVAR(compiler, $1)=$CC
8517   _LT_CC_BASENAME([$compiler])
8518   GCC=$G77
8519   if test -n "$compiler"; then
8520     AC_MSG_CHECKING([if libtool supports shared libraries])
8521     AC_MSG_RESULT([$can_build_shared])
8522
8523     AC_MSG_CHECKING([whether to build shared libraries])
8524     test "$can_build_shared" = "no" && enable_shared=no
8525
8526     # On AIX, shared libraries and static libraries use the same namespace, and
8527     # are all built from PIC.
8528     case $host_os in
8529       aix3*)
8530         test "$enable_shared" = yes && enable_static=no
8531         if test -n "$RANLIB"; then
8532           archive_cmds="$archive_cmds~\$RANLIB \$lib"
8533           postinstall_cmds='$RANLIB $lib'
8534         fi
8535         ;;
8536       aix[[4-9]]*)
8537         if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8538           test "$enable_shared" = yes && enable_static=no
8539         fi
8540         ;;
8541     esac
8542     AC_MSG_RESULT([$enable_shared])
8543
8544     AC_MSG_CHECKING([whether to build static libraries])
8545     # Make sure either enable_shared or enable_static is yes.
8546     test "$enable_shared" = yes || enable_static=yes
8547     AC_MSG_RESULT([$enable_static])
8548
8549     _LT_TAGVAR(GCC, $1)="$G77"
8550     _LT_TAGVAR(LD, $1)="$LD"
8551
8552     ## CAVEAT EMPTOR:
8553     ## There is no encapsulation within the following macros, do not change
8554     ## the running order or otherwise move them around unless you know exactly
8555     ## what you are doing...
8556     _LT_COMPILER_PIC($1)
8557     _LT_COMPILER_C_O($1)
8558     _LT_COMPILER_FILE_LOCKS($1)
8559     _LT_LINKER_SHLIBS($1)
8560     _LT_SYS_DYNAMIC_LINKER($1)
8561     _LT_LINKER_HARDCODE_LIBPATH($1)
8562
8563     _LT_CONFIG($1)
8564   fi # test -n "$compiler"
8565
8566   GCC=$lt_save_GCC
8567   CC="$lt_save_CC"
8568   CFLAGS="$lt_save_CFLAGS"
8569 fi # test "$_lt_disable_F77" != yes
8570
8571 AC_LANG_POP
8572 ])# _LT_LANG_F77_CONFIG
8573
8574
8575 # _LT_LANG_FC_CONFIG([TAG])
8576 # -------------------------
8577 # Ensure that the configuration variables for a Fortran compiler are
8578 # suitably defined.  These variables are subsequently used by _LT_CONFIG
8579 # to write the compiler configuration to `libtool'.
8580 m4_defun([_LT_LANG_FC_CONFIG],
8581 [AC_LANG_PUSH(Fortran)
8582
8583 if test -z "$FC" || test "X$FC" = "Xno"; then
8584   _lt_disable_FC=yes
8585 fi
8586
8587 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8588 _LT_TAGVAR(allow_undefined_flag, $1)=
8589 _LT_TAGVAR(always_export_symbols, $1)=no
8590 _LT_TAGVAR(archive_expsym_cmds, $1)=
8591 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
8592 _LT_TAGVAR(hardcode_direct, $1)=no
8593 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
8594 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8595 _LT_TAGVAR(hardcode_libdir_separator, $1)=
8596 _LT_TAGVAR(hardcode_minus_L, $1)=no
8597 _LT_TAGVAR(hardcode_automatic, $1)=no
8598 _LT_TAGVAR(inherit_rpath, $1)=no
8599 _LT_TAGVAR(module_cmds, $1)=
8600 _LT_TAGVAR(module_expsym_cmds, $1)=
8601 _LT_TAGVAR(link_all_deplibs, $1)=unknown
8602 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8603 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8604 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8605 _LT_TAGVAR(no_undefined_flag, $1)=
8606 _LT_TAGVAR(whole_archive_flag_spec, $1)=
8607 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8608
8609 # Source file extension for fc test sources.
8610 ac_ext=${ac_fc_srcext-f}
8611
8612 # Object file extension for compiled fc test sources.
8613 objext=o
8614 _LT_TAGVAR(objext, $1)=$objext
8615
8616 # No sense in running all these tests if we already determined that
8617 # the FC compiler isn't working.  Some variables (like enable_shared)
8618 # are currently assumed to apply to all compilers on this platform,
8619 # and will be corrupted by setting them based on a non-working compiler.
8620 if test "$_lt_disable_FC" != yes; then
8621   # Code to be used in simple compile tests
8622   lt_simple_compile_test_code="\
8623       subroutine t
8624       return
8625       end
8626 "
8627
8628   # Code to be used in simple link tests
8629   lt_simple_link_test_code="\
8630       program t
8631       end
8632 "
8633
8634   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8635   _LT_TAG_COMPILER
8636
8637   # save warnings/boilerplate of simple test code
8638   _LT_COMPILER_BOILERPLATE
8639   _LT_LINKER_BOILERPLATE
8640
8641   # Allow CC to be a program name with arguments.
8642   lt_save_CC="$CC"
8643   lt_save_GCC=$GCC
8644   lt_save_CFLAGS=$CFLAGS
8645   CC=${FC-"f95"}
8646   CFLAGS=$FCFLAGS
8647   compiler=$CC
8648   GCC=$ac_cv_fc_compiler_gnu
8649
8650   _LT_TAGVAR(compiler, $1)=$CC
8651   _LT_CC_BASENAME([$compiler])
8652
8653   if test -n "$compiler"; then
8654     AC_MSG_CHECKING([if libtool supports shared libraries])
8655     AC_MSG_RESULT([$can_build_shared])
8656
8657     AC_MSG_CHECKING([whether to build shared libraries])
8658     test "$can_build_shared" = "no" && enable_shared=no
8659
8660     # On AIX, shared libraries and static libraries use the same namespace, and
8661     # are all built from PIC.
8662     case $host_os in
8663       aix3*)
8664         test "$enable_shared" = yes && enable_static=no
8665         if test -n "$RANLIB"; then
8666           archive_cmds="$archive_cmds~\$RANLIB \$lib"
8667           postinstall_cmds='$RANLIB $lib'
8668         fi
8669         ;;
8670       aix[[4-9]]*)
8671         if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8672           test "$enable_shared" = yes && enable_static=no
8673         fi
8674         ;;
8675     esac
8676     AC_MSG_RESULT([$enable_shared])
8677
8678     AC_MSG_CHECKING([whether to build static libraries])
8679     # Make sure either enable_shared or enable_static is yes.
8680     test "$enable_shared" = yes || enable_static=yes
8681     AC_MSG_RESULT([$enable_static])
8682
8683     _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
8684     _LT_TAGVAR(LD, $1)="$LD"
8685
8686     ## CAVEAT EMPTOR:
8687     ## There is no encapsulation within the following macros, do not change
8688     ## the running order or otherwise move them around unless you know exactly
8689     ## what you are doing...
8690     _LT_SYS_HIDDEN_LIBDEPS($1)
8691     _LT_COMPILER_PIC($1)
8692     _LT_COMPILER_C_O($1)
8693     _LT_COMPILER_FILE_LOCKS($1)
8694     _LT_LINKER_SHLIBS($1)
8695     _LT_SYS_DYNAMIC_LINKER($1)
8696     _LT_LINKER_HARDCODE_LIBPATH($1)
8697
8698     _LT_CONFIG($1)
8699   fi # test -n "$compiler"
8700
8701   GCC=$lt_save_GCC
8702   CC=$lt_save_CC
8703   CFLAGS=$lt_save_CFLAGS
8704 fi # test "$_lt_disable_FC" != yes
8705
8706 AC_LANG_POP
8707 ])# _LT_LANG_FC_CONFIG
8708
8709
8710 # _LT_LANG_GCJ_CONFIG([TAG])
8711 # --------------------------
8712 # Ensure that the configuration variables for the GNU Java Compiler compiler
8713 # are suitably defined.  These variables are subsequently used by _LT_CONFIG
8714 # to write the compiler configuration to `libtool'.
8715 m4_defun([_LT_LANG_GCJ_CONFIG],
8716 [AC_REQUIRE([LT_PROG_GCJ])dnl
8717 AC_LANG_SAVE
8718
8719 # Source file extension for Java test sources.
8720 ac_ext=java
8721
8722 # Object file extension for compiled Java test sources.
8723 objext=o
8724 _LT_TAGVAR(objext, $1)=$objext
8725
8726 # Code to be used in simple compile tests
8727 lt_simple_compile_test_code="class foo {}"
8728
8729 # Code to be used in simple link tests
8730 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
8731
8732 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8733 _LT_TAG_COMPILER
8734
8735 # save warnings/boilerplate of simple test code
8736 _LT_COMPILER_BOILERPLATE
8737 _LT_LINKER_BOILERPLATE
8738
8739 # Allow CC to be a program name with arguments.
8740 lt_save_CC=$CC
8741 lt_save_CFLAGS=$CFLAGS
8742 lt_save_GCC=$GCC
8743 GCC=yes
8744 CC=${GCJ-"gcj"}
8745 CFLAGS=$GCJFLAGS
8746 compiler=$CC
8747 _LT_TAGVAR(compiler, $1)=$CC
8748 _LT_TAGVAR(LD, $1)="$LD"
8749 _LT_CC_BASENAME([$compiler])
8750
8751 # GCJ did not exist at the time GCC didn't implicitly link libc in.
8752 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8753
8754 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8755 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8756 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8757
8758 if test -n "$compiler"; then
8759   _LT_COMPILER_NO_RTTI($1)
8760   _LT_COMPILER_PIC($1)
8761   _LT_COMPILER_C_O($1)
8762   _LT_COMPILER_FILE_LOCKS($1)
8763   _LT_LINKER_SHLIBS($1)
8764   _LT_LINKER_HARDCODE_LIBPATH($1)
8765
8766   _LT_CONFIG($1)
8767 fi
8768
8769 AC_LANG_RESTORE
8770
8771 GCC=$lt_save_GCC
8772 CC=$lt_save_CC
8773 CFLAGS=$lt_save_CFLAGS
8774 ])# _LT_LANG_GCJ_CONFIG
8775
8776
8777 # _LT_LANG_GO_CONFIG([TAG])
8778 # --------------------------
8779 # Ensure that the configuration variables for the GNU Go compiler
8780 # are suitably defined.  These variables are subsequently used by _LT_CONFIG
8781 # to write the compiler configuration to `libtool'.
8782 m4_defun([_LT_LANG_GO_CONFIG],
8783 [AC_REQUIRE([LT_PROG_GO])dnl
8784 AC_LANG_SAVE
8785
8786 # Source file extension for Go test sources.
8787 ac_ext=go
8788
8789 # Object file extension for compiled Go test sources.
8790 objext=o
8791 _LT_TAGVAR(objext, $1)=$objext
8792
8793 # Code to be used in simple compile tests
8794 lt_simple_compile_test_code="package main; func main() { }"
8795
8796 # Code to be used in simple link tests
8797 lt_simple_link_test_code='package main; func main() { }'
8798
8799 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8800 _LT_TAG_COMPILER
8801
8802 # save warnings/boilerplate of simple test code
8803 _LT_COMPILER_BOILERPLATE
8804 _LT_LINKER_BOILERPLATE
8805
8806 # Allow CC to be a program name with arguments.
8807 lt_save_CC=$CC
8808 lt_save_CFLAGS=$CFLAGS
8809 lt_save_GCC=$GCC
8810 GCC=yes
8811 CC=${GOC-"gccgo"}
8812 CFLAGS=$GOFLAGS
8813 compiler=$CC
8814 _LT_TAGVAR(compiler, $1)=$CC
8815 _LT_TAGVAR(LD, $1)="$LD"
8816 _LT_CC_BASENAME([$compiler])
8817
8818 # Go did not exist at the time GCC didn't implicitly link libc in.
8819 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8820
8821 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8822 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8823 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8824
8825 if test -n "$compiler"; then
8826   _LT_COMPILER_NO_RTTI($1)
8827   _LT_COMPILER_PIC($1)
8828   _LT_COMPILER_C_O($1)
8829   _LT_COMPILER_FILE_LOCKS($1)
8830   _LT_LINKER_SHLIBS($1)
8831   _LT_LINKER_HARDCODE_LIBPATH($1)
8832
8833   _LT_CONFIG($1)
8834 fi
8835
8836 AC_LANG_RESTORE
8837
8838 GCC=$lt_save_GCC
8839 CC=$lt_save_CC
8840 CFLAGS=$lt_save_CFLAGS
8841 ])# _LT_LANG_GO_CONFIG
8842
8843
8844 # _LT_LANG_RC_CONFIG([TAG])
8845 # -------------------------
8846 # Ensure that the configuration variables for the Windows resource compiler
8847 # are suitably defined.  These variables are subsequently used by _LT_CONFIG
8848 # to write the compiler configuration to `libtool'.
8849 m4_defun([_LT_LANG_RC_CONFIG],
8850 [AC_REQUIRE([LT_PROG_RC])dnl
8851 AC_LANG_SAVE
8852
8853 # Source file extension for RC test sources.
8854 ac_ext=rc
8855
8856 # Object file extension for compiled RC test sources.
8857 objext=o
8858 _LT_TAGVAR(objext, $1)=$objext
8859
8860 # Code to be used in simple compile tests
8861 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
8862
8863 # Code to be used in simple link tests
8864 lt_simple_link_test_code="$lt_simple_compile_test_code"
8865
8866 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8867 _LT_TAG_COMPILER
8868
8869 # save warnings/boilerplate of simple test code
8870 _LT_COMPILER_BOILERPLATE
8871 _LT_LINKER_BOILERPLATE
8872
8873 # Allow CC to be a program name with arguments.
8874 lt_save_CC="$CC"
8875 lt_save_CFLAGS=$CFLAGS
8876 lt_save_GCC=$GCC
8877 GCC=
8878 CC=${RC-"windres"}
8879 CFLAGS=
8880 compiler=$CC
8881 _LT_TAGVAR(compiler, $1)=$CC
8882 _LT_CC_BASENAME([$compiler])
8883 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
8884
8885 if test -n "$compiler"; then
8886   :
8887   _LT_CONFIG($1)
8888 fi
8889
8890 GCC=$lt_save_GCC
8891 AC_LANG_RESTORE
8892 CC=$lt_save_CC
8893 CFLAGS=$lt_save_CFLAGS
8894 ])# _LT_LANG_RC_CONFIG
8895
8896
8897 # LT_PROG_GCJ
8898 # -----------
8899 AC_DEFUN([LT_PROG_GCJ],
8900 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
8901   [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
8902     [AC_CHECK_TOOL(GCJ, gcj,)
8903       test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
8904       AC_SUBST(GCJFLAGS)])])[]dnl
8905 ])
8906
8907 # Old name:
8908 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
8909 dnl aclocal-1.4 backwards compatibility:
8910 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
8911
8912
8913 # LT_PROG_GO
8914 # ----------
8915 AC_DEFUN([LT_PROG_GO],
8916 [AC_CHECK_TOOL(GOC, gccgo,)
8917 ])
8918
8919
8920 # LT_PROG_RC
8921 # ----------
8922 AC_DEFUN([LT_PROG_RC],
8923 [AC_CHECK_TOOL(RC, windres,)
8924 ])
8925
8926 # Old name:
8927 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
8928 dnl aclocal-1.4 backwards compatibility:
8929 dnl AC_DEFUN([LT_AC_PROG_RC], [])
8930
8931
8932 # _LT_DECL_EGREP
8933 # --------------
8934 # If we don't have a new enough Autoconf to choose the best grep
8935 # available, choose the one first in the user's PATH.
8936 m4_defun([_LT_DECL_EGREP],
8937 [AC_REQUIRE([AC_PROG_EGREP])dnl
8938 AC_REQUIRE([AC_PROG_FGREP])dnl
8939 test -z "$GREP" && GREP=grep
8940 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
8941 _LT_DECL([], [EGREP], [1], [An ERE matcher])
8942 _LT_DECL([], [FGREP], [1], [A literal string matcher])
8943 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
8944 AC_SUBST([GREP])
8945 ])
8946
8947
8948 # _LT_DECL_OBJDUMP
8949 # --------------
8950 # If we don't have a new enough Autoconf to choose the best objdump
8951 # available, choose the one first in the user's PATH.
8952 m4_defun([_LT_DECL_OBJDUMP],
8953 [AC_CHECK_TOOL(OBJDUMP, objdump, false)
8954 test -z "$OBJDUMP" && OBJDUMP=objdump
8955 _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
8956 AC_SUBST([OBJDUMP])
8957 ])
8958
8959 # _LT_DECL_DLLTOOL
8960 # ----------------
8961 # Ensure DLLTOOL variable is set.
8962 m4_defun([_LT_DECL_DLLTOOL],
8963 [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8964 test -z "$DLLTOOL" && DLLTOOL=dlltool
8965 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
8966 AC_SUBST([DLLTOOL])
8967 ])
8968
8969 # _LT_DECL_SED
8970 # ------------
8971 # Check for a fully-functional sed program, that truncates
8972 # as few characters as possible.  Prefer GNU sed if found.
8973 m4_defun([_LT_DECL_SED],
8974 [AC_PROG_SED
8975 test -z "$SED" && SED=sed
8976 Xsed="$SED -e 1s/^X//"
8977 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
8978 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
8979     [Sed that helps us avoid accidentally triggering echo(1) options like -n])
8980 ])# _LT_DECL_SED
8981
8982 m4_ifndef([AC_PROG_SED], [
8983 # NOTE: This macro has been submitted for inclusion into   #
8984 #  GNU Autoconf as AC_PROG_SED.  When it is available in   #
8985 #  a released version of Autoconf we should remove this    #
8986 #  macro and use it instead.                               #
8987
8988 m4_defun([AC_PROG_SED],
8989 [AC_MSG_CHECKING([for a sed that does not truncate output])
8990 AC_CACHE_VAL(lt_cv_path_SED,
8991 [# Loop through the user's path and test for sed and gsed.
8992 # Then use that list of sed's as ones to test for truncation.
8993 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8994 for as_dir in $PATH
8995 do
8996   IFS=$as_save_IFS
8997   test -z "$as_dir" && as_dir=.
8998   for lt_ac_prog in sed gsed; do
8999     for ac_exec_ext in '' $ac_executable_extensions; do
9000       if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
9001         lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
9002       fi
9003     done
9004   done
9005 done
9006 IFS=$as_save_IFS
9007 lt_ac_max=0
9008 lt_ac_count=0
9009 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
9010 # along with /bin/sed that truncates output.
9011 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
9012   test ! -f $lt_ac_sed && continue
9013   cat /dev/null > conftest.in
9014   lt_ac_count=0
9015   echo $ECHO_N "0123456789$ECHO_C" >conftest.in
9016   # Check for GNU sed and select it if it is found.
9017   if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
9018     lt_cv_path_SED=$lt_ac_sed
9019     break
9020   fi
9021   while true; do
9022     cat conftest.in conftest.in >conftest.tmp
9023     mv conftest.tmp conftest.in
9024     cp conftest.in conftest.nl
9025     echo >>conftest.nl
9026     $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
9027     cmp -s conftest.out conftest.nl || break
9028     # 10000 chars as input seems more than enough
9029     test $lt_ac_count -gt 10 && break
9030     lt_ac_count=`expr $lt_ac_count + 1`
9031     if test $lt_ac_count -gt $lt_ac_max; then
9032       lt_ac_max=$lt_ac_count
9033       lt_cv_path_SED=$lt_ac_sed
9034     fi
9035   done
9036 done
9037 ])
9038 SED=$lt_cv_path_SED
9039 AC_SUBST([SED])
9040 AC_MSG_RESULT([$SED])
9041 ])#AC_PROG_SED
9042 ])#m4_ifndef
9043
9044 # Old name:
9045 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
9046 dnl aclocal-1.4 backwards compatibility:
9047 dnl AC_DEFUN([LT_AC_PROG_SED], [])
9048
9049
9050 # _LT_CHECK_SHELL_FEATURES
9051 # ------------------------
9052 # Find out whether the shell is Bourne or XSI compatible,
9053 # or has some other useful features.
9054 m4_defun([_LT_CHECK_SHELL_FEATURES],
9055 [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
9056 # Try some XSI features
9057 xsi_shell=no
9058 ( _lt_dummy="a/b/c"
9059   test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
9060       = c,a/b,b/c, \
9061     && eval 'test $(( 1 + 1 )) -eq 2 \
9062     && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
9063   && xsi_shell=yes
9064 AC_MSG_RESULT([$xsi_shell])
9065 _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
9066
9067 AC_MSG_CHECKING([whether the shell understands "+="])
9068 lt_shell_append=no
9069 ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
9070     >/dev/null 2>&1 \
9071   && lt_shell_append=yes
9072 AC_MSG_RESULT([$lt_shell_append])
9073 _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
9074
9075 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
9076   lt_unset=unset
9077 else
9078   lt_unset=false
9079 fi
9080 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
9081
9082 # test EBCDIC or ASCII
9083 case `echo X|tr X '\101'` in
9084  A) # ASCII based system
9085     # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
9086   lt_SP2NL='tr \040 \012'
9087   lt_NL2SP='tr \015\012 \040\040'
9088   ;;
9089  *) # EBCDIC based system
9090   lt_SP2NL='tr \100 \n'
9091   lt_NL2SP='tr \r\n \100\100'
9092   ;;
9093 esac
9094 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
9095 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
9096 ])# _LT_CHECK_SHELL_FEATURES
9097
9098
9099 # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
9100 # ------------------------------------------------------
9101 # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
9102 # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
9103 m4_defun([_LT_PROG_FUNCTION_REPLACE],
9104 [dnl {
9105 sed -e '/^$1 ()$/,/^} # $1 /c\
9106 $1 ()\
9107 {\
9108 m4_bpatsubsts([$2], [$], [\\], [^\([     ]\)], [\\\1])
9109 } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
9110   && mv -f "$cfgfile.tmp" "$cfgfile" \
9111     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
9112 test 0 -eq $? || _lt_function_replace_fail=:
9113 ])
9114
9115
9116 # _LT_PROG_REPLACE_SHELLFNS
9117 # -------------------------
9118 # Replace existing portable implementations of several shell functions with
9119 # equivalent extended shell implementations where those features are available..
9120 m4_defun([_LT_PROG_REPLACE_SHELLFNS],
9121 [if test x"$xsi_shell" = xyes; then
9122   _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
9123     case ${1} in
9124       */*) func_dirname_result="${1%/*}${2}" ;;
9125       *  ) func_dirname_result="${3}" ;;
9126     esac])
9127
9128   _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
9129     func_basename_result="${1##*/}"])
9130
9131   _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
9132     case ${1} in
9133       */*) func_dirname_result="${1%/*}${2}" ;;
9134       *  ) func_dirname_result="${3}" ;;
9135     esac
9136     func_basename_result="${1##*/}"])
9137
9138   _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
9139     # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
9140     # positional parameters, so assign one to ordinary parameter first.
9141     func_stripname_result=${3}
9142     func_stripname_result=${func_stripname_result#"${1}"}
9143     func_stripname_result=${func_stripname_result%"${2}"}])
9144
9145   _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
9146     func_split_long_opt_name=${1%%=*}
9147     func_split_long_opt_arg=${1#*=}])
9148
9149   _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
9150     func_split_short_opt_arg=${1#??}
9151     func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
9152
9153   _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
9154     case ${1} in
9155       *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
9156       *)    func_lo2o_result=${1} ;;
9157     esac])
9158
9159   _LT_PROG_FUNCTION_REPLACE([func_xform], [    func_xform_result=${1%.*}.lo])
9160
9161   _LT_PROG_FUNCTION_REPLACE([func_arith], [    func_arith_result=$(( $[*] ))])
9162
9163   _LT_PROG_FUNCTION_REPLACE([func_len], [    func_len_result=${#1}])
9164 fi
9165
9166 if test x"$lt_shell_append" = xyes; then
9167   _LT_PROG_FUNCTION_REPLACE([func_append], [    eval "${1}+=\\${2}"])
9168
9169   _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
9170     func_quote_for_eval "${2}"
9171 dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
9172     eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
9173
9174   # Save a `func_append' function call where possible by direct use of '+='
9175   sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
9176     && mv -f "$cfgfile.tmp" "$cfgfile" \
9177       || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
9178   test 0 -eq $? || _lt_function_replace_fail=:
9179 else
9180   # Save a `func_append' function call even when '+=' is not available
9181   sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
9182     && mv -f "$cfgfile.tmp" "$cfgfile" \
9183       || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
9184   test 0 -eq $? || _lt_function_replace_fail=:
9185 fi
9186
9187 if test x"$_lt_function_replace_fail" = x":"; then
9188   AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
9189 fi
9190 ])
9191
9192 # _LT_PATH_CONVERSION_FUNCTIONS
9193 # -----------------------------
9194 # Determine which file name conversion functions should be used by
9195 # func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
9196 # for certain cross-compile configurations and native mingw.
9197 m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
9198 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
9199 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
9200 AC_MSG_CHECKING([how to convert $build file names to $host format])
9201 AC_CACHE_VAL(lt_cv_to_host_file_cmd,
9202 [case $host in
9203   *-*-mingw* )
9204     case $build in
9205       *-*-mingw* ) # actually msys
9206         lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
9207         ;;
9208       *-*-cygwin* )
9209         lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
9210         ;;
9211       * ) # otherwise, assume *nix
9212         lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
9213         ;;
9214     esac
9215     ;;
9216   *-*-cygwin* )
9217     case $build in
9218       *-*-mingw* ) # actually msys
9219         lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
9220         ;;
9221       *-*-cygwin* )
9222         lt_cv_to_host_file_cmd=func_convert_file_noop
9223         ;;
9224       * ) # otherwise, assume *nix
9225         lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
9226         ;;
9227     esac
9228     ;;
9229   * ) # unhandled hosts (and "normal" native builds)
9230     lt_cv_to_host_file_cmd=func_convert_file_noop
9231     ;;
9232 esac
9233 ])
9234 to_host_file_cmd=$lt_cv_to_host_file_cmd
9235 AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
9236 _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
9237          [0], [convert $build file names to $host format])dnl
9238
9239 AC_MSG_CHECKING([how to convert $build file names to toolchain format])
9240 AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
9241 [#assume ordinary cross tools, or native build.
9242 lt_cv_to_tool_file_cmd=func_convert_file_noop
9243 case $host in
9244   *-*-mingw* )
9245     case $build in
9246       *-*-mingw* ) # actually msys
9247         lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
9248         ;;
9249     esac
9250     ;;
9251 esac
9252 ])
9253 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
9254 AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
9255 _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
9256          [0], [convert $build files to toolchain format])dnl
9257 ])# _LT_PATH_CONVERSION_FUNCTIONS
9258
9259 # Helper functions for option handling.                    -*- Autoconf -*-
9260 #
9261 #   Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
9262 #   Inc.
9263 #   Written by Gary V. Vaughan, 2004
9264 #
9265 # This file is free software; the Free Software Foundation gives
9266 # unlimited permission to copy and/or distribute it, with or without
9267 # modifications, as long as this notice is preserved.
9268
9269 # serial 7 ltoptions.m4
9270
9271 # This is to help aclocal find these macros, as it can't see m4_define.
9272 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
9273
9274
9275 # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
9276 # ------------------------------------------
9277 m4_define([_LT_MANGLE_OPTION],
9278 [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
9279
9280
9281 # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
9282 # ---------------------------------------
9283 # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
9284 # matching handler defined, dispatch to it.  Other OPTION-NAMEs are
9285 # saved as a flag.
9286 m4_define([_LT_SET_OPTION],
9287 [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
9288 m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
9289         _LT_MANGLE_DEFUN([$1], [$2]),
9290     [m4_warning([Unknown $1 option `$2'])])[]dnl
9291 ])
9292
9293
9294 # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
9295 # ------------------------------------------------------------
9296 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
9297 m4_define([_LT_IF_OPTION],
9298 [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
9299
9300
9301 # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
9302 # -------------------------------------------------------
9303 # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
9304 # are set.
9305 m4_define([_LT_UNLESS_OPTIONS],
9306 [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9307             [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
9308                       [m4_define([$0_found])])])[]dnl
9309 m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
9310 ])[]dnl
9311 ])
9312
9313
9314 # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
9315 # ----------------------------------------
9316 # OPTION-LIST is a space-separated list of Libtool options associated
9317 # with MACRO-NAME.  If any OPTION has a matching handler declared with
9318 # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
9319 # the unknown option and exit.
9320 m4_defun([_LT_SET_OPTIONS],
9321 [# Set options
9322 m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9323     [_LT_SET_OPTION([$1], _LT_Option)])
9324
9325 m4_if([$1],[LT_INIT],[
9326   dnl
9327   dnl Simply set some default values (i.e off) if boolean options were not
9328   dnl specified:
9329   _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
9330   ])
9331   _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
9332   ])
9333   dnl
9334   dnl If no reference was made to various pairs of opposing options, then
9335   dnl we run the default mode handler for the pair.  For example, if neither
9336   dnl `shared' nor `disable-shared' was passed, we enable building of shared
9337   dnl archives by default:
9338   _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
9339   _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
9340   _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
9341   _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
9342                    [_LT_ENABLE_FAST_INSTALL])
9343   ])
9344 ])# _LT_SET_OPTIONS
9345
9346
9347
9348 # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
9349 # -----------------------------------------
9350 m4_define([_LT_MANGLE_DEFUN],
9351 [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
9352
9353
9354 # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
9355 # -----------------------------------------------
9356 m4_define([LT_OPTION_DEFINE],
9357 [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
9358 ])# LT_OPTION_DEFINE
9359
9360
9361 # dlopen
9362 # ------
9363 LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
9364 ])
9365
9366 AU_DEFUN([AC_LIBTOOL_DLOPEN],
9367 [_LT_SET_OPTION([LT_INIT], [dlopen])
9368 AC_DIAGNOSE([obsolete],
9369 [$0: Remove this warning and the call to _LT_SET_OPTION when you
9370 put the `dlopen' option into LT_INIT's first parameter.])
9371 ])
9372
9373 dnl aclocal-1.4 backwards compatibility:
9374 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
9375
9376
9377 # win32-dll
9378 # ---------
9379 # Declare package support for building win32 dll's.
9380 LT_OPTION_DEFINE([LT_INIT], [win32-dll],
9381 [enable_win32_dll=yes
9382
9383 case $host in
9384 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
9385   AC_CHECK_TOOL(AS, as, false)
9386   AC_CHECK_TOOL(DLLTOOL, dlltool, false)
9387   AC_CHECK_TOOL(OBJDUMP, objdump, false)
9388   ;;
9389 esac
9390
9391 test -z "$AS" && AS=as
9392 _LT_DECL([], [AS],      [1], [Assembler program])dnl
9393
9394 test -z "$DLLTOOL" && DLLTOOL=dlltool
9395 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
9396
9397 test -z "$OBJDUMP" && OBJDUMP=objdump
9398 _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
9399 ])# win32-dll
9400
9401 AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
9402 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
9403 _LT_SET_OPTION([LT_INIT], [win32-dll])
9404 AC_DIAGNOSE([obsolete],
9405 [$0: Remove this warning and the call to _LT_SET_OPTION when you
9406 put the `win32-dll' option into LT_INIT's first parameter.])
9407 ])
9408
9409 dnl aclocal-1.4 backwards compatibility:
9410 dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
9411
9412
9413 # _LT_ENABLE_SHARED([DEFAULT])
9414 # ----------------------------
9415 # implement the --enable-shared flag, and supports the `shared' and
9416 # `disable-shared' LT_INIT options.
9417 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9418 m4_define([_LT_ENABLE_SHARED],
9419 [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
9420 AC_ARG_ENABLE([shared],
9421     [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
9422         [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
9423     [p=${PACKAGE-default}
9424     case $enableval in
9425     yes) enable_shared=yes ;;
9426     no) enable_shared=no ;;
9427     *)
9428       enable_shared=no
9429       # Look at the argument we got.  We use all the common list separators.
9430       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9431       for pkg in $enableval; do
9432         IFS="$lt_save_ifs"
9433         if test "X$pkg" = "X$p"; then
9434           enable_shared=yes
9435         fi
9436       done
9437       IFS="$lt_save_ifs"
9438       ;;
9439     esac],
9440     [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
9441
9442     _LT_DECL([build_libtool_libs], [enable_shared], [0],
9443         [Whether or not to build shared libraries])
9444 ])# _LT_ENABLE_SHARED
9445
9446 LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
9447 LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
9448
9449 # Old names:
9450 AC_DEFUN([AC_ENABLE_SHARED],
9451 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
9452 ])
9453
9454 AC_DEFUN([AC_DISABLE_SHARED],
9455 [_LT_SET_OPTION([LT_INIT], [disable-shared])
9456 ])
9457
9458 AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
9459 AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
9460
9461 dnl aclocal-1.4 backwards compatibility:
9462 dnl AC_DEFUN([AM_ENABLE_SHARED], [])
9463 dnl AC_DEFUN([AM_DISABLE_SHARED], [])
9464
9465
9466
9467 # _LT_ENABLE_STATIC([DEFAULT])
9468 # ----------------------------
9469 # implement the --enable-static flag, and support the `static' and
9470 # `disable-static' LT_INIT options.
9471 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9472 m4_define([_LT_ENABLE_STATIC],
9473 [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
9474 AC_ARG_ENABLE([static],
9475     [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
9476         [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
9477     [p=${PACKAGE-default}
9478     case $enableval in
9479     yes) enable_static=yes ;;
9480     no) enable_static=no ;;
9481     *)
9482      enable_static=no
9483       # Look at the argument we got.  We use all the common list separators.
9484       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9485       for pkg in $enableval; do
9486         IFS="$lt_save_ifs"
9487         if test "X$pkg" = "X$p"; then
9488           enable_static=yes
9489         fi
9490       done
9491       IFS="$lt_save_ifs"
9492       ;;
9493     esac],
9494     [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
9495
9496     _LT_DECL([build_old_libs], [enable_static], [0],
9497         [Whether or not to build static libraries])
9498 ])# _LT_ENABLE_STATIC
9499
9500 LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
9501 LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
9502
9503 # Old names:
9504 AC_DEFUN([AC_ENABLE_STATIC],
9505 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
9506 ])
9507
9508 AC_DEFUN([AC_DISABLE_STATIC],
9509 [_LT_SET_OPTION([LT_INIT], [disable-static])
9510 ])
9511
9512 AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
9513 AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
9514
9515 dnl aclocal-1.4 backwards compatibility:
9516 dnl AC_DEFUN([AM_ENABLE_STATIC], [])
9517 dnl AC_DEFUN([AM_DISABLE_STATIC], [])
9518
9519
9520
9521 # _LT_ENABLE_FAST_INSTALL([DEFAULT])
9522 # ----------------------------------
9523 # implement the --enable-fast-install flag, and support the `fast-install'
9524 # and `disable-fast-install' LT_INIT options.
9525 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9526 m4_define([_LT_ENABLE_FAST_INSTALL],
9527 [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
9528 AC_ARG_ENABLE([fast-install],
9529     [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
9530     [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
9531     [p=${PACKAGE-default}
9532     case $enableval in
9533     yes) enable_fast_install=yes ;;
9534     no) enable_fast_install=no ;;
9535     *)
9536       enable_fast_install=no
9537       # Look at the argument we got.  We use all the common list separators.
9538       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9539       for pkg in $enableval; do
9540         IFS="$lt_save_ifs"
9541         if test "X$pkg" = "X$p"; then
9542           enable_fast_install=yes
9543         fi
9544       done
9545       IFS="$lt_save_ifs"
9546       ;;
9547     esac],
9548     [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
9549
9550 _LT_DECL([fast_install], [enable_fast_install], [0],
9551          [Whether or not to optimize for fast installation])dnl
9552 ])# _LT_ENABLE_FAST_INSTALL
9553
9554 LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
9555 LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
9556
9557 # Old names:
9558 AU_DEFUN([AC_ENABLE_FAST_INSTALL],
9559 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
9560 AC_DIAGNOSE([obsolete],
9561 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
9562 the `fast-install' option into LT_INIT's first parameter.])
9563 ])
9564
9565 AU_DEFUN([AC_DISABLE_FAST_INSTALL],
9566 [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
9567 AC_DIAGNOSE([obsolete],
9568 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
9569 the `disable-fast-install' option into LT_INIT's first parameter.])
9570 ])
9571
9572 dnl aclocal-1.4 backwards compatibility:
9573 dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
9574 dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
9575
9576
9577 # _LT_WITH_PIC([MODE])
9578 # --------------------
9579 # implement the --with-pic flag, and support the `pic-only' and `no-pic'
9580 # LT_INIT options.
9581 # MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
9582 m4_define([_LT_WITH_PIC],
9583 [AC_ARG_WITH([pic],
9584     [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
9585         [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
9586     [lt_p=${PACKAGE-default}
9587     case $withval in
9588     yes|no) pic_mode=$withval ;;
9589     *)
9590       pic_mode=default
9591       # Look at the argument we got.  We use all the common list separators.
9592       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9593       for lt_pkg in $withval; do
9594         IFS="$lt_save_ifs"
9595         if test "X$lt_pkg" = "X$lt_p"; then
9596           pic_mode=yes
9597         fi
9598       done
9599       IFS="$lt_save_ifs"
9600       ;;
9601     esac],
9602     [pic_mode=default])
9603
9604 test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
9605
9606 _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
9607 ])# _LT_WITH_PIC
9608
9609 LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
9610 LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
9611
9612 # Old name:
9613 AU_DEFUN([AC_LIBTOOL_PICMODE],
9614 [_LT_SET_OPTION([LT_INIT], [pic-only])
9615 AC_DIAGNOSE([obsolete],
9616 [$0: Remove this warning and the call to _LT_SET_OPTION when you
9617 put the `pic-only' option into LT_INIT's first parameter.])
9618 ])
9619
9620 dnl aclocal-1.4 backwards compatibility:
9621 dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
9622
9623
9624 m4_define([_LTDL_MODE], [])
9625 LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
9626                  [m4_define([_LTDL_MODE], [nonrecursive])])
9627 LT_OPTION_DEFINE([LTDL_INIT], [recursive],
9628                  [m4_define([_LTDL_MODE], [recursive])])
9629 LT_OPTION_DEFINE([LTDL_INIT], [subproject],
9630                  [m4_define([_LTDL_MODE], [subproject])])
9631
9632 m4_define([_LTDL_TYPE], [])
9633 LT_OPTION_DEFINE([LTDL_INIT], [installable],
9634                  [m4_define([_LTDL_TYPE], [installable])])
9635 LT_OPTION_DEFINE([LTDL_INIT], [convenience],
9636                  [m4_define([_LTDL_TYPE], [convenience])])
9637
9638 # ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
9639 #
9640 # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
9641 # Written by Gary V. Vaughan, 2004
9642 #
9643 # This file is free software; the Free Software Foundation gives
9644 # unlimited permission to copy and/or distribute it, with or without
9645 # modifications, as long as this notice is preserved.
9646
9647 # serial 6 ltsugar.m4
9648
9649 # This is to help aclocal find these macros, as it can't see m4_define.
9650 AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
9651
9652
9653 # lt_join(SEP, ARG1, [ARG2...])
9654 # -----------------------------
9655 # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
9656 # associated separator.
9657 # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
9658 # versions in m4sugar had bugs.
9659 m4_define([lt_join],
9660 [m4_if([$#], [1], [],
9661        [$#], [2], [[$2]],
9662        [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
9663 m4_define([_lt_join],
9664 [m4_if([$#$2], [2], [],
9665        [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
9666
9667
9668 # lt_car(LIST)
9669 # lt_cdr(LIST)
9670 # ------------
9671 # Manipulate m4 lists.
9672 # These macros are necessary as long as will still need to support
9673 # Autoconf-2.59 which quotes differently.
9674 m4_define([lt_car], [[$1]])
9675 m4_define([lt_cdr],
9676 [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
9677        [$#], 1, [],
9678        [m4_dquote(m4_shift($@))])])
9679 m4_define([lt_unquote], $1)
9680
9681
9682 # lt_append(MACRO-NAME, STRING, [SEPARATOR])
9683 # ------------------------------------------
9684 # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
9685 # Note that neither SEPARATOR nor STRING are expanded; they are appended
9686 # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
9687 # No SEPARATOR is output if MACRO-NAME was previously undefined (different
9688 # than defined and empty).
9689 #
9690 # This macro is needed until we can rely on Autoconf 2.62, since earlier
9691 # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
9692 m4_define([lt_append],
9693 [m4_define([$1],
9694            m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
9695
9696
9697
9698 # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
9699 # ----------------------------------------------------------
9700 # Produce a SEP delimited list of all paired combinations of elements of
9701 # PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
9702 # has the form PREFIXmINFIXSUFFIXn.
9703 # Needed until we can rely on m4_combine added in Autoconf 2.62.
9704 m4_define([lt_combine],
9705 [m4_if(m4_eval([$# > 3]), [1],
9706        [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
9707 [[m4_foreach([_Lt_prefix], [$2],
9708              [m4_foreach([_Lt_suffix],
9709                 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
9710         [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
9711
9712
9713 # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
9714 # -----------------------------------------------------------------------
9715 # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
9716 # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
9717 m4_define([lt_if_append_uniq],
9718 [m4_ifdef([$1],
9719           [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
9720                  [lt_append([$1], [$2], [$3])$4],
9721                  [$5])],
9722           [lt_append([$1], [$2], [$3])$4])])
9723
9724
9725 # lt_dict_add(DICT, KEY, VALUE)
9726 # -----------------------------
9727 m4_define([lt_dict_add],
9728 [m4_define([$1($2)], [$3])])
9729
9730
9731 # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
9732 # --------------------------------------------
9733 m4_define([lt_dict_add_subkey],
9734 [m4_define([$1($2:$3)], [$4])])
9735
9736
9737 # lt_dict_fetch(DICT, KEY, [SUBKEY])
9738 # ----------------------------------
9739 m4_define([lt_dict_fetch],
9740 [m4_ifval([$3],
9741         m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
9742     m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
9743
9744
9745 # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
9746 # -----------------------------------------------------------------
9747 m4_define([lt_if_dict_fetch],
9748 [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
9749         [$5],
9750     [$6])])
9751
9752
9753 # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
9754 # --------------------------------------------------------------
9755 m4_define([lt_dict_filter],
9756 [m4_if([$5], [], [],
9757   [lt_join(m4_quote(m4_default([$4], [[, ]])),
9758            lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
9759                       [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
9760 ])
9761
9762 # ltversion.m4 -- version numbers                       -*- Autoconf -*-
9763 #
9764 #   Copyright (C) 2004 Free Software Foundation, Inc.
9765 #   Written by Scott James Remnant, 2004
9766 #
9767 # This file is free software; the Free Software Foundation gives
9768 # unlimited permission to copy and/or distribute it, with or without
9769 # modifications, as long as this notice is preserved.
9770
9771 # @configure_input@
9772
9773 # serial 3337 ltversion.m4
9774 # This file is part of GNU Libtool
9775
9776 m4_define([LT_PACKAGE_VERSION], [2.4.2])
9777 m4_define([LT_PACKAGE_REVISION], [1.3337])
9778
9779 AC_DEFUN([LTVERSION_VERSION],
9780 [macro_version='2.4.2'
9781 macro_revision='1.3337'
9782 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
9783 _LT_DECL(, macro_revision, 0)
9784 ])
9785
9786 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
9787 #
9788 #   Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
9789 #   Written by Scott James Remnant, 2004.
9790 #
9791 # This file is free software; the Free Software Foundation gives
9792 # unlimited permission to copy and/or distribute it, with or without
9793 # modifications, as long as this notice is preserved.
9794
9795 # serial 5 lt~obsolete.m4
9796
9797 # These exist entirely to fool aclocal when bootstrapping libtool.
9798 #
9799 # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
9800 # which have later been changed to m4_define as they aren't part of the
9801 # exported API, or moved to Autoconf or Automake where they belong.
9802 #
9803 # The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
9804 # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
9805 # using a macro with the same name in our local m4/libtool.m4 it'll
9806 # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
9807 # and doesn't know about Autoconf macros at all.)
9808 #
9809 # So we provide this file, which has a silly filename so it's always
9810 # included after everything else.  This provides aclocal with the
9811 # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
9812 # because those macros already exist, or will be overwritten later.
9813 # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
9814 #
9815 # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
9816 # Yes, that means every name once taken will need to remain here until
9817 # we give up compatibility with versions before 1.7, at which point
9818 # we need to keep only those names which we still refer to.
9819
9820 # This is to help aclocal find these macros, as it can't see m4_define.
9821 AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
9822
9823 m4_ifndef([AC_LIBTOOL_LINKER_OPTION],   [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
9824 m4_ifndef([AC_PROG_EGREP],              [AC_DEFUN([AC_PROG_EGREP])])
9825 m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
9826 m4_ifndef([_LT_AC_SHELL_INIT],          [AC_DEFUN([_LT_AC_SHELL_INIT])])
9827 m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],     [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
9828 m4_ifndef([_LT_PROG_LTMAIN],            [AC_DEFUN([_LT_PROG_LTMAIN])])
9829 m4_ifndef([_LT_AC_TAGVAR],              [AC_DEFUN([_LT_AC_TAGVAR])])
9830 m4_ifndef([AC_LTDL_ENABLE_INSTALL],     [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
9831 m4_ifndef([AC_LTDL_PREOPEN],            [AC_DEFUN([AC_LTDL_PREOPEN])])
9832 m4_ifndef([_LT_AC_SYS_COMPILER],        [AC_DEFUN([_LT_AC_SYS_COMPILER])])
9833 m4_ifndef([_LT_AC_LOCK],                [AC_DEFUN([_LT_AC_LOCK])])
9834 m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
9835 m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],     [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
9836 m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],     [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
9837 m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
9838 m4_ifndef([AC_LIBTOOL_OBJDIR],          [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
9839 m4_ifndef([AC_LTDL_OBJDIR],             [AC_DEFUN([AC_LTDL_OBJDIR])])
9840 m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
9841 m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],   [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
9842 m4_ifndef([AC_PATH_MAGIC],              [AC_DEFUN([AC_PATH_MAGIC])])
9843 m4_ifndef([AC_PROG_LD_GNU],             [AC_DEFUN([AC_PROG_LD_GNU])])
9844 m4_ifndef([AC_PROG_LD_RELOAD_FLAG],     [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
9845 m4_ifndef([AC_DEPLIBS_CHECK_METHOD],    [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
9846 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
9847 m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
9848 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
9849 m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],  [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
9850 m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],  [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
9851 m4_ifndef([LT_AC_PROG_EGREP],           [AC_DEFUN([LT_AC_PROG_EGREP])])
9852 m4_ifndef([LT_AC_PROG_SED],             [AC_DEFUN([LT_AC_PROG_SED])])
9853 m4_ifndef([_LT_CC_BASENAME],            [AC_DEFUN([_LT_CC_BASENAME])])
9854 m4_ifndef([_LT_COMPILER_BOILERPLATE],   [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
9855 m4_ifndef([_LT_LINKER_BOILERPLATE],     [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
9856 m4_ifndef([_AC_PROG_LIBTOOL],           [AC_DEFUN([_AC_PROG_LIBTOOL])])
9857 m4_ifndef([AC_LIBTOOL_SETUP],           [AC_DEFUN([AC_LIBTOOL_SETUP])])
9858 m4_ifndef([_LT_AC_CHECK_DLFCN],         [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
9859 m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],      [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
9860 m4_ifndef([_LT_AC_TAGCONFIG],           [AC_DEFUN([_LT_AC_TAGCONFIG])])
9861 m4_ifndef([AC_DISABLE_FAST_INSTALL],    [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
9862 m4_ifndef([_LT_AC_LANG_CXX],            [AC_DEFUN([_LT_AC_LANG_CXX])])
9863 m4_ifndef([_LT_AC_LANG_F77],            [AC_DEFUN([_LT_AC_LANG_F77])])
9864 m4_ifndef([_LT_AC_LANG_GCJ],            [AC_DEFUN([_LT_AC_LANG_GCJ])])
9865 m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],   [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
9866 m4_ifndef([_LT_AC_LANG_C_CONFIG],       [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
9867 m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
9868 m4_ifndef([_LT_AC_LANG_CXX_CONFIG],     [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
9869 m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
9870 m4_ifndef([_LT_AC_LANG_F77_CONFIG],     [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
9871 m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
9872 m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],     [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
9873 m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],  [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
9874 m4_ifndef([_LT_AC_LANG_RC_CONFIG],      [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
9875 m4_ifndef([AC_LIBTOOL_CONFIG],          [AC_DEFUN([AC_LIBTOOL_CONFIG])])
9876 m4_ifndef([_LT_AC_FILE_LTDLL_C],        [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
9877 m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
9878 m4_ifndef([_LT_AC_PROG_CXXCPP],         [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
9879 m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
9880 m4_ifndef([_LT_PROG_ECHO_BACKSLASH],    [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
9881 m4_ifndef([_LT_PROG_F77],               [AC_DEFUN([_LT_PROG_F77])])
9882 m4_ifndef([_LT_PROG_FC],                [AC_DEFUN([_LT_PROG_FC])])
9883 m4_ifndef([_LT_PROG_CXX],               [AC_DEFUN([_LT_PROG_CXX])])
9884
9885 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
9886 # serial 1 (pkg-config-0.24)
9887
9888 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
9889 #
9890 # This program is free software; you can redistribute it and/or modify
9891 # it under the terms of the GNU General Public License as published by
9892 # the Free Software Foundation; either version 2 of the License, or
9893 # (at your option) any later version.
9894 #
9895 # This program is distributed in the hope that it will be useful, but
9896 # WITHOUT ANY WARRANTY; without even the implied warranty of
9897 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
9898 # General Public License for more details.
9899 #
9900 # You should have received a copy of the GNU General Public License
9901 # along with this program; if not, write to the Free Software
9902 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
9903 #
9904 # As a special exception to the GNU General Public License, if you
9905 # distribute this file as part of a program that contains a
9906 # configuration script generated by Autoconf, you may include it under
9907 # the same distribution terms that you use for the rest of that program.
9908
9909 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
9910 # ----------------------------------
9911 AC_DEFUN([PKG_PROG_PKG_CONFIG],
9912 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
9913 m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
9914 m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
9915 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
9916 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
9917 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
9918
9919 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9920         AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
9921 fi
9922 if test -n "$PKG_CONFIG"; then
9923         _pkg_min_version=m4_default([$1], [0.9.0])
9924         AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
9925         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9926                 AC_MSG_RESULT([yes])
9927         else
9928                 AC_MSG_RESULT([no])
9929                 PKG_CONFIG=""
9930         fi
9931 fi[]dnl
9932 ])# PKG_PROG_PKG_CONFIG
9933
9934 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
9935 #
9936 # Check to see whether a particular set of modules exists.  Similar
9937 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
9938 #
9939 # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9940 # only at the first occurence in configure.ac, so if the first place
9941 # it's called might be skipped (such as if it is within an "if", you
9942 # have to call PKG_CHECK_EXISTS manually
9943 # --------------------------------------------------------------
9944 AC_DEFUN([PKG_CHECK_EXISTS],
9945 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9946 if test -n "$PKG_CONFIG" && \
9947     AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
9948   m4_default([$2], [:])
9949 m4_ifvaln([$3], [else
9950   $3])dnl
9951 fi])
9952
9953 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
9954 # ---------------------------------------------
9955 m4_define([_PKG_CONFIG],
9956 [if test -n "$$1"; then
9957     pkg_cv_[]$1="$$1"
9958  elif test -n "$PKG_CONFIG"; then
9959     PKG_CHECK_EXISTS([$3],
9960                      [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
9961                       test "x$?" != "x0" && pkg_failed=yes ],
9962                      [pkg_failed=yes])
9963  else
9964     pkg_failed=untried
9965 fi[]dnl
9966 ])# _PKG_CONFIG
9967
9968 # _PKG_SHORT_ERRORS_SUPPORTED
9969 # -----------------------------
9970 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
9971 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9972 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9973         _pkg_short_errors_supported=yes
9974 else
9975         _pkg_short_errors_supported=no
9976 fi[]dnl
9977 ])# _PKG_SHORT_ERRORS_SUPPORTED
9978
9979
9980 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
9981 # [ACTION-IF-NOT-FOUND])
9982 #
9983 #
9984 # Note that if there is a possibility the first call to
9985 # PKG_CHECK_MODULES might not happen, you should be sure to include an
9986 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
9987 #
9988 #
9989 # --------------------------------------------------------------
9990 AC_DEFUN([PKG_CHECK_MODULES],
9991 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9992 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
9993 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
9994
9995 pkg_failed=no
9996 AC_MSG_CHECKING([for $1])
9997
9998 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
9999 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
10000
10001 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
10002 and $1[]_LIBS to avoid the need to call pkg-config.
10003 See the pkg-config man page for more details.])
10004
10005 if test $pkg_failed = yes; then
10006         AC_MSG_RESULT([no])
10007         _PKG_SHORT_ERRORS_SUPPORTED
10008         if test $_pkg_short_errors_supported = yes; then
10009                 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
10010         else 
10011                 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
10012         fi
10013         # Put the nasty error message in config.log where it belongs
10014         echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
10015
10016         m4_default([$4], [AC_MSG_ERROR(
10017 [Package requirements ($2) were not met:
10018
10019 $$1_PKG_ERRORS
10020
10021 Consider adjusting the PKG_CONFIG_PATH environment variable if you
10022 installed software in a non-standard prefix.
10023
10024 _PKG_TEXT])[]dnl
10025         ])
10026 elif test $pkg_failed = untried; then
10027         AC_MSG_RESULT([no])
10028         m4_default([$4], [AC_MSG_FAILURE(
10029 [The pkg-config script could not be found or is too old.  Make sure it
10030 is in your PATH or set the PKG_CONFIG environment variable to the full
10031 path to pkg-config.
10032
10033 _PKG_TEXT
10034
10035 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
10036         ])
10037 else
10038         $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
10039         $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
10040         AC_MSG_RESULT([yes])
10041         $3
10042 fi[]dnl
10043 ])# PKG_CHECK_MODULES
10044
10045 # Configure paths for GLIB
10046 # Owen Taylor     1997-2001
10047
10048 dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
10049 dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject,
10050 dnl gthread, or gio is specified in MODULES, pass to pkg-config
10051 dnl
10052 AC_DEFUN([AM_PATH_GLIB_2_0],
10053 [dnl 
10054 dnl Get the cflags and libraries from pkg-config
10055 dnl
10056 AC_ARG_ENABLE(glibtest, [  --disable-glibtest      do not try to compile and run a test GLIB program],
10057                     , enable_glibtest=yes)
10058
10059   pkg_config_args=glib-2.0
10060   for module in . $4
10061   do
10062       case "$module" in
10063          gmodule) 
10064              pkg_config_args="$pkg_config_args gmodule-2.0"
10065          ;;
10066          gmodule-no-export) 
10067              pkg_config_args="$pkg_config_args gmodule-no-export-2.0"
10068          ;;
10069          gobject) 
10070              pkg_config_args="$pkg_config_args gobject-2.0"
10071          ;;
10072          gthread) 
10073              pkg_config_args="$pkg_config_args gthread-2.0"
10074          ;;
10075          gio*) 
10076              pkg_config_args="$pkg_config_args $module-2.0"
10077          ;;
10078       esac
10079   done
10080
10081   PKG_PROG_PKG_CONFIG([0.16])
10082
10083   no_glib=""
10084
10085   if test "x$PKG_CONFIG" = x ; then
10086     no_glib=yes
10087     PKG_CONFIG=no
10088   fi
10089
10090   min_glib_version=ifelse([$1], ,2.0.0,$1)
10091   AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
10092
10093   if test x$PKG_CONFIG != xno ; then
10094     ## don't try to run the test against uninstalled libtool libs
10095     if $PKG_CONFIG --uninstalled $pkg_config_args; then
10096           echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH"
10097           enable_glibtest=no
10098     fi
10099
10100     if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then
10101           :
10102     else
10103           no_glib=yes
10104     fi
10105   fi
10106
10107   if test x"$no_glib" = x ; then
10108     GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
10109     GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0`
10110     GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
10111     GLIB_COMPILE_RESOURCES=`$PKG_CONFIG --variable=glib_compile_resources gio-2.0`
10112
10113     GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args`
10114     GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args`
10115     glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \
10116            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
10117     glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \
10118            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
10119     glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \
10120            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
10121     if test "x$enable_glibtest" = "xyes" ; then
10122       ac_save_CFLAGS="$CFLAGS"
10123       ac_save_LIBS="$LIBS"
10124       CFLAGS="$CFLAGS $GLIB_CFLAGS"
10125       LIBS="$GLIB_LIBS $LIBS"
10126 dnl
10127 dnl Now check if the installed GLIB is sufficiently new. (Also sanity
10128 dnl checks the results of pkg-config to some extent)
10129 dnl
10130       rm -f conf.glibtest
10131       AC_TRY_RUN([
10132 #include <glib.h>
10133 #include <stdio.h>
10134 #include <stdlib.h>
10135
10136 int 
10137 main ()
10138 {
10139   unsigned int major, minor, micro;
10140   char *tmp_version;
10141
10142   fclose (fopen ("conf.glibtest", "w"));
10143
10144   /* HP/UX 9 (%@#!) writes to sscanf strings */
10145   tmp_version = g_strdup("$min_glib_version");
10146   if (sscanf(tmp_version, "%u.%u.%u", &major, &minor, &micro) != 3) {
10147      printf("%s, bad version string\n", "$min_glib_version");
10148      exit(1);
10149    }
10150
10151   if ((glib_major_version != $glib_config_major_version) ||
10152       (glib_minor_version != $glib_config_minor_version) ||
10153       (glib_micro_version != $glib_config_micro_version))
10154     {
10155       printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n", 
10156              $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
10157              glib_major_version, glib_minor_version, glib_micro_version);
10158       printf ("*** was found! If pkg-config was correct, then it is best\n");
10159       printf ("*** to remove the old version of GLib. You may also be able to fix the error\n");
10160       printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
10161       printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
10162       printf("*** required on your system.\n");
10163       printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
10164       printf("*** to point to the correct configuration files\n");
10165     } 
10166   else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
10167            (glib_minor_version != GLIB_MINOR_VERSION) ||
10168            (glib_micro_version != GLIB_MICRO_VERSION))
10169     {
10170       printf("*** GLIB header files (version %d.%d.%d) do not match\n",
10171              GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
10172       printf("*** library (version %d.%d.%d)\n",
10173              glib_major_version, glib_minor_version, glib_micro_version);
10174     }
10175   else
10176     {
10177       if ((glib_major_version > major) ||
10178         ((glib_major_version == major) && (glib_minor_version > minor)) ||
10179         ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
10180       {
10181         return 0;
10182        }
10183      else
10184       {
10185         printf("\n*** An old version of GLIB (%u.%u.%u) was found.\n",
10186                glib_major_version, glib_minor_version, glib_micro_version);
10187         printf("*** You need a version of GLIB newer than %u.%u.%u. The latest version of\n",
10188                major, minor, micro);
10189         printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
10190         printf("***\n");
10191         printf("*** If you have already installed a sufficiently new version, this error\n");
10192         printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
10193         printf("*** being found. The easiest way to fix this is to remove the old version\n");
10194         printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n");
10195         printf("*** correct copy of pkg-config. (In this case, you will have to\n");
10196         printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
10197         printf("*** so that the correct libraries are found at run-time))\n");
10198       }
10199     }
10200   return 1;
10201 }
10202 ],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
10203        CFLAGS="$ac_save_CFLAGS"
10204        LIBS="$ac_save_LIBS"
10205      fi
10206   fi
10207   if test "x$no_glib" = x ; then
10208      AC_MSG_RESULT(yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version))
10209      ifelse([$2], , :, [$2])     
10210   else
10211      AC_MSG_RESULT(no)
10212      if test "$PKG_CONFIG" = "no" ; then
10213        echo "*** A new enough version of pkg-config was not found."
10214        echo "*** See http://www.freedesktop.org/software/pkgconfig/"
10215      else
10216        if test -f conf.glibtest ; then
10217         :
10218        else
10219           echo "*** Could not run GLIB test program, checking why..."
10220           ac_save_CFLAGS="$CFLAGS"
10221           ac_save_LIBS="$LIBS"
10222           CFLAGS="$CFLAGS $GLIB_CFLAGS"
10223           LIBS="$LIBS $GLIB_LIBS"
10224           AC_TRY_LINK([
10225 #include <glib.h>
10226 #include <stdio.h>
10227 ],      [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
10228         [ echo "*** The test program compiled, but did not run. This usually means"
10229           echo "*** that the run-time linker is not finding GLIB or finding the wrong"
10230           echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
10231           echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
10232           echo "*** to the installed location  Also, make sure you have run ldconfig if that"
10233           echo "*** is required on your system"
10234           echo "***"
10235           echo "*** If you have an old version installed, it is best to remove it, although"
10236           echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
10237         [ echo "*** The test program failed to compile or link. See the file config.log for the"
10238           echo "*** exact error that occured. This usually means GLIB is incorrectly installed."])
10239           CFLAGS="$ac_save_CFLAGS"
10240           LIBS="$ac_save_LIBS"
10241        fi
10242      fi
10243      GLIB_CFLAGS=""
10244      GLIB_LIBS=""
10245      GLIB_GENMARSHAL=""
10246      GOBJECT_QUERY=""
10247      GLIB_MKENUMS=""
10248      GLIB_COMPILE_RESOURCES=""
10249      ifelse([$3], , :, [$3])
10250   fi
10251   AC_SUBST(GLIB_CFLAGS)
10252   AC_SUBST(GLIB_LIBS)
10253   AC_SUBST(GLIB_GENMARSHAL)
10254   AC_SUBST(GOBJECT_QUERY)
10255   AC_SUBST(GLIB_MKENUMS)
10256   AC_SUBST(GLIB_COMPILE_RESOURCES)
10257   rm -f conf.glibtest
10258 ])
10259
10260 dnl GNOME_CODE_COVERAGE
10261 dnl
10262 dnl Defines CODE_COVERAGE_CFLAGS and CODE_COVERAGE_LDFLAGS which should be
10263 dnl included in the CFLAGS and LIBS/LDFLAGS variables of every build target
10264 dnl (program or library) which should be built with code coverage support.
10265 dnl Also defines GNOME_CODE_COVERAGE_RULES which should be substituted in your
10266 dnl Makefile; and $enable_code_coverage which can be used in subsequent
10267 dnl configure output.
10268 dnl
10269 dnl Note that all optimisation flags in CFLAGS must be disabled when code
10270 dnl coverage is enabled.
10271 dnl
10272 dnl Derived from Makefile.decl in GLib, originally licenced under LGPLv2.1+.
10273 dnl This file is licenced under LGPLv2.1+.
10274 dnl
10275 dnl Usage example:
10276 dnl configure.ac:
10277 dnl    GNOME_CODE_COVERAGE
10278 dnl
10279 dnl Makefile.am:
10280 dnl    @GNOME_CODE_COVERAGE_RULES@
10281 dnl    my_program_LIBS = … $(CODE_COVERAGE_LDFLAGS) …
10282 dnl    my_program_CFLAGS = … $(CODE_COVERAGE_CFLAGS) …
10283 dnl
10284 dnl This results in a “check-code-coverage” rule being added to any Makefile.am
10285 dnl which includes “@GNOME_CODE_COVERAGE_RULES@” (assuming the module has been
10286 dnl configured with --enable-code-coverage). Running `make check-code-coverage`
10287 dnl in that directory will run the module’s test suite (`make check`) and build
10288 dnl a code coverage report detailing the code which was touched, then print the
10289 dnl URI for the report.
10290
10291 AC_DEFUN([GNOME_CODE_COVERAGE],[
10292         dnl Check for --enable-code-coverage
10293         AC_MSG_CHECKING([whether to build with code coverage support])
10294         AC_ARG_ENABLE([code-coverage], AS_HELP_STRING([--enable-code-coverage], [Whether to enable code coverage support]),, enable_code_coverage=no)
10295         AM_CONDITIONAL([CODE_COVERAGE_ENABLED], [test x$enable_code_coverage = xyes])
10296         AC_SUBST([CODE_COVERAGE_ENABLED], [$enable_code_coverage])
10297         AC_MSG_RESULT($enable_code_coverage)
10298
10299         AS_IF([ test "$enable_code_coverage" = "yes" ], [
10300                 dnl Check if gcc is being used
10301                 AS_IF([ test "$GCC" = "no" ], [
10302                         AC_MSG_ERROR([not compiling with gcc, which is required for gcov code coverage])
10303                 ])
10304
10305                 # List of supported lcov versions.
10306                 lcov_version_list="1.6 1.7 1.8 1.9 1.10"
10307
10308                 AC_CHECK_PROG([LCOV], [lcov], [lcov])
10309                 AC_CHECK_PROG([GENHTML], [genhtml], [genhtml])
10310
10311                 AS_IF([ test "$LCOV" ], [
10312                         AC_CACHE_CHECK([for lcov version], gnome_cv_lcov_version, [
10313                                 gnome_cv_lcov_version=invalid
10314                                 lcov_version=`$LCOV -v 2>/dev/null | $SED -e 's/^.* //'`
10315                                 for lcov_check_version in $lcov_version_list; do
10316                                         if test "$lcov_version" = "$lcov_check_version"; then
10317                                                 gnome_cv_lcov_version="$lcov_check_version (ok)"
10318                                         fi
10319                                 done
10320                         ])
10321                 ], [
10322                         lcov_msg="To enable code coverage reporting you must have one of the following lcov versions installed: $lcov_version_list"
10323                         AC_MSG_ERROR([$lcov_msg])
10324                 ])
10325
10326                 case $gnome_cv_lcov_version in
10327                         ""|invalid[)]
10328                                 lcov_msg="You must have one of the following versions of lcov: $lcov_version_list (found: $lcov_version)."
10329                                 AC_MSG_ERROR([$lcov_msg])
10330                                 LCOV="exit 0;"
10331                         ;;
10332                 esac
10333
10334                 AS_IF([ test -z "$GENHTML" ], [
10335                         AC_MSG_ERROR([Could not find genhtml from the lcov package])
10336                 ])
10337
10338                 dnl Build the code coverage flags
10339                 CODE_COVERAGE_CFLAGS="-O0 -g -fprofile-arcs -ftest-coverage"
10340                 CODE_COVERAGE_LDFLAGS="-lgcov"
10341
10342                 AC_SUBST([CODE_COVERAGE_CFLAGS])
10343                 AC_SUBST([CODE_COVERAGE_LDFLAGS])
10344         ])
10345
10346 GNOME_CODE_COVERAGE_RULES='
10347 # Code coverage
10348 #
10349 # Optional:
10350 #  - CODE_COVERAGE_DIRECTORY: Top-level directory for code coverage reporting.
10351 #    (Default: $(top_builddir))
10352 #  - CODE_COVERAGE_OUTPUT_FILE: Filename and path for the .info file generated
10353 #    by lcov for code coverage. (Default:
10354 #    $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info)
10355 #  - CODE_COVERAGE_OUTPUT_DIRECTORY: Directory for generated code coverage
10356 #    reports to be created. (Default:
10357 #    $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage)
10358 #  - CODE_COVERAGE_LCOV_OPTIONS: Extra options to pass to the lcov instance.
10359 #    (Default: empty)
10360 #  - CODE_COVERAGE_GENHTML_OPTIONS: Extra options to pass to the genhtml
10361 #    instance. (Default: empty)
10362 #  - CODE_COVERAGE_IGNORE_PATTERN: Extra glob pattern of files to ignore
10363 #
10364 # The generated report will be titled using the $(PACKAGE_NAME) and
10365 # $(PACKAGE_VERSION). In order to add the current git hash to the title,
10366 # use the git-version-gen script, available online.
10367
10368 # Optional variables
10369 CODE_COVERAGE_DIRECTORY ?= $(top_builddir)
10370 CODE_COVERAGE_OUTPUT_FILE ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info
10371 CODE_COVERAGE_OUTPUT_DIRECTORY ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage
10372 CODE_COVERAGE_LCOV_OPTIONS ?=
10373 CODE_COVERAGE_GENHTML_OPTIONS ?=
10374 CODE_COVERAGE_IGNORE_PATTERN ?=
10375
10376 code_coverage_quiet = $(code_coverage_quiet_$(V))
10377 code_coverage_quiet_ = $(code_coverage_quiet_$(AM_DEFAULT_VERBOSITY))
10378 code_coverage_quiet_0 = --quiet
10379
10380 # Use recursive makes in order to ignore errors during check
10381 check-code-coverage:
10382 ifeq ($(CODE_COVERAGE_ENABLED),yes)
10383         -$(MAKE) $(AM_MAKEFLAGS) -k check
10384         $(MAKE) $(AM_MAKEFLAGS) code-coverage-capture
10385 else
10386         @echo "Need to reconfigure with --enable-code-coverage"
10387 endif
10388
10389 # Capture code coverage data
10390 code-coverage-capture: code-coverage-capture-hook
10391 ifeq ($(CODE_COVERAGE_ENABLED),yes)
10392         $(LCOV) $(code_coverage_quiet) --directory $(CODE_COVERAGE_DIRECTORY) --capture --output-file "$(CODE_COVERAGE_OUTPUT_FILE).tmp" --test-name "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" --no-checksum --compat-libtool $(CODE_COVERAGE_LCOV_OPTIONS)
10393         $(LCOV) $(code_coverage_quiet) --directory $(CODE_COVERAGE_DIRECTORY) --remove "$(CODE_COVERAGE_OUTPUT_FILE).tmp" "/tmp/*" $(CODE_COVERAGE_IGNORE_PATTERN) --output-file "$(CODE_COVERAGE_OUTPUT_FILE)"
10394         -@rm -f $(CODE_COVERAGE_OUTPUT_FILE).tmp
10395         LANG=C $(GENHTML) $(code_coverage_quiet) --prefix $(CODE_COVERAGE_DIRECTORY) --output-directory "$(CODE_COVERAGE_OUTPUT_DIRECTORY)" --title "$(PACKAGE_NAME)-$(PACKAGE_VERSION) Code Coverage" --legend --show-details "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_GENHTML_OPTIONS)
10396         @echo "file://$(abs_builddir)/$(CODE_COVERAGE_OUTPUT_DIRECTORY)/index.html"
10397 else
10398         @echo "Need to reconfigure with --enable-code-coverage"
10399 endif
10400
10401 # Hook rule executed before code-coverage-capture, overridable by the user
10402 code-coverage-capture-hook:
10403
10404 ifeq ($(CODE_COVERAGE_ENABLED),yes)
10405 clean: code-coverage-clean
10406 code-coverage-clean:
10407         -$(LCOV) --directory $(top_builddir) -z
10408         -rm -rf $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_FILE).tmp $(CODE_COVERAGE_OUTPUT_DIRECTORY)
10409         -find . -name "*.gcda" -o -name "*.gcov" -delete
10410 endif
10411
10412 GITIGNOREFILES ?=
10413 GITIGNOREFILES += $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_DIRECTORY)
10414
10415 DISTCHECK_CONFIGURE_FLAGS ?=
10416 DISTCHECK_CONFIGURE_FLAGS += --disable-code-coverage
10417
10418 .PHONY: check-code-coverage code-coverage-capture code-coverage-capture-hook code-coverage-clean
10419 '
10420
10421         AC_SUBST([GNOME_CODE_COVERAGE_RULES])
10422         m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([GNOME_CODE_COVERAGE_RULES])])
10423 ])
10424
10425 dnl GNOME_COMPILE_WARNINGS
10426 dnl Turn on many useful compiler warnings and substitute the result into
10427 dnl WARN_CFLAGS
10428 dnl For now, only works on GCC
10429 AC_DEFUN([GNOME_COMPILE_WARNINGS],[
10430     dnl ******************************
10431     dnl More compiler warnings
10432     dnl ******************************
10433
10434     AC_ARG_ENABLE(compile-warnings, 
10435                   AC_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
10436                                  [Turn on compiler warnings]),,
10437                   [enable_compile_warnings="m4_default([$1],[yes])"])
10438
10439     if test "x$GCC" != xyes; then
10440         enable_compile_warnings=no
10441     fi
10442
10443     warning_flags=
10444     realsave_CFLAGS="$CFLAGS"
10445
10446     dnl These are warning flags that aren't marked as fatal.  Can be
10447     dnl overridden on a per-project basis with -Wno-foo.
10448     base_warn_flags=" \
10449         -Wall \
10450         -Wstrict-prototypes \
10451         -Wnested-externs \
10452     "
10453
10454     dnl These compiler flags typically indicate very broken or suspicious
10455     dnl code.  Some of them such as implicit-function-declaration are
10456     dnl just not default because gcc compiles a lot of legacy code.
10457     dnl We choose to make this set into explicit errors.
10458     base_error_flags=" \
10459         -Werror=missing-prototypes \
10460         -Werror=implicit-function-declaration \
10461         -Werror=pointer-arith \
10462         -Werror=init-self \
10463         -Werror=format-security \
10464         -Werror=format=2 \
10465         -Werror=missing-include-dirs \
10466     "
10467
10468     case "$enable_compile_warnings" in
10469     no)
10470         warning_flags=
10471         ;;
10472     minimum)
10473         warning_flags="-Wall"
10474         ;;
10475     yes)
10476         warning_flags="$base_warn_flags $base_error_flags"
10477         ;;
10478     maximum|error)
10479         warning_flags="$base_warn_flags $base_error_flags"
10480         ;;
10481     *)
10482         AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
10483         ;;
10484     esac
10485
10486     if test "$enable_compile_warnings" = "error" ; then
10487         warning_flags="$warning_flags -Werror"
10488     fi
10489
10490     dnl Check whether GCC supports the warning options
10491     for option in $warning_flags; do
10492         save_CFLAGS="$CFLAGS"
10493         CFLAGS="$CFLAGS $option"
10494         AC_MSG_CHECKING([whether gcc understands $option])
10495         AC_TRY_COMPILE([], [],
10496             has_option=yes,
10497             has_option=no,)
10498         CFLAGS="$save_CFLAGS"
10499         AC_MSG_RESULT([$has_option])
10500         if test $has_option = yes; then
10501             tested_warning_flags="$tested_warning_flags $option"
10502         fi
10503         unset has_option
10504         unset save_CFLAGS
10505     done
10506     unset option
10507     CFLAGS="$realsave_CFLAGS"
10508     AC_MSG_CHECKING(what warning flags to pass to the C compiler)
10509     AC_MSG_RESULT($tested_warning_flags)
10510
10511     AC_ARG_ENABLE(iso-c,
10512                   AC_HELP_STRING([--enable-iso-c],
10513                                  [Try to warn if code is not ISO C ]),,
10514                   [enable_iso_c=no])
10515
10516     AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
10517     complCFLAGS=
10518     if test "x$enable_iso_c" != "xno"; then
10519         if test "x$GCC" = "xyes"; then
10520         case " $CFLAGS " in
10521             *[\ \       ]-ansi[\ \      ]*) ;;
10522             *) complCFLAGS="$complCFLAGS -ansi" ;;
10523         esac
10524         case " $CFLAGS " in
10525             *[\ \       ]-pedantic[\ \  ]*) ;;
10526             *) complCFLAGS="$complCFLAGS -pedantic" ;;
10527         esac
10528         fi
10529     fi
10530     AC_MSG_RESULT($complCFLAGS)
10531
10532     WARN_CFLAGS="$tested_warning_flags $complCFLAGS"
10533     AC_SUBST(WARN_CFLAGS)
10534 ])
10535
10536 dnl For C++, do basically the same thing.
10537
10538 AC_DEFUN([GNOME_CXX_WARNINGS],[
10539   AC_ARG_ENABLE(cxx-warnings,
10540                 AC_HELP_STRING([--enable-cxx-warnings=@<:@no/minimum/yes@:>@]
10541                                [Turn on compiler warnings.]),,
10542                 [enable_cxx_warnings="m4_default([$1],[minimum])"])
10543
10544   AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
10545   warnCXXFLAGS=
10546   if test "x$GXX" != xyes; then
10547     enable_cxx_warnings=no
10548   fi
10549   if test "x$enable_cxx_warnings" != "xno"; then
10550     if test "x$GXX" = "xyes"; then
10551       case " $CXXFLAGS " in
10552       *[\ \     ]-Wall[\ \      ]*) ;;
10553       *) warnCXXFLAGS="-Wall -Wno-unused" ;;
10554       esac
10555
10556       ## -W is not all that useful.  And it cannot be controlled
10557       ## with individual -Wno-xxx flags, unlike -Wall
10558       if test "x$enable_cxx_warnings" = "xyes"; then
10559         warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual"
10560       fi
10561     fi
10562   fi
10563   AC_MSG_RESULT($warnCXXFLAGS)
10564
10565    AC_ARG_ENABLE(iso-cxx,
10566                  AC_HELP_STRING([--enable-iso-cxx],
10567                                 [Try to warn if code is not ISO C++ ]),,
10568                  [enable_iso_cxx=no])
10569
10570    AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
10571    complCXXFLAGS=
10572    if test "x$enable_iso_cxx" != "xno"; then
10573      if test "x$GXX" = "xyes"; then
10574       case " $CXXFLAGS " in
10575       *[\ \     ]-ansi[\ \      ]*) ;;
10576       *) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
10577       esac
10578
10579       case " $CXXFLAGS " in
10580       *[\ \     ]-pedantic[\ \  ]*) ;;
10581       *) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
10582       esac
10583      fi
10584    fi
10585   AC_MSG_RESULT($complCXXFLAGS)
10586
10587   WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
10588   AC_SUBST(WARN_CXXFLAGS)
10589 ])
10590