521257a5c1d0796c876626761302c90ce2c4464c
[platform/upstream/pygobject2.git] / aclocal.m4
1 # generated automatically by aclocal 1.13.4 -*- Autoconf -*-
2
3 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
4
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
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-2013 Free Software Foundation, Inc.
24 #
25 # This file is free software; the Free Software Foundation
26 # gives unlimited permission to copy and/or distribute it,
27 # with or without modifications, as long as this notice is preserved.
28
29 # AM_AUTOMAKE_VERSION(VERSION)
30 # ----------------------------
31 # Automake X.Y traces this macro to ensure aclocal.m4 has been
32 # generated from the m4 files accompanying Automake X.Y.
33 # (This private macro should not be called outside this file.)
34 AC_DEFUN([AM_AUTOMAKE_VERSION],
35 [am__api_version='1.13'
36 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
37 dnl require some minimum version.  Point them to the right macro.
38 m4_if([$1], [1.13.4], [],
39       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
40 ])
41
42 # _AM_AUTOCONF_VERSION(VERSION)
43 # -----------------------------
44 # aclocal traces this macro to find the Autoconf version.
45 # This is a private macro too.  Using m4_define simplifies
46 # the logic in aclocal, which can simply ignore this definition.
47 m4_define([_AM_AUTOCONF_VERSION], [])
48
49 # AM_SET_CURRENT_AUTOMAKE_VERSION
50 # -------------------------------
51 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
52 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
53 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
54 [AM_AUTOMAKE_VERSION([1.13.4])dnl
55 m4_ifndef([AC_AUTOCONF_VERSION],
56   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
57 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
58
59 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
60
61 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
62 #
63 # This file is free software; the Free Software Foundation
64 # gives unlimited permission to copy and/or distribute it,
65 # with or without modifications, as long as this notice is preserved.
66
67 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
68 # $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
69 # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
70 #
71 # Of course, Automake must honor this variable whenever it calls a
72 # tool from the auxiliary directory.  The problem is that $srcdir (and
73 # therefore $ac_aux_dir as well) can be either absolute or relative,
74 # depending on how configure is run.  This is pretty annoying, since
75 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
76 # source directory, any form will work fine, but in subdirectories a
77 # relative path needs to be adjusted first.
78 #
79 # $ac_aux_dir/missing
80 #    fails when called from a subdirectory if $ac_aux_dir is relative
81 # $top_srcdir/$ac_aux_dir/missing
82 #    fails if $ac_aux_dir is absolute,
83 #    fails when called from a subdirectory in a VPATH build with
84 #          a relative $ac_aux_dir
85 #
86 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
87 # are both prefixed by $srcdir.  In an in-source build this is usually
88 # harmless because $srcdir is '.', but things will broke when you
89 # start a VPATH build or use an absolute $srcdir.
90 #
91 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
92 # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
93 #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
94 # and then we would define $MISSING as
95 #   MISSING="\${SHELL} $am_aux_dir/missing"
96 # This will work as long as MISSING is not called from configure, because
97 # unfortunately $(top_srcdir) has no meaning in configure.
98 # However there are other variables, like CC, which are often used in
99 # configure, and could therefore not use this "fixed" $ac_aux_dir.
100 #
101 # Another solution, used here, is to always expand $ac_aux_dir to an
102 # absolute PATH.  The drawback is that using absolute paths prevent a
103 # configured tree to be moved without reconfiguration.
104
105 AC_DEFUN([AM_AUX_DIR_EXPAND],
106 [dnl Rely on autoconf to set up CDPATH properly.
107 AC_PREREQ([2.50])dnl
108 # expand $ac_aux_dir to an absolute path
109 am_aux_dir=`cd $ac_aux_dir && pwd`
110 ])
111
112 # AM_CONDITIONAL                                            -*- Autoconf -*-
113
114 # Copyright (C) 1997-2013 Free Software Foundation, Inc.
115 #
116 # This file is free software; the Free Software Foundation
117 # gives unlimited permission to copy and/or distribute it,
118 # with or without modifications, as long as this notice is preserved.
119
120 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
121 # -------------------------------------
122 # Define a conditional.
123 AC_DEFUN([AM_CONDITIONAL],
124 [AC_PREREQ([2.52])dnl
125  m4_if([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
126        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
127 AC_SUBST([$1_TRUE])dnl
128 AC_SUBST([$1_FALSE])dnl
129 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
130 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
131 m4_define([_AM_COND_VALUE_$1], [$2])dnl
132 if $2; then
133   $1_TRUE=
134   $1_FALSE='#'
135 else
136   $1_TRUE='#'
137   $1_FALSE=
138 fi
139 AC_CONFIG_COMMANDS_PRE(
140 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
141   AC_MSG_ERROR([[conditional "$1" was never defined.
142 Usually this means the macro was only invoked conditionally.]])
143 fi])])
144
145 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
146 #
147 # This file is free software; the Free Software Foundation
148 # gives unlimited permission to copy and/or distribute it,
149 # with or without modifications, as long as this notice is preserved.
150
151
152 # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
153 # written in clear, in which case automake, when reading aclocal.m4,
154 # will think it sees a *use*, and therefore will trigger all it's
155 # C support machinery.  Also note that it means that autoscan, seeing
156 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
157
158
159 # _AM_DEPENDENCIES(NAME)
160 # ----------------------
161 # See how the compiler implements dependency checking.
162 # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
163 # We try a few techniques and use that to set a single cache variable.
164 #
165 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
166 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
167 # dependency, and given that the user is not expected to run this macro,
168 # just rely on AC_PROG_CC.
169 AC_DEFUN([_AM_DEPENDENCIES],
170 [AC_REQUIRE([AM_SET_DEPDIR])dnl
171 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
172 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
173 AC_REQUIRE([AM_DEP_TRACK])dnl
174
175 m4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
176       [$1], [CXX],  [depcc="$CXX"  am_compiler_list=],
177       [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
178       [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
179       [$1], [UPC],  [depcc="$UPC"  am_compiler_list=],
180       [$1], [GCJ],  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
181                     [depcc="$$1"   am_compiler_list=])
182
183 AC_CACHE_CHECK([dependency style of $depcc],
184                [am_cv_$1_dependencies_compiler_type],
185 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
186   # We make a subdir and do the tests there.  Otherwise we can end up
187   # making bogus files that we don't know about and never remove.  For
188   # instance it was reported that on HP-UX the gcc test will end up
189   # making a dummy file named 'D' -- because '-MD' means "put the output
190   # in D".
191   rm -rf conftest.dir
192   mkdir conftest.dir
193   # Copy depcomp to subdir because otherwise we won't find it if we're
194   # using a relative directory.
195   cp "$am_depcomp" conftest.dir
196   cd conftest.dir
197   # We will build objects and dependencies in a subdirectory because
198   # it helps to detect inapplicable dependency modes.  For instance
199   # both Tru64's cc and ICC support -MD to output dependencies as a
200   # side effect of compilation, but ICC will put the dependencies in
201   # the current directory while Tru64 will put them in the object
202   # directory.
203   mkdir sub
204
205   am_cv_$1_dependencies_compiler_type=none
206   if test "$am_compiler_list" = ""; then
207      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
208   fi
209   am__universal=false
210   m4_case([$1], [CC],
211     [case " $depcc " in #(
212      *\ -arch\ *\ -arch\ *) am__universal=true ;;
213      esac],
214     [CXX],
215     [case " $depcc " in #(
216      *\ -arch\ *\ -arch\ *) am__universal=true ;;
217      esac])
218
219   for depmode in $am_compiler_list; do
220     # Setup a source with many dependencies, because some compilers
221     # like to wrap large dependency lists on column 80 (with \), and
222     # we should not choose a depcomp mode which is confused by this.
223     #
224     # We need to recreate these files for each test, as the compiler may
225     # overwrite some of them when testing with obscure command lines.
226     # This happens at least with the AIX C compiler.
227     : > sub/conftest.c
228     for i in 1 2 3 4 5 6; do
229       echo '#include "conftst'$i'.h"' >> sub/conftest.c
230       # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
231       # Solaris 10 /bin/sh.
232       echo '/* dummy */' > sub/conftst$i.h
233     done
234     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
235
236     # We check with '-c' and '-o' for the sake of the "dashmstdout"
237     # mode.  It turns out that the SunPro C++ compiler does not properly
238     # handle '-M -o', and we need to detect this.  Also, some Intel
239     # versions had trouble with output in subdirs.
240     am__obj=sub/conftest.${OBJEXT-o}
241     am__minus_obj="-o $am__obj"
242     case $depmode in
243     gcc)
244       # This depmode causes a compiler race in universal mode.
245       test "$am__universal" = false || continue
246       ;;
247     nosideeffect)
248       # After this tag, mechanisms are not by side-effect, so they'll
249       # only be used when explicitly requested.
250       if test "x$enable_dependency_tracking" = xyes; then
251         continue
252       else
253         break
254       fi
255       ;;
256     msvc7 | msvc7msys | msvisualcpp | msvcmsys)
257       # This compiler won't grok '-c -o', but also, the minuso test has
258       # not run yet.  These depmodes are late enough in the game, and
259       # so weak that their functioning should not be impacted.
260       am__obj=conftest.${OBJEXT-o}
261       am__minus_obj=
262       ;;
263     none) break ;;
264     esac
265     if depmode=$depmode \
266        source=sub/conftest.c object=$am__obj \
267        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
268        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
269          >/dev/null 2>conftest.err &&
270        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
271        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
272        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
273        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
274       # icc doesn't choke on unknown options, it will just issue warnings
275       # or remarks (even with -Werror).  So we grep stderr for any message
276       # that says an option was ignored or not supported.
277       # When given -MP, icc 7.0 and 7.1 complain thusly:
278       #   icc: Command line warning: ignoring option '-M'; no argument required
279       # The diagnosis changed in icc 8.0:
280       #   icc: Command line remark: option '-MP' not supported
281       if (grep 'ignoring option' conftest.err ||
282           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
283         am_cv_$1_dependencies_compiler_type=$depmode
284         break
285       fi
286     fi
287   done
288
289   cd ..
290   rm -rf conftest.dir
291 else
292   am_cv_$1_dependencies_compiler_type=none
293 fi
294 ])
295 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
296 AM_CONDITIONAL([am__fastdep$1], [
297   test "x$enable_dependency_tracking" != xno \
298   && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
299 ])
300
301
302 # AM_SET_DEPDIR
303 # -------------
304 # Choose a directory name for dependency files.
305 # This macro is AC_REQUIREd in _AM_DEPENDENCIES.
306 AC_DEFUN([AM_SET_DEPDIR],
307 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
308 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
309 ])
310
311
312 # AM_DEP_TRACK
313 # ------------
314 AC_DEFUN([AM_DEP_TRACK],
315 [AC_ARG_ENABLE([dependency-tracking], [dnl
316 AS_HELP_STRING(
317   [--enable-dependency-tracking],
318   [do not reject slow dependency extractors])
319 AS_HELP_STRING(
320   [--disable-dependency-tracking],
321   [speeds up one-time build])])
322 if test "x$enable_dependency_tracking" != xno; then
323   am_depcomp="$ac_aux_dir/depcomp"
324   AMDEPBACKSLASH='\'
325   am__nodep='_no'
326 fi
327 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
328 AC_SUBST([AMDEPBACKSLASH])dnl
329 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
330 AC_SUBST([am__nodep])dnl
331 _AM_SUBST_NOTMAKE([am__nodep])dnl
332 ])
333
334 # Generate code to set up dependency tracking.              -*- Autoconf -*-
335
336 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
337 #
338 # This file is free software; the Free Software Foundation
339 # gives unlimited permission to copy and/or distribute it,
340 # with or without modifications, as long as this notice is preserved.
341
342
343 # _AM_OUTPUT_DEPENDENCY_COMMANDS
344 # ------------------------------
345 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
346 [{
347   # Older Autoconf quotes --file arguments for eval, but not when files
348   # are listed without --file.  Let's play safe and only enable the eval
349   # if we detect the quoting.
350   case $CONFIG_FILES in
351   *\'*) eval set x "$CONFIG_FILES" ;;
352   *)   set x $CONFIG_FILES ;;
353   esac
354   shift
355   for mf
356   do
357     # Strip MF so we end up with the name of the file.
358     mf=`echo "$mf" | sed -e 's/:.*$//'`
359     # Check whether this is an Automake generated Makefile or not.
360     # We used to match only the files named 'Makefile.in', but
361     # some people rename them; so instead we look at the file content.
362     # Grep'ing the first line is not enough: some people post-process
363     # each Makefile.in and add a new line on top of each file to say so.
364     # Grep'ing the whole file is not good either: AIX grep has a line
365     # limit of 2048, but all sed's we know have understand at least 4000.
366     if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
367       dirpart=`AS_DIRNAME("$mf")`
368     else
369       continue
370     fi
371     # Extract the definition of DEPDIR, am__include, and am__quote
372     # from the Makefile without running 'make'.
373     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
374     test -z "$DEPDIR" && continue
375     am__include=`sed -n 's/^am__include = //p' < "$mf"`
376     test -z "$am__include" && continue
377     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
378     # Find all dependency output files, they are included files with
379     # $(DEPDIR) in their names.  We invoke sed twice because it is the
380     # simplest approach to changing $(DEPDIR) to its actual value in the
381     # expansion.
382     for file in `sed -n "
383       s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
384          sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
385       # Make sure the directory exists.
386       test -f "$dirpart/$file" && continue
387       fdir=`AS_DIRNAME(["$file"])`
388       AS_MKDIR_P([$dirpart/$fdir])
389       # echo "creating $dirpart/$file"
390       echo '# dummy' > "$dirpart/$file"
391     done
392   done
393 }
394 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
395
396
397 # AM_OUTPUT_DEPENDENCY_COMMANDS
398 # -----------------------------
399 # This macro should only be invoked once -- use via AC_REQUIRE.
400 #
401 # This code is only required when automatic dependency tracking
402 # is enabled.  FIXME.  This creates each '.P' file that we will
403 # need in order to bootstrap the dependency handling code.
404 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
405 [AC_CONFIG_COMMANDS([depfiles],
406      [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
407      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
408 ])
409
410 # Do all the work for Automake.                             -*- Autoconf -*-
411
412 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
413 #
414 # This file is free software; the Free Software Foundation
415 # gives unlimited permission to copy and/or distribute it,
416 # with or without modifications, as long as this notice is preserved.
417
418 # This macro actually does too much.  Some checks are only needed if
419 # your package does certain things.  But this isn't really a big deal.
420
421 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
422 # AM_INIT_AUTOMAKE([OPTIONS])
423 # -----------------------------------------------
424 # The call with PACKAGE and VERSION arguments is the old style
425 # call (pre autoconf-2.50), which is being phased out.  PACKAGE
426 # and VERSION should now be passed to AC_INIT and removed from
427 # the call to AM_INIT_AUTOMAKE.
428 # We support both call styles for the transition.  After
429 # the next Automake release, Autoconf can make the AC_INIT
430 # arguments mandatory, and then we can depend on a new Autoconf
431 # release and drop the old call support.
432 AC_DEFUN([AM_INIT_AUTOMAKE],
433 [AC_PREREQ([2.65])dnl
434 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
435 dnl the ones we care about.
436 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
437 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
438 AC_REQUIRE([AC_PROG_INSTALL])dnl
439 if test "`cd $srcdir && pwd`" != "`pwd`"; then
440   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
441   # is not polluted with repeated "-I."
442   AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
443   # test to see if srcdir already configured
444   if test -f $srcdir/config.status; then
445     AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
446   fi
447 fi
448
449 # test whether we have cygpath
450 if test -z "$CYGPATH_W"; then
451   if (cygpath --version) >/dev/null 2>/dev/null; then
452     CYGPATH_W='cygpath -w'
453   else
454     CYGPATH_W=echo
455   fi
456 fi
457 AC_SUBST([CYGPATH_W])
458
459 # Define the identity of the package.
460 dnl Distinguish between old-style and new-style calls.
461 m4_ifval([$2],
462 [AC_DIAGNOSE([obsolete],
463              [$0: two- and three-arguments forms are deprecated.])
464 m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
465  AC_SUBST([PACKAGE], [$1])dnl
466  AC_SUBST([VERSION], [$2])],
467 [_AM_SET_OPTIONS([$1])dnl
468 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
469 m4_if(
470   m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
471   [ok:ok],,
472   [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
473  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
474  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
475
476 _AM_IF_OPTION([no-define],,
477 [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
478  AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
479
480 # Some tools Automake needs.
481 AC_REQUIRE([AM_SANITY_CHECK])dnl
482 AC_REQUIRE([AC_ARG_PROGRAM])dnl
483 AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
484 AM_MISSING_PROG([AUTOCONF], [autoconf])
485 AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
486 AM_MISSING_PROG([AUTOHEADER], [autoheader])
487 AM_MISSING_PROG([MAKEINFO], [makeinfo])
488 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
489 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
490 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
491 # For better backward compatibility.  To be removed once Automake 1.9.x
492 # dies out for good.  For more background, see:
493 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
494 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
495 AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
496 # We need awk for the "check" target.  The system "awk" is bad on
497 # some platforms.
498 AC_REQUIRE([AC_PROG_AWK])dnl
499 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
500 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
501 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
502               [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
503                              [_AM_PROG_TAR([v7])])])
504 _AM_IF_OPTION([no-dependencies],,
505 [AC_PROVIDE_IFELSE([AC_PROG_CC],
506                   [_AM_DEPENDENCIES([CC])],
507                   [m4_define([AC_PROG_CC],
508                              m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
509 AC_PROVIDE_IFELSE([AC_PROG_CXX],
510                   [_AM_DEPENDENCIES([CXX])],
511                   [m4_define([AC_PROG_CXX],
512                              m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
513 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
514                   [_AM_DEPENDENCIES([OBJC])],
515                   [m4_define([AC_PROG_OBJC],
516                              m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
517 AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
518                   [_AM_DEPENDENCIES([OBJCXX])],
519                   [m4_define([AC_PROG_OBJCXX],
520                              m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
521 ])
522 AC_REQUIRE([AM_SILENT_RULES])dnl
523 dnl The testsuite driver may need to know about EXEEXT, so add the
524 dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
525 dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
526 AC_CONFIG_COMMANDS_PRE(dnl
527 [m4_provide_if([_AM_COMPILER_EXEEXT],
528   [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
529 ])
530
531 dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
532 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
533 dnl mangled by Autoconf and run in a shell conditional statement.
534 m4_define([_AC_COMPILER_EXEEXT],
535 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
536
537
538 # When config.status generates a header, we must update the stamp-h file.
539 # This file resides in the same directory as the config header
540 # that is generated.  The stamp files are numbered to have different names.
541
542 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
543 # loop where config.status creates the headers, so we can generate
544 # our stamp files there.
545 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
546 [# Compute $1's index in $config_headers.
547 _am_arg=$1
548 _am_stamp_count=1
549 for _am_header in $config_headers :; do
550   case $_am_header in
551     $_am_arg | $_am_arg:* )
552       break ;;
553     * )
554       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
555   esac
556 done
557 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
558
559 # Copyright (C) 2001-2013 Free Software Foundation, 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 # AM_PROG_INSTALL_SH
566 # ------------------
567 # Define $install_sh.
568 AC_DEFUN([AM_PROG_INSTALL_SH],
569 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
570 if test x"${install_sh}" != xset; then
571   case $am_aux_dir in
572   *\ * | *\     *)
573     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
574   *)
575     install_sh="\${SHELL} $am_aux_dir/install-sh"
576   esac
577 fi
578 AC_SUBST([install_sh])])
579
580 # Copyright (C) 2003-2013 Free Software Foundation, Inc.
581 #
582 # This file is free software; the Free Software Foundation
583 # gives unlimited permission to copy and/or distribute it,
584 # with or without modifications, as long as this notice is preserved.
585
586 # Check whether the underlying file-system supports filenames
587 # with a leading dot.  For instance MS-DOS doesn't.
588 AC_DEFUN([AM_SET_LEADING_DOT],
589 [rm -rf .tst 2>/dev/null
590 mkdir .tst 2>/dev/null
591 if test -d .tst; then
592   am__leading_dot=.
593 else
594   am__leading_dot=_
595 fi
596 rmdir .tst 2>/dev/null
597 AC_SUBST([am__leading_dot])])
598
599 # Check to see how 'make' treats includes.                  -*- Autoconf -*-
600
601 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
602 #
603 # This file is free software; the Free Software Foundation
604 # gives unlimited permission to copy and/or distribute it,
605 # with or without modifications, as long as this notice is preserved.
606
607 # AM_MAKE_INCLUDE()
608 # -----------------
609 # Check to see how make treats includes.
610 AC_DEFUN([AM_MAKE_INCLUDE],
611 [am_make=${MAKE-make}
612 cat > confinc << 'END'
613 am__doit:
614         @echo this is the am__doit target
615 .PHONY: am__doit
616 END
617 # If we don't find an include directive, just comment out the code.
618 AC_MSG_CHECKING([for style of include used by $am_make])
619 am__include="#"
620 am__quote=
621 _am_result=none
622 # First try GNU make style include.
623 echo "include confinc" > confmf
624 # Ignore all kinds of additional output from 'make'.
625 case `$am_make -s -f confmf 2> /dev/null` in #(
626 *the\ am__doit\ target*)
627   am__include=include
628   am__quote=
629   _am_result=GNU
630   ;;
631 esac
632 # Now try BSD make style include.
633 if test "$am__include" = "#"; then
634    echo '.include "confinc"' > confmf
635    case `$am_make -s -f confmf 2> /dev/null` in #(
636    *the\ am__doit\ target*)
637      am__include=.include
638      am__quote="\""
639      _am_result=BSD
640      ;;
641    esac
642 fi
643 AC_SUBST([am__include])
644 AC_SUBST([am__quote])
645 AC_MSG_RESULT([$_am_result])
646 rm -f confinc confmf
647 ])
648
649 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
650 #
651 # This file is free software; the Free Software Foundation
652 # gives unlimited permission to copy and/or distribute it,
653 # with or without modifications, as long as this notice is preserved.
654
655 # AM_PROG_CC_C_O
656 # --------------
657 # Like AC_PROG_CC_C_O, but changed for automake.
658 AC_DEFUN([AM_PROG_CC_C_O],
659 [AC_REQUIRE([AC_PROG_CC_C_O])dnl
660 AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
661 AC_REQUIRE_AUX_FILE([compile])dnl
662 # FIXME: we rely on the cache variable name because
663 # there is no other way.
664 set dummy $CC
665 am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
666 eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
667 if test "$am_t" != yes; then
668    # Losing compiler, so override with the script.
669    # FIXME: It is wrong to rewrite CC.
670    # But if we don't then we get into trouble of one sort or another.
671    # A longer-term fix would be to have automake use am__CC in this case,
672    # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
673    CC="$am_aux_dir/compile $CC"
674 fi
675 dnl Make sure AC_PROG_CC is never called again, or it will override our
676 dnl setting of CC.
677 m4_define([AC_PROG_CC],
678           [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
679 ])
680
681 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
682
683 # Copyright (C) 1997-2013 Free Software Foundation, Inc.
684 #
685 # This file is free software; the Free Software Foundation
686 # gives unlimited permission to copy and/or distribute it,
687 # with or without modifications, as long as this notice is preserved.
688
689 # AM_MISSING_PROG(NAME, PROGRAM)
690 # ------------------------------
691 AC_DEFUN([AM_MISSING_PROG],
692 [AC_REQUIRE([AM_MISSING_HAS_RUN])
693 $1=${$1-"${am_missing_run}$2"}
694 AC_SUBST($1)])
695
696 # AM_MISSING_HAS_RUN
697 # ------------------
698 # Define MISSING if not defined so far and test if it is modern enough.
699 # If it is, set am_missing_run to use it, otherwise, to nothing.
700 AC_DEFUN([AM_MISSING_HAS_RUN],
701 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
702 AC_REQUIRE_AUX_FILE([missing])dnl
703 if test x"${MISSING+set}" != xset; then
704   case $am_aux_dir in
705   *\ * | *\     *)
706     MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
707   *)
708     MISSING="\${SHELL} $am_aux_dir/missing" ;;
709   esac
710 fi
711 # Use eval to expand $SHELL
712 if eval "$MISSING --is-lightweight"; then
713   am_missing_run="$MISSING "
714 else
715   am_missing_run=
716   AC_MSG_WARN(['missing' script is too old or missing])
717 fi
718 ])
719
720 # Helper functions for option handling.                     -*- Autoconf -*-
721
722 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
723 #
724 # This file is free software; the Free Software Foundation
725 # gives unlimited permission to copy and/or distribute it,
726 # with or without modifications, as long as this notice is preserved.
727
728 # _AM_MANGLE_OPTION(NAME)
729 # -----------------------
730 AC_DEFUN([_AM_MANGLE_OPTION],
731 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
732
733 # _AM_SET_OPTION(NAME)
734 # --------------------
735 # Set option NAME.  Presently that only means defining a flag for this option.
736 AC_DEFUN([_AM_SET_OPTION],
737 [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
738
739 # _AM_SET_OPTIONS(OPTIONS)
740 # ------------------------
741 # OPTIONS is a space-separated list of Automake options.
742 AC_DEFUN([_AM_SET_OPTIONS],
743 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
744
745 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
746 # -------------------------------------------
747 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
748 AC_DEFUN([_AM_IF_OPTION],
749 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
750
751 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
752 #
753 # This file is free software; the Free Software Foundation
754 # gives unlimited permission to copy and/or distribute it,
755 # with or without modifications, as long as this notice is preserved.
756
757
758 # AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
759 # ---------------------------------------------------------------------------
760 # Adds support for distributing Python modules and packages.  To
761 # install modules, copy them to $(pythondir), using the python_PYTHON
762 # automake variable.  To install a package with the same name as the
763 # automake package, install to $(pkgpythondir), or use the
764 # pkgpython_PYTHON automake variable.
765 #
766 # The variables $(pyexecdir) and $(pkgpyexecdir) are provided as
767 # locations to install python extension modules (shared libraries).
768 # Another macro is required to find the appropriate flags to compile
769 # extension modules.
770 #
771 # If your package is configured with a different prefix to python,
772 # users will have to add the install directory to the PYTHONPATH
773 # environment variable, or create a .pth file (see the python
774 # documentation for details).
775 #
776 # If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will
777 # cause an error if the version of python installed on the system
778 # doesn't meet the requirement.  MINIMUM-VERSION should consist of
779 # numbers and dots only.
780 AC_DEFUN([AM_PATH_PYTHON],
781  [
782   dnl Find a Python interpreter.  Python versions prior to 2.0 are not
783   dnl supported. (2.0 was released on October 16, 2000).
784   m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
785 [python python2 python3 python3.3 python3.2 python3.1 python3.0 python2.7 dnl
786  python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0])
787
788   AC_ARG_VAR([PYTHON], [the Python interpreter])
789
790   m4_if([$1],[],[
791     dnl No version check is needed.
792     # Find any Python interpreter.
793     if test -z "$PYTHON"; then
794       AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :)
795     fi
796     am_display_PYTHON=python
797   ], [
798     dnl A version check is needed.
799     if test -n "$PYTHON"; then
800       # If the user set $PYTHON, use it and don't search something else.
801       AC_MSG_CHECKING([whether $PYTHON version is >= $1])
802       AM_PYTHON_CHECK_VERSION([$PYTHON], [$1],
803                               [AC_MSG_RESULT([yes])],
804                               [AC_MSG_RESULT([no])
805                                AC_MSG_ERROR([Python interpreter is too old])])
806       am_display_PYTHON=$PYTHON
807     else
808       # Otherwise, try each interpreter until we find one that satisfies
809       # VERSION.
810       AC_CACHE_CHECK([for a Python interpreter with version >= $1],
811         [am_cv_pathless_PYTHON],[
812         for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do
813           test "$am_cv_pathless_PYTHON" = none && break
814           AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break])
815         done])
816       # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
817       if test "$am_cv_pathless_PYTHON" = none; then
818         PYTHON=:
819       else
820         AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON])
821       fi
822       am_display_PYTHON=$am_cv_pathless_PYTHON
823     fi
824   ])
825
826   if test "$PYTHON" = :; then
827   dnl Run any user-specified action, or abort.
828     m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])])
829   else
830
831   dnl Query Python for its version number.  Getting [:3] seems to be
832   dnl the best way to do this; it's what "site.py" does in the standard
833   dnl library.
834
835   AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version],
836     [am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`])
837   AC_SUBST([PYTHON_VERSION], [$am_cv_python_version])
838
839   dnl Use the values of $prefix and $exec_prefix for the corresponding
840   dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX.  These are made
841   dnl distinct variables so they can be overridden if need be.  However,
842   dnl general consensus is that you shouldn't need this ability.
843
844   AC_SUBST([PYTHON_PREFIX], ['${prefix}'])
845   AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}'])
846
847   dnl At times (like when building shared libraries) you may want
848   dnl to know which OS platform Python thinks this is.
849
850   AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform],
851     [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`])
852   AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform])
853
854   # Just factor out some code duplication.
855   am_python_setup_sysconfig="\
856 import sys
857 # Prefer sysconfig over distutils.sysconfig, for better compatibility
858 # with python 3.x.  See automake bug#10227.
859 try:
860     import sysconfig
861 except ImportError:
862     can_use_sysconfig = 0
863 else:
864     can_use_sysconfig = 1
865 # Can't use sysconfig in CPython 2.7, since it's broken in virtualenvs:
866 # <https://github.com/pypa/virtualenv/issues/118>
867 try:
868     from platform import python_implementation
869     if python_implementation() == 'CPython' and sys.version[[:3]] == '2.7':
870         can_use_sysconfig = 0
871 except ImportError:
872     pass"
873
874   dnl Set up 4 directories:
875
876   dnl pythondir -- where to install python scripts.  This is the
877   dnl   site-packages directory, not the python standard library
878   dnl   directory like in previous automake betas.  This behavior
879   dnl   is more consistent with lispdir.m4 for example.
880   dnl Query distutils for this directory.
881   AC_CACHE_CHECK([for $am_display_PYTHON script directory],
882     [am_cv_python_pythondir],
883     [if test "x$prefix" = xNONE
884      then
885        am_py_prefix=$ac_default_prefix
886      else
887        am_py_prefix=$prefix
888      fi
889      am_cv_python_pythondir=`$PYTHON -c "
890 $am_python_setup_sysconfig
891 if can_use_sysconfig:
892     sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'})
893 else:
894     from distutils import sysconfig
895     sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix')
896 sys.stdout.write(sitedir)"`
897      case $am_cv_python_pythondir in
898      $am_py_prefix*)
899        am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
900        am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"`
901        ;;
902      *)
903        case $am_py_prefix in
904          /usr|/System*) ;;
905          *)
906           am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages
907           ;;
908        esac
909        ;;
910      esac
911     ])
912   AC_SUBST([pythondir], [$am_cv_python_pythondir])
913
914   dnl pkgpythondir -- $PACKAGE directory under pythondir.  Was
915   dnl   PYTHON_SITE_PACKAGE in previous betas, but this naming is
916   dnl   more consistent with the rest of automake.
917
918   AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE])
919
920   dnl pyexecdir -- directory for installing python extension modules
921   dnl   (shared libraries)
922   dnl Query distutils for this directory.
923   AC_CACHE_CHECK([for $am_display_PYTHON extension module directory],
924     [am_cv_python_pyexecdir],
925     [if test "x$exec_prefix" = xNONE
926      then
927        am_py_exec_prefix=$am_py_prefix
928      else
929        am_py_exec_prefix=$exec_prefix
930      fi
931      am_cv_python_pyexecdir=`$PYTHON -c "
932 $am_python_setup_sysconfig
933 if can_use_sysconfig:
934     sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_prefix'})
935 else:
936     from distutils import sysconfig
937     sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_prefix')
938 sys.stdout.write(sitedir)"`
939      case $am_cv_python_pyexecdir in
940      $am_py_exec_prefix*)
941        am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`
942        am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"`
943        ;;
944      *)
945        case $am_py_exec_prefix in
946          /usr|/System*) ;;
947          *)
948            am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages
949            ;;
950        esac
951        ;;
952      esac
953     ])
954   AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir])
955
956   dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE)
957
958   AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE])
959
960   dnl Run any user-specified action.
961   $2
962   fi
963
964 ])
965
966
967 # AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
968 # ---------------------------------------------------------------------------
969 # Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION.
970 # Run ACTION-IF-FALSE otherwise.
971 # This test uses sys.hexversion instead of the string equivalent (first
972 # word of sys.version), in order to cope with versions such as 2.2c1.
973 # This supports Python 2.0 or higher. (2.0 was released on October 16, 2000).
974 AC_DEFUN([AM_PYTHON_CHECK_VERSION],
975  [prog="import sys
976 # split strings by '.' and convert to numeric.  Append some zeros
977 # because we need at least 4 digits for the hex conversion.
978 # map returns an iterator in Python 3.0 and a list in 2.x
979 minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]]
980 minverhex = 0
981 # xrange is not present in Python 3.0 and range returns an iterator
982 for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]]
983 sys.exit(sys.hexversion < minverhex)"
984   AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])
985
986 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
987 #
988 # This file is free software; the Free Software Foundation
989 # gives unlimited permission to copy and/or distribute it,
990 # with or without modifications, as long as this notice is preserved.
991
992 # AM_RUN_LOG(COMMAND)
993 # -------------------
994 # Run COMMAND, save the exit status in ac_status, and log it.
995 # (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
996 AC_DEFUN([AM_RUN_LOG],
997 [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
998    ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
999    ac_status=$?
1000    echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1001    (exit $ac_status); }])
1002
1003 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
1004
1005 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
1006 #
1007 # This file is free software; the Free Software Foundation
1008 # gives unlimited permission to copy and/or distribute it,
1009 # with or without modifications, as long as this notice is preserved.
1010
1011 # AM_SANITY_CHECK
1012 # ---------------
1013 AC_DEFUN([AM_SANITY_CHECK],
1014 [AC_MSG_CHECKING([whether build environment is sane])
1015 # Reject unsafe characters in $srcdir or the absolute working directory
1016 # name.  Accept space and tab only in the latter.
1017 am_lf='
1018 '
1019 case `pwd` in
1020   *[[\\\"\#\$\&\'\`$am_lf]]*)
1021     AC_MSG_ERROR([unsafe absolute working directory name]);;
1022 esac
1023 case $srcdir in
1024   *[[\\\"\#\$\&\'\`$am_lf\ \    ]]*)
1025     AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
1026 esac
1027
1028 # Do 'set' in a subshell so we don't clobber the current shell's
1029 # arguments.  Must try -L first in case configure is actually a
1030 # symlink; some systems play weird games with the mod time of symlinks
1031 # (eg FreeBSD returns the mod time of the symlink's containing
1032 # directory).
1033 if (
1034    am_has_slept=no
1035    for am_try in 1 2; do
1036      echo "timestamp, slept: $am_has_slept" > conftest.file
1037      set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
1038      if test "$[*]" = "X"; then
1039         # -L didn't work.
1040         set X `ls -t "$srcdir/configure" conftest.file`
1041      fi
1042      if test "$[*]" != "X $srcdir/configure conftest.file" \
1043         && test "$[*]" != "X conftest.file $srcdir/configure"; then
1044
1045         # If neither matched, then we have a broken ls.  This can happen
1046         # if, for instance, CONFIG_SHELL is bash and it inherits a
1047         # broken ls alias from the environment.  This has actually
1048         # happened.  Such a system could not be considered "sane".
1049         AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
1050   alias in your environment])
1051      fi
1052      if test "$[2]" = conftest.file || test $am_try -eq 2; then
1053        break
1054      fi
1055      # Just in case.
1056      sleep 1
1057      am_has_slept=yes
1058    done
1059    test "$[2]" = conftest.file
1060    )
1061 then
1062    # Ok.
1063    :
1064 else
1065    AC_MSG_ERROR([newly created file is older than distributed files!
1066 Check your system clock])
1067 fi
1068 AC_MSG_RESULT([yes])
1069 # If we didn't sleep, we still need to ensure time stamps of config.status and
1070 # generated files are strictly newer.
1071 am_sleep_pid=
1072 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
1073   ( sleep 1 ) &
1074   am_sleep_pid=$!
1075 fi
1076 AC_CONFIG_COMMANDS_PRE(
1077   [AC_MSG_CHECKING([that generated files are newer than configure])
1078    if test -n "$am_sleep_pid"; then
1079      # Hide warnings about reused PIDs.
1080      wait $am_sleep_pid 2>/dev/null
1081    fi
1082    AC_MSG_RESULT([done])])
1083 rm -f conftest.file
1084 ])
1085
1086 # Copyright (C) 2009-2013 Free Software Foundation, Inc.
1087 #
1088 # This file is free software; the Free Software Foundation
1089 # gives unlimited permission to copy and/or distribute it,
1090 # with or without modifications, as long as this notice is preserved.
1091
1092 # AM_SILENT_RULES([DEFAULT])
1093 # --------------------------
1094 # Enable less verbose build rules; with the default set to DEFAULT
1095 # ("yes" being less verbose, "no" or empty being verbose).
1096 AC_DEFUN([AM_SILENT_RULES],
1097 [AC_ARG_ENABLE([silent-rules], [dnl
1098 AS_HELP_STRING(
1099   [--enable-silent-rules],
1100   [less verbose build output (undo: "make V=1")])
1101 AS_HELP_STRING(
1102   [--disable-silent-rules],
1103   [verbose build output (undo: "make V=0")])dnl
1104 ])
1105 case $enable_silent_rules in @%:@ (((
1106   yes) AM_DEFAULT_VERBOSITY=0;;
1107    no) AM_DEFAULT_VERBOSITY=1;;
1108     *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
1109 esac
1110 dnl
1111 dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
1112 dnl do not support nested variable expansions.
1113 dnl See automake bug#9928 and bug#10237.
1114 am_make=${MAKE-make}
1115 AC_CACHE_CHECK([whether $am_make supports nested variables],
1116    [am_cv_make_support_nested_variables],
1117    [if AS_ECHO([['TRUE=$(BAR$(V))
1118 BAR0=false
1119 BAR1=true
1120 V=1
1121 am__doit:
1122         @$(TRUE)
1123 .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
1124   am_cv_make_support_nested_variables=yes
1125 else
1126   am_cv_make_support_nested_variables=no
1127 fi])
1128 if test $am_cv_make_support_nested_variables = yes; then
1129   dnl Using '$V' instead of '$(V)' breaks IRIX make.
1130   AM_V='$(V)'
1131   AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
1132 else
1133   AM_V=$AM_DEFAULT_VERBOSITY
1134   AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
1135 fi
1136 AC_SUBST([AM_V])dnl
1137 AM_SUBST_NOTMAKE([AM_V])dnl
1138 AC_SUBST([AM_DEFAULT_V])dnl
1139 AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
1140 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
1141 AM_BACKSLASH='\'
1142 AC_SUBST([AM_BACKSLASH])dnl
1143 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
1144 ])
1145
1146 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
1147 #
1148 # This file is free software; the Free Software Foundation
1149 # gives unlimited permission to copy and/or distribute it,
1150 # with or without modifications, as long as this notice is preserved.
1151
1152 # AM_PROG_INSTALL_STRIP
1153 # ---------------------
1154 # One issue with vendor 'install' (even GNU) is that you can't
1155 # specify the program used to strip binaries.  This is especially
1156 # annoying in cross-compiling environments, where the build's strip
1157 # is unlikely to handle the host's binaries.
1158 # Fortunately install-sh will honor a STRIPPROG variable, so we
1159 # always use install-sh in "make install-strip", and initialize
1160 # STRIPPROG with the value of the STRIP variable (set by the user).
1161 AC_DEFUN([AM_PROG_INSTALL_STRIP],
1162 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1163 # Installed binaries are usually stripped using 'strip' when the user
1164 # run "make install-strip".  However 'strip' might not be the right
1165 # tool to use in cross-compilation environments, therefore Automake
1166 # will honor the 'STRIP' environment variable to overrule this program.
1167 dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
1168 if test "$cross_compiling" != no; then
1169   AC_CHECK_TOOL([STRIP], [strip], :)
1170 fi
1171 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1172 AC_SUBST([INSTALL_STRIP_PROGRAM])])
1173
1174 # Copyright (C) 2006-2013 Free Software Foundation, Inc.
1175 #
1176 # This file is free software; the Free Software Foundation
1177 # gives unlimited permission to copy and/or distribute it,
1178 # with or without modifications, as long as this notice is preserved.
1179
1180 # _AM_SUBST_NOTMAKE(VARIABLE)
1181 # ---------------------------
1182 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1183 # This macro is traced by Automake.
1184 AC_DEFUN([_AM_SUBST_NOTMAKE])
1185
1186 # AM_SUBST_NOTMAKE(VARIABLE)
1187 # --------------------------
1188 # Public sister of _AM_SUBST_NOTMAKE.
1189 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1190
1191 # Check how to create a tarball.                            -*- Autoconf -*-
1192
1193 # Copyright (C) 2004-2013 Free Software Foundation, Inc.
1194 #
1195 # This file is free software; the Free Software Foundation
1196 # gives unlimited permission to copy and/or distribute it,
1197 # with or without modifications, as long as this notice is preserved.
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 #
1213 AC_DEFUN([_AM_PROG_TAR],
1214 [# Always define AMTAR for backward compatibility.  Yes, it's still used
1215 # in the wild :-(  We should find a proper way to deprecate it ...
1216 AC_SUBST([AMTAR], ['$${TAR-tar}'])
1217
1218 # We'll loop over all known methods to create a tar archive until one works.
1219 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1220
1221 m4_if([$1], [v7],
1222   [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
1223
1224   [m4_case([$1],
1225     [ustar],
1226      [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
1227       # There is notably a 21 bits limit for the UID and the GID.  In fact,
1228       # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
1229       # and bug#13588).
1230       am_max_uid=2097151 # 2^21 - 1
1231       am_max_gid=$am_max_uid
1232       # The $UID and $GID variables are not portable, so we need to resort
1233       # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
1234       # below are definitely unexpected, so allow the users to see them
1235       # (that is, avoid stderr redirection).
1236       am_uid=`id -u || echo unknown`
1237       am_gid=`id -g || echo unknown`
1238       AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
1239       if test $am_uid -le $am_max_uid; then
1240          AC_MSG_RESULT([yes])
1241       else
1242          AC_MSG_RESULT([no])
1243          _am_tools=none
1244       fi
1245       AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
1246       if test $am_gid -le $am_max_gid; then
1247          AC_MSG_RESULT([yes])
1248       else
1249         AC_MSG_RESULT([no])
1250         _am_tools=none
1251       fi],
1252
1253   [pax],
1254     [],
1255
1256   [m4_fatal([Unknown tar format])])
1257
1258   AC_MSG_CHECKING([how to create a $1 tar archive])
1259
1260   # Go ahead even if we have the value already cached.  We do so because we
1261   # need to set the values for the 'am__tar' and 'am__untar' variables.
1262   _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1263
1264   for _am_tool in $_am_tools; do
1265     case $_am_tool in
1266     gnutar)
1267       for _am_tar in tar gnutar gtar; do
1268         AM_RUN_LOG([$_am_tar --version]) && break
1269       done
1270       am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1271       am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1272       am__untar="$_am_tar -xf -"
1273       ;;
1274     plaintar)
1275       # Must skip GNU tar: if it does not support --format= it doesn't create
1276       # ustar tarball either.
1277       (tar --version) >/dev/null 2>&1 && continue
1278       am__tar='tar chf - "$$tardir"'
1279       am__tar_='tar chf - "$tardir"'
1280       am__untar='tar xf -'
1281       ;;
1282     pax)
1283       am__tar='pax -L -x $1 -w "$$tardir"'
1284       am__tar_='pax -L -x $1 -w "$tardir"'
1285       am__untar='pax -r'
1286       ;;
1287     cpio)
1288       am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1289       am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1290       am__untar='cpio -i -H $1 -d'
1291       ;;
1292     none)
1293       am__tar=false
1294       am__tar_=false
1295       am__untar=false
1296       ;;
1297     esac
1298
1299     # If the value was cached, stop now.  We just wanted to have am__tar
1300     # and am__untar set.
1301     test -n "${am_cv_prog_tar_$1}" && break
1302
1303     # tar/untar a dummy directory, and stop if the command works.
1304     rm -rf conftest.dir
1305     mkdir conftest.dir
1306     echo GrepMe > conftest.dir/file
1307     AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1308     rm -rf conftest.dir
1309     if test -s conftest.tar; then
1310       AM_RUN_LOG([$am__untar <conftest.tar])
1311       AM_RUN_LOG([cat conftest.dir/file])
1312       grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1313     fi
1314   done
1315   rm -rf conftest.dir
1316
1317   AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1318   AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1319
1320 AC_SUBST([am__tar])
1321 AC_SUBST([am__untar])
1322 ]) # _AM_PROG_TAR
1323
1324 m4_include([m4/as-ac-expand.m4])
1325 m4_include([m4/jhflags.m4])
1326 m4_include([m4/python.m4])
1327 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1328 #
1329 #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1330 #                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
1331 #                 Foundation, Inc.
1332 #   Written by Gordon Matzigkeit, 1996
1333 #
1334 # This file is free software; the Free Software Foundation gives
1335 # unlimited permission to copy and/or distribute it, with or without
1336 # modifications, as long as this notice is preserved.
1337
1338 m4_define([_LT_COPYING], [dnl
1339 #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1340 #                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
1341 #                 Foundation, Inc.
1342 #   Written by Gordon Matzigkeit, 1996
1343 #
1344 #   This file is part of GNU Libtool.
1345 #
1346 # GNU Libtool is free software; you can redistribute it and/or
1347 # modify it under the terms of the GNU General Public License as
1348 # published by the Free Software Foundation; either version 2 of
1349 # the License, or (at your option) any later version.
1350 #
1351 # As a special exception to the GNU General Public License,
1352 # if you distribute this file as part of a program or library that
1353 # is built using GNU Libtool, you may include this file under the
1354 # same distribution terms that you use for the rest of that program.
1355 #
1356 # GNU Libtool is distributed in the hope that it will be useful,
1357 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1358 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1359 # GNU General Public License for more details.
1360 #
1361 # You should have received a copy of the GNU General Public License
1362 # along with GNU Libtool; see the file COPYING.  If not, a copy
1363 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
1364 # obtained by writing to the Free Software Foundation, Inc.,
1365 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1366 ])
1367
1368 # serial 57 LT_INIT
1369
1370
1371 # LT_PREREQ(VERSION)
1372 # ------------------
1373 # Complain and exit if this libtool version is less that VERSION.
1374 m4_defun([LT_PREREQ],
1375 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
1376        [m4_default([$3],
1377                    [m4_fatal([Libtool version $1 or higher is required],
1378                              63)])],
1379        [$2])])
1380
1381
1382 # _LT_CHECK_BUILDDIR
1383 # ------------------
1384 # Complain if the absolute build directory name contains unusual characters
1385 m4_defun([_LT_CHECK_BUILDDIR],
1386 [case `pwd` in
1387   *\ * | *\     *)
1388     AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
1389 esac
1390 ])
1391
1392
1393 # LT_INIT([OPTIONS])
1394 # ------------------
1395 AC_DEFUN([LT_INIT],
1396 [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
1397 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
1398 AC_BEFORE([$0], [LT_LANG])dnl
1399 AC_BEFORE([$0], [LT_OUTPUT])dnl
1400 AC_BEFORE([$0], [LTDL_INIT])dnl
1401 m4_require([_LT_CHECK_BUILDDIR])dnl
1402
1403 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
1404 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
1405 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
1406 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
1407 dnl unless we require an AC_DEFUNed macro:
1408 AC_REQUIRE([LTOPTIONS_VERSION])dnl
1409 AC_REQUIRE([LTSUGAR_VERSION])dnl
1410 AC_REQUIRE([LTVERSION_VERSION])dnl
1411 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
1412 m4_require([_LT_PROG_LTMAIN])dnl
1413
1414 _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
1415
1416 dnl Parse OPTIONS
1417 _LT_SET_OPTIONS([$0], [$1])
1418
1419 # This can be used to rebuild libtool when needed
1420 LIBTOOL_DEPS="$ltmain"
1421
1422 # Always use our own libtool.
1423 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1424 AC_SUBST(LIBTOOL)dnl
1425
1426 _LT_SETUP
1427
1428 # Only expand once:
1429 m4_define([LT_INIT])
1430 ])# LT_INIT
1431
1432 # Old names:
1433 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
1434 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
1435 dnl aclocal-1.4 backwards compatibility:
1436 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
1437 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
1438
1439
1440 # _LT_CC_BASENAME(CC)
1441 # -------------------
1442 # Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
1443 m4_defun([_LT_CC_BASENAME],
1444 [for cc_temp in $1""; do
1445   case $cc_temp in
1446     compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1447     distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1448     \-*) ;;
1449     *) break;;
1450   esac
1451 done
1452 cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
1453 ])
1454
1455
1456 # _LT_FILEUTILS_DEFAULTS
1457 # ----------------------
1458 # It is okay to use these file commands and assume they have been set
1459 # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
1460 m4_defun([_LT_FILEUTILS_DEFAULTS],
1461 [: ${CP="cp -f"}
1462 : ${MV="mv -f"}
1463 : ${RM="rm -f"}
1464 ])# _LT_FILEUTILS_DEFAULTS
1465
1466
1467 # _LT_SETUP
1468 # ---------
1469 m4_defun([_LT_SETUP],
1470 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1471 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1472 AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
1473 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
1474
1475 _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
1476 dnl
1477 _LT_DECL([], [host_alias], [0], [The host system])dnl
1478 _LT_DECL([], [host], [0])dnl
1479 _LT_DECL([], [host_os], [0])dnl
1480 dnl
1481 _LT_DECL([], [build_alias], [0], [The build system])dnl
1482 _LT_DECL([], [build], [0])dnl
1483 _LT_DECL([], [build_os], [0])dnl
1484 dnl
1485 AC_REQUIRE([AC_PROG_CC])dnl
1486 AC_REQUIRE([LT_PATH_LD])dnl
1487 AC_REQUIRE([LT_PATH_NM])dnl
1488 dnl
1489 AC_REQUIRE([AC_PROG_LN_S])dnl
1490 test -z "$LN_S" && LN_S="ln -s"
1491 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
1492 dnl
1493 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
1494 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
1495 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
1496 dnl
1497 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1498 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
1499 m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
1500 m4_require([_LT_CMD_RELOAD])dnl
1501 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
1502 m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
1503 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
1504 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
1505 m4_require([_LT_WITH_SYSROOT])dnl
1506
1507 _LT_CONFIG_LIBTOOL_INIT([
1508 # See if we are running on zsh, and set the options which allow our
1509 # commands through without removal of \ escapes INIT.
1510 if test -n "\${ZSH_VERSION+set}" ; then
1511    setopt NO_GLOB_SUBST
1512 fi
1513 ])
1514 if test -n "${ZSH_VERSION+set}" ; then
1515    setopt NO_GLOB_SUBST
1516 fi
1517
1518 _LT_CHECK_OBJDIR
1519
1520 m4_require([_LT_TAG_COMPILER])dnl
1521
1522 case $host_os in
1523 aix3*)
1524   # AIX sometimes has problems with the GCC collect2 program.  For some
1525   # reason, if we set the COLLECT_NAMES environment variable, the problems
1526   # vanish in a puff of smoke.
1527   if test "X${COLLECT_NAMES+set}" != Xset; then
1528     COLLECT_NAMES=
1529     export COLLECT_NAMES
1530   fi
1531   ;;
1532 esac
1533
1534 # Global variables:
1535 ofile=libtool
1536 can_build_shared=yes
1537
1538 # All known linkers require a `.a' archive for static linking (except MSVC,
1539 # which needs '.lib').
1540 libext=a
1541
1542 with_gnu_ld="$lt_cv_prog_gnu_ld"
1543
1544 old_CC="$CC"
1545 old_CFLAGS="$CFLAGS"
1546
1547 # Set sane defaults for various variables
1548 test -z "$CC" && CC=cc
1549 test -z "$LTCC" && LTCC=$CC
1550 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
1551 test -z "$LD" && LD=ld
1552 test -z "$ac_objext" && ac_objext=o
1553
1554 _LT_CC_BASENAME([$compiler])
1555
1556 # Only perform the check for file, if the check method requires it
1557 test -z "$MAGIC_CMD" && MAGIC_CMD=file
1558 case $deplibs_check_method in
1559 file_magic*)
1560   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1561     _LT_PATH_MAGIC
1562   fi
1563   ;;
1564 esac
1565
1566 # Use C for the default configuration in the libtool script
1567 LT_SUPPORTED_TAG([CC])
1568 _LT_LANG_C_CONFIG
1569 _LT_LANG_DEFAULT_CONFIG
1570 _LT_CONFIG_COMMANDS
1571 ])# _LT_SETUP
1572
1573
1574 # _LT_PREPARE_SED_QUOTE_VARS
1575 # --------------------------
1576 # Define a few sed substitution that help us do robust quoting.
1577 m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
1578 [# Backslashify metacharacters that are still active within
1579 # double-quoted strings.
1580 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
1581
1582 # Same as above, but do not quote variable references.
1583 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
1584
1585 # Sed substitution to delay expansion of an escaped shell variable in a
1586 # double_quote_subst'ed string.
1587 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1588
1589 # Sed substitution to delay expansion of an escaped single quote.
1590 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
1591
1592 # Sed substitution to avoid accidental globbing in evaled expressions
1593 no_glob_subst='s/\*/\\\*/g'
1594 ])
1595
1596 # _LT_PROG_LTMAIN
1597 # ---------------
1598 # Note that this code is called both from `configure', and `config.status'
1599 # now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
1600 # `config.status' has no value for ac_aux_dir unless we are using Automake,
1601 # so we pass a copy along to make sure it has a sensible value anyway.
1602 m4_defun([_LT_PROG_LTMAIN],
1603 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
1604 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
1605 ltmain="$ac_aux_dir/ltmain.sh"
1606 ])# _LT_PROG_LTMAIN
1607
1608
1609
1610 # So that we can recreate a full libtool script including additional
1611 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
1612 # in macros and then make a single call at the end using the `libtool'
1613 # label.
1614
1615
1616 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
1617 # ----------------------------------------
1618 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1619 m4_define([_LT_CONFIG_LIBTOOL_INIT],
1620 [m4_ifval([$1],
1621           [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
1622                      [$1
1623 ])])])
1624
1625 # Initialize.
1626 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
1627
1628
1629 # _LT_CONFIG_LIBTOOL([COMMANDS])
1630 # ------------------------------
1631 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1632 m4_define([_LT_CONFIG_LIBTOOL],
1633 [m4_ifval([$1],
1634           [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
1635                      [$1
1636 ])])])
1637
1638 # Initialize.
1639 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
1640
1641
1642 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
1643 # -----------------------------------------------------
1644 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
1645 [_LT_CONFIG_LIBTOOL([$1])
1646 _LT_CONFIG_LIBTOOL_INIT([$2])
1647 ])
1648
1649
1650 # _LT_FORMAT_COMMENT([COMMENT])
1651 # -----------------------------
1652 # Add leading comment marks to the start of each line, and a trailing
1653 # full-stop to the whole comment if one is not present already.
1654 m4_define([_LT_FORMAT_COMMENT],
1655 [m4_ifval([$1], [
1656 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
1657               [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
1658 )])
1659
1660
1661
1662
1663
1664 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
1665 # -------------------------------------------------------------------
1666 # CONFIGNAME is the name given to the value in the libtool script.
1667 # VARNAME is the (base) name used in the configure script.
1668 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
1669 # VARNAME.  Any other value will be used directly.
1670 m4_define([_LT_DECL],
1671 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
1672     [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
1673         [m4_ifval([$1], [$1], [$2])])
1674     lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
1675     m4_ifval([$4],
1676         [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
1677     lt_dict_add_subkey([lt_decl_dict], [$2],
1678         [tagged?], [m4_ifval([$5], [yes], [no])])])
1679 ])
1680
1681
1682 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
1683 # --------------------------------------------------------
1684 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
1685
1686
1687 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
1688 # ------------------------------------------------
1689 m4_define([lt_decl_tag_varnames],
1690 [_lt_decl_filter([tagged?], [yes], $@)])
1691
1692
1693 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
1694 # ---------------------------------------------------------
1695 m4_define([_lt_decl_filter],
1696 [m4_case([$#],
1697   [0], [m4_fatal([$0: too few arguments: $#])],
1698   [1], [m4_fatal([$0: too few arguments: $#: $1])],
1699   [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
1700   [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
1701   [lt_dict_filter([lt_decl_dict], $@)])[]dnl
1702 ])
1703
1704
1705 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
1706 # --------------------------------------------------
1707 m4_define([lt_decl_quote_varnames],
1708 [_lt_decl_filter([value], [1], $@)])
1709
1710
1711 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
1712 # ---------------------------------------------------
1713 m4_define([lt_decl_dquote_varnames],
1714 [_lt_decl_filter([value], [2], $@)])
1715
1716
1717 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
1718 # ---------------------------------------------------
1719 m4_define([lt_decl_varnames_tagged],
1720 [m4_assert([$# <= 2])dnl
1721 _$0(m4_quote(m4_default([$1], [[, ]])),
1722     m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
1723     m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
1724 m4_define([_lt_decl_varnames_tagged],
1725 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
1726
1727
1728 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
1729 # ------------------------------------------------
1730 m4_define([lt_decl_all_varnames],
1731 [_$0(m4_quote(m4_default([$1], [[, ]])),
1732      m4_if([$2], [],
1733            m4_quote(lt_decl_varnames),
1734         m4_quote(m4_shift($@))))[]dnl
1735 ])
1736 m4_define([_lt_decl_all_varnames],
1737 [lt_join($@, lt_decl_varnames_tagged([$1],
1738                         lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
1739 ])
1740
1741
1742 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
1743 # ------------------------------------
1744 # Quote a variable value, and forward it to `config.status' so that its
1745 # declaration there will have the same value as in `configure'.  VARNAME
1746 # must have a single quote delimited value for this to work.
1747 m4_define([_LT_CONFIG_STATUS_DECLARE],
1748 [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
1749
1750
1751 # _LT_CONFIG_STATUS_DECLARATIONS
1752 # ------------------------------
1753 # We delimit libtool config variables with single quotes, so when
1754 # we write them to config.status, we have to be sure to quote all
1755 # embedded single quotes properly.  In configure, this macro expands
1756 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
1757 #
1758 #    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
1759 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
1760 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
1761     [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
1762
1763
1764 # _LT_LIBTOOL_TAGS
1765 # ----------------
1766 # Output comment and list of tags supported by the script
1767 m4_defun([_LT_LIBTOOL_TAGS],
1768 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
1769 available_tags="_LT_TAGS"dnl
1770 ])
1771
1772
1773 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
1774 # -----------------------------------
1775 # Extract the dictionary values for VARNAME (optionally with TAG) and
1776 # expand to a commented shell variable setting:
1777 #
1778 #    # Some comment about what VAR is for.
1779 #    visible_name=$lt_internal_name
1780 m4_define([_LT_LIBTOOL_DECLARE],
1781 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
1782                                            [description])))[]dnl
1783 m4_pushdef([_libtool_name],
1784     m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
1785 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
1786     [0], [_libtool_name=[$]$1],
1787     [1], [_libtool_name=$lt_[]$1],
1788     [2], [_libtool_name=$lt_[]$1],
1789     [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
1790 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
1791 ])
1792
1793
1794 # _LT_LIBTOOL_CONFIG_VARS
1795 # -----------------------
1796 # Produce commented declarations of non-tagged libtool config variables
1797 # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
1798 # script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
1799 # section) are produced by _LT_LIBTOOL_TAG_VARS.
1800 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
1801 [m4_foreach([_lt_var],
1802     m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
1803     [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
1804
1805
1806 # _LT_LIBTOOL_TAG_VARS(TAG)
1807 # -------------------------
1808 m4_define([_LT_LIBTOOL_TAG_VARS],
1809 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
1810     [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
1811
1812
1813 # _LT_TAGVAR(VARNAME, [TAGNAME])
1814 # ------------------------------
1815 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
1816
1817
1818 # _LT_CONFIG_COMMANDS
1819 # -------------------
1820 # Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
1821 # variables for single and double quote escaping we saved from calls
1822 # to _LT_DECL, we can put quote escaped variables declarations
1823 # into `config.status', and then the shell code to quote escape them in
1824 # for loops in `config.status'.  Finally, any additional code accumulated
1825 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
1826 m4_defun([_LT_CONFIG_COMMANDS],
1827 [AC_PROVIDE_IFELSE([LT_OUTPUT],
1828         dnl If the libtool generation code has been placed in $CONFIG_LT,
1829         dnl instead of duplicating it all over again into config.status,
1830         dnl then we will have config.status run $CONFIG_LT later, so it
1831         dnl needs to know what name is stored there:
1832         [AC_CONFIG_COMMANDS([libtool],
1833             [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
1834     dnl If the libtool generation code is destined for config.status,
1835     dnl expand the accumulated commands and init code now:
1836     [AC_CONFIG_COMMANDS([libtool],
1837         [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
1838 ])#_LT_CONFIG_COMMANDS
1839
1840
1841 # Initialize.
1842 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
1843 [
1844
1845 # The HP-UX ksh and POSIX shell print the target directory to stdout
1846 # if CDPATH is set.
1847 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1848
1849 sed_quote_subst='$sed_quote_subst'
1850 double_quote_subst='$double_quote_subst'
1851 delay_variable_subst='$delay_variable_subst'
1852 _LT_CONFIG_STATUS_DECLARATIONS
1853 LTCC='$LTCC'
1854 LTCFLAGS='$LTCFLAGS'
1855 compiler='$compiler_DEFAULT'
1856
1857 # A function that is used when there is no print builtin or printf.
1858 func_fallback_echo ()
1859 {
1860   eval 'cat <<_LTECHO_EOF
1861 \$[]1
1862 _LTECHO_EOF'
1863 }
1864
1865 # Quote evaled strings.
1866 for var in lt_decl_all_varnames([[ \
1867 ]], lt_decl_quote_varnames); do
1868     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
1869     *[[\\\\\\\`\\"\\\$]]*)
1870       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
1871       ;;
1872     *)
1873       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1874       ;;
1875     esac
1876 done
1877
1878 # Double-quote double-evaled strings.
1879 for var in lt_decl_all_varnames([[ \
1880 ]], lt_decl_dquote_varnames); do
1881     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
1882     *[[\\\\\\\`\\"\\\$]]*)
1883       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
1884       ;;
1885     *)
1886       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1887       ;;
1888     esac
1889 done
1890
1891 _LT_OUTPUT_LIBTOOL_INIT
1892 ])
1893
1894 # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
1895 # ------------------------------------
1896 # Generate a child script FILE with all initialization necessary to
1897 # reuse the environment learned by the parent script, and make the
1898 # file executable.  If COMMENT is supplied, it is inserted after the
1899 # `#!' sequence but before initialization text begins.  After this
1900 # macro, additional text can be appended to FILE to form the body of
1901 # the child script.  The macro ends with non-zero status if the
1902 # file could not be fully written (such as if the disk is full).
1903 m4_ifdef([AS_INIT_GENERATED],
1904 [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
1905 [m4_defun([_LT_GENERATED_FILE_INIT],
1906 [m4_require([AS_PREPARE])]dnl
1907 [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
1908 [lt_write_fail=0
1909 cat >$1 <<_ASEOF || lt_write_fail=1
1910 #! $SHELL
1911 # Generated by $as_me.
1912 $2
1913 SHELL=\${CONFIG_SHELL-$SHELL}
1914 export SHELL
1915 _ASEOF
1916 cat >>$1 <<\_ASEOF || lt_write_fail=1
1917 AS_SHELL_SANITIZE
1918 _AS_PREPARE
1919 exec AS_MESSAGE_FD>&1
1920 _ASEOF
1921 test $lt_write_fail = 0 && chmod +x $1[]dnl
1922 m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
1923
1924 # LT_OUTPUT
1925 # ---------
1926 # This macro allows early generation of the libtool script (before
1927 # AC_OUTPUT is called), incase it is used in configure for compilation
1928 # tests.
1929 AC_DEFUN([LT_OUTPUT],
1930 [: ${CONFIG_LT=./config.lt}
1931 AC_MSG_NOTICE([creating $CONFIG_LT])
1932 _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
1933 [# Run this file to recreate a libtool stub with the current configuration.])
1934
1935 cat >>"$CONFIG_LT" <<\_LTEOF
1936 lt_cl_silent=false
1937 exec AS_MESSAGE_LOG_FD>>config.log
1938 {
1939   echo
1940   AS_BOX([Running $as_me.])
1941 } >&AS_MESSAGE_LOG_FD
1942
1943 lt_cl_help="\
1944 \`$as_me' creates a local libtool stub from the current configuration,
1945 for use in further configure time tests before the real libtool is
1946 generated.
1947
1948 Usage: $[0] [[OPTIONS]]
1949
1950   -h, --help      print this help, then exit
1951   -V, --version   print version number, then exit
1952   -q, --quiet     do not print progress messages
1953   -d, --debug     don't remove temporary files
1954
1955 Report bugs to <bug-libtool@gnu.org>."
1956
1957 lt_cl_version="\
1958 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
1959 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
1960 configured by $[0], generated by m4_PACKAGE_STRING.
1961
1962 Copyright (C) 2011 Free Software Foundation, Inc.
1963 This config.lt script is free software; the Free Software Foundation
1964 gives unlimited permision to copy, distribute and modify it."
1965
1966 while test $[#] != 0
1967 do
1968   case $[1] in
1969     --version | --v* | -V )
1970       echo "$lt_cl_version"; exit 0 ;;
1971     --help | --h* | -h )
1972       echo "$lt_cl_help"; exit 0 ;;
1973     --debug | --d* | -d )
1974       debug=: ;;
1975     --quiet | --q* | --silent | --s* | -q )
1976       lt_cl_silent=: ;;
1977
1978     -*) AC_MSG_ERROR([unrecognized option: $[1]
1979 Try \`$[0] --help' for more information.]) ;;
1980
1981     *) AC_MSG_ERROR([unrecognized argument: $[1]
1982 Try \`$[0] --help' for more information.]) ;;
1983   esac
1984   shift
1985 done
1986
1987 if $lt_cl_silent; then
1988   exec AS_MESSAGE_FD>/dev/null
1989 fi
1990 _LTEOF
1991
1992 cat >>"$CONFIG_LT" <<_LTEOF
1993 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
1994 _LTEOF
1995
1996 cat >>"$CONFIG_LT" <<\_LTEOF
1997 AC_MSG_NOTICE([creating $ofile])
1998 _LT_OUTPUT_LIBTOOL_COMMANDS
1999 AS_EXIT(0)
2000 _LTEOF
2001 chmod +x "$CONFIG_LT"
2002
2003 # configure is writing to config.log, but config.lt does its own redirection,
2004 # appending to config.log, which fails on DOS, as config.log is still kept
2005 # open by configure.  Here we exec the FD to /dev/null, effectively closing
2006 # config.log, so it can be properly (re)opened and appended to by config.lt.
2007 lt_cl_success=:
2008 test "$silent" = yes &&
2009   lt_config_lt_args="$lt_config_lt_args --quiet"
2010 exec AS_MESSAGE_LOG_FD>/dev/null
2011 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
2012 exec AS_MESSAGE_LOG_FD>>config.log
2013 $lt_cl_success || AS_EXIT(1)
2014 ])# LT_OUTPUT
2015
2016
2017 # _LT_CONFIG(TAG)
2018 # ---------------
2019 # If TAG is the built-in tag, create an initial libtool script with a
2020 # default configuration from the untagged config vars.  Otherwise add code
2021 # to config.status for appending the configuration named by TAG from the
2022 # matching tagged config vars.
2023 m4_defun([_LT_CONFIG],
2024 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2025 _LT_CONFIG_SAVE_COMMANDS([
2026   m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
2027   m4_if(_LT_TAG, [C], [
2028     # See if we are running on zsh, and set the options which allow our
2029     # commands through without removal of \ escapes.
2030     if test -n "${ZSH_VERSION+set}" ; then
2031       setopt NO_GLOB_SUBST
2032     fi
2033
2034     cfgfile="${ofile}T"
2035     trap "$RM \"$cfgfile\"; exit 1" 1 2 15
2036     $RM "$cfgfile"
2037
2038     cat <<_LT_EOF >> "$cfgfile"
2039 #! $SHELL
2040
2041 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
2042 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
2043 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2044 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
2045 #
2046 _LT_COPYING
2047 _LT_LIBTOOL_TAGS
2048
2049 # ### BEGIN LIBTOOL CONFIG
2050 _LT_LIBTOOL_CONFIG_VARS
2051 _LT_LIBTOOL_TAG_VARS
2052 # ### END LIBTOOL CONFIG
2053
2054 _LT_EOF
2055
2056   case $host_os in
2057   aix3*)
2058     cat <<\_LT_EOF >> "$cfgfile"
2059 # AIX sometimes has problems with the GCC collect2 program.  For some
2060 # reason, if we set the COLLECT_NAMES environment variable, the problems
2061 # vanish in a puff of smoke.
2062 if test "X${COLLECT_NAMES+set}" != Xset; then
2063   COLLECT_NAMES=
2064   export COLLECT_NAMES
2065 fi
2066 _LT_EOF
2067     ;;
2068   esac
2069
2070   _LT_PROG_LTMAIN
2071
2072   # We use sed instead of cat because bash on DJGPP gets confused if
2073   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
2074   # text mode, it properly converts lines to CR/LF.  This bash problem
2075   # is reportedly fixed, but why not run on old versions too?
2076   sed '$q' "$ltmain" >> "$cfgfile" \
2077      || (rm -f "$cfgfile"; exit 1)
2078
2079   _LT_PROG_REPLACE_SHELLFNS
2080
2081    mv -f "$cfgfile" "$ofile" ||
2082     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
2083   chmod +x "$ofile"
2084 ],
2085 [cat <<_LT_EOF >> "$ofile"
2086
2087 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
2088 dnl in a comment (ie after a #).
2089 # ### BEGIN LIBTOOL TAG CONFIG: $1
2090 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
2091 # ### END LIBTOOL TAG CONFIG: $1
2092 _LT_EOF
2093 ])dnl /m4_if
2094 ],
2095 [m4_if([$1], [], [
2096     PACKAGE='$PACKAGE'
2097     VERSION='$VERSION'
2098     TIMESTAMP='$TIMESTAMP'
2099     RM='$RM'
2100     ofile='$ofile'], [])
2101 ])dnl /_LT_CONFIG_SAVE_COMMANDS
2102 ])# _LT_CONFIG
2103
2104
2105 # LT_SUPPORTED_TAG(TAG)
2106 # ---------------------
2107 # Trace this macro to discover what tags are supported by the libtool
2108 # --tag option, using:
2109 #    autoconf --trace 'LT_SUPPORTED_TAG:$1'
2110 AC_DEFUN([LT_SUPPORTED_TAG], [])
2111
2112
2113 # C support is built-in for now
2114 m4_define([_LT_LANG_C_enabled], [])
2115 m4_define([_LT_TAGS], [])
2116
2117
2118 # LT_LANG(LANG)
2119 # -------------
2120 # Enable libtool support for the given language if not already enabled.
2121 AC_DEFUN([LT_LANG],
2122 [AC_BEFORE([$0], [LT_OUTPUT])dnl
2123 m4_case([$1],
2124   [C],                  [_LT_LANG(C)],
2125   [C++],                [_LT_LANG(CXX)],
2126   [Go],                 [_LT_LANG(GO)],
2127   [Java],               [_LT_LANG(GCJ)],
2128   [Fortran 77],         [_LT_LANG(F77)],
2129   [Fortran],            [_LT_LANG(FC)],
2130   [Windows Resource],   [_LT_LANG(RC)],
2131   [m4_ifdef([_LT_LANG_]$1[_CONFIG],
2132     [_LT_LANG($1)],
2133     [m4_fatal([$0: unsupported language: "$1"])])])dnl
2134 ])# LT_LANG
2135
2136
2137 # _LT_LANG(LANGNAME)
2138 # ------------------
2139 m4_defun([_LT_LANG],
2140 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
2141   [LT_SUPPORTED_TAG([$1])dnl
2142   m4_append([_LT_TAGS], [$1 ])dnl
2143   m4_define([_LT_LANG_]$1[_enabled], [])dnl
2144   _LT_LANG_$1_CONFIG($1)])dnl
2145 ])# _LT_LANG
2146
2147
2148 m4_ifndef([AC_PROG_GO], [
2149 # NOTE: This macro has been submitted for inclusion into   #
2150 #  GNU Autoconf as AC_PROG_GO.  When it is available in    #
2151 #  a released version of Autoconf we should remove this    #
2152 #  macro and use it instead.                               #
2153 m4_defun([AC_PROG_GO],
2154 [AC_LANG_PUSH(Go)dnl
2155 AC_ARG_VAR([GOC],     [Go compiler command])dnl
2156 AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
2157 _AC_ARG_VAR_LDFLAGS()dnl
2158 AC_CHECK_TOOL(GOC, gccgo)
2159 if test -z "$GOC"; then
2160   if test -n "$ac_tool_prefix"; then
2161     AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
2162   fi
2163 fi
2164 if test -z "$GOC"; then
2165   AC_CHECK_PROG(GOC, gccgo, gccgo, false)
2166 fi
2167 ])#m4_defun
2168 ])#m4_ifndef
2169
2170
2171 # _LT_LANG_DEFAULT_CONFIG
2172 # -----------------------
2173 m4_defun([_LT_LANG_DEFAULT_CONFIG],
2174 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
2175   [LT_LANG(CXX)],
2176   [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
2177
2178 AC_PROVIDE_IFELSE([AC_PROG_F77],
2179   [LT_LANG(F77)],
2180   [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
2181
2182 AC_PROVIDE_IFELSE([AC_PROG_FC],
2183   [LT_LANG(FC)],
2184   [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
2185
2186 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
2187 dnl pulling things in needlessly.
2188 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
2189   [LT_LANG(GCJ)],
2190   [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
2191     [LT_LANG(GCJ)],
2192     [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
2193       [LT_LANG(GCJ)],
2194       [m4_ifdef([AC_PROG_GCJ],
2195         [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
2196        m4_ifdef([A][M_PROG_GCJ],
2197         [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
2198        m4_ifdef([LT_PROG_GCJ],
2199         [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
2200
2201 AC_PROVIDE_IFELSE([AC_PROG_GO],
2202   [LT_LANG(GO)],
2203   [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
2204
2205 AC_PROVIDE_IFELSE([LT_PROG_RC],
2206   [LT_LANG(RC)],
2207   [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
2208 ])# _LT_LANG_DEFAULT_CONFIG
2209
2210 # Obsolete macros:
2211 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
2212 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
2213 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
2214 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
2215 AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
2216 dnl aclocal-1.4 backwards compatibility:
2217 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
2218 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
2219 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
2220 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
2221 dnl AC_DEFUN([AC_LIBTOOL_RC], [])
2222
2223
2224 # _LT_TAG_COMPILER
2225 # ----------------
2226 m4_defun([_LT_TAG_COMPILER],
2227 [AC_REQUIRE([AC_PROG_CC])dnl
2228
2229 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
2230 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
2231 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
2232 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
2233
2234 # If no C compiler was specified, use CC.
2235 LTCC=${LTCC-"$CC"}
2236
2237 # If no C compiler flags were specified, use CFLAGS.
2238 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
2239
2240 # Allow CC to be a program name with arguments.
2241 compiler=$CC
2242 ])# _LT_TAG_COMPILER
2243
2244
2245 # _LT_COMPILER_BOILERPLATE
2246 # ------------------------
2247 # Check for compiler boilerplate output or warnings with
2248 # the simple compiler test code.
2249 m4_defun([_LT_COMPILER_BOILERPLATE],
2250 [m4_require([_LT_DECL_SED])dnl
2251 ac_outfile=conftest.$ac_objext
2252 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
2253 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
2254 _lt_compiler_boilerplate=`cat conftest.err`
2255 $RM conftest*
2256 ])# _LT_COMPILER_BOILERPLATE
2257
2258
2259 # _LT_LINKER_BOILERPLATE
2260 # ----------------------
2261 # Check for linker boilerplate output or warnings with
2262 # the simple link test code.
2263 m4_defun([_LT_LINKER_BOILERPLATE],
2264 [m4_require([_LT_DECL_SED])dnl
2265 ac_outfile=conftest.$ac_objext
2266 echo "$lt_simple_link_test_code" >conftest.$ac_ext
2267 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
2268 _lt_linker_boilerplate=`cat conftest.err`
2269 $RM -r conftest*
2270 ])# _LT_LINKER_BOILERPLATE
2271
2272 # _LT_REQUIRED_DARWIN_CHECKS
2273 # -------------------------
2274 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
2275   case $host_os in
2276     rhapsody* | darwin*)
2277     AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
2278     AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
2279     AC_CHECK_TOOL([LIPO], [lipo], [:])
2280     AC_CHECK_TOOL([OTOOL], [otool], [:])
2281     AC_CHECK_TOOL([OTOOL64], [otool64], [:])
2282     _LT_DECL([], [DSYMUTIL], [1],
2283       [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
2284     _LT_DECL([], [NMEDIT], [1],
2285       [Tool to change global to local symbols on Mac OS X])
2286     _LT_DECL([], [LIPO], [1],
2287       [Tool to manipulate fat objects and archives on Mac OS X])
2288     _LT_DECL([], [OTOOL], [1],
2289       [ldd/readelf like tool for Mach-O binaries on Mac OS X])
2290     _LT_DECL([], [OTOOL64], [1],
2291       [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
2292
2293     AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
2294       [lt_cv_apple_cc_single_mod=no
2295       if test -z "${LT_MULTI_MODULE}"; then
2296         # By default we will add the -single_module flag. You can override
2297         # by either setting the environment variable LT_MULTI_MODULE
2298         # non-empty at configure time, or by adding -multi_module to the
2299         # link flags.
2300         rm -rf libconftest.dylib*
2301         echo "int foo(void){return 1;}" > conftest.c
2302         echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
2303 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
2304         $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
2305           -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
2306         _lt_result=$?
2307         # If there is a non-empty error log, and "single_module"
2308         # appears in it, assume the flag caused a linker warning
2309         if test -s conftest.err && $GREP single_module conftest.err; then
2310           cat conftest.err >&AS_MESSAGE_LOG_FD
2311         # Otherwise, if the output was created with a 0 exit code from
2312         # the compiler, it worked.
2313         elif test -f libconftest.dylib && test $_lt_result -eq 0; then
2314           lt_cv_apple_cc_single_mod=yes
2315         else
2316           cat conftest.err >&AS_MESSAGE_LOG_FD
2317         fi
2318         rm -rf libconftest.dylib*
2319         rm -f conftest.*
2320       fi])
2321
2322     AC_CACHE_CHECK([for -exported_symbols_list linker flag],
2323       [lt_cv_ld_exported_symbols_list],
2324       [lt_cv_ld_exported_symbols_list=no
2325       save_LDFLAGS=$LDFLAGS
2326       echo "_main" > conftest.sym
2327       LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
2328       AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2329         [lt_cv_ld_exported_symbols_list=yes],
2330         [lt_cv_ld_exported_symbols_list=no])
2331         LDFLAGS="$save_LDFLAGS"
2332     ])
2333
2334     AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
2335       [lt_cv_ld_force_load=no
2336       cat > conftest.c << _LT_EOF
2337 int forced_loaded() { return 2;}
2338 _LT_EOF
2339       echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
2340       $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
2341       echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
2342       $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
2343       echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
2344       $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
2345       cat > conftest.c << _LT_EOF
2346 int main() { return 0;}
2347 _LT_EOF
2348       echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
2349       $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
2350       _lt_result=$?
2351       if test -s conftest.err && $GREP force_load conftest.err; then
2352         cat conftest.err >&AS_MESSAGE_LOG_FD
2353       elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
2354         lt_cv_ld_force_load=yes
2355       else
2356         cat conftest.err >&AS_MESSAGE_LOG_FD
2357       fi
2358         rm -f conftest.err libconftest.a conftest conftest.c
2359         rm -rf conftest.dSYM
2360     ])
2361     case $host_os in
2362     rhapsody* | darwin1.[[012]])
2363       _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
2364     darwin1.*)
2365       _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
2366     darwin*) # darwin 5.x on
2367       # if running on 10.5 or later, the deployment target defaults
2368       # to the OS version, if on x86, and 10.4, the deployment
2369       # target defaults to 10.4. Don't you love it?
2370       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
2371         10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
2372           _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2373         10.[[012]]*)
2374           _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
2375         10.*)
2376           _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2377       esac
2378     ;;
2379   esac
2380     if test "$lt_cv_apple_cc_single_mod" = "yes"; then
2381       _lt_dar_single_mod='$single_module'
2382     fi
2383     if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
2384       _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
2385     else
2386       _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
2387     fi
2388     if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
2389       _lt_dsymutil='~$DSYMUTIL $lib || :'
2390     else
2391       _lt_dsymutil=
2392     fi
2393     ;;
2394   esac
2395 ])
2396
2397
2398 # _LT_DARWIN_LINKER_FEATURES([TAG])
2399 # ---------------------------------
2400 # Checks for linker and compiler features on darwin
2401 m4_defun([_LT_DARWIN_LINKER_FEATURES],
2402 [
2403   m4_require([_LT_REQUIRED_DARWIN_CHECKS])
2404   _LT_TAGVAR(archive_cmds_need_lc, $1)=no
2405   _LT_TAGVAR(hardcode_direct, $1)=no
2406   _LT_TAGVAR(hardcode_automatic, $1)=yes
2407   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2408   if test "$lt_cv_ld_force_load" = "yes"; then
2409     _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\"`'
2410     m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
2411                   [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
2412   else
2413     _LT_TAGVAR(whole_archive_flag_spec, $1)=''
2414   fi
2415   _LT_TAGVAR(link_all_deplibs, $1)=yes
2416   _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
2417   case $cc_basename in
2418      ifort*) _lt_dar_can_shared=yes ;;
2419      *) _lt_dar_can_shared=$GCC ;;
2420   esac
2421   if test "$_lt_dar_can_shared" = "yes"; then
2422     output_verbose_link_cmd=func_echo_all
2423     _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}"
2424     _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
2425     _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}"
2426     _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}"
2427     m4_if([$1], [CXX],
2428 [   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
2429       _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}"
2430       _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}"
2431     fi
2432 ],[])
2433   else
2434   _LT_TAGVAR(ld_shlibs, $1)=no
2435   fi
2436 ])
2437
2438 # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
2439 # ----------------------------------
2440 # Links a minimal program and checks the executable
2441 # for the system default hardcoded library path. In most cases,
2442 # this is /usr/lib:/lib, but when the MPI compilers are used
2443 # the location of the communication and MPI libs are included too.
2444 # If we don't find anything, use the default library path according
2445 # to the aix ld manual.
2446 # Store the results from the different compilers for each TAGNAME.
2447 # Allow to override them for all tags through lt_cv_aix_libpath.
2448 m4_defun([_LT_SYS_MODULE_PATH_AIX],
2449 [m4_require([_LT_DECL_SED])dnl
2450 if test "${lt_cv_aix_libpath+set}" = set; then
2451   aix_libpath=$lt_cv_aix_libpath
2452 else
2453   AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
2454   [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
2455   lt_aix_libpath_sed='[
2456       /Import File Strings/,/^$/ {
2457           /^0/ {
2458               s/^0  *\([^ ]*\) *$/\1/
2459               p
2460           }
2461       }]'
2462   _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2463   # Check for a 64-bit object if we didn't find anything.
2464   if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
2465     _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2466   fi],[])
2467   if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
2468     _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
2469   fi
2470   ])
2471   aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
2472 fi
2473 ])# _LT_SYS_MODULE_PATH_AIX
2474
2475
2476 # _LT_SHELL_INIT(ARG)
2477 # -------------------
2478 m4_define([_LT_SHELL_INIT],
2479 [m4_divert_text([M4SH-INIT], [$1
2480 ])])# _LT_SHELL_INIT
2481
2482
2483
2484 # _LT_PROG_ECHO_BACKSLASH
2485 # -----------------------
2486 # Find how we can fake an echo command that does not interpret backslash.
2487 # In particular, with Autoconf 2.60 or later we add some code to the start
2488 # of the generated configure script which will find a shell with a builtin
2489 # printf (which we can use as an echo command).
2490 m4_defun([_LT_PROG_ECHO_BACKSLASH],
2491 [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
2492 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
2493 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
2494
2495 AC_MSG_CHECKING([how to print strings])
2496 # Test print first, because it will be a builtin if present.
2497 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
2498    test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
2499   ECHO='print -r --'
2500 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
2501   ECHO='printf %s\n'
2502 else
2503   # Use this function as a fallback that always works.
2504   func_fallback_echo ()
2505   {
2506     eval 'cat <<_LTECHO_EOF
2507 $[]1
2508 _LTECHO_EOF'
2509   }
2510   ECHO='func_fallback_echo'
2511 fi
2512
2513 # func_echo_all arg...
2514 # Invoke $ECHO with all args, space-separated.
2515 func_echo_all ()
2516 {
2517     $ECHO "$*" 
2518 }
2519
2520 case "$ECHO" in
2521   printf*) AC_MSG_RESULT([printf]) ;;
2522   print*) AC_MSG_RESULT([print -r]) ;;
2523   *) AC_MSG_RESULT([cat]) ;;
2524 esac
2525
2526 m4_ifdef([_AS_DETECT_SUGGESTED],
2527 [_AS_DETECT_SUGGESTED([
2528   test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
2529     ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
2530     ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
2531     ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
2532     PATH=/empty FPATH=/empty; export PATH FPATH
2533     test "X`printf %s $ECHO`" = "X$ECHO" \
2534       || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
2535
2536 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
2537 _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
2538 ])# _LT_PROG_ECHO_BACKSLASH
2539
2540
2541 # _LT_WITH_SYSROOT
2542 # ----------------
2543 AC_DEFUN([_LT_WITH_SYSROOT],
2544 [AC_MSG_CHECKING([for sysroot])
2545 AC_ARG_WITH([sysroot],
2546 [  --with-sysroot[=DIR] Search for dependent libraries within DIR
2547                         (or the compiler's sysroot if not specified).],
2548 [], [with_sysroot=no])
2549
2550 dnl lt_sysroot will always be passed unquoted.  We quote it here
2551 dnl in case the user passed a directory name.
2552 lt_sysroot=
2553 case ${with_sysroot} in #(
2554  yes)
2555    if test "$GCC" = yes; then
2556      lt_sysroot=`$CC --print-sysroot 2>/dev/null`
2557    fi
2558    ;; #(
2559  /*)
2560    lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
2561    ;; #(
2562  no|'')
2563    ;; #(
2564  *)
2565    AC_MSG_RESULT([${with_sysroot}])
2566    AC_MSG_ERROR([The sysroot must be an absolute path.])
2567    ;;
2568 esac
2569
2570  AC_MSG_RESULT([${lt_sysroot:-no}])
2571 _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
2572 [dependent libraries, and in which our libraries should be installed.])])
2573
2574 # _LT_ENABLE_LOCK
2575 # ---------------
2576 m4_defun([_LT_ENABLE_LOCK],
2577 [AC_ARG_ENABLE([libtool-lock],
2578   [AS_HELP_STRING([--disable-libtool-lock],
2579     [avoid locking (might break parallel builds)])])
2580 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
2581
2582 # Some flags need to be propagated to the compiler or linker for good
2583 # libtool support.
2584 case $host in
2585 ia64-*-hpux*)
2586   # Find out which ABI we are using.
2587   echo 'int i;' > conftest.$ac_ext
2588   if AC_TRY_EVAL(ac_compile); then
2589     case `/usr/bin/file conftest.$ac_objext` in
2590       *ELF-32*)
2591         HPUX_IA64_MODE="32"
2592         ;;
2593       *ELF-64*)
2594         HPUX_IA64_MODE="64"
2595         ;;
2596     esac
2597   fi
2598   rm -rf conftest*
2599   ;;
2600 *-*-irix6*)
2601   # Find out which ABI we are using.
2602   echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
2603   if AC_TRY_EVAL(ac_compile); then
2604     if test "$lt_cv_prog_gnu_ld" = yes; then
2605       case `/usr/bin/file conftest.$ac_objext` in
2606         *32-bit*)
2607           LD="${LD-ld} -melf32bsmip"
2608           ;;
2609         *N32*)
2610           LD="${LD-ld} -melf32bmipn32"
2611           ;;
2612         *64-bit*)
2613           LD="${LD-ld} -melf64bmip"
2614         ;;
2615       esac
2616     else
2617       case `/usr/bin/file conftest.$ac_objext` in
2618         *32-bit*)
2619           LD="${LD-ld} -32"
2620           ;;
2621         *N32*)
2622           LD="${LD-ld} -n32"
2623           ;;
2624         *64-bit*)
2625           LD="${LD-ld} -64"
2626           ;;
2627       esac
2628     fi
2629   fi
2630   rm -rf conftest*
2631   ;;
2632
2633 x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
2634 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
2635   # Find out which ABI we are using.
2636   echo 'int i;' > conftest.$ac_ext
2637   if AC_TRY_EVAL(ac_compile); then
2638     case `/usr/bin/file conftest.o` in
2639       *32-bit*)
2640         case $host in
2641           x86_64-*kfreebsd*-gnu)
2642             LD="${LD-ld} -m elf_i386_fbsd"
2643             ;;
2644           x86_64-*linux*)
2645             LD="${LD-ld} -m elf_i386"
2646             ;;
2647           powerpc64le-*linux*)
2648             LD="${LD-ld} -m elf32lppclinux"
2649             ;;
2650           powerpc64-*linux*)
2651             LD="${LD-ld} -m elf32ppclinux"
2652             ;;
2653           s390x-*linux*)
2654             LD="${LD-ld} -m elf_s390"
2655             ;;
2656           sparc64-*linux*)
2657             LD="${LD-ld} -m elf32_sparc"
2658             ;;
2659         esac
2660         ;;
2661       *64-bit*)
2662         case $host in
2663           x86_64-*kfreebsd*-gnu)
2664             LD="${LD-ld} -m elf_x86_64_fbsd"
2665             ;;
2666           x86_64-*linux*)
2667             LD="${LD-ld} -m elf_x86_64"
2668             ;;
2669           powerpcle-*linux*)
2670             LD="${LD-ld} -m elf64lppc"
2671             ;;
2672           powerpc-*linux*)
2673             LD="${LD-ld} -m elf64ppc"
2674             ;;
2675           s390*-*linux*|s390*-*tpf*)
2676             LD="${LD-ld} -m elf64_s390"
2677             ;;
2678           sparc*-*linux*)
2679             LD="${LD-ld} -m elf64_sparc"
2680             ;;
2681         esac
2682         ;;
2683     esac
2684   fi
2685   rm -rf conftest*
2686   ;;
2687
2688 *-*-sco3.2v5*)
2689   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2690   SAVE_CFLAGS="$CFLAGS"
2691   CFLAGS="$CFLAGS -belf"
2692   AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
2693     [AC_LANG_PUSH(C)
2694      AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
2695      AC_LANG_POP])
2696   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2697     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2698     CFLAGS="$SAVE_CFLAGS"
2699   fi
2700   ;;
2701 *-*solaris*)
2702   # Find out which ABI we are using.
2703   echo 'int i;' > conftest.$ac_ext
2704   if AC_TRY_EVAL(ac_compile); then
2705     case `/usr/bin/file conftest.o` in
2706     *64-bit*)
2707       case $lt_cv_prog_gnu_ld in
2708       yes*)
2709         case $host in
2710         i?86-*-solaris*)
2711           LD="${LD-ld} -m elf_x86_64"
2712           ;;
2713         sparc*-*-solaris*)
2714           LD="${LD-ld} -m elf64_sparc"
2715           ;;
2716         esac
2717         # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
2718         if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
2719           LD="${LD-ld}_sol2"
2720         fi
2721         ;;
2722       *)
2723         if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
2724           LD="${LD-ld} -64"
2725         fi
2726         ;;
2727       esac
2728       ;;
2729     esac
2730   fi
2731   rm -rf conftest*
2732   ;;
2733 esac
2734
2735 need_locks="$enable_libtool_lock"
2736 ])# _LT_ENABLE_LOCK
2737
2738
2739 # _LT_PROG_AR
2740 # -----------
2741 m4_defun([_LT_PROG_AR],
2742 [AC_CHECK_TOOLS(AR, [ar], false)
2743 : ${AR=ar}
2744 : ${AR_FLAGS=cru}
2745 _LT_DECL([], [AR], [1], [The archiver])
2746 _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
2747
2748 AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
2749   [lt_cv_ar_at_file=no
2750    AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
2751      [echo conftest.$ac_objext > conftest.lst
2752       lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
2753       AC_TRY_EVAL([lt_ar_try])
2754       if test "$ac_status" -eq 0; then
2755         # Ensure the archiver fails upon bogus file names.
2756         rm -f conftest.$ac_objext libconftest.a
2757         AC_TRY_EVAL([lt_ar_try])
2758         if test "$ac_status" -ne 0; then
2759           lt_cv_ar_at_file=@
2760         fi
2761       fi
2762       rm -f conftest.* libconftest.a
2763      ])
2764   ])
2765
2766 if test "x$lt_cv_ar_at_file" = xno; then
2767   archiver_list_spec=
2768 else
2769   archiver_list_spec=$lt_cv_ar_at_file
2770 fi
2771 _LT_DECL([], [archiver_list_spec], [1],
2772   [How to feed a file listing to the archiver])
2773 ])# _LT_PROG_AR
2774
2775
2776 # _LT_CMD_OLD_ARCHIVE
2777 # -------------------
2778 m4_defun([_LT_CMD_OLD_ARCHIVE],
2779 [_LT_PROG_AR
2780
2781 AC_CHECK_TOOL(STRIP, strip, :)
2782 test -z "$STRIP" && STRIP=:
2783 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
2784
2785 AC_CHECK_TOOL(RANLIB, ranlib, :)
2786 test -z "$RANLIB" && RANLIB=:
2787 _LT_DECL([], [RANLIB], [1],
2788     [Commands used to install an old-style archive])
2789
2790 # Determine commands to create old-style static archives.
2791 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
2792 old_postinstall_cmds='chmod 644 $oldlib'
2793 old_postuninstall_cmds=
2794
2795 if test -n "$RANLIB"; then
2796   case $host_os in
2797   openbsd*)
2798     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
2799     ;;
2800   *)
2801     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
2802     ;;
2803   esac
2804   old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
2805 fi
2806
2807 case $host_os in
2808   darwin*)
2809     lock_old_archive_extraction=yes ;;
2810   *)
2811     lock_old_archive_extraction=no ;;
2812 esac
2813 _LT_DECL([], [old_postinstall_cmds], [2])
2814 _LT_DECL([], [old_postuninstall_cmds], [2])
2815 _LT_TAGDECL([], [old_archive_cmds], [2],
2816     [Commands used to build an old-style archive])
2817 _LT_DECL([], [lock_old_archive_extraction], [0],
2818     [Whether to use a lock for old archive extraction])
2819 ])# _LT_CMD_OLD_ARCHIVE
2820
2821
2822 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2823 #               [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
2824 # ----------------------------------------------------------------
2825 # Check whether the given compiler option works
2826 AC_DEFUN([_LT_COMPILER_OPTION],
2827 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2828 m4_require([_LT_DECL_SED])dnl
2829 AC_CACHE_CHECK([$1], [$2],
2830   [$2=no
2831    m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
2832    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2833    lt_compiler_flag="$3"
2834    # Insert the option either (1) after the last *FLAGS variable, or
2835    # (2) before a word containing "conftest.", or (3) at the end.
2836    # Note that $ac_compile itself does not contain backslashes and begins
2837    # with a dollar sign (not a hyphen), so the echo should work correctly.
2838    # The option is referenced via a variable to avoid confusing sed.
2839    lt_compile=`echo "$ac_compile" | $SED \
2840    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2841    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2842    -e 's:$: $lt_compiler_flag:'`
2843    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2844    (eval "$lt_compile" 2>conftest.err)
2845    ac_status=$?
2846    cat conftest.err >&AS_MESSAGE_LOG_FD
2847    echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2848    if (exit $ac_status) && test -s "$ac_outfile"; then
2849      # The compiler can only warn and ignore the option if not recognized
2850      # So say no if there are warnings other than the usual output.
2851      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
2852      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2853      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
2854        $2=yes
2855      fi
2856    fi
2857    $RM conftest*
2858 ])
2859
2860 if test x"[$]$2" = xyes; then
2861     m4_if([$5], , :, [$5])
2862 else
2863     m4_if([$6], , :, [$6])
2864 fi
2865 ])# _LT_COMPILER_OPTION
2866
2867 # Old name:
2868 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
2869 dnl aclocal-1.4 backwards compatibility:
2870 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
2871
2872
2873 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2874 #                  [ACTION-SUCCESS], [ACTION-FAILURE])
2875 # ----------------------------------------------------
2876 # Check whether the given linker option works
2877 AC_DEFUN([_LT_LINKER_OPTION],
2878 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2879 m4_require([_LT_DECL_SED])dnl
2880 AC_CACHE_CHECK([$1], [$2],
2881   [$2=no
2882    save_LDFLAGS="$LDFLAGS"
2883    LDFLAGS="$LDFLAGS $3"
2884    echo "$lt_simple_link_test_code" > conftest.$ac_ext
2885    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
2886      # The linker can only warn and ignore the option if not recognized
2887      # So say no if there are warnings
2888      if test -s conftest.err; then
2889        # Append any errors to the config.log.
2890        cat conftest.err 1>&AS_MESSAGE_LOG_FD
2891        $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
2892        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2893        if diff conftest.exp conftest.er2 >/dev/null; then
2894          $2=yes
2895        fi
2896      else
2897        $2=yes
2898      fi
2899    fi
2900    $RM -r conftest*
2901    LDFLAGS="$save_LDFLAGS"
2902 ])
2903
2904 if test x"[$]$2" = xyes; then
2905     m4_if([$4], , :, [$4])
2906 else
2907     m4_if([$5], , :, [$5])
2908 fi
2909 ])# _LT_LINKER_OPTION
2910
2911 # Old name:
2912 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
2913 dnl aclocal-1.4 backwards compatibility:
2914 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
2915
2916
2917 # LT_CMD_MAX_LEN
2918 #---------------
2919 AC_DEFUN([LT_CMD_MAX_LEN],
2920 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2921 # find the maximum length of command line arguments
2922 AC_MSG_CHECKING([the maximum length of command line arguments])
2923 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
2924   i=0
2925   teststring="ABCD"
2926
2927   case $build_os in
2928   msdosdjgpp*)
2929     # On DJGPP, this test can blow up pretty badly due to problems in libc
2930     # (any single argument exceeding 2000 bytes causes a buffer overrun
2931     # during glob expansion).  Even if it were fixed, the result of this
2932     # check would be larger than it should be.
2933     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
2934     ;;
2935
2936   gnu*)
2937     # Under GNU Hurd, this test is not required because there is
2938     # no limit to the length of command line arguments.
2939     # Libtool will interpret -1 as no limit whatsoever
2940     lt_cv_sys_max_cmd_len=-1;
2941     ;;
2942
2943   cygwin* | mingw* | cegcc*)
2944     # On Win9x/ME, this test blows up -- it succeeds, but takes
2945     # about 5 minutes as the teststring grows exponentially.
2946     # Worse, since 9x/ME are not pre-emptively multitasking,
2947     # you end up with a "frozen" computer, even though with patience
2948     # the test eventually succeeds (with a max line length of 256k).
2949     # Instead, let's just punt: use the minimum linelength reported by
2950     # all of the supported platforms: 8192 (on NT/2K/XP).
2951     lt_cv_sys_max_cmd_len=8192;
2952     ;;
2953
2954   mint*)
2955     # On MiNT this can take a long time and run out of memory.
2956     lt_cv_sys_max_cmd_len=8192;
2957     ;;
2958
2959   amigaos*)
2960     # On AmigaOS with pdksh, this test takes hours, literally.
2961     # So we just punt and use a minimum line length of 8192.
2962     lt_cv_sys_max_cmd_len=8192;
2963     ;;
2964
2965   netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
2966     # This has been around since 386BSD, at least.  Likely further.
2967     if test -x /sbin/sysctl; then
2968       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
2969     elif test -x /usr/sbin/sysctl; then
2970       lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
2971     else
2972       lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
2973     fi
2974     # And add a safety zone
2975     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2976     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2977     ;;
2978
2979   interix*)
2980     # We know the value 262144 and hardcode it with a safety zone (like BSD)
2981     lt_cv_sys_max_cmd_len=196608
2982     ;;
2983
2984   os2*)
2985     # The test takes a long time on OS/2.
2986     lt_cv_sys_max_cmd_len=8192
2987     ;;
2988
2989   osf*)
2990     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
2991     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
2992     # nice to cause kernel panics so lets avoid the loop below.
2993     # First set a reasonable default.
2994     lt_cv_sys_max_cmd_len=16384
2995     #
2996     if test -x /sbin/sysconfig; then
2997       case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
2998         *1*) lt_cv_sys_max_cmd_len=-1 ;;
2999       esac
3000     fi
3001     ;;
3002   sco3.2v5*)
3003     lt_cv_sys_max_cmd_len=102400
3004     ;;
3005   sysv5* | sco5v6* | sysv4.2uw2*)
3006     kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
3007     if test -n "$kargmax"; then
3008       lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[         ]]//'`
3009     else
3010       lt_cv_sys_max_cmd_len=32768
3011     fi
3012     ;;
3013   *)
3014     lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
3015     if test -n "$lt_cv_sys_max_cmd_len"; then
3016       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
3017       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
3018     else
3019       # Make teststring a little bigger before we do anything with it.
3020       # a 1K string should be a reasonable start.
3021       for i in 1 2 3 4 5 6 7 8 ; do
3022         teststring=$teststring$teststring
3023       done
3024       SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
3025       # If test is not a shell built-in, we'll probably end up computing a
3026       # maximum length that is only half of the actual maximum length, but
3027       # we can't tell.
3028       while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
3029                  = "X$teststring$teststring"; } >/dev/null 2>&1 &&
3030               test $i != 17 # 1/2 MB should be enough
3031       do
3032         i=`expr $i + 1`
3033         teststring=$teststring$teststring
3034       done
3035       # Only check the string length outside the loop.
3036       lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
3037       teststring=
3038       # Add a significant safety factor because C++ compilers can tack on
3039       # massive amounts of additional arguments before passing them to the
3040       # linker.  It appears as though 1/2 is a usable value.
3041       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
3042     fi
3043     ;;
3044   esac
3045 ])
3046 if test -n $lt_cv_sys_max_cmd_len ; then
3047   AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
3048 else
3049   AC_MSG_RESULT(none)
3050 fi
3051 max_cmd_len=$lt_cv_sys_max_cmd_len
3052 _LT_DECL([], [max_cmd_len], [0],
3053     [What is the maximum length of a command?])
3054 ])# LT_CMD_MAX_LEN
3055
3056 # Old name:
3057 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
3058 dnl aclocal-1.4 backwards compatibility:
3059 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
3060
3061
3062 # _LT_HEADER_DLFCN
3063 # ----------------
3064 m4_defun([_LT_HEADER_DLFCN],
3065 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
3066 ])# _LT_HEADER_DLFCN
3067
3068
3069 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
3070 #                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
3071 # ----------------------------------------------------------------
3072 m4_defun([_LT_TRY_DLOPEN_SELF],
3073 [m4_require([_LT_HEADER_DLFCN])dnl
3074 if test "$cross_compiling" = yes; then :
3075   [$4]
3076 else
3077   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
3078   lt_status=$lt_dlunknown
3079   cat > conftest.$ac_ext <<_LT_EOF
3080 [#line $LINENO "configure"
3081 #include "confdefs.h"
3082
3083 #if HAVE_DLFCN_H
3084 #include <dlfcn.h>
3085 #endif
3086
3087 #include <stdio.h>
3088
3089 #ifdef RTLD_GLOBAL
3090 #  define LT_DLGLOBAL           RTLD_GLOBAL
3091 #else
3092 #  ifdef DL_GLOBAL
3093 #    define LT_DLGLOBAL         DL_GLOBAL
3094 #  else
3095 #    define LT_DLGLOBAL         0
3096 #  endif
3097 #endif
3098
3099 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
3100    find out it does not work in some platform. */
3101 #ifndef LT_DLLAZY_OR_NOW
3102 #  ifdef RTLD_LAZY
3103 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
3104 #  else
3105 #    ifdef DL_LAZY
3106 #      define LT_DLLAZY_OR_NOW          DL_LAZY
3107 #    else
3108 #      ifdef RTLD_NOW
3109 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
3110 #      else
3111 #        ifdef DL_NOW
3112 #          define LT_DLLAZY_OR_NOW      DL_NOW
3113 #        else
3114 #          define LT_DLLAZY_OR_NOW      0
3115 #        endif
3116 #      endif
3117 #    endif
3118 #  endif
3119 #endif
3120
3121 /* When -fvisbility=hidden is used, assume the code has been annotated
3122    correspondingly for the symbols needed.  */
3123 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
3124 int fnord () __attribute__((visibility("default")));
3125 #endif
3126
3127 int fnord () { return 42; }
3128 int main ()
3129 {
3130   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
3131   int status = $lt_dlunknown;
3132
3133   if (self)
3134     {
3135       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
3136       else
3137         {
3138           if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
3139           else puts (dlerror ());
3140         }
3141       /* dlclose (self); */
3142     }
3143   else
3144     puts (dlerror ());
3145
3146   return status;
3147 }]
3148 _LT_EOF
3149   if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
3150     (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
3151     lt_status=$?
3152     case x$lt_status in
3153       x$lt_dlno_uscore) $1 ;;
3154       x$lt_dlneed_uscore) $2 ;;
3155       x$lt_dlunknown|x*) $3 ;;
3156     esac
3157   else :
3158     # compilation failed
3159     $3
3160   fi
3161 fi
3162 rm -fr conftest*
3163 ])# _LT_TRY_DLOPEN_SELF
3164
3165
3166 # LT_SYS_DLOPEN_SELF
3167 # ------------------
3168 AC_DEFUN([LT_SYS_DLOPEN_SELF],
3169 [m4_require([_LT_HEADER_DLFCN])dnl
3170 if test "x$enable_dlopen" != xyes; then
3171   enable_dlopen=unknown
3172   enable_dlopen_self=unknown
3173   enable_dlopen_self_static=unknown
3174 else
3175   lt_cv_dlopen=no
3176   lt_cv_dlopen_libs=
3177
3178   case $host_os in
3179   beos*)
3180     lt_cv_dlopen="load_add_on"
3181     lt_cv_dlopen_libs=
3182     lt_cv_dlopen_self=yes
3183     ;;
3184
3185   mingw* | pw32* | cegcc*)
3186     lt_cv_dlopen="LoadLibrary"
3187     lt_cv_dlopen_libs=
3188     ;;
3189
3190   cygwin*)
3191     lt_cv_dlopen="dlopen"
3192     lt_cv_dlopen_libs=
3193     ;;
3194
3195   darwin*)
3196   # if libdl is installed we need to link against it
3197     AC_CHECK_LIB([dl], [dlopen],
3198                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
3199     lt_cv_dlopen="dyld"
3200     lt_cv_dlopen_libs=
3201     lt_cv_dlopen_self=yes
3202     ])
3203     ;;
3204
3205   *)
3206     AC_CHECK_FUNC([shl_load],
3207           [lt_cv_dlopen="shl_load"],
3208       [AC_CHECK_LIB([dld], [shl_load],
3209             [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
3210         [AC_CHECK_FUNC([dlopen],
3211               [lt_cv_dlopen="dlopen"],
3212           [AC_CHECK_LIB([dl], [dlopen],
3213                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
3214             [AC_CHECK_LIB([svld], [dlopen],
3215                   [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
3216               [AC_CHECK_LIB([dld], [dld_link],
3217                     [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
3218               ])
3219             ])
3220           ])
3221         ])
3222       ])
3223     ;;
3224   esac
3225
3226   if test "x$lt_cv_dlopen" != xno; then
3227     enable_dlopen=yes
3228   else
3229     enable_dlopen=no
3230   fi
3231
3232   case $lt_cv_dlopen in
3233   dlopen)
3234     save_CPPFLAGS="$CPPFLAGS"
3235     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
3236
3237     save_LDFLAGS="$LDFLAGS"
3238     wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
3239
3240     save_LIBS="$LIBS"
3241     LIBS="$lt_cv_dlopen_libs $LIBS"
3242
3243     AC_CACHE_CHECK([whether a program can dlopen itself],
3244           lt_cv_dlopen_self, [dnl
3245           _LT_TRY_DLOPEN_SELF(
3246             lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
3247             lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
3248     ])
3249
3250     if test "x$lt_cv_dlopen_self" = xyes; then
3251       wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
3252       AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
3253           lt_cv_dlopen_self_static, [dnl
3254           _LT_TRY_DLOPEN_SELF(
3255             lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
3256             lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
3257       ])
3258     fi
3259
3260     CPPFLAGS="$save_CPPFLAGS"
3261     LDFLAGS="$save_LDFLAGS"
3262     LIBS="$save_LIBS"
3263     ;;
3264   esac
3265
3266   case $lt_cv_dlopen_self in
3267   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
3268   *) enable_dlopen_self=unknown ;;
3269   esac
3270
3271   case $lt_cv_dlopen_self_static in
3272   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
3273   *) enable_dlopen_self_static=unknown ;;
3274   esac
3275 fi
3276 _LT_DECL([dlopen_support], [enable_dlopen], [0],
3277          [Whether dlopen is supported])
3278 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
3279          [Whether dlopen of programs is supported])
3280 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
3281          [Whether dlopen of statically linked programs is supported])
3282 ])# LT_SYS_DLOPEN_SELF
3283
3284 # Old name:
3285 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
3286 dnl aclocal-1.4 backwards compatibility:
3287 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
3288
3289
3290 # _LT_COMPILER_C_O([TAGNAME])
3291 # ---------------------------
3292 # Check to see if options -c and -o are simultaneously supported by compiler.
3293 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
3294 m4_defun([_LT_COMPILER_C_O],
3295 [m4_require([_LT_DECL_SED])dnl
3296 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3297 m4_require([_LT_TAG_COMPILER])dnl
3298 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
3299   [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
3300   [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
3301    $RM -r conftest 2>/dev/null
3302    mkdir conftest
3303    cd conftest
3304    mkdir out
3305    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
3306
3307    lt_compiler_flag="-o out/conftest2.$ac_objext"
3308    # Insert the option either (1) after the last *FLAGS variable, or
3309    # (2) before a word containing "conftest.", or (3) at the end.
3310    # Note that $ac_compile itself does not contain backslashes and begins
3311    # with a dollar sign (not a hyphen), so the echo should work correctly.
3312    lt_compile=`echo "$ac_compile" | $SED \
3313    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
3314    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
3315    -e 's:$: $lt_compiler_flag:'`
3316    (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
3317    (eval "$lt_compile" 2>out/conftest.err)
3318    ac_status=$?
3319    cat out/conftest.err >&AS_MESSAGE_LOG_FD
3320    echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
3321    if (exit $ac_status) && test -s out/conftest2.$ac_objext
3322    then
3323      # The compiler can only warn and ignore the option if not recognized
3324      # So say no if there are warnings
3325      $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
3326      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
3327      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
3328        _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
3329      fi
3330    fi
3331    chmod u+w . 2>&AS_MESSAGE_LOG_FD
3332    $RM conftest*
3333    # SGI C++ compiler will create directory out/ii_files/ for
3334    # template instantiation
3335    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
3336    $RM out/* && rmdir out
3337    cd ..
3338    $RM -r conftest
3339    $RM conftest*
3340 ])
3341 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
3342         [Does compiler simultaneously support -c and -o options?])
3343 ])# _LT_COMPILER_C_O
3344
3345
3346 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
3347 # ----------------------------------
3348 # Check to see if we can do hard links to lock some files if needed
3349 m4_defun([_LT_COMPILER_FILE_LOCKS],
3350 [m4_require([_LT_ENABLE_LOCK])dnl
3351 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3352 _LT_COMPILER_C_O([$1])
3353
3354 hard_links="nottested"
3355 if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
3356   # do not overwrite the value of need_locks provided by the user
3357   AC_MSG_CHECKING([if we can lock with hard links])
3358   hard_links=yes
3359   $RM conftest*
3360   ln conftest.a conftest.b 2>/dev/null && hard_links=no
3361   touch conftest.a
3362   ln conftest.a conftest.b 2>&5 || hard_links=no
3363   ln conftest.a conftest.b 2>/dev/null && hard_links=no
3364   AC_MSG_RESULT([$hard_links])
3365   if test "$hard_links" = no; then
3366     AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
3367     need_locks=warn
3368   fi
3369 else
3370   need_locks=no
3371 fi
3372 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
3373 ])# _LT_COMPILER_FILE_LOCKS
3374
3375
3376 # _LT_CHECK_OBJDIR
3377 # ----------------
3378 m4_defun([_LT_CHECK_OBJDIR],
3379 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
3380 [rm -f .libs 2>/dev/null
3381 mkdir .libs 2>/dev/null
3382 if test -d .libs; then
3383   lt_cv_objdir=.libs
3384 else
3385   # MS-DOS does not allow filenames that begin with a dot.
3386   lt_cv_objdir=_libs
3387 fi
3388 rmdir .libs 2>/dev/null])
3389 objdir=$lt_cv_objdir
3390 _LT_DECL([], [objdir], [0],
3391          [The name of the directory that contains temporary libtool files])dnl
3392 m4_pattern_allow([LT_OBJDIR])dnl
3393 AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
3394   [Define to the sub-directory in which libtool stores uninstalled libraries.])
3395 ])# _LT_CHECK_OBJDIR
3396
3397
3398 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
3399 # --------------------------------------
3400 # Check hardcoding attributes.
3401 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
3402 [AC_MSG_CHECKING([how to hardcode library paths into programs])
3403 _LT_TAGVAR(hardcode_action, $1)=
3404 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
3405    test -n "$_LT_TAGVAR(runpath_var, $1)" ||
3406    test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
3407
3408   # We can hardcode non-existent directories.
3409   if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
3410      # If the only mechanism to avoid hardcoding is shlibpath_var, we
3411      # have to relink, otherwise we might link with an installed library
3412      # when we should be linking with a yet-to-be-installed one
3413      ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
3414      test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
3415     # Linking always hardcodes the temporary library directory.
3416     _LT_TAGVAR(hardcode_action, $1)=relink
3417   else
3418     # We can link without hardcoding, and we can hardcode nonexisting dirs.
3419     _LT_TAGVAR(hardcode_action, $1)=immediate
3420   fi
3421 else
3422   # We cannot hardcode anything, or else we can only hardcode existing
3423   # directories.
3424   _LT_TAGVAR(hardcode_action, $1)=unsupported
3425 fi
3426 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
3427
3428 if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
3429    test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
3430   # Fast installation is not supported
3431   enable_fast_install=no
3432 elif test "$shlibpath_overrides_runpath" = yes ||
3433      test "$enable_shared" = no; then
3434   # Fast installation is not necessary
3435   enable_fast_install=needless
3436 fi
3437 _LT_TAGDECL([], [hardcode_action], [0],
3438     [How to hardcode a shared library path into an executable])
3439 ])# _LT_LINKER_HARDCODE_LIBPATH
3440
3441
3442 # _LT_CMD_STRIPLIB
3443 # ----------------
3444 m4_defun([_LT_CMD_STRIPLIB],
3445 [m4_require([_LT_DECL_EGREP])
3446 striplib=
3447 old_striplib=
3448 AC_MSG_CHECKING([whether stripping libraries is possible])
3449 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
3450   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
3451   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
3452   AC_MSG_RESULT([yes])
3453 else
3454 # FIXME - insert some real tests, host_os isn't really good enough
3455   case $host_os in
3456   darwin*)
3457     if test -n "$STRIP" ; then
3458       striplib="$STRIP -x"
3459       old_striplib="$STRIP -S"
3460       AC_MSG_RESULT([yes])
3461     else
3462       AC_MSG_RESULT([no])
3463     fi
3464     ;;
3465   *)
3466     AC_MSG_RESULT([no])
3467     ;;
3468   esac
3469 fi
3470 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
3471 _LT_DECL([], [striplib], [1])
3472 ])# _LT_CMD_STRIPLIB
3473
3474
3475 # _LT_SYS_DYNAMIC_LINKER([TAG])
3476 # -----------------------------
3477 # PORTME Fill in your ld.so characteristics
3478 m4_defun([_LT_SYS_DYNAMIC_LINKER],
3479 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3480 m4_require([_LT_DECL_EGREP])dnl
3481 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3482 m4_require([_LT_DECL_OBJDUMP])dnl
3483 m4_require([_LT_DECL_SED])dnl
3484 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
3485 AC_MSG_CHECKING([dynamic linker characteristics])
3486 m4_if([$1],
3487         [], [
3488 if test "$GCC" = yes; then
3489   case $host_os in
3490     darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
3491     *) lt_awk_arg="/^libraries:/" ;;
3492   esac
3493   case $host_os in
3494     mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
3495     *) lt_sed_strip_eq="s,=/,/,g" ;;
3496   esac
3497   lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
3498   case $lt_search_path_spec in
3499   *\;*)
3500     # if the path contains ";" then we assume it to be the separator
3501     # otherwise default to the standard path separator (i.e. ":") - it is
3502     # assumed that no part of a normal pathname contains ";" but that should
3503     # okay in the real world where ";" in dirpaths is itself problematic.
3504     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
3505     ;;
3506   *)
3507     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
3508     ;;
3509   esac
3510   # Ok, now we have the path, separated by spaces, we can step through it
3511   # and add multilib dir if necessary.
3512   lt_tmp_lt_search_path_spec=
3513   lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
3514   for lt_sys_path in $lt_search_path_spec; do
3515     if test -d "$lt_sys_path/$lt_multi_os_dir"; then
3516       lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
3517     else
3518       test -d "$lt_sys_path" && \
3519         lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
3520     fi
3521   done
3522   lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
3523 BEGIN {RS=" "; FS="/|\n";} {
3524   lt_foo="";
3525   lt_count=0;
3526   for (lt_i = NF; lt_i > 0; lt_i--) {
3527     if ($lt_i != "" && $lt_i != ".") {
3528       if ($lt_i == "..") {
3529         lt_count++;
3530       } else {
3531         if (lt_count == 0) {
3532           lt_foo="/" $lt_i lt_foo;
3533         } else {
3534           lt_count--;
3535         }
3536       }
3537     }
3538   }
3539   if (lt_foo != "") { lt_freq[[lt_foo]]++; }
3540   if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
3541 }'`
3542   # AWK program above erroneously prepends '/' to C:/dos/paths
3543   # for these hosts.
3544   case $host_os in
3545     mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
3546       $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
3547   esac
3548   sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
3549 else
3550   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
3551 fi])
3552 library_names_spec=
3553 libname_spec='lib$name'
3554 soname_spec=
3555 shrext_cmds=".so"
3556 postinstall_cmds=
3557 postuninstall_cmds=
3558 finish_cmds=
3559 finish_eval=
3560 shlibpath_var=
3561 shlibpath_overrides_runpath=unknown
3562 version_type=none
3563 dynamic_linker="$host_os ld.so"
3564 sys_lib_dlsearch_path_spec="/lib /usr/lib"
3565 need_lib_prefix=unknown
3566 hardcode_into_libs=no
3567
3568 # when you set need_version to no, make sure it does not cause -set_version
3569 # flags to be left without arguments
3570 need_version=unknown
3571
3572 case $host_os in
3573 aix3*)
3574   version_type=linux # correct to gnu/linux during the next big refactor
3575   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
3576   shlibpath_var=LIBPATH
3577
3578   # AIX 3 has no versioning support, so we append a major version to the name.
3579   soname_spec='${libname}${release}${shared_ext}$major'
3580   ;;
3581
3582 aix[[4-9]]*)
3583   version_type=linux # correct to gnu/linux during the next big refactor
3584   need_lib_prefix=no
3585   need_version=no
3586   hardcode_into_libs=yes
3587   if test "$host_cpu" = ia64; then
3588     # AIX 5 supports IA64
3589     library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
3590     shlibpath_var=LD_LIBRARY_PATH
3591   else
3592     # With GCC up to 2.95.x, collect2 would create an import file
3593     # for dependence libraries.  The import file would start with
3594     # the line `#! .'.  This would cause the generated library to
3595     # depend on `.', always an invalid library.  This was fixed in
3596     # development snapshots of GCC prior to 3.0.
3597     case $host_os in
3598       aix4 | aix4.[[01]] | aix4.[[01]].*)
3599       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
3600            echo ' yes '
3601            echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
3602         :
3603       else
3604         can_build_shared=no
3605       fi
3606       ;;
3607     esac
3608     # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
3609     # soname into executable. Probably we can add versioning support to
3610     # collect2, so additional links can be useful in future.
3611     if test "$aix_use_runtimelinking" = yes; then
3612       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
3613       # instead of lib<name>.a to let people know that these are not
3614       # typical AIX shared libraries.
3615       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3616     else
3617       # We preserve .a as extension for shared libraries through AIX4.2
3618       # and later when we are not doing run time linking.
3619       library_names_spec='${libname}${release}.a $libname.a'
3620       soname_spec='${libname}${release}${shared_ext}$major'
3621     fi
3622     shlibpath_var=LIBPATH
3623   fi
3624   ;;
3625
3626 amigaos*)
3627   case $host_cpu in
3628   powerpc)
3629     # Since July 2007 AmigaOS4 officially supports .so libraries.
3630     # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
3631     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3632     ;;
3633   m68k)
3634     library_names_spec='$libname.ixlibrary $libname.a'
3635     # Create ${libname}_ixlibrary.a entries in /sys/libs.
3636     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'
3637     ;;
3638   esac
3639   ;;
3640
3641 beos*)
3642   library_names_spec='${libname}${shared_ext}'
3643   dynamic_linker="$host_os ld.so"
3644   shlibpath_var=LIBRARY_PATH
3645   ;;
3646
3647 bsdi[[45]]*)
3648   version_type=linux # correct to gnu/linux during the next big refactor
3649   need_version=no
3650   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3651   soname_spec='${libname}${release}${shared_ext}$major'
3652   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
3653   shlibpath_var=LD_LIBRARY_PATH
3654   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
3655   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
3656   # the default ld.so.conf also contains /usr/contrib/lib and
3657   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
3658   # libtool to hard-code these into programs
3659   ;;
3660
3661 cygwin* | mingw* | pw32* | cegcc*)
3662   version_type=windows
3663   shrext_cmds=".dll"
3664   need_version=no
3665   need_lib_prefix=no
3666
3667   case $GCC,$cc_basename in
3668   yes,*)
3669     # gcc
3670     library_names_spec='$libname.dll.a'
3671     # DLL is installed to $(libdir)/../bin by postinstall_cmds
3672     postinstall_cmds='base_file=`basename \${file}`~
3673       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
3674       dldir=$destdir/`dirname \$dlpath`~
3675       test -d \$dldir || mkdir -p \$dldir~
3676       $install_prog $dir/$dlname \$dldir/$dlname~
3677       chmod a+x \$dldir/$dlname~
3678       if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
3679         eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
3680       fi'
3681     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3682       dlpath=$dir/\$dldll~
3683        $RM \$dlpath'
3684     shlibpath_overrides_runpath=yes
3685
3686     case $host_os in
3687     cygwin*)
3688       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
3689       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3690 m4_if([$1], [],[
3691       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
3692       ;;
3693     mingw* | cegcc*)
3694       # MinGW DLLs use traditional 'lib' prefix
3695       soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3696       ;;
3697     pw32*)
3698       # pw32 DLLs use 'pw' prefix rather than 'lib'
3699       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3700       ;;
3701     esac
3702     dynamic_linker='Win32 ld.exe'
3703     ;;
3704
3705   *,cl*)
3706     # Native MSVC
3707     libname_spec='$name'
3708     soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3709     library_names_spec='${libname}.dll.lib'
3710
3711     case $build_os in
3712     mingw*)
3713       sys_lib_search_path_spec=
3714       lt_save_ifs=$IFS
3715       IFS=';'
3716       for lt_path in $LIB
3717       do
3718         IFS=$lt_save_ifs
3719         # Let DOS variable expansion print the short 8.3 style file name.
3720         lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
3721         sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
3722       done
3723       IFS=$lt_save_ifs
3724       # Convert to MSYS style.
3725       sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
3726       ;;
3727     cygwin*)
3728       # Convert to unix form, then to dos form, then back to unix form
3729       # but this time dos style (no spaces!) so that the unix form looks
3730       # like /cygdrive/c/PROGRA~1:/cygdr...
3731       sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
3732       sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
3733       sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3734       ;;
3735     *)
3736       sys_lib_search_path_spec="$LIB"
3737       if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
3738         # It is most probably a Windows format PATH.
3739         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
3740       else
3741         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3742       fi
3743       # FIXME: find the short name or the path components, as spaces are
3744       # common. (e.g. "Program Files" -> "PROGRA~1")
3745       ;;
3746     esac
3747
3748     # DLL is installed to $(libdir)/../bin by postinstall_cmds
3749     postinstall_cmds='base_file=`basename \${file}`~
3750       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
3751       dldir=$destdir/`dirname \$dlpath`~
3752       test -d \$dldir || mkdir -p \$dldir~
3753       $install_prog $dir/$dlname \$dldir/$dlname'
3754     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3755       dlpath=$dir/\$dldll~
3756        $RM \$dlpath'
3757     shlibpath_overrides_runpath=yes
3758     dynamic_linker='Win32 link.exe'
3759     ;;
3760
3761   *)
3762     # Assume MSVC wrapper
3763     library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
3764     dynamic_linker='Win32 ld.exe'
3765     ;;
3766   esac
3767   # FIXME: first we should search . and the directory the executable is in
3768   shlibpath_var=PATH
3769   ;;
3770
3771 darwin* | rhapsody*)
3772   dynamic_linker="$host_os dyld"
3773   version_type=darwin
3774   need_lib_prefix=no
3775   need_version=no
3776   library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
3777   soname_spec='${libname}${release}${major}$shared_ext'
3778   shlibpath_overrides_runpath=yes
3779   shlibpath_var=DYLD_LIBRARY_PATH
3780   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
3781 m4_if([$1], [],[
3782   sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
3783   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
3784   ;;
3785
3786 dgux*)
3787   version_type=linux # correct to gnu/linux during the next big refactor
3788   need_lib_prefix=no
3789   need_version=no
3790   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
3791   soname_spec='${libname}${release}${shared_ext}$major'
3792   shlibpath_var=LD_LIBRARY_PATH
3793   ;;
3794
3795 freebsd* | dragonfly*)
3796   # DragonFly does not have aout.  When/if they implement a new
3797   # versioning mechanism, adjust this.
3798   if test -x /usr/bin/objformat; then
3799     objformat=`/usr/bin/objformat`
3800   else
3801     case $host_os in
3802     freebsd[[23]].*) objformat=aout ;;
3803     *) objformat=elf ;;
3804     esac
3805   fi
3806   version_type=freebsd-$objformat
3807   case $version_type in
3808     freebsd-elf*)
3809       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3810       need_version=no
3811       need_lib_prefix=no
3812       ;;
3813     freebsd-*)
3814       library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
3815       need_version=yes
3816       ;;
3817   esac
3818   shlibpath_var=LD_LIBRARY_PATH
3819   case $host_os in
3820   freebsd2.*)
3821     shlibpath_overrides_runpath=yes
3822     ;;
3823   freebsd3.[[01]]* | freebsdelf3.[[01]]*)
3824     shlibpath_overrides_runpath=yes
3825     hardcode_into_libs=yes
3826     ;;
3827   freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
3828   freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
3829     shlibpath_overrides_runpath=no
3830     hardcode_into_libs=yes
3831     ;;
3832   *) # from 4.6 on, and DragonFly
3833     shlibpath_overrides_runpath=yes
3834     hardcode_into_libs=yes
3835     ;;
3836   esac
3837   ;;
3838
3839 gnu*)
3840   version_type=linux # correct to gnu/linux during the next big refactor
3841   need_lib_prefix=no
3842   need_version=no
3843   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
3844   soname_spec='${libname}${release}${shared_ext}$major'
3845   shlibpath_var=LD_LIBRARY_PATH
3846   shlibpath_overrides_runpath=no
3847   hardcode_into_libs=yes
3848   ;;
3849
3850 haiku*)
3851   version_type=linux # correct to gnu/linux during the next big refactor
3852   need_lib_prefix=no
3853   need_version=no
3854   dynamic_linker="$host_os runtime_loader"
3855   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
3856   soname_spec='${libname}${release}${shared_ext}$major'
3857   shlibpath_var=LIBRARY_PATH
3858   shlibpath_overrides_runpath=yes
3859   sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
3860   hardcode_into_libs=yes
3861   ;;
3862
3863 hpux9* | hpux10* | hpux11*)
3864   # Give a soname corresponding to the major version so that dld.sl refuses to
3865   # link against other versions.
3866   version_type=sunos
3867   need_lib_prefix=no
3868   need_version=no
3869   case $host_cpu in
3870   ia64*)
3871     shrext_cmds='.so'
3872     hardcode_into_libs=yes
3873     dynamic_linker="$host_os dld.so"
3874     shlibpath_var=LD_LIBRARY_PATH
3875     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3876     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3877     soname_spec='${libname}${release}${shared_ext}$major'
3878     if test "X$HPUX_IA64_MODE" = X32; then
3879       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
3880     else
3881       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
3882     fi
3883     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3884     ;;
3885   hppa*64*)
3886     shrext_cmds='.sl'
3887     hardcode_into_libs=yes
3888     dynamic_linker="$host_os dld.sl"
3889     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
3890     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3891     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3892     soname_spec='${libname}${release}${shared_ext}$major'
3893     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
3894     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3895     ;;
3896   *)
3897     shrext_cmds='.sl'
3898     dynamic_linker="$host_os dld.sl"
3899     shlibpath_var=SHLIB_PATH
3900     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
3901     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3902     soname_spec='${libname}${release}${shared_ext}$major'
3903     ;;
3904   esac
3905   # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
3906   postinstall_cmds='chmod 555 $lib'
3907   # or fails outright, so override atomically:
3908   install_override_mode=555
3909   ;;
3910
3911 interix[[3-9]]*)
3912   version_type=linux # correct to gnu/linux during the next big refactor
3913   need_lib_prefix=no
3914   need_version=no
3915   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3916   soname_spec='${libname}${release}${shared_ext}$major'
3917   dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
3918   shlibpath_var=LD_LIBRARY_PATH
3919   shlibpath_overrides_runpath=no
3920   hardcode_into_libs=yes
3921   ;;
3922
3923 irix5* | irix6* | nonstopux*)
3924   case $host_os in
3925     nonstopux*) version_type=nonstopux ;;
3926     *)
3927         if test "$lt_cv_prog_gnu_ld" = yes; then
3928                 version_type=linux # correct to gnu/linux during the next big refactor
3929         else
3930                 version_type=irix
3931         fi ;;
3932   esac
3933   need_lib_prefix=no
3934   need_version=no
3935   soname_spec='${libname}${release}${shared_ext}$major'
3936   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
3937   case $host_os in
3938   irix5* | nonstopux*)
3939     libsuff= shlibsuff=
3940     ;;
3941   *)
3942     case $LD in # libtool.m4 will add one of these switches to LD
3943     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
3944       libsuff= shlibsuff= libmagic=32-bit;;
3945     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
3946       libsuff=32 shlibsuff=N32 libmagic=N32;;
3947     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
3948       libsuff=64 shlibsuff=64 libmagic=64-bit;;
3949     *) libsuff= shlibsuff= libmagic=never-match;;
3950     esac
3951     ;;
3952   esac
3953   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
3954   shlibpath_overrides_runpath=no
3955   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
3956   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
3957   hardcode_into_libs=yes
3958   ;;
3959
3960 # No shared lib support for Linux oldld, aout, or coff.
3961 linux*oldld* | linux*aout* | linux*coff*)
3962   dynamic_linker=no
3963   ;;
3964
3965 # This must be glibc/ELF.
3966 linux* | k*bsd*-gnu | kopensolaris*-gnu)
3967   version_type=linux # correct to gnu/linux during the next big refactor
3968   need_lib_prefix=no
3969   need_version=no
3970   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3971   soname_spec='${libname}${release}${shared_ext}$major'
3972   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
3973   shlibpath_var=LD_LIBRARY_PATH
3974   shlibpath_overrides_runpath=no
3975
3976   # Some binutils ld are patched to set DT_RUNPATH
3977   AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
3978     [lt_cv_shlibpath_overrides_runpath=no
3979     save_LDFLAGS=$LDFLAGS
3980     save_libdir=$libdir
3981     eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
3982          LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
3983     AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
3984       [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
3985          [lt_cv_shlibpath_overrides_runpath=yes])])
3986     LDFLAGS=$save_LDFLAGS
3987     libdir=$save_libdir
3988     ])
3989   shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
3990
3991   # This implies no fast_install, which is unacceptable.
3992   # Some rework will be needed to allow for fast_install
3993   # before this can be enabled.
3994   hardcode_into_libs=yes
3995
3996   # Add ABI-specific directories to the system library path.
3997   sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
3998
3999   # Append ld.so.conf contents to the search path
4000   if test -f /etc/ld.so.conf; then
4001     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' ' '`
4002     sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
4003
4004   fi
4005
4006   # We used to test for /lib/ld.so.1 and disable shared libraries on
4007   # powerpc, because MkLinux only supported shared libraries with the
4008   # GNU dynamic linker.  Since this was broken with cross compilers,
4009   # most powerpc-linux boxes support dynamic linking these days and
4010   # people can always --disable-shared, the test was removed, and we
4011   # assume the GNU/Linux dynamic linker is in use.
4012   dynamic_linker='GNU/Linux ld.so'
4013   ;;
4014
4015 netbsd*)
4016   version_type=sunos
4017   need_lib_prefix=no
4018   need_version=no
4019   if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4020     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4021     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
4022     dynamic_linker='NetBSD (a.out) ld.so'
4023   else
4024     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
4025     soname_spec='${libname}${release}${shared_ext}$major'
4026     dynamic_linker='NetBSD ld.elf_so'
4027   fi
4028   shlibpath_var=LD_LIBRARY_PATH
4029   shlibpath_overrides_runpath=yes
4030   hardcode_into_libs=yes
4031   ;;
4032
4033 newsos6)
4034   version_type=linux # correct to gnu/linux during the next big refactor
4035   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4036   shlibpath_var=LD_LIBRARY_PATH
4037   shlibpath_overrides_runpath=yes
4038   ;;
4039
4040 *nto* | *qnx*)
4041   version_type=qnx
4042   need_lib_prefix=no
4043   need_version=no
4044   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4045   soname_spec='${libname}${release}${shared_ext}$major'
4046   shlibpath_var=LD_LIBRARY_PATH
4047   shlibpath_overrides_runpath=no
4048   hardcode_into_libs=yes
4049   dynamic_linker='ldqnx.so'
4050   ;;
4051
4052 openbsd*)
4053   version_type=sunos
4054   sys_lib_dlsearch_path_spec="/usr/lib"
4055   need_lib_prefix=no
4056   # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
4057   case $host_os in
4058     openbsd3.3 | openbsd3.3.*)  need_version=yes ;;
4059     *)                          need_version=no  ;;
4060   esac
4061   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4062   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
4063   shlibpath_var=LD_LIBRARY_PATH
4064   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4065     case $host_os in
4066       openbsd2.[[89]] | openbsd2.[[89]].*)
4067         shlibpath_overrides_runpath=no
4068         ;;
4069       *)
4070         shlibpath_overrides_runpath=yes
4071         ;;
4072       esac
4073   else
4074     shlibpath_overrides_runpath=yes
4075   fi
4076   ;;
4077
4078 os2*)
4079   libname_spec='$name'
4080   shrext_cmds=".dll"
4081   need_lib_prefix=no
4082   library_names_spec='$libname${shared_ext} $libname.a'
4083   dynamic_linker='OS/2 ld.exe'
4084   shlibpath_var=LIBPATH
4085   ;;
4086
4087 osf3* | osf4* | osf5*)
4088   version_type=osf
4089   need_lib_prefix=no
4090   need_version=no
4091   soname_spec='${libname}${release}${shared_ext}$major'
4092   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4093   shlibpath_var=LD_LIBRARY_PATH
4094   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
4095   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
4096   ;;
4097
4098 rdos*)
4099   dynamic_linker=no
4100   ;;
4101
4102 solaris*)
4103   version_type=linux # correct to gnu/linux during the next big refactor
4104   need_lib_prefix=no
4105   need_version=no
4106   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4107   soname_spec='${libname}${release}${shared_ext}$major'
4108   shlibpath_var=LD_LIBRARY_PATH
4109   shlibpath_overrides_runpath=yes
4110   hardcode_into_libs=yes
4111   # ldd complains unless libraries are executable
4112   postinstall_cmds='chmod +x $lib'
4113   ;;
4114
4115 sunos4*)
4116   version_type=sunos
4117   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4118   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
4119   shlibpath_var=LD_LIBRARY_PATH
4120   shlibpath_overrides_runpath=yes
4121   if test "$with_gnu_ld" = yes; then
4122     need_lib_prefix=no
4123   fi
4124   need_version=yes
4125   ;;
4126
4127 sysv4 | sysv4.3*)
4128   version_type=linux # correct to gnu/linux during the next big refactor
4129   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4130   soname_spec='${libname}${release}${shared_ext}$major'
4131   shlibpath_var=LD_LIBRARY_PATH
4132   case $host_vendor in
4133     sni)
4134       shlibpath_overrides_runpath=no
4135       need_lib_prefix=no
4136       runpath_var=LD_RUN_PATH
4137       ;;
4138     siemens)
4139       need_lib_prefix=no
4140       ;;
4141     motorola)
4142       need_lib_prefix=no
4143       need_version=no
4144       shlibpath_overrides_runpath=no
4145       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
4146       ;;
4147   esac
4148   ;;
4149
4150 sysv4*MP*)
4151   if test -d /usr/nec ;then
4152     version_type=linux # correct to gnu/linux during the next big refactor
4153     library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
4154     soname_spec='$libname${shared_ext}.$major'
4155     shlibpath_var=LD_LIBRARY_PATH
4156   fi
4157   ;;
4158
4159 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4160   version_type=freebsd-elf
4161   need_lib_prefix=no
4162   need_version=no
4163   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
4164   soname_spec='${libname}${release}${shared_ext}$major'
4165   shlibpath_var=LD_LIBRARY_PATH
4166   shlibpath_overrides_runpath=yes
4167   hardcode_into_libs=yes
4168   if test "$with_gnu_ld" = yes; then
4169     sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
4170   else
4171     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
4172     case $host_os in
4173       sco3.2v5*)
4174         sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
4175         ;;
4176     esac
4177   fi
4178   sys_lib_dlsearch_path_spec='/usr/lib'
4179   ;;
4180
4181 tpf*)
4182   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
4183   version_type=linux # correct to gnu/linux during the next big refactor
4184   need_lib_prefix=no
4185   need_version=no
4186   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4187   shlibpath_var=LD_LIBRARY_PATH
4188   shlibpath_overrides_runpath=no
4189   hardcode_into_libs=yes
4190   ;;
4191
4192 uts4*)
4193   version_type=linux # correct to gnu/linux during the next big refactor
4194   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4195   soname_spec='${libname}${release}${shared_ext}$major'
4196   shlibpath_var=LD_LIBRARY_PATH
4197   ;;
4198
4199 *)
4200   dynamic_linker=no
4201   ;;
4202 esac
4203 AC_MSG_RESULT([$dynamic_linker])
4204 test "$dynamic_linker" = no && can_build_shared=no
4205
4206 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
4207 if test "$GCC" = yes; then
4208   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
4209 fi
4210
4211 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
4212   sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
4213 fi
4214 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
4215   sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
4216 fi
4217
4218 _LT_DECL([], [variables_saved_for_relink], [1],
4219     [Variables whose values should be saved in libtool wrapper scripts and
4220     restored at link time])
4221 _LT_DECL([], [need_lib_prefix], [0],
4222     [Do we need the "lib" prefix for modules?])
4223 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
4224 _LT_DECL([], [version_type], [0], [Library versioning type])
4225 _LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
4226 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
4227 _LT_DECL([], [shlibpath_overrides_runpath], [0],
4228     [Is shlibpath searched before the hard-coded library search path?])
4229 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
4230 _LT_DECL([], [library_names_spec], [1],
4231     [[List of archive names.  First name is the real one, the rest are links.
4232     The last name is the one that the linker finds with -lNAME]])
4233 _LT_DECL([], [soname_spec], [1],
4234     [[The coded name of the library, if different from the real name]])
4235 _LT_DECL([], [install_override_mode], [1],
4236     [Permission mode override for installation of shared libraries])
4237 _LT_DECL([], [postinstall_cmds], [2],
4238     [Command to use after installation of a shared archive])
4239 _LT_DECL([], [postuninstall_cmds], [2],
4240     [Command to use after uninstallation of a shared archive])
4241 _LT_DECL([], [finish_cmds], [2],
4242     [Commands used to finish a libtool library installation in a directory])
4243 _LT_DECL([], [finish_eval], [1],
4244     [[As "finish_cmds", except a single script fragment to be evaled but
4245     not shown]])
4246 _LT_DECL([], [hardcode_into_libs], [0],
4247     [Whether we should hardcode library paths into libraries])
4248 _LT_DECL([], [sys_lib_search_path_spec], [2],
4249     [Compile-time system search path for libraries])
4250 _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
4251     [Run-time system search path for libraries])
4252 ])# _LT_SYS_DYNAMIC_LINKER
4253
4254
4255 # _LT_PATH_TOOL_PREFIX(TOOL)
4256 # --------------------------
4257 # find a file program which can recognize shared library
4258 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
4259 [m4_require([_LT_DECL_EGREP])dnl
4260 AC_MSG_CHECKING([for $1])
4261 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
4262 [case $MAGIC_CMD in
4263 [[\\/*] |  ?:[\\/]*])
4264   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4265   ;;
4266 *)
4267   lt_save_MAGIC_CMD="$MAGIC_CMD"
4268   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4269 dnl $ac_dummy forces splitting on constant user-supplied paths.
4270 dnl POSIX.2 word splitting is done only on the output of word expansions,
4271 dnl not every word.  This closes a longstanding sh security hole.
4272   ac_dummy="m4_if([$2], , $PATH, [$2])"
4273   for ac_dir in $ac_dummy; do
4274     IFS="$lt_save_ifs"
4275     test -z "$ac_dir" && ac_dir=.
4276     if test -f $ac_dir/$1; then
4277       lt_cv_path_MAGIC_CMD="$ac_dir/$1"
4278       if test -n "$file_magic_test_file"; then
4279         case $deplibs_check_method in
4280         "file_magic "*)
4281           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
4282           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4283           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4284             $EGREP "$file_magic_regex" > /dev/null; then
4285             :
4286           else
4287             cat <<_LT_EOF 1>&2
4288
4289 *** Warning: the command libtool uses to detect shared libraries,
4290 *** $file_magic_cmd, produces output that libtool cannot recognize.
4291 *** The result is that libtool may fail to recognize shared libraries
4292 *** as such.  This will affect the creation of libtool libraries that
4293 *** depend on shared libraries, but programs linked with such libtool
4294 *** libraries will work regardless of this problem.  Nevertheless, you
4295 *** may want to report the problem to your system manager and/or to
4296 *** bug-libtool@gnu.org
4297
4298 _LT_EOF
4299           fi ;;
4300         esac
4301       fi
4302       break
4303     fi
4304   done
4305   IFS="$lt_save_ifs"
4306   MAGIC_CMD="$lt_save_MAGIC_CMD"
4307   ;;
4308 esac])
4309 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4310 if test -n "$MAGIC_CMD"; then
4311   AC_MSG_RESULT($MAGIC_CMD)
4312 else
4313   AC_MSG_RESULT(no)
4314 fi
4315 _LT_DECL([], [MAGIC_CMD], [0],
4316          [Used to examine libraries when file_magic_cmd begins with "file"])dnl
4317 ])# _LT_PATH_TOOL_PREFIX
4318
4319 # Old name:
4320 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
4321 dnl aclocal-1.4 backwards compatibility:
4322 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
4323
4324
4325 # _LT_PATH_MAGIC
4326 # --------------
4327 # find a file program which can recognize a shared library
4328 m4_defun([_LT_PATH_MAGIC],
4329 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
4330 if test -z "$lt_cv_path_MAGIC_CMD"; then
4331   if test -n "$ac_tool_prefix"; then
4332     _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
4333   else
4334     MAGIC_CMD=:
4335   fi
4336 fi
4337 ])# _LT_PATH_MAGIC
4338
4339
4340 # LT_PATH_LD
4341 # ----------
4342 # find the pathname to the GNU or non-GNU linker
4343 AC_DEFUN([LT_PATH_LD],
4344 [AC_REQUIRE([AC_PROG_CC])dnl
4345 AC_REQUIRE([AC_CANONICAL_HOST])dnl
4346 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
4347 m4_require([_LT_DECL_SED])dnl
4348 m4_require([_LT_DECL_EGREP])dnl
4349 m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
4350
4351 AC_ARG_WITH([gnu-ld],
4352     [AS_HELP_STRING([--with-gnu-ld],
4353         [assume the C compiler uses GNU ld @<:@default=no@:>@])],
4354     [test "$withval" = no || with_gnu_ld=yes],
4355     [with_gnu_ld=no])dnl
4356
4357 ac_prog=ld
4358 if test "$GCC" = yes; then
4359   # Check if gcc -print-prog-name=ld gives a path.
4360   AC_MSG_CHECKING([for ld used by $CC])
4361   case $host in
4362   *-*-mingw*)
4363     # gcc leaves a trailing carriage return which upsets mingw
4364     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4365   *)
4366     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4367   esac
4368   case $ac_prog in
4369     # Accept absolute paths.
4370     [[\\/]]* | ?:[[\\/]]*)
4371       re_direlt='/[[^/]][[^/]]*/\.\./'
4372       # Canonicalize the pathname of ld
4373       ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
4374       while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
4375         ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
4376       done
4377       test -z "$LD" && LD="$ac_prog"
4378       ;;
4379   "")
4380     # If it fails, then pretend we aren't using GCC.
4381     ac_prog=ld
4382     ;;
4383   *)
4384     # If it is relative, then search for the first ld in PATH.
4385     with_gnu_ld=unknown
4386     ;;
4387   esac
4388 elif test "$with_gnu_ld" = yes; then
4389   AC_MSG_CHECKING([for GNU ld])
4390 else
4391   AC_MSG_CHECKING([for non-GNU ld])
4392 fi
4393 AC_CACHE_VAL(lt_cv_path_LD,
4394 [if test -z "$LD"; then
4395   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4396   for ac_dir in $PATH; do
4397     IFS="$lt_save_ifs"
4398     test -z "$ac_dir" && ac_dir=.
4399     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4400       lt_cv_path_LD="$ac_dir/$ac_prog"
4401       # Check to see if the program is GNU ld.  I'd rather use --version,
4402       # but apparently some variants of GNU ld only accept -v.
4403       # Break only if it was the GNU/non-GNU ld that we prefer.
4404       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
4405       *GNU* | *'with BFD'*)
4406         test "$with_gnu_ld" != no && break
4407         ;;
4408       *)
4409         test "$with_gnu_ld" != yes && break
4410         ;;
4411       esac
4412     fi
4413   done
4414   IFS="$lt_save_ifs"
4415 else
4416   lt_cv_path_LD="$LD" # Let the user override the test with a path.
4417 fi])
4418 LD="$lt_cv_path_LD"
4419 if test -n "$LD"; then
4420   AC_MSG_RESULT($LD)
4421 else
4422   AC_MSG_RESULT(no)
4423 fi
4424 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
4425 _LT_PATH_LD_GNU
4426 AC_SUBST([LD])
4427
4428 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
4429 ])# LT_PATH_LD
4430
4431 # Old names:
4432 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
4433 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
4434 dnl aclocal-1.4 backwards compatibility:
4435 dnl AC_DEFUN([AM_PROG_LD], [])
4436 dnl AC_DEFUN([AC_PROG_LD], [])
4437
4438
4439 # _LT_PATH_LD_GNU
4440 #- --------------
4441 m4_defun([_LT_PATH_LD_GNU],
4442 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
4443 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
4444 case `$LD -v 2>&1 </dev/null` in
4445 *GNU* | *'with BFD'*)
4446   lt_cv_prog_gnu_ld=yes
4447   ;;
4448 *)
4449   lt_cv_prog_gnu_ld=no
4450   ;;
4451 esac])
4452 with_gnu_ld=$lt_cv_prog_gnu_ld
4453 ])# _LT_PATH_LD_GNU
4454
4455
4456 # _LT_CMD_RELOAD
4457 # --------------
4458 # find reload flag for linker
4459 #   -- PORTME Some linkers may need a different reload flag.
4460 m4_defun([_LT_CMD_RELOAD],
4461 [AC_CACHE_CHECK([for $LD option to reload object files],
4462   lt_cv_ld_reload_flag,
4463   [lt_cv_ld_reload_flag='-r'])
4464 reload_flag=$lt_cv_ld_reload_flag
4465 case $reload_flag in
4466 "" | " "*) ;;
4467 *) reload_flag=" $reload_flag" ;;
4468 esac
4469 reload_cmds='$LD$reload_flag -o $output$reload_objs'
4470 case $host_os in
4471   cygwin* | mingw* | pw32* | cegcc*)
4472     if test "$GCC" != yes; then
4473       reload_cmds=false
4474     fi
4475     ;;
4476   darwin*)
4477     if test "$GCC" = yes; then
4478       reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
4479     else
4480       reload_cmds='$LD$reload_flag -o $output$reload_objs'
4481     fi
4482     ;;
4483 esac
4484 _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
4485 _LT_TAGDECL([], [reload_cmds], [2])dnl
4486 ])# _LT_CMD_RELOAD
4487
4488
4489 # _LT_CHECK_MAGIC_METHOD
4490 # ----------------------
4491 # how to check for library dependencies
4492 #  -- PORTME fill in with the dynamic library characteristics
4493 m4_defun([_LT_CHECK_MAGIC_METHOD],
4494 [m4_require([_LT_DECL_EGREP])
4495 m4_require([_LT_DECL_OBJDUMP])
4496 AC_CACHE_CHECK([how to recognize dependent libraries],
4497 lt_cv_deplibs_check_method,
4498 [lt_cv_file_magic_cmd='$MAGIC_CMD'
4499 lt_cv_file_magic_test_file=
4500 lt_cv_deplibs_check_method='unknown'
4501 # Need to set the preceding variable on all platforms that support
4502 # interlibrary dependencies.
4503 # 'none' -- dependencies not supported.
4504 # `unknown' -- same as none, but documents that we really don't know.
4505 # 'pass_all' -- all dependencies passed with no checks.
4506 # 'test_compile' -- check by making test program.
4507 # 'file_magic [[regex]]' -- check by looking for files in library path
4508 # which responds to the $file_magic_cmd with a given extended regex.
4509 # If you have `file' or equivalent on your system and you're not sure
4510 # whether `pass_all' will *always* work, you probably want this one.
4511
4512 case $host_os in
4513 aix[[4-9]]*)
4514   lt_cv_deplibs_check_method=pass_all
4515   ;;
4516
4517 beos*)
4518   lt_cv_deplibs_check_method=pass_all
4519   ;;
4520
4521 bsdi[[45]]*)
4522   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
4523   lt_cv_file_magic_cmd='/usr/bin/file -L'
4524   lt_cv_file_magic_test_file=/shlib/libc.so
4525   ;;
4526
4527 cygwin*)
4528   # func_win32_libid is a shell function defined in ltmain.sh
4529   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4530   lt_cv_file_magic_cmd='func_win32_libid'
4531   ;;
4532
4533 mingw* | pw32*)
4534   # Base MSYS/MinGW do not provide the 'file' command needed by
4535   # func_win32_libid shell function, so use a weaker test based on 'objdump',
4536   # unless we find 'file', for example because we are cross-compiling.
4537   # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
4538   if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
4539     lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4540     lt_cv_file_magic_cmd='func_win32_libid'
4541   else
4542     # Keep this pattern in sync with the one in func_win32_libid.
4543     lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
4544     lt_cv_file_magic_cmd='$OBJDUMP -f'
4545   fi
4546   ;;
4547
4548 cegcc*)
4549   # use the weaker test based on 'objdump'. See mingw*.
4550   lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
4551   lt_cv_file_magic_cmd='$OBJDUMP -f'
4552   ;;
4553
4554 darwin* | rhapsody*)
4555   lt_cv_deplibs_check_method=pass_all
4556   ;;
4557
4558 freebsd* | dragonfly*)
4559   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4560     case $host_cpu in
4561     i*86 )
4562       # Not sure whether the presence of OpenBSD here was a mistake.
4563       # Let's accept both of them until this is cleared up.
4564       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
4565       lt_cv_file_magic_cmd=/usr/bin/file
4566       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4567       ;;
4568     esac
4569   else
4570     lt_cv_deplibs_check_method=pass_all
4571   fi
4572   ;;
4573
4574 gnu*)
4575   lt_cv_deplibs_check_method=pass_all
4576   ;;
4577
4578 haiku*)
4579   lt_cv_deplibs_check_method=pass_all
4580   ;;
4581
4582 hpux10.20* | hpux11*)
4583   lt_cv_file_magic_cmd=/usr/bin/file
4584   case $host_cpu in
4585   ia64*)
4586     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
4587     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
4588     ;;
4589   hppa*64*)
4590     [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]']
4591     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
4592     ;;
4593   *)
4594     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
4595     lt_cv_file_magic_test_file=/usr/lib/libc.sl
4596     ;;
4597   esac
4598   ;;
4599
4600 interix[[3-9]]*)
4601   # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
4602   lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
4603   ;;
4604
4605 irix5* | irix6* | nonstopux*)
4606   case $LD in
4607   *-32|*"-32 ") libmagic=32-bit;;
4608   *-n32|*"-n32 ") libmagic=N32;;
4609   *-64|*"-64 ") libmagic=64-bit;;
4610   *) libmagic=never-match;;
4611   esac
4612   lt_cv_deplibs_check_method=pass_all
4613   ;;
4614
4615 # This must be glibc/ELF.
4616 linux* | k*bsd*-gnu | kopensolaris*-gnu)
4617   lt_cv_deplibs_check_method=pass_all
4618   ;;
4619
4620 netbsd*)
4621   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4622     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4623   else
4624     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
4625   fi
4626   ;;
4627
4628 newos6*)
4629   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
4630   lt_cv_file_magic_cmd=/usr/bin/file
4631   lt_cv_file_magic_test_file=/usr/lib/libnls.so
4632   ;;
4633
4634 *nto* | *qnx*)
4635   lt_cv_deplibs_check_method=pass_all
4636   ;;
4637
4638 openbsd*)
4639   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4640     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
4641   else
4642     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4643   fi
4644   ;;
4645
4646 osf3* | osf4* | osf5*)
4647   lt_cv_deplibs_check_method=pass_all
4648   ;;
4649
4650 rdos*)
4651   lt_cv_deplibs_check_method=pass_all
4652   ;;
4653
4654 solaris*)
4655   lt_cv_deplibs_check_method=pass_all
4656   ;;
4657
4658 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4659   lt_cv_deplibs_check_method=pass_all
4660   ;;
4661
4662 sysv4 | sysv4.3*)
4663   case $host_vendor in
4664   motorola)
4665     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]]'
4666     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4667     ;;
4668   ncr)
4669     lt_cv_deplibs_check_method=pass_all
4670     ;;
4671   sequent)
4672     lt_cv_file_magic_cmd='/bin/file'
4673     lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
4674     ;;
4675   sni)
4676     lt_cv_file_magic_cmd='/bin/file'
4677     lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4678     lt_cv_file_magic_test_file=/lib/libc.so
4679     ;;
4680   siemens)
4681     lt_cv_deplibs_check_method=pass_all
4682     ;;
4683   pc)
4684     lt_cv_deplibs_check_method=pass_all
4685     ;;
4686   esac
4687   ;;
4688
4689 tpf*)
4690   lt_cv_deplibs_check_method=pass_all
4691   ;;
4692 esac
4693 ])
4694
4695 file_magic_glob=
4696 want_nocaseglob=no
4697 if test "$build" = "$host"; then
4698   case $host_os in
4699   mingw* | pw32*)
4700     if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
4701       want_nocaseglob=yes
4702     else
4703       file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
4704     fi
4705     ;;
4706   esac
4707 fi
4708
4709 file_magic_cmd=$lt_cv_file_magic_cmd
4710 deplibs_check_method=$lt_cv_deplibs_check_method
4711 test -z "$deplibs_check_method" && deplibs_check_method=unknown
4712
4713 _LT_DECL([], [deplibs_check_method], [1],
4714     [Method to check whether dependent libraries are shared objects])
4715 _LT_DECL([], [file_magic_cmd], [1],
4716     [Command to use when deplibs_check_method = "file_magic"])
4717 _LT_DECL([], [file_magic_glob], [1],
4718     [How to find potential files when deplibs_check_method = "file_magic"])
4719 _LT_DECL([], [want_nocaseglob], [1],
4720     [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
4721 ])# _LT_CHECK_MAGIC_METHOD
4722
4723
4724 # LT_PATH_NM
4725 # ----------
4726 # find the pathname to a BSD- or MS-compatible name lister
4727 AC_DEFUN([LT_PATH_NM],
4728 [AC_REQUIRE([AC_PROG_CC])dnl
4729 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
4730 [if test -n "$NM"; then
4731   # Let the user override the test.
4732   lt_cv_path_NM="$NM"
4733 else
4734   lt_nm_to_check="${ac_tool_prefix}nm"
4735   if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
4736     lt_nm_to_check="$lt_nm_to_check nm"
4737   fi
4738   for lt_tmp_nm in $lt_nm_to_check; do
4739     lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4740     for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
4741       IFS="$lt_save_ifs"
4742       test -z "$ac_dir" && ac_dir=.
4743       tmp_nm="$ac_dir/$lt_tmp_nm"
4744       if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
4745         # Check to see if the nm accepts a BSD-compat flag.
4746         # Adding the `sed 1q' prevents false positives on HP-UX, which says:
4747         #   nm: unknown option "B" ignored
4748         # Tru64's nm complains that /dev/null is an invalid object file
4749         case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
4750         */dev/null* | *'Invalid file or object type'*)
4751           lt_cv_path_NM="$tmp_nm -B"
4752           break
4753           ;;
4754         *)
4755           case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
4756           */dev/null*)
4757             lt_cv_path_NM="$tmp_nm -p"
4758             break
4759             ;;
4760           *)
4761             lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4762             continue # so that we can try to find one that supports BSD flags
4763             ;;
4764           esac
4765           ;;
4766         esac
4767       fi
4768     done
4769     IFS="$lt_save_ifs"
4770   done
4771   : ${lt_cv_path_NM=no}
4772 fi])
4773 if test "$lt_cv_path_NM" != "no"; then
4774   NM="$lt_cv_path_NM"
4775 else
4776   # Didn't find any BSD compatible name lister, look for dumpbin.
4777   if test -n "$DUMPBIN"; then :
4778     # Let the user override the test.
4779   else
4780     AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
4781     case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
4782     *COFF*)
4783       DUMPBIN="$DUMPBIN -symbols"
4784       ;;
4785     *)
4786       DUMPBIN=:
4787       ;;
4788     esac
4789   fi
4790   AC_SUBST([DUMPBIN])
4791   if test "$DUMPBIN" != ":"; then
4792     NM="$DUMPBIN"
4793   fi
4794 fi
4795 test -z "$NM" && NM=nm
4796 AC_SUBST([NM])
4797 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
4798
4799 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
4800   [lt_cv_nm_interface="BSD nm"
4801   echo "int some_variable = 0;" > conftest.$ac_ext
4802   (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
4803   (eval "$ac_compile" 2>conftest.err)
4804   cat conftest.err >&AS_MESSAGE_LOG_FD
4805   (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
4806   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
4807   cat conftest.err >&AS_MESSAGE_LOG_FD
4808   (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
4809   cat conftest.out >&AS_MESSAGE_LOG_FD
4810   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
4811     lt_cv_nm_interface="MS dumpbin"
4812   fi
4813   rm -f conftest*])
4814 ])# LT_PATH_NM
4815
4816 # Old names:
4817 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
4818 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
4819 dnl aclocal-1.4 backwards compatibility:
4820 dnl AC_DEFUN([AM_PROG_NM], [])
4821 dnl AC_DEFUN([AC_PROG_NM], [])
4822
4823 # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
4824 # --------------------------------
4825 # how to determine the name of the shared library
4826 # associated with a specific link library.
4827 #  -- PORTME fill in with the dynamic library characteristics
4828 m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
4829 [m4_require([_LT_DECL_EGREP])
4830 m4_require([_LT_DECL_OBJDUMP])
4831 m4_require([_LT_DECL_DLLTOOL])
4832 AC_CACHE_CHECK([how to associate runtime and link libraries],
4833 lt_cv_sharedlib_from_linklib_cmd,
4834 [lt_cv_sharedlib_from_linklib_cmd='unknown'
4835
4836 case $host_os in
4837 cygwin* | mingw* | pw32* | cegcc*)
4838   # two different shell functions defined in ltmain.sh
4839   # decide which to use based on capabilities of $DLLTOOL
4840   case `$DLLTOOL --help 2>&1` in
4841   *--identify-strict*)
4842     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
4843     ;;
4844   *)
4845     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
4846     ;;
4847   esac
4848   ;;
4849 *)
4850   # fallback: assume linklib IS sharedlib
4851   lt_cv_sharedlib_from_linklib_cmd="$ECHO"
4852   ;;
4853 esac
4854 ])
4855 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
4856 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
4857
4858 _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
4859     [Command to associate shared and link libraries])
4860 ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
4861
4862
4863 # _LT_PATH_MANIFEST_TOOL
4864 # ----------------------
4865 # locate the manifest tool
4866 m4_defun([_LT_PATH_MANIFEST_TOOL],
4867 [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
4868 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
4869 AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
4870   [lt_cv_path_mainfest_tool=no
4871   echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
4872   $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
4873   cat conftest.err >&AS_MESSAGE_LOG_FD
4874   if $GREP 'Manifest Tool' conftest.out > /dev/null; then
4875     lt_cv_path_mainfest_tool=yes
4876   fi
4877   rm -f conftest*])
4878 if test "x$lt_cv_path_mainfest_tool" != xyes; then
4879   MANIFEST_TOOL=:
4880 fi
4881 _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
4882 ])# _LT_PATH_MANIFEST_TOOL
4883
4884
4885 # LT_LIB_M
4886 # --------
4887 # check for math library
4888 AC_DEFUN([LT_LIB_M],
4889 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4890 LIBM=
4891 case $host in
4892 *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
4893   # These system don't have libm, or don't need it
4894   ;;
4895 *-ncr-sysv4.3*)
4896   AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4897   AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
4898   ;;
4899 *)
4900   AC_CHECK_LIB(m, cos, LIBM="-lm")
4901   ;;
4902 esac
4903 AC_SUBST([LIBM])
4904 ])# LT_LIB_M
4905
4906 # Old name:
4907 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
4908 dnl aclocal-1.4 backwards compatibility:
4909 dnl AC_DEFUN([AC_CHECK_LIBM], [])
4910
4911
4912 # _LT_COMPILER_NO_RTTI([TAGNAME])
4913 # -------------------------------
4914 m4_defun([_LT_COMPILER_NO_RTTI],
4915 [m4_require([_LT_TAG_COMPILER])dnl
4916
4917 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4918
4919 if test "$GCC" = yes; then
4920   case $cc_basename in
4921   nvcc*)
4922     _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
4923   *)
4924     _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
4925   esac
4926
4927   _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4928     lt_cv_prog_compiler_rtti_exceptions,
4929     [-fno-rtti -fno-exceptions], [],
4930     [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4931 fi
4932 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
4933         [Compiler flag to turn off builtin functions])
4934 ])# _LT_COMPILER_NO_RTTI
4935
4936
4937 # _LT_CMD_GLOBAL_SYMBOLS
4938 # ----------------------
4939 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
4940 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4941 AC_REQUIRE([AC_PROG_CC])dnl
4942 AC_REQUIRE([AC_PROG_AWK])dnl
4943 AC_REQUIRE([LT_PATH_NM])dnl
4944 AC_REQUIRE([LT_PATH_LD])dnl
4945 m4_require([_LT_DECL_SED])dnl
4946 m4_require([_LT_DECL_EGREP])dnl
4947 m4_require([_LT_TAG_COMPILER])dnl
4948
4949 # Check for command to grab the raw symbol name followed by C symbol from nm.
4950 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4951 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4952 [
4953 # These are sane defaults that work on at least a few old systems.
4954 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4955
4956 # Character class describing NM global symbol codes.
4957 symcode='[[BCDEGRST]]'
4958
4959 # Regexp to match symbols that can be accessed directly from C.
4960 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4961
4962 # Define system-specific variables.
4963 case $host_os in
4964 aix*)
4965   symcode='[[BCDT]]'
4966   ;;
4967 cygwin* | mingw* | pw32* | cegcc*)
4968   symcode='[[ABCDGISTW]]'
4969   ;;
4970 hpux*)
4971   if test "$host_cpu" = ia64; then
4972     symcode='[[ABCDEGRST]]'
4973   fi
4974   ;;
4975 irix* | nonstopux*)
4976   symcode='[[BCDEGRST]]'
4977   ;;
4978 osf*)
4979   symcode='[[BCDEGQRST]]'
4980   ;;
4981 solaris*)
4982   symcode='[[BDRT]]'
4983   ;;
4984 sco3.2v5*)
4985   symcode='[[DT]]'
4986   ;;
4987 sysv4.2uw2*)
4988   symcode='[[DT]]'
4989   ;;
4990 sysv5* | sco5v6* | unixware* | OpenUNIX*)
4991   symcode='[[ABDT]]'
4992   ;;
4993 sysv4)
4994   symcode='[[DFNSTU]]'
4995   ;;
4996 esac
4997
4998 # If we're using GNU nm, then use its standard symbol codes.
4999 case `$NM -V 2>&1` in
5000 *GNU* | *'with BFD'*)
5001   symcode='[[ABCDGIRSTW]]' ;;
5002 esac
5003
5004 # Transform an extracted symbol line into a proper C declaration.
5005 # Some systems (esp. on ia64) link data and code symbols differently,
5006 # so use this general approach.
5007 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5008
5009 # Transform an extracted symbol line into symbol name and symbol address
5010 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
5011 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'"
5012
5013 # Handle CRLF in mingw tool chain
5014 opt_cr=
5015 case $build_os in
5016 mingw*)
5017   opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
5018   ;;
5019 esac
5020
5021 # Try without a prefix underscore, then with it.
5022 for ac_symprfx in "" "_"; do
5023
5024   # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
5025   symxfrm="\\1 $ac_symprfx\\2 \\2"
5026
5027   # Write the raw and C identifiers.
5028   if test "$lt_cv_nm_interface" = "MS dumpbin"; then
5029     # Fake it for dumpbin and say T for any non-static function
5030     # and D for any global variable.
5031     # Also find C++ and __fastcall symbols from MSVC++,
5032     # which start with @ or ?.
5033     lt_cv_sys_global_symbol_pipe="$AWK ['"\
5034 "     {last_section=section; section=\$ 3};"\
5035 "     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
5036 "     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
5037 "     \$ 0!~/External *\|/{next};"\
5038 "     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
5039 "     {if(hide[section]) next};"\
5040 "     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
5041 "     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
5042 "     s[1]~/^[@?]/{print s[1], s[1]; next};"\
5043 "     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
5044 "     ' prfx=^$ac_symprfx]"
5045   else
5046     lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[     ]]\($symcode$symcode*\)[[       ]][[    ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
5047   fi
5048   lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
5049
5050   # Check to see that the pipe works correctly.
5051   pipe_works=no
5052
5053   rm -f conftest*
5054   cat > conftest.$ac_ext <<_LT_EOF
5055 #ifdef __cplusplus
5056 extern "C" {
5057 #endif
5058 char nm_test_var;
5059 void nm_test_func(void);
5060 void nm_test_func(void){}
5061 #ifdef __cplusplus
5062 }
5063 #endif
5064 int main(){nm_test_var='a';nm_test_func();return(0);}
5065 _LT_EOF
5066
5067   if AC_TRY_EVAL(ac_compile); then
5068     # Now try to grab the symbols.
5069     nlist=conftest.nm
5070     if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
5071       # Try sorting and uniquifying the output.
5072       if sort "$nlist" | uniq > "$nlist"T; then
5073         mv -f "$nlist"T "$nlist"
5074       else
5075         rm -f "$nlist"T
5076       fi
5077
5078       # Make sure that we snagged all the symbols we need.
5079       if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
5080         if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
5081           cat <<_LT_EOF > conftest.$ac_ext
5082 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
5083 #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
5084 /* DATA imports from DLLs on WIN32 con't be const, because runtime
5085    relocations are performed -- see ld's documentation on pseudo-relocs.  */
5086 # define LT@&t@_DLSYM_CONST
5087 #elif defined(__osf__)
5088 /* This system does not cope well with relocations in const data.  */
5089 # define LT@&t@_DLSYM_CONST
5090 #else
5091 # define LT@&t@_DLSYM_CONST const
5092 #endif
5093
5094 #ifdef __cplusplus
5095 extern "C" {
5096 #endif
5097
5098 _LT_EOF
5099           # Now generate the symbol file.
5100           eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
5101
5102           cat <<_LT_EOF >> conftest.$ac_ext
5103
5104 /* The mapping between symbol names and symbols.  */
5105 LT@&t@_DLSYM_CONST struct {
5106   const char *name;
5107   void       *address;
5108 }
5109 lt__PROGRAM__LTX_preloaded_symbols[[]] =
5110 {
5111   { "@PROGRAM@", (void *) 0 },
5112 _LT_EOF
5113           $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
5114           cat <<\_LT_EOF >> conftest.$ac_ext
5115   {0, (void *) 0}
5116 };
5117
5118 /* This works around a problem in FreeBSD linker */
5119 #ifdef FREEBSD_WORKAROUND
5120 static const void *lt_preloaded_setup() {
5121   return lt__PROGRAM__LTX_preloaded_symbols;
5122 }
5123 #endif
5124
5125 #ifdef __cplusplus
5126 }
5127 #endif
5128 _LT_EOF
5129           # Now try linking the two files.
5130           mv conftest.$ac_objext conftstm.$ac_objext
5131           lt_globsym_save_LIBS=$LIBS
5132           lt_globsym_save_CFLAGS=$CFLAGS
5133           LIBS="conftstm.$ac_objext"
5134           CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
5135           if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
5136             pipe_works=yes
5137           fi
5138           LIBS=$lt_globsym_save_LIBS
5139           CFLAGS=$lt_globsym_save_CFLAGS
5140         else
5141           echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
5142         fi
5143       else
5144         echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
5145       fi
5146     else
5147       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
5148     fi
5149   else
5150     echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
5151     cat conftest.$ac_ext >&5
5152   fi
5153   rm -rf conftest* conftst*
5154
5155   # Do not use the global_symbol_pipe unless it works.
5156   if test "$pipe_works" = yes; then
5157     break
5158   else
5159     lt_cv_sys_global_symbol_pipe=
5160   fi
5161 done
5162 ])
5163 if test -z "$lt_cv_sys_global_symbol_pipe"; then
5164   lt_cv_sys_global_symbol_to_cdecl=
5165 fi
5166 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
5167   AC_MSG_RESULT(failed)
5168 else
5169   AC_MSG_RESULT(ok)
5170 fi
5171
5172 # Response file support.
5173 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
5174   nm_file_list_spec='@'
5175 elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
5176   nm_file_list_spec='@'
5177 fi
5178
5179 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
5180     [Take the output of nm and produce a listing of raw symbols and C names])
5181 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
5182     [Transform the output of nm in a proper C declaration])
5183 _LT_DECL([global_symbol_to_c_name_address],
5184     [lt_cv_sys_global_symbol_to_c_name_address], [1],
5185     [Transform the output of nm in a C name address pair])
5186 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
5187     [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
5188     [Transform the output of nm in a C name address pair when lib prefix is needed])
5189 _LT_DECL([], [nm_file_list_spec], [1],
5190     [Specify filename containing input files for $NM])
5191 ]) # _LT_CMD_GLOBAL_SYMBOLS
5192
5193
5194 # _LT_COMPILER_PIC([TAGNAME])
5195 # ---------------------------
5196 m4_defun([_LT_COMPILER_PIC],
5197 [m4_require([_LT_TAG_COMPILER])dnl
5198 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
5199 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5200 _LT_TAGVAR(lt_prog_compiler_static, $1)=
5201
5202 m4_if([$1], [CXX], [
5203   # C++ specific cases for pic, static, wl, etc.
5204   if test "$GXX" = yes; then
5205     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5206     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5207
5208     case $host_os in
5209     aix*)
5210       # All AIX code is PIC.
5211       if test "$host_cpu" = ia64; then
5212         # AIX 5 now supports IA64 processor
5213         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5214       fi
5215       ;;
5216
5217     amigaos*)
5218       case $host_cpu in
5219       powerpc)
5220             # see comment about AmigaOS4 .so support
5221             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5222         ;;
5223       m68k)
5224             # FIXME: we need at least 68020 code to build shared libraries, but
5225             # adding the `-m68020' flag to GCC prevents building anything better,
5226             # like `-m68040'.
5227             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5228         ;;
5229       esac
5230       ;;
5231
5232     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5233       # PIC is the default for these OSes.
5234       ;;
5235     mingw* | cygwin* | os2* | pw32* | cegcc*)
5236       # This hack is so that the source file can tell whether it is being
5237       # built for inclusion in a dll (and should export symbols for example).
5238       # Although the cygwin gcc ignores -fPIC, still need this for old-style
5239       # (--disable-auto-import) libraries
5240       m4_if([$1], [GCJ], [],
5241         [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5242       ;;
5243     darwin* | rhapsody*)
5244       # PIC is the default on this platform
5245       # Common symbols not allowed in MH_DYLIB files
5246       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5247       ;;
5248     *djgpp*)
5249       # DJGPP does not support shared libraries at all
5250       _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5251       ;;
5252     haiku*)
5253       # PIC is the default for Haiku.
5254       # The "-static" flag exists, but is broken.
5255       _LT_TAGVAR(lt_prog_compiler_static, $1)=
5256       ;;
5257     interix[[3-9]]*)
5258       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5259       # Instead, we relocate shared libraries at runtime.
5260       ;;
5261     sysv4*MP*)
5262       if test -d /usr/nec; then
5263         _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5264       fi
5265       ;;
5266     hpux*)
5267       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
5268       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
5269       # sets the default TLS model and affects inlining.
5270       case $host_cpu in
5271       hppa*64*)
5272         ;;
5273       *)
5274         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5275         ;;
5276       esac
5277       ;;
5278     *qnx* | *nto*)
5279       # QNX uses GNU C++, but need to define -shared option too, otherwise
5280       # it will coredump.
5281       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5282       ;;
5283     *)
5284       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5285       ;;
5286     esac
5287   else
5288     case $host_os in
5289       aix[[4-9]]*)
5290         # All AIX code is PIC.
5291         if test "$host_cpu" = ia64; then
5292           # AIX 5 now supports IA64 processor
5293           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5294         else
5295           _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5296         fi
5297         ;;
5298       chorus*)
5299         case $cc_basename in
5300         cxch68*)
5301           # Green Hills C++ Compiler
5302           # _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"
5303           ;;
5304         esac
5305         ;;
5306       mingw* | cygwin* | os2* | pw32* | cegcc*)
5307         # This hack is so that the source file can tell whether it is being
5308         # built for inclusion in a dll (and should export symbols for example).
5309         m4_if([$1], [GCJ], [],
5310           [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5311         ;;
5312       dgux*)
5313         case $cc_basename in
5314           ec++*)
5315             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5316             ;;
5317           ghcx*)
5318             # Green Hills C++ Compiler
5319             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5320             ;;
5321           *)
5322             ;;
5323         esac
5324         ;;
5325       freebsd* | dragonfly*)
5326         # FreeBSD uses GNU C++
5327         ;;
5328       hpux9* | hpux10* | hpux11*)
5329         case $cc_basename in
5330           CC*)
5331             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5332             _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5333             if test "$host_cpu" != ia64; then
5334               _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5335             fi
5336             ;;
5337           aCC*)
5338             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5339             _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5340             case $host_cpu in
5341             hppa*64*|ia64*)
5342               # +Z the default
5343               ;;
5344             *)
5345               _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5346               ;;
5347             esac
5348             ;;
5349           *)
5350             ;;
5351         esac
5352         ;;
5353       interix*)
5354         # This is c89, which is MS Visual C++ (no shared libs)
5355         # Anyone wants to do a port?
5356         ;;
5357       irix5* | irix6* | nonstopux*)
5358         case $cc_basename in
5359           CC*)
5360             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5361             _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5362             # CC pic flag -KPIC is the default.
5363             ;;
5364           *)
5365             ;;
5366         esac
5367         ;;
5368       linux* | k*bsd*-gnu | kopensolaris*-gnu)
5369         case $cc_basename in
5370           KCC*)
5371             # KAI C++ Compiler
5372             _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5373             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5374             ;;
5375           ecpc* )
5376             # old Intel C++ for x86_64 which still supported -KPIC.
5377             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5378             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5379             _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5380             ;;
5381           icpc* )
5382             # Intel C++, used to be incompatible with GCC.
5383             # ICC 10 doesn't accept -KPIC any more.
5384             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5385             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5386             _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5387             ;;
5388           pgCC* | pgcpp*)
5389             # Portland Group C++ compiler
5390             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5391             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5392             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5393             ;;
5394           cxx*)
5395             # Compaq C++
5396             # Make sure the PIC flag is empty.  It appears that all Alpha
5397             # Linux and Compaq Tru64 Unix objects are PIC.
5398             _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5399             _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5400             ;;
5401           xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
5402             # IBM XL 8.0, 9.0 on PPC and BlueGene
5403             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5404             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5405             _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5406             ;;
5407           *)
5408             case `$CC -V 2>&1 | sed 5q` in
5409             *Sun\ C*)
5410               # Sun C++ 5.9
5411               _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5412               _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5413               _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5414               ;;
5415             esac
5416             ;;
5417         esac
5418         ;;
5419       lynxos*)
5420         ;;
5421       m88k*)
5422         ;;
5423       mvs*)
5424         case $cc_basename in
5425           cxx*)
5426             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5427             ;;
5428           *)
5429             ;;
5430         esac
5431         ;;
5432       netbsd*)
5433         ;;
5434       *qnx* | *nto*)
5435         # QNX uses GNU C++, but need to define -shared option too, otherwise
5436         # it will coredump.
5437         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5438         ;;
5439       osf3* | osf4* | osf5*)
5440         case $cc_basename in
5441           KCC*)
5442             _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5443             ;;
5444           RCC*)
5445             # Rational C++ 2.4.1
5446             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5447             ;;
5448           cxx*)
5449             # Digital/Compaq C++
5450             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5451             # Make sure the PIC flag is empty.  It appears that all Alpha
5452             # Linux and Compaq Tru64 Unix objects are PIC.
5453             _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5454             _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5455             ;;
5456           *)
5457             ;;
5458         esac
5459         ;;
5460       psos*)
5461         ;;
5462       solaris*)
5463         case $cc_basename in
5464           CC* | sunCC*)
5465             # Sun C++ 4.2, 5.x and Centerline C++
5466             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5467             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5468             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5469             ;;
5470           gcx*)
5471             # Green Hills C++ Compiler
5472             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5473             ;;
5474           *)
5475             ;;
5476         esac
5477         ;;
5478       sunos4*)
5479         case $cc_basename in
5480           CC*)
5481             # Sun C++ 4.x
5482             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5483             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5484             ;;
5485           lcc*)
5486             # Lucid
5487             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5488             ;;
5489           *)
5490             ;;
5491         esac
5492         ;;
5493       sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5494         case $cc_basename in
5495           CC*)
5496             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5497             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5498             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5499             ;;
5500         esac
5501         ;;
5502       tandem*)
5503         case $cc_basename in
5504           NCC*)
5505             # NonStop-UX NCC 3.20
5506             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5507             ;;
5508           *)
5509             ;;
5510         esac
5511         ;;
5512       vxworks*)
5513         ;;
5514       *)
5515         _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5516         ;;
5517     esac
5518   fi
5519 ],
5520 [
5521   if test "$GCC" = yes; then
5522     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5523     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5524
5525     case $host_os in
5526       aix*)
5527       # All AIX code is PIC.
5528       if test "$host_cpu" = ia64; then
5529         # AIX 5 now supports IA64 processor
5530         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5531       fi
5532       ;;
5533
5534     amigaos*)
5535       case $host_cpu in
5536       powerpc)
5537             # see comment about AmigaOS4 .so support
5538             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5539         ;;
5540       m68k)
5541             # FIXME: we need at least 68020 code to build shared libraries, but
5542             # adding the `-m68020' flag to GCC prevents building anything better,
5543             # like `-m68040'.
5544             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5545         ;;
5546       esac
5547       ;;
5548
5549     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5550       # PIC is the default for these OSes.
5551       ;;
5552
5553     mingw* | cygwin* | pw32* | os2* | cegcc*)
5554       # This hack is so that the source file can tell whether it is being
5555       # built for inclusion in a dll (and should export symbols for example).
5556       # Although the cygwin gcc ignores -fPIC, still need this for old-style
5557       # (--disable-auto-import) libraries
5558       m4_if([$1], [GCJ], [],
5559         [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5560       ;;
5561
5562     darwin* | rhapsody*)
5563       # PIC is the default on this platform
5564       # Common symbols not allowed in MH_DYLIB files
5565       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5566       ;;
5567
5568     haiku*)
5569       # PIC is the default for Haiku.
5570       # The "-static" flag exists, but is broken.
5571       _LT_TAGVAR(lt_prog_compiler_static, $1)=
5572       ;;
5573
5574     hpux*)
5575       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
5576       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
5577       # sets the default TLS model and affects inlining.
5578       case $host_cpu in
5579       hppa*64*)
5580         # +Z the default
5581         ;;
5582       *)
5583         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5584         ;;
5585       esac
5586       ;;
5587
5588     interix[[3-9]]*)
5589       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5590       # Instead, we relocate shared libraries at runtime.
5591       ;;
5592
5593     msdosdjgpp*)
5594       # Just because we use GCC doesn't mean we suddenly get shared libraries
5595       # on systems that don't support them.
5596       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5597       enable_shared=no
5598       ;;
5599
5600     *nto* | *qnx*)
5601       # QNX uses GNU C++, but need to define -shared option too, otherwise
5602       # it will coredump.
5603       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5604       ;;
5605
5606     sysv4*MP*)
5607       if test -d /usr/nec; then
5608         _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5609       fi
5610       ;;
5611
5612     *)
5613       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5614       ;;
5615     esac
5616
5617     case $cc_basename in
5618     nvcc*) # Cuda Compiler Driver 2.2
5619       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
5620       if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
5621         _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
5622       fi
5623       ;;
5624     esac
5625   else
5626     # PORTME Check for flag to pass linker flags through the system compiler.
5627     case $host_os in
5628     aix*)
5629       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5630       if test "$host_cpu" = ia64; then
5631         # AIX 5 now supports IA64 processor
5632         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5633       else
5634         _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5635       fi
5636       ;;
5637
5638     mingw* | cygwin* | pw32* | os2* | cegcc*)
5639       # This hack is so that the source file can tell whether it is being
5640       # built for inclusion in a dll (and should export symbols for example).
5641       m4_if([$1], [GCJ], [],
5642         [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5643       ;;
5644
5645     hpux9* | hpux10* | hpux11*)
5646       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5647       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5648       # not for PA HP-UX.
5649       case $host_cpu in
5650       hppa*64*|ia64*)
5651         # +Z the default
5652         ;;
5653       *)
5654         _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5655         ;;
5656       esac
5657       # Is there a better lt_prog_compiler_static that works with the bundled CC?
5658       _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5659       ;;
5660
5661     irix5* | irix6* | nonstopux*)
5662       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5663       # PIC (with -KPIC) is the default.
5664       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5665       ;;
5666
5667     linux* | k*bsd*-gnu | kopensolaris*-gnu)
5668       case $cc_basename in
5669       # old Intel for x86_64 which still supported -KPIC.
5670       ecc*)
5671         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5672         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5673         _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5674         ;;
5675       # icc used to be incompatible with GCC.
5676       # ICC 10 doesn't accept -KPIC any more.
5677       icc* | ifort*)
5678         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5679         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5680         _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5681         ;;
5682       # Lahey Fortran 8.1.
5683       lf95*)
5684         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5685         _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
5686         _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
5687         ;;
5688       nagfor*)
5689         # NAG Fortran compiler
5690         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
5691         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5692         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5693         ;;
5694       pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
5695         # Portland Group compilers (*not* the Pentium gcc compiler,
5696         # which looks to be a dead project)
5697         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5698         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5699         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5700         ;;
5701       ccc*)
5702         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5703         # All Alpha code is PIC.
5704         _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5705         ;;
5706       xl* | bgxl* | bgf* | mpixl*)
5707         # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
5708         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5709         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5710         _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5711         ;;
5712       *)
5713         case `$CC -V 2>&1 | sed 5q` in
5714         *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
5715           # Sun Fortran 8.3 passes all unrecognized flags to the linker
5716           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5717           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5718           _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
5719           ;;
5720         *Sun\ F* | *Sun*Fortran*)
5721           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5722           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5723           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5724           ;;
5725         *Sun\ C*)
5726           # Sun C 5.9
5727           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5728           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5729           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5730           ;;
5731         *Intel*\ [[CF]]*Compiler*)
5732           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5733           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5734           _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5735           ;;
5736         *Portland\ Group*)
5737           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5738           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5739           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5740           ;;
5741         esac
5742         ;;
5743       esac
5744       ;;
5745
5746     newsos6)
5747       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5748       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5749       ;;
5750
5751     *nto* | *qnx*)
5752       # QNX uses GNU C++, but need to define -shared option too, otherwise
5753       # it will coredump.
5754       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5755       ;;
5756
5757     osf3* | osf4* | osf5*)
5758       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5759       # All OSF/1 code is PIC.
5760       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5761       ;;
5762
5763     rdos*)
5764       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5765       ;;
5766
5767     solaris*)
5768       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5769       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5770       case $cc_basename in
5771       f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
5772         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5773       *)
5774         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5775       esac
5776       ;;
5777
5778     sunos4*)
5779       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5780       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5781       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5782       ;;
5783
5784     sysv4 | sysv4.2uw2* | sysv4.3*)
5785       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5786       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5787       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5788       ;;
5789
5790     sysv4*MP*)
5791       if test -d /usr/nec ;then
5792         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5793         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5794       fi
5795       ;;
5796
5797     sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5798       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5799       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5800       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5801       ;;
5802
5803     unicos*)
5804       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5805       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5806       ;;
5807
5808     uts4*)
5809       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5810       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5811       ;;
5812
5813     *)
5814       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5815       ;;
5816     esac
5817   fi
5818 ])
5819 case $host_os in
5820   # For platforms which do not support PIC, -DPIC is meaningless:
5821   *djgpp*)
5822     _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5823     ;;
5824   *)
5825     _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
5826     ;;
5827 esac
5828
5829 AC_CACHE_CHECK([for $compiler option to produce PIC],
5830   [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
5831   [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
5832 _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
5833
5834 #
5835 # Check to make sure the PIC flag actually works.
5836 #
5837 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
5838   _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
5839     [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
5840     [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
5841     [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
5842      "" | " "*) ;;
5843      *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5844      esac],
5845     [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
5846      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5847 fi
5848 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
5849         [Additional compiler flags for building library objects])
5850
5851 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
5852         [How to pass a linker flag through the compiler])
5853 #
5854 # Check to make sure the static flag actually works.
5855 #
5856 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
5857 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
5858   _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
5859   $lt_tmp_static_flag,
5860   [],
5861   [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
5862 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
5863         [Compiler flag to prevent dynamic linking])
5864 ])# _LT_COMPILER_PIC
5865
5866
5867 # _LT_LINKER_SHLIBS([TAGNAME])
5868 # ----------------------------
5869 # See if the linker supports building shared libraries.
5870 m4_defun([_LT_LINKER_SHLIBS],
5871 [AC_REQUIRE([LT_PATH_LD])dnl
5872 AC_REQUIRE([LT_PATH_NM])dnl
5873 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
5874 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5875 m4_require([_LT_DECL_EGREP])dnl
5876 m4_require([_LT_DECL_SED])dnl
5877 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
5878 m4_require([_LT_TAG_COMPILER])dnl
5879 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5880 m4_if([$1], [CXX], [
5881   _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5882   _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5883   case $host_os in
5884   aix[[4-9]]*)
5885     # If we're using GNU nm, then we don't want the "-C" option.
5886     # -C means demangle to AIX nm, but means don't demangle with GNU nm
5887     # Also, AIX nm treats weak defined symbols like other global defined
5888     # symbols, whereas GNU nm marks them as "W".
5889     if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5890       _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'
5891     else
5892       _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'
5893     fi
5894     ;;
5895   pw32*)
5896     _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5897     ;;
5898   cygwin* | mingw* | cegcc*)
5899     case $cc_basename in
5900     cl*)
5901       _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
5902       ;;
5903     *)
5904       _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'
5905       _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5906       ;;
5907     esac
5908     ;;
5909   *)
5910     _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5911     ;;
5912   esac
5913 ], [
5914   runpath_var=
5915   _LT_TAGVAR(allow_undefined_flag, $1)=
5916   _LT_TAGVAR(always_export_symbols, $1)=no
5917   _LT_TAGVAR(archive_cmds, $1)=
5918   _LT_TAGVAR(archive_expsym_cmds, $1)=
5919   _LT_TAGVAR(compiler_needs_object, $1)=no
5920   _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5921   _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5922   _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5923   _LT_TAGVAR(hardcode_automatic, $1)=no
5924   _LT_TAGVAR(hardcode_direct, $1)=no
5925   _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5926   _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5927   _LT_TAGVAR(hardcode_libdir_separator, $1)=
5928   _LT_TAGVAR(hardcode_minus_L, $1)=no
5929   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5930   _LT_TAGVAR(inherit_rpath, $1)=no
5931   _LT_TAGVAR(link_all_deplibs, $1)=unknown
5932   _LT_TAGVAR(module_cmds, $1)=
5933   _LT_TAGVAR(module_expsym_cmds, $1)=
5934   _LT_TAGVAR(old_archive_from_new_cmds, $1)=
5935   _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5936   _LT_TAGVAR(thread_safe_flag_spec, $1)=
5937   _LT_TAGVAR(whole_archive_flag_spec, $1)=
5938   # include_expsyms should be a list of space-separated symbols to be *always*
5939   # included in the symbol list
5940   _LT_TAGVAR(include_expsyms, $1)=
5941   # exclude_expsyms can be an extended regexp of symbols to exclude
5942   # it will be wrapped by ` (' and `)$', so one must not match beginning or
5943   # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5944   # as well as any symbol that contains `d'.
5945   _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5946   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5947   # platforms (ab)use it in PIC code, but their linkers get confused if
5948   # the symbol is explicitly referenced.  Since portable code cannot
5949   # rely on this symbol name, it's probably fine to never include it in
5950   # preloaded symbol tables.
5951   # Exclude shared library initialization/finalization symbols.
5952 dnl Note also adjust exclude_expsyms for C++ above.
5953   extract_expsyms_cmds=
5954
5955   case $host_os in
5956   cygwin* | mingw* | pw32* | cegcc*)
5957     # FIXME: the MSVC++ port hasn't been tested in a loooong time
5958     # When not using gcc, we currently assume that we are using
5959     # Microsoft Visual C++.
5960     if test "$GCC" != yes; then
5961       with_gnu_ld=no
5962     fi
5963     ;;
5964   interix*)
5965     # we just hope/assume this is gcc and not c89 (= MSVC++)
5966     with_gnu_ld=yes
5967     ;;
5968   openbsd*)
5969     with_gnu_ld=no
5970     ;;
5971   esac
5972
5973   _LT_TAGVAR(ld_shlibs, $1)=yes
5974
5975   # On some targets, GNU ld is compatible enough with the native linker
5976   # that we're better off using the native interface for both.
5977   lt_use_gnu_ld_interface=no
5978   if test "$with_gnu_ld" = yes; then
5979     case $host_os in
5980       aix*)
5981         # The AIX port of GNU ld has always aspired to compatibility
5982         # with the native linker.  However, as the warning in the GNU ld
5983         # block says, versions before 2.19.5* couldn't really create working
5984         # shared libraries, regardless of the interface used.
5985         case `$LD -v 2>&1` in
5986           *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
5987           *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
5988           *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
5989           *)
5990             lt_use_gnu_ld_interface=yes
5991             ;;
5992         esac
5993         ;;
5994       *)
5995         lt_use_gnu_ld_interface=yes
5996         ;;
5997     esac
5998   fi
5999
6000   if test "$lt_use_gnu_ld_interface" = yes; then
6001     # If archive_cmds runs LD, not CC, wlarc should be empty
6002     wlarc='${wl}'
6003
6004     # Set some defaults for GNU ld with shared library support. These
6005     # are reset later if shared libraries are not supported. Putting them
6006     # here allows them to be overridden if necessary.
6007     runpath_var=LD_RUN_PATH
6008     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6009     _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6010     # ancient GNU ld didn't support --whole-archive et. al.
6011     if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
6012       _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6013     else
6014       _LT_TAGVAR(whole_archive_flag_spec, $1)=
6015     fi
6016     supports_anon_versioning=no
6017     case `$LD -v 2>&1` in
6018       *GNU\ gold*) supports_anon_versioning=yes ;;
6019       *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
6020       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
6021       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
6022       *\ 2.11.*) ;; # other 2.11 versions
6023       *) supports_anon_versioning=yes ;;
6024     esac
6025
6026     # See if GNU ld supports shared libraries.
6027     case $host_os in
6028     aix[[3-9]]*)
6029       # On AIX/PPC, the GNU linker is very broken
6030       if test "$host_cpu" != ia64; then
6031         _LT_TAGVAR(ld_shlibs, $1)=no
6032         cat <<_LT_EOF 1>&2
6033
6034 *** Warning: the GNU linker, at least up to release 2.19, is reported
6035 *** to be unable to reliably create shared libraries on AIX.
6036 *** Therefore, libtool is disabling shared libraries support.  If you
6037 *** really care for shared libraries, you may want to install binutils
6038 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
6039 *** You will then need to restart the configuration process.
6040
6041 _LT_EOF
6042       fi
6043       ;;
6044
6045     amigaos*)
6046       case $host_cpu in
6047       powerpc)
6048             # see comment about AmigaOS4 .so support
6049             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6050             _LT_TAGVAR(archive_expsym_cmds, $1)=''
6051         ;;
6052       m68k)
6053             _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)'
6054             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6055             _LT_TAGVAR(hardcode_minus_L, $1)=yes
6056         ;;
6057       esac
6058       ;;
6059
6060     beos*)
6061       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6062         _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6063         # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6064         # support --undefined.  This deserves some investigation.  FIXME
6065         _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6066       else
6067         _LT_TAGVAR(ld_shlibs, $1)=no
6068       fi
6069       ;;
6070
6071     cygwin* | mingw* | pw32* | cegcc*)
6072       # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6073       # as there is no search path for DLLs.
6074       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6075       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
6076       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6077       _LT_TAGVAR(always_export_symbols, $1)=no
6078       _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6079       _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'
6080       _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
6081
6082       if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6083         _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'
6084         # If the export-symbols file already is a .def file (1st line
6085         # is EXPORTS), use it as is; otherwise, prepend...
6086         _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6087           cp $export_symbols $output_objdir/$soname.def;
6088         else
6089           echo EXPORTS > $output_objdir/$soname.def;
6090           cat $export_symbols >> $output_objdir/$soname.def;
6091         fi~
6092         $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6093       else
6094         _LT_TAGVAR(ld_shlibs, $1)=no
6095       fi
6096       ;;
6097
6098     haiku*)
6099       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6100       _LT_TAGVAR(link_all_deplibs, $1)=yes
6101       ;;
6102
6103     interix[[3-9]]*)
6104       _LT_TAGVAR(hardcode_direct, $1)=no
6105       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6106       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6107       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6108       # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6109       # Instead, shared libraries are loaded at an image base (0x10000000 by
6110       # default) and relocated if they conflict, which is a slow very memory
6111       # consuming and fragmenting process.  To avoid this, we pick a random,
6112       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6113       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
6114       _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'
6115       _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'
6116       ;;
6117
6118     gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
6119       tmp_diet=no
6120       if test "$host_os" = linux-dietlibc; then
6121         case $cc_basename in
6122           diet\ *) tmp_diet=yes;;       # linux-dietlibc with static linking (!diet-dyn)
6123         esac
6124       fi
6125       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
6126          && test "$tmp_diet" = no
6127       then
6128         tmp_addflag=' $pic_flag'
6129         tmp_sharedflag='-shared'
6130         case $cc_basename,$host_cpu in
6131         pgcc*)                          # Portland Group C compiler
6132           _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'
6133           tmp_addflag=' $pic_flag'
6134           ;;
6135         pgf77* | pgf90* | pgf95* | pgfortran*)
6136                                         # Portland Group f77 and f90 compilers
6137           _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'
6138           tmp_addflag=' $pic_flag -Mnomain' ;;
6139         ecc*,ia64* | icc*,ia64*)        # Intel C compiler on ia64
6140           tmp_addflag=' -i_dynamic' ;;
6141         efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
6142           tmp_addflag=' -i_dynamic -nofor_main' ;;
6143         ifc* | ifort*)                  # Intel Fortran compiler
6144           tmp_addflag=' -nofor_main' ;;
6145         lf95*)                          # Lahey Fortran 8.1
6146           _LT_TAGVAR(whole_archive_flag_spec, $1)=
6147           tmp_sharedflag='--shared' ;;
6148         xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
6149           tmp_sharedflag='-qmkshrobj'
6150           tmp_addflag= ;;
6151         nvcc*)  # Cuda Compiler Driver 2.2
6152           _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'
6153           _LT_TAGVAR(compiler_needs_object, $1)=yes
6154           ;;
6155         esac
6156         case `$CC -V 2>&1 | sed 5q` in
6157         *Sun\ C*)                       # Sun C 5.9
6158           _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'
6159           _LT_TAGVAR(compiler_needs_object, $1)=yes
6160           tmp_sharedflag='-G' ;;
6161         *Sun\ F*)                       # Sun Fortran 8.3
6162           tmp_sharedflag='-G' ;;
6163         esac
6164         _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6165
6166         if test "x$supports_anon_versioning" = xyes; then
6167           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6168             cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6169             echo "local: *; };" >> $output_objdir/$libname.ver~
6170             $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6171         fi
6172
6173         case $cc_basename in
6174         xlf* | bgf* | bgxlf* | mpixlf*)
6175           # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
6176           _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
6177           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6178           _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
6179           if test "x$supports_anon_versioning" = xyes; then
6180             _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6181               cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6182               echo "local: *; };" >> $output_objdir/$libname.ver~
6183               $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
6184           fi
6185           ;;
6186         esac
6187       else
6188         _LT_TAGVAR(ld_shlibs, $1)=no
6189       fi
6190       ;;
6191
6192     netbsd*)
6193       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6194         _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
6195         wlarc=
6196       else
6197         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6198         _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'
6199       fi
6200       ;;
6201
6202     solaris*)
6203       if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
6204         _LT_TAGVAR(ld_shlibs, $1)=no
6205         cat <<_LT_EOF 1>&2
6206
6207 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
6208 *** create shared libraries on Solaris systems.  Therefore, libtool
6209 *** is disabling shared libraries support.  We urge you to upgrade GNU
6210 *** binutils to release 2.9.1 or newer.  Another option is to modify
6211 *** your PATH or compiler configuration so that the native linker is
6212 *** used, and then restart.
6213
6214 _LT_EOF
6215       elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6216         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6217         _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'
6218       else
6219         _LT_TAGVAR(ld_shlibs, $1)=no
6220       fi
6221       ;;
6222
6223     sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
6224       case `$LD -v 2>&1` in
6225         *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
6226         _LT_TAGVAR(ld_shlibs, $1)=no
6227         cat <<_LT_EOF 1>&2
6228
6229 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
6230 *** reliably create shared libraries on SCO systems.  Therefore, libtool
6231 *** is disabling shared libraries support.  We urge you to upgrade GNU
6232 *** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
6233 *** your PATH or compiler configuration so that the native linker is
6234 *** used, and then restart.
6235
6236 _LT_EOF
6237         ;;
6238         *)
6239           # For security reasons, it is highly recommended that you always
6240           # use absolute paths for naming shared libraries, and exclude the
6241           # DT_RUNPATH tag from executables and libraries.  But doing so
6242           # requires that you compile everything twice, which is a pain.
6243           if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6244             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6245             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6246             _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'
6247           else
6248             _LT_TAGVAR(ld_shlibs, $1)=no
6249           fi
6250         ;;
6251       esac
6252       ;;
6253
6254     sunos4*)
6255       _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6256       wlarc=
6257       _LT_TAGVAR(hardcode_direct, $1)=yes
6258       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6259       ;;
6260
6261     *)
6262       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6263         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6264         _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'
6265       else
6266         _LT_TAGVAR(ld_shlibs, $1)=no
6267       fi
6268       ;;
6269     esac
6270
6271     if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
6272       runpath_var=
6273       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6274       _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6275       _LT_TAGVAR(whole_archive_flag_spec, $1)=
6276     fi
6277   else
6278     # PORTME fill in a description of your system's linker (not GNU ld)
6279     case $host_os in
6280     aix3*)
6281       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6282       _LT_TAGVAR(always_export_symbols, $1)=yes
6283       _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'
6284       # Note: this linker hardcodes the directories in LIBPATH if there
6285       # are no directories specified by -L.
6286       _LT_TAGVAR(hardcode_minus_L, $1)=yes
6287       if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
6288         # Neither direct hardcoding nor static linking is supported with a
6289         # broken collect2.
6290         _LT_TAGVAR(hardcode_direct, $1)=unsupported
6291       fi
6292       ;;
6293
6294     aix[[4-9]]*)
6295       if test "$host_cpu" = ia64; then
6296         # On IA64, the linker does run time linking by default, so we don't
6297         # have to do anything special.
6298         aix_use_runtimelinking=no
6299         exp_sym_flag='-Bexport'
6300         no_entry_flag=""
6301       else
6302         # If we're using GNU nm, then we don't want the "-C" option.
6303         # -C means demangle to AIX nm, but means don't demangle with GNU nm
6304         # Also, AIX nm treats weak defined symbols like other global
6305         # defined symbols, whereas GNU nm marks them as "W".
6306         if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
6307           _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'
6308         else
6309           _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'
6310         fi
6311         aix_use_runtimelinking=no
6312
6313         # Test if we are trying to use run time linking or normal
6314         # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6315         # need to do runtime linking.
6316         case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6317           for ld_flag in $LDFLAGS; do
6318           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
6319             aix_use_runtimelinking=yes
6320             break
6321           fi
6322           done
6323           ;;
6324         esac
6325
6326         exp_sym_flag='-bexport'
6327         no_entry_flag='-bnoentry'
6328       fi
6329
6330       # When large executables or shared objects are built, AIX ld can
6331       # have problems creating the table of contents.  If linking a library
6332       # or program results in "error TOC overflow" add -mminimal-toc to
6333       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
6334       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6335
6336       _LT_TAGVAR(archive_cmds, $1)=''
6337       _LT_TAGVAR(hardcode_direct, $1)=yes
6338       _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6339       _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6340       _LT_TAGVAR(link_all_deplibs, $1)=yes
6341       _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6342
6343       if test "$GCC" = yes; then
6344         case $host_os in aix4.[[012]]|aix4.[[012]].*)
6345         # We only want to do this on AIX 4.2 and lower, the check
6346         # below for broken collect2 doesn't work under 4.3+
6347           collect2name=`${CC} -print-prog-name=collect2`
6348           if test -f "$collect2name" &&
6349            strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6350           then
6351           # We have reworked collect2
6352           :
6353           else
6354           # We have old collect2
6355           _LT_TAGVAR(hardcode_direct, $1)=unsupported
6356           # It fails to find uninstalled libraries when the uninstalled
6357           # path is not listed in the libpath.  Setting hardcode_minus_L
6358           # to unsupported forces relinking
6359           _LT_TAGVAR(hardcode_minus_L, $1)=yes
6360           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6361           _LT_TAGVAR(hardcode_libdir_separator, $1)=
6362           fi
6363           ;;
6364         esac
6365         shared_flag='-shared'
6366         if test "$aix_use_runtimelinking" = yes; then
6367           shared_flag="$shared_flag "'${wl}-G'
6368         fi
6369       else
6370         # not using gcc
6371         if test "$host_cpu" = ia64; then
6372         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6373         # chokes on -Wl,-G. The following line is correct:
6374           shared_flag='-G'
6375         else
6376           if test "$aix_use_runtimelinking" = yes; then
6377             shared_flag='${wl}-G'
6378           else
6379             shared_flag='${wl}-bM:SRE'
6380           fi
6381         fi
6382       fi
6383
6384       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6385       # It seems that -bexpall does not export symbols beginning with
6386       # underscore (_), so it is better to generate a list of symbols to export.
6387       _LT_TAGVAR(always_export_symbols, $1)=yes
6388       if test "$aix_use_runtimelinking" = yes; then
6389         # Warning - without using the other runtime loading flags (-brtl),
6390         # -berok will link without error, but may produce a broken library.
6391         _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6392         # Determine the default libpath from the value encoded in an
6393         # empty executable.
6394         _LT_SYS_MODULE_PATH_AIX([$1])
6395         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6396         _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"
6397       else
6398         if test "$host_cpu" = ia64; then
6399           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6400           _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6401           _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"
6402         else
6403          # Determine the default libpath from the value encoded in an
6404          # empty executable.
6405          _LT_SYS_MODULE_PATH_AIX([$1])
6406          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6407           # Warning - without using the other run time loading flags,
6408           # -berok will link without error, but may produce a broken library.
6409           _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6410           _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6411           if test "$with_gnu_ld" = yes; then
6412             # We only use this code for GNU lds that support --whole-archive.
6413             _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6414           else
6415             # Exported symbols can be pulled into shared objects from archives
6416             _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6417           fi
6418           _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6419           # This is similar to how AIX traditionally builds its shared libraries.
6420           _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'
6421         fi
6422       fi
6423       ;;
6424
6425     amigaos*)
6426       case $host_cpu in
6427       powerpc)
6428             # see comment about AmigaOS4 .so support
6429             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6430             _LT_TAGVAR(archive_expsym_cmds, $1)=''
6431         ;;
6432       m68k)
6433             _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)'
6434             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6435             _LT_TAGVAR(hardcode_minus_L, $1)=yes
6436         ;;
6437       esac
6438       ;;
6439
6440     bsdi[[45]]*)
6441       _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6442       ;;
6443
6444     cygwin* | mingw* | pw32* | cegcc*)
6445       # When not using gcc, we currently assume that we are using
6446       # Microsoft Visual C++.
6447       # hardcode_libdir_flag_spec is actually meaningless, as there is
6448       # no search path for DLLs.
6449       case $cc_basename in
6450       cl*)
6451         # Native MSVC
6452         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6453         _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6454         _LT_TAGVAR(always_export_symbols, $1)=yes
6455         _LT_TAGVAR(file_list_spec, $1)='@'
6456         # Tell ltmain to make .lib files, not .a files.
6457         libext=lib
6458         # Tell ltmain to make .dll files, not .so files.
6459         shrext_cmds=".dll"
6460         # FIXME: Setting linknames here is a bad hack.
6461         _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
6462         _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6463             sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
6464           else
6465             sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
6466           fi~
6467           $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6468           linknames='
6469         # The linker will not automatically build a static lib if we build a DLL.
6470         # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6471         _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6472         _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
6473         _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'
6474         # Don't use ranlib
6475         _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6476         _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6477           lt_tool_outputfile="@TOOL_OUTPUT@"~
6478           case $lt_outputfile in
6479             *.exe|*.EXE) ;;
6480             *)
6481               lt_outputfile="$lt_outputfile.exe"
6482               lt_tool_outputfile="$lt_tool_outputfile.exe"
6483               ;;
6484           esac~
6485           if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
6486             $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6487             $RM "$lt_outputfile.manifest";
6488           fi'
6489         ;;
6490       *)
6491         # Assume MSVC wrapper
6492         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6493         _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6494         # Tell ltmain to make .lib files, not .a files.
6495         libext=lib
6496         # Tell ltmain to make .dll files, not .so files.
6497         shrext_cmds=".dll"
6498         # FIXME: Setting linknames here is a bad hack.
6499         _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
6500         # The linker will automatically build a .lib file if we build a DLL.
6501         _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6502         # FIXME: Should let the user specify the lib program.
6503         _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
6504         _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6505         ;;
6506       esac
6507       ;;
6508
6509     darwin* | rhapsody*)
6510       _LT_DARWIN_LINKER_FEATURES($1)
6511       ;;
6512
6513     dgux*)
6514       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6515       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6516       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6517       ;;
6518
6519     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6520     # support.  Future versions do this automatically, but an explicit c++rt0.o
6521     # does not break anything, and helps significantly (at the cost of a little
6522     # extra space).
6523     freebsd2.2*)
6524       _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6525       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6526       _LT_TAGVAR(hardcode_direct, $1)=yes
6527       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6528       ;;
6529
6530     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6531     freebsd2.*)
6532       _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6533       _LT_TAGVAR(hardcode_direct, $1)=yes
6534       _LT_TAGVAR(hardcode_minus_L, $1)=yes
6535       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6536       ;;
6537
6538     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6539     freebsd* | dragonfly*)
6540       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6541       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6542       _LT_TAGVAR(hardcode_direct, $1)=yes
6543       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6544       ;;
6545
6546     hpux9*)
6547       if test "$GCC" = yes; then
6548         _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'
6549       else
6550         _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'
6551       fi
6552       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6553       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6554       _LT_TAGVAR(hardcode_direct, $1)=yes
6555
6556       # hardcode_minus_L: Not really in the search PATH,
6557       # but as the default location of the library.
6558       _LT_TAGVAR(hardcode_minus_L, $1)=yes
6559       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6560       ;;
6561
6562     hpux10*)
6563       if test "$GCC" = yes && test "$with_gnu_ld" = no; then
6564         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6565       else
6566         _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6567       fi
6568       if test "$with_gnu_ld" = no; then
6569         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6570         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6571         _LT_TAGVAR(hardcode_direct, $1)=yes
6572         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6573         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6574         # hardcode_minus_L: Not really in the search PATH,
6575         # but as the default location of the library.
6576         _LT_TAGVAR(hardcode_minus_L, $1)=yes
6577       fi
6578       ;;
6579
6580     hpux11*)
6581       if test "$GCC" = yes && test "$with_gnu_ld" = no; then
6582         case $host_cpu in
6583         hppa*64*)
6584           _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6585           ;;
6586         ia64*)
6587           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6588           ;;
6589         *)
6590           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6591           ;;
6592         esac
6593       else
6594         case $host_cpu in
6595         hppa*64*)
6596           _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6597           ;;
6598         ia64*)
6599           _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6600           ;;
6601         *)
6602         m4_if($1, [], [
6603           # Older versions of the 11.00 compiler do not understand -b yet
6604           # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
6605           _LT_LINKER_OPTION([if $CC understands -b],
6606             _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
6607             [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
6608             [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
6609           [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
6610           ;;
6611         esac
6612       fi
6613       if test "$with_gnu_ld" = no; then
6614         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6615         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6616
6617         case $host_cpu in
6618         hppa*64*|ia64*)
6619           _LT_TAGVAR(hardcode_direct, $1)=no
6620           _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6621           ;;
6622         *)
6623           _LT_TAGVAR(hardcode_direct, $1)=yes
6624           _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6625           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6626
6627           # hardcode_minus_L: Not really in the search PATH,
6628           # but as the default location of the library.
6629           _LT_TAGVAR(hardcode_minus_L, $1)=yes
6630           ;;
6631         esac
6632       fi
6633       ;;
6634
6635     irix5* | irix6* | nonstopux*)
6636       if test "$GCC" = yes; then
6637         _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'
6638         # Try to use the -exported_symbol ld option, if it does not
6639         # work, assume that -exports_file does not work either and
6640         # implicitly export all symbols.
6641         # This should be the same for all languages, so no per-tag cache variable.
6642         AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
6643           [lt_cv_irix_exported_symbol],
6644           [save_LDFLAGS="$LDFLAGS"
6645            LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
6646            AC_LINK_IFELSE(
6647              [AC_LANG_SOURCE(
6648                 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
6649                               [C++], [[int foo (void) { return 0; }]],
6650                               [Fortran 77], [[
6651       subroutine foo
6652       end]],
6653                               [Fortran], [[
6654       subroutine foo
6655       end]])])],
6656               [lt_cv_irix_exported_symbol=yes],
6657               [lt_cv_irix_exported_symbol=no])
6658            LDFLAGS="$save_LDFLAGS"])
6659         if test "$lt_cv_irix_exported_symbol" = yes; then
6660           _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'
6661         fi
6662       else
6663         _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'
6664         _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'
6665       fi
6666       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6667       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6668       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6669       _LT_TAGVAR(inherit_rpath, $1)=yes
6670       _LT_TAGVAR(link_all_deplibs, $1)=yes
6671       ;;
6672
6673     netbsd*)
6674       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6675         _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
6676       else
6677         _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
6678       fi
6679       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6680       _LT_TAGVAR(hardcode_direct, $1)=yes
6681       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6682       ;;
6683
6684     newsos6)
6685       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6686       _LT_TAGVAR(hardcode_direct, $1)=yes
6687       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6688       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6689       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6690       ;;
6691
6692     *nto* | *qnx*)
6693       ;;
6694
6695     openbsd*)
6696       if test -f /usr/libexec/ld.so; then
6697         _LT_TAGVAR(hardcode_direct, $1)=yes
6698         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6699         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6700         if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6701           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6702           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6703           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6704           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6705         else
6706           case $host_os in
6707            openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6708              _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6709              _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6710              ;;
6711            *)
6712              _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6713              _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6714              ;;
6715           esac
6716         fi
6717       else
6718         _LT_TAGVAR(ld_shlibs, $1)=no
6719       fi
6720       ;;
6721
6722     os2*)
6723       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6724       _LT_TAGVAR(hardcode_minus_L, $1)=yes
6725       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6726       _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'
6727       _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6728       ;;
6729
6730     osf3*)
6731       if test "$GCC" = yes; then
6732         _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6733         _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'
6734       else
6735         _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6736         _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'
6737       fi
6738       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6739       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6740       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6741       ;;
6742
6743     osf4* | osf5*)      # as osf3* with the addition of -msym flag
6744       if test "$GCC" = yes; then
6745         _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6746         _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'
6747         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6748       else
6749         _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6750         _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'
6751         _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~
6752         $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'
6753
6754         # Both c and cxx compiler support -rpath directly
6755         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6756       fi
6757       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6758       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6759       ;;
6760
6761     solaris*)
6762       _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
6763       if test "$GCC" = yes; then
6764         wlarc='${wl}'
6765         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6766         _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6767           $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'
6768       else
6769         case `$CC -V 2>&1` in
6770         *"Compilers 5.0"*)
6771           wlarc=''
6772           _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6773           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6774           $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
6775           ;;
6776         *)
6777           wlarc='${wl}'
6778           _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
6779           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6780           $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
6781           ;;
6782         esac
6783       fi
6784       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6785       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6786       case $host_os in
6787       solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6788       *)
6789         # The compiler driver will combine and reorder linker options,
6790         # but understands `-z linker_flag'.  GCC discards it without `$wl',
6791         # but is careful enough not to reorder.
6792         # Supported since Solaris 2.6 (maybe 2.5.1?)
6793         if test "$GCC" = yes; then
6794           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6795         else
6796           _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6797         fi
6798         ;;
6799       esac
6800       _LT_TAGVAR(link_all_deplibs, $1)=yes
6801       ;;
6802
6803     sunos4*)
6804       if test "x$host_vendor" = xsequent; then
6805         # Use $CC to link under sequent, because it throws in some extra .o
6806         # files that make .init and .fini sections work.
6807         _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6808       else
6809         _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6810       fi
6811       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6812       _LT_TAGVAR(hardcode_direct, $1)=yes
6813       _LT_TAGVAR(hardcode_minus_L, $1)=yes
6814       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6815       ;;
6816
6817     sysv4)
6818       case $host_vendor in
6819         sni)
6820           _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6821           _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6822         ;;
6823         siemens)
6824           ## LD is ld it makes a PLAMLIB
6825           ## CC just makes a GrossModule.
6826           _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6827           _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6828           _LT_TAGVAR(hardcode_direct, $1)=no
6829         ;;
6830         motorola)
6831           _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6832           _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6833         ;;
6834       esac
6835       runpath_var='LD_RUN_PATH'
6836       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6837       ;;
6838
6839     sysv4.3*)
6840       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6841       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6842       _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6843       ;;
6844
6845     sysv4*MP*)
6846       if test -d /usr/nec; then
6847         _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6848         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6849         runpath_var=LD_RUN_PATH
6850         hardcode_runpath_var=yes
6851         _LT_TAGVAR(ld_shlibs, $1)=yes
6852       fi
6853       ;;
6854
6855     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6856       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6857       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6858       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6859       runpath_var='LD_RUN_PATH'
6860
6861       if test "$GCC" = yes; then
6862         _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6863         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6864       else
6865         _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6866         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6867       fi
6868       ;;
6869
6870     sysv5* | sco3.2v5* | sco5v6*)
6871       # Note: We can NOT use -z defs as we might desire, because we do not
6872       # link with -lc, and that would cause any symbols used from libc to
6873       # always be unresolved, which means just about no library would
6874       # ever link correctly.  If we're not using GNU ld we use -z text
6875       # though, which does catch some bad symbols but isn't as heavy-handed
6876       # as -z defs.
6877       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6878       _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6879       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6880       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6881       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6882       _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6883       _LT_TAGVAR(link_all_deplibs, $1)=yes
6884       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6885       runpath_var='LD_RUN_PATH'
6886
6887       if test "$GCC" = yes; then
6888         _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6889         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6890       else
6891         _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6892         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6893       fi
6894       ;;
6895
6896     uts4*)
6897       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6898       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6899       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6900       ;;
6901
6902     *)
6903       _LT_TAGVAR(ld_shlibs, $1)=no
6904       ;;
6905     esac
6906
6907     if test x$host_vendor = xsni; then
6908       case $host in
6909       sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6910         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
6911         ;;
6912       esac
6913     fi
6914   fi
6915 ])
6916 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6917 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6918
6919 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
6920
6921 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
6922 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
6923 _LT_DECL([], [extract_expsyms_cmds], [2],
6924     [The commands to extract the exported symbol list from a shared archive])
6925
6926 #
6927 # Do we need to explicitly link libc?
6928 #
6929 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
6930 x|xyes)
6931   # Assume -lc should be added
6932   _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6933
6934   if test "$enable_shared" = yes && test "$GCC" = yes; then
6935     case $_LT_TAGVAR(archive_cmds, $1) in
6936     *'~'*)
6937       # FIXME: we may have to deal with multi-command sequences.
6938       ;;
6939     '$CC '*)
6940       # Test whether the compiler implicitly links with -lc since on some
6941       # systems, -lgcc has to come before -lc. If gcc already passes -lc
6942       # to ld, don't add -lc before -lgcc.
6943       AC_CACHE_CHECK([whether -lc should be explicitly linked in],
6944         [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
6945         [$RM conftest*
6946         echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6947
6948         if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6949           soname=conftest
6950           lib=conftest
6951           libobjs=conftest.$ac_objext
6952           deplibs=
6953           wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
6954           pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
6955           compiler_flags=-v
6956           linker_flags=-v
6957           verstring=
6958           output_objdir=.
6959           libname=conftest
6960           lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
6961           _LT_TAGVAR(allow_undefined_flag, $1)=
6962           if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
6963           then
6964             lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6965           else
6966             lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6967           fi
6968           _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6969         else
6970           cat conftest.err 1>&5
6971         fi
6972         $RM conftest*
6973         ])
6974       _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
6975       ;;
6976     esac
6977   fi
6978   ;;
6979 esac
6980
6981 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
6982     [Whether or not to add -lc for building shared libraries])
6983 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
6984     [enable_shared_with_static_runtimes], [0],
6985     [Whether or not to disallow shared libs when runtime libs are static])
6986 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
6987     [Compiler flag to allow reflexive dlopens])
6988 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
6989     [Compiler flag to generate shared objects directly from archives])
6990 _LT_TAGDECL([], [compiler_needs_object], [1],
6991     [Whether the compiler copes with passing no objects directly])
6992 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
6993     [Create an old-style archive from a shared archive])
6994 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
6995     [Create a temporary old-style archive to link instead of a shared archive])
6996 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
6997 _LT_TAGDECL([], [archive_expsym_cmds], [2])
6998 _LT_TAGDECL([], [module_cmds], [2],
6999     [Commands used to build a loadable module if different from building
7000     a shared archive.])
7001 _LT_TAGDECL([], [module_expsym_cmds], [2])
7002 _LT_TAGDECL([], [with_gnu_ld], [1],
7003     [Whether we are building with GNU ld or not])
7004 _LT_TAGDECL([], [allow_undefined_flag], [1],
7005     [Flag that allows shared libraries with undefined symbols to be built])
7006 _LT_TAGDECL([], [no_undefined_flag], [1],
7007     [Flag that enforces no undefined symbols])
7008 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
7009     [Flag to hardcode $libdir into a binary during linking.
7010     This must work even if $libdir does not exist])
7011 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
7012     [Whether we need a single "-rpath" flag with a separated argument])
7013 _LT_TAGDECL([], [hardcode_direct], [0],
7014     [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
7015     DIR into the resulting binary])
7016 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
7017     [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
7018     DIR into the resulting binary and the resulting library dependency is
7019     "absolute", i.e impossible to change by setting ${shlibpath_var} if the
7020     library is relocated])
7021 _LT_TAGDECL([], [hardcode_minus_L], [0],
7022     [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
7023     into the resulting binary])
7024 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
7025     [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
7026     into the resulting binary])
7027 _LT_TAGDECL([], [hardcode_automatic], [0],
7028     [Set to "yes" if building a shared library automatically hardcodes DIR
7029     into the library and all subsequent libraries and executables linked
7030     against it])
7031 _LT_TAGDECL([], [inherit_rpath], [0],
7032     [Set to yes if linker adds runtime paths of dependent libraries
7033     to runtime path list])
7034 _LT_TAGDECL([], [link_all_deplibs], [0],
7035     [Whether libtool must link a program against all its dependency libraries])
7036 _LT_TAGDECL([], [always_export_symbols], [0],
7037     [Set to "yes" if exported symbols are required])
7038 _LT_TAGDECL([], [export_symbols_cmds], [2],
7039     [The commands to list exported symbols])
7040 _LT_TAGDECL([], [exclude_expsyms], [1],
7041     [Symbols that should not be listed in the preloaded symbols])
7042 _LT_TAGDECL([], [include_expsyms], [1],
7043     [Symbols that must always be exported])
7044 _LT_TAGDECL([], [prelink_cmds], [2],
7045     [Commands necessary for linking programs (against libraries) with templates])
7046 _LT_TAGDECL([], [postlink_cmds], [2],
7047     [Commands necessary for finishing linking programs])
7048 _LT_TAGDECL([], [file_list_spec], [1],
7049     [Specify filename containing input files])
7050 dnl FIXME: Not yet implemented
7051 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
7052 dnl    [Compiler flag to generate thread safe objects])
7053 ])# _LT_LINKER_SHLIBS
7054
7055
7056 # _LT_LANG_C_CONFIG([TAG])
7057 # ------------------------
7058 # Ensure that the configuration variables for a C compiler are suitably
7059 # defined.  These variables are subsequently used by _LT_CONFIG to write
7060 # the compiler configuration to `libtool'.
7061 m4_defun([_LT_LANG_C_CONFIG],
7062 [m4_require([_LT_DECL_EGREP])dnl
7063 lt_save_CC="$CC"
7064 AC_LANG_PUSH(C)
7065
7066 # Source file extension for C test sources.
7067 ac_ext=c
7068
7069 # Object file extension for compiled C test sources.
7070 objext=o
7071 _LT_TAGVAR(objext, $1)=$objext
7072
7073 # Code to be used in simple compile tests
7074 lt_simple_compile_test_code="int some_variable = 0;"
7075
7076 # Code to be used in simple link tests
7077 lt_simple_link_test_code='int main(){return(0);}'
7078
7079 _LT_TAG_COMPILER
7080 # Save the default compiler, since it gets overwritten when the other
7081 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
7082 compiler_DEFAULT=$CC
7083
7084 # save warnings/boilerplate of simple test code
7085 _LT_COMPILER_BOILERPLATE
7086 _LT_LINKER_BOILERPLATE
7087
7088 if test -n "$compiler"; then
7089   _LT_COMPILER_NO_RTTI($1)
7090   _LT_COMPILER_PIC($1)
7091   _LT_COMPILER_C_O($1)
7092   _LT_COMPILER_FILE_LOCKS($1)
7093   _LT_LINKER_SHLIBS($1)
7094   _LT_SYS_DYNAMIC_LINKER($1)
7095   _LT_LINKER_HARDCODE_LIBPATH($1)
7096   LT_SYS_DLOPEN_SELF
7097   _LT_CMD_STRIPLIB
7098
7099   # Report which library types will actually be built
7100   AC_MSG_CHECKING([if libtool supports shared libraries])
7101   AC_MSG_RESULT([$can_build_shared])
7102
7103   AC_MSG_CHECKING([whether to build shared libraries])
7104   test "$can_build_shared" = "no" && enable_shared=no
7105
7106   # On AIX, shared libraries and static libraries use the same namespace, and
7107   # are all built from PIC.
7108   case $host_os in
7109   aix3*)
7110     test "$enable_shared" = yes && enable_static=no
7111     if test -n "$RANLIB"; then
7112       archive_cmds="$archive_cmds~\$RANLIB \$lib"
7113       postinstall_cmds='$RANLIB $lib'
7114     fi
7115     ;;
7116
7117   aix[[4-9]]*)
7118     if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7119       test "$enable_shared" = yes && enable_static=no
7120     fi
7121     ;;
7122   esac
7123   AC_MSG_RESULT([$enable_shared])
7124
7125   AC_MSG_CHECKING([whether to build static libraries])
7126   # Make sure either enable_shared or enable_static is yes.
7127   test "$enable_shared" = yes || enable_static=yes
7128   AC_MSG_RESULT([$enable_static])
7129
7130   _LT_CONFIG($1)
7131 fi
7132 AC_LANG_POP
7133 CC="$lt_save_CC"
7134 ])# _LT_LANG_C_CONFIG
7135
7136
7137 # _LT_LANG_CXX_CONFIG([TAG])
7138 # --------------------------
7139 # Ensure that the configuration variables for a C++ compiler are suitably
7140 # defined.  These variables are subsequently used by _LT_CONFIG to write
7141 # the compiler configuration to `libtool'.
7142 m4_defun([_LT_LANG_CXX_CONFIG],
7143 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7144 m4_require([_LT_DECL_EGREP])dnl
7145 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
7146 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
7147     ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
7148     (test "X$CXX" != "Xg++"))) ; then
7149   AC_PROG_CXXCPP
7150 else
7151   _lt_caught_CXX_error=yes
7152 fi
7153
7154 AC_LANG_PUSH(C++)
7155 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7156 _LT_TAGVAR(allow_undefined_flag, $1)=
7157 _LT_TAGVAR(always_export_symbols, $1)=no
7158 _LT_TAGVAR(archive_expsym_cmds, $1)=
7159 _LT_TAGVAR(compiler_needs_object, $1)=no
7160 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7161 _LT_TAGVAR(hardcode_direct, $1)=no
7162 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7163 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7164 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7165 _LT_TAGVAR(hardcode_minus_L, $1)=no
7166 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
7167 _LT_TAGVAR(hardcode_automatic, $1)=no
7168 _LT_TAGVAR(inherit_rpath, $1)=no
7169 _LT_TAGVAR(module_cmds, $1)=
7170 _LT_TAGVAR(module_expsym_cmds, $1)=
7171 _LT_TAGVAR(link_all_deplibs, $1)=unknown
7172 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7173 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7174 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7175 _LT_TAGVAR(no_undefined_flag, $1)=
7176 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7177 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7178
7179 # Source file extension for C++ test sources.
7180 ac_ext=cpp
7181
7182 # Object file extension for compiled C++ test sources.
7183 objext=o
7184 _LT_TAGVAR(objext, $1)=$objext
7185
7186 # No sense in running all these tests if we already determined that
7187 # the CXX compiler isn't working.  Some variables (like enable_shared)
7188 # are currently assumed to apply to all compilers on this platform,
7189 # and will be corrupted by setting them based on a non-working compiler.
7190 if test "$_lt_caught_CXX_error" != yes; then
7191   # Code to be used in simple compile tests
7192   lt_simple_compile_test_code="int some_variable = 0;"
7193
7194   # Code to be used in simple link tests
7195   lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
7196
7197   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7198   _LT_TAG_COMPILER
7199
7200   # save warnings/boilerplate of simple test code
7201   _LT_COMPILER_BOILERPLATE
7202   _LT_LINKER_BOILERPLATE
7203
7204   # Allow CC to be a program name with arguments.
7205   lt_save_CC=$CC
7206   lt_save_CFLAGS=$CFLAGS
7207   lt_save_LD=$LD
7208   lt_save_GCC=$GCC
7209   GCC=$GXX
7210   lt_save_with_gnu_ld=$with_gnu_ld
7211   lt_save_path_LD=$lt_cv_path_LD
7212   if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
7213     lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
7214   else
7215     $as_unset lt_cv_prog_gnu_ld
7216   fi
7217   if test -n "${lt_cv_path_LDCXX+set}"; then
7218     lt_cv_path_LD=$lt_cv_path_LDCXX
7219   else
7220     $as_unset lt_cv_path_LD
7221   fi
7222   test -z "${LDCXX+set}" || LD=$LDCXX
7223   CC=${CXX-"c++"}
7224   CFLAGS=$CXXFLAGS
7225   compiler=$CC
7226   _LT_TAGVAR(compiler, $1)=$CC
7227   _LT_CC_BASENAME([$compiler])
7228
7229   if test -n "$compiler"; then
7230     # We don't want -fno-exception when compiling C++ code, so set the
7231     # no_builtin_flag separately
7232     if test "$GXX" = yes; then
7233       _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
7234     else
7235       _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
7236     fi
7237
7238     if test "$GXX" = yes; then
7239       # Set up default GNU C++ configuration
7240
7241       LT_PATH_LD
7242
7243       # Check if GNU C++ uses GNU ld as the underlying linker, since the
7244       # archiving commands below assume that GNU ld is being used.
7245       if test "$with_gnu_ld" = yes; then
7246         _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7247         _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'
7248
7249         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7250         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7251
7252         # If archive_cmds runs LD, not CC, wlarc should be empty
7253         # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
7254         #     investigate it a little bit more. (MM)
7255         wlarc='${wl}'
7256
7257         # ancient GNU ld didn't support --whole-archive et. al.
7258         if eval "`$CC -print-prog-name=ld` --help 2>&1" |
7259           $GREP 'no-whole-archive' > /dev/null; then
7260           _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7261         else
7262           _LT_TAGVAR(whole_archive_flag_spec, $1)=
7263         fi
7264       else
7265         with_gnu_ld=no
7266         wlarc=
7267
7268         # A generic and very simple default shared library creation
7269         # command for GNU C++ for the case where it uses the native
7270         # linker, instead of GNU ld.  If possible, this setting should
7271         # overridden to take advantage of the native linker features on
7272         # the platform it is being used on.
7273         _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7274       fi
7275
7276       # Commands to make compiler produce verbose output that lists
7277       # what "hidden" libraries, object files and flags are used when
7278       # linking a shared library.
7279       output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7280
7281     else
7282       GXX=no
7283       with_gnu_ld=no
7284       wlarc=
7285     fi
7286
7287     # PORTME: fill in a description of your system's C++ link characteristics
7288     AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
7289     _LT_TAGVAR(ld_shlibs, $1)=yes
7290     case $host_os in
7291       aix3*)
7292         # FIXME: insert proper C++ library support
7293         _LT_TAGVAR(ld_shlibs, $1)=no
7294         ;;
7295       aix[[4-9]]*)
7296         if test "$host_cpu" = ia64; then
7297           # On IA64, the linker does run time linking by default, so we don't
7298           # have to do anything special.
7299           aix_use_runtimelinking=no
7300           exp_sym_flag='-Bexport'
7301           no_entry_flag=""
7302         else
7303           aix_use_runtimelinking=no
7304
7305           # Test if we are trying to use run time linking or normal
7306           # AIX style linking. If -brtl is somewhere in LDFLAGS, we
7307           # need to do runtime linking.
7308           case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
7309             for ld_flag in $LDFLAGS; do
7310               case $ld_flag in
7311               *-brtl*)
7312                 aix_use_runtimelinking=yes
7313                 break
7314                 ;;
7315               esac
7316             done
7317             ;;
7318           esac
7319
7320           exp_sym_flag='-bexport'
7321           no_entry_flag='-bnoentry'
7322         fi
7323
7324         # When large executables or shared objects are built, AIX ld can
7325         # have problems creating the table of contents.  If linking a library
7326         # or program results in "error TOC overflow" add -mminimal-toc to
7327         # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
7328         # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7329
7330         _LT_TAGVAR(archive_cmds, $1)=''
7331         _LT_TAGVAR(hardcode_direct, $1)=yes
7332         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7333         _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7334         _LT_TAGVAR(link_all_deplibs, $1)=yes
7335         _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
7336
7337         if test "$GXX" = yes; then
7338           case $host_os in aix4.[[012]]|aix4.[[012]].*)
7339           # We only want to do this on AIX 4.2 and lower, the check
7340           # below for broken collect2 doesn't work under 4.3+
7341           collect2name=`${CC} -print-prog-name=collect2`
7342           if test -f "$collect2name" &&
7343              strings "$collect2name" | $GREP resolve_lib_name >/dev/null
7344           then
7345             # We have reworked collect2
7346             :
7347           else
7348             # We have old collect2
7349             _LT_TAGVAR(hardcode_direct, $1)=unsupported
7350             # It fails to find uninstalled libraries when the uninstalled
7351             # path is not listed in the libpath.  Setting hardcode_minus_L
7352             # to unsupported forces relinking
7353             _LT_TAGVAR(hardcode_minus_L, $1)=yes
7354             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7355             _LT_TAGVAR(hardcode_libdir_separator, $1)=
7356           fi
7357           esac
7358           shared_flag='-shared'
7359           if test "$aix_use_runtimelinking" = yes; then
7360             shared_flag="$shared_flag "'${wl}-G'
7361           fi
7362         else
7363           # not using gcc
7364           if test "$host_cpu" = ia64; then
7365           # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
7366           # chokes on -Wl,-G. The following line is correct:
7367           shared_flag='-G'
7368           else
7369             if test "$aix_use_runtimelinking" = yes; then
7370               shared_flag='${wl}-G'
7371             else
7372               shared_flag='${wl}-bM:SRE'
7373             fi
7374           fi
7375         fi
7376
7377         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
7378         # It seems that -bexpall does not export symbols beginning with
7379         # underscore (_), so it is better to generate a list of symbols to
7380         # export.
7381         _LT_TAGVAR(always_export_symbols, $1)=yes
7382         if test "$aix_use_runtimelinking" = yes; then
7383           # Warning - without using the other runtime loading flags (-brtl),
7384           # -berok will link without error, but may produce a broken library.
7385           _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
7386           # Determine the default libpath from the value encoded in an empty
7387           # executable.
7388           _LT_SYS_MODULE_PATH_AIX([$1])
7389           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7390
7391           _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"
7392         else
7393           if test "$host_cpu" = ia64; then
7394             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
7395             _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
7396             _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"
7397           else
7398             # Determine the default libpath from the value encoded in an
7399             # empty executable.
7400             _LT_SYS_MODULE_PATH_AIX([$1])
7401             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7402             # Warning - without using the other run time loading flags,
7403             # -berok will link without error, but may produce a broken library.
7404             _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
7405             _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
7406             if test "$with_gnu_ld" = yes; then
7407               # We only use this code for GNU lds that support --whole-archive.
7408               _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
7409             else
7410               # Exported symbols can be pulled into shared objects from archives
7411               _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
7412             fi
7413             _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7414             # This is similar to how AIX traditionally builds its shared
7415             # libraries.
7416             _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'
7417           fi
7418         fi
7419         ;;
7420
7421       beos*)
7422         if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
7423           _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7424           # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
7425           # support --undefined.  This deserves some investigation.  FIXME
7426           _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7427         else
7428           _LT_TAGVAR(ld_shlibs, $1)=no
7429         fi
7430         ;;
7431
7432       chorus*)
7433         case $cc_basename in
7434           *)
7435           # FIXME: insert proper C++ library support
7436           _LT_TAGVAR(ld_shlibs, $1)=no
7437           ;;
7438         esac
7439         ;;
7440
7441       cygwin* | mingw* | pw32* | cegcc*)
7442         case $GXX,$cc_basename in
7443         ,cl* | no,cl*)
7444           # Native MSVC
7445           # hardcode_libdir_flag_spec is actually meaningless, as there is
7446           # no search path for DLLs.
7447           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
7448           _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7449           _LT_TAGVAR(always_export_symbols, $1)=yes
7450           _LT_TAGVAR(file_list_spec, $1)='@'
7451           # Tell ltmain to make .lib files, not .a files.
7452           libext=lib
7453           # Tell ltmain to make .dll files, not .so files.
7454           shrext_cmds=".dll"
7455           # FIXME: Setting linknames here is a bad hack.
7456           _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
7457           _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7458               $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
7459             else
7460               $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
7461             fi~
7462             $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
7463             linknames='
7464           # The linker will not automatically build a static lib if we build a DLL.
7465           # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
7466           _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7467           # Don't use ranlib
7468           _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
7469           _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
7470             lt_tool_outputfile="@TOOL_OUTPUT@"~
7471             case $lt_outputfile in
7472               *.exe|*.EXE) ;;
7473               *)
7474                 lt_outputfile="$lt_outputfile.exe"
7475                 lt_tool_outputfile="$lt_tool_outputfile.exe"
7476                 ;;
7477             esac~
7478             func_to_tool_file "$lt_outputfile"~
7479             if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
7480               $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
7481               $RM "$lt_outputfile.manifest";
7482             fi'
7483           ;;
7484         *)
7485           # g++
7486           # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
7487           # as there is no search path for DLLs.
7488           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7489           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
7490           _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7491           _LT_TAGVAR(always_export_symbols, $1)=no
7492           _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7493
7494           if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
7495             _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'
7496             # If the export-symbols file already is a .def file (1st line
7497             # is EXPORTS), use it as is; otherwise, prepend...
7498             _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7499               cp $export_symbols $output_objdir/$soname.def;
7500             else
7501               echo EXPORTS > $output_objdir/$soname.def;
7502               cat $export_symbols >> $output_objdir/$soname.def;
7503             fi~
7504             $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'
7505           else
7506             _LT_TAGVAR(ld_shlibs, $1)=no
7507           fi
7508           ;;
7509         esac
7510         ;;
7511       darwin* | rhapsody*)
7512         _LT_DARWIN_LINKER_FEATURES($1)
7513         ;;
7514
7515       dgux*)
7516         case $cc_basename in
7517           ec++*)
7518             # FIXME: insert proper C++ library support
7519             _LT_TAGVAR(ld_shlibs, $1)=no
7520             ;;
7521           ghcx*)
7522             # Green Hills C++ Compiler
7523             # FIXME: insert proper C++ library support
7524             _LT_TAGVAR(ld_shlibs, $1)=no
7525             ;;
7526           *)
7527             # FIXME: insert proper C++ library support
7528             _LT_TAGVAR(ld_shlibs, $1)=no
7529             ;;
7530         esac
7531         ;;
7532
7533       freebsd2.*)
7534         # C++ shared libraries reported to be fairly broken before
7535         # switch to ELF
7536         _LT_TAGVAR(ld_shlibs, $1)=no
7537         ;;
7538
7539       freebsd-elf*)
7540         _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7541         ;;
7542
7543       freebsd* | dragonfly*)
7544         # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
7545         # conventions
7546         _LT_TAGVAR(ld_shlibs, $1)=yes
7547         ;;
7548
7549       gnu*)
7550         ;;
7551
7552       haiku*)
7553         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7554         _LT_TAGVAR(link_all_deplibs, $1)=yes
7555         ;;
7556
7557       hpux9*)
7558         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7559         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7560         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7561         _LT_TAGVAR(hardcode_direct, $1)=yes
7562         _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7563                                              # but as the default
7564                                              # location of the library.
7565
7566         case $cc_basename in
7567           CC*)
7568             # FIXME: insert proper C++ library support
7569             _LT_TAGVAR(ld_shlibs, $1)=no
7570             ;;
7571           aCC*)
7572             _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'
7573             # Commands to make compiler produce verbose output that lists
7574             # what "hidden" libraries, object files and flags are used when
7575             # linking a shared library.
7576             #
7577             # There doesn't appear to be a way to prevent this compiler from
7578             # explicitly linking system object files so we need to strip them
7579             # from the output so that they don't get included in the library
7580             # dependencies.
7581             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"'
7582             ;;
7583           *)
7584             if test "$GXX" = yes; then
7585               _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'
7586             else
7587               # FIXME: insert proper C++ library support
7588               _LT_TAGVAR(ld_shlibs, $1)=no
7589             fi
7590             ;;
7591         esac
7592         ;;
7593
7594       hpux10*|hpux11*)
7595         if test $with_gnu_ld = no; then
7596           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7597           _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7598
7599           case $host_cpu in
7600             hppa*64*|ia64*)
7601               ;;
7602             *)
7603               _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7604               ;;
7605           esac
7606         fi
7607         case $host_cpu in
7608           hppa*64*|ia64*)
7609             _LT_TAGVAR(hardcode_direct, $1)=no
7610             _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7611             ;;
7612           *)
7613             _LT_TAGVAR(hardcode_direct, $1)=yes
7614             _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7615             _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7616                                                  # but as the default
7617                                                  # location of the library.
7618             ;;
7619         esac
7620
7621         case $cc_basename in
7622           CC*)
7623             # FIXME: insert proper C++ library support
7624             _LT_TAGVAR(ld_shlibs, $1)=no
7625             ;;
7626           aCC*)
7627             case $host_cpu in
7628               hppa*64*)
7629                 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7630                 ;;
7631               ia64*)
7632                 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7633                 ;;
7634               *)
7635                 _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'
7636                 ;;
7637             esac
7638             # Commands to make compiler produce verbose output that lists
7639             # what "hidden" libraries, object files and flags are used when
7640             # linking a shared library.
7641             #
7642             # There doesn't appear to be a way to prevent this compiler from
7643             # explicitly linking system object files so we need to strip them
7644             # from the output so that they don't get included in the library
7645             # dependencies.
7646             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"'
7647             ;;
7648           *)
7649             if test "$GXX" = yes; then
7650               if test $with_gnu_ld = no; then
7651                 case $host_cpu in
7652                   hppa*64*)
7653                     _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7654                     ;;
7655                   ia64*)
7656                     _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'
7657                     ;;
7658                   *)
7659                     _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'
7660                     ;;
7661                 esac
7662               fi
7663             else
7664               # FIXME: insert proper C++ library support
7665               _LT_TAGVAR(ld_shlibs, $1)=no
7666             fi
7667             ;;
7668         esac
7669         ;;
7670
7671       interix[[3-9]]*)
7672         _LT_TAGVAR(hardcode_direct, $1)=no
7673         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7674         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7675         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7676         # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
7677         # Instead, shared libraries are loaded at an image base (0x10000000 by
7678         # default) and relocated if they conflict, which is a slow very memory
7679         # consuming and fragmenting process.  To avoid this, we pick a random,
7680         # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
7681         # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
7682         _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'
7683         _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'
7684         ;;
7685       irix5* | irix6*)
7686         case $cc_basename in
7687           CC*)
7688             # SGI C++
7689             _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'
7690
7691             # Archives containing C++ object files must be created using
7692             # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
7693             # necessary to make sure instantiated templates are included
7694             # in the archive.
7695             _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
7696             ;;
7697           *)
7698             if test "$GXX" = yes; then
7699               if test "$with_gnu_ld" = no; then
7700                 _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'
7701               else
7702                 _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'
7703               fi
7704             fi
7705             _LT_TAGVAR(link_all_deplibs, $1)=yes
7706             ;;
7707         esac
7708         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7709         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7710         _LT_TAGVAR(inherit_rpath, $1)=yes
7711         ;;
7712
7713       linux* | k*bsd*-gnu | kopensolaris*-gnu)
7714         case $cc_basename in
7715           KCC*)
7716             # Kuck and Associates, Inc. (KAI) C++ Compiler
7717
7718             # KCC will only create a shared library if the output file
7719             # ends with ".so" (or ".sl" for HP-UX), so rename the library
7720             # to its proper name (with version) after linking.
7721             _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'
7722             _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'
7723             # Commands to make compiler produce verbose output that lists
7724             # what "hidden" libraries, object files and flags are used when
7725             # linking a shared library.
7726             #
7727             # There doesn't appear to be a way to prevent this compiler from
7728             # explicitly linking system object files so we need to strip them
7729             # from the output so that they don't get included in the library
7730             # dependencies.
7731             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"'
7732
7733             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7734             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7735
7736             # Archives containing C++ object files must be created using
7737             # "CC -Bstatic", where "CC" is the KAI C++ compiler.
7738             _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
7739             ;;
7740           icpc* | ecpc* )
7741             # Intel C++
7742             with_gnu_ld=yes
7743             # version 8.0 and above of icpc choke on multiply defined symbols
7744             # if we add $predep_objects and $postdep_objects, however 7.1 and
7745             # earlier do not add the objects themselves.
7746             case `$CC -V 2>&1` in
7747               *"Version 7."*)
7748                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7749                 _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'
7750                 ;;
7751               *)  # Version 8.0 or newer
7752                 tmp_idyn=
7753                 case $host_cpu in
7754                   ia64*) tmp_idyn=' -i_dynamic';;
7755                 esac
7756                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7757                 _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'
7758                 ;;
7759             esac
7760             _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7761             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7762             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7763             _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
7764             ;;
7765           pgCC* | pgcpp*)
7766             # Portland Group C++ compiler
7767             case `$CC -V` in
7768             *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
7769               _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
7770                 rm -rf $tpldir~
7771                 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
7772                 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
7773               _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
7774                 rm -rf $tpldir~
7775                 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
7776                 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
7777                 $RANLIB $oldlib'
7778               _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
7779                 rm -rf $tpldir~
7780                 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7781                 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7782               _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
7783                 rm -rf $tpldir~
7784                 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7785                 $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'
7786               ;;
7787             *) # Version 6 and above use weak symbols
7788               _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7789               _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'
7790               ;;
7791             esac
7792
7793             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
7794             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7795             _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'
7796             ;;
7797           cxx*)
7798             # Compaq C++
7799             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7800             _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'
7801
7802             runpath_var=LD_RUN_PATH
7803             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7804             _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7805
7806             # Commands to make compiler produce verbose output that lists
7807             # what "hidden" libraries, object files and flags are used when
7808             # linking a shared library.
7809             #
7810             # There doesn't appear to be a way to prevent this compiler from
7811             # explicitly linking system object files so we need to strip them
7812             # from the output so that they don't get included in the library
7813             # dependencies.
7814             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'
7815             ;;
7816           xl* | mpixl* | bgxl*)
7817             # IBM XL 8.0 on PPC, with GNU ld
7818             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7819             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7820             _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7821             if test "x$supports_anon_versioning" = xyes; then
7822               _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7823                 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7824                 echo "local: *; };" >> $output_objdir/$libname.ver~
7825                 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
7826             fi
7827             ;;
7828           *)
7829             case `$CC -V 2>&1 | sed 5q` in
7830             *Sun\ C*)
7831               # Sun C++ 5.9
7832               _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7833               _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7834               _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'
7835               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7836               _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'
7837               _LT_TAGVAR(compiler_needs_object, $1)=yes
7838
7839               # Not sure whether something based on
7840               # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
7841               # would be better.
7842               output_verbose_link_cmd='func_echo_all'
7843
7844               # Archives containing C++ object files must be created using
7845               # "CC -xar", where "CC" is the Sun C++ compiler.  This is
7846               # necessary to make sure instantiated templates are included
7847               # in the archive.
7848               _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7849               ;;
7850             esac
7851             ;;
7852         esac
7853         ;;
7854
7855       lynxos*)
7856         # FIXME: insert proper C++ library support
7857         _LT_TAGVAR(ld_shlibs, $1)=no
7858         ;;
7859
7860       m88k*)
7861         # FIXME: insert proper C++ library support
7862         _LT_TAGVAR(ld_shlibs, $1)=no
7863         ;;
7864
7865       mvs*)
7866         case $cc_basename in
7867           cxx*)
7868             # FIXME: insert proper C++ library support
7869             _LT_TAGVAR(ld_shlibs, $1)=no
7870             ;;
7871           *)
7872             # FIXME: insert proper C++ library support
7873             _LT_TAGVAR(ld_shlibs, $1)=no
7874             ;;
7875         esac
7876         ;;
7877
7878       netbsd*)
7879         if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7880           _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
7881           wlarc=
7882           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7883           _LT_TAGVAR(hardcode_direct, $1)=yes
7884           _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7885         fi
7886         # Workaround some broken pre-1.5 toolchains
7887         output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
7888         ;;
7889
7890       *nto* | *qnx*)
7891         _LT_TAGVAR(ld_shlibs, $1)=yes
7892         ;;
7893
7894       openbsd2*)
7895         # C++ shared libraries are fairly broken
7896         _LT_TAGVAR(ld_shlibs, $1)=no
7897         ;;
7898
7899       openbsd*)
7900         if test -f /usr/libexec/ld.so; then
7901           _LT_TAGVAR(hardcode_direct, $1)=yes
7902           _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7903           _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7904           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7905           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7906           if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7907             _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'
7908             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7909             _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7910           fi
7911           output_verbose_link_cmd=func_echo_all
7912         else
7913           _LT_TAGVAR(ld_shlibs, $1)=no
7914         fi
7915         ;;
7916
7917       osf3* | osf4* | osf5*)
7918         case $cc_basename in
7919           KCC*)
7920             # Kuck and Associates, Inc. (KAI) C++ Compiler
7921
7922             # KCC will only create a shared library if the output file
7923             # ends with ".so" (or ".sl" for HP-UX), so rename the library
7924             # to its proper name (with version) after linking.
7925             _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'
7926
7927             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7928             _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7929
7930             # Archives containing C++ object files must be created using
7931             # the KAI C++ compiler.
7932             case $host in
7933               osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
7934               *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
7935             esac
7936             ;;
7937           RCC*)
7938             # Rational C++ 2.4.1
7939             # FIXME: insert proper C++ library support
7940             _LT_TAGVAR(ld_shlibs, $1)=no
7941             ;;
7942           cxx*)
7943             case $host in
7944               osf3*)
7945                 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7946                 _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'
7947                 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7948                 ;;
7949               *)
7950                 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7951                 _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'
7952                 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
7953                   echo "-hidden">> $lib.exp~
7954                   $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~
7955                   $RM $lib.exp'
7956                 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7957                 ;;
7958             esac
7959
7960             _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7961
7962             # Commands to make compiler produce verbose output that lists
7963             # what "hidden" libraries, object files and flags are used when
7964             # linking a shared library.
7965             #
7966             # There doesn't appear to be a way to prevent this compiler from
7967             # explicitly linking system object files so we need to strip them
7968             # from the output so that they don't get included in the library
7969             # dependencies.
7970             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"'
7971             ;;
7972           *)
7973             if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7974               _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7975               case $host in
7976                 osf3*)
7977                   _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'
7978                   ;;
7979                 *)
7980                   _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'
7981                   ;;
7982               esac
7983
7984               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7985               _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7986
7987               # Commands to make compiler produce verbose output that lists
7988               # what "hidden" libraries, object files and flags are used when
7989               # linking a shared library.
7990               output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7991
7992             else
7993               # FIXME: insert proper C++ library support
7994               _LT_TAGVAR(ld_shlibs, $1)=no
7995             fi
7996             ;;
7997         esac
7998         ;;
7999
8000       psos*)
8001         # FIXME: insert proper C++ library support
8002         _LT_TAGVAR(ld_shlibs, $1)=no
8003         ;;
8004
8005       sunos4*)
8006         case $cc_basename in
8007           CC*)
8008             # Sun C++ 4.x
8009             # FIXME: insert proper C++ library support
8010             _LT_TAGVAR(ld_shlibs, $1)=no
8011             ;;
8012           lcc*)
8013             # Lucid
8014             # FIXME: insert proper C++ library support
8015             _LT_TAGVAR(ld_shlibs, $1)=no
8016             ;;
8017           *)
8018             # FIXME: insert proper C++ library support
8019             _LT_TAGVAR(ld_shlibs, $1)=no
8020             ;;
8021         esac
8022         ;;
8023
8024       solaris*)
8025         case $cc_basename in
8026           CC* | sunCC*)
8027             # Sun C++ 4.2, 5.x and Centerline C++
8028             _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
8029             _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
8030             _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8031             _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8032               $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'
8033
8034             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8035             _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8036             case $host_os in
8037               solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
8038               *)
8039                 # The compiler driver will combine and reorder linker options,
8040                 # but understands `-z linker_flag'.
8041                 # Supported since Solaris 2.6 (maybe 2.5.1?)
8042                 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
8043                 ;;
8044             esac
8045             _LT_TAGVAR(link_all_deplibs, $1)=yes
8046
8047             output_verbose_link_cmd='func_echo_all'
8048
8049             # Archives containing C++ object files must be created using
8050             # "CC -xar", where "CC" is the Sun C++ compiler.  This is
8051             # necessary to make sure instantiated templates are included
8052             # in the archive.
8053             _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
8054             ;;
8055           gcx*)
8056             # Green Hills C++ Compiler
8057             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
8058
8059             # The C++ compiler must be used to create the archive.
8060             _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
8061             ;;
8062           *)
8063             # GNU C++ compiler with Solaris linker
8064             if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8065               _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
8066               if $CC --version | $GREP -v '^2\.7' > /dev/null; then
8067                 _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'
8068                 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8069                   $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
8070
8071                 # Commands to make compiler produce verbose output that lists
8072                 # what "hidden" libraries, object files and flags are used when
8073                 # linking a shared library.
8074                 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
8075               else
8076                 # g++ 2.7 appears to require `-G' NOT `-shared' on this
8077                 # platform.
8078                 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
8079                 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8080                   $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
8081
8082                 # Commands to make compiler produce verbose output that lists
8083                 # what "hidden" libraries, object files and flags are used when
8084                 # linking a shared library.
8085                 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
8086               fi
8087
8088               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
8089               case $host_os in
8090                 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
8091                 *)
8092                   _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
8093                   ;;
8094               esac
8095             fi
8096             ;;
8097         esac
8098         ;;
8099
8100     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
8101       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
8102       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8103       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8104       runpath_var='LD_RUN_PATH'
8105
8106       case $cc_basename in
8107         CC*)
8108           _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8109           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8110           ;;
8111         *)
8112           _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8113           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8114           ;;
8115       esac
8116       ;;
8117
8118       sysv5* | sco3.2v5* | sco5v6*)
8119         # Note: We can NOT use -z defs as we might desire, because we do not
8120         # link with -lc, and that would cause any symbols used from libc to
8121         # always be unresolved, which means just about no library would
8122         # ever link correctly.  If we're not using GNU ld we use -z text
8123         # though, which does catch some bad symbols but isn't as heavy-handed
8124         # as -z defs.
8125         _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
8126         _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
8127         _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8128         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8129         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
8130         _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
8131         _LT_TAGVAR(link_all_deplibs, $1)=yes
8132         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
8133         runpath_var='LD_RUN_PATH'
8134
8135         case $cc_basename in
8136           CC*)
8137             _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8138             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8139             _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
8140               '"$_LT_TAGVAR(old_archive_cmds, $1)"
8141             _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
8142               '"$_LT_TAGVAR(reload_cmds, $1)"
8143             ;;
8144           *)
8145             _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8146             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8147             ;;
8148         esac
8149       ;;
8150
8151       tandem*)
8152         case $cc_basename in
8153           NCC*)
8154             # NonStop-UX NCC 3.20
8155             # FIXME: insert proper C++ library support
8156             _LT_TAGVAR(ld_shlibs, $1)=no
8157             ;;
8158           *)
8159             # FIXME: insert proper C++ library support
8160             _LT_TAGVAR(ld_shlibs, $1)=no
8161             ;;
8162         esac
8163         ;;
8164
8165       vxworks*)
8166         # FIXME: insert proper C++ library support
8167         _LT_TAGVAR(ld_shlibs, $1)=no
8168         ;;
8169
8170       *)
8171         # FIXME: insert proper C++ library support
8172         _LT_TAGVAR(ld_shlibs, $1)=no
8173         ;;
8174     esac
8175
8176     AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
8177     test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
8178
8179     _LT_TAGVAR(GCC, $1)="$GXX"
8180     _LT_TAGVAR(LD, $1)="$LD"
8181
8182     ## CAVEAT EMPTOR:
8183     ## There is no encapsulation within the following macros, do not change
8184     ## the running order or otherwise move them around unless you know exactly
8185     ## what you are doing...
8186     _LT_SYS_HIDDEN_LIBDEPS($1)
8187     _LT_COMPILER_PIC($1)
8188     _LT_COMPILER_C_O($1)
8189     _LT_COMPILER_FILE_LOCKS($1)
8190     _LT_LINKER_SHLIBS($1)
8191     _LT_SYS_DYNAMIC_LINKER($1)
8192     _LT_LINKER_HARDCODE_LIBPATH($1)
8193
8194     _LT_CONFIG($1)
8195   fi # test -n "$compiler"
8196
8197   CC=$lt_save_CC
8198   CFLAGS=$lt_save_CFLAGS
8199   LDCXX=$LD
8200   LD=$lt_save_LD
8201   GCC=$lt_save_GCC
8202   with_gnu_ld=$lt_save_with_gnu_ld
8203   lt_cv_path_LDCXX=$lt_cv_path_LD
8204   lt_cv_path_LD=$lt_save_path_LD
8205   lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
8206   lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
8207 fi # test "$_lt_caught_CXX_error" != yes
8208
8209 AC_LANG_POP
8210 ])# _LT_LANG_CXX_CONFIG
8211
8212
8213 # _LT_FUNC_STRIPNAME_CNF
8214 # ----------------------
8215 # func_stripname_cnf prefix suffix name
8216 # strip PREFIX and SUFFIX off of NAME.
8217 # PREFIX and SUFFIX must not contain globbing or regex special
8218 # characters, hashes, percent signs, but SUFFIX may contain a leading
8219 # dot (in which case that matches only a dot).
8220 #
8221 # This function is identical to the (non-XSI) version of func_stripname,
8222 # except this one can be used by m4 code that may be executed by configure,
8223 # rather than the libtool script.
8224 m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
8225 AC_REQUIRE([_LT_DECL_SED])
8226 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
8227 func_stripname_cnf ()
8228 {
8229   case ${2} in
8230   .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
8231   *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
8232   esac
8233 } # func_stripname_cnf
8234 ])# _LT_FUNC_STRIPNAME_CNF
8235
8236 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
8237 # ---------------------------------
8238 # Figure out "hidden" library dependencies from verbose
8239 # compiler output when linking a shared library.
8240 # Parse the compiler output and extract the necessary
8241 # objects, libraries and library flags.
8242 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
8243 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
8244 AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
8245 # Dependencies to place before and after the object being linked:
8246 _LT_TAGVAR(predep_objects, $1)=
8247 _LT_TAGVAR(postdep_objects, $1)=
8248 _LT_TAGVAR(predeps, $1)=
8249 _LT_TAGVAR(postdeps, $1)=
8250 _LT_TAGVAR(compiler_lib_search_path, $1)=
8251
8252 dnl we can't use the lt_simple_compile_test_code here,
8253 dnl because it contains code intended for an executable,
8254 dnl not a library.  It's possible we should let each
8255 dnl tag define a new lt_????_link_test_code variable,
8256 dnl but it's only used here...
8257 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
8258 int a;
8259 void foo (void) { a = 0; }
8260 _LT_EOF
8261 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
8262 class Foo
8263 {
8264 public:
8265   Foo (void) { a = 0; }
8266 private:
8267   int a;
8268 };
8269 _LT_EOF
8270 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
8271       subroutine foo
8272       implicit none
8273       integer*4 a
8274       a=0
8275       return
8276       end
8277 _LT_EOF
8278 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
8279       subroutine foo
8280       implicit none
8281       integer a
8282       a=0
8283       return
8284       end
8285 _LT_EOF
8286 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
8287 public class foo {
8288   private int a;
8289   public void bar (void) {
8290     a = 0;
8291   }
8292 };
8293 _LT_EOF
8294 ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
8295 package foo
8296 func foo() {
8297 }
8298 _LT_EOF
8299 ])
8300
8301 _lt_libdeps_save_CFLAGS=$CFLAGS
8302 case "$CC $CFLAGS " in #(
8303 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
8304 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
8305 *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
8306 esac
8307
8308 dnl Parse the compiler output and extract the necessary
8309 dnl objects, libraries and library flags.
8310 if AC_TRY_EVAL(ac_compile); then
8311   # Parse the compiler output and extract the necessary
8312   # objects, libraries and library flags.
8313
8314   # Sentinel used to keep track of whether or not we are before
8315   # the conftest object file.
8316   pre_test_object_deps_done=no
8317
8318   for p in `eval "$output_verbose_link_cmd"`; do
8319     case ${prev}${p} in
8320
8321     -L* | -R* | -l*)
8322        # Some compilers place space between "-{L,R}" and the path.
8323        # Remove the space.
8324        if test $p = "-L" ||
8325           test $p = "-R"; then
8326          prev=$p
8327          continue
8328        fi
8329
8330        # Expand the sysroot to ease extracting the directories later.
8331        if test -z "$prev"; then
8332          case $p in
8333          -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
8334          -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
8335          -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
8336          esac
8337        fi
8338        case $p in
8339        =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
8340        esac
8341        if test "$pre_test_object_deps_done" = no; then
8342          case ${prev} in
8343          -L | -R)
8344            # Internal compiler library paths should come after those
8345            # provided the user.  The postdeps already come after the
8346            # user supplied libs so there is no need to process them.
8347            if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
8348              _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
8349            else
8350              _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
8351            fi
8352            ;;
8353          # The "-l" case would never come before the object being
8354          # linked, so don't bother handling this case.
8355          esac
8356        else
8357          if test -z "$_LT_TAGVAR(postdeps, $1)"; then
8358            _LT_TAGVAR(postdeps, $1)="${prev}${p}"
8359          else
8360            _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
8361          fi
8362        fi
8363        prev=
8364        ;;
8365
8366     *.lto.$objext) ;; # Ignore GCC LTO objects
8367     *.$objext)
8368        # This assumes that the test object file only shows up
8369        # once in the compiler output.
8370        if test "$p" = "conftest.$objext"; then
8371          pre_test_object_deps_done=yes
8372          continue
8373        fi
8374
8375        if test "$pre_test_object_deps_done" = no; then
8376          if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
8377            _LT_TAGVAR(predep_objects, $1)="$p"
8378          else
8379            _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
8380          fi
8381        else
8382          if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
8383            _LT_TAGVAR(postdep_objects, $1)="$p"
8384          else
8385            _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
8386          fi
8387        fi
8388        ;;
8389
8390     *) ;; # Ignore the rest.
8391
8392     esac
8393   done
8394
8395   # Clean up.
8396   rm -f a.out a.exe
8397 else
8398   echo "libtool.m4: error: problem compiling $1 test program"
8399 fi
8400
8401 $RM -f confest.$objext
8402 CFLAGS=$_lt_libdeps_save_CFLAGS
8403
8404 # PORTME: override above test on systems where it is broken
8405 m4_if([$1], [CXX],
8406 [case $host_os in
8407 interix[[3-9]]*)
8408   # Interix 3.5 installs completely hosed .la files for C++, so rather than
8409   # hack all around it, let's just trust "g++" to DTRT.
8410   _LT_TAGVAR(predep_objects,$1)=
8411   _LT_TAGVAR(postdep_objects,$1)=
8412   _LT_TAGVAR(postdeps,$1)=
8413   ;;
8414
8415 linux*)
8416   case `$CC -V 2>&1 | sed 5q` in
8417   *Sun\ C*)
8418     # Sun C++ 5.9
8419
8420     # The more standards-conforming stlport4 library is
8421     # incompatible with the Cstd library. Avoid specifying
8422     # it if it's in CXXFLAGS. Ignore libCrun as
8423     # -library=stlport4 depends on it.
8424     case " $CXX $CXXFLAGS " in
8425     *" -library=stlport4 "*)
8426       solaris_use_stlport4=yes
8427       ;;
8428     esac
8429
8430     if test "$solaris_use_stlport4" != yes; then
8431       _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8432     fi
8433     ;;
8434   esac
8435   ;;
8436
8437 solaris*)
8438   case $cc_basename in
8439   CC* | sunCC*)
8440     # The more standards-conforming stlport4 library is
8441     # incompatible with the Cstd library. Avoid specifying
8442     # it if it's in CXXFLAGS. Ignore libCrun as
8443     # -library=stlport4 depends on it.
8444     case " $CXX $CXXFLAGS " in
8445     *" -library=stlport4 "*)
8446       solaris_use_stlport4=yes
8447       ;;
8448     esac
8449
8450     # Adding this requires a known-good setup of shared libraries for
8451     # Sun compiler versions before 5.6, else PIC objects from an old
8452     # archive will be linked into the output, leading to subtle bugs.
8453     if test "$solaris_use_stlport4" != yes; then
8454       _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8455     fi
8456     ;;
8457   esac
8458   ;;
8459 esac
8460 ])
8461
8462 case " $_LT_TAGVAR(postdeps, $1) " in
8463 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
8464 esac
8465  _LT_TAGVAR(compiler_lib_search_dirs, $1)=
8466 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
8467  _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
8468 fi
8469 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
8470     [The directories searched by this compiler when creating a shared library])
8471 _LT_TAGDECL([], [predep_objects], [1],
8472     [Dependencies to place before and after the objects being linked to
8473     create a shared library])
8474 _LT_TAGDECL([], [postdep_objects], [1])
8475 _LT_TAGDECL([], [predeps], [1])
8476 _LT_TAGDECL([], [postdeps], [1])
8477 _LT_TAGDECL([], [compiler_lib_search_path], [1],
8478     [The library search path used internally by the compiler when linking
8479     a shared library])
8480 ])# _LT_SYS_HIDDEN_LIBDEPS
8481
8482
8483 # _LT_LANG_F77_CONFIG([TAG])
8484 # --------------------------
8485 # Ensure that the configuration variables for a Fortran 77 compiler are
8486 # suitably defined.  These variables are subsequently used by _LT_CONFIG
8487 # to write the compiler configuration to `libtool'.
8488 m4_defun([_LT_LANG_F77_CONFIG],
8489 [AC_LANG_PUSH(Fortran 77)
8490 if test -z "$F77" || test "X$F77" = "Xno"; then
8491   _lt_disable_F77=yes
8492 fi
8493
8494 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8495 _LT_TAGVAR(allow_undefined_flag, $1)=
8496 _LT_TAGVAR(always_export_symbols, $1)=no
8497 _LT_TAGVAR(archive_expsym_cmds, $1)=
8498 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
8499 _LT_TAGVAR(hardcode_direct, $1)=no
8500 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
8501 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8502 _LT_TAGVAR(hardcode_libdir_separator, $1)=
8503 _LT_TAGVAR(hardcode_minus_L, $1)=no
8504 _LT_TAGVAR(hardcode_automatic, $1)=no
8505 _LT_TAGVAR(inherit_rpath, $1)=no
8506 _LT_TAGVAR(module_cmds, $1)=
8507 _LT_TAGVAR(module_expsym_cmds, $1)=
8508 _LT_TAGVAR(link_all_deplibs, $1)=unknown
8509 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8510 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8511 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8512 _LT_TAGVAR(no_undefined_flag, $1)=
8513 _LT_TAGVAR(whole_archive_flag_spec, $1)=
8514 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8515
8516 # Source file extension for f77 test sources.
8517 ac_ext=f
8518
8519 # Object file extension for compiled f77 test sources.
8520 objext=o
8521 _LT_TAGVAR(objext, $1)=$objext
8522
8523 # No sense in running all these tests if we already determined that
8524 # the F77 compiler isn't working.  Some variables (like enable_shared)
8525 # are currently assumed to apply to all compilers on this platform,
8526 # and will be corrupted by setting them based on a non-working compiler.
8527 if test "$_lt_disable_F77" != yes; then
8528   # Code to be used in simple compile tests
8529   lt_simple_compile_test_code="\
8530       subroutine t
8531       return
8532       end
8533 "
8534
8535   # Code to be used in simple link tests
8536   lt_simple_link_test_code="\
8537       program t
8538       end
8539 "
8540
8541   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8542   _LT_TAG_COMPILER
8543
8544   # save warnings/boilerplate of simple test code
8545   _LT_COMPILER_BOILERPLATE
8546   _LT_LINKER_BOILERPLATE
8547
8548   # Allow CC to be a program name with arguments.
8549   lt_save_CC="$CC"
8550   lt_save_GCC=$GCC
8551   lt_save_CFLAGS=$CFLAGS
8552   CC=${F77-"f77"}
8553   CFLAGS=$FFLAGS
8554   compiler=$CC
8555   _LT_TAGVAR(compiler, $1)=$CC
8556   _LT_CC_BASENAME([$compiler])
8557   GCC=$G77
8558   if test -n "$compiler"; then
8559     AC_MSG_CHECKING([if libtool supports shared libraries])
8560     AC_MSG_RESULT([$can_build_shared])
8561
8562     AC_MSG_CHECKING([whether to build shared libraries])
8563     test "$can_build_shared" = "no" && enable_shared=no
8564
8565     # On AIX, shared libraries and static libraries use the same namespace, and
8566     # are all built from PIC.
8567     case $host_os in
8568       aix3*)
8569         test "$enable_shared" = yes && enable_static=no
8570         if test -n "$RANLIB"; then
8571           archive_cmds="$archive_cmds~\$RANLIB \$lib"
8572           postinstall_cmds='$RANLIB $lib'
8573         fi
8574         ;;
8575       aix[[4-9]]*)
8576         if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8577           test "$enable_shared" = yes && enable_static=no
8578         fi
8579         ;;
8580     esac
8581     AC_MSG_RESULT([$enable_shared])
8582
8583     AC_MSG_CHECKING([whether to build static libraries])
8584     # Make sure either enable_shared or enable_static is yes.
8585     test "$enable_shared" = yes || enable_static=yes
8586     AC_MSG_RESULT([$enable_static])
8587
8588     _LT_TAGVAR(GCC, $1)="$G77"
8589     _LT_TAGVAR(LD, $1)="$LD"
8590
8591     ## CAVEAT EMPTOR:
8592     ## There is no encapsulation within the following macros, do not change
8593     ## the running order or otherwise move them around unless you know exactly
8594     ## what you are doing...
8595     _LT_COMPILER_PIC($1)
8596     _LT_COMPILER_C_O($1)
8597     _LT_COMPILER_FILE_LOCKS($1)
8598     _LT_LINKER_SHLIBS($1)
8599     _LT_SYS_DYNAMIC_LINKER($1)
8600     _LT_LINKER_HARDCODE_LIBPATH($1)
8601
8602     _LT_CONFIG($1)
8603   fi # test -n "$compiler"
8604
8605   GCC=$lt_save_GCC
8606   CC="$lt_save_CC"
8607   CFLAGS="$lt_save_CFLAGS"
8608 fi # test "$_lt_disable_F77" != yes
8609
8610 AC_LANG_POP
8611 ])# _LT_LANG_F77_CONFIG
8612
8613
8614 # _LT_LANG_FC_CONFIG([TAG])
8615 # -------------------------
8616 # Ensure that the configuration variables for a Fortran compiler are
8617 # suitably defined.  These variables are subsequently used by _LT_CONFIG
8618 # to write the compiler configuration to `libtool'.
8619 m4_defun([_LT_LANG_FC_CONFIG],
8620 [AC_LANG_PUSH(Fortran)
8621
8622 if test -z "$FC" || test "X$FC" = "Xno"; then
8623   _lt_disable_FC=yes
8624 fi
8625
8626 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8627 _LT_TAGVAR(allow_undefined_flag, $1)=
8628 _LT_TAGVAR(always_export_symbols, $1)=no
8629 _LT_TAGVAR(archive_expsym_cmds, $1)=
8630 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
8631 _LT_TAGVAR(hardcode_direct, $1)=no
8632 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
8633 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8634 _LT_TAGVAR(hardcode_libdir_separator, $1)=
8635 _LT_TAGVAR(hardcode_minus_L, $1)=no
8636 _LT_TAGVAR(hardcode_automatic, $1)=no
8637 _LT_TAGVAR(inherit_rpath, $1)=no
8638 _LT_TAGVAR(module_cmds, $1)=
8639 _LT_TAGVAR(module_expsym_cmds, $1)=
8640 _LT_TAGVAR(link_all_deplibs, $1)=unknown
8641 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8642 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8643 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8644 _LT_TAGVAR(no_undefined_flag, $1)=
8645 _LT_TAGVAR(whole_archive_flag_spec, $1)=
8646 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8647
8648 # Source file extension for fc test sources.
8649 ac_ext=${ac_fc_srcext-f}
8650
8651 # Object file extension for compiled fc test sources.
8652 objext=o
8653 _LT_TAGVAR(objext, $1)=$objext
8654
8655 # No sense in running all these tests if we already determined that
8656 # the FC compiler isn't working.  Some variables (like enable_shared)
8657 # are currently assumed to apply to all compilers on this platform,
8658 # and will be corrupted by setting them based on a non-working compiler.
8659 if test "$_lt_disable_FC" != yes; then
8660   # Code to be used in simple compile tests
8661   lt_simple_compile_test_code="\
8662       subroutine t
8663       return
8664       end
8665 "
8666
8667   # Code to be used in simple link tests
8668   lt_simple_link_test_code="\
8669       program t
8670       end
8671 "
8672
8673   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8674   _LT_TAG_COMPILER
8675
8676   # save warnings/boilerplate of simple test code
8677   _LT_COMPILER_BOILERPLATE
8678   _LT_LINKER_BOILERPLATE
8679
8680   # Allow CC to be a program name with arguments.
8681   lt_save_CC="$CC"
8682   lt_save_GCC=$GCC
8683   lt_save_CFLAGS=$CFLAGS
8684   CC=${FC-"f95"}
8685   CFLAGS=$FCFLAGS
8686   compiler=$CC
8687   GCC=$ac_cv_fc_compiler_gnu
8688
8689   _LT_TAGVAR(compiler, $1)=$CC
8690   _LT_CC_BASENAME([$compiler])
8691
8692   if test -n "$compiler"; then
8693     AC_MSG_CHECKING([if libtool supports shared libraries])
8694     AC_MSG_RESULT([$can_build_shared])
8695
8696     AC_MSG_CHECKING([whether to build shared libraries])
8697     test "$can_build_shared" = "no" && enable_shared=no
8698
8699     # On AIX, shared libraries and static libraries use the same namespace, and
8700     # are all built from PIC.
8701     case $host_os in
8702       aix3*)
8703         test "$enable_shared" = yes && enable_static=no
8704         if test -n "$RANLIB"; then
8705           archive_cmds="$archive_cmds~\$RANLIB \$lib"
8706           postinstall_cmds='$RANLIB $lib'
8707         fi
8708         ;;
8709       aix[[4-9]]*)
8710         if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8711           test "$enable_shared" = yes && enable_static=no
8712         fi
8713         ;;
8714     esac
8715     AC_MSG_RESULT([$enable_shared])
8716
8717     AC_MSG_CHECKING([whether to build static libraries])
8718     # Make sure either enable_shared or enable_static is yes.
8719     test "$enable_shared" = yes || enable_static=yes
8720     AC_MSG_RESULT([$enable_static])
8721
8722     _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
8723     _LT_TAGVAR(LD, $1)="$LD"
8724
8725     ## CAVEAT EMPTOR:
8726     ## There is no encapsulation within the following macros, do not change
8727     ## the running order or otherwise move them around unless you know exactly
8728     ## what you are doing...
8729     _LT_SYS_HIDDEN_LIBDEPS($1)
8730     _LT_COMPILER_PIC($1)
8731     _LT_COMPILER_C_O($1)
8732     _LT_COMPILER_FILE_LOCKS($1)
8733     _LT_LINKER_SHLIBS($1)
8734     _LT_SYS_DYNAMIC_LINKER($1)
8735     _LT_LINKER_HARDCODE_LIBPATH($1)
8736
8737     _LT_CONFIG($1)
8738   fi # test -n "$compiler"
8739
8740   GCC=$lt_save_GCC
8741   CC=$lt_save_CC
8742   CFLAGS=$lt_save_CFLAGS
8743 fi # test "$_lt_disable_FC" != yes
8744
8745 AC_LANG_POP
8746 ])# _LT_LANG_FC_CONFIG
8747
8748
8749 # _LT_LANG_GCJ_CONFIG([TAG])
8750 # --------------------------
8751 # Ensure that the configuration variables for the GNU Java Compiler compiler
8752 # are suitably defined.  These variables are subsequently used by _LT_CONFIG
8753 # to write the compiler configuration to `libtool'.
8754 m4_defun([_LT_LANG_GCJ_CONFIG],
8755 [AC_REQUIRE([LT_PROG_GCJ])dnl
8756 AC_LANG_SAVE
8757
8758 # Source file extension for Java test sources.
8759 ac_ext=java
8760
8761 # Object file extension for compiled Java test sources.
8762 objext=o
8763 _LT_TAGVAR(objext, $1)=$objext
8764
8765 # Code to be used in simple compile tests
8766 lt_simple_compile_test_code="class foo {}"
8767
8768 # Code to be used in simple link tests
8769 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
8770
8771 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8772 _LT_TAG_COMPILER
8773
8774 # save warnings/boilerplate of simple test code
8775 _LT_COMPILER_BOILERPLATE
8776 _LT_LINKER_BOILERPLATE
8777
8778 # Allow CC to be a program name with arguments.
8779 lt_save_CC=$CC
8780 lt_save_CFLAGS=$CFLAGS
8781 lt_save_GCC=$GCC
8782 GCC=yes
8783 CC=${GCJ-"gcj"}
8784 CFLAGS=$GCJFLAGS
8785 compiler=$CC
8786 _LT_TAGVAR(compiler, $1)=$CC
8787 _LT_TAGVAR(LD, $1)="$LD"
8788 _LT_CC_BASENAME([$compiler])
8789
8790 # GCJ did not exist at the time GCC didn't implicitly link libc in.
8791 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8792
8793 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8794 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8795 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8796
8797 if test -n "$compiler"; then
8798   _LT_COMPILER_NO_RTTI($1)
8799   _LT_COMPILER_PIC($1)
8800   _LT_COMPILER_C_O($1)
8801   _LT_COMPILER_FILE_LOCKS($1)
8802   _LT_LINKER_SHLIBS($1)
8803   _LT_LINKER_HARDCODE_LIBPATH($1)
8804
8805   _LT_CONFIG($1)
8806 fi
8807
8808 AC_LANG_RESTORE
8809
8810 GCC=$lt_save_GCC
8811 CC=$lt_save_CC
8812 CFLAGS=$lt_save_CFLAGS
8813 ])# _LT_LANG_GCJ_CONFIG
8814
8815
8816 # _LT_LANG_GO_CONFIG([TAG])
8817 # --------------------------
8818 # Ensure that the configuration variables for the GNU Go compiler
8819 # are suitably defined.  These variables are subsequently used by _LT_CONFIG
8820 # to write the compiler configuration to `libtool'.
8821 m4_defun([_LT_LANG_GO_CONFIG],
8822 [AC_REQUIRE([LT_PROG_GO])dnl
8823 AC_LANG_SAVE
8824
8825 # Source file extension for Go test sources.
8826 ac_ext=go
8827
8828 # Object file extension for compiled Go test sources.
8829 objext=o
8830 _LT_TAGVAR(objext, $1)=$objext
8831
8832 # Code to be used in simple compile tests
8833 lt_simple_compile_test_code="package main; func main() { }"
8834
8835 # Code to be used in simple link tests
8836 lt_simple_link_test_code='package main; func main() { }'
8837
8838 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8839 _LT_TAG_COMPILER
8840
8841 # save warnings/boilerplate of simple test code
8842 _LT_COMPILER_BOILERPLATE
8843 _LT_LINKER_BOILERPLATE
8844
8845 # Allow CC to be a program name with arguments.
8846 lt_save_CC=$CC
8847 lt_save_CFLAGS=$CFLAGS
8848 lt_save_GCC=$GCC
8849 GCC=yes
8850 CC=${GOC-"gccgo"}
8851 CFLAGS=$GOFLAGS
8852 compiler=$CC
8853 _LT_TAGVAR(compiler, $1)=$CC
8854 _LT_TAGVAR(LD, $1)="$LD"
8855 _LT_CC_BASENAME([$compiler])
8856
8857 # Go did not exist at the time GCC didn't implicitly link libc in.
8858 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8859
8860 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8861 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8862 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8863
8864 if test -n "$compiler"; then
8865   _LT_COMPILER_NO_RTTI($1)
8866   _LT_COMPILER_PIC($1)
8867   _LT_COMPILER_C_O($1)
8868   _LT_COMPILER_FILE_LOCKS($1)
8869   _LT_LINKER_SHLIBS($1)
8870   _LT_LINKER_HARDCODE_LIBPATH($1)
8871
8872   _LT_CONFIG($1)
8873 fi
8874
8875 AC_LANG_RESTORE
8876
8877 GCC=$lt_save_GCC
8878 CC=$lt_save_CC
8879 CFLAGS=$lt_save_CFLAGS
8880 ])# _LT_LANG_GO_CONFIG
8881
8882
8883 # _LT_LANG_RC_CONFIG([TAG])
8884 # -------------------------
8885 # Ensure that the configuration variables for the Windows resource compiler
8886 # are suitably defined.  These variables are subsequently used by _LT_CONFIG
8887 # to write the compiler configuration to `libtool'.
8888 m4_defun([_LT_LANG_RC_CONFIG],
8889 [AC_REQUIRE([LT_PROG_RC])dnl
8890 AC_LANG_SAVE
8891
8892 # Source file extension for RC test sources.
8893 ac_ext=rc
8894
8895 # Object file extension for compiled RC test sources.
8896 objext=o
8897 _LT_TAGVAR(objext, $1)=$objext
8898
8899 # Code to be used in simple compile tests
8900 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
8901
8902 # Code to be used in simple link tests
8903 lt_simple_link_test_code="$lt_simple_compile_test_code"
8904
8905 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8906 _LT_TAG_COMPILER
8907
8908 # save warnings/boilerplate of simple test code
8909 _LT_COMPILER_BOILERPLATE
8910 _LT_LINKER_BOILERPLATE
8911
8912 # Allow CC to be a program name with arguments.
8913 lt_save_CC="$CC"
8914 lt_save_CFLAGS=$CFLAGS
8915 lt_save_GCC=$GCC
8916 GCC=
8917 CC=${RC-"windres"}
8918 CFLAGS=
8919 compiler=$CC
8920 _LT_TAGVAR(compiler, $1)=$CC
8921 _LT_CC_BASENAME([$compiler])
8922 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
8923
8924 if test -n "$compiler"; then
8925   :
8926   _LT_CONFIG($1)
8927 fi
8928
8929 GCC=$lt_save_GCC
8930 AC_LANG_RESTORE
8931 CC=$lt_save_CC
8932 CFLAGS=$lt_save_CFLAGS
8933 ])# _LT_LANG_RC_CONFIG
8934
8935
8936 # LT_PROG_GCJ
8937 # -----------
8938 AC_DEFUN([LT_PROG_GCJ],
8939 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
8940   [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
8941     [AC_CHECK_TOOL(GCJ, gcj,)
8942       test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
8943       AC_SUBST(GCJFLAGS)])])[]dnl
8944 ])
8945
8946 # Old name:
8947 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
8948 dnl aclocal-1.4 backwards compatibility:
8949 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
8950
8951
8952 # LT_PROG_GO
8953 # ----------
8954 AC_DEFUN([LT_PROG_GO],
8955 [AC_CHECK_TOOL(GOC, gccgo,)
8956 ])
8957
8958
8959 # LT_PROG_RC
8960 # ----------
8961 AC_DEFUN([LT_PROG_RC],
8962 [AC_CHECK_TOOL(RC, windres,)
8963 ])
8964
8965 # Old name:
8966 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
8967 dnl aclocal-1.4 backwards compatibility:
8968 dnl AC_DEFUN([LT_AC_PROG_RC], [])
8969
8970
8971 # _LT_DECL_EGREP
8972 # --------------
8973 # If we don't have a new enough Autoconf to choose the best grep
8974 # available, choose the one first in the user's PATH.
8975 m4_defun([_LT_DECL_EGREP],
8976 [AC_REQUIRE([AC_PROG_EGREP])dnl
8977 AC_REQUIRE([AC_PROG_FGREP])dnl
8978 test -z "$GREP" && GREP=grep
8979 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
8980 _LT_DECL([], [EGREP], [1], [An ERE matcher])
8981 _LT_DECL([], [FGREP], [1], [A literal string matcher])
8982 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
8983 AC_SUBST([GREP])
8984 ])
8985
8986
8987 # _LT_DECL_OBJDUMP
8988 # --------------
8989 # If we don't have a new enough Autoconf to choose the best objdump
8990 # available, choose the one first in the user's PATH.
8991 m4_defun([_LT_DECL_OBJDUMP],
8992 [AC_CHECK_TOOL(OBJDUMP, objdump, false)
8993 test -z "$OBJDUMP" && OBJDUMP=objdump
8994 _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
8995 AC_SUBST([OBJDUMP])
8996 ])
8997
8998 # _LT_DECL_DLLTOOL
8999 # ----------------
9000 # Ensure DLLTOOL variable is set.
9001 m4_defun([_LT_DECL_DLLTOOL],
9002 [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
9003 test -z "$DLLTOOL" && DLLTOOL=dlltool
9004 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
9005 AC_SUBST([DLLTOOL])
9006 ])
9007
9008 # _LT_DECL_SED
9009 # ------------
9010 # Check for a fully-functional sed program, that truncates
9011 # as few characters as possible.  Prefer GNU sed if found.
9012 m4_defun([_LT_DECL_SED],
9013 [AC_PROG_SED
9014 test -z "$SED" && SED=sed
9015 Xsed="$SED -e 1s/^X//"
9016 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
9017 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
9018     [Sed that helps us avoid accidentally triggering echo(1) options like -n])
9019 ])# _LT_DECL_SED
9020
9021 m4_ifndef([AC_PROG_SED], [
9022 # NOTE: This macro has been submitted for inclusion into   #
9023 #  GNU Autoconf as AC_PROG_SED.  When it is available in   #
9024 #  a released version of Autoconf we should remove this    #
9025 #  macro and use it instead.                               #
9026
9027 m4_defun([AC_PROG_SED],
9028 [AC_MSG_CHECKING([for a sed that does not truncate output])
9029 AC_CACHE_VAL(lt_cv_path_SED,
9030 [# Loop through the user's path and test for sed and gsed.
9031 # Then use that list of sed's as ones to test for truncation.
9032 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9033 for as_dir in $PATH
9034 do
9035   IFS=$as_save_IFS
9036   test -z "$as_dir" && as_dir=.
9037   for lt_ac_prog in sed gsed; do
9038     for ac_exec_ext in '' $ac_executable_extensions; do
9039       if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
9040         lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
9041       fi
9042     done
9043   done
9044 done
9045 IFS=$as_save_IFS
9046 lt_ac_max=0
9047 lt_ac_count=0
9048 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
9049 # along with /bin/sed that truncates output.
9050 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
9051   test ! -f $lt_ac_sed && continue
9052   cat /dev/null > conftest.in
9053   lt_ac_count=0
9054   echo $ECHO_N "0123456789$ECHO_C" >conftest.in
9055   # Check for GNU sed and select it if it is found.
9056   if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
9057     lt_cv_path_SED=$lt_ac_sed
9058     break
9059   fi
9060   while true; do
9061     cat conftest.in conftest.in >conftest.tmp
9062     mv conftest.tmp conftest.in
9063     cp conftest.in conftest.nl
9064     echo >>conftest.nl
9065     $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
9066     cmp -s conftest.out conftest.nl || break
9067     # 10000 chars as input seems more than enough
9068     test $lt_ac_count -gt 10 && break
9069     lt_ac_count=`expr $lt_ac_count + 1`
9070     if test $lt_ac_count -gt $lt_ac_max; then
9071       lt_ac_max=$lt_ac_count
9072       lt_cv_path_SED=$lt_ac_sed
9073     fi
9074   done
9075 done
9076 ])
9077 SED=$lt_cv_path_SED
9078 AC_SUBST([SED])
9079 AC_MSG_RESULT([$SED])
9080 ])#AC_PROG_SED
9081 ])#m4_ifndef
9082
9083 # Old name:
9084 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
9085 dnl aclocal-1.4 backwards compatibility:
9086 dnl AC_DEFUN([LT_AC_PROG_SED], [])
9087
9088
9089 # _LT_CHECK_SHELL_FEATURES
9090 # ------------------------
9091 # Find out whether the shell is Bourne or XSI compatible,
9092 # or has some other useful features.
9093 m4_defun([_LT_CHECK_SHELL_FEATURES],
9094 [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
9095 # Try some XSI features
9096 xsi_shell=no
9097 ( _lt_dummy="a/b/c"
9098   test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
9099       = c,a/b,b/c, \
9100     && eval 'test $(( 1 + 1 )) -eq 2 \
9101     && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
9102   && xsi_shell=yes
9103 AC_MSG_RESULT([$xsi_shell])
9104 _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
9105
9106 AC_MSG_CHECKING([whether the shell understands "+="])
9107 lt_shell_append=no
9108 ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
9109     >/dev/null 2>&1 \
9110   && lt_shell_append=yes
9111 AC_MSG_RESULT([$lt_shell_append])
9112 _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
9113
9114 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
9115   lt_unset=unset
9116 else
9117   lt_unset=false
9118 fi
9119 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
9120
9121 # test EBCDIC or ASCII
9122 case `echo X|tr X '\101'` in
9123  A) # ASCII based system
9124     # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
9125   lt_SP2NL='tr \040 \012'
9126   lt_NL2SP='tr \015\012 \040\040'
9127   ;;
9128  *) # EBCDIC based system
9129   lt_SP2NL='tr \100 \n'
9130   lt_NL2SP='tr \r\n \100\100'
9131   ;;
9132 esac
9133 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
9134 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
9135 ])# _LT_CHECK_SHELL_FEATURES
9136
9137
9138 # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
9139 # ------------------------------------------------------
9140 # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
9141 # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
9142 m4_defun([_LT_PROG_FUNCTION_REPLACE],
9143 [dnl {
9144 sed -e '/^$1 ()$/,/^} # $1 /c\
9145 $1 ()\
9146 {\
9147 m4_bpatsubsts([$2], [$], [\\], [^\([     ]\)], [\\\1])
9148 } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
9149   && mv -f "$cfgfile.tmp" "$cfgfile" \
9150     || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
9151 test 0 -eq $? || _lt_function_replace_fail=:
9152 ])
9153
9154
9155 # _LT_PROG_REPLACE_SHELLFNS
9156 # -------------------------
9157 # Replace existing portable implementations of several shell functions with
9158 # equivalent extended shell implementations where those features are available..
9159 m4_defun([_LT_PROG_REPLACE_SHELLFNS],
9160 [if test x"$xsi_shell" = xyes; then
9161   _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
9162     case ${1} in
9163       */*) func_dirname_result="${1%/*}${2}" ;;
9164       *  ) func_dirname_result="${3}" ;;
9165     esac])
9166
9167   _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
9168     func_basename_result="${1##*/}"])
9169
9170   _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
9171     case ${1} in
9172       */*) func_dirname_result="${1%/*}${2}" ;;
9173       *  ) func_dirname_result="${3}" ;;
9174     esac
9175     func_basename_result="${1##*/}"])
9176
9177   _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
9178     # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
9179     # positional parameters, so assign one to ordinary parameter first.
9180     func_stripname_result=${3}
9181     func_stripname_result=${func_stripname_result#"${1}"}
9182     func_stripname_result=${func_stripname_result%"${2}"}])
9183
9184   _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
9185     func_split_long_opt_name=${1%%=*}
9186     func_split_long_opt_arg=${1#*=}])
9187
9188   _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
9189     func_split_short_opt_arg=${1#??}
9190     func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
9191
9192   _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
9193     case ${1} in
9194       *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
9195       *)    func_lo2o_result=${1} ;;
9196     esac])
9197
9198   _LT_PROG_FUNCTION_REPLACE([func_xform], [    func_xform_result=${1%.*}.lo])
9199
9200   _LT_PROG_FUNCTION_REPLACE([func_arith], [    func_arith_result=$(( $[*] ))])
9201
9202   _LT_PROG_FUNCTION_REPLACE([func_len], [    func_len_result=${#1}])
9203 fi
9204
9205 if test x"$lt_shell_append" = xyes; then
9206   _LT_PROG_FUNCTION_REPLACE([func_append], [    eval "${1}+=\\${2}"])
9207
9208   _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
9209     func_quote_for_eval "${2}"
9210 dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
9211     eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
9212
9213   # Save a `func_append' function call where possible by direct use of '+='
9214   sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
9215     && mv -f "$cfgfile.tmp" "$cfgfile" \
9216       || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
9217   test 0 -eq $? || _lt_function_replace_fail=:
9218 else
9219   # Save a `func_append' function call even when '+=' is not available
9220   sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
9221     && mv -f "$cfgfile.tmp" "$cfgfile" \
9222       || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
9223   test 0 -eq $? || _lt_function_replace_fail=:
9224 fi
9225
9226 if test x"$_lt_function_replace_fail" = x":"; then
9227   AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
9228 fi
9229 ])
9230
9231 # _LT_PATH_CONVERSION_FUNCTIONS
9232 # -----------------------------
9233 # Determine which file name conversion functions should be used by
9234 # func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
9235 # for certain cross-compile configurations and native mingw.
9236 m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
9237 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
9238 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
9239 AC_MSG_CHECKING([how to convert $build file names to $host format])
9240 AC_CACHE_VAL(lt_cv_to_host_file_cmd,
9241 [case $host in
9242   *-*-mingw* )
9243     case $build in
9244       *-*-mingw* ) # actually msys
9245         lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
9246         ;;
9247       *-*-cygwin* )
9248         lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
9249         ;;
9250       * ) # otherwise, assume *nix
9251         lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
9252         ;;
9253     esac
9254     ;;
9255   *-*-cygwin* )
9256     case $build in
9257       *-*-mingw* ) # actually msys
9258         lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
9259         ;;
9260       *-*-cygwin* )
9261         lt_cv_to_host_file_cmd=func_convert_file_noop
9262         ;;
9263       * ) # otherwise, assume *nix
9264         lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
9265         ;;
9266     esac
9267     ;;
9268   * ) # unhandled hosts (and "normal" native builds)
9269     lt_cv_to_host_file_cmd=func_convert_file_noop
9270     ;;
9271 esac
9272 ])
9273 to_host_file_cmd=$lt_cv_to_host_file_cmd
9274 AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
9275 _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
9276          [0], [convert $build file names to $host format])dnl
9277
9278 AC_MSG_CHECKING([how to convert $build file names to toolchain format])
9279 AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
9280 [#assume ordinary cross tools, or native build.
9281 lt_cv_to_tool_file_cmd=func_convert_file_noop
9282 case $host in
9283   *-*-mingw* )
9284     case $build in
9285       *-*-mingw* ) # actually msys
9286         lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
9287         ;;
9288     esac
9289     ;;
9290 esac
9291 ])
9292 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
9293 AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
9294 _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
9295          [0], [convert $build files to toolchain format])dnl
9296 ])# _LT_PATH_CONVERSION_FUNCTIONS
9297
9298 # Helper functions for option handling.                    -*- Autoconf -*-
9299 #
9300 #   Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
9301 #   Inc.
9302 #   Written by Gary V. Vaughan, 2004
9303 #
9304 # This file is free software; the Free Software Foundation gives
9305 # unlimited permission to copy and/or distribute it, with or without
9306 # modifications, as long as this notice is preserved.
9307
9308 # serial 7 ltoptions.m4
9309
9310 # This is to help aclocal find these macros, as it can't see m4_define.
9311 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
9312
9313
9314 # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
9315 # ------------------------------------------
9316 m4_define([_LT_MANGLE_OPTION],
9317 [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
9318
9319
9320 # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
9321 # ---------------------------------------
9322 # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
9323 # matching handler defined, dispatch to it.  Other OPTION-NAMEs are
9324 # saved as a flag.
9325 m4_define([_LT_SET_OPTION],
9326 [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
9327 m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
9328         _LT_MANGLE_DEFUN([$1], [$2]),
9329     [m4_warning([Unknown $1 option `$2'])])[]dnl
9330 ])
9331
9332
9333 # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
9334 # ------------------------------------------------------------
9335 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
9336 m4_define([_LT_IF_OPTION],
9337 [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
9338
9339
9340 # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
9341 # -------------------------------------------------------
9342 # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
9343 # are set.
9344 m4_define([_LT_UNLESS_OPTIONS],
9345 [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9346             [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
9347                       [m4_define([$0_found])])])[]dnl
9348 m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
9349 ])[]dnl
9350 ])
9351
9352
9353 # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
9354 # ----------------------------------------
9355 # OPTION-LIST is a space-separated list of Libtool options associated
9356 # with MACRO-NAME.  If any OPTION has a matching handler declared with
9357 # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
9358 # the unknown option and exit.
9359 m4_defun([_LT_SET_OPTIONS],
9360 [# Set options
9361 m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9362     [_LT_SET_OPTION([$1], _LT_Option)])
9363
9364 m4_if([$1],[LT_INIT],[
9365   dnl
9366   dnl Simply set some default values (i.e off) if boolean options were not
9367   dnl specified:
9368   _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
9369   ])
9370   _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
9371   ])
9372   dnl
9373   dnl If no reference was made to various pairs of opposing options, then
9374   dnl we run the default mode handler for the pair.  For example, if neither
9375   dnl `shared' nor `disable-shared' was passed, we enable building of shared
9376   dnl archives by default:
9377   _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
9378   _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
9379   _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
9380   _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
9381                    [_LT_ENABLE_FAST_INSTALL])
9382   ])
9383 ])# _LT_SET_OPTIONS
9384
9385
9386
9387 # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
9388 # -----------------------------------------
9389 m4_define([_LT_MANGLE_DEFUN],
9390 [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
9391
9392
9393 # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
9394 # -----------------------------------------------
9395 m4_define([LT_OPTION_DEFINE],
9396 [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
9397 ])# LT_OPTION_DEFINE
9398
9399
9400 # dlopen
9401 # ------
9402 LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
9403 ])
9404
9405 AU_DEFUN([AC_LIBTOOL_DLOPEN],
9406 [_LT_SET_OPTION([LT_INIT], [dlopen])
9407 AC_DIAGNOSE([obsolete],
9408 [$0: Remove this warning and the call to _LT_SET_OPTION when you
9409 put the `dlopen' option into LT_INIT's first parameter.])
9410 ])
9411
9412 dnl aclocal-1.4 backwards compatibility:
9413 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
9414
9415
9416 # win32-dll
9417 # ---------
9418 # Declare package support for building win32 dll's.
9419 LT_OPTION_DEFINE([LT_INIT], [win32-dll],
9420 [enable_win32_dll=yes
9421
9422 case $host in
9423 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
9424   AC_CHECK_TOOL(AS, as, false)
9425   AC_CHECK_TOOL(DLLTOOL, dlltool, false)
9426   AC_CHECK_TOOL(OBJDUMP, objdump, false)
9427   ;;
9428 esac
9429
9430 test -z "$AS" && AS=as
9431 _LT_DECL([], [AS],      [1], [Assembler program])dnl
9432
9433 test -z "$DLLTOOL" && DLLTOOL=dlltool
9434 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
9435
9436 test -z "$OBJDUMP" && OBJDUMP=objdump
9437 _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
9438 ])# win32-dll
9439
9440 AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
9441 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
9442 _LT_SET_OPTION([LT_INIT], [win32-dll])
9443 AC_DIAGNOSE([obsolete],
9444 [$0: Remove this warning and the call to _LT_SET_OPTION when you
9445 put the `win32-dll' option into LT_INIT's first parameter.])
9446 ])
9447
9448 dnl aclocal-1.4 backwards compatibility:
9449 dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
9450
9451
9452 # _LT_ENABLE_SHARED([DEFAULT])
9453 # ----------------------------
9454 # implement the --enable-shared flag, and supports the `shared' and
9455 # `disable-shared' LT_INIT options.
9456 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9457 m4_define([_LT_ENABLE_SHARED],
9458 [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
9459 AC_ARG_ENABLE([shared],
9460     [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
9461         [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
9462     [p=${PACKAGE-default}
9463     case $enableval in
9464     yes) enable_shared=yes ;;
9465     no) enable_shared=no ;;
9466     *)
9467       enable_shared=no
9468       # Look at the argument we got.  We use all the common list separators.
9469       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9470       for pkg in $enableval; do
9471         IFS="$lt_save_ifs"
9472         if test "X$pkg" = "X$p"; then
9473           enable_shared=yes
9474         fi
9475       done
9476       IFS="$lt_save_ifs"
9477       ;;
9478     esac],
9479     [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
9480
9481     _LT_DECL([build_libtool_libs], [enable_shared], [0],
9482         [Whether or not to build shared libraries])
9483 ])# _LT_ENABLE_SHARED
9484
9485 LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
9486 LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
9487
9488 # Old names:
9489 AC_DEFUN([AC_ENABLE_SHARED],
9490 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
9491 ])
9492
9493 AC_DEFUN([AC_DISABLE_SHARED],
9494 [_LT_SET_OPTION([LT_INIT], [disable-shared])
9495 ])
9496
9497 AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
9498 AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
9499
9500 dnl aclocal-1.4 backwards compatibility:
9501 dnl AC_DEFUN([AM_ENABLE_SHARED], [])
9502 dnl AC_DEFUN([AM_DISABLE_SHARED], [])
9503
9504
9505
9506 # _LT_ENABLE_STATIC([DEFAULT])
9507 # ----------------------------
9508 # implement the --enable-static flag, and support the `static' and
9509 # `disable-static' LT_INIT options.
9510 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9511 m4_define([_LT_ENABLE_STATIC],
9512 [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
9513 AC_ARG_ENABLE([static],
9514     [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
9515         [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
9516     [p=${PACKAGE-default}
9517     case $enableval in
9518     yes) enable_static=yes ;;
9519     no) enable_static=no ;;
9520     *)
9521      enable_static=no
9522       # Look at the argument we got.  We use all the common list separators.
9523       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9524       for pkg in $enableval; do
9525         IFS="$lt_save_ifs"
9526         if test "X$pkg" = "X$p"; then
9527           enable_static=yes
9528         fi
9529       done
9530       IFS="$lt_save_ifs"
9531       ;;
9532     esac],
9533     [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
9534
9535     _LT_DECL([build_old_libs], [enable_static], [0],
9536         [Whether or not to build static libraries])
9537 ])# _LT_ENABLE_STATIC
9538
9539 LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
9540 LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
9541
9542 # Old names:
9543 AC_DEFUN([AC_ENABLE_STATIC],
9544 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
9545 ])
9546
9547 AC_DEFUN([AC_DISABLE_STATIC],
9548 [_LT_SET_OPTION([LT_INIT], [disable-static])
9549 ])
9550
9551 AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
9552 AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
9553
9554 dnl aclocal-1.4 backwards compatibility:
9555 dnl AC_DEFUN([AM_ENABLE_STATIC], [])
9556 dnl AC_DEFUN([AM_DISABLE_STATIC], [])
9557
9558
9559
9560 # _LT_ENABLE_FAST_INSTALL([DEFAULT])
9561 # ----------------------------------
9562 # implement the --enable-fast-install flag, and support the `fast-install'
9563 # and `disable-fast-install' LT_INIT options.
9564 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9565 m4_define([_LT_ENABLE_FAST_INSTALL],
9566 [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
9567 AC_ARG_ENABLE([fast-install],
9568     [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
9569     [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
9570     [p=${PACKAGE-default}
9571     case $enableval in
9572     yes) enable_fast_install=yes ;;
9573     no) enable_fast_install=no ;;
9574     *)
9575       enable_fast_install=no
9576       # Look at the argument we got.  We use all the common list separators.
9577       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9578       for pkg in $enableval; do
9579         IFS="$lt_save_ifs"
9580         if test "X$pkg" = "X$p"; then
9581           enable_fast_install=yes
9582         fi
9583       done
9584       IFS="$lt_save_ifs"
9585       ;;
9586     esac],
9587     [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
9588
9589 _LT_DECL([fast_install], [enable_fast_install], [0],
9590          [Whether or not to optimize for fast installation])dnl
9591 ])# _LT_ENABLE_FAST_INSTALL
9592
9593 LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
9594 LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
9595
9596 # Old names:
9597 AU_DEFUN([AC_ENABLE_FAST_INSTALL],
9598 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
9599 AC_DIAGNOSE([obsolete],
9600 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
9601 the `fast-install' option into LT_INIT's first parameter.])
9602 ])
9603
9604 AU_DEFUN([AC_DISABLE_FAST_INSTALL],
9605 [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
9606 AC_DIAGNOSE([obsolete],
9607 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
9608 the `disable-fast-install' option into LT_INIT's first parameter.])
9609 ])
9610
9611 dnl aclocal-1.4 backwards compatibility:
9612 dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
9613 dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
9614
9615
9616 # _LT_WITH_PIC([MODE])
9617 # --------------------
9618 # implement the --with-pic flag, and support the `pic-only' and `no-pic'
9619 # LT_INIT options.
9620 # MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
9621 m4_define([_LT_WITH_PIC],
9622 [AC_ARG_WITH([pic],
9623     [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
9624         [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
9625     [lt_p=${PACKAGE-default}
9626     case $withval in
9627     yes|no) pic_mode=$withval ;;
9628     *)
9629       pic_mode=default
9630       # Look at the argument we got.  We use all the common list separators.
9631       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9632       for lt_pkg in $withval; do
9633         IFS="$lt_save_ifs"
9634         if test "X$lt_pkg" = "X$lt_p"; then
9635           pic_mode=yes
9636         fi
9637       done
9638       IFS="$lt_save_ifs"
9639       ;;
9640     esac],
9641     [pic_mode=default])
9642
9643 test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
9644
9645 _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
9646 ])# _LT_WITH_PIC
9647
9648 LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
9649 LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
9650
9651 # Old name:
9652 AU_DEFUN([AC_LIBTOOL_PICMODE],
9653 [_LT_SET_OPTION([LT_INIT], [pic-only])
9654 AC_DIAGNOSE([obsolete],
9655 [$0: Remove this warning and the call to _LT_SET_OPTION when you
9656 put the `pic-only' option into LT_INIT's first parameter.])
9657 ])
9658
9659 dnl aclocal-1.4 backwards compatibility:
9660 dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
9661
9662
9663 m4_define([_LTDL_MODE], [])
9664 LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
9665                  [m4_define([_LTDL_MODE], [nonrecursive])])
9666 LT_OPTION_DEFINE([LTDL_INIT], [recursive],
9667                  [m4_define([_LTDL_MODE], [recursive])])
9668 LT_OPTION_DEFINE([LTDL_INIT], [subproject],
9669                  [m4_define([_LTDL_MODE], [subproject])])
9670
9671 m4_define([_LTDL_TYPE], [])
9672 LT_OPTION_DEFINE([LTDL_INIT], [installable],
9673                  [m4_define([_LTDL_TYPE], [installable])])
9674 LT_OPTION_DEFINE([LTDL_INIT], [convenience],
9675                  [m4_define([_LTDL_TYPE], [convenience])])
9676
9677 # ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
9678 #
9679 # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
9680 # Written by Gary V. Vaughan, 2004
9681 #
9682 # This file is free software; the Free Software Foundation gives
9683 # unlimited permission to copy and/or distribute it, with or without
9684 # modifications, as long as this notice is preserved.
9685
9686 # serial 6 ltsugar.m4
9687
9688 # This is to help aclocal find these macros, as it can't see m4_define.
9689 AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
9690
9691
9692 # lt_join(SEP, ARG1, [ARG2...])
9693 # -----------------------------
9694 # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
9695 # associated separator.
9696 # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
9697 # versions in m4sugar had bugs.
9698 m4_define([lt_join],
9699 [m4_if([$#], [1], [],
9700        [$#], [2], [[$2]],
9701        [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
9702 m4_define([_lt_join],
9703 [m4_if([$#$2], [2], [],
9704        [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
9705
9706
9707 # lt_car(LIST)
9708 # lt_cdr(LIST)
9709 # ------------
9710 # Manipulate m4 lists.
9711 # These macros are necessary as long as will still need to support
9712 # Autoconf-2.59 which quotes differently.
9713 m4_define([lt_car], [[$1]])
9714 m4_define([lt_cdr],
9715 [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
9716        [$#], 1, [],
9717        [m4_dquote(m4_shift($@))])])
9718 m4_define([lt_unquote], $1)
9719
9720
9721 # lt_append(MACRO-NAME, STRING, [SEPARATOR])
9722 # ------------------------------------------
9723 # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
9724 # Note that neither SEPARATOR nor STRING are expanded; they are appended
9725 # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
9726 # No SEPARATOR is output if MACRO-NAME was previously undefined (different
9727 # than defined and empty).
9728 #
9729 # This macro is needed until we can rely on Autoconf 2.62, since earlier
9730 # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
9731 m4_define([lt_append],
9732 [m4_define([$1],
9733            m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
9734
9735
9736
9737 # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
9738 # ----------------------------------------------------------
9739 # Produce a SEP delimited list of all paired combinations of elements of
9740 # PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
9741 # has the form PREFIXmINFIXSUFFIXn.
9742 # Needed until we can rely on m4_combine added in Autoconf 2.62.
9743 m4_define([lt_combine],
9744 [m4_if(m4_eval([$# > 3]), [1],
9745        [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
9746 [[m4_foreach([_Lt_prefix], [$2],
9747              [m4_foreach([_Lt_suffix],
9748                 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
9749         [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
9750
9751
9752 # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
9753 # -----------------------------------------------------------------------
9754 # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
9755 # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
9756 m4_define([lt_if_append_uniq],
9757 [m4_ifdef([$1],
9758           [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
9759                  [lt_append([$1], [$2], [$3])$4],
9760                  [$5])],
9761           [lt_append([$1], [$2], [$3])$4])])
9762
9763
9764 # lt_dict_add(DICT, KEY, VALUE)
9765 # -----------------------------
9766 m4_define([lt_dict_add],
9767 [m4_define([$1($2)], [$3])])
9768
9769
9770 # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
9771 # --------------------------------------------
9772 m4_define([lt_dict_add_subkey],
9773 [m4_define([$1($2:$3)], [$4])])
9774
9775
9776 # lt_dict_fetch(DICT, KEY, [SUBKEY])
9777 # ----------------------------------
9778 m4_define([lt_dict_fetch],
9779 [m4_ifval([$3],
9780         m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
9781     m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
9782
9783
9784 # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
9785 # -----------------------------------------------------------------
9786 m4_define([lt_if_dict_fetch],
9787 [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
9788         [$5],
9789     [$6])])
9790
9791
9792 # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
9793 # --------------------------------------------------------------
9794 m4_define([lt_dict_filter],
9795 [m4_if([$5], [], [],
9796   [lt_join(m4_quote(m4_default([$4], [[, ]])),
9797            lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
9798                       [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
9799 ])
9800
9801 # ltversion.m4 -- version numbers                       -*- Autoconf -*-
9802 #
9803 #   Copyright (C) 2004 Free Software Foundation, Inc.
9804 #   Written by Scott James Remnant, 2004
9805 #
9806 # This file is free software; the Free Software Foundation gives
9807 # unlimited permission to copy and/or distribute it, with or without
9808 # modifications, as long as this notice is preserved.
9809
9810 # @configure_input@
9811
9812 # serial 3337 ltversion.m4
9813 # This file is part of GNU Libtool
9814
9815 m4_define([LT_PACKAGE_VERSION], [2.4.2])
9816 m4_define([LT_PACKAGE_REVISION], [1.3337])
9817
9818 AC_DEFUN([LTVERSION_VERSION],
9819 [macro_version='2.4.2'
9820 macro_revision='1.3337'
9821 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
9822 _LT_DECL(, macro_revision, 0)
9823 ])
9824
9825 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
9826 #
9827 #   Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
9828 #   Written by Scott James Remnant, 2004.
9829 #
9830 # This file is free software; the Free Software Foundation gives
9831 # unlimited permission to copy and/or distribute it, with or without
9832 # modifications, as long as this notice is preserved.
9833
9834 # serial 5 lt~obsolete.m4
9835
9836 # These exist entirely to fool aclocal when bootstrapping libtool.
9837 #
9838 # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
9839 # which have later been changed to m4_define as they aren't part of the
9840 # exported API, or moved to Autoconf or Automake where they belong.
9841 #
9842 # The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
9843 # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
9844 # using a macro with the same name in our local m4/libtool.m4 it'll
9845 # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
9846 # and doesn't know about Autoconf macros at all.)
9847 #
9848 # So we provide this file, which has a silly filename so it's always
9849 # included after everything else.  This provides aclocal with the
9850 # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
9851 # because those macros already exist, or will be overwritten later.
9852 # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
9853 #
9854 # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
9855 # Yes, that means every name once taken will need to remain here until
9856 # we give up compatibility with versions before 1.7, at which point
9857 # we need to keep only those names which we still refer to.
9858
9859 # This is to help aclocal find these macros, as it can't see m4_define.
9860 AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
9861
9862 m4_ifndef([AC_LIBTOOL_LINKER_OPTION],   [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
9863 m4_ifndef([AC_PROG_EGREP],              [AC_DEFUN([AC_PROG_EGREP])])
9864 m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
9865 m4_ifndef([_LT_AC_SHELL_INIT],          [AC_DEFUN([_LT_AC_SHELL_INIT])])
9866 m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],     [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
9867 m4_ifndef([_LT_PROG_LTMAIN],            [AC_DEFUN([_LT_PROG_LTMAIN])])
9868 m4_ifndef([_LT_AC_TAGVAR],              [AC_DEFUN([_LT_AC_TAGVAR])])
9869 m4_ifndef([AC_LTDL_ENABLE_INSTALL],     [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
9870 m4_ifndef([AC_LTDL_PREOPEN],            [AC_DEFUN([AC_LTDL_PREOPEN])])
9871 m4_ifndef([_LT_AC_SYS_COMPILER],        [AC_DEFUN([_LT_AC_SYS_COMPILER])])
9872 m4_ifndef([_LT_AC_LOCK],                [AC_DEFUN([_LT_AC_LOCK])])
9873 m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
9874 m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],     [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
9875 m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],     [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
9876 m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
9877 m4_ifndef([AC_LIBTOOL_OBJDIR],          [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
9878 m4_ifndef([AC_LTDL_OBJDIR],             [AC_DEFUN([AC_LTDL_OBJDIR])])
9879 m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
9880 m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],   [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
9881 m4_ifndef([AC_PATH_MAGIC],              [AC_DEFUN([AC_PATH_MAGIC])])
9882 m4_ifndef([AC_PROG_LD_GNU],             [AC_DEFUN([AC_PROG_LD_GNU])])
9883 m4_ifndef([AC_PROG_LD_RELOAD_FLAG],     [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
9884 m4_ifndef([AC_DEPLIBS_CHECK_METHOD],    [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
9885 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
9886 m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
9887 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
9888 m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],  [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
9889 m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],  [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
9890 m4_ifndef([LT_AC_PROG_EGREP],           [AC_DEFUN([LT_AC_PROG_EGREP])])
9891 m4_ifndef([LT_AC_PROG_SED],             [AC_DEFUN([LT_AC_PROG_SED])])
9892 m4_ifndef([_LT_CC_BASENAME],            [AC_DEFUN([_LT_CC_BASENAME])])
9893 m4_ifndef([_LT_COMPILER_BOILERPLATE],   [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
9894 m4_ifndef([_LT_LINKER_BOILERPLATE],     [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
9895 m4_ifndef([_AC_PROG_LIBTOOL],           [AC_DEFUN([_AC_PROG_LIBTOOL])])
9896 m4_ifndef([AC_LIBTOOL_SETUP],           [AC_DEFUN([AC_LIBTOOL_SETUP])])
9897 m4_ifndef([_LT_AC_CHECK_DLFCN],         [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
9898 m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],      [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
9899 m4_ifndef([_LT_AC_TAGCONFIG],           [AC_DEFUN([_LT_AC_TAGCONFIG])])
9900 m4_ifndef([AC_DISABLE_FAST_INSTALL],    [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
9901 m4_ifndef([_LT_AC_LANG_CXX],            [AC_DEFUN([_LT_AC_LANG_CXX])])
9902 m4_ifndef([_LT_AC_LANG_F77],            [AC_DEFUN([_LT_AC_LANG_F77])])
9903 m4_ifndef([_LT_AC_LANG_GCJ],            [AC_DEFUN([_LT_AC_LANG_GCJ])])
9904 m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],   [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
9905 m4_ifndef([_LT_AC_LANG_C_CONFIG],       [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
9906 m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
9907 m4_ifndef([_LT_AC_LANG_CXX_CONFIG],     [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
9908 m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
9909 m4_ifndef([_LT_AC_LANG_F77_CONFIG],     [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
9910 m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
9911 m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],     [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
9912 m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],  [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
9913 m4_ifndef([_LT_AC_LANG_RC_CONFIG],      [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
9914 m4_ifndef([AC_LIBTOOL_CONFIG],          [AC_DEFUN([AC_LIBTOOL_CONFIG])])
9915 m4_ifndef([_LT_AC_FILE_LTDLL_C],        [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
9916 m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
9917 m4_ifndef([_LT_AC_PROG_CXXCPP],         [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
9918 m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
9919 m4_ifndef([_LT_PROG_ECHO_BACKSLASH],    [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
9920 m4_ifndef([_LT_PROG_F77],               [AC_DEFUN([_LT_PROG_F77])])
9921 m4_ifndef([_LT_PROG_FC],                [AC_DEFUN([_LT_PROG_FC])])
9922 m4_ifndef([_LT_PROG_CXX],               [AC_DEFUN([_LT_PROG_CXX])])
9923
9924 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
9925 # serial 1 (pkg-config-0.24)
9926
9927 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
9928 #
9929 # This program is free software; you can redistribute it and/or modify
9930 # it under the terms of the GNU General Public License as published by
9931 # the Free Software Foundation; either version 2 of the License, or
9932 # (at your option) any later version.
9933 #
9934 # This program is distributed in the hope that it will be useful, but
9935 # WITHOUT ANY WARRANTY; without even the implied warranty of
9936 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
9937 # General Public License for more details.
9938 #
9939 # You should have received a copy of the GNU General Public License
9940 # along with this program; if not, write to the Free Software
9941 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
9942 #
9943 # As a special exception to the GNU General Public License, if you
9944 # distribute this file as part of a program that contains a
9945 # configuration script generated by Autoconf, you may include it under
9946 # the same distribution terms that you use for the rest of that program.
9947
9948 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
9949 # ----------------------------------
9950 AC_DEFUN([PKG_PROG_PKG_CONFIG],
9951 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
9952 m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
9953 m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
9954 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
9955 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
9956 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
9957
9958 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9959         AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
9960 fi
9961 if test -n "$PKG_CONFIG"; then
9962         _pkg_min_version=m4_default([$1], [0.9.0])
9963         AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
9964         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9965                 AC_MSG_RESULT([yes])
9966         else
9967                 AC_MSG_RESULT([no])
9968                 PKG_CONFIG=""
9969         fi
9970 fi[]dnl
9971 ])# PKG_PROG_PKG_CONFIG
9972
9973 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
9974 #
9975 # Check to see whether a particular set of modules exists.  Similar
9976 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
9977 #
9978 # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9979 # only at the first occurence in configure.ac, so if the first place
9980 # it's called might be skipped (such as if it is within an "if", you
9981 # have to call PKG_CHECK_EXISTS manually
9982 # --------------------------------------------------------------
9983 AC_DEFUN([PKG_CHECK_EXISTS],
9984 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9985 if test -n "$PKG_CONFIG" && \
9986     AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
9987   m4_default([$2], [:])
9988 m4_ifvaln([$3], [else
9989   $3])dnl
9990 fi])
9991
9992 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
9993 # ---------------------------------------------
9994 m4_define([_PKG_CONFIG],
9995 [if test -n "$$1"; then
9996     pkg_cv_[]$1="$$1"
9997  elif test -n "$PKG_CONFIG"; then
9998     PKG_CHECK_EXISTS([$3],
9999                      [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
10000                       test "x$?" != "x0" && pkg_failed=yes ],
10001                      [pkg_failed=yes])
10002  else
10003     pkg_failed=untried
10004 fi[]dnl
10005 ])# _PKG_CONFIG
10006
10007 # _PKG_SHORT_ERRORS_SUPPORTED
10008 # -----------------------------
10009 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
10010 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
10011 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
10012         _pkg_short_errors_supported=yes
10013 else
10014         _pkg_short_errors_supported=no
10015 fi[]dnl
10016 ])# _PKG_SHORT_ERRORS_SUPPORTED
10017
10018
10019 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
10020 # [ACTION-IF-NOT-FOUND])
10021 #
10022 #
10023 # Note that if there is a possibility the first call to
10024 # PKG_CHECK_MODULES might not happen, you should be sure to include an
10025 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
10026 #
10027 #
10028 # --------------------------------------------------------------
10029 AC_DEFUN([PKG_CHECK_MODULES],
10030 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
10031 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
10032 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
10033
10034 pkg_failed=no
10035 AC_MSG_CHECKING([for $1])
10036
10037 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
10038 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
10039
10040 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
10041 and $1[]_LIBS to avoid the need to call pkg-config.
10042 See the pkg-config man page for more details.])
10043
10044 if test $pkg_failed = yes; then
10045         AC_MSG_RESULT([no])
10046         _PKG_SHORT_ERRORS_SUPPORTED
10047         if test $_pkg_short_errors_supported = yes; then
10048                 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
10049         else 
10050                 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
10051         fi
10052         # Put the nasty error message in config.log where it belongs
10053         echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
10054
10055         m4_default([$4], [AC_MSG_ERROR(
10056 [Package requirements ($2) were not met:
10057
10058 $$1_PKG_ERRORS
10059
10060 Consider adjusting the PKG_CONFIG_PATH environment variable if you
10061 installed software in a non-standard prefix.
10062
10063 _PKG_TEXT])[]dnl
10064         ])
10065 elif test $pkg_failed = untried; then
10066         AC_MSG_RESULT([no])
10067         m4_default([$4], [AC_MSG_FAILURE(
10068 [The pkg-config script could not be found or is too old.  Make sure it
10069 is in your PATH or set the PKG_CONFIG environment variable to the full
10070 path to pkg-config.
10071
10072 _PKG_TEXT
10073
10074 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
10075         ])
10076 else
10077         $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
10078         $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
10079         AC_MSG_RESULT([yes])
10080         $3
10081 fi[]dnl
10082 ])# PKG_CHECK_MODULES
10083
10084
10085 # PKG_INSTALLDIR(DIRECTORY)
10086 # -------------------------
10087 # Substitutes the variable pkgconfigdir as the location where a module
10088 # should install pkg-config .pc files. By default the directory is
10089 # $libdir/pkgconfig, but the default can be changed by passing
10090 # DIRECTORY. The user can override through the --with-pkgconfigdir
10091 # parameter.
10092 AC_DEFUN([PKG_INSTALLDIR],
10093 [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
10094 m4_pushdef([pkg_description],
10095     [pkg-config installation directory @<:@]pkg_default[@:>@])
10096 AC_ARG_WITH([pkgconfigdir],
10097     [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
10098     [with_pkgconfigdir=]pkg_default)
10099 AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
10100 m4_popdef([pkg_default])
10101 m4_popdef([pkg_description])
10102 ]) dnl PKG_INSTALLDIR
10103
10104
10105 # PKG_NOARCH_INSTALLDIR(DIRECTORY)
10106 # -------------------------
10107 # Substitutes the variable noarch_pkgconfigdir as the location where a
10108 # module should install arch-independent pkg-config .pc files. By
10109 # default the directory is $datadir/pkgconfig, but the default can be
10110 # changed by passing DIRECTORY. The user can override through the
10111 # --with-noarch-pkgconfigdir parameter.
10112 AC_DEFUN([PKG_NOARCH_INSTALLDIR],
10113 [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
10114 m4_pushdef([pkg_description],
10115     [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
10116 AC_ARG_WITH([noarch-pkgconfigdir],
10117     [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
10118     [with_noarch_pkgconfigdir=]pkg_default)
10119 AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
10120 m4_popdef([pkg_default])
10121 m4_popdef([pkg_description])
10122 ]) dnl PKG_NOARCH_INSTALLDIR
10123
10124
10125 # PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
10126 # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
10127 # -------------------------------------------
10128 # Retrieves the value of the pkg-config variable for the given module.
10129 AC_DEFUN([PKG_CHECK_VAR],
10130 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
10131 AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
10132
10133 _PKG_CONFIG([$1], [variable="][$3]["], [$2])
10134 AS_VAR_COPY([$1], [pkg_cv_][$1])
10135
10136 AS_VAR_IF([$1], [""], [$5], [$4])dnl
10137 ])# PKG_CHECK_VAR
10138
10139 # Configure paths for GLIB
10140 # Owen Taylor     1997-2001
10141
10142 dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
10143 dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject,
10144 dnl gthread, or gio is specified in MODULES, pass to pkg-config
10145 dnl
10146 AC_DEFUN([AM_PATH_GLIB_2_0],
10147 [dnl 
10148 dnl Get the cflags and libraries from pkg-config
10149 dnl
10150 AC_ARG_ENABLE(glibtest, [  --disable-glibtest      do not try to compile and run a test GLIB program],
10151                     , enable_glibtest=yes)
10152
10153   pkg_config_args=glib-2.0
10154   for module in . $4
10155   do
10156       case "$module" in
10157          gmodule) 
10158              pkg_config_args="$pkg_config_args gmodule-2.0"
10159          ;;
10160          gmodule-no-export) 
10161              pkg_config_args="$pkg_config_args gmodule-no-export-2.0"
10162          ;;
10163          gobject) 
10164              pkg_config_args="$pkg_config_args gobject-2.0"
10165          ;;
10166          gthread) 
10167              pkg_config_args="$pkg_config_args gthread-2.0"
10168          ;;
10169          gio*) 
10170              pkg_config_args="$pkg_config_args $module-2.0"
10171          ;;
10172       esac
10173   done
10174
10175   PKG_PROG_PKG_CONFIG([0.16])
10176
10177   no_glib=""
10178
10179   if test "x$PKG_CONFIG" = x ; then
10180     no_glib=yes
10181     PKG_CONFIG=no
10182   fi
10183
10184   min_glib_version=ifelse([$1], ,2.0.0,$1)
10185   AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
10186
10187   if test x$PKG_CONFIG != xno ; then
10188     ## don't try to run the test against uninstalled libtool libs
10189     if $PKG_CONFIG --uninstalled $pkg_config_args; then
10190           echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH"
10191           enable_glibtest=no
10192     fi
10193
10194     if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then
10195           :
10196     else
10197           no_glib=yes
10198     fi
10199   fi
10200
10201   if test x"$no_glib" = x ; then
10202     GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
10203     GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0`
10204     GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
10205     GLIB_COMPILE_RESOURCES=`$PKG_CONFIG --variable=glib_compile_resources gio-2.0`
10206
10207     GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args`
10208     GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args`
10209     glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \
10210            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
10211     glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \
10212            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
10213     glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \
10214            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
10215     if test "x$enable_glibtest" = "xyes" ; then
10216       ac_save_CFLAGS="$CFLAGS"
10217       ac_save_LIBS="$LIBS"
10218       CFLAGS="$CFLAGS $GLIB_CFLAGS"
10219       LIBS="$GLIB_LIBS $LIBS"
10220 dnl
10221 dnl Now check if the installed GLIB is sufficiently new. (Also sanity
10222 dnl checks the results of pkg-config to some extent)
10223 dnl
10224       rm -f conf.glibtest
10225       AC_TRY_RUN([
10226 #include <glib.h>
10227 #include <stdio.h>
10228 #include <stdlib.h>
10229
10230 int 
10231 main ()
10232 {
10233   unsigned int major, minor, micro;
10234
10235   fclose (fopen ("conf.glibtest", "w"));
10236
10237   if (sscanf("$min_glib_version", "%u.%u.%u", &major, &minor, &micro) != 3) {
10238      printf("%s, bad version string\n", "$min_glib_version");
10239      exit(1);
10240    }
10241
10242   if ((glib_major_version != $glib_config_major_version) ||
10243       (glib_minor_version != $glib_config_minor_version) ||
10244       (glib_micro_version != $glib_config_micro_version))
10245     {
10246       printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n", 
10247              $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
10248              glib_major_version, glib_minor_version, glib_micro_version);
10249       printf ("*** was found! If pkg-config was correct, then it is best\n");
10250       printf ("*** to remove the old version of GLib. You may also be able to fix the error\n");
10251       printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
10252       printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
10253       printf("*** required on your system.\n");
10254       printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
10255       printf("*** to point to the correct configuration files\n");
10256     } 
10257   else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
10258            (glib_minor_version != GLIB_MINOR_VERSION) ||
10259            (glib_micro_version != GLIB_MICRO_VERSION))
10260     {
10261       printf("*** GLIB header files (version %d.%d.%d) do not match\n",
10262              GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
10263       printf("*** library (version %d.%d.%d)\n",
10264              glib_major_version, glib_minor_version, glib_micro_version);
10265     }
10266   else
10267     {
10268       if ((glib_major_version > major) ||
10269         ((glib_major_version == major) && (glib_minor_version > minor)) ||
10270         ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
10271       {
10272         return 0;
10273        }
10274      else
10275       {
10276         printf("\n*** An old version of GLIB (%u.%u.%u) was found.\n",
10277                glib_major_version, glib_minor_version, glib_micro_version);
10278         printf("*** You need a version of GLIB newer than %u.%u.%u. The latest version of\n",
10279                major, minor, micro);
10280         printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
10281         printf("***\n");
10282         printf("*** If you have already installed a sufficiently new version, this error\n");
10283         printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
10284         printf("*** being found. The easiest way to fix this is to remove the old version\n");
10285         printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n");
10286         printf("*** correct copy of pkg-config. (In this case, you will have to\n");
10287         printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
10288         printf("*** so that the correct libraries are found at run-time))\n");
10289       }
10290     }
10291   return 1;
10292 }
10293 ],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
10294        CFLAGS="$ac_save_CFLAGS"
10295        LIBS="$ac_save_LIBS"
10296      fi
10297   fi
10298   if test "x$no_glib" = x ; then
10299      AC_MSG_RESULT(yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version))
10300      ifelse([$2], , :, [$2])     
10301   else
10302      AC_MSG_RESULT(no)
10303      if test "$PKG_CONFIG" = "no" ; then
10304        echo "*** A new enough version of pkg-config was not found."
10305        echo "*** See http://www.freedesktop.org/software/pkgconfig/"
10306      else
10307        if test -f conf.glibtest ; then
10308         :
10309        else
10310           echo "*** Could not run GLIB test program, checking why..."
10311           ac_save_CFLAGS="$CFLAGS"
10312           ac_save_LIBS="$LIBS"
10313           CFLAGS="$CFLAGS $GLIB_CFLAGS"
10314           LIBS="$LIBS $GLIB_LIBS"
10315           AC_TRY_LINK([
10316 #include <glib.h>
10317 #include <stdio.h>
10318 ],      [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
10319         [ echo "*** The test program compiled, but did not run. This usually means"
10320           echo "*** that the run-time linker is not finding GLIB or finding the wrong"
10321           echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
10322           echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
10323           echo "*** to the installed location  Also, make sure you have run ldconfig if that"
10324           echo "*** is required on your system"
10325           echo "***"
10326           echo "*** If you have an old version installed, it is best to remove it, although"
10327           echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
10328         [ echo "*** The test program failed to compile or link. See the file config.log for the"
10329           echo "*** exact error that occured. This usually means GLIB is incorrectly installed."])
10330           CFLAGS="$ac_save_CFLAGS"
10331           LIBS="$ac_save_LIBS"
10332        fi
10333      fi
10334      GLIB_CFLAGS=""
10335      GLIB_LIBS=""
10336      GLIB_GENMARSHAL=""
10337      GOBJECT_QUERY=""
10338      GLIB_MKENUMS=""
10339      GLIB_COMPILE_RESOURCES=""
10340      ifelse([$3], , :, [$3])
10341   fi
10342   AC_SUBST(GLIB_CFLAGS)
10343   AC_SUBST(GLIB_LIBS)
10344   AC_SUBST(GLIB_GENMARSHAL)
10345   AC_SUBST(GOBJECT_QUERY)
10346   AC_SUBST(GLIB_MKENUMS)
10347   AC_SUBST(GLIB_COMPILE_RESOURCES)
10348   rm -f conf.glibtest
10349 ])
10350
10351 dnl GNOME_CODE_COVERAGE
10352 dnl
10353 dnl Defines CODE_COVERAGE_CFLAGS and CODE_COVERAGE_LDFLAGS which should be
10354 dnl included in the CFLAGS and LIBS/LDFLAGS variables of every build target
10355 dnl (program or library) which should be built with code coverage support.
10356 dnl Also defines GNOME_CODE_COVERAGE_RULES which should be substituted in your
10357 dnl Makefile; and $enable_code_coverage which can be used in subsequent
10358 dnl configure output.
10359 dnl
10360 dnl Note that all optimisation flags in CFLAGS must be disabled when code
10361 dnl coverage is enabled.
10362 dnl
10363 dnl Derived from Makefile.decl in GLib, originally licenced under LGPLv2.1+.
10364 dnl This file is licenced under LGPLv2.1+.
10365 dnl
10366 dnl Usage example:
10367 dnl configure.ac:
10368 dnl    GNOME_CODE_COVERAGE
10369 dnl
10370 dnl Makefile.am:
10371 dnl    @GNOME_CODE_COVERAGE_RULES@
10372 dnl    my_program_LIBS = … $(CODE_COVERAGE_LDFLAGS) …
10373 dnl    my_program_CFLAGS = … $(CODE_COVERAGE_CFLAGS) …
10374 dnl
10375 dnl This results in a “check-code-coverage” rule being added to any Makefile.am
10376 dnl which includes “@GNOME_CODE_COVERAGE_RULES@” (assuming the module has been
10377 dnl configured with --enable-code-coverage). Running `make check-code-coverage`
10378 dnl in that directory will run the module’s test suite (`make check`) and build
10379 dnl a code coverage report detailing the code which was touched, then print the
10380 dnl URI for the report.
10381
10382 AC_DEFUN([GNOME_CODE_COVERAGE],[
10383         dnl Check for --enable-code-coverage
10384         AC_MSG_CHECKING([whether to build with code coverage support])
10385         AC_ARG_ENABLE([code-coverage], AS_HELP_STRING([--enable-code-coverage], [Whether to enable code coverage support]),, enable_code_coverage=no)
10386         AM_CONDITIONAL([CODE_COVERAGE_ENABLED], [test x$enable_code_coverage = xyes])
10387         AC_SUBST([CODE_COVERAGE_ENABLED], [$enable_code_coverage])
10388         AC_MSG_RESULT($enable_code_coverage)
10389
10390         AS_IF([ test "$enable_code_coverage" = "yes" ], [
10391                 dnl Check if gcc is being used
10392                 AS_IF([ test "$GCC" = "no" ], [
10393                         AC_MSG_ERROR([not compiling with gcc, which is required for gcov code coverage])
10394                 ])
10395
10396                 # List of supported lcov versions.
10397                 lcov_version_list="1.6 1.7 1.8 1.9 1.10"
10398
10399                 AC_CHECK_PROG([LCOV], [lcov], [lcov])
10400                 AC_CHECK_PROG([GENHTML], [genhtml], [genhtml])
10401
10402                 AS_IF([ test "$LCOV" ], [
10403                         AC_CACHE_CHECK([for lcov version], gnome_cv_lcov_version, [
10404                                 gnome_cv_lcov_version=invalid
10405                                 lcov_version=`$LCOV -v 2>/dev/null | $SED -e 's/^.* //'`
10406                                 for lcov_check_version in $lcov_version_list; do
10407                                         if test "$lcov_version" = "$lcov_check_version"; then
10408                                                 gnome_cv_lcov_version="$lcov_check_version (ok)"
10409                                         fi
10410                                 done
10411                         ])
10412                 ], [
10413                         lcov_msg="To enable code coverage reporting you must have one of the following lcov versions installed: $lcov_version_list"
10414                         AC_MSG_ERROR([$lcov_msg])
10415                 ])
10416
10417                 case $gnome_cv_lcov_version in
10418                         ""|invalid[)]
10419                                 lcov_msg="You must have one of the following versions of lcov: $lcov_version_list (found: $lcov_version)."
10420                                 AC_MSG_ERROR([$lcov_msg])
10421                                 LCOV="exit 0;"
10422                         ;;
10423                 esac
10424
10425                 AS_IF([ test -z "$GENHTML" ], [
10426                         AC_MSG_ERROR([Could not find genhtml from the lcov package])
10427                 ])
10428
10429                 dnl Build the code coverage flags
10430                 CODE_COVERAGE_CFLAGS="-O0 -g -fprofile-arcs -ftest-coverage"
10431                 CODE_COVERAGE_LDFLAGS="-lgcov"
10432
10433                 AC_SUBST([CODE_COVERAGE_CFLAGS])
10434                 AC_SUBST([CODE_COVERAGE_LDFLAGS])
10435         ])
10436
10437 GNOME_CODE_COVERAGE_RULES='
10438 # Code coverage
10439 #
10440 # Optional:
10441 #  - CODE_COVERAGE_DIRECTORY: Top-level directory for code coverage reporting.
10442 #    (Default: $(top_builddir))
10443 #  - CODE_COVERAGE_OUTPUT_FILE: Filename and path for the .info file generated
10444 #    by lcov for code coverage. (Default:
10445 #    $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info)
10446 #  - CODE_COVERAGE_OUTPUT_DIRECTORY: Directory for generated code coverage
10447 #    reports to be created. (Default:
10448 #    $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage)
10449 #  - CODE_COVERAGE_LCOV_OPTIONS: Extra options to pass to the lcov instance.
10450 #    (Default: empty)
10451 #  - CODE_COVERAGE_GENHTML_OPTIONS: Extra options to pass to the genhtml
10452 #    instance. (Default: empty)
10453 #  - CODE_COVERAGE_IGNORE_PATTERN: Extra glob pattern of files to ignore
10454 #
10455 # The generated report will be titled using the $(PACKAGE_NAME) and
10456 # $(PACKAGE_VERSION). In order to add the current git hash to the title,
10457 # use the git-version-gen script, available online.
10458
10459 # Optional variables
10460 CODE_COVERAGE_DIRECTORY ?= $(top_builddir)
10461 CODE_COVERAGE_OUTPUT_FILE ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info
10462 CODE_COVERAGE_OUTPUT_DIRECTORY ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage
10463 CODE_COVERAGE_LCOV_OPTIONS ?=
10464 CODE_COVERAGE_GENHTML_OPTIONS ?=
10465 CODE_COVERAGE_IGNORE_PATTERN ?=
10466
10467 code_coverage_quiet = $(code_coverage_quiet_$(V))
10468 code_coverage_quiet_ = $(code_coverage_quiet_$(AM_DEFAULT_VERBOSITY))
10469 code_coverage_quiet_0 = --quiet
10470
10471 # Use recursive makes in order to ignore errors during check
10472 check-code-coverage:
10473 ifeq ($(CODE_COVERAGE_ENABLED),yes)
10474         -$(MAKE) $(AM_MAKEFLAGS) -k check
10475         $(MAKE) $(AM_MAKEFLAGS) code-coverage-capture
10476 else
10477         @echo "Need to reconfigure with --enable-code-coverage"
10478 endif
10479
10480 # Capture code coverage data
10481 code-coverage-capture: code-coverage-capture-hook
10482 ifeq ($(CODE_COVERAGE_ENABLED),yes)
10483         $(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)
10484         $(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)"
10485         -@rm -f $(CODE_COVERAGE_OUTPUT_FILE).tmp
10486         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)
10487         @echo "file://$(abs_builddir)/$(CODE_COVERAGE_OUTPUT_DIRECTORY)/index.html"
10488 else
10489         @echo "Need to reconfigure with --enable-code-coverage"
10490 endif
10491
10492 # Hook rule executed before code-coverage-capture, overridable by the user
10493 code-coverage-capture-hook:
10494
10495 ifeq ($(CODE_COVERAGE_ENABLED),yes)
10496 clean: code-coverage-clean
10497 code-coverage-clean:
10498         -$(LCOV) --directory $(top_builddir) -z
10499         -rm -rf $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_FILE).tmp $(CODE_COVERAGE_OUTPUT_DIRECTORY)
10500         -find . -name "*.gcda" -o -name "*.gcov" -delete
10501 endif
10502
10503 GITIGNOREFILES ?=
10504 GITIGNOREFILES += $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_DIRECTORY)
10505
10506 DISTCHECK_CONFIGURE_FLAGS ?=
10507 DISTCHECK_CONFIGURE_FLAGS += --disable-code-coverage
10508
10509 .PHONY: check-code-coverage code-coverage-capture code-coverage-capture-hook code-coverage-clean
10510 '
10511
10512         AC_SUBST([GNOME_CODE_COVERAGE_RULES])
10513         m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([GNOME_CODE_COVERAGE_RULES])])
10514 ])
10515
10516 # gnome-compiler-flags.m4
10517 #
10518 # serial 2
10519 #
10520
10521 dnl GNOME_COMPILE_WARNINGS
10522 dnl Turn on many useful compiler warnings and substitute the result into
10523 dnl WARN_CFLAGS
10524 dnl For now, only works on GCC
10525 dnl Pass the default value of the --enable-compile-warnings configure option as
10526 dnl the first argument to the macro, defaulting to 'yes'.
10527 dnl Additional warning/error flags can be passed as an optional second argument.
10528 dnl
10529 dnl For example: GNOME_COMPILE_WARNINGS([maximum],[-Werror=some-flag -Wfoobar])
10530 AC_DEFUN([GNOME_COMPILE_WARNINGS],[
10531     dnl ******************************
10532     dnl More compiler warnings
10533     dnl ******************************
10534
10535     AC_ARG_ENABLE(compile-warnings, 
10536                   AS_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
10537                                  [Turn on compiler warnings]),,
10538                   [enable_compile_warnings="m4_default([$1],[yes])"])
10539
10540     if test "x$GCC" != xyes; then
10541         enable_compile_warnings=no
10542     fi
10543
10544     warning_flags=
10545     realsave_CFLAGS="$CFLAGS"
10546
10547     dnl These are warning flags that aren't marked as fatal.  Can be
10548     dnl overridden on a per-project basis with -Wno-foo.
10549     base_warn_flags=" \
10550         -Wall \
10551         -Wstrict-prototypes \
10552         -Wnested-externs \
10553     "
10554
10555     dnl These compiler flags typically indicate very broken or suspicious
10556     dnl code.  Some of them such as implicit-function-declaration are
10557     dnl just not default because gcc compiles a lot of legacy code.
10558     dnl We choose to make this set into explicit errors.
10559     base_error_flags=" \
10560         -Werror=missing-prototypes \
10561         -Werror=implicit-function-declaration \
10562         -Werror=pointer-arith \
10563         -Werror=init-self \
10564         -Werror=format-security \
10565         -Werror=format=2 \
10566         -Werror=missing-include-dirs \
10567     "
10568
10569     dnl Additional warning or error flags provided by the module author to
10570     dnl allow stricter standards to be imposed on a per-module basis.
10571     dnl The author can pass -W or -Werror flags here as they see fit.
10572     additional_flags="m4_default([$2],[])"
10573
10574     case "$enable_compile_warnings" in
10575     no)
10576         warning_flags=
10577         ;;
10578     minimum)
10579         warning_flags="-Wall"
10580         ;;
10581     yes|maximum|error)
10582         warning_flags="$base_warn_flags $base_error_flags $additional_flags"
10583         ;;
10584     *)
10585         AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
10586         ;;
10587     esac
10588
10589     if test "$enable_compile_warnings" = "error" ; then
10590         warning_flags="$warning_flags -Werror"
10591     fi
10592
10593     dnl Check whether GCC supports the warning options
10594     for option in $warning_flags; do
10595         save_CFLAGS="$CFLAGS"
10596         CFLAGS="$CFLAGS $option"
10597         AC_MSG_CHECKING([whether gcc understands $option])
10598         AC_TRY_COMPILE([], [],
10599             has_option=yes,
10600             has_option=no,)
10601         CFLAGS="$save_CFLAGS"
10602         AC_MSG_RESULT([$has_option])
10603         if test $has_option = yes; then
10604             tested_warning_flags="$tested_warning_flags $option"
10605         fi
10606         unset has_option
10607         unset save_CFLAGS
10608     done
10609     unset option
10610     CFLAGS="$realsave_CFLAGS"
10611     AC_MSG_CHECKING(what warning flags to pass to the C compiler)
10612     AC_MSG_RESULT($tested_warning_flags)
10613
10614     AC_ARG_ENABLE(iso-c,
10615                   AS_HELP_STRING([--enable-iso-c],
10616                                  [Try to warn if code is not ISO C ]),,
10617                   [enable_iso_c=no])
10618
10619     AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
10620     complCFLAGS=
10621     if test "x$enable_iso_c" != "xno"; then
10622         if test "x$GCC" = "xyes"; then
10623         case " $CFLAGS " in
10624             *[\ \       ]-ansi[\ \      ]*) ;;
10625             *) complCFLAGS="$complCFLAGS -ansi" ;;
10626         esac
10627         case " $CFLAGS " in
10628             *[\ \       ]-pedantic[\ \  ]*) ;;
10629             *) complCFLAGS="$complCFLAGS -pedantic" ;;
10630         esac
10631         fi
10632     fi
10633     AC_MSG_RESULT($complCFLAGS)
10634
10635     WARN_CFLAGS="$tested_warning_flags $complCFLAGS"
10636     AC_SUBST(WARN_CFLAGS)
10637 ])
10638
10639 dnl For C++, do basically the same thing.
10640
10641 AC_DEFUN([GNOME_CXX_WARNINGS],[
10642   AC_ARG_ENABLE(cxx-warnings,
10643                 AS_HELP_STRING([--enable-cxx-warnings=@<:@no/minimum/yes@:>@]
10644                                [Turn on compiler warnings.]),,
10645                 [enable_cxx_warnings="m4_default([$1],[minimum])"])
10646
10647   AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
10648   warnCXXFLAGS=
10649   if test "x$GXX" != xyes; then
10650     enable_cxx_warnings=no
10651   fi
10652   if test "x$enable_cxx_warnings" != "xno"; then
10653     if test "x$GXX" = "xyes"; then
10654       case " $CXXFLAGS " in
10655       *[\ \     ]-Wall[\ \      ]*) ;;
10656       *) warnCXXFLAGS="-Wall -Wno-unused" ;;
10657       esac
10658
10659       ## -W is not all that useful.  And it cannot be controlled
10660       ## with individual -Wno-xxx flags, unlike -Wall
10661       if test "x$enable_cxx_warnings" = "xyes"; then
10662         warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual"
10663       fi
10664     fi
10665   fi
10666   AC_MSG_RESULT($warnCXXFLAGS)
10667
10668    AC_ARG_ENABLE(iso-cxx,
10669                  AS_HELP_STRING([--enable-iso-cxx],
10670                                 [Try to warn if code is not ISO C++ ]),,
10671                  [enable_iso_cxx=no])
10672
10673    AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
10674    complCXXFLAGS=
10675    if test "x$enable_iso_cxx" != "xno"; then
10676      if test "x$GXX" = "xyes"; then
10677       case " $CXXFLAGS " in
10678       *[\ \     ]-ansi[\ \      ]*) ;;
10679       *) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
10680       esac
10681
10682       case " $CXXFLAGS " in
10683       *[\ \     ]-pedantic[\ \  ]*) ;;
10684       *) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
10685       esac
10686      fi
10687    fi
10688   AC_MSG_RESULT($complCXXFLAGS)
10689
10690   WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
10691   AC_SUBST(WARN_CXXFLAGS)
10692 ])
10693