Update gssdp to 0.8.2
[platform/upstream/gssdp.git] / aclocal.m4
1 # generated automatically by aclocal 1.11.1 -*- Autoconf -*-
2
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 # 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 m4_ifndef([AC_AUTOCONF_VERSION],
15   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],,
17 [m4_warning([this file was generated for autoconf 2.67.
18 You have another version of autoconf.  It may work, but is not guaranteed to.
19 If you have problems, you may need to regenerate the build system entirely.
20 To do so, use the procedure documented by the package, typically `autoreconf'.])])
21
22 # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
23 #
24 # This file is free software; the Free Software Foundation
25 # gives unlimited permission to copy and/or distribute it,
26 # with or without modifications, as long as this notice is preserved.
27
28 # AM_AUTOMAKE_VERSION(VERSION)
29 # ----------------------------
30 # Automake X.Y traces this macro to ensure aclocal.m4 has been
31 # generated from the m4 files accompanying Automake X.Y.
32 # (This private macro should not be called outside this file.)
33 AC_DEFUN([AM_AUTOMAKE_VERSION],
34 [am__api_version='1.11'
35 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
36 dnl require some minimum version.  Point them to the right macro.
37 m4_if([$1], [1.11.1], [],
38       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
39 ])
40
41 # _AM_AUTOCONF_VERSION(VERSION)
42 # -----------------------------
43 # aclocal traces this macro to find the Autoconf version.
44 # This is a private macro too.  Using m4_define simplifies
45 # the logic in aclocal, which can simply ignore this definition.
46 m4_define([_AM_AUTOCONF_VERSION], [])
47
48 # AM_SET_CURRENT_AUTOMAKE_VERSION
49 # -------------------------------
50 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
51 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
52 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
53 [AM_AUTOMAKE_VERSION([1.11.1])dnl
54 m4_ifndef([AC_AUTOCONF_VERSION],
55   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
56 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
57
58 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
59
60 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
61 #
62 # This file is free software; the Free Software Foundation
63 # gives unlimited permission to copy and/or distribute it,
64 # with or without modifications, as long as this notice is preserved.
65
66 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
67 # $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
68 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
69 #
70 # Of course, Automake must honor this variable whenever it calls a
71 # tool from the auxiliary directory.  The problem is that $srcdir (and
72 # therefore $ac_aux_dir as well) can be either absolute or relative,
73 # depending on how configure is run.  This is pretty annoying, since
74 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
75 # source directory, any form will work fine, but in subdirectories a
76 # relative path needs to be adjusted first.
77 #
78 # $ac_aux_dir/missing
79 #    fails when called from a subdirectory if $ac_aux_dir is relative
80 # $top_srcdir/$ac_aux_dir/missing
81 #    fails if $ac_aux_dir is absolute,
82 #    fails when called from a subdirectory in a VPATH build with
83 #          a relative $ac_aux_dir
84 #
85 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
86 # are both prefixed by $srcdir.  In an in-source build this is usually
87 # harmless because $srcdir is `.', but things will broke when you
88 # start a VPATH build or use an absolute $srcdir.
89 #
90 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
91 # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
92 #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
93 # and then we would define $MISSING as
94 #   MISSING="\${SHELL} $am_aux_dir/missing"
95 # This will work as long as MISSING is not called from configure, because
96 # unfortunately $(top_srcdir) has no meaning in configure.
97 # However there are other variables, like CC, which are often used in
98 # configure, and could therefore not use this "fixed" $ac_aux_dir.
99 #
100 # Another solution, used here, is to always expand $ac_aux_dir to an
101 # absolute PATH.  The drawback is that using absolute paths prevent a
102 # configured tree to be moved without reconfiguration.
103
104 AC_DEFUN([AM_AUX_DIR_EXPAND],
105 [dnl Rely on autoconf to set up CDPATH properly.
106 AC_PREREQ([2.50])dnl
107 # expand $ac_aux_dir to an absolute path
108 am_aux_dir=`cd $ac_aux_dir && pwd`
109 ])
110
111 # AM_CONDITIONAL                                            -*- Autoconf -*-
112
113 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
114 # 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 # serial 9
121
122 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
123 # -------------------------------------
124 # Define a conditional.
125 AC_DEFUN([AM_CONDITIONAL],
126 [AC_PREREQ(2.52)dnl
127  ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
128         [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
129 AC_SUBST([$1_TRUE])dnl
130 AC_SUBST([$1_FALSE])dnl
131 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
132 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
133 m4_define([_AM_COND_VALUE_$1], [$2])dnl
134 if $2; then
135   $1_TRUE=
136   $1_FALSE='#'
137 else
138   $1_TRUE='#'
139   $1_FALSE=
140 fi
141 AC_CONFIG_COMMANDS_PRE(
142 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
143   AC_MSG_ERROR([[conditional "$1" was never defined.
144 Usually this means the macro was only invoked conditionally.]])
145 fi])])
146
147 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
148 # Free Software Foundation, Inc.
149 #
150 # This file is free software; the Free Software Foundation
151 # gives unlimited permission to copy and/or distribute it,
152 # with or without modifications, as long as this notice is preserved.
153
154 # serial 10
155
156 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
157 # written in clear, in which case automake, when reading aclocal.m4,
158 # will think it sees a *use*, and therefore will trigger all it's
159 # C support machinery.  Also note that it means that autoscan, seeing
160 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
161
162
163 # _AM_DEPENDENCIES(NAME)
164 # ----------------------
165 # See how the compiler implements dependency checking.
166 # NAME is "CC", "CXX", "GCJ", or "OBJC".
167 # We try a few techniques and use that to set a single cache variable.
168 #
169 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
170 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
171 # dependency, and given that the user is not expected to run this macro,
172 # just rely on AC_PROG_CC.
173 AC_DEFUN([_AM_DEPENDENCIES],
174 [AC_REQUIRE([AM_SET_DEPDIR])dnl
175 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
176 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
177 AC_REQUIRE([AM_DEP_TRACK])dnl
178
179 ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
180        [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
181        [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
182        [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
183        [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
184                    [depcc="$$1"   am_compiler_list=])
185
186 AC_CACHE_CHECK([dependency style of $depcc],
187                [am_cv_$1_dependencies_compiler_type],
188 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
189   # We make a subdir and do the tests there.  Otherwise we can end up
190   # making bogus files that we don't know about and never remove.  For
191   # instance it was reported that on HP-UX the gcc test will end up
192   # making a dummy file named `D' -- because `-MD' means `put the output
193   # in D'.
194   mkdir conftest.dir
195   # Copy depcomp to subdir because otherwise we won't find it if we're
196   # using a relative directory.
197   cp "$am_depcomp" conftest.dir
198   cd conftest.dir
199   # We will build objects and dependencies in a subdirectory because
200   # it helps to detect inapplicable dependency modes.  For instance
201   # both Tru64's cc and ICC support -MD to output dependencies as a
202   # side effect of compilation, but ICC will put the dependencies in
203   # the current directory while Tru64 will put them in the object
204   # directory.
205   mkdir sub
206
207   am_cv_$1_dependencies_compiler_type=none
208   if test "$am_compiler_list" = ""; then
209      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
210   fi
211   am__universal=false
212   m4_case([$1], [CC],
213     [case " $depcc " in #(
214      *\ -arch\ *\ -arch\ *) am__universal=true ;;
215      esac],
216     [CXX],
217     [case " $depcc " in #(
218      *\ -arch\ *\ -arch\ *) am__universal=true ;;
219      esac])
220
221   for depmode in $am_compiler_list; do
222     # Setup a source with many dependencies, because some compilers
223     # like to wrap large dependency lists on column 80 (with \), and
224     # we should not choose a depcomp mode which is confused by this.
225     #
226     # We need to recreate these files for each test, as the compiler may
227     # overwrite some of them when testing with obscure command lines.
228     # This happens at least with the AIX C compiler.
229     : > sub/conftest.c
230     for i in 1 2 3 4 5 6; do
231       echo '#include "conftst'$i'.h"' >> sub/conftest.c
232       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
233       # Solaris 8's {/usr,}/bin/sh.
234       touch sub/conftst$i.h
235     done
236     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
237
238     # We check with `-c' and `-o' for the sake of the "dashmstdout"
239     # mode.  It turns out that the SunPro C++ compiler does not properly
240     # handle `-M -o', and we need to detect this.  Also, some Intel
241     # versions had trouble with output in subdirs
242     am__obj=sub/conftest.${OBJEXT-o}
243     am__minus_obj="-o $am__obj"
244     case $depmode in
245     gcc)
246       # This depmode causes a compiler race in universal mode.
247       test "$am__universal" = false || continue
248       ;;
249     nosideeffect)
250       # after this tag, mechanisms are not by side-effect, so they'll
251       # only be used when explicitly requested
252       if test "x$enable_dependency_tracking" = xyes; then
253         continue
254       else
255         break
256       fi
257       ;;
258     msvisualcpp | msvcmsys)
259       # This compiler won't grok `-c -o', but also, the minuso test has
260       # not run yet.  These depmodes are late enough in the game, and
261       # so weak that their functioning should not be impacted.
262       am__obj=conftest.${OBJEXT-o}
263       am__minus_obj=
264       ;;
265     none) break ;;
266     esac
267     if depmode=$depmode \
268        source=sub/conftest.c object=$am__obj \
269        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
270        $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
271          >/dev/null 2>conftest.err &&
272        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
273        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
274        grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
275        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
276       # icc doesn't choke on unknown options, it will just issue warnings
277       # or remarks (even with -Werror).  So we grep stderr for any message
278       # that says an option was ignored or not supported.
279       # When given -MP, icc 7.0 and 7.1 complain thusly:
280       #   icc: Command line warning: ignoring option '-M'; no argument required
281       # The diagnosis changed in icc 8.0:
282       #   icc: Command line remark: option '-MP' not supported
283       if (grep 'ignoring option' conftest.err ||
284           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
285         am_cv_$1_dependencies_compiler_type=$depmode
286         break
287       fi
288     fi
289   done
290
291   cd ..
292   rm -rf conftest.dir
293 else
294   am_cv_$1_dependencies_compiler_type=none
295 fi
296 ])
297 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
298 AM_CONDITIONAL([am__fastdep$1], [
299   test "x$enable_dependency_tracking" != xno \
300   && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
301 ])
302
303
304 # AM_SET_DEPDIR
305 # -------------
306 # Choose a directory name for dependency files.
307 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
308 AC_DEFUN([AM_SET_DEPDIR],
309 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
310 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
311 ])
312
313
314 # AM_DEP_TRACK
315 # ------------
316 AC_DEFUN([AM_DEP_TRACK],
317 [AC_ARG_ENABLE(dependency-tracking,
318 [  --disable-dependency-tracking  speeds up one-time build
319   --enable-dependency-tracking   do not reject slow dependency extractors])
320 if test "x$enable_dependency_tracking" != xno; then
321   am_depcomp="$ac_aux_dir/depcomp"
322   AMDEPBACKSLASH='\'
323 fi
324 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
325 AC_SUBST([AMDEPBACKSLASH])dnl
326 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
327 ])
328
329 # Generate code to set up dependency tracking.              -*- Autoconf -*-
330
331 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
332 # Free Software Foundation, Inc.
333 #
334 # This file is free software; the Free Software Foundation
335 # gives unlimited permission to copy and/or distribute it,
336 # with or without modifications, as long as this notice is preserved.
337
338 #serial 5
339
340 # _AM_OUTPUT_DEPENDENCY_COMMANDS
341 # ------------------------------
342 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
343 [{
344   # Autoconf 2.62 quotes --file arguments for eval, but not when files
345   # are listed without --file.  Let's play safe and only enable the eval
346   # if we detect the quoting.
347   case $CONFIG_FILES in
348   *\'*) eval set x "$CONFIG_FILES" ;;
349   *)   set x $CONFIG_FILES ;;
350   esac
351   shift
352   for mf
353   do
354     # Strip MF so we end up with the name of the file.
355     mf=`echo "$mf" | sed -e 's/:.*$//'`
356     # Check whether this is an Automake generated Makefile or not.
357     # We used to match only the files named `Makefile.in', but
358     # some people rename them; so instead we look at the file content.
359     # Grep'ing the first line is not enough: some people post-process
360     # each Makefile.in and add a new line on top of each file to say so.
361     # Grep'ing the whole file is not good either: AIX grep has a line
362     # limit of 2048, but all sed's we know have understand at least 4000.
363     if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
364       dirpart=`AS_DIRNAME("$mf")`
365     else
366       continue
367     fi
368     # Extract the definition of DEPDIR, am__include, and am__quote
369     # from the Makefile without running `make'.
370     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
371     test -z "$DEPDIR" && continue
372     am__include=`sed -n 's/^am__include = //p' < "$mf"`
373     test -z "am__include" && continue
374     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
375     # When using ansi2knr, U may be empty or an underscore; expand it
376     U=`sed -n 's/^U = //p' < "$mf"`
377     # Find all dependency output files, they are included files with
378     # $(DEPDIR) in their names.  We invoke sed twice because it is the
379     # simplest approach to changing $(DEPDIR) to its actual value in the
380     # expansion.
381     for file in `sed -n "
382       s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
383          sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
384       # Make sure the directory exists.
385       test -f "$dirpart/$file" && continue
386       fdir=`AS_DIRNAME(["$file"])`
387       AS_MKDIR_P([$dirpart/$fdir])
388       # echo "creating $dirpart/$file"
389       echo '# dummy' > "$dirpart/$file"
390     done
391   done
392 }
393 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
394
395
396 # AM_OUTPUT_DEPENDENCY_COMMANDS
397 # -----------------------------
398 # This macro should only be invoked once -- use via AC_REQUIRE.
399 #
400 # This code is only required when automatic dependency tracking
401 # is enabled.  FIXME.  This creates each `.P' file that we will
402 # need in order to bootstrap the dependency handling code.
403 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
404 [AC_CONFIG_COMMANDS([depfiles],
405      [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
406      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
407 ])
408
409 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
410 # Free Software Foundation, Inc.
411 #
412 # This file is free software; the Free Software Foundation
413 # gives unlimited permission to copy and/or distribute it,
414 # with or without modifications, as long as this notice is preserved.
415
416 # serial 8
417
418 # AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
419 AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
420
421 # Do all the work for Automake.                             -*- Autoconf -*-
422
423 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
424 # 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
425 #
426 # This file is free software; the Free Software Foundation
427 # gives unlimited permission to copy and/or distribute it,
428 # with or without modifications, as long as this notice is preserved.
429
430 # serial 16
431
432 # This macro actually does too much.  Some checks are only needed if
433 # your package does certain things.  But this isn't really a big deal.
434
435 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
436 # AM_INIT_AUTOMAKE([OPTIONS])
437 # -----------------------------------------------
438 # The call with PACKAGE and VERSION arguments is the old style
439 # call (pre autoconf-2.50), which is being phased out.  PACKAGE
440 # and VERSION should now be passed to AC_INIT and removed from
441 # the call to AM_INIT_AUTOMAKE.
442 # We support both call styles for the transition.  After
443 # the next Automake release, Autoconf can make the AC_INIT
444 # arguments mandatory, and then we can depend on a new Autoconf
445 # release and drop the old call support.
446 AC_DEFUN([AM_INIT_AUTOMAKE],
447 [AC_PREREQ([2.62])dnl
448 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
449 dnl the ones we care about.
450 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
451 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
452 AC_REQUIRE([AC_PROG_INSTALL])dnl
453 if test "`cd $srcdir && pwd`" != "`pwd`"; then
454   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
455   # is not polluted with repeated "-I."
456   AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
457   # test to see if srcdir already configured
458   if test -f $srcdir/config.status; then
459     AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
460   fi
461 fi
462
463 # test whether we have cygpath
464 if test -z "$CYGPATH_W"; then
465   if (cygpath --version) >/dev/null 2>/dev/null; then
466     CYGPATH_W='cygpath -w'
467   else
468     CYGPATH_W=echo
469   fi
470 fi
471 AC_SUBST([CYGPATH_W])
472
473 # Define the identity of the package.
474 dnl Distinguish between old-style and new-style calls.
475 m4_ifval([$2],
476 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
477  AC_SUBST([PACKAGE], [$1])dnl
478  AC_SUBST([VERSION], [$2])],
479 [_AM_SET_OPTIONS([$1])dnl
480 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
481 m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
482   [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
483  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
484  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
485
486 _AM_IF_OPTION([no-define],,
487 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
488  AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
489
490 # Some tools Automake needs.
491 AC_REQUIRE([AM_SANITY_CHECK])dnl
492 AC_REQUIRE([AC_ARG_PROGRAM])dnl
493 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
494 AM_MISSING_PROG(AUTOCONF, autoconf)
495 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
496 AM_MISSING_PROG(AUTOHEADER, autoheader)
497 AM_MISSING_PROG(MAKEINFO, makeinfo)
498 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
499 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
500 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
501 # We need awk for the "check" target.  The system "awk" is bad on
502 # some platforms.
503 AC_REQUIRE([AC_PROG_AWK])dnl
504 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
505 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
506 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
507               [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
508                              [_AM_PROG_TAR([v7])])])
509 _AM_IF_OPTION([no-dependencies],,
510 [AC_PROVIDE_IFELSE([AC_PROG_CC],
511                   [_AM_DEPENDENCIES(CC)],
512                   [define([AC_PROG_CC],
513                           defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
514 AC_PROVIDE_IFELSE([AC_PROG_CXX],
515                   [_AM_DEPENDENCIES(CXX)],
516                   [define([AC_PROG_CXX],
517                           defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
518 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
519                   [_AM_DEPENDENCIES(OBJC)],
520                   [define([AC_PROG_OBJC],
521                           defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
522 ])
523 _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
524 dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
525 dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
526 dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
527 AC_CONFIG_COMMANDS_PRE(dnl
528 [m4_provide_if([_AM_COMPILER_EXEEXT],
529   [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
530 ])
531
532 dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
533 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
534 dnl mangled by Autoconf and run in a shell conditional statement.
535 m4_define([_AC_COMPILER_EXEEXT],
536 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
537
538
539 # When config.status generates a header, we must update the stamp-h file.
540 # This file resides in the same directory as the config header
541 # that is generated.  The stamp files are numbered to have different names.
542
543 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
544 # loop where config.status creates the headers, so we can generate
545 # our stamp files there.
546 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
547 [# Compute $1's index in $config_headers.
548 _am_arg=$1
549 _am_stamp_count=1
550 for _am_header in $config_headers :; do
551   case $_am_header in
552     $_am_arg | $_am_arg:* )
553       break ;;
554     * )
555       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
556   esac
557 done
558 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
559
560 # Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
561 #
562 # This file is free software; the Free Software Foundation
563 # gives unlimited permission to copy and/or distribute it,
564 # with or without modifications, as long as this notice is preserved.
565
566 # AM_PROG_INSTALL_SH
567 # ------------------
568 # Define $install_sh.
569 AC_DEFUN([AM_PROG_INSTALL_SH],
570 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
571 if test x"${install_sh}" != xset; then
572   case $am_aux_dir in
573   *\ * | *\     *)
574     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
575   *)
576     install_sh="\${SHELL} $am_aux_dir/install-sh"
577   esac
578 fi
579 AC_SUBST(install_sh)])
580
581 # Copyright (C) 2003, 2005  Free Software Foundation, Inc.
582 #
583 # This file is free software; the Free Software Foundation
584 # gives unlimited permission to copy and/or distribute it,
585 # with or without modifications, as long as this notice is preserved.
586
587 # serial 2
588
589 # Check whether the underlying file-system supports filenames
590 # with a leading dot.  For instance MS-DOS doesn't.
591 AC_DEFUN([AM_SET_LEADING_DOT],
592 [rm -rf .tst 2>/dev/null
593 mkdir .tst 2>/dev/null
594 if test -d .tst; then
595   am__leading_dot=.
596 else
597   am__leading_dot=_
598 fi
599 rmdir .tst 2>/dev/null
600 AC_SUBST([am__leading_dot])])
601
602 # Check to see how 'make' treats includes.                  -*- Autoconf -*-
603
604 # Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
605 #
606 # This file is free software; the Free Software Foundation
607 # gives unlimited permission to copy and/or distribute it,
608 # with or without modifications, as long as this notice is preserved.
609
610 # serial 4
611
612 # AM_MAKE_INCLUDE()
613 # -----------------
614 # Check to see how make treats includes.
615 AC_DEFUN([AM_MAKE_INCLUDE],
616 [am_make=${MAKE-make}
617 cat > confinc << 'END'
618 am__doit:
619         @echo this is the am__doit target
620 .PHONY: am__doit
621 END
622 # If we don't find an include directive, just comment out the code.
623 AC_MSG_CHECKING([for style of include used by $am_make])
624 am__include="#"
625 am__quote=
626 _am_result=none
627 # First try GNU make style include.
628 echo "include confinc" > confmf
629 # Ignore all kinds of additional output from `make'.
630 case `$am_make -s -f confmf 2> /dev/null` in #(
631 *the\ am__doit\ target*)
632   am__include=include
633   am__quote=
634   _am_result=GNU
635   ;;
636 esac
637 # Now try BSD make style include.
638 if test "$am__include" = "#"; then
639    echo '.include "confinc"' > confmf
640    case `$am_make -s -f confmf 2> /dev/null` in #(
641    *the\ am__doit\ target*)
642      am__include=.include
643      am__quote="\""
644      _am_result=BSD
645      ;;
646    esac
647 fi
648 AC_SUBST([am__include])
649 AC_SUBST([am__quote])
650 AC_MSG_RESULT([$_am_result])
651 rm -f confinc confmf
652 ])
653
654 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
655
656 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
657 # Free Software Foundation, Inc.
658 #
659 # This file is free software; the Free Software Foundation
660 # gives unlimited permission to copy and/or distribute it,
661 # with or without modifications, as long as this notice is preserved.
662
663 # serial 6
664
665 # AM_MISSING_PROG(NAME, PROGRAM)
666 # ------------------------------
667 AC_DEFUN([AM_MISSING_PROG],
668 [AC_REQUIRE([AM_MISSING_HAS_RUN])
669 $1=${$1-"${am_missing_run}$2"}
670 AC_SUBST($1)])
671
672
673 # AM_MISSING_HAS_RUN
674 # ------------------
675 # Define MISSING if not defined so far and test if it supports --run.
676 # If it does, set am_missing_run to use it, otherwise, to nothing.
677 AC_DEFUN([AM_MISSING_HAS_RUN],
678 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
679 AC_REQUIRE_AUX_FILE([missing])dnl
680 if test x"${MISSING+set}" != xset; then
681   case $am_aux_dir in
682   *\ * | *\     *)
683     MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
684   *)
685     MISSING="\${SHELL} $am_aux_dir/missing" ;;
686   esac
687 fi
688 # Use eval to expand $SHELL
689 if eval "$MISSING --run true"; then
690   am_missing_run="$MISSING --run "
691 else
692   am_missing_run=
693   AC_MSG_WARN([`missing' script is too old or missing])
694 fi
695 ])
696
697 # Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
698 #
699 # This file is free software; the Free Software Foundation
700 # gives unlimited permission to copy and/or distribute it,
701 # with or without modifications, as long as this notice is preserved.
702
703 # AM_PROG_MKDIR_P
704 # ---------------
705 # Check for `mkdir -p'.
706 AC_DEFUN([AM_PROG_MKDIR_P],
707 [AC_PREREQ([2.60])dnl
708 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
709 dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
710 dnl while keeping a definition of mkdir_p for backward compatibility.
711 dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
712 dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
713 dnl Makefile.ins that do not define MKDIR_P, so we do our own
714 dnl adjustment using top_builddir (which is defined more often than
715 dnl MKDIR_P).
716 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
717 case $mkdir_p in
718   [[\\/$]]* | ?:[[\\/]]*) ;;
719   */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
720 esac
721 ])
722
723 # Helper functions for option handling.                     -*- Autoconf -*-
724
725 # Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
726 #
727 # This file is free software; the Free Software Foundation
728 # gives unlimited permission to copy and/or distribute it,
729 # with or without modifications, as long as this notice is preserved.
730
731 # serial 4
732
733 # _AM_MANGLE_OPTION(NAME)
734 # -----------------------
735 AC_DEFUN([_AM_MANGLE_OPTION],
736 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
737
738 # _AM_SET_OPTION(NAME)
739 # ------------------------------
740 # Set option NAME.  Presently that only means defining a flag for this option.
741 AC_DEFUN([_AM_SET_OPTION],
742 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
743
744 # _AM_SET_OPTIONS(OPTIONS)
745 # ----------------------------------
746 # OPTIONS is a space-separated list of Automake options.
747 AC_DEFUN([_AM_SET_OPTIONS],
748 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
749
750 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
751 # -------------------------------------------
752 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
753 AC_DEFUN([_AM_IF_OPTION],
754 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
755
756 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
757
758 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
759 # Free Software Foundation, Inc.
760 #
761 # This file is free software; the Free Software Foundation
762 # gives unlimited permission to copy and/or distribute it,
763 # with or without modifications, as long as this notice is preserved.
764
765 # serial 5
766
767 # AM_SANITY_CHECK
768 # ---------------
769 AC_DEFUN([AM_SANITY_CHECK],
770 [AC_MSG_CHECKING([whether build environment is sane])
771 # Just in case
772 sleep 1
773 echo timestamp > conftest.file
774 # Reject unsafe characters in $srcdir or the absolute working directory
775 # name.  Accept space and tab only in the latter.
776 am_lf='
777 '
778 case `pwd` in
779   *[[\\\"\#\$\&\'\`$am_lf]]*)
780     AC_MSG_ERROR([unsafe absolute working directory name]);;
781 esac
782 case $srcdir in
783   *[[\\\"\#\$\&\'\`$am_lf\ \    ]]*)
784     AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
785 esac
786
787 # Do `set' in a subshell so we don't clobber the current shell's
788 # arguments.  Must try -L first in case configure is actually a
789 # symlink; some systems play weird games with the mod time of symlinks
790 # (eg FreeBSD returns the mod time of the symlink's containing
791 # directory).
792 if (
793    set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
794    if test "$[*]" = "X"; then
795       # -L didn't work.
796       set X `ls -t "$srcdir/configure" conftest.file`
797    fi
798    rm -f conftest.file
799    if test "$[*]" != "X $srcdir/configure conftest.file" \
800       && test "$[*]" != "X conftest.file $srcdir/configure"; then
801
802       # If neither matched, then we have a broken ls.  This can happen
803       # if, for instance, CONFIG_SHELL is bash and it inherits a
804       # broken ls alias from the environment.  This has actually
805       # happened.  Such a system could not be considered "sane".
806       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
807 alias in your environment])
808    fi
809
810    test "$[2]" = conftest.file
811    )
812 then
813    # Ok.
814    :
815 else
816    AC_MSG_ERROR([newly created file is older than distributed files!
817 Check your system clock])
818 fi
819 AC_MSG_RESULT(yes)])
820
821 # Copyright (C) 2009  Free Software Foundation, Inc.
822 #
823 # This file is free software; the Free Software Foundation
824 # gives unlimited permission to copy and/or distribute it,
825 # with or without modifications, as long as this notice is preserved.
826
827 # serial 1
828
829 # AM_SILENT_RULES([DEFAULT])
830 # --------------------------
831 # Enable less verbose build rules; with the default set to DEFAULT
832 # (`yes' being less verbose, `no' or empty being verbose).
833 AC_DEFUN([AM_SILENT_RULES],
834 [AC_ARG_ENABLE([silent-rules],
835 [  --enable-silent-rules          less verbose build output (undo: `make V=1')
836   --disable-silent-rules         verbose build output (undo: `make V=0')])
837 case $enable_silent_rules in
838 yes) AM_DEFAULT_VERBOSITY=0;;
839 no)  AM_DEFAULT_VERBOSITY=1;;
840 *)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
841 esac
842 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
843 AM_BACKSLASH='\'
844 AC_SUBST([AM_BACKSLASH])dnl
845 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
846 ])
847
848 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
849 #
850 # This file is free software; the Free Software Foundation
851 # gives unlimited permission to copy and/or distribute it,
852 # with or without modifications, as long as this notice is preserved.
853
854 # AM_PROG_INSTALL_STRIP
855 # ---------------------
856 # One issue with vendor `install' (even GNU) is that you can't
857 # specify the program used to strip binaries.  This is especially
858 # annoying in cross-compiling environments, where the build's strip
859 # is unlikely to handle the host's binaries.
860 # Fortunately install-sh will honor a STRIPPROG variable, so we
861 # always use install-sh in `make install-strip', and initialize
862 # STRIPPROG with the value of the STRIP variable (set by the user).
863 AC_DEFUN([AM_PROG_INSTALL_STRIP],
864 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
865 # Installed binaries are usually stripped using `strip' when the user
866 # run `make install-strip'.  However `strip' might not be the right
867 # tool to use in cross-compilation environments, therefore Automake
868 # will honor the `STRIP' environment variable to overrule this program.
869 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
870 if test "$cross_compiling" != no; then
871   AC_CHECK_TOOL([STRIP], [strip], :)
872 fi
873 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
874 AC_SUBST([INSTALL_STRIP_PROGRAM])])
875
876 # Copyright (C) 2006, 2008  Free Software Foundation, Inc.
877 #
878 # This file is free software; the Free Software Foundation
879 # gives unlimited permission to copy and/or distribute it,
880 # with or without modifications, as long as this notice is preserved.
881
882 # serial 2
883
884 # _AM_SUBST_NOTMAKE(VARIABLE)
885 # ---------------------------
886 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
887 # This macro is traced by Automake.
888 AC_DEFUN([_AM_SUBST_NOTMAKE])
889
890 # AM_SUBST_NOTMAKE(VARIABLE)
891 # ---------------------------
892 # Public sister of _AM_SUBST_NOTMAKE.
893 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
894
895 # Check how to create a tarball.                            -*- Autoconf -*-
896
897 # Copyright (C) 2004, 2005  Free Software Foundation, Inc.
898 #
899 # This file is free software; the Free Software Foundation
900 # gives unlimited permission to copy and/or distribute it,
901 # with or without modifications, as long as this notice is preserved.
902
903 # serial 2
904
905 # _AM_PROG_TAR(FORMAT)
906 # --------------------
907 # Check how to create a tarball in format FORMAT.
908 # FORMAT should be one of `v7', `ustar', or `pax'.
909 #
910 # Substitute a variable $(am__tar) that is a command
911 # writing to stdout a FORMAT-tarball containing the directory
912 # $tardir.
913 #     tardir=directory && $(am__tar) > result.tar
914 #
915 # Substitute a variable $(am__untar) that extract such
916 # a tarball read from stdin.
917 #     $(am__untar) < result.tar
918 AC_DEFUN([_AM_PROG_TAR],
919 [# Always define AMTAR for backward compatibility.
920 AM_MISSING_PROG([AMTAR], [tar])
921 m4_if([$1], [v7],
922      [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
923      [m4_case([$1], [ustar],, [pax],,
924               [m4_fatal([Unknown tar format])])
925 AC_MSG_CHECKING([how to create a $1 tar archive])
926 # Loop over all known methods to create a tar archive until one works.
927 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
928 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
929 # Do not fold the above two line into one, because Tru64 sh and
930 # Solaris sh will not grok spaces in the rhs of `-'.
931 for _am_tool in $_am_tools
932 do
933   case $_am_tool in
934   gnutar)
935     for _am_tar in tar gnutar gtar;
936     do
937       AM_RUN_LOG([$_am_tar --version]) && break
938     done
939     am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
940     am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
941     am__untar="$_am_tar -xf -"
942     ;;
943   plaintar)
944     # Must skip GNU tar: if it does not support --format= it doesn't create
945     # ustar tarball either.
946     (tar --version) >/dev/null 2>&1 && continue
947     am__tar='tar chf - "$$tardir"'
948     am__tar_='tar chf - "$tardir"'
949     am__untar='tar xf -'
950     ;;
951   pax)
952     am__tar='pax -L -x $1 -w "$$tardir"'
953     am__tar_='pax -L -x $1 -w "$tardir"'
954     am__untar='pax -r'
955     ;;
956   cpio)
957     am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
958     am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
959     am__untar='cpio -i -H $1 -d'
960     ;;
961   none)
962     am__tar=false
963     am__tar_=false
964     am__untar=false
965     ;;
966   esac
967
968   # If the value was cached, stop now.  We just wanted to have am__tar
969   # and am__untar set.
970   test -n "${am_cv_prog_tar_$1}" && break
971
972   # tar/untar a dummy directory, and stop if the command works
973   rm -rf conftest.dir
974   mkdir conftest.dir
975   echo GrepMe > conftest.dir/file
976   AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
977   rm -rf conftest.dir
978   if test -s conftest.tar; then
979     AM_RUN_LOG([$am__untar <conftest.tar])
980     grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
981   fi
982 done
983 rm -rf conftest.dir
984
985 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
986 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
987 AC_SUBST([am__tar])
988 AC_SUBST([am__untar])
989 ]) # _AM_PROG_TAR
990
991 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
992 #
993 #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
994 #                 2006, 2007, 2008 Free Software Foundation, Inc.
995 #   Written by Gordon Matzigkeit, 1996
996 #
997 # This file is free software; the Free Software Foundation gives
998 # unlimited permission to copy and/or distribute it, with or without
999 # modifications, as long as this notice is preserved.
1000
1001 m4_define([_LT_COPYING], [dnl
1002 #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1003 #                 2006, 2007, 2008 Free Software Foundation, Inc.
1004 #   Written by Gordon Matzigkeit, 1996
1005 #
1006 #   This file is part of GNU Libtool.
1007 #
1008 # GNU Libtool is free software; you can redistribute it and/or
1009 # modify it under the terms of the GNU General Public License as
1010 # published by the Free Software Foundation; either version 2 of
1011 # the License, or (at your option) any later version.
1012 #
1013 # As a special exception to the GNU General Public License,
1014 # if you distribute this file as part of a program or library that
1015 # is built using GNU Libtool, you may include this file under the
1016 # same distribution terms that you use for the rest of that program.
1017 #
1018 # GNU Libtool is distributed in the hope that it will be useful,
1019 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1020 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1021 # GNU General Public License for more details.
1022 #
1023 # You should have received a copy of the GNU General Public License
1024 # along with GNU Libtool; see the file COPYING.  If not, a copy
1025 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
1026 # obtained by writing to the Free Software Foundation, Inc.,
1027 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1028 ])
1029
1030 # serial 56 LT_INIT
1031
1032
1033 # LT_PREREQ(VERSION)
1034 # ------------------
1035 # Complain and exit if this libtool version is less that VERSION.
1036 m4_defun([LT_PREREQ],
1037 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
1038        [m4_default([$3],
1039                    [m4_fatal([Libtool version $1 or higher is required],
1040                              63)])],
1041        [$2])])
1042
1043
1044 # _LT_CHECK_BUILDDIR
1045 # ------------------
1046 # Complain if the absolute build directory name contains unusual characters
1047 m4_defun([_LT_CHECK_BUILDDIR],
1048 [case `pwd` in
1049   *\ * | *\     *)
1050     AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
1051 esac
1052 ])
1053
1054
1055 # LT_INIT([OPTIONS])
1056 # ------------------
1057 AC_DEFUN([LT_INIT],
1058 [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
1059 AC_BEFORE([$0], [LT_LANG])dnl
1060 AC_BEFORE([$0], [LT_OUTPUT])dnl
1061 AC_BEFORE([$0], [LTDL_INIT])dnl
1062 m4_require([_LT_CHECK_BUILDDIR])dnl
1063
1064 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
1065 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
1066 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
1067 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
1068 dnl unless we require an AC_DEFUNed macro:
1069 AC_REQUIRE([LTOPTIONS_VERSION])dnl
1070 AC_REQUIRE([LTSUGAR_VERSION])dnl
1071 AC_REQUIRE([LTVERSION_VERSION])dnl
1072 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
1073 m4_require([_LT_PROG_LTMAIN])dnl
1074
1075 dnl Parse OPTIONS
1076 _LT_SET_OPTIONS([$0], [$1])
1077
1078 # This can be used to rebuild libtool when needed
1079 LIBTOOL_DEPS="$ltmain"
1080
1081 # Always use our own libtool.
1082 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1083 AC_SUBST(LIBTOOL)dnl
1084
1085 _LT_SETUP
1086
1087 # Only expand once:
1088 m4_define([LT_INIT])
1089 ])# LT_INIT
1090
1091 # Old names:
1092 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
1093 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
1094 dnl aclocal-1.4 backwards compatibility:
1095 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
1096 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
1097
1098
1099 # _LT_CC_BASENAME(CC)
1100 # -------------------
1101 # Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
1102 m4_defun([_LT_CC_BASENAME],
1103 [for cc_temp in $1""; do
1104   case $cc_temp in
1105     compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1106     distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1107     \-*) ;;
1108     *) break;;
1109   esac
1110 done
1111 cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
1112 ])
1113
1114
1115 # _LT_FILEUTILS_DEFAULTS
1116 # ----------------------
1117 # It is okay to use these file commands and assume they have been set
1118 # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
1119 m4_defun([_LT_FILEUTILS_DEFAULTS],
1120 [: ${CP="cp -f"}
1121 : ${MV="mv -f"}
1122 : ${RM="rm -f"}
1123 ])# _LT_FILEUTILS_DEFAULTS
1124
1125
1126 # _LT_SETUP
1127 # ---------
1128 m4_defun([_LT_SETUP],
1129 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1130 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1131 _LT_DECL([], [host_alias], [0], [The host system])dnl
1132 _LT_DECL([], [host], [0])dnl
1133 _LT_DECL([], [host_os], [0])dnl
1134 dnl
1135 _LT_DECL([], [build_alias], [0], [The build system])dnl
1136 _LT_DECL([], [build], [0])dnl
1137 _LT_DECL([], [build_os], [0])dnl
1138 dnl
1139 AC_REQUIRE([AC_PROG_CC])dnl
1140 AC_REQUIRE([LT_PATH_LD])dnl
1141 AC_REQUIRE([LT_PATH_NM])dnl
1142 dnl
1143 AC_REQUIRE([AC_PROG_LN_S])dnl
1144 test -z "$LN_S" && LN_S="ln -s"
1145 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
1146 dnl
1147 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
1148 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
1149 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
1150 dnl
1151 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1152 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
1153 m4_require([_LT_CMD_RELOAD])dnl
1154 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
1155 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
1156 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
1157
1158 _LT_CONFIG_LIBTOOL_INIT([
1159 # See if we are running on zsh, and set the options which allow our
1160 # commands through without removal of \ escapes INIT.
1161 if test -n "\${ZSH_VERSION+set}" ; then
1162    setopt NO_GLOB_SUBST
1163 fi
1164 ])
1165 if test -n "${ZSH_VERSION+set}" ; then
1166    setopt NO_GLOB_SUBST
1167 fi
1168
1169 _LT_CHECK_OBJDIR
1170
1171 m4_require([_LT_TAG_COMPILER])dnl
1172 _LT_PROG_ECHO_BACKSLASH
1173
1174 case $host_os in
1175 aix3*)
1176   # AIX sometimes has problems with the GCC collect2 program.  For some
1177   # reason, if we set the COLLECT_NAMES environment variable, the problems
1178   # vanish in a puff of smoke.
1179   if test "X${COLLECT_NAMES+set}" != Xset; then
1180     COLLECT_NAMES=
1181     export COLLECT_NAMES
1182   fi
1183   ;;
1184 esac
1185
1186 # Sed substitution that helps us do robust quoting.  It backslashifies
1187 # metacharacters that are still active within double-quoted strings.
1188 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
1189
1190 # Same as above, but do not quote variable references.
1191 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
1192
1193 # Sed substitution to delay expansion of an escaped shell variable in a
1194 # double_quote_subst'ed string.
1195 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1196
1197 # Sed substitution to delay expansion of an escaped single quote.
1198 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
1199
1200 # Sed substitution to avoid accidental globbing in evaled expressions
1201 no_glob_subst='s/\*/\\\*/g'
1202
1203 # Global variables:
1204 ofile=libtool
1205 can_build_shared=yes
1206
1207 # All known linkers require a `.a' archive for static linking (except MSVC,
1208 # which needs '.lib').
1209 libext=a
1210
1211 with_gnu_ld="$lt_cv_prog_gnu_ld"
1212
1213 old_CC="$CC"
1214 old_CFLAGS="$CFLAGS"
1215
1216 # Set sane defaults for various variables
1217 test -z "$CC" && CC=cc
1218 test -z "$LTCC" && LTCC=$CC
1219 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
1220 test -z "$LD" && LD=ld
1221 test -z "$ac_objext" && ac_objext=o
1222
1223 _LT_CC_BASENAME([$compiler])
1224
1225 # Only perform the check for file, if the check method requires it
1226 test -z "$MAGIC_CMD" && MAGIC_CMD=file
1227 case $deplibs_check_method in
1228 file_magic*)
1229   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1230     _LT_PATH_MAGIC
1231   fi
1232   ;;
1233 esac
1234
1235 # Use C for the default configuration in the libtool script
1236 LT_SUPPORTED_TAG([CC])
1237 _LT_LANG_C_CONFIG
1238 _LT_LANG_DEFAULT_CONFIG
1239 _LT_CONFIG_COMMANDS
1240 ])# _LT_SETUP
1241
1242
1243 # _LT_PROG_LTMAIN
1244 # ---------------
1245 # Note that this code is called both from `configure', and `config.status'
1246 # now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
1247 # `config.status' has no value for ac_aux_dir unless we are using Automake,
1248 # so we pass a copy along to make sure it has a sensible value anyway.
1249 m4_defun([_LT_PROG_LTMAIN],
1250 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
1251 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
1252 ltmain="$ac_aux_dir/ltmain.sh"
1253 ])# _LT_PROG_LTMAIN
1254
1255
1256
1257 # So that we can recreate a full libtool script including additional
1258 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
1259 # in macros and then make a single call at the end using the `libtool'
1260 # label.
1261
1262
1263 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
1264 # ----------------------------------------
1265 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1266 m4_define([_LT_CONFIG_LIBTOOL_INIT],
1267 [m4_ifval([$1],
1268           [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
1269                      [$1
1270 ])])])
1271
1272 # Initialize.
1273 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
1274
1275
1276 # _LT_CONFIG_LIBTOOL([COMMANDS])
1277 # ------------------------------
1278 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1279 m4_define([_LT_CONFIG_LIBTOOL],
1280 [m4_ifval([$1],
1281           [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
1282                      [$1
1283 ])])])
1284
1285 # Initialize.
1286 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
1287
1288
1289 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
1290 # -----------------------------------------------------
1291 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
1292 [_LT_CONFIG_LIBTOOL([$1])
1293 _LT_CONFIG_LIBTOOL_INIT([$2])
1294 ])
1295
1296
1297 # _LT_FORMAT_COMMENT([COMMENT])
1298 # -----------------------------
1299 # Add leading comment marks to the start of each line, and a trailing
1300 # full-stop to the whole comment if one is not present already.
1301 m4_define([_LT_FORMAT_COMMENT],
1302 [m4_ifval([$1], [
1303 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
1304               [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
1305 )])
1306
1307
1308
1309
1310
1311 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
1312 # -------------------------------------------------------------------
1313 # CONFIGNAME is the name given to the value in the libtool script.
1314 # VARNAME is the (base) name used in the configure script.
1315 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
1316 # VARNAME.  Any other value will be used directly.
1317 m4_define([_LT_DECL],
1318 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
1319     [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
1320         [m4_ifval([$1], [$1], [$2])])
1321     lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
1322     m4_ifval([$4],
1323         [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
1324     lt_dict_add_subkey([lt_decl_dict], [$2],
1325         [tagged?], [m4_ifval([$5], [yes], [no])])])
1326 ])
1327
1328
1329 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
1330 # --------------------------------------------------------
1331 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
1332
1333
1334 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
1335 # ------------------------------------------------
1336 m4_define([lt_decl_tag_varnames],
1337 [_lt_decl_filter([tagged?], [yes], $@)])
1338
1339
1340 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
1341 # ---------------------------------------------------------
1342 m4_define([_lt_decl_filter],
1343 [m4_case([$#],
1344   [0], [m4_fatal([$0: too few arguments: $#])],
1345   [1], [m4_fatal([$0: too few arguments: $#: $1])],
1346   [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
1347   [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
1348   [lt_dict_filter([lt_decl_dict], $@)])[]dnl
1349 ])
1350
1351
1352 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
1353 # --------------------------------------------------
1354 m4_define([lt_decl_quote_varnames],
1355 [_lt_decl_filter([value], [1], $@)])
1356
1357
1358 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
1359 # ---------------------------------------------------
1360 m4_define([lt_decl_dquote_varnames],
1361 [_lt_decl_filter([value], [2], $@)])
1362
1363
1364 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
1365 # ---------------------------------------------------
1366 m4_define([lt_decl_varnames_tagged],
1367 [m4_assert([$# <= 2])dnl
1368 _$0(m4_quote(m4_default([$1], [[, ]])),
1369     m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
1370     m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
1371 m4_define([_lt_decl_varnames_tagged],
1372 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
1373
1374
1375 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
1376 # ------------------------------------------------
1377 m4_define([lt_decl_all_varnames],
1378 [_$0(m4_quote(m4_default([$1], [[, ]])),
1379      m4_if([$2], [],
1380            m4_quote(lt_decl_varnames),
1381         m4_quote(m4_shift($@))))[]dnl
1382 ])
1383 m4_define([_lt_decl_all_varnames],
1384 [lt_join($@, lt_decl_varnames_tagged([$1],
1385                         lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
1386 ])
1387
1388
1389 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
1390 # ------------------------------------
1391 # Quote a variable value, and forward it to `config.status' so that its
1392 # declaration there will have the same value as in `configure'.  VARNAME
1393 # must have a single quote delimited value for this to work.
1394 m4_define([_LT_CONFIG_STATUS_DECLARE],
1395 [$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
1396
1397
1398 # _LT_CONFIG_STATUS_DECLARATIONS
1399 # ------------------------------
1400 # We delimit libtool config variables with single quotes, so when
1401 # we write them to config.status, we have to be sure to quote all
1402 # embedded single quotes properly.  In configure, this macro expands
1403 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
1404 #
1405 #    <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
1406 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
1407 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
1408     [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
1409
1410
1411 # _LT_LIBTOOL_TAGS
1412 # ----------------
1413 # Output comment and list of tags supported by the script
1414 m4_defun([_LT_LIBTOOL_TAGS],
1415 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
1416 available_tags="_LT_TAGS"dnl
1417 ])
1418
1419
1420 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
1421 # -----------------------------------
1422 # Extract the dictionary values for VARNAME (optionally with TAG) and
1423 # expand to a commented shell variable setting:
1424 #
1425 #    # Some comment about what VAR is for.
1426 #    visible_name=$lt_internal_name
1427 m4_define([_LT_LIBTOOL_DECLARE],
1428 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
1429                                            [description])))[]dnl
1430 m4_pushdef([_libtool_name],
1431     m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
1432 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
1433     [0], [_libtool_name=[$]$1],
1434     [1], [_libtool_name=$lt_[]$1],
1435     [2], [_libtool_name=$lt_[]$1],
1436     [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
1437 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
1438 ])
1439
1440
1441 # _LT_LIBTOOL_CONFIG_VARS
1442 # -----------------------
1443 # Produce commented declarations of non-tagged libtool config variables
1444 # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
1445 # script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
1446 # section) are produced by _LT_LIBTOOL_TAG_VARS.
1447 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
1448 [m4_foreach([_lt_var],
1449     m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
1450     [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
1451
1452
1453 # _LT_LIBTOOL_TAG_VARS(TAG)
1454 # -------------------------
1455 m4_define([_LT_LIBTOOL_TAG_VARS],
1456 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
1457     [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
1458
1459
1460 # _LT_TAGVAR(VARNAME, [TAGNAME])
1461 # ------------------------------
1462 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
1463
1464
1465 # _LT_CONFIG_COMMANDS
1466 # -------------------
1467 # Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
1468 # variables for single and double quote escaping we saved from calls
1469 # to _LT_DECL, we can put quote escaped variables declarations
1470 # into `config.status', and then the shell code to quote escape them in
1471 # for loops in `config.status'.  Finally, any additional code accumulated
1472 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
1473 m4_defun([_LT_CONFIG_COMMANDS],
1474 [AC_PROVIDE_IFELSE([LT_OUTPUT],
1475         dnl If the libtool generation code has been placed in $CONFIG_LT,
1476         dnl instead of duplicating it all over again into config.status,
1477         dnl then we will have config.status run $CONFIG_LT later, so it
1478         dnl needs to know what name is stored there:
1479         [AC_CONFIG_COMMANDS([libtool],
1480             [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
1481     dnl If the libtool generation code is destined for config.status,
1482     dnl expand the accumulated commands and init code now:
1483     [AC_CONFIG_COMMANDS([libtool],
1484         [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
1485 ])#_LT_CONFIG_COMMANDS
1486
1487
1488 # Initialize.
1489 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
1490 [
1491
1492 # The HP-UX ksh and POSIX shell print the target directory to stdout
1493 # if CDPATH is set.
1494 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1495
1496 sed_quote_subst='$sed_quote_subst'
1497 double_quote_subst='$double_quote_subst'
1498 delay_variable_subst='$delay_variable_subst'
1499 _LT_CONFIG_STATUS_DECLARATIONS
1500 LTCC='$LTCC'
1501 LTCFLAGS='$LTCFLAGS'
1502 compiler='$compiler_DEFAULT'
1503
1504 # Quote evaled strings.
1505 for var in lt_decl_all_varnames([[ \
1506 ]], lt_decl_quote_varnames); do
1507     case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
1508     *[[\\\\\\\`\\"\\\$]]*)
1509       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
1510       ;;
1511     *)
1512       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1513       ;;
1514     esac
1515 done
1516
1517 # Double-quote double-evaled strings.
1518 for var in lt_decl_all_varnames([[ \
1519 ]], lt_decl_dquote_varnames); do
1520     case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
1521     *[[\\\\\\\`\\"\\\$]]*)
1522       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
1523       ;;
1524     *)
1525       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1526       ;;
1527     esac
1528 done
1529
1530 # Fix-up fallback echo if it was mangled by the above quoting rules.
1531 case \$lt_ECHO in
1532 *'\\\[$]0 --fallback-echo"')dnl "
1533   lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
1534   ;;
1535 esac
1536
1537 _LT_OUTPUT_LIBTOOL_INIT
1538 ])
1539
1540
1541 # LT_OUTPUT
1542 # ---------
1543 # This macro allows early generation of the libtool script (before
1544 # AC_OUTPUT is called), incase it is used in configure for compilation
1545 # tests.
1546 AC_DEFUN([LT_OUTPUT],
1547 [: ${CONFIG_LT=./config.lt}
1548 AC_MSG_NOTICE([creating $CONFIG_LT])
1549 cat >"$CONFIG_LT" <<_LTEOF
1550 #! $SHELL
1551 # Generated by $as_me.
1552 # Run this file to recreate a libtool stub with the current configuration.
1553
1554 lt_cl_silent=false
1555 SHELL=\${CONFIG_SHELL-$SHELL}
1556 _LTEOF
1557
1558 cat >>"$CONFIG_LT" <<\_LTEOF
1559 AS_SHELL_SANITIZE
1560 _AS_PREPARE
1561
1562 exec AS_MESSAGE_FD>&1
1563 exec AS_MESSAGE_LOG_FD>>config.log
1564 {
1565   echo
1566   AS_BOX([Running $as_me.])
1567 } >&AS_MESSAGE_LOG_FD
1568
1569 lt_cl_help="\
1570 \`$as_me' creates a local libtool stub from the current configuration,
1571 for use in further configure time tests before the real libtool is
1572 generated.
1573
1574 Usage: $[0] [[OPTIONS]]
1575
1576   -h, --help      print this help, then exit
1577   -V, --version   print version number, then exit
1578   -q, --quiet     do not print progress messages
1579   -d, --debug     don't remove temporary files
1580
1581 Report bugs to <bug-libtool@gnu.org>."
1582
1583 lt_cl_version="\
1584 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
1585 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
1586 configured by $[0], generated by m4_PACKAGE_STRING.
1587
1588 Copyright (C) 2008 Free Software Foundation, Inc.
1589 This config.lt script is free software; the Free Software Foundation
1590 gives unlimited permision to copy, distribute and modify it."
1591
1592 while test $[#] != 0
1593 do
1594   case $[1] in
1595     --version | --v* | -V )
1596       echo "$lt_cl_version"; exit 0 ;;
1597     --help | --h* | -h )
1598       echo "$lt_cl_help"; exit 0 ;;
1599     --debug | --d* | -d )
1600       debug=: ;;
1601     --quiet | --q* | --silent | --s* | -q )
1602       lt_cl_silent=: ;;
1603
1604     -*) AC_MSG_ERROR([unrecognized option: $[1]
1605 Try \`$[0] --help' for more information.]) ;;
1606
1607     *) AC_MSG_ERROR([unrecognized argument: $[1]
1608 Try \`$[0] --help' for more information.]) ;;
1609   esac
1610   shift
1611 done
1612
1613 if $lt_cl_silent; then
1614   exec AS_MESSAGE_FD>/dev/null
1615 fi
1616 _LTEOF
1617
1618 cat >>"$CONFIG_LT" <<_LTEOF
1619 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
1620 _LTEOF
1621
1622 cat >>"$CONFIG_LT" <<\_LTEOF
1623 AC_MSG_NOTICE([creating $ofile])
1624 _LT_OUTPUT_LIBTOOL_COMMANDS
1625 AS_EXIT(0)
1626 _LTEOF
1627 chmod +x "$CONFIG_LT"
1628
1629 # configure is writing to config.log, but config.lt does its own redirection,
1630 # appending to config.log, which fails on DOS, as config.log is still kept
1631 # open by configure.  Here we exec the FD to /dev/null, effectively closing
1632 # config.log, so it can be properly (re)opened and appended to by config.lt.
1633 if test "$no_create" != yes; then
1634   lt_cl_success=:
1635   test "$silent" = yes &&
1636     lt_config_lt_args="$lt_config_lt_args --quiet"
1637   exec AS_MESSAGE_LOG_FD>/dev/null
1638   $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
1639   exec AS_MESSAGE_LOG_FD>>config.log
1640   $lt_cl_success || AS_EXIT(1)
1641 fi
1642 ])# LT_OUTPUT
1643
1644
1645 # _LT_CONFIG(TAG)
1646 # ---------------
1647 # If TAG is the built-in tag, create an initial libtool script with a
1648 # default configuration from the untagged config vars.  Otherwise add code
1649 # to config.status for appending the configuration named by TAG from the
1650 # matching tagged config vars.
1651 m4_defun([_LT_CONFIG],
1652 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1653 _LT_CONFIG_SAVE_COMMANDS([
1654   m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
1655   m4_if(_LT_TAG, [C], [
1656     # See if we are running on zsh, and set the options which allow our
1657     # commands through without removal of \ escapes.
1658     if test -n "${ZSH_VERSION+set}" ; then
1659       setopt NO_GLOB_SUBST
1660     fi
1661
1662     cfgfile="${ofile}T"
1663     trap "$RM \"$cfgfile\"; exit 1" 1 2 15
1664     $RM "$cfgfile"
1665
1666     cat <<_LT_EOF >> "$cfgfile"
1667 #! $SHELL
1668
1669 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
1670 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
1671 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1672 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
1673 #
1674 _LT_COPYING
1675 _LT_LIBTOOL_TAGS
1676
1677 # ### BEGIN LIBTOOL CONFIG
1678 _LT_LIBTOOL_CONFIG_VARS
1679 _LT_LIBTOOL_TAG_VARS
1680 # ### END LIBTOOL CONFIG
1681
1682 _LT_EOF
1683
1684   case $host_os in
1685   aix3*)
1686     cat <<\_LT_EOF >> "$cfgfile"
1687 # AIX sometimes has problems with the GCC collect2 program.  For some
1688 # reason, if we set the COLLECT_NAMES environment variable, the problems
1689 # vanish in a puff of smoke.
1690 if test "X${COLLECT_NAMES+set}" != Xset; then
1691   COLLECT_NAMES=
1692   export COLLECT_NAMES
1693 fi
1694 _LT_EOF
1695     ;;
1696   esac
1697
1698   _LT_PROG_LTMAIN
1699
1700   # We use sed instead of cat because bash on DJGPP gets confused if
1701   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
1702   # text mode, it properly converts lines to CR/LF.  This bash problem
1703   # is reportedly fixed, but why not run on old versions too?
1704   sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
1705     || (rm -f "$cfgfile"; exit 1)
1706
1707   _LT_PROG_XSI_SHELLFNS
1708
1709   sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
1710     || (rm -f "$cfgfile"; exit 1)
1711
1712   mv -f "$cfgfile" "$ofile" ||
1713     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
1714   chmod +x "$ofile"
1715 ],
1716 [cat <<_LT_EOF >> "$ofile"
1717
1718 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
1719 dnl in a comment (ie after a #).
1720 # ### BEGIN LIBTOOL TAG CONFIG: $1
1721 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
1722 # ### END LIBTOOL TAG CONFIG: $1
1723 _LT_EOF
1724 ])dnl /m4_if
1725 ],
1726 [m4_if([$1], [], [
1727     PACKAGE='$PACKAGE'
1728     VERSION='$VERSION'
1729     TIMESTAMP='$TIMESTAMP'
1730     RM='$RM'
1731     ofile='$ofile'], [])
1732 ])dnl /_LT_CONFIG_SAVE_COMMANDS
1733 ])# _LT_CONFIG
1734
1735
1736 # LT_SUPPORTED_TAG(TAG)
1737 # ---------------------
1738 # Trace this macro to discover what tags are supported by the libtool
1739 # --tag option, using:
1740 #    autoconf --trace 'LT_SUPPORTED_TAG:$1'
1741 AC_DEFUN([LT_SUPPORTED_TAG], [])
1742
1743
1744 # C support is built-in for now
1745 m4_define([_LT_LANG_C_enabled], [])
1746 m4_define([_LT_TAGS], [])
1747
1748
1749 # LT_LANG(LANG)
1750 # -------------
1751 # Enable libtool support for the given language if not already enabled.
1752 AC_DEFUN([LT_LANG],
1753 [AC_BEFORE([$0], [LT_OUTPUT])dnl
1754 m4_case([$1],
1755   [C],                  [_LT_LANG(C)],
1756   [C++],                [_LT_LANG(CXX)],
1757   [Java],               [_LT_LANG(GCJ)],
1758   [Fortran 77],         [_LT_LANG(F77)],
1759   [Fortran],            [_LT_LANG(FC)],
1760   [Windows Resource],   [_LT_LANG(RC)],
1761   [m4_ifdef([_LT_LANG_]$1[_CONFIG],
1762     [_LT_LANG($1)],
1763     [m4_fatal([$0: unsupported language: "$1"])])])dnl
1764 ])# LT_LANG
1765
1766
1767 # _LT_LANG(LANGNAME)
1768 # ------------------
1769 m4_defun([_LT_LANG],
1770 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
1771   [LT_SUPPORTED_TAG([$1])dnl
1772   m4_append([_LT_TAGS], [$1 ])dnl
1773   m4_define([_LT_LANG_]$1[_enabled], [])dnl
1774   _LT_LANG_$1_CONFIG($1)])dnl
1775 ])# _LT_LANG
1776
1777
1778 # _LT_LANG_DEFAULT_CONFIG
1779 # -----------------------
1780 m4_defun([_LT_LANG_DEFAULT_CONFIG],
1781 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
1782   [LT_LANG(CXX)],
1783   [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
1784
1785 AC_PROVIDE_IFELSE([AC_PROG_F77],
1786   [LT_LANG(F77)],
1787   [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
1788
1789 AC_PROVIDE_IFELSE([AC_PROG_FC],
1790   [LT_LANG(FC)],
1791   [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
1792
1793 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
1794 dnl pulling things in needlessly.
1795 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
1796   [LT_LANG(GCJ)],
1797   [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
1798     [LT_LANG(GCJ)],
1799     [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
1800       [LT_LANG(GCJ)],
1801       [m4_ifdef([AC_PROG_GCJ],
1802         [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
1803        m4_ifdef([A][M_PROG_GCJ],
1804         [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
1805        m4_ifdef([LT_PROG_GCJ],
1806         [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
1807
1808 AC_PROVIDE_IFELSE([LT_PROG_RC],
1809   [LT_LANG(RC)],
1810   [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
1811 ])# _LT_LANG_DEFAULT_CONFIG
1812
1813 # Obsolete macros:
1814 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
1815 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
1816 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
1817 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
1818 dnl aclocal-1.4 backwards compatibility:
1819 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
1820 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
1821 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
1822 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
1823
1824
1825 # _LT_TAG_COMPILER
1826 # ----------------
1827 m4_defun([_LT_TAG_COMPILER],
1828 [AC_REQUIRE([AC_PROG_CC])dnl
1829
1830 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
1831 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
1832 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
1833 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
1834
1835 # If no C compiler was specified, use CC.
1836 LTCC=${LTCC-"$CC"}
1837
1838 # If no C compiler flags were specified, use CFLAGS.
1839 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
1840
1841 # Allow CC to be a program name with arguments.
1842 compiler=$CC
1843 ])# _LT_TAG_COMPILER
1844
1845
1846 # _LT_COMPILER_BOILERPLATE
1847 # ------------------------
1848 # Check for compiler boilerplate output or warnings with
1849 # the simple compiler test code.
1850 m4_defun([_LT_COMPILER_BOILERPLATE],
1851 [m4_require([_LT_DECL_SED])dnl
1852 ac_outfile=conftest.$ac_objext
1853 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
1854 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1855 _lt_compiler_boilerplate=`cat conftest.err`
1856 $RM conftest*
1857 ])# _LT_COMPILER_BOILERPLATE
1858
1859
1860 # _LT_LINKER_BOILERPLATE
1861 # ----------------------
1862 # Check for linker boilerplate output or warnings with
1863 # the simple link test code.
1864 m4_defun([_LT_LINKER_BOILERPLATE],
1865 [m4_require([_LT_DECL_SED])dnl
1866 ac_outfile=conftest.$ac_objext
1867 echo "$lt_simple_link_test_code" >conftest.$ac_ext
1868 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1869 _lt_linker_boilerplate=`cat conftest.err`
1870 $RM -r conftest*
1871 ])# _LT_LINKER_BOILERPLATE
1872
1873 # _LT_REQUIRED_DARWIN_CHECKS
1874 # -------------------------
1875 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
1876   case $host_os in
1877     rhapsody* | darwin*)
1878     AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
1879     AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
1880     AC_CHECK_TOOL([LIPO], [lipo], [:])
1881     AC_CHECK_TOOL([OTOOL], [otool], [:])
1882     AC_CHECK_TOOL([OTOOL64], [otool64], [:])
1883     _LT_DECL([], [DSYMUTIL], [1],
1884       [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
1885     _LT_DECL([], [NMEDIT], [1],
1886       [Tool to change global to local symbols on Mac OS X])
1887     _LT_DECL([], [LIPO], [1],
1888       [Tool to manipulate fat objects and archives on Mac OS X])
1889     _LT_DECL([], [OTOOL], [1],
1890       [ldd/readelf like tool for Mach-O binaries on Mac OS X])
1891     _LT_DECL([], [OTOOL64], [1],
1892       [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
1893
1894     AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
1895       [lt_cv_apple_cc_single_mod=no
1896       if test -z "${LT_MULTI_MODULE}"; then
1897         # By default we will add the -single_module flag. You can override
1898         # by either setting the environment variable LT_MULTI_MODULE
1899         # non-empty at configure time, or by adding -multi_module to the
1900         # link flags.
1901         rm -rf libconftest.dylib*
1902         echo "int foo(void){return 1;}" > conftest.c
1903         echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1904 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
1905         $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1906           -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
1907         _lt_result=$?
1908         if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
1909           lt_cv_apple_cc_single_mod=yes
1910         else
1911           cat conftest.err >&AS_MESSAGE_LOG_FD
1912         fi
1913         rm -rf libconftest.dylib*
1914         rm -f conftest.*
1915       fi])
1916     AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1917       [lt_cv_ld_exported_symbols_list],
1918       [lt_cv_ld_exported_symbols_list=no
1919       save_LDFLAGS=$LDFLAGS
1920       echo "_main" > conftest.sym
1921       LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1922       AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1923         [lt_cv_ld_exported_symbols_list=yes],
1924         [lt_cv_ld_exported_symbols_list=no])
1925         LDFLAGS="$save_LDFLAGS"
1926     ])
1927     case $host_os in
1928     rhapsody* | darwin1.[[012]])
1929       _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
1930     darwin1.*)
1931       _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1932     darwin*) # darwin 5.x on
1933       # if running on 10.5 or later, the deployment target defaults
1934       # to the OS version, if on x86, and 10.4, the deployment
1935       # target defaults to 10.4. Don't you love it?
1936       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
1937         10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
1938           _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1939         10.[[012]]*)
1940           _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1941         10.*)
1942           _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1943       esac
1944     ;;
1945   esac
1946     if test "$lt_cv_apple_cc_single_mod" = "yes"; then
1947       _lt_dar_single_mod='$single_module'
1948     fi
1949     if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
1950       _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
1951     else
1952       _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
1953     fi
1954     if test "$DSYMUTIL" != ":"; then
1955       _lt_dsymutil='~$DSYMUTIL $lib || :'
1956     else
1957       _lt_dsymutil=
1958     fi
1959     ;;
1960   esac
1961 ])
1962
1963
1964 # _LT_DARWIN_LINKER_FEATURES
1965 # --------------------------
1966 # Checks for linker and compiler features on darwin
1967 m4_defun([_LT_DARWIN_LINKER_FEATURES],
1968 [
1969   m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1970   _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1971   _LT_TAGVAR(hardcode_direct, $1)=no
1972   _LT_TAGVAR(hardcode_automatic, $1)=yes
1973   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1974   _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1975   _LT_TAGVAR(link_all_deplibs, $1)=yes
1976   _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
1977   case $cc_basename in
1978      ifort*) _lt_dar_can_shared=yes ;;
1979      *) _lt_dar_can_shared=$GCC ;;
1980   esac
1981   if test "$_lt_dar_can_shared" = "yes"; then
1982     output_verbose_link_cmd=echo
1983     _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}"
1984     _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
1985     _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}"
1986     _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}"
1987     m4_if([$1], [CXX],
1988 [   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
1989       _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}"
1990       _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}"
1991     fi
1992 ],[])
1993   else
1994   _LT_TAGVAR(ld_shlibs, $1)=no
1995   fi
1996 ])
1997
1998 # _LT_SYS_MODULE_PATH_AIX
1999 # -----------------------
2000 # Links a minimal program and checks the executable
2001 # for the system default hardcoded library path. In most cases,
2002 # this is /usr/lib:/lib, but when the MPI compilers are used
2003 # the location of the communication and MPI libs are included too.
2004 # If we don't find anything, use the default library path according
2005 # to the aix ld manual.
2006 m4_defun([_LT_SYS_MODULE_PATH_AIX],
2007 [m4_require([_LT_DECL_SED])dnl
2008 AC_LINK_IFELSE(AC_LANG_PROGRAM,[
2009 lt_aix_libpath_sed='
2010     /Import File Strings/,/^$/ {
2011         /^0/ {
2012             s/^0  *\(.*\)$/\1/
2013             p
2014         }
2015     }'
2016 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2017 # Check for a 64-bit object if we didn't find anything.
2018 if test -z "$aix_libpath"; then
2019   aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2020 fi],[])
2021 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
2022 ])# _LT_SYS_MODULE_PATH_AIX
2023
2024
2025 # _LT_SHELL_INIT(ARG)
2026 # -------------------
2027 m4_define([_LT_SHELL_INIT],
2028 [ifdef([AC_DIVERSION_NOTICE],
2029              [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
2030          [AC_DIVERT_PUSH(NOTICE)])
2031 $1
2032 AC_DIVERT_POP
2033 ])# _LT_SHELL_INIT
2034
2035
2036 # _LT_PROG_ECHO_BACKSLASH
2037 # -----------------------
2038 # Add some code to the start of the generated configure script which
2039 # will find an echo command which doesn't interpret backslashes.
2040 m4_defun([_LT_PROG_ECHO_BACKSLASH],
2041 [_LT_SHELL_INIT([
2042 # Check that we are running under the correct shell.
2043 SHELL=${CONFIG_SHELL-/bin/sh}
2044
2045 case X$lt_ECHO in
2046 X*--fallback-echo)
2047   # Remove one level of quotation (which was required for Make).
2048   ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
2049   ;;
2050 esac
2051
2052 ECHO=${lt_ECHO-echo}
2053 if test "X[$]1" = X--no-reexec; then
2054   # Discard the --no-reexec flag, and continue.
2055   shift
2056 elif test "X[$]1" = X--fallback-echo; then
2057   # Avoid inline document here, it may be left over
2058   :
2059 elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
2060   # Yippee, $ECHO works!
2061   :
2062 else
2063   # Restart under the correct shell.
2064   exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
2065 fi
2066
2067 if test "X[$]1" = X--fallback-echo; then
2068   # used as fallback echo
2069   shift
2070   cat <<_LT_EOF
2071 [$]*
2072 _LT_EOF
2073   exit 0
2074 fi
2075
2076 # The HP-UX ksh and POSIX shell print the target directory to stdout
2077 # if CDPATH is set.
2078 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
2079
2080 if test -z "$lt_ECHO"; then
2081   if test "X${echo_test_string+set}" != Xset; then
2082     # find a string as large as possible, as long as the shell can cope with it
2083     for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
2084       # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
2085       if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
2086          { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
2087       then
2088         break
2089       fi
2090     done
2091   fi
2092
2093   if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
2094      echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
2095      test "X$echo_testing_string" = "X$echo_test_string"; then
2096     :
2097   else
2098     # The Solaris, AIX, and Digital Unix default echo programs unquote
2099     # backslashes.  This makes it impossible to quote backslashes using
2100     #   echo "$something" | sed 's/\\/\\\\/g'
2101     #
2102     # So, first we look for a working echo in the user's PATH.
2103
2104     lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2105     for dir in $PATH /usr/ucb; do
2106       IFS="$lt_save_ifs"
2107       if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
2108          test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
2109          echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
2110          test "X$echo_testing_string" = "X$echo_test_string"; then
2111         ECHO="$dir/echo"
2112         break
2113       fi
2114     done
2115     IFS="$lt_save_ifs"
2116
2117     if test "X$ECHO" = Xecho; then
2118       # We didn't find a better echo, so look for alternatives.
2119       if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
2120          echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
2121          test "X$echo_testing_string" = "X$echo_test_string"; then
2122         # This shell has a builtin print -r that does the trick.
2123         ECHO='print -r'
2124       elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
2125            test "X$CONFIG_SHELL" != X/bin/ksh; then
2126         # If we have ksh, try running configure again with it.
2127         ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
2128         export ORIGINAL_CONFIG_SHELL
2129         CONFIG_SHELL=/bin/ksh
2130         export CONFIG_SHELL
2131         exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
2132       else
2133         # Try using printf.
2134         ECHO='printf %s\n'
2135         if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
2136            echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
2137            test "X$echo_testing_string" = "X$echo_test_string"; then
2138           # Cool, printf works
2139           :
2140         elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
2141              test "X$echo_testing_string" = 'X\t' &&
2142              echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
2143              test "X$echo_testing_string" = "X$echo_test_string"; then
2144           CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
2145           export CONFIG_SHELL
2146           SHELL="$CONFIG_SHELL"
2147           export SHELL
2148           ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
2149         elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
2150              test "X$echo_testing_string" = 'X\t' &&
2151              echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
2152              test "X$echo_testing_string" = "X$echo_test_string"; then
2153           ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
2154         else
2155           # maybe with a smaller string...
2156           prev=:
2157
2158           for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
2159             if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
2160             then
2161               break
2162             fi
2163             prev="$cmd"
2164           done
2165
2166           if test "$prev" != 'sed 50q "[$]0"'; then
2167             echo_test_string=`eval $prev`
2168             export echo_test_string
2169             exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
2170           else
2171             # Oops.  We lost completely, so just stick with echo.
2172             ECHO=echo
2173           fi
2174         fi
2175       fi
2176     fi
2177   fi
2178 fi
2179
2180 # Copy echo and quote the copy suitably for passing to libtool from
2181 # the Makefile, instead of quoting the original, which is used later.
2182 lt_ECHO=$ECHO
2183 if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
2184    lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
2185 fi
2186
2187 AC_SUBST(lt_ECHO)
2188 ])
2189 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
2190 _LT_DECL([], [ECHO], [1],
2191     [An echo program that does not interpret backslashes])
2192 ])# _LT_PROG_ECHO_BACKSLASH
2193
2194
2195 # _LT_ENABLE_LOCK
2196 # ---------------
2197 m4_defun([_LT_ENABLE_LOCK],
2198 [AC_ARG_ENABLE([libtool-lock],
2199   [AS_HELP_STRING([--disable-libtool-lock],
2200     [avoid locking (might break parallel builds)])])
2201 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
2202
2203 # Some flags need to be propagated to the compiler or linker for good
2204 # libtool support.
2205 case $host in
2206 ia64-*-hpux*)
2207   # Find out which ABI we are using.
2208   echo 'int i;' > conftest.$ac_ext
2209   if AC_TRY_EVAL(ac_compile); then
2210     case `/usr/bin/file conftest.$ac_objext` in
2211       *ELF-32*)
2212         HPUX_IA64_MODE="32"
2213         ;;
2214       *ELF-64*)
2215         HPUX_IA64_MODE="64"
2216         ;;
2217     esac
2218   fi
2219   rm -rf conftest*
2220   ;;
2221 *-*-irix6*)
2222   # Find out which ABI we are using.
2223   echo '[#]line __oline__ "configure"' > conftest.$ac_ext
2224   if AC_TRY_EVAL(ac_compile); then
2225     if test "$lt_cv_prog_gnu_ld" = yes; then
2226       case `/usr/bin/file conftest.$ac_objext` in
2227         *32-bit*)
2228           LD="${LD-ld} -melf32bsmip"
2229           ;;
2230         *N32*)
2231           LD="${LD-ld} -melf32bmipn32"
2232           ;;
2233         *64-bit*)
2234           LD="${LD-ld} -melf64bmip"
2235         ;;
2236       esac
2237     else
2238       case `/usr/bin/file conftest.$ac_objext` in
2239         *32-bit*)
2240           LD="${LD-ld} -32"
2241           ;;
2242         *N32*)
2243           LD="${LD-ld} -n32"
2244           ;;
2245         *64-bit*)
2246           LD="${LD-ld} -64"
2247           ;;
2248       esac
2249     fi
2250   fi
2251   rm -rf conftest*
2252   ;;
2253
2254 x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
2255 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
2256   # Find out which ABI we are using.
2257   echo 'int i;' > conftest.$ac_ext
2258   if AC_TRY_EVAL(ac_compile); then
2259     case `/usr/bin/file conftest.o` in
2260       *32-bit*)
2261         case $host in
2262           x86_64-*kfreebsd*-gnu)
2263             LD="${LD-ld} -m elf_i386_fbsd"
2264             ;;
2265           x86_64-*linux*)
2266             LD="${LD-ld} -m elf_i386"
2267             ;;
2268           ppc64-*linux*|powerpc64-*linux*)
2269             LD="${LD-ld} -m elf32ppclinux"
2270             ;;
2271           s390x-*linux*)
2272             LD="${LD-ld} -m elf_s390"
2273             ;;
2274           sparc64-*linux*)
2275             LD="${LD-ld} -m elf32_sparc"
2276             ;;
2277         esac
2278         ;;
2279       *64-bit*)
2280         case $host in
2281           x86_64-*kfreebsd*-gnu)
2282             LD="${LD-ld} -m elf_x86_64_fbsd"
2283             ;;
2284           x86_64-*linux*)
2285             LD="${LD-ld} -m elf_x86_64"
2286             ;;
2287           ppc*-*linux*|powerpc*-*linux*)
2288             LD="${LD-ld} -m elf64ppc"
2289             ;;
2290           s390*-*linux*|s390*-*tpf*)
2291             LD="${LD-ld} -m elf64_s390"
2292             ;;
2293           sparc*-*linux*)
2294             LD="${LD-ld} -m elf64_sparc"
2295             ;;
2296         esac
2297         ;;
2298     esac
2299   fi
2300   rm -rf conftest*
2301   ;;
2302
2303 *-*-sco3.2v5*)
2304   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2305   SAVE_CFLAGS="$CFLAGS"
2306   CFLAGS="$CFLAGS -belf"
2307   AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
2308     [AC_LANG_PUSH(C)
2309      AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
2310      AC_LANG_POP])
2311   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2312     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2313     CFLAGS="$SAVE_CFLAGS"
2314   fi
2315   ;;
2316 sparc*-*solaris*)
2317   # Find out which ABI we are using.
2318   echo 'int i;' > conftest.$ac_ext
2319   if AC_TRY_EVAL(ac_compile); then
2320     case `/usr/bin/file conftest.o` in
2321     *64-bit*)
2322       case $lt_cv_prog_gnu_ld in
2323       yes*) LD="${LD-ld} -m elf64_sparc" ;;
2324       *)
2325         if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
2326           LD="${LD-ld} -64"
2327         fi
2328         ;;
2329       esac
2330       ;;
2331     esac
2332   fi
2333   rm -rf conftest*
2334   ;;
2335 esac
2336
2337 need_locks="$enable_libtool_lock"
2338 ])# _LT_ENABLE_LOCK
2339
2340
2341 # _LT_CMD_OLD_ARCHIVE
2342 # -------------------
2343 m4_defun([_LT_CMD_OLD_ARCHIVE],
2344 [AC_CHECK_TOOL(AR, ar, false)
2345 test -z "$AR" && AR=ar
2346 test -z "$AR_FLAGS" && AR_FLAGS=cru
2347 _LT_DECL([], [AR], [1], [The archiver])
2348 _LT_DECL([], [AR_FLAGS], [1])
2349
2350 AC_CHECK_TOOL(STRIP, strip, :)
2351 test -z "$STRIP" && STRIP=:
2352 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
2353
2354 AC_CHECK_TOOL(RANLIB, ranlib, :)
2355 test -z "$RANLIB" && RANLIB=:
2356 _LT_DECL([], [RANLIB], [1],
2357     [Commands used to install an old-style archive])
2358
2359 # Determine commands to create old-style static archives.
2360 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
2361 old_postinstall_cmds='chmod 644 $oldlib'
2362 old_postuninstall_cmds=
2363
2364 if test -n "$RANLIB"; then
2365   case $host_os in
2366   openbsd*)
2367     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
2368     ;;
2369   *)
2370     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
2371     ;;
2372   esac
2373   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
2374 fi
2375 _LT_DECL([], [old_postinstall_cmds], [2])
2376 _LT_DECL([], [old_postuninstall_cmds], [2])
2377 _LT_TAGDECL([], [old_archive_cmds], [2],
2378     [Commands used to build an old-style archive])
2379 ])# _LT_CMD_OLD_ARCHIVE
2380
2381
2382 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2383 #               [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
2384 # ----------------------------------------------------------------
2385 # Check whether the given compiler option works
2386 AC_DEFUN([_LT_COMPILER_OPTION],
2387 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2388 m4_require([_LT_DECL_SED])dnl
2389 AC_CACHE_CHECK([$1], [$2],
2390   [$2=no
2391    m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
2392    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2393    lt_compiler_flag="$3"
2394    # Insert the option either (1) after the last *FLAGS variable, or
2395    # (2) before a word containing "conftest.", or (3) at the end.
2396    # Note that $ac_compile itself does not contain backslashes and begins
2397    # with a dollar sign (not a hyphen), so the echo should work correctly.
2398    # The option is referenced via a variable to avoid confusing sed.
2399    lt_compile=`echo "$ac_compile" | $SED \
2400    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2401    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2402    -e 's:$: $lt_compiler_flag:'`
2403    (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2404    (eval "$lt_compile" 2>conftest.err)
2405    ac_status=$?
2406    cat conftest.err >&AS_MESSAGE_LOG_FD
2407    echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2408    if (exit $ac_status) && test -s "$ac_outfile"; then
2409      # The compiler can only warn and ignore the option if not recognized
2410      # So say no if there are warnings other than the usual output.
2411      $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
2412      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2413      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
2414        $2=yes
2415      fi
2416    fi
2417    $RM conftest*
2418 ])
2419
2420 if test x"[$]$2" = xyes; then
2421     m4_if([$5], , :, [$5])
2422 else
2423     m4_if([$6], , :, [$6])
2424 fi
2425 ])# _LT_COMPILER_OPTION
2426
2427 # Old name:
2428 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
2429 dnl aclocal-1.4 backwards compatibility:
2430 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
2431
2432
2433 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2434 #                  [ACTION-SUCCESS], [ACTION-FAILURE])
2435 # ----------------------------------------------------
2436 # Check whether the given linker option works
2437 AC_DEFUN([_LT_LINKER_OPTION],
2438 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2439 m4_require([_LT_DECL_SED])dnl
2440 AC_CACHE_CHECK([$1], [$2],
2441   [$2=no
2442    save_LDFLAGS="$LDFLAGS"
2443    LDFLAGS="$LDFLAGS $3"
2444    echo "$lt_simple_link_test_code" > conftest.$ac_ext
2445    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
2446      # The linker can only warn and ignore the option if not recognized
2447      # So say no if there are warnings
2448      if test -s conftest.err; then
2449        # Append any errors to the config.log.
2450        cat conftest.err 1>&AS_MESSAGE_LOG_FD
2451        $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
2452        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2453        if diff conftest.exp conftest.er2 >/dev/null; then
2454          $2=yes
2455        fi
2456      else
2457        $2=yes
2458      fi
2459    fi
2460    $RM -r conftest*
2461    LDFLAGS="$save_LDFLAGS"
2462 ])
2463
2464 if test x"[$]$2" = xyes; then
2465     m4_if([$4], , :, [$4])
2466 else
2467     m4_if([$5], , :, [$5])
2468 fi
2469 ])# _LT_LINKER_OPTION
2470
2471 # Old name:
2472 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
2473 dnl aclocal-1.4 backwards compatibility:
2474 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
2475
2476
2477 # LT_CMD_MAX_LEN
2478 #---------------
2479 AC_DEFUN([LT_CMD_MAX_LEN],
2480 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2481 # find the maximum length of command line arguments
2482 AC_MSG_CHECKING([the maximum length of command line arguments])
2483 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
2484   i=0
2485   teststring="ABCD"
2486
2487   case $build_os in
2488   msdosdjgpp*)
2489     # On DJGPP, this test can blow up pretty badly due to problems in libc
2490     # (any single argument exceeding 2000 bytes causes a buffer overrun
2491     # during glob expansion).  Even if it were fixed, the result of this
2492     # check would be larger than it should be.
2493     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
2494     ;;
2495
2496   gnu*)
2497     # Under GNU Hurd, this test is not required because there is
2498     # no limit to the length of command line arguments.
2499     # Libtool will interpret -1 as no limit whatsoever
2500     lt_cv_sys_max_cmd_len=-1;
2501     ;;
2502
2503   cygwin* | mingw* | cegcc*)
2504     # On Win9x/ME, this test blows up -- it succeeds, but takes
2505     # about 5 minutes as the teststring grows exponentially.
2506     # Worse, since 9x/ME are not pre-emptively multitasking,
2507     # you end up with a "frozen" computer, even though with patience
2508     # the test eventually succeeds (with a max line length of 256k).
2509     # Instead, let's just punt: use the minimum linelength reported by
2510     # all of the supported platforms: 8192 (on NT/2K/XP).
2511     lt_cv_sys_max_cmd_len=8192;
2512     ;;
2513
2514   amigaos*)
2515     # On AmigaOS with pdksh, this test takes hours, literally.
2516     # So we just punt and use a minimum line length of 8192.
2517     lt_cv_sys_max_cmd_len=8192;
2518     ;;
2519
2520   netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
2521     # This has been around since 386BSD, at least.  Likely further.
2522     if test -x /sbin/sysctl; then
2523       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
2524     elif test -x /usr/sbin/sysctl; then
2525       lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
2526     else
2527       lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
2528     fi
2529     # And add a safety zone
2530     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2531     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2532     ;;
2533
2534   interix*)
2535     # We know the value 262144 and hardcode it with a safety zone (like BSD)
2536     lt_cv_sys_max_cmd_len=196608
2537     ;;
2538
2539   osf*)
2540     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
2541     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
2542     # nice to cause kernel panics so lets avoid the loop below.
2543     # First set a reasonable default.
2544     lt_cv_sys_max_cmd_len=16384
2545     #
2546     if test -x /sbin/sysconfig; then
2547       case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
2548         *1*) lt_cv_sys_max_cmd_len=-1 ;;
2549       esac
2550     fi
2551     ;;
2552   sco3.2v5*)
2553     lt_cv_sys_max_cmd_len=102400
2554     ;;
2555   sysv5* | sco5v6* | sysv4.2uw2*)
2556     kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
2557     if test -n "$kargmax"; then
2558       lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[         ]]//'`
2559     else
2560       lt_cv_sys_max_cmd_len=32768
2561     fi
2562     ;;
2563   *)
2564     lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
2565     if test -n "$lt_cv_sys_max_cmd_len"; then
2566       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2567       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2568     else
2569       # Make teststring a little bigger before we do anything with it.
2570       # a 1K string should be a reasonable start.
2571       for i in 1 2 3 4 5 6 7 8 ; do
2572         teststring=$teststring$teststring
2573       done
2574       SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
2575       # If test is not a shell built-in, we'll probably end up computing a
2576       # maximum length that is only half of the actual maximum length, but
2577       # we can't tell.
2578       while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
2579                  = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
2580               test $i != 17 # 1/2 MB should be enough
2581       do
2582         i=`expr $i + 1`
2583         teststring=$teststring$teststring
2584       done
2585       # Only check the string length outside the loop.
2586       lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
2587       teststring=
2588       # Add a significant safety factor because C++ compilers can tack on
2589       # massive amounts of additional arguments before passing them to the
2590       # linker.  It appears as though 1/2 is a usable value.
2591       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
2592     fi
2593     ;;
2594   esac
2595 ])
2596 if test -n $lt_cv_sys_max_cmd_len ; then
2597   AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
2598 else
2599   AC_MSG_RESULT(none)
2600 fi
2601 max_cmd_len=$lt_cv_sys_max_cmd_len
2602 _LT_DECL([], [max_cmd_len], [0],
2603     [What is the maximum length of a command?])
2604 ])# LT_CMD_MAX_LEN
2605
2606 # Old name:
2607 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
2608 dnl aclocal-1.4 backwards compatibility:
2609 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
2610
2611
2612 # _LT_HEADER_DLFCN
2613 # ----------------
2614 m4_defun([_LT_HEADER_DLFCN],
2615 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
2616 ])# _LT_HEADER_DLFCN
2617
2618
2619 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
2620 #                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
2621 # ----------------------------------------------------------------
2622 m4_defun([_LT_TRY_DLOPEN_SELF],
2623 [m4_require([_LT_HEADER_DLFCN])dnl
2624 if test "$cross_compiling" = yes; then :
2625   [$4]
2626 else
2627   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2628   lt_status=$lt_dlunknown
2629   cat > conftest.$ac_ext <<_LT_EOF
2630 [#line __oline__ "configure"
2631 #include "confdefs.h"
2632
2633 #if HAVE_DLFCN_H
2634 #include <dlfcn.h>
2635 #endif
2636
2637 #include <stdio.h>
2638
2639 #ifdef RTLD_GLOBAL
2640 #  define LT_DLGLOBAL           RTLD_GLOBAL
2641 #else
2642 #  ifdef DL_GLOBAL
2643 #    define LT_DLGLOBAL         DL_GLOBAL
2644 #  else
2645 #    define LT_DLGLOBAL         0
2646 #  endif
2647 #endif
2648
2649 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
2650    find out it does not work in some platform. */
2651 #ifndef LT_DLLAZY_OR_NOW
2652 #  ifdef RTLD_LAZY
2653 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
2654 #  else
2655 #    ifdef DL_LAZY
2656 #      define LT_DLLAZY_OR_NOW          DL_LAZY
2657 #    else
2658 #      ifdef RTLD_NOW
2659 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
2660 #      else
2661 #        ifdef DL_NOW
2662 #          define LT_DLLAZY_OR_NOW      DL_NOW
2663 #        else
2664 #          define LT_DLLAZY_OR_NOW      0
2665 #        endif
2666 #      endif
2667 #    endif
2668 #  endif
2669 #endif
2670
2671 void fnord() { int i=42;}
2672 int main ()
2673 {
2674   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
2675   int status = $lt_dlunknown;
2676
2677   if (self)
2678     {
2679       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
2680       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
2681       /* dlclose (self); */
2682     }
2683   else
2684     puts (dlerror ());
2685
2686   return status;
2687 }]
2688 _LT_EOF
2689   if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
2690     (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
2691     lt_status=$?
2692     case x$lt_status in
2693       x$lt_dlno_uscore) $1 ;;
2694       x$lt_dlneed_uscore) $2 ;;
2695       x$lt_dlunknown|x*) $3 ;;
2696     esac
2697   else :
2698     # compilation failed
2699     $3
2700   fi
2701 fi
2702 rm -fr conftest*
2703 ])# _LT_TRY_DLOPEN_SELF
2704
2705
2706 # LT_SYS_DLOPEN_SELF
2707 # ------------------
2708 AC_DEFUN([LT_SYS_DLOPEN_SELF],
2709 [m4_require([_LT_HEADER_DLFCN])dnl
2710 if test "x$enable_dlopen" != xyes; then
2711   enable_dlopen=unknown
2712   enable_dlopen_self=unknown
2713   enable_dlopen_self_static=unknown
2714 else
2715   lt_cv_dlopen=no
2716   lt_cv_dlopen_libs=
2717
2718   case $host_os in
2719   beos*)
2720     lt_cv_dlopen="load_add_on"
2721     lt_cv_dlopen_libs=
2722     lt_cv_dlopen_self=yes
2723     ;;
2724
2725   mingw* | pw32* | cegcc*)
2726     lt_cv_dlopen="LoadLibrary"
2727     lt_cv_dlopen_libs=
2728     ;;
2729
2730   cygwin*)
2731     lt_cv_dlopen="dlopen"
2732     lt_cv_dlopen_libs=
2733     ;;
2734
2735   darwin*)
2736   # if libdl is installed we need to link against it
2737     AC_CHECK_LIB([dl], [dlopen],
2738                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
2739     lt_cv_dlopen="dyld"
2740     lt_cv_dlopen_libs=
2741     lt_cv_dlopen_self=yes
2742     ])
2743     ;;
2744
2745   *)
2746     AC_CHECK_FUNC([shl_load],
2747           [lt_cv_dlopen="shl_load"],
2748       [AC_CHECK_LIB([dld], [shl_load],
2749             [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
2750         [AC_CHECK_FUNC([dlopen],
2751               [lt_cv_dlopen="dlopen"],
2752           [AC_CHECK_LIB([dl], [dlopen],
2753                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
2754             [AC_CHECK_LIB([svld], [dlopen],
2755                   [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
2756               [AC_CHECK_LIB([dld], [dld_link],
2757                     [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
2758               ])
2759             ])
2760           ])
2761         ])
2762       ])
2763     ;;
2764   esac
2765
2766   if test "x$lt_cv_dlopen" != xno; then
2767     enable_dlopen=yes
2768   else
2769     enable_dlopen=no
2770   fi
2771
2772   case $lt_cv_dlopen in
2773   dlopen)
2774     save_CPPFLAGS="$CPPFLAGS"
2775     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2776
2777     save_LDFLAGS="$LDFLAGS"
2778     wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2779
2780     save_LIBS="$LIBS"
2781     LIBS="$lt_cv_dlopen_libs $LIBS"
2782
2783     AC_CACHE_CHECK([whether a program can dlopen itself],
2784           lt_cv_dlopen_self, [dnl
2785           _LT_TRY_DLOPEN_SELF(
2786             lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2787             lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2788     ])
2789
2790     if test "x$lt_cv_dlopen_self" = xyes; then
2791       wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2792       AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2793           lt_cv_dlopen_self_static, [dnl
2794           _LT_TRY_DLOPEN_SELF(
2795             lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2796             lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
2797       ])
2798     fi
2799
2800     CPPFLAGS="$save_CPPFLAGS"
2801     LDFLAGS="$save_LDFLAGS"
2802     LIBS="$save_LIBS"
2803     ;;
2804   esac
2805
2806   case $lt_cv_dlopen_self in
2807   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2808   *) enable_dlopen_self=unknown ;;
2809   esac
2810
2811   case $lt_cv_dlopen_self_static in
2812   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2813   *) enable_dlopen_self_static=unknown ;;
2814   esac
2815 fi
2816 _LT_DECL([dlopen_support], [enable_dlopen], [0],
2817          [Whether dlopen is supported])
2818 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
2819          [Whether dlopen of programs is supported])
2820 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
2821          [Whether dlopen of statically linked programs is supported])
2822 ])# LT_SYS_DLOPEN_SELF
2823
2824 # Old name:
2825 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
2826 dnl aclocal-1.4 backwards compatibility:
2827 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
2828
2829
2830 # _LT_COMPILER_C_O([TAGNAME])
2831 # ---------------------------
2832 # Check to see if options -c and -o are simultaneously supported by compiler.
2833 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
2834 m4_defun([_LT_COMPILER_C_O],
2835 [m4_require([_LT_DECL_SED])dnl
2836 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2837 m4_require([_LT_TAG_COMPILER])dnl
2838 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2839   [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2840   [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2841    $RM -r conftest 2>/dev/null
2842    mkdir conftest
2843    cd conftest
2844    mkdir out
2845    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2846
2847    lt_compiler_flag="-o out/conftest2.$ac_objext"
2848    # Insert the option either (1) after the last *FLAGS variable, or
2849    # (2) before a word containing "conftest.", or (3) at the end.
2850    # Note that $ac_compile itself does not contain backslashes and begins
2851    # with a dollar sign (not a hyphen), so the echo should work correctly.
2852    lt_compile=`echo "$ac_compile" | $SED \
2853    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2854    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2855    -e 's:$: $lt_compiler_flag:'`
2856    (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2857    (eval "$lt_compile" 2>out/conftest.err)
2858    ac_status=$?
2859    cat out/conftest.err >&AS_MESSAGE_LOG_FD
2860    echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2861    if (exit $ac_status) && test -s out/conftest2.$ac_objext
2862    then
2863      # The compiler can only warn and ignore the option if not recognized
2864      # So say no if there are warnings
2865      $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
2866      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2867      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2868        _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2869      fi
2870    fi
2871    chmod u+w . 2>&AS_MESSAGE_LOG_FD
2872    $RM conftest*
2873    # SGI C++ compiler will create directory out/ii_files/ for
2874    # template instantiation
2875    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
2876    $RM out/* && rmdir out
2877    cd ..
2878    $RM -r conftest
2879    $RM conftest*
2880 ])
2881 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
2882         [Does compiler simultaneously support -c and -o options?])
2883 ])# _LT_COMPILER_C_O
2884
2885
2886 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
2887 # ----------------------------------
2888 # Check to see if we can do hard links to lock some files if needed
2889 m4_defun([_LT_COMPILER_FILE_LOCKS],
2890 [m4_require([_LT_ENABLE_LOCK])dnl
2891 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2892 _LT_COMPILER_C_O([$1])
2893
2894 hard_links="nottested"
2895 if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
2896   # do not overwrite the value of need_locks provided by the user
2897   AC_MSG_CHECKING([if we can lock with hard links])
2898   hard_links=yes
2899   $RM conftest*
2900   ln conftest.a conftest.b 2>/dev/null && hard_links=no
2901   touch conftest.a
2902   ln conftest.a conftest.b 2>&5 || hard_links=no
2903   ln conftest.a conftest.b 2>/dev/null && hard_links=no
2904   AC_MSG_RESULT([$hard_links])
2905   if test "$hard_links" = no; then
2906     AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2907     need_locks=warn
2908   fi
2909 else
2910   need_locks=no
2911 fi
2912 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
2913 ])# _LT_COMPILER_FILE_LOCKS
2914
2915
2916 # _LT_CHECK_OBJDIR
2917 # ----------------
2918 m4_defun([_LT_CHECK_OBJDIR],
2919 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2920 [rm -f .libs 2>/dev/null
2921 mkdir .libs 2>/dev/null
2922 if test -d .libs; then
2923   lt_cv_objdir=.libs
2924 else
2925   # MS-DOS does not allow filenames that begin with a dot.
2926   lt_cv_objdir=_libs
2927 fi
2928 rmdir .libs 2>/dev/null])
2929 objdir=$lt_cv_objdir
2930 _LT_DECL([], [objdir], [0],
2931          [The name of the directory that contains temporary libtool files])dnl
2932 m4_pattern_allow([LT_OBJDIR])dnl
2933 AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
2934   [Define to the sub-directory in which libtool stores uninstalled libraries.])
2935 ])# _LT_CHECK_OBJDIR
2936
2937
2938 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
2939 # --------------------------------------
2940 # Check hardcoding attributes.
2941 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
2942 [AC_MSG_CHECKING([how to hardcode library paths into programs])
2943 _LT_TAGVAR(hardcode_action, $1)=
2944 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
2945    test -n "$_LT_TAGVAR(runpath_var, $1)" ||
2946    test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2947
2948   # We can hardcode non-existent directories.
2949   if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
2950      # If the only mechanism to avoid hardcoding is shlibpath_var, we
2951      # have to relink, otherwise we might link with an installed library
2952      # when we should be linking with a yet-to-be-installed one
2953      ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2954      test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
2955     # Linking always hardcodes the temporary library directory.
2956     _LT_TAGVAR(hardcode_action, $1)=relink
2957   else
2958     # We can link without hardcoding, and we can hardcode nonexisting dirs.
2959     _LT_TAGVAR(hardcode_action, $1)=immediate
2960   fi
2961 else
2962   # We cannot hardcode anything, or else we can only hardcode existing
2963   # directories.
2964   _LT_TAGVAR(hardcode_action, $1)=unsupported
2965 fi
2966 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
2967
2968 if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
2969    test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
2970   # Fast installation is not supported
2971   enable_fast_install=no
2972 elif test "$shlibpath_overrides_runpath" = yes ||
2973      test "$enable_shared" = no; then
2974   # Fast installation is not necessary
2975   enable_fast_install=needless
2976 fi
2977 _LT_TAGDECL([], [hardcode_action], [0],
2978     [How to hardcode a shared library path into an executable])
2979 ])# _LT_LINKER_HARDCODE_LIBPATH
2980
2981
2982 # _LT_CMD_STRIPLIB
2983 # ----------------
2984 m4_defun([_LT_CMD_STRIPLIB],
2985 [m4_require([_LT_DECL_EGREP])
2986 striplib=
2987 old_striplib=
2988 AC_MSG_CHECKING([whether stripping libraries is possible])
2989 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2990   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2991   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2992   AC_MSG_RESULT([yes])
2993 else
2994 # FIXME - insert some real tests, host_os isn't really good enough
2995   case $host_os in
2996   darwin*)
2997     if test -n "$STRIP" ; then
2998       striplib="$STRIP -x"
2999       old_striplib="$STRIP -S"
3000       AC_MSG_RESULT([yes])
3001     else
3002       AC_MSG_RESULT([no])
3003     fi
3004     ;;
3005   *)
3006     AC_MSG_RESULT([no])
3007     ;;
3008   esac
3009 fi
3010 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
3011 _LT_DECL([], [striplib], [1])
3012 ])# _LT_CMD_STRIPLIB
3013
3014
3015 # _LT_SYS_DYNAMIC_LINKER([TAG])
3016 # -----------------------------
3017 # PORTME Fill in your ld.so characteristics
3018 m4_defun([_LT_SYS_DYNAMIC_LINKER],
3019 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3020 m4_require([_LT_DECL_EGREP])dnl
3021 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3022 m4_require([_LT_DECL_OBJDUMP])dnl
3023 m4_require([_LT_DECL_SED])dnl
3024 AC_MSG_CHECKING([dynamic linker characteristics])
3025 m4_if([$1],
3026         [], [
3027 if test "$GCC" = yes; then
3028   case $host_os in
3029     darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
3030     *) lt_awk_arg="/^libraries:/" ;;
3031   esac
3032   lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
3033   if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
3034     # if the path contains ";" then we assume it to be the separator
3035     # otherwise default to the standard path separator (i.e. ":") - it is
3036     # assumed that no part of a normal pathname contains ";" but that should
3037     # okay in the real world where ";" in dirpaths is itself problematic.
3038     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
3039   else
3040     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
3041   fi
3042   # Ok, now we have the path, separated by spaces, we can step through it
3043   # and add multilib dir if necessary.
3044   lt_tmp_lt_search_path_spec=
3045   lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
3046   for lt_sys_path in $lt_search_path_spec; do
3047     if test -d "$lt_sys_path/$lt_multi_os_dir"; then
3048       lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
3049     else
3050       test -d "$lt_sys_path" && \
3051         lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
3052     fi
3053   done
3054   lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
3055 BEGIN {RS=" "; FS="/|\n";} {
3056   lt_foo="";
3057   lt_count=0;
3058   for (lt_i = NF; lt_i > 0; lt_i--) {
3059     if ($lt_i != "" && $lt_i != ".") {
3060       if ($lt_i == "..") {
3061         lt_count++;
3062       } else {
3063         if (lt_count == 0) {
3064           lt_foo="/" $lt_i lt_foo;
3065         } else {
3066           lt_count--;
3067         }
3068       }
3069     }
3070   }
3071   if (lt_foo != "") { lt_freq[[lt_foo]]++; }
3072   if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
3073 }'`
3074   sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
3075 else
3076   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
3077 fi])
3078 library_names_spec=
3079 libname_spec='lib$name'
3080 soname_spec=
3081 shrext_cmds=".so"
3082 postinstall_cmds=
3083 postuninstall_cmds=
3084 finish_cmds=
3085 finish_eval=
3086 shlibpath_var=
3087 shlibpath_overrides_runpath=unknown
3088 version_type=none
3089 dynamic_linker="$host_os ld.so"
3090 sys_lib_dlsearch_path_spec="/lib /usr/lib"
3091 need_lib_prefix=unknown
3092 hardcode_into_libs=no
3093
3094 # when you set need_version to no, make sure it does not cause -set_version
3095 # flags to be left without arguments
3096 need_version=unknown
3097
3098 case $host_os in
3099 aix3*)
3100   version_type=linux
3101   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
3102   shlibpath_var=LIBPATH
3103
3104   # AIX 3 has no versioning support, so we append a major version to the name.
3105   soname_spec='${libname}${release}${shared_ext}$major'
3106   ;;
3107
3108 aix[[4-9]]*)
3109   version_type=linux
3110   need_lib_prefix=no
3111   need_version=no
3112   hardcode_into_libs=yes
3113   if test "$host_cpu" = ia64; then
3114     # AIX 5 supports IA64
3115     library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
3116     shlibpath_var=LD_LIBRARY_PATH
3117   else
3118     # With GCC up to 2.95.x, collect2 would create an import file
3119     # for dependence libraries.  The import file would start with
3120     # the line `#! .'.  This would cause the generated library to
3121     # depend on `.', always an invalid library.  This was fixed in
3122     # development snapshots of GCC prior to 3.0.
3123     case $host_os in
3124       aix4 | aix4.[[01]] | aix4.[[01]].*)
3125       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
3126            echo ' yes '
3127            echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
3128         :
3129       else
3130         can_build_shared=no
3131       fi
3132       ;;
3133     esac
3134     # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
3135     # soname into executable. Probably we can add versioning support to
3136     # collect2, so additional links can be useful in future.
3137     if test "$aix_use_runtimelinking" = yes; then
3138       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
3139       # instead of lib<name>.a to let people know that these are not
3140       # typical AIX shared libraries.
3141       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3142     else
3143       # We preserve .a as extension for shared libraries through AIX4.2
3144       # and later when we are not doing run time linking.
3145       library_names_spec='${libname}${release}.a $libname.a'
3146       soname_spec='${libname}${release}${shared_ext}$major'
3147     fi
3148     shlibpath_var=LIBPATH
3149   fi
3150   ;;
3151
3152 amigaos*)
3153   case $host_cpu in
3154   powerpc)
3155     # Since July 2007 AmigaOS4 officially supports .so libraries.
3156     # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
3157     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3158     ;;
3159   m68k)
3160     library_names_spec='$libname.ixlibrary $libname.a'
3161     # Create ${libname}_ixlibrary.a entries in /sys/libs.
3162     finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
3163     ;;
3164   esac
3165   ;;
3166
3167 beos*)
3168   library_names_spec='${libname}${shared_ext}'
3169   dynamic_linker="$host_os ld.so"
3170   shlibpath_var=LIBRARY_PATH
3171   ;;
3172
3173 bsdi[[45]]*)
3174   version_type=linux
3175   need_version=no
3176   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3177   soname_spec='${libname}${release}${shared_ext}$major'
3178   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
3179   shlibpath_var=LD_LIBRARY_PATH
3180   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
3181   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
3182   # the default ld.so.conf also contains /usr/contrib/lib and
3183   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
3184   # libtool to hard-code these into programs
3185   ;;
3186
3187 cygwin* | mingw* | pw32* | cegcc*)
3188   version_type=windows
3189   shrext_cmds=".dll"
3190   need_version=no
3191   need_lib_prefix=no
3192
3193   case $GCC,$host_os in
3194   yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
3195     library_names_spec='$libname.dll.a'
3196     # DLL is installed to $(libdir)/../bin by postinstall_cmds
3197     postinstall_cmds='base_file=`basename \${file}`~
3198       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
3199       dldir=$destdir/`dirname \$dlpath`~
3200       test -d \$dldir || mkdir -p \$dldir~
3201       $install_prog $dir/$dlname \$dldir/$dlname~
3202       chmod a+x \$dldir/$dlname~
3203       if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
3204         eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
3205       fi'
3206     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3207       dlpath=$dir/\$dldll~
3208        $RM \$dlpath'
3209     shlibpath_overrides_runpath=yes
3210
3211     case $host_os in
3212     cygwin*)
3213       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
3214       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3215       sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
3216       ;;
3217     mingw* | cegcc*)
3218       # MinGW DLLs use traditional 'lib' prefix
3219       soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3220       sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
3221       if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
3222         # It is most probably a Windows format PATH printed by
3223         # mingw gcc, but we are running on Cygwin. Gcc prints its search
3224         # path with ; separators, and with drive letters. We can handle the
3225         # drive letters (cygwin fileutils understands them), so leave them,
3226         # especially as we might pass files found there to a mingw objdump,
3227         # which wouldn't understand a cygwinified path. Ahh.
3228         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
3229       else
3230         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
3231       fi
3232       ;;
3233     pw32*)
3234       # pw32 DLLs use 'pw' prefix rather than 'lib'
3235       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3236       ;;
3237     esac
3238     ;;
3239
3240   *)
3241     library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
3242     ;;
3243   esac
3244   dynamic_linker='Win32 ld.exe'
3245   # FIXME: first we should search . and the directory the executable is in
3246   shlibpath_var=PATH
3247   ;;
3248
3249 darwin* | rhapsody*)
3250   dynamic_linker="$host_os dyld"
3251   version_type=darwin
3252   need_lib_prefix=no
3253   need_version=no
3254   library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
3255   soname_spec='${libname}${release}${major}$shared_ext'
3256   shlibpath_overrides_runpath=yes
3257   shlibpath_var=DYLD_LIBRARY_PATH
3258   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
3259 m4_if([$1], [],[
3260   sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
3261   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
3262   ;;
3263
3264 dgux*)
3265   version_type=linux
3266   need_lib_prefix=no
3267   need_version=no
3268   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
3269   soname_spec='${libname}${release}${shared_ext}$major'
3270   shlibpath_var=LD_LIBRARY_PATH
3271   ;;
3272
3273 freebsd1*)
3274   dynamic_linker=no
3275   ;;
3276
3277 freebsd* | dragonfly*)
3278   # DragonFly does not have aout.  When/if they implement a new
3279   # versioning mechanism, adjust this.
3280   if test -x /usr/bin/objformat; then
3281     objformat=`/usr/bin/objformat`
3282   else
3283     case $host_os in
3284     freebsd[[123]]*) objformat=aout ;;
3285     *) objformat=elf ;;
3286     esac
3287   fi
3288   version_type=freebsd-$objformat
3289   case $version_type in
3290     freebsd-elf*)
3291       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3292       need_version=no
3293       need_lib_prefix=no
3294       ;;
3295     freebsd-*)
3296       library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
3297       need_version=yes
3298       ;;
3299   esac
3300   shlibpath_var=LD_LIBRARY_PATH
3301   case $host_os in
3302   freebsd2*)
3303     shlibpath_overrides_runpath=yes
3304     ;;
3305   freebsd3.[[01]]* | freebsdelf3.[[01]]*)
3306     shlibpath_overrides_runpath=yes
3307     hardcode_into_libs=yes
3308     ;;
3309   freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
3310   freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
3311     shlibpath_overrides_runpath=no
3312     hardcode_into_libs=yes
3313     ;;
3314   *) # from 4.6 on, and DragonFly
3315     shlibpath_overrides_runpath=yes
3316     hardcode_into_libs=yes
3317     ;;
3318   esac
3319   ;;
3320
3321 gnu*)
3322   version_type=linux
3323   need_lib_prefix=no
3324   need_version=no
3325   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
3326   soname_spec='${libname}${release}${shared_ext}$major'
3327   shlibpath_var=LD_LIBRARY_PATH
3328   hardcode_into_libs=yes
3329   ;;
3330
3331 hpux9* | hpux10* | hpux11*)
3332   # Give a soname corresponding to the major version so that dld.sl refuses to
3333   # link against other versions.
3334   version_type=sunos
3335   need_lib_prefix=no
3336   need_version=no
3337   case $host_cpu in
3338   ia64*)
3339     shrext_cmds='.so'
3340     hardcode_into_libs=yes
3341     dynamic_linker="$host_os dld.so"
3342     shlibpath_var=LD_LIBRARY_PATH
3343     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3344     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3345     soname_spec='${libname}${release}${shared_ext}$major'
3346     if test "X$HPUX_IA64_MODE" = X32; then
3347       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
3348     else
3349       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
3350     fi
3351     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3352     ;;
3353   hppa*64*)
3354     shrext_cmds='.sl'
3355     hardcode_into_libs=yes
3356     dynamic_linker="$host_os dld.sl"
3357     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
3358     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3359     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3360     soname_spec='${libname}${release}${shared_ext}$major'
3361     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
3362     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3363     ;;
3364   *)
3365     shrext_cmds='.sl'
3366     dynamic_linker="$host_os dld.sl"
3367     shlibpath_var=SHLIB_PATH
3368     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
3369     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3370     soname_spec='${libname}${release}${shared_ext}$major'
3371     ;;
3372   esac
3373   # HP-UX runs *really* slowly unless shared libraries are mode 555.
3374   postinstall_cmds='chmod 555 $lib'
3375   ;;
3376
3377 interix[[3-9]]*)
3378   version_type=linux
3379   need_lib_prefix=no
3380   need_version=no
3381   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3382   soname_spec='${libname}${release}${shared_ext}$major'
3383   dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
3384   shlibpath_var=LD_LIBRARY_PATH
3385   shlibpath_overrides_runpath=no
3386   hardcode_into_libs=yes
3387   ;;
3388
3389 irix5* | irix6* | nonstopux*)
3390   case $host_os in
3391     nonstopux*) version_type=nonstopux ;;
3392     *)
3393         if test "$lt_cv_prog_gnu_ld" = yes; then
3394                 version_type=linux
3395         else
3396                 version_type=irix
3397         fi ;;
3398   esac
3399   need_lib_prefix=no
3400   need_version=no
3401   soname_spec='${libname}${release}${shared_ext}$major'
3402   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
3403   case $host_os in
3404   irix5* | nonstopux*)
3405     libsuff= shlibsuff=
3406     ;;
3407   *)
3408     case $LD in # libtool.m4 will add one of these switches to LD
3409     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
3410       libsuff= shlibsuff= libmagic=32-bit;;
3411     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
3412       libsuff=32 shlibsuff=N32 libmagic=N32;;
3413     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
3414       libsuff=64 shlibsuff=64 libmagic=64-bit;;
3415     *) libsuff= shlibsuff= libmagic=never-match;;
3416     esac
3417     ;;
3418   esac
3419   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
3420   shlibpath_overrides_runpath=no
3421   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
3422   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
3423   hardcode_into_libs=yes
3424   ;;
3425
3426 # No shared lib support for Linux oldld, aout, or coff.
3427 linux*oldld* | linux*aout* | linux*coff*)
3428   dynamic_linker=no
3429   ;;
3430
3431 # This must be Linux ELF.
3432 linux* | k*bsd*-gnu | kopensolaris*-gnu)
3433   version_type=linux
3434   need_lib_prefix=no
3435   need_version=no
3436   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3437   soname_spec='${libname}${release}${shared_ext}$major'
3438   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
3439   shlibpath_var=LD_LIBRARY_PATH
3440   shlibpath_overrides_runpath=no
3441   # Some binutils ld are patched to set DT_RUNPATH
3442   save_LDFLAGS=$LDFLAGS
3443   save_libdir=$libdir
3444   eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
3445        LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
3446   AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
3447     [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
3448        [shlibpath_overrides_runpath=yes])])
3449   LDFLAGS=$save_LDFLAGS
3450   libdir=$save_libdir
3451
3452   # This implies no fast_install, which is unacceptable.
3453   # Some rework will be needed to allow for fast_install
3454   # before this can be enabled.
3455   hardcode_into_libs=yes
3456
3457   # Append ld.so.conf contents to the search path
3458   if test -f /etc/ld.so.conf; then
3459     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;/^$/d' | tr '\n' ' '`
3460     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
3461   fi
3462
3463   # We used to test for /lib/ld.so.1 and disable shared libraries on
3464   # powerpc, because MkLinux only supported shared libraries with the
3465   # GNU dynamic linker.  Since this was broken with cross compilers,
3466   # most powerpc-linux boxes support dynamic linking these days and
3467   # people can always --disable-shared, the test was removed, and we
3468   # assume the GNU/Linux dynamic linker is in use.
3469   dynamic_linker='GNU/Linux ld.so'
3470   ;;
3471
3472 netbsdelf*-gnu)
3473   version_type=linux
3474   need_lib_prefix=no
3475   need_version=no
3476   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3477   soname_spec='${libname}${release}${shared_ext}$major'
3478   shlibpath_var=LD_LIBRARY_PATH
3479   shlibpath_overrides_runpath=no
3480   hardcode_into_libs=yes
3481   dynamic_linker='NetBSD ld.elf_so'
3482   ;;
3483
3484 netbsd*)
3485   version_type=sunos
3486   need_lib_prefix=no
3487   need_version=no
3488   if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
3489     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3490     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3491     dynamic_linker='NetBSD (a.out) ld.so'
3492   else
3493     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3494     soname_spec='${libname}${release}${shared_ext}$major'
3495     dynamic_linker='NetBSD ld.elf_so'
3496   fi
3497   shlibpath_var=LD_LIBRARY_PATH
3498   shlibpath_overrides_runpath=yes
3499   hardcode_into_libs=yes
3500   ;;
3501
3502 newsos6)
3503   version_type=linux
3504   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3505   shlibpath_var=LD_LIBRARY_PATH
3506   shlibpath_overrides_runpath=yes
3507   ;;
3508
3509 *nto* | *qnx*)
3510   version_type=qnx
3511   need_lib_prefix=no
3512   need_version=no
3513   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3514   soname_spec='${libname}${release}${shared_ext}$major'
3515   shlibpath_var=LD_LIBRARY_PATH
3516   shlibpath_overrides_runpath=no
3517   hardcode_into_libs=yes
3518   dynamic_linker='ldqnx.so'
3519   ;;
3520
3521 openbsd*)
3522   version_type=sunos
3523   sys_lib_dlsearch_path_spec="/usr/lib"
3524   need_lib_prefix=no
3525   # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
3526   case $host_os in
3527     openbsd3.3 | openbsd3.3.*)  need_version=yes ;;
3528     *)                          need_version=no  ;;
3529   esac
3530   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3531   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3532   shlibpath_var=LD_LIBRARY_PATH
3533   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3534     case $host_os in
3535       openbsd2.[[89]] | openbsd2.[[89]].*)
3536         shlibpath_overrides_runpath=no
3537         ;;
3538       *)
3539         shlibpath_overrides_runpath=yes
3540         ;;
3541       esac
3542   else
3543     shlibpath_overrides_runpath=yes
3544   fi
3545   ;;
3546
3547 os2*)
3548   libname_spec='$name'
3549   shrext_cmds=".dll"
3550   need_lib_prefix=no
3551   library_names_spec='$libname${shared_ext} $libname.a'
3552   dynamic_linker='OS/2 ld.exe'
3553   shlibpath_var=LIBPATH
3554   ;;
3555
3556 osf3* | osf4* | osf5*)
3557   version_type=osf
3558   need_lib_prefix=no
3559   need_version=no
3560   soname_spec='${libname}${release}${shared_ext}$major'
3561   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3562   shlibpath_var=LD_LIBRARY_PATH
3563   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3564   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
3565   ;;
3566
3567 rdos*)
3568   dynamic_linker=no
3569   ;;
3570
3571 solaris*)
3572   version_type=linux
3573   need_lib_prefix=no
3574   need_version=no
3575   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3576   soname_spec='${libname}${release}${shared_ext}$major'
3577   shlibpath_var=LD_LIBRARY_PATH
3578   shlibpath_overrides_runpath=yes
3579   hardcode_into_libs=yes
3580   # ldd complains unless libraries are executable
3581   postinstall_cmds='chmod +x $lib'
3582   ;;
3583
3584 sunos4*)
3585   version_type=sunos
3586   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3587   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3588   shlibpath_var=LD_LIBRARY_PATH
3589   shlibpath_overrides_runpath=yes
3590   if test "$with_gnu_ld" = yes; then
3591     need_lib_prefix=no
3592   fi
3593   need_version=yes
3594   ;;
3595
3596 sysv4 | sysv4.3*)
3597   version_type=linux
3598   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3599   soname_spec='${libname}${release}${shared_ext}$major'
3600   shlibpath_var=LD_LIBRARY_PATH
3601   case $host_vendor in
3602     sni)
3603       shlibpath_overrides_runpath=no
3604       need_lib_prefix=no
3605       runpath_var=LD_RUN_PATH
3606       ;;
3607     siemens)
3608       need_lib_prefix=no
3609       ;;
3610     motorola)
3611       need_lib_prefix=no
3612       need_version=no
3613       shlibpath_overrides_runpath=no
3614       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3615       ;;
3616   esac
3617   ;;
3618
3619 sysv4*MP*)
3620   if test -d /usr/nec ;then
3621     version_type=linux
3622     library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
3623     soname_spec='$libname${shared_ext}.$major'
3624     shlibpath_var=LD_LIBRARY_PATH
3625   fi
3626   ;;
3627
3628 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3629   version_type=freebsd-elf
3630   need_lib_prefix=no
3631   need_version=no
3632   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3633   soname_spec='${libname}${release}${shared_ext}$major'
3634   shlibpath_var=LD_LIBRARY_PATH
3635   shlibpath_overrides_runpath=yes
3636   hardcode_into_libs=yes
3637   if test "$with_gnu_ld" = yes; then
3638     sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
3639   else
3640     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
3641     case $host_os in
3642       sco3.2v5*)
3643         sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
3644         ;;
3645     esac
3646   fi
3647   sys_lib_dlsearch_path_spec='/usr/lib'
3648   ;;
3649
3650 tpf*)
3651   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
3652   version_type=linux
3653   need_lib_prefix=no
3654   need_version=no
3655   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3656   shlibpath_var=LD_LIBRARY_PATH
3657   shlibpath_overrides_runpath=no
3658   hardcode_into_libs=yes
3659   ;;
3660
3661 uts4*)
3662   version_type=linux
3663   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3664   soname_spec='${libname}${release}${shared_ext}$major'
3665   shlibpath_var=LD_LIBRARY_PATH
3666   ;;
3667
3668 *)
3669   dynamic_linker=no
3670   ;;
3671 esac
3672 AC_MSG_RESULT([$dynamic_linker])
3673 test "$dynamic_linker" = no && can_build_shared=no
3674
3675 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3676 if test "$GCC" = yes; then
3677   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3678 fi
3679
3680 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
3681   sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
3682 fi
3683 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
3684   sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
3685 fi
3686
3687 _LT_DECL([], [variables_saved_for_relink], [1],
3688     [Variables whose values should be saved in libtool wrapper scripts and
3689     restored at link time])
3690 _LT_DECL([], [need_lib_prefix], [0],
3691     [Do we need the "lib" prefix for modules?])
3692 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
3693 _LT_DECL([], [version_type], [0], [Library versioning type])
3694 _LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
3695 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
3696 _LT_DECL([], [shlibpath_overrides_runpath], [0],
3697     [Is shlibpath searched before the hard-coded library search path?])
3698 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
3699 _LT_DECL([], [library_names_spec], [1],
3700     [[List of archive names.  First name is the real one, the rest are links.
3701     The last name is the one that the linker finds with -lNAME]])
3702 _LT_DECL([], [soname_spec], [1],
3703     [[The coded name of the library, if different from the real name]])
3704 _LT_DECL([], [postinstall_cmds], [2],
3705     [Command to use after installation of a shared archive])
3706 _LT_DECL([], [postuninstall_cmds], [2],
3707     [Command to use after uninstallation of a shared archive])
3708 _LT_DECL([], [finish_cmds], [2],
3709     [Commands used to finish a libtool library installation in a directory])
3710 _LT_DECL([], [finish_eval], [1],
3711     [[As "finish_cmds", except a single script fragment to be evaled but
3712     not shown]])
3713 _LT_DECL([], [hardcode_into_libs], [0],
3714     [Whether we should hardcode library paths into libraries])
3715 _LT_DECL([], [sys_lib_search_path_spec], [2],
3716     [Compile-time system search path for libraries])
3717 _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
3718     [Run-time system search path for libraries])
3719 ])# _LT_SYS_DYNAMIC_LINKER
3720
3721
3722 # _LT_PATH_TOOL_PREFIX(TOOL)
3723 # --------------------------
3724 # find a file program which can recognize shared library
3725 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
3726 [m4_require([_LT_DECL_EGREP])dnl
3727 AC_MSG_CHECKING([for $1])
3728 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3729 [case $MAGIC_CMD in
3730 [[\\/*] |  ?:[\\/]*])
3731   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3732   ;;
3733 *)
3734   lt_save_MAGIC_CMD="$MAGIC_CMD"
3735   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3736 dnl $ac_dummy forces splitting on constant user-supplied paths.
3737 dnl POSIX.2 word splitting is done only on the output of word expansions,
3738 dnl not every word.  This closes a longstanding sh security hole.
3739   ac_dummy="m4_if([$2], , $PATH, [$2])"
3740   for ac_dir in $ac_dummy; do
3741     IFS="$lt_save_ifs"
3742     test -z "$ac_dir" && ac_dir=.
3743     if test -f $ac_dir/$1; then
3744       lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3745       if test -n "$file_magic_test_file"; then
3746         case $deplibs_check_method in
3747         "file_magic "*)
3748           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3749           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3750           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3751             $EGREP "$file_magic_regex" > /dev/null; then
3752             :
3753           else
3754             cat <<_LT_EOF 1>&2
3755
3756 *** Warning: the command libtool uses to detect shared libraries,
3757 *** $file_magic_cmd, produces output that libtool cannot recognize.
3758 *** The result is that libtool may fail to recognize shared libraries
3759 *** as such.  This will affect the creation of libtool libraries that
3760 *** depend on shared libraries, but programs linked with such libtool
3761 *** libraries will work regardless of this problem.  Nevertheless, you
3762 *** may want to report the problem to your system manager and/or to
3763 *** bug-libtool@gnu.org
3764
3765 _LT_EOF
3766           fi ;;
3767         esac
3768       fi
3769       break
3770     fi
3771   done
3772   IFS="$lt_save_ifs"
3773   MAGIC_CMD="$lt_save_MAGIC_CMD"
3774   ;;
3775 esac])
3776 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3777 if test -n "$MAGIC_CMD"; then
3778   AC_MSG_RESULT($MAGIC_CMD)
3779 else
3780   AC_MSG_RESULT(no)
3781 fi
3782 _LT_DECL([], [MAGIC_CMD], [0],
3783          [Used to examine libraries when file_magic_cmd begins with "file"])dnl
3784 ])# _LT_PATH_TOOL_PREFIX
3785
3786 # Old name:
3787 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
3788 dnl aclocal-1.4 backwards compatibility:
3789 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
3790
3791
3792 # _LT_PATH_MAGIC
3793 # --------------
3794 # find a file program which can recognize a shared library
3795 m4_defun([_LT_PATH_MAGIC],
3796 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3797 if test -z "$lt_cv_path_MAGIC_CMD"; then
3798   if test -n "$ac_tool_prefix"; then
3799     _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3800   else
3801     MAGIC_CMD=:
3802   fi
3803 fi
3804 ])# _LT_PATH_MAGIC
3805
3806
3807 # LT_PATH_LD
3808 # ----------
3809 # find the pathname to the GNU or non-GNU linker
3810 AC_DEFUN([LT_PATH_LD],
3811 [AC_REQUIRE([AC_PROG_CC])dnl
3812 AC_REQUIRE([AC_CANONICAL_HOST])dnl
3813 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3814 m4_require([_LT_DECL_SED])dnl
3815 m4_require([_LT_DECL_EGREP])dnl
3816
3817 AC_ARG_WITH([gnu-ld],
3818     [AS_HELP_STRING([--with-gnu-ld],
3819         [assume the C compiler uses GNU ld @<:@default=no@:>@])],
3820     [test "$withval" = no || with_gnu_ld=yes],
3821     [with_gnu_ld=no])dnl
3822
3823 ac_prog=ld
3824 if test "$GCC" = yes; then
3825   # Check if gcc -print-prog-name=ld gives a path.
3826   AC_MSG_CHECKING([for ld used by $CC])
3827   case $host in
3828   *-*-mingw*)
3829     # gcc leaves a trailing carriage return which upsets mingw
3830     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3831   *)
3832     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3833   esac
3834   case $ac_prog in
3835     # Accept absolute paths.
3836     [[\\/]]* | ?:[[\\/]]*)
3837       re_direlt='/[[^/]][[^/]]*/\.\./'
3838       # Canonicalize the pathname of ld
3839       ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
3840       while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
3841         ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
3842       done
3843       test -z "$LD" && LD="$ac_prog"
3844       ;;
3845   "")
3846     # If it fails, then pretend we aren't using GCC.
3847     ac_prog=ld
3848     ;;
3849   *)
3850     # If it is relative, then search for the first ld in PATH.
3851     with_gnu_ld=unknown
3852     ;;
3853   esac
3854 elif test "$with_gnu_ld" = yes; then
3855   AC_MSG_CHECKING([for GNU ld])
3856 else
3857   AC_MSG_CHECKING([for non-GNU ld])
3858 fi
3859 AC_CACHE_VAL(lt_cv_path_LD,
3860 [if test -z "$LD"; then
3861   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3862   for ac_dir in $PATH; do
3863     IFS="$lt_save_ifs"
3864     test -z "$ac_dir" && ac_dir=.
3865     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3866       lt_cv_path_LD="$ac_dir/$ac_prog"
3867       # Check to see if the program is GNU ld.  I'd rather use --version,
3868       # but apparently some variants of GNU ld only accept -v.
3869       # Break only if it was the GNU/non-GNU ld that we prefer.
3870       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3871       *GNU* | *'with BFD'*)
3872         test "$with_gnu_ld" != no && break
3873         ;;
3874       *)
3875         test "$with_gnu_ld" != yes && break
3876         ;;
3877       esac
3878     fi
3879   done
3880   IFS="$lt_save_ifs"
3881 else
3882   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3883 fi])
3884 LD="$lt_cv_path_LD"
3885 if test -n "$LD"; then
3886   AC_MSG_RESULT($LD)
3887 else
3888   AC_MSG_RESULT(no)
3889 fi
3890 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3891 _LT_PATH_LD_GNU
3892 AC_SUBST([LD])
3893
3894 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
3895 ])# LT_PATH_LD
3896
3897 # Old names:
3898 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
3899 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
3900 dnl aclocal-1.4 backwards compatibility:
3901 dnl AC_DEFUN([AM_PROG_LD], [])
3902 dnl AC_DEFUN([AC_PROG_LD], [])
3903
3904
3905 # _LT_PATH_LD_GNU
3906 #- --------------
3907 m4_defun([_LT_PATH_LD_GNU],
3908 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3909 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
3910 case `$LD -v 2>&1 </dev/null` in
3911 *GNU* | *'with BFD'*)
3912   lt_cv_prog_gnu_ld=yes
3913   ;;
3914 *)
3915   lt_cv_prog_gnu_ld=no
3916   ;;
3917 esac])
3918 with_gnu_ld=$lt_cv_prog_gnu_ld
3919 ])# _LT_PATH_LD_GNU
3920
3921
3922 # _LT_CMD_RELOAD
3923 # --------------
3924 # find reload flag for linker
3925 #   -- PORTME Some linkers may need a different reload flag.
3926 m4_defun([_LT_CMD_RELOAD],
3927 [AC_CACHE_CHECK([for $LD option to reload object files],
3928   lt_cv_ld_reload_flag,
3929   [lt_cv_ld_reload_flag='-r'])
3930 reload_flag=$lt_cv_ld_reload_flag
3931 case $reload_flag in
3932 "" | " "*) ;;
3933 *) reload_flag=" $reload_flag" ;;
3934 esac
3935 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3936 case $host_os in
3937   darwin*)
3938     if test "$GCC" = yes; then
3939       reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
3940     else
3941       reload_cmds='$LD$reload_flag -o $output$reload_objs'
3942     fi
3943     ;;
3944 esac
3945 _LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
3946 _LT_DECL([], [reload_cmds], [2])dnl
3947 ])# _LT_CMD_RELOAD
3948
3949
3950 # _LT_CHECK_MAGIC_METHOD
3951 # ----------------------
3952 # how to check for library dependencies
3953 #  -- PORTME fill in with the dynamic library characteristics
3954 m4_defun([_LT_CHECK_MAGIC_METHOD],
3955 [m4_require([_LT_DECL_EGREP])
3956 m4_require([_LT_DECL_OBJDUMP])
3957 AC_CACHE_CHECK([how to recognize dependent libraries],
3958 lt_cv_deplibs_check_method,
3959 [lt_cv_file_magic_cmd='$MAGIC_CMD'
3960 lt_cv_file_magic_test_file=
3961 lt_cv_deplibs_check_method='unknown'
3962 # Need to set the preceding variable on all platforms that support
3963 # interlibrary dependencies.
3964 # 'none' -- dependencies not supported.
3965 # `unknown' -- same as none, but documents that we really don't know.
3966 # 'pass_all' -- all dependencies passed with no checks.
3967 # 'test_compile' -- check by making test program.
3968 # 'file_magic [[regex]]' -- check by looking for files in library path
3969 # which responds to the $file_magic_cmd with a given extended regex.
3970 # If you have `file' or equivalent on your system and you're not sure
3971 # whether `pass_all' will *always* work, you probably want this one.
3972
3973 case $host_os in
3974 aix[[4-9]]*)
3975   lt_cv_deplibs_check_method=pass_all
3976   ;;
3977
3978 beos*)
3979   lt_cv_deplibs_check_method=pass_all
3980   ;;
3981
3982 bsdi[[45]]*)
3983   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3984   lt_cv_file_magic_cmd='/usr/bin/file -L'
3985   lt_cv_file_magic_test_file=/shlib/libc.so
3986   ;;
3987
3988 cygwin*)
3989   # func_win32_libid is a shell function defined in ltmain.sh
3990   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3991   lt_cv_file_magic_cmd='func_win32_libid'
3992   ;;
3993
3994 mingw* | pw32*)
3995   # Base MSYS/MinGW do not provide the 'file' command needed by
3996   # func_win32_libid shell function, so use a weaker test based on 'objdump',
3997   # unless we find 'file', for example because we are cross-compiling.
3998   if ( file / ) >/dev/null 2>&1; then
3999     lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4000     lt_cv_file_magic_cmd='func_win32_libid'
4001   else
4002     lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
4003     lt_cv_file_magic_cmd='$OBJDUMP -f'
4004   fi
4005   ;;
4006
4007 cegcc)
4008   # use the weaker test based on 'objdump'. See mingw*.
4009   lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
4010   lt_cv_file_magic_cmd='$OBJDUMP -f'
4011   ;;
4012
4013 darwin* | rhapsody*)
4014   lt_cv_deplibs_check_method=pass_all
4015   ;;
4016
4017 freebsd* | dragonfly*)
4018   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4019     case $host_cpu in
4020     i*86 )
4021       # Not sure whether the presence of OpenBSD here was a mistake.
4022       # Let's accept both of them until this is cleared up.
4023       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
4024       lt_cv_file_magic_cmd=/usr/bin/file
4025       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4026       ;;
4027     esac
4028   else
4029     lt_cv_deplibs_check_method=pass_all
4030   fi
4031   ;;
4032
4033 gnu*)
4034   lt_cv_deplibs_check_method=pass_all
4035   ;;
4036
4037 hpux10.20* | hpux11*)
4038   lt_cv_file_magic_cmd=/usr/bin/file
4039   case $host_cpu in
4040   ia64*)
4041     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
4042     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
4043     ;;
4044   hppa*64*)
4045     [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
4046     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
4047     ;;
4048   *)
4049     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
4050     lt_cv_file_magic_test_file=/usr/lib/libc.sl
4051     ;;
4052   esac
4053   ;;
4054
4055 interix[[3-9]]*)
4056   # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
4057   lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
4058   ;;
4059
4060 irix5* | irix6* | nonstopux*)
4061   case $LD in
4062   *-32|*"-32 ") libmagic=32-bit;;
4063   *-n32|*"-n32 ") libmagic=N32;;
4064   *-64|*"-64 ") libmagic=64-bit;;
4065   *) libmagic=never-match;;
4066   esac
4067   lt_cv_deplibs_check_method=pass_all
4068   ;;
4069
4070 # This must be Linux ELF.
4071 linux* | k*bsd*-gnu | kopensolaris*-gnu)
4072   lt_cv_deplibs_check_method=pass_all
4073   ;;
4074
4075 netbsd* | netbsdelf*-gnu)
4076   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4077     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4078   else
4079     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
4080   fi
4081   ;;
4082
4083 newos6*)
4084   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
4085   lt_cv_file_magic_cmd=/usr/bin/file
4086   lt_cv_file_magic_test_file=/usr/lib/libnls.so
4087   ;;
4088
4089 *nto* | *qnx*)
4090   lt_cv_deplibs_check_method=pass_all
4091   ;;
4092
4093 openbsd*)
4094   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4095     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
4096   else
4097     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4098   fi
4099   ;;
4100
4101 osf3* | osf4* | osf5*)
4102   lt_cv_deplibs_check_method=pass_all
4103   ;;
4104
4105 rdos*)
4106   lt_cv_deplibs_check_method=pass_all
4107   ;;
4108
4109 solaris*)
4110   lt_cv_deplibs_check_method=pass_all
4111   ;;
4112
4113 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4114   lt_cv_deplibs_check_method=pass_all
4115   ;;
4116
4117 sysv4 | sysv4.3*)
4118   case $host_vendor in
4119   motorola)
4120     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]]'
4121     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4122     ;;
4123   ncr)
4124     lt_cv_deplibs_check_method=pass_all
4125     ;;
4126   sequent)
4127     lt_cv_file_magic_cmd='/bin/file'
4128     lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
4129     ;;
4130   sni)
4131     lt_cv_file_magic_cmd='/bin/file'
4132     lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4133     lt_cv_file_magic_test_file=/lib/libc.so
4134     ;;
4135   siemens)
4136     lt_cv_deplibs_check_method=pass_all
4137     ;;
4138   pc)
4139     lt_cv_deplibs_check_method=pass_all
4140     ;;
4141   esac
4142   ;;
4143
4144 tpf*)
4145   lt_cv_deplibs_check_method=pass_all
4146   ;;
4147 esac
4148 ])
4149 file_magic_cmd=$lt_cv_file_magic_cmd
4150 deplibs_check_method=$lt_cv_deplibs_check_method
4151 test -z "$deplibs_check_method" && deplibs_check_method=unknown
4152
4153 _LT_DECL([], [deplibs_check_method], [1],
4154     [Method to check whether dependent libraries are shared objects])
4155 _LT_DECL([], [file_magic_cmd], [1],
4156     [Command to use when deplibs_check_method == "file_magic"])
4157 ])# _LT_CHECK_MAGIC_METHOD
4158
4159
4160 # LT_PATH_NM
4161 # ----------
4162 # find the pathname to a BSD- or MS-compatible name lister
4163 AC_DEFUN([LT_PATH_NM],
4164 [AC_REQUIRE([AC_PROG_CC])dnl
4165 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
4166 [if test -n "$NM"; then
4167   # Let the user override the test.
4168   lt_cv_path_NM="$NM"
4169 else
4170   lt_nm_to_check="${ac_tool_prefix}nm"
4171   if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
4172     lt_nm_to_check="$lt_nm_to_check nm"
4173   fi
4174   for lt_tmp_nm in $lt_nm_to_check; do
4175     lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4176     for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
4177       IFS="$lt_save_ifs"
4178       test -z "$ac_dir" && ac_dir=.
4179       tmp_nm="$ac_dir/$lt_tmp_nm"
4180       if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
4181         # Check to see if the nm accepts a BSD-compat flag.
4182         # Adding the `sed 1q' prevents false positives on HP-UX, which says:
4183         #   nm: unknown option "B" ignored
4184         # Tru64's nm complains that /dev/null is an invalid object file
4185         case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
4186         */dev/null* | *'Invalid file or object type'*)
4187           lt_cv_path_NM="$tmp_nm -B"
4188           break
4189           ;;
4190         *)
4191           case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
4192           */dev/null*)
4193             lt_cv_path_NM="$tmp_nm -p"
4194             break
4195             ;;
4196           *)
4197             lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4198             continue # so that we can try to find one that supports BSD flags
4199             ;;
4200           esac
4201           ;;
4202         esac
4203       fi
4204     done
4205     IFS="$lt_save_ifs"
4206   done
4207   : ${lt_cv_path_NM=no}
4208 fi])
4209 if test "$lt_cv_path_NM" != "no"; then
4210   NM="$lt_cv_path_NM"
4211 else
4212   # Didn't find any BSD compatible name lister, look for dumpbin.
4213   AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
4214   AC_SUBST([DUMPBIN])
4215   if test "$DUMPBIN" != ":"; then
4216     NM="$DUMPBIN"
4217   fi
4218 fi
4219 test -z "$NM" && NM=nm
4220 AC_SUBST([NM])
4221 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
4222
4223 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
4224   [lt_cv_nm_interface="BSD nm"
4225   echo "int some_variable = 0;" > conftest.$ac_ext
4226   (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
4227   (eval "$ac_compile" 2>conftest.err)
4228   cat conftest.err >&AS_MESSAGE_LOG_FD
4229   (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
4230   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
4231   cat conftest.err >&AS_MESSAGE_LOG_FD
4232   (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
4233   cat conftest.out >&AS_MESSAGE_LOG_FD
4234   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
4235     lt_cv_nm_interface="MS dumpbin"
4236   fi
4237   rm -f conftest*])
4238 ])# LT_PATH_NM
4239
4240 # Old names:
4241 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
4242 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
4243 dnl aclocal-1.4 backwards compatibility:
4244 dnl AC_DEFUN([AM_PROG_NM], [])
4245 dnl AC_DEFUN([AC_PROG_NM], [])
4246
4247
4248 # LT_LIB_M
4249 # --------
4250 # check for math library
4251 AC_DEFUN([LT_LIB_M],
4252 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4253 LIBM=
4254 case $host in
4255 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
4256   # These system don't have libm, or don't need it
4257   ;;
4258 *-ncr-sysv4.3*)
4259   AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4260   AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
4261   ;;
4262 *)
4263   AC_CHECK_LIB(m, cos, LIBM="-lm")
4264   ;;
4265 esac
4266 AC_SUBST([LIBM])
4267 ])# LT_LIB_M
4268
4269 # Old name:
4270 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
4271 dnl aclocal-1.4 backwards compatibility:
4272 dnl AC_DEFUN([AC_CHECK_LIBM], [])
4273
4274
4275 # _LT_COMPILER_NO_RTTI([TAGNAME])
4276 # -------------------------------
4277 m4_defun([_LT_COMPILER_NO_RTTI],
4278 [m4_require([_LT_TAG_COMPILER])dnl
4279
4280 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4281
4282 if test "$GCC" = yes; then
4283   _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4284
4285   _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4286     lt_cv_prog_compiler_rtti_exceptions,
4287     [-fno-rtti -fno-exceptions], [],
4288     [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4289 fi
4290 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
4291         [Compiler flag to turn off builtin functions])
4292 ])# _LT_COMPILER_NO_RTTI
4293
4294
4295 # _LT_CMD_GLOBAL_SYMBOLS
4296 # ----------------------
4297 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
4298 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4299 AC_REQUIRE([AC_PROG_CC])dnl
4300 AC_REQUIRE([LT_PATH_NM])dnl
4301 AC_REQUIRE([LT_PATH_LD])dnl
4302 m4_require([_LT_DECL_SED])dnl
4303 m4_require([_LT_DECL_EGREP])dnl
4304 m4_require([_LT_TAG_COMPILER])dnl
4305
4306 # Check for command to grab the raw symbol name followed by C symbol from nm.
4307 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4308 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4309 [
4310 # These are sane defaults that work on at least a few old systems.
4311 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4312
4313 # Character class describing NM global symbol codes.
4314 symcode='[[BCDEGRST]]'
4315
4316 # Regexp to match symbols that can be accessed directly from C.
4317 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4318
4319 # Define system-specific variables.
4320 case $host_os in
4321 aix*)
4322   symcode='[[BCDT]]'
4323   ;;
4324 cygwin* | mingw* | pw32* | cegcc*)
4325   symcode='[[ABCDGISTW]]'
4326   ;;
4327 hpux*)
4328   if test "$host_cpu" = ia64; then
4329     symcode='[[ABCDEGRST]]'
4330   fi
4331   ;;
4332 irix* | nonstopux*)
4333   symcode='[[BCDEGRST]]'
4334   ;;
4335 osf*)
4336   symcode='[[BCDEGQRST]]'
4337   ;;
4338 solaris*)
4339   symcode='[[BDRT]]'
4340   ;;
4341 sco3.2v5*)
4342   symcode='[[DT]]'
4343   ;;
4344 sysv4.2uw2*)
4345   symcode='[[DT]]'
4346   ;;
4347 sysv5* | sco5v6* | unixware* | OpenUNIX*)
4348   symcode='[[ABDT]]'
4349   ;;
4350 sysv4)
4351   symcode='[[DFNSTU]]'
4352   ;;
4353 esac
4354
4355 # If we're using GNU nm, then use its standard symbol codes.
4356 case `$NM -V 2>&1` in
4357 *GNU* | *'with BFD'*)
4358   symcode='[[ABCDGIRSTW]]' ;;
4359 esac
4360
4361 # Transform an extracted symbol line into a proper C declaration.
4362 # Some systems (esp. on ia64) link data and code symbols differently,
4363 # so use this general approach.
4364 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4365
4366 # Transform an extracted symbol line into symbol name and symbol address
4367 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
4368 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'"
4369
4370 # Handle CRLF in mingw tool chain
4371 opt_cr=
4372 case $build_os in
4373 mingw*)
4374   opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4375   ;;
4376 esac
4377
4378 # Try without a prefix underscore, then with it.
4379 for ac_symprfx in "" "_"; do
4380
4381   # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4382   symxfrm="\\1 $ac_symprfx\\2 \\2"
4383
4384   # Write the raw and C identifiers.
4385   if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4386     # Fake it for dumpbin and say T for any non-static function
4387     # and D for any global variable.
4388     # Also find C++ and __fastcall symbols from MSVC++,
4389     # which start with @ or ?.
4390     lt_cv_sys_global_symbol_pipe="$AWK ['"\
4391 "     {last_section=section; section=\$ 3};"\
4392 "     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
4393 "     \$ 0!~/External *\|/{next};"\
4394 "     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
4395 "     {if(hide[section]) next};"\
4396 "     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
4397 "     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
4398 "     s[1]~/^[@?]/{print s[1], s[1]; next};"\
4399 "     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
4400 "     ' prfx=^$ac_symprfx]"
4401   else
4402     lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[     ]]\($symcode$symcode*\)[[       ]][[    ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4403   fi
4404
4405   # Check to see that the pipe works correctly.
4406   pipe_works=no
4407
4408   rm -f conftest*
4409   cat > conftest.$ac_ext <<_LT_EOF
4410 #ifdef __cplusplus
4411 extern "C" {
4412 #endif
4413 char nm_test_var;
4414 void nm_test_func(void);
4415 void nm_test_func(void){}
4416 #ifdef __cplusplus
4417 }
4418 #endif
4419 int main(){nm_test_var='a';nm_test_func();return(0);}
4420 _LT_EOF
4421
4422   if AC_TRY_EVAL(ac_compile); then
4423     # Now try to grab the symbols.
4424     nlist=conftest.nm
4425     if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
4426       # Try sorting and uniquifying the output.
4427       if sort "$nlist" | uniq > "$nlist"T; then
4428         mv -f "$nlist"T "$nlist"
4429       else
4430         rm -f "$nlist"T
4431       fi
4432
4433       # Make sure that we snagged all the symbols we need.
4434       if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
4435         if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
4436           cat <<_LT_EOF > conftest.$ac_ext
4437 #ifdef __cplusplus
4438 extern "C" {
4439 #endif
4440
4441 _LT_EOF
4442           # Now generate the symbol file.
4443           eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
4444
4445           cat <<_LT_EOF >> conftest.$ac_ext
4446
4447 /* The mapping between symbol names and symbols.  */
4448 const struct {
4449   const char *name;
4450   void       *address;
4451 }
4452 lt__PROGRAM__LTX_preloaded_symbols[[]] =
4453 {
4454   { "@PROGRAM@", (void *) 0 },
4455 _LT_EOF
4456           $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
4457           cat <<\_LT_EOF >> conftest.$ac_ext
4458   {0, (void *) 0}
4459 };
4460
4461 /* This works around a problem in FreeBSD linker */
4462 #ifdef FREEBSD_WORKAROUND
4463 static const void *lt_preloaded_setup() {
4464   return lt__PROGRAM__LTX_preloaded_symbols;
4465 }
4466 #endif
4467
4468 #ifdef __cplusplus
4469 }
4470 #endif
4471 _LT_EOF
4472           # Now try linking the two files.
4473           mv conftest.$ac_objext conftstm.$ac_objext
4474           lt_save_LIBS="$LIBS"
4475           lt_save_CFLAGS="$CFLAGS"
4476           LIBS="conftstm.$ac_objext"
4477           CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4478           if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4479             pipe_works=yes
4480           fi
4481           LIBS="$lt_save_LIBS"
4482           CFLAGS="$lt_save_CFLAGS"
4483         else
4484           echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4485         fi
4486       else
4487         echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4488       fi
4489     else
4490       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4491     fi
4492   else
4493     echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4494     cat conftest.$ac_ext >&5
4495   fi
4496   rm -rf conftest* conftst*
4497
4498   # Do not use the global_symbol_pipe unless it works.
4499   if test "$pipe_works" = yes; then
4500     break
4501   else
4502     lt_cv_sys_global_symbol_pipe=
4503   fi
4504 done
4505 ])
4506 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4507   lt_cv_sys_global_symbol_to_cdecl=
4508 fi
4509 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4510   AC_MSG_RESULT(failed)
4511 else
4512   AC_MSG_RESULT(ok)
4513 fi
4514
4515 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
4516     [Take the output of nm and produce a listing of raw symbols and C names])
4517 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
4518     [Transform the output of nm in a proper C declaration])
4519 _LT_DECL([global_symbol_to_c_name_address],
4520     [lt_cv_sys_global_symbol_to_c_name_address], [1],
4521     [Transform the output of nm in a C name address pair])
4522 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
4523     [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
4524     [Transform the output of nm in a C name address pair when lib prefix is needed])
4525 ]) # _LT_CMD_GLOBAL_SYMBOLS
4526
4527
4528 # _LT_COMPILER_PIC([TAGNAME])
4529 # ---------------------------
4530 m4_defun([_LT_COMPILER_PIC],
4531 [m4_require([_LT_TAG_COMPILER])dnl
4532 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
4533 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4534 _LT_TAGVAR(lt_prog_compiler_static, $1)=
4535
4536 AC_MSG_CHECKING([for $compiler option to produce PIC])
4537 m4_if([$1], [CXX], [
4538   # C++ specific cases for pic, static, wl, etc.
4539   if test "$GXX" = yes; then
4540     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4541     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4542
4543     case $host_os in
4544     aix*)
4545       # All AIX code is PIC.
4546       if test "$host_cpu" = ia64; then
4547         # AIX 5 now supports IA64 processor
4548         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4549       fi
4550       ;;
4551
4552     amigaos*)
4553       case $host_cpu in
4554       powerpc)
4555             # see comment about AmigaOS4 .so support
4556             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4557         ;;
4558       m68k)
4559             # FIXME: we need at least 68020 code to build shared libraries, but
4560             # adding the `-m68020' flag to GCC prevents building anything better,
4561             # like `-m68040'.
4562             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4563         ;;
4564       esac
4565       ;;
4566
4567     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4568       # PIC is the default for these OSes.
4569       ;;
4570     mingw* | cygwin* | os2* | pw32* | cegcc*)
4571       # This hack is so that the source file can tell whether it is being
4572       # built for inclusion in a dll (and should export symbols for example).
4573       # Although the cygwin gcc ignores -fPIC, still need this for old-style
4574       # (--disable-auto-import) libraries
4575       m4_if([$1], [GCJ], [],
4576         [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4577       ;;
4578     darwin* | rhapsody*)
4579       # PIC is the default on this platform
4580       # Common symbols not allowed in MH_DYLIB files
4581       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4582       ;;
4583     *djgpp*)
4584       # DJGPP does not support shared libraries at all
4585       _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4586       ;;
4587     interix[[3-9]]*)
4588       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4589       # Instead, we relocate shared libraries at runtime.
4590       ;;
4591     sysv4*MP*)
4592       if test -d /usr/nec; then
4593         _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4594       fi
4595       ;;
4596     hpux*)
4597       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4598       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
4599       # sets the default TLS model and affects inlining.
4600       case $host_cpu in
4601       hppa*64*)
4602         ;;
4603       *)
4604         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4605         ;;
4606       esac
4607       ;;
4608     *qnx* | *nto*)
4609       # QNX uses GNU C++, but need to define -shared option too, otherwise
4610       # it will coredump.
4611       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4612       ;;
4613     *)
4614       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4615       ;;
4616     esac
4617   else
4618     case $host_os in
4619       aix[[4-9]]*)
4620         # All AIX code is PIC.
4621         if test "$host_cpu" = ia64; then
4622           # AIX 5 now supports IA64 processor
4623           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4624         else
4625           _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4626         fi
4627         ;;
4628       chorus*)
4629         case $cc_basename in
4630         cxch68*)
4631           # Green Hills C++ Compiler
4632           # _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"
4633           ;;
4634         esac
4635         ;;
4636       dgux*)
4637         case $cc_basename in
4638           ec++*)
4639             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4640             ;;
4641           ghcx*)
4642             # Green Hills C++ Compiler
4643             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4644             ;;
4645           *)
4646             ;;
4647         esac
4648         ;;
4649       freebsd* | dragonfly*)
4650         # FreeBSD uses GNU C++
4651         ;;
4652       hpux9* | hpux10* | hpux11*)
4653         case $cc_basename in
4654           CC*)
4655             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4656             _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4657             if test "$host_cpu" != ia64; then
4658               _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4659             fi
4660             ;;
4661           aCC*)
4662             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4663             _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4664             case $host_cpu in
4665             hppa*64*|ia64*)
4666               # +Z the default
4667               ;;
4668             *)
4669               _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4670               ;;
4671             esac
4672             ;;
4673           *)
4674             ;;
4675         esac
4676         ;;
4677       interix*)
4678         # This is c89, which is MS Visual C++ (no shared libs)
4679         # Anyone wants to do a port?
4680         ;;
4681       irix5* | irix6* | nonstopux*)
4682         case $cc_basename in
4683           CC*)
4684             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4685             _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4686             # CC pic flag -KPIC is the default.
4687             ;;
4688           *)
4689             ;;
4690         esac
4691         ;;
4692       linux* | k*bsd*-gnu | kopensolaris*-gnu)
4693         case $cc_basename in
4694           KCC*)
4695             # KAI C++ Compiler
4696             _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4697             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4698             ;;
4699           ecpc* )
4700             # old Intel C++ for x86_64 which still supported -KPIC.
4701             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4702             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4703             _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4704             ;;
4705           icpc* )
4706             # Intel C++, used to be incompatible with GCC.
4707             # ICC 10 doesn't accept -KPIC any more.
4708             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4709             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4710             _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4711             ;;
4712           pgCC* | pgcpp*)
4713             # Portland Group C++ compiler
4714             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4715             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4716             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4717             ;;
4718           cxx*)
4719             # Compaq C++
4720             # Make sure the PIC flag is empty.  It appears that all Alpha
4721             # Linux and Compaq Tru64 Unix objects are PIC.
4722             _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4723             _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4724             ;;
4725           xlc* | xlC*)
4726             # IBM XL 8.0 on PPC
4727             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4728             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4729             _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4730             ;;
4731           *)
4732             case `$CC -V 2>&1 | sed 5q` in
4733             *Sun\ C*)
4734               # Sun C++ 5.9
4735               _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4736               _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4737               _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4738               ;;
4739             esac
4740             ;;
4741         esac
4742         ;;
4743       lynxos*)
4744         ;;
4745       m88k*)
4746         ;;
4747       mvs*)
4748         case $cc_basename in
4749           cxx*)
4750             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4751             ;;
4752           *)
4753             ;;
4754         esac
4755         ;;
4756       netbsd* | netbsdelf*-gnu)
4757         ;;
4758       *qnx* | *nto*)
4759         # QNX uses GNU C++, but need to define -shared option too, otherwise
4760         # it will coredump.
4761         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4762         ;;
4763       osf3* | osf4* | osf5*)
4764         case $cc_basename in
4765           KCC*)
4766             _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4767             ;;
4768           RCC*)
4769             # Rational C++ 2.4.1
4770             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4771             ;;
4772           cxx*)
4773             # Digital/Compaq C++
4774             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4775             # Make sure the PIC flag is empty.  It appears that all Alpha
4776             # Linux and Compaq Tru64 Unix objects are PIC.
4777             _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4778             _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4779             ;;
4780           *)
4781             ;;
4782         esac
4783         ;;
4784       psos*)
4785         ;;
4786       solaris*)
4787         case $cc_basename in
4788           CC*)
4789             # Sun C++ 4.2, 5.x and Centerline C++
4790             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4791             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4792             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4793             ;;
4794           gcx*)
4795             # Green Hills C++ Compiler
4796             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4797             ;;
4798           *)
4799             ;;
4800         esac
4801         ;;
4802       sunos4*)
4803         case $cc_basename in
4804           CC*)
4805             # Sun C++ 4.x
4806             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4807             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4808             ;;
4809           lcc*)
4810             # Lucid
4811             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4812             ;;
4813           *)
4814             ;;
4815         esac
4816         ;;
4817       sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4818         case $cc_basename in
4819           CC*)
4820             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4821             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4822             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4823             ;;
4824         esac
4825         ;;
4826       tandem*)
4827         case $cc_basename in
4828           NCC*)
4829             # NonStop-UX NCC 3.20
4830             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4831             ;;
4832           *)
4833             ;;
4834         esac
4835         ;;
4836       vxworks*)
4837         ;;
4838       *)
4839         _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4840         ;;
4841     esac
4842   fi
4843 ],
4844 [
4845   if test "$GCC" = yes; then
4846     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4847     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4848
4849     case $host_os in
4850       aix*)
4851       # All AIX code is PIC.
4852       if test "$host_cpu" = ia64; then
4853         # AIX 5 now supports IA64 processor
4854         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4855       fi
4856       ;;
4857
4858     amigaos*)
4859       case $host_cpu in
4860       powerpc)
4861             # see comment about AmigaOS4 .so support
4862             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4863         ;;
4864       m68k)
4865             # FIXME: we need at least 68020 code to build shared libraries, but
4866             # adding the `-m68020' flag to GCC prevents building anything better,
4867             # like `-m68040'.
4868             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4869         ;;
4870       esac
4871       ;;
4872
4873     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4874       # PIC is the default for these OSes.
4875       ;;
4876
4877     mingw* | cygwin* | pw32* | os2* | cegcc*)
4878       # This hack is so that the source file can tell whether it is being
4879       # built for inclusion in a dll (and should export symbols for example).
4880       # Although the cygwin gcc ignores -fPIC, still need this for old-style
4881       # (--disable-auto-import) libraries
4882       m4_if([$1], [GCJ], [],
4883         [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4884       ;;
4885
4886     darwin* | rhapsody*)
4887       # PIC is the default on this platform
4888       # Common symbols not allowed in MH_DYLIB files
4889       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4890       ;;
4891
4892     hpux*)
4893       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4894       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
4895       # sets the default TLS model and affects inlining.
4896       case $host_cpu in
4897       hppa*64*)
4898         # +Z the default
4899         ;;
4900       *)
4901         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4902         ;;
4903       esac
4904       ;;
4905
4906     interix[[3-9]]*)
4907       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4908       # Instead, we relocate shared libraries at runtime.
4909       ;;
4910
4911     msdosdjgpp*)
4912       # Just because we use GCC doesn't mean we suddenly get shared libraries
4913       # on systems that don't support them.
4914       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4915       enable_shared=no
4916       ;;
4917
4918     *nto* | *qnx*)
4919       # QNX uses GNU C++, but need to define -shared option too, otherwise
4920       # it will coredump.
4921       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4922       ;;
4923
4924     sysv4*MP*)
4925       if test -d /usr/nec; then
4926         _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4927       fi
4928       ;;
4929
4930     *)
4931       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4932       ;;
4933     esac
4934   else
4935     # PORTME Check for flag to pass linker flags through the system compiler.
4936     case $host_os in
4937     aix*)
4938       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4939       if test "$host_cpu" = ia64; then
4940         # AIX 5 now supports IA64 processor
4941         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4942       else
4943         _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4944       fi
4945       ;;
4946
4947     mingw* | cygwin* | pw32* | os2* | cegcc*)
4948       # This hack is so that the source file can tell whether it is being
4949       # built for inclusion in a dll (and should export symbols for example).
4950       m4_if([$1], [GCJ], [],
4951         [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4952       ;;
4953
4954     hpux9* | hpux10* | hpux11*)
4955       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4956       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4957       # not for PA HP-UX.
4958       case $host_cpu in
4959       hppa*64*|ia64*)
4960         # +Z the default
4961         ;;
4962       *)
4963         _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4964         ;;
4965       esac
4966       # Is there a better lt_prog_compiler_static that works with the bundled CC?
4967       _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4968       ;;
4969
4970     irix5* | irix6* | nonstopux*)
4971       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4972       # PIC (with -KPIC) is the default.
4973       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4974       ;;
4975
4976     linux* | k*bsd*-gnu | kopensolaris*-gnu)
4977       case $cc_basename in
4978       # old Intel for x86_64 which still supported -KPIC.
4979       ecc*)
4980         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4981         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4982         _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4983         ;;
4984       # icc used to be incompatible with GCC.
4985       # ICC 10 doesn't accept -KPIC any more.
4986       icc* | ifort*)
4987         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4988         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4989         _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4990         ;;
4991       # Lahey Fortran 8.1.
4992       lf95*)
4993         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4994         _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4995         _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4996         ;;
4997       pgcc* | pgf77* | pgf90* | pgf95*)
4998         # Portland Group compilers (*not* the Pentium gcc compiler,
4999         # which looks to be a dead project)
5000         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5001         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5002         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5003         ;;
5004       ccc*)
5005         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5006         # All Alpha code is PIC.
5007         _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5008         ;;
5009       xl*)
5010         # IBM XL C 8.0/Fortran 10.1 on PPC
5011         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5012         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5013         _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5014         ;;
5015       *)
5016         case `$CC -V 2>&1 | sed 5q` in
5017         *Sun\ C*)
5018           # Sun C 5.9
5019           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5020           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5021           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5022           ;;
5023         *Sun\ F*)
5024           # Sun Fortran 8.3 passes all unrecognized flags to the linker
5025           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5026           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5027           _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
5028           ;;
5029         esac
5030         ;;
5031       esac
5032       ;;
5033
5034     newsos6)
5035       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5036       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5037       ;;
5038
5039     *nto* | *qnx*)
5040       # QNX uses GNU C++, but need to define -shared option too, otherwise
5041       # it will coredump.
5042       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5043       ;;
5044
5045     osf3* | osf4* | osf5*)
5046       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5047       # All OSF/1 code is PIC.
5048       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5049       ;;
5050
5051     rdos*)
5052       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5053       ;;
5054
5055     solaris*)
5056       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5057       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5058       case $cc_basename in
5059       f77* | f90* | f95*)
5060         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5061       *)
5062         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5063       esac
5064       ;;
5065
5066     sunos4*)
5067       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5068       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5069       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5070       ;;
5071
5072     sysv4 | sysv4.2uw2* | sysv4.3*)
5073       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5074       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5075       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5076       ;;
5077
5078     sysv4*MP*)
5079       if test -d /usr/nec ;then
5080         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5081         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5082       fi
5083       ;;
5084
5085     sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5086       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5087       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5088       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5089       ;;
5090
5091     unicos*)
5092       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5093       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5094       ;;
5095
5096     uts4*)
5097       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5098       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5099       ;;
5100
5101     *)
5102       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5103       ;;
5104     esac
5105   fi
5106 ])
5107 case $host_os in
5108   # For platforms which do not support PIC, -DPIC is meaningless:
5109   *djgpp*)
5110     _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5111     ;;
5112   *)
5113     _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
5114     ;;
5115 esac
5116 AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
5117 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
5118         [How to pass a linker flag through the compiler])
5119
5120 #
5121 # Check to make sure the PIC flag actually works.
5122 #
5123 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
5124   _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
5125     [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
5126     [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
5127     [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
5128      "" | " "*) ;;
5129      *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5130      esac],
5131     [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
5132      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5133 fi
5134 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
5135         [Additional compiler flags for building library objects])
5136
5137 #
5138 # Check to make sure the static flag actually works.
5139 #
5140 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
5141 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
5142   _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
5143   $lt_tmp_static_flag,
5144   [],
5145   [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
5146 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
5147         [Compiler flag to prevent dynamic linking])
5148 ])# _LT_COMPILER_PIC
5149
5150
5151 # _LT_LINKER_SHLIBS([TAGNAME])
5152 # ----------------------------
5153 # See if the linker supports building shared libraries.
5154 m4_defun([_LT_LINKER_SHLIBS],
5155 [AC_REQUIRE([LT_PATH_LD])dnl
5156 AC_REQUIRE([LT_PATH_NM])dnl
5157 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5158 m4_require([_LT_DECL_EGREP])dnl
5159 m4_require([_LT_DECL_SED])dnl
5160 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
5161 m4_require([_LT_TAG_COMPILER])dnl
5162 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5163 m4_if([$1], [CXX], [
5164   _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5165   case $host_os in
5166   aix[[4-9]]*)
5167     # If we're using GNU nm, then we don't want the "-C" option.
5168     # -C means demangle to AIX nm, but means don't demangle with GNU nm
5169     if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5170       _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
5171     else
5172       _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'
5173     fi
5174     ;;
5175   pw32*)
5176     _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5177   ;;
5178   cygwin* | mingw* | cegcc*)
5179     _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
5180   ;;
5181   linux* | k*bsd*-gnu)
5182     _LT_TAGVAR(link_all_deplibs, $1)=no
5183   ;;
5184   *)
5185     _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5186   ;;
5187   esac
5188   _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5189 ], [
5190   runpath_var=
5191   _LT_TAGVAR(allow_undefined_flag, $1)=
5192   _LT_TAGVAR(always_export_symbols, $1)=no
5193   _LT_TAGVAR(archive_cmds, $1)=
5194   _LT_TAGVAR(archive_expsym_cmds, $1)=
5195   _LT_TAGVAR(compiler_needs_object, $1)=no
5196   _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5197   _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5198   _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5199   _LT_TAGVAR(hardcode_automatic, $1)=no
5200   _LT_TAGVAR(hardcode_direct, $1)=no
5201   _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5202   _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5203   _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5204   _LT_TAGVAR(hardcode_libdir_separator, $1)=
5205   _LT_TAGVAR(hardcode_minus_L, $1)=no
5206   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5207   _LT_TAGVAR(inherit_rpath, $1)=no
5208   _LT_TAGVAR(link_all_deplibs, $1)=unknown
5209   _LT_TAGVAR(module_cmds, $1)=
5210   _LT_TAGVAR(module_expsym_cmds, $1)=
5211   _LT_TAGVAR(old_archive_from_new_cmds, $1)=
5212   _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5213   _LT_TAGVAR(thread_safe_flag_spec, $1)=
5214   _LT_TAGVAR(whole_archive_flag_spec, $1)=
5215   # include_expsyms should be a list of space-separated symbols to be *always*
5216   # included in the symbol list
5217   _LT_TAGVAR(include_expsyms, $1)=
5218   # exclude_expsyms can be an extended regexp of symbols to exclude
5219   # it will be wrapped by ` (' and `)$', so one must not match beginning or
5220   # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5221   # as well as any symbol that contains `d'.
5222   _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5223   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5224   # platforms (ab)use it in PIC code, but their linkers get confused if
5225   # the symbol is explicitly referenced.  Since portable code cannot
5226   # rely on this symbol name, it's probably fine to never include it in
5227   # preloaded symbol tables.
5228   # Exclude shared library initialization/finalization symbols.
5229 dnl Note also adjust exclude_expsyms for C++ above.
5230   extract_expsyms_cmds=
5231
5232   case $host_os in
5233   cygwin* | mingw* | pw32* | cegcc*)
5234     # FIXME: the MSVC++ port hasn't been tested in a loooong time
5235     # When not using gcc, we currently assume that we are using
5236     # Microsoft Visual C++.
5237     if test "$GCC" != yes; then
5238       with_gnu_ld=no
5239     fi
5240     ;;
5241   interix*)
5242     # we just hope/assume this is gcc and not c89 (= MSVC++)
5243     with_gnu_ld=yes
5244     ;;
5245   openbsd*)
5246     with_gnu_ld=no
5247     ;;
5248   linux* | k*bsd*-gnu)
5249     _LT_TAGVAR(link_all_deplibs, $1)=no
5250     ;;
5251   esac
5252
5253   _LT_TAGVAR(ld_shlibs, $1)=yes
5254   if test "$with_gnu_ld" = yes; then
5255     # If archive_cmds runs LD, not CC, wlarc should be empty
5256     wlarc='${wl}'
5257
5258     # Set some defaults for GNU ld with shared library support. These
5259     # are reset later if shared libraries are not supported. Putting them
5260     # here allows them to be overridden if necessary.
5261     runpath_var=LD_RUN_PATH
5262     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5263     _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5264     # ancient GNU ld didn't support --whole-archive et. al.
5265     if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
5266       _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5267     else
5268       _LT_TAGVAR(whole_archive_flag_spec, $1)=
5269     fi
5270     supports_anon_versioning=no
5271     case `$LD -v 2>&1` in
5272       *GNU\ gold*) supports_anon_versioning=yes ;;
5273       *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5274       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5275       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5276       *\ 2.11.*) ;; # other 2.11 versions
5277       *) supports_anon_versioning=yes ;;
5278     esac
5279
5280     # See if GNU ld supports shared libraries.
5281     case $host_os in
5282     aix[[3-9]]*)
5283       # On AIX/PPC, the GNU linker is very broken
5284       if test "$host_cpu" != ia64; then
5285         _LT_TAGVAR(ld_shlibs, $1)=no
5286         cat <<_LT_EOF 1>&2
5287
5288 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5289 *** to be unable to reliably create shared libraries on AIX.
5290 *** Therefore, libtool is disabling shared libraries support.  If you
5291 *** really care for shared libraries, you may want to modify your PATH
5292 *** so that a non-GNU linker is found, and then restart.
5293
5294 _LT_EOF
5295       fi
5296       ;;
5297
5298     amigaos*)
5299       case $host_cpu in
5300       powerpc)
5301             # see comment about AmigaOS4 .so support
5302             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5303             _LT_TAGVAR(archive_expsym_cmds, $1)=''
5304         ;;
5305       m68k)
5306             _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)'
5307             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5308             _LT_TAGVAR(hardcode_minus_L, $1)=yes
5309         ;;
5310       esac
5311       ;;
5312
5313     beos*)
5314       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5315         _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5316         # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5317         # support --undefined.  This deserves some investigation.  FIXME
5318         _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5319       else
5320         _LT_TAGVAR(ld_shlibs, $1)=no
5321       fi
5322       ;;
5323
5324     cygwin* | mingw* | pw32* | cegcc*)
5325       # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5326       # as there is no search path for DLLs.
5327       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5328       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5329       _LT_TAGVAR(always_export_symbols, $1)=no
5330       _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5331       _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'
5332
5333       if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5334         _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'
5335         # If the export-symbols file already is a .def file (1st line
5336         # is EXPORTS), use it as is; otherwise, prepend...
5337         _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5338           cp $export_symbols $output_objdir/$soname.def;
5339         else
5340           echo EXPORTS > $output_objdir/$soname.def;
5341           cat $export_symbols >> $output_objdir/$soname.def;
5342         fi~
5343         $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5344       else
5345         _LT_TAGVAR(ld_shlibs, $1)=no
5346       fi
5347       ;;
5348
5349     interix[[3-9]]*)
5350       _LT_TAGVAR(hardcode_direct, $1)=no
5351       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5352       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5353       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5354       # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5355       # Instead, shared libraries are loaded at an image base (0x10000000 by
5356       # default) and relocated if they conflict, which is a slow very memory
5357       # consuming and fragmenting process.  To avoid this, we pick a random,
5358       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5359       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
5360       _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'
5361       _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'
5362       ;;
5363
5364     gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
5365       tmp_diet=no
5366       if test "$host_os" = linux-dietlibc; then
5367         case $cc_basename in
5368           diet\ *) tmp_diet=yes;;       # linux-dietlibc with static linking (!diet-dyn)
5369         esac
5370       fi
5371       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
5372          && test "$tmp_diet" = no
5373       then
5374         tmp_addflag=
5375         tmp_sharedflag='-shared'
5376         case $cc_basename,$host_cpu in
5377         pgcc*)                          # Portland Group C compiler
5378           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
5379           tmp_addflag=' $pic_flag'
5380           ;;
5381         pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
5382           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
5383           tmp_addflag=' $pic_flag -Mnomain' ;;
5384         ecc*,ia64* | icc*,ia64*)        # Intel C compiler on ia64
5385           tmp_addflag=' -i_dynamic' ;;
5386         efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
5387           tmp_addflag=' -i_dynamic -nofor_main' ;;
5388         ifc* | ifort*)                  # Intel Fortran compiler
5389           tmp_addflag=' -nofor_main' ;;
5390         lf95*)                          # Lahey Fortran 8.1
5391           _LT_TAGVAR(whole_archive_flag_spec, $1)=
5392           tmp_sharedflag='--shared' ;;
5393         xl[[cC]]*)                      # IBM XL C 8.0 on PPC (deal with xlf below)
5394           tmp_sharedflag='-qmkshrobj'
5395           tmp_addflag= ;;
5396         esac
5397         case `$CC -V 2>&1 | sed 5q` in
5398         *Sun\ C*)                       # Sun C 5.9
5399           _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; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
5400           _LT_TAGVAR(compiler_needs_object, $1)=yes
5401           tmp_sharedflag='-G' ;;
5402         *Sun\ F*)                       # Sun Fortran 8.3
5403           tmp_sharedflag='-G' ;;
5404         esac
5405         _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5406
5407         if test "x$supports_anon_versioning" = xyes; then
5408           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5409             cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5410             echo "local: *; };" >> $output_objdir/$libname.ver~
5411             $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5412         fi
5413
5414         case $cc_basename in
5415         xlf*)
5416           # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
5417           _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
5418           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5419           _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
5420           _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
5421           if test "x$supports_anon_versioning" = xyes; then
5422             _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5423               cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5424               echo "local: *; };" >> $output_objdir/$libname.ver~
5425               $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
5426           fi
5427           ;;
5428         esac
5429       else
5430         _LT_TAGVAR(ld_shlibs, $1)=no
5431       fi
5432       ;;
5433
5434     netbsd* | netbsdelf*-gnu)
5435       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5436         _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5437         wlarc=
5438       else
5439         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5440         _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'
5441       fi
5442       ;;
5443
5444     solaris*)
5445       if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
5446         _LT_TAGVAR(ld_shlibs, $1)=no
5447         cat <<_LT_EOF 1>&2
5448
5449 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5450 *** create shared libraries on Solaris systems.  Therefore, libtool
5451 *** is disabling shared libraries support.  We urge you to upgrade GNU
5452 *** binutils to release 2.9.1 or newer.  Another option is to modify
5453 *** your PATH or compiler configuration so that the native linker is
5454 *** used, and then restart.
5455
5456 _LT_EOF
5457       elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5458         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5459         _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'
5460       else
5461         _LT_TAGVAR(ld_shlibs, $1)=no
5462       fi
5463       ;;
5464
5465     sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5466       case `$LD -v 2>&1` in
5467         *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5468         _LT_TAGVAR(ld_shlibs, $1)=no
5469         cat <<_LT_EOF 1>&2
5470
5471 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
5472 *** reliably create shared libraries on SCO systems.  Therefore, libtool
5473 *** is disabling shared libraries support.  We urge you to upgrade GNU
5474 *** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
5475 *** your PATH or compiler configuration so that the native linker is
5476 *** used, and then restart.
5477
5478 _LT_EOF
5479         ;;
5480         *)
5481           # For security reasons, it is highly recommended that you always
5482           # use absolute paths for naming shared libraries, and exclude the
5483           # DT_RUNPATH tag from executables and libraries.  But doing so
5484           # requires that you compile everything twice, which is a pain.
5485           if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5486             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5487             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5488             _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'
5489           else
5490             _LT_TAGVAR(ld_shlibs, $1)=no
5491           fi
5492         ;;
5493       esac
5494       ;;
5495
5496     sunos4*)
5497       _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5498       wlarc=
5499       _LT_TAGVAR(hardcode_direct, $1)=yes
5500       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5501       ;;
5502
5503     *)
5504       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5505         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5506         _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'
5507       else
5508         _LT_TAGVAR(ld_shlibs, $1)=no
5509       fi
5510       ;;
5511     esac
5512
5513     if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
5514       runpath_var=
5515       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5516       _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5517       _LT_TAGVAR(whole_archive_flag_spec, $1)=
5518     fi
5519   else
5520     # PORTME fill in a description of your system's linker (not GNU ld)
5521     case $host_os in
5522     aix3*)
5523       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5524       _LT_TAGVAR(always_export_symbols, $1)=yes
5525       _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'
5526       # Note: this linker hardcodes the directories in LIBPATH if there
5527       # are no directories specified by -L.
5528       _LT_TAGVAR(hardcode_minus_L, $1)=yes
5529       if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
5530         # Neither direct hardcoding nor static linking is supported with a
5531         # broken collect2.
5532         _LT_TAGVAR(hardcode_direct, $1)=unsupported
5533       fi
5534       ;;
5535
5536     aix[[4-9]]*)
5537       if test "$host_cpu" = ia64; then
5538         # On IA64, the linker does run time linking by default, so we don't
5539         # have to do anything special.
5540         aix_use_runtimelinking=no
5541         exp_sym_flag='-Bexport'
5542         no_entry_flag=""
5543       else
5544         # If we're using GNU nm, then we don't want the "-C" option.
5545         # -C means demangle to AIX nm, but means don't demangle with GNU nm
5546         if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5547           _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
5548         else
5549           _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'
5550         fi
5551         aix_use_runtimelinking=no
5552
5553         # Test if we are trying to use run time linking or normal
5554         # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5555         # need to do runtime linking.
5556         case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5557           for ld_flag in $LDFLAGS; do
5558           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5559             aix_use_runtimelinking=yes
5560             break
5561           fi
5562           done
5563           ;;
5564         esac
5565
5566         exp_sym_flag='-bexport'
5567         no_entry_flag='-bnoentry'
5568       fi
5569
5570       # When large executables or shared objects are built, AIX ld can
5571       # have problems creating the table of contents.  If linking a library
5572       # or program results in "error TOC overflow" add -mminimal-toc to
5573       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5574       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5575
5576       _LT_TAGVAR(archive_cmds, $1)=''
5577       _LT_TAGVAR(hardcode_direct, $1)=yes
5578       _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5579       _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5580       _LT_TAGVAR(link_all_deplibs, $1)=yes
5581       _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
5582
5583       if test "$GCC" = yes; then
5584         case $host_os in aix4.[[012]]|aix4.[[012]].*)
5585         # We only want to do this on AIX 4.2 and lower, the check
5586         # below for broken collect2 doesn't work under 4.3+
5587           collect2name=`${CC} -print-prog-name=collect2`
5588           if test -f "$collect2name" &&
5589            strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5590           then
5591           # We have reworked collect2
5592           :
5593           else
5594           # We have old collect2
5595           _LT_TAGVAR(hardcode_direct, $1)=unsupported
5596           # It fails to find uninstalled libraries when the uninstalled
5597           # path is not listed in the libpath.  Setting hardcode_minus_L
5598           # to unsupported forces relinking
5599           _LT_TAGVAR(hardcode_minus_L, $1)=yes
5600           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5601           _LT_TAGVAR(hardcode_libdir_separator, $1)=
5602           fi
5603           ;;
5604         esac
5605         shared_flag='-shared'
5606         if test "$aix_use_runtimelinking" = yes; then
5607           shared_flag="$shared_flag "'${wl}-G'
5608         fi
5609         _LT_TAGVAR(link_all_deplibs, $1)=no
5610       else
5611         # not using gcc
5612         if test "$host_cpu" = ia64; then
5613         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5614         # chokes on -Wl,-G. The following line is correct:
5615           shared_flag='-G'
5616         else
5617           if test "$aix_use_runtimelinking" = yes; then
5618             shared_flag='${wl}-G'
5619           else
5620             shared_flag='${wl}-bM:SRE'
5621           fi
5622         fi
5623       fi
5624
5625       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
5626       # It seems that -bexpall does not export symbols beginning with
5627       # underscore (_), so it is better to generate a list of symbols to export.
5628       _LT_TAGVAR(always_export_symbols, $1)=yes
5629       if test "$aix_use_runtimelinking" = yes; then
5630         # Warning - without using the other runtime loading flags (-brtl),
5631         # -berok will link without error, but may produce a broken library.
5632         _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5633         # Determine the default libpath from the value encoded in an
5634         # empty executable.
5635         _LT_SYS_MODULE_PATH_AIX
5636         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5637         _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 $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
5638       else
5639         if test "$host_cpu" = ia64; then
5640           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5641           _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5642           _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"
5643         else
5644          # Determine the default libpath from the value encoded in an
5645          # empty executable.
5646          _LT_SYS_MODULE_PATH_AIX
5647          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5648           # Warning - without using the other run time loading flags,
5649           # -berok will link without error, but may produce a broken library.
5650           _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5651           _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5652           # Exported symbols can be pulled into shared objects from archives
5653           _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5654           _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5655           # This is similar to how AIX traditionally builds its shared libraries.
5656           _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'
5657         fi
5658       fi
5659       ;;
5660
5661     amigaos*)
5662       case $host_cpu in
5663       powerpc)
5664             # see comment about AmigaOS4 .so support
5665             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5666             _LT_TAGVAR(archive_expsym_cmds, $1)=''
5667         ;;
5668       m68k)
5669             _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)'
5670             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5671             _LT_TAGVAR(hardcode_minus_L, $1)=yes
5672         ;;
5673       esac
5674       ;;
5675
5676     bsdi[[45]]*)
5677       _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5678       ;;
5679
5680     cygwin* | mingw* | pw32* | cegcc*)
5681       # When not using gcc, we currently assume that we are using
5682       # Microsoft Visual C++.
5683       # hardcode_libdir_flag_spec is actually meaningless, as there is
5684       # no search path for DLLs.
5685       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5686       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5687       # Tell ltmain to make .lib files, not .a files.
5688       libext=lib
5689       # Tell ltmain to make .dll files, not .so files.
5690       shrext_cmds=".dll"
5691       # FIXME: Setting linknames here is a bad hack.
5692       _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5693       # The linker will automatically build a .lib file if we build a DLL.
5694       _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5695       # FIXME: Should let the user specify the lib program.
5696       _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5697       _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
5698       _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5699       ;;
5700
5701     darwin* | rhapsody*)
5702       _LT_DARWIN_LINKER_FEATURES($1)
5703       ;;
5704
5705     dgux*)
5706       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5707       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5708       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5709       ;;
5710
5711     freebsd1*)
5712       _LT_TAGVAR(ld_shlibs, $1)=no
5713       ;;
5714
5715     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5716     # support.  Future versions do this automatically, but an explicit c++rt0.o
5717     # does not break anything, and helps significantly (at the cost of a little
5718     # extra space).
5719     freebsd2.2*)
5720       _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5721       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5722       _LT_TAGVAR(hardcode_direct, $1)=yes
5723       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5724       ;;
5725
5726     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5727     freebsd2*)
5728       _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5729       _LT_TAGVAR(hardcode_direct, $1)=yes
5730       _LT_TAGVAR(hardcode_minus_L, $1)=yes
5731       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5732       ;;
5733
5734     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5735     freebsd* | dragonfly*)
5736       _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5737       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5738       _LT_TAGVAR(hardcode_direct, $1)=yes
5739       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5740       ;;
5741
5742     hpux9*)
5743       if test "$GCC" = yes; then
5744         _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5745       else
5746         _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'
5747       fi
5748       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5749       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5750       _LT_TAGVAR(hardcode_direct, $1)=yes
5751
5752       # hardcode_minus_L: Not really in the search PATH,
5753       # but as the default location of the library.
5754       _LT_TAGVAR(hardcode_minus_L, $1)=yes
5755       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5756       ;;
5757
5758     hpux10*)
5759       if test "$GCC" = yes -a "$with_gnu_ld" = no; then
5760         _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5761       else
5762         _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5763       fi
5764       if test "$with_gnu_ld" = no; then
5765         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5766         _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
5767         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5768         _LT_TAGVAR(hardcode_direct, $1)=yes
5769         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5770         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5771         # hardcode_minus_L: Not really in the search PATH,
5772         # but as the default location of the library.
5773         _LT_TAGVAR(hardcode_minus_L, $1)=yes
5774       fi
5775       ;;
5776
5777     hpux11*)
5778       if test "$GCC" = yes -a "$with_gnu_ld" = no; then
5779         case $host_cpu in
5780         hppa*64*)
5781           _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5782           ;;
5783         ia64*)
5784           _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5785           ;;
5786         *)
5787           _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5788           ;;
5789         esac
5790       else
5791         case $host_cpu in
5792         hppa*64*)
5793           _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5794           ;;
5795         ia64*)
5796           _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5797           ;;
5798         *)
5799           _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5800           ;;
5801         esac
5802       fi
5803       if test "$with_gnu_ld" = no; then
5804         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5805         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5806
5807         case $host_cpu in
5808         hppa*64*|ia64*)
5809           _LT_TAGVAR(hardcode_direct, $1)=no
5810           _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5811           ;;
5812         *)
5813           _LT_TAGVAR(hardcode_direct, $1)=yes
5814           _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5815           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5816
5817           # hardcode_minus_L: Not really in the search PATH,
5818           # but as the default location of the library.
5819           _LT_TAGVAR(hardcode_minus_L, $1)=yes
5820           ;;
5821         esac
5822       fi
5823       ;;
5824
5825     irix5* | irix6* | nonstopux*)
5826       if test "$GCC" = yes; then
5827         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5828         # Try to use the -exported_symbol ld option, if it does not
5829         # work, assume that -exports_file does not work either and
5830         # implicitly export all symbols.
5831         save_LDFLAGS="$LDFLAGS"
5832         LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
5833         AC_LINK_IFELSE(int foo(void) {},
5834           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
5835         )
5836         LDFLAGS="$save_LDFLAGS"
5837       else
5838         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
5839         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
5840       fi
5841       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5842       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5843       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5844       _LT_TAGVAR(inherit_rpath, $1)=yes
5845       _LT_TAGVAR(link_all_deplibs, $1)=yes
5846       ;;
5847
5848     netbsd* | netbsdelf*-gnu)
5849       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5850         _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5851       else
5852         _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5853       fi
5854       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5855       _LT_TAGVAR(hardcode_direct, $1)=yes
5856       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5857       ;;
5858
5859     newsos6)
5860       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5861       _LT_TAGVAR(hardcode_direct, $1)=yes
5862       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5863       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5864       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5865       ;;
5866
5867     *nto* | *qnx*)
5868       ;;
5869
5870     openbsd*)
5871       if test -f /usr/libexec/ld.so; then
5872         _LT_TAGVAR(hardcode_direct, $1)=yes
5873         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5874         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5875         if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5876           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5877           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
5878           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5879           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5880         else
5881           case $host_os in
5882            openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
5883              _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5884              _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5885              ;;
5886            *)
5887              _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5888              _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5889              ;;
5890           esac
5891         fi
5892       else
5893         _LT_TAGVAR(ld_shlibs, $1)=no
5894       fi
5895       ;;
5896
5897     os2*)
5898       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5899       _LT_TAGVAR(hardcode_minus_L, $1)=yes
5900       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5901       _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'
5902       _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5903       ;;
5904
5905     osf3*)
5906       if test "$GCC" = yes; then
5907         _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5908         _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5909       else
5910         _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5911         _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
5912       fi
5913       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5914       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5915       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5916       ;;
5917
5918     osf4* | osf5*)      # as osf3* with the addition of -msym flag
5919       if test "$GCC" = yes; then
5920         _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5921         _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5922         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5923       else
5924         _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5925         _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
5926         _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~
5927         $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
5928
5929         # Both c and cxx compiler support -rpath directly
5930         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5931       fi
5932       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5933       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5934       ;;
5935
5936     solaris*)
5937       _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
5938       if test "$GCC" = yes; then
5939         wlarc='${wl}'
5940         _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5941         _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5942           $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5943       else
5944         case `$CC -V 2>&1` in
5945         *"Compilers 5.0"*)
5946           wlarc=''
5947           _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5948           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5949           $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
5950           ;;
5951         *)
5952           wlarc='${wl}'
5953           _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
5954           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5955           $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5956           ;;
5957         esac
5958       fi
5959       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5960       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5961       case $host_os in
5962       solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5963       *)
5964         # The compiler driver will combine and reorder linker options,
5965         # but understands `-z linker_flag'.  GCC discards it without `$wl',
5966         # but is careful enough not to reorder.
5967         # Supported since Solaris 2.6 (maybe 2.5.1?)
5968         if test "$GCC" = yes; then
5969           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
5970         else
5971           _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
5972         fi
5973         ;;
5974       esac
5975       _LT_TAGVAR(link_all_deplibs, $1)=yes
5976       ;;
5977
5978     sunos4*)
5979       if test "x$host_vendor" = xsequent; then
5980         # Use $CC to link under sequent, because it throws in some extra .o
5981         # files that make .init and .fini sections work.
5982         _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5983       else
5984         _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5985       fi
5986       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5987       _LT_TAGVAR(hardcode_direct, $1)=yes
5988       _LT_TAGVAR(hardcode_minus_L, $1)=yes
5989       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5990       ;;
5991
5992     sysv4)
5993       case $host_vendor in
5994         sni)
5995           _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5996           _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5997         ;;
5998         siemens)
5999           ## LD is ld it makes a PLAMLIB
6000           ## CC just makes a GrossModule.
6001           _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6002           _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6003           _LT_TAGVAR(hardcode_direct, $1)=no
6004         ;;
6005         motorola)
6006           _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6007           _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6008         ;;
6009       esac
6010       runpath_var='LD_RUN_PATH'
6011       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6012       ;;
6013
6014     sysv4.3*)
6015       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6016       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6017       _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6018       ;;
6019
6020     sysv4*MP*)
6021       if test -d /usr/nec; then
6022         _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6023         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6024         runpath_var=LD_RUN_PATH
6025         hardcode_runpath_var=yes
6026         _LT_TAGVAR(ld_shlibs, $1)=yes
6027       fi
6028       ;;
6029
6030     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6031       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6032       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6033       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6034       runpath_var='LD_RUN_PATH'
6035
6036       if test "$GCC" = yes; then
6037         _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6038         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6039       else
6040         _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6041         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6042       fi
6043       ;;
6044
6045     sysv5* | sco3.2v5* | sco5v6*)
6046       # Note: We can NOT use -z defs as we might desire, because we do not
6047       # link with -lc, and that would cause any symbols used from libc to
6048       # always be unresolved, which means just about no library would
6049       # ever link correctly.  If we're not using GNU ld we use -z text
6050       # though, which does catch some bad symbols but isn't as heavy-handed
6051       # as -z defs.
6052       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6053       _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6054       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6055       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6056       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6057       _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6058       _LT_TAGVAR(link_all_deplibs, $1)=yes
6059       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6060       runpath_var='LD_RUN_PATH'
6061
6062       if test "$GCC" = yes; then
6063         _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6064         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6065       else
6066         _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6067         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6068       fi
6069       ;;
6070
6071     uts4*)
6072       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6073       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6074       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6075       ;;
6076
6077     *)
6078       _LT_TAGVAR(ld_shlibs, $1)=no
6079       ;;
6080     esac
6081
6082     if test x$host_vendor = xsni; then
6083       case $host in
6084       sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6085         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
6086         ;;
6087       esac
6088     fi
6089   fi
6090 ])
6091 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6092 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6093
6094 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
6095
6096 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
6097 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
6098 _LT_DECL([], [extract_expsyms_cmds], [2],
6099     [The commands to extract the exported symbol list from a shared archive])
6100
6101 #
6102 # Do we need to explicitly link libc?
6103 #
6104 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
6105 x|xyes)
6106   # Assume -lc should be added
6107   _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6108
6109   if test "$enable_shared" = yes && test "$GCC" = yes; then
6110     case $_LT_TAGVAR(archive_cmds, $1) in
6111     *'~'*)
6112       # FIXME: we may have to deal with multi-command sequences.
6113       ;;
6114     '$CC '*)
6115       # Test whether the compiler implicitly links with -lc since on some
6116       # systems, -lgcc has to come before -lc. If gcc already passes -lc
6117       # to ld, don't add -lc before -lgcc.
6118       AC_MSG_CHECKING([whether -lc should be explicitly linked in])
6119       $RM conftest*
6120       echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6121
6122       if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6123         soname=conftest
6124         lib=conftest
6125         libobjs=conftest.$ac_objext
6126         deplibs=
6127         wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
6128         pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
6129         compiler_flags=-v
6130         linker_flags=-v
6131         verstring=
6132         output_objdir=.
6133         libname=conftest
6134         lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
6135         _LT_TAGVAR(allow_undefined_flag, $1)=
6136         if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
6137         then
6138           _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6139         else
6140           _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6141         fi
6142         _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6143       else
6144         cat conftest.err 1>&5
6145       fi
6146       $RM conftest*
6147       AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
6148       ;;
6149     esac
6150   fi
6151   ;;
6152 esac
6153
6154 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
6155     [Whether or not to add -lc for building shared libraries])
6156 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
6157     [enable_shared_with_static_runtimes], [0],
6158     [Whether or not to disallow shared libs when runtime libs are static])
6159 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
6160     [Compiler flag to allow reflexive dlopens])
6161 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
6162     [Compiler flag to generate shared objects directly from archives])
6163 _LT_TAGDECL([], [compiler_needs_object], [1],
6164     [Whether the compiler copes with passing no objects directly])
6165 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
6166     [Create an old-style archive from a shared archive])
6167 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
6168     [Create a temporary old-style archive to link instead of a shared archive])
6169 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
6170 _LT_TAGDECL([], [archive_expsym_cmds], [2])
6171 _LT_TAGDECL([], [module_cmds], [2],
6172     [Commands used to build a loadable module if different from building
6173     a shared archive.])
6174 _LT_TAGDECL([], [module_expsym_cmds], [2])
6175 _LT_TAGDECL([], [with_gnu_ld], [1],
6176     [Whether we are building with GNU ld or not])
6177 _LT_TAGDECL([], [allow_undefined_flag], [1],
6178     [Flag that allows shared libraries with undefined symbols to be built])
6179 _LT_TAGDECL([], [no_undefined_flag], [1],
6180     [Flag that enforces no undefined symbols])
6181 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
6182     [Flag to hardcode $libdir into a binary during linking.
6183     This must work even if $libdir does not exist])
6184 _LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
6185     [[If ld is used when linking, flag to hardcode $libdir into a binary
6186     during linking.  This must work even if $libdir does not exist]])
6187 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
6188     [Whether we need a single "-rpath" flag with a separated argument])
6189 _LT_TAGDECL([], [hardcode_direct], [0],
6190     [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6191     DIR into the resulting binary])
6192 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
6193     [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6194     DIR into the resulting binary and the resulting library dependency is
6195     "absolute", i.e impossible to change by setting ${shlibpath_var} if the
6196     library is relocated])
6197 _LT_TAGDECL([], [hardcode_minus_L], [0],
6198     [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
6199     into the resulting binary])
6200 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
6201     [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
6202     into the resulting binary])
6203 _LT_TAGDECL([], [hardcode_automatic], [0],
6204     [Set to "yes" if building a shared library automatically hardcodes DIR
6205     into the library and all subsequent libraries and executables linked
6206     against it])
6207 _LT_TAGDECL([], [inherit_rpath], [0],
6208     [Set to yes if linker adds runtime paths of dependent libraries
6209     to runtime path list])
6210 _LT_TAGDECL([], [link_all_deplibs], [0],
6211     [Whether libtool must link a program against all its dependency libraries])
6212 _LT_TAGDECL([], [fix_srcfile_path], [1],
6213     [Fix the shell variable $srcfile for the compiler])
6214 _LT_TAGDECL([], [always_export_symbols], [0],
6215     [Set to "yes" if exported symbols are required])
6216 _LT_TAGDECL([], [export_symbols_cmds], [2],
6217     [The commands to list exported symbols])
6218 _LT_TAGDECL([], [exclude_expsyms], [1],
6219     [Symbols that should not be listed in the preloaded symbols])
6220 _LT_TAGDECL([], [include_expsyms], [1],
6221     [Symbols that must always be exported])
6222 _LT_TAGDECL([], [prelink_cmds], [2],
6223     [Commands necessary for linking programs (against libraries) with templates])
6224 _LT_TAGDECL([], [file_list_spec], [1],
6225     [Specify filename containing input files])
6226 dnl FIXME: Not yet implemented
6227 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
6228 dnl    [Compiler flag to generate thread safe objects])
6229 ])# _LT_LINKER_SHLIBS
6230
6231
6232 # _LT_LANG_C_CONFIG([TAG])
6233 # ------------------------
6234 # Ensure that the configuration variables for a C compiler are suitably
6235 # defined.  These variables are subsequently used by _LT_CONFIG to write
6236 # the compiler configuration to `libtool'.
6237 m4_defun([_LT_LANG_C_CONFIG],
6238 [m4_require([_LT_DECL_EGREP])dnl
6239 lt_save_CC="$CC"
6240 AC_LANG_PUSH(C)
6241
6242 # Source file extension for C test sources.
6243 ac_ext=c
6244
6245 # Object file extension for compiled C test sources.
6246 objext=o
6247 _LT_TAGVAR(objext, $1)=$objext
6248
6249 # Code to be used in simple compile tests
6250 lt_simple_compile_test_code="int some_variable = 0;"
6251
6252 # Code to be used in simple link tests
6253 lt_simple_link_test_code='int main(){return(0);}'
6254
6255 _LT_TAG_COMPILER
6256 # Save the default compiler, since it gets overwritten when the other
6257 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
6258 compiler_DEFAULT=$CC
6259
6260 # save warnings/boilerplate of simple test code
6261 _LT_COMPILER_BOILERPLATE
6262 _LT_LINKER_BOILERPLATE
6263
6264 if test -n "$compiler"; then
6265   _LT_COMPILER_NO_RTTI($1)
6266   _LT_COMPILER_PIC($1)
6267   _LT_COMPILER_C_O($1)
6268   _LT_COMPILER_FILE_LOCKS($1)
6269   _LT_LINKER_SHLIBS($1)
6270   _LT_SYS_DYNAMIC_LINKER($1)
6271   _LT_LINKER_HARDCODE_LIBPATH($1)
6272   LT_SYS_DLOPEN_SELF
6273   _LT_CMD_STRIPLIB
6274
6275   # Report which library types will actually be built
6276   AC_MSG_CHECKING([if libtool supports shared libraries])
6277   AC_MSG_RESULT([$can_build_shared])
6278
6279   AC_MSG_CHECKING([whether to build shared libraries])
6280   test "$can_build_shared" = "no" && enable_shared=no
6281
6282   # On AIX, shared libraries and static libraries use the same namespace, and
6283   # are all built from PIC.
6284   case $host_os in
6285   aix3*)
6286     test "$enable_shared" = yes && enable_static=no
6287     if test -n "$RANLIB"; then
6288       archive_cmds="$archive_cmds~\$RANLIB \$lib"
6289       postinstall_cmds='$RANLIB $lib'
6290     fi
6291     ;;
6292
6293   aix[[4-9]]*)
6294     if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6295       test "$enable_shared" = yes && enable_static=no
6296     fi
6297     ;;
6298   esac
6299   AC_MSG_RESULT([$enable_shared])
6300
6301   AC_MSG_CHECKING([whether to build static libraries])
6302   # Make sure either enable_shared or enable_static is yes.
6303   test "$enable_shared" = yes || enable_static=yes
6304   AC_MSG_RESULT([$enable_static])
6305
6306   _LT_CONFIG($1)
6307 fi
6308 AC_LANG_POP
6309 CC="$lt_save_CC"
6310 ])# _LT_LANG_C_CONFIG
6311
6312
6313 # _LT_PROG_CXX
6314 # ------------
6315 # Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
6316 # compiler, we have our own version here.
6317 m4_defun([_LT_PROG_CXX],
6318 [
6319 pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
6320 AC_PROG_CXX
6321 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
6322     ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
6323     (test "X$CXX" != "Xg++"))) ; then
6324   AC_PROG_CXXCPP
6325 else
6326   _lt_caught_CXX_error=yes
6327 fi
6328 popdef([AC_MSG_ERROR])
6329 ])# _LT_PROG_CXX
6330
6331 dnl aclocal-1.4 backwards compatibility:
6332 dnl AC_DEFUN([_LT_PROG_CXX], [])
6333
6334
6335 # _LT_LANG_CXX_CONFIG([TAG])
6336 # --------------------------
6337 # Ensure that the configuration variables for a C++ compiler are suitably
6338 # defined.  These variables are subsequently used by _LT_CONFIG to write
6339 # the compiler configuration to `libtool'.
6340 m4_defun([_LT_LANG_CXX_CONFIG],
6341 [AC_REQUIRE([_LT_PROG_CXX])dnl
6342 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6343 m4_require([_LT_DECL_EGREP])dnl
6344
6345 AC_LANG_PUSH(C++)
6346 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6347 _LT_TAGVAR(allow_undefined_flag, $1)=
6348 _LT_TAGVAR(always_export_symbols, $1)=no
6349 _LT_TAGVAR(archive_expsym_cmds, $1)=
6350 _LT_TAGVAR(compiler_needs_object, $1)=no
6351 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6352 _LT_TAGVAR(hardcode_direct, $1)=no
6353 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6354 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6355 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6356 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6357 _LT_TAGVAR(hardcode_minus_L, $1)=no
6358 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6359 _LT_TAGVAR(hardcode_automatic, $1)=no
6360 _LT_TAGVAR(inherit_rpath, $1)=no
6361 _LT_TAGVAR(module_cmds, $1)=
6362 _LT_TAGVAR(module_expsym_cmds, $1)=
6363 _LT_TAGVAR(link_all_deplibs, $1)=unknown
6364 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6365 _LT_TAGVAR(no_undefined_flag, $1)=
6366 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6367 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6368
6369 # Source file extension for C++ test sources.
6370 ac_ext=cpp
6371
6372 # Object file extension for compiled C++ test sources.
6373 objext=o
6374 _LT_TAGVAR(objext, $1)=$objext
6375
6376 # No sense in running all these tests if we already determined that
6377 # the CXX compiler isn't working.  Some variables (like enable_shared)
6378 # are currently assumed to apply to all compilers on this platform,
6379 # and will be corrupted by setting them based on a non-working compiler.
6380 if test "$_lt_caught_CXX_error" != yes; then
6381   # Code to be used in simple compile tests
6382   lt_simple_compile_test_code="int some_variable = 0;"
6383
6384   # Code to be used in simple link tests
6385   lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
6386
6387   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6388   _LT_TAG_COMPILER
6389
6390   # save warnings/boilerplate of simple test code
6391   _LT_COMPILER_BOILERPLATE
6392   _LT_LINKER_BOILERPLATE
6393
6394   # Allow CC to be a program name with arguments.
6395   lt_save_CC=$CC
6396   lt_save_LD=$LD
6397   lt_save_GCC=$GCC
6398   GCC=$GXX
6399   lt_save_with_gnu_ld=$with_gnu_ld
6400   lt_save_path_LD=$lt_cv_path_LD
6401   if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
6402     lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
6403   else
6404     $as_unset lt_cv_prog_gnu_ld
6405   fi
6406   if test -n "${lt_cv_path_LDCXX+set}"; then
6407     lt_cv_path_LD=$lt_cv_path_LDCXX
6408   else
6409     $as_unset lt_cv_path_LD
6410   fi
6411   test -z "${LDCXX+set}" || LD=$LDCXX
6412   CC=${CXX-"c++"}
6413   compiler=$CC
6414   _LT_TAGVAR(compiler, $1)=$CC
6415   _LT_CC_BASENAME([$compiler])
6416
6417   if test -n "$compiler"; then
6418     # We don't want -fno-exception when compiling C++ code, so set the
6419     # no_builtin_flag separately
6420     if test "$GXX" = yes; then
6421       _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
6422     else
6423       _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6424     fi
6425
6426     if test "$GXX" = yes; then
6427       # Set up default GNU C++ configuration
6428
6429       LT_PATH_LD
6430
6431       # Check if GNU C++ uses GNU ld as the underlying linker, since the
6432       # archiving commands below assume that GNU ld is being used.
6433       if test "$with_gnu_ld" = yes; then
6434         _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6435         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6436
6437         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6438         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6439
6440         # If archive_cmds runs LD, not CC, wlarc should be empty
6441         # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
6442         #     investigate it a little bit more. (MM)
6443         wlarc='${wl}'
6444
6445         # ancient GNU ld didn't support --whole-archive et. al.
6446         if eval "`$CC -print-prog-name=ld` --help 2>&1" |
6447           $GREP 'no-whole-archive' > /dev/null; then
6448           _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6449         else
6450           _LT_TAGVAR(whole_archive_flag_spec, $1)=
6451         fi
6452       else
6453         with_gnu_ld=no
6454         wlarc=
6455
6456         # A generic and very simple default shared library creation
6457         # command for GNU C++ for the case where it uses the native
6458         # linker, instead of GNU ld.  If possible, this setting should
6459         # overridden to take advantage of the native linker features on
6460         # the platform it is being used on.
6461         _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6462       fi
6463
6464       # Commands to make compiler produce verbose output that lists
6465       # what "hidden" libraries, object files and flags are used when
6466       # linking a shared library.
6467       output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6468
6469     else
6470       GXX=no
6471       with_gnu_ld=no
6472       wlarc=
6473     fi
6474
6475     # PORTME: fill in a description of your system's C++ link characteristics
6476     AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6477     _LT_TAGVAR(ld_shlibs, $1)=yes
6478     case $host_os in
6479       aix3*)
6480         # FIXME: insert proper C++ library support
6481         _LT_TAGVAR(ld_shlibs, $1)=no
6482         ;;
6483       aix[[4-9]]*)
6484         if test "$host_cpu" = ia64; then
6485           # On IA64, the linker does run time linking by default, so we don't
6486           # have to do anything special.
6487           aix_use_runtimelinking=no
6488           exp_sym_flag='-Bexport'
6489           no_entry_flag=""
6490         else
6491           aix_use_runtimelinking=no
6492
6493           # Test if we are trying to use run time linking or normal
6494           # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6495           # need to do runtime linking.
6496           case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6497             for ld_flag in $LDFLAGS; do
6498               case $ld_flag in
6499               *-brtl*)
6500                 aix_use_runtimelinking=yes
6501                 break
6502                 ;;
6503               esac
6504             done
6505             ;;
6506           esac
6507
6508           exp_sym_flag='-bexport'
6509           no_entry_flag='-bnoentry'
6510         fi
6511
6512         # When large executables or shared objects are built, AIX ld can
6513         # have problems creating the table of contents.  If linking a library
6514         # or program results in "error TOC overflow" add -mminimal-toc to
6515         # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
6516         # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6517
6518         _LT_TAGVAR(archive_cmds, $1)=''
6519         _LT_TAGVAR(hardcode_direct, $1)=yes
6520         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6521         _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6522         _LT_TAGVAR(link_all_deplibs, $1)=yes
6523         _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6524
6525         if test "$GXX" = yes; then
6526           case $host_os in aix4.[[012]]|aix4.[[012]].*)
6527           # We only want to do this on AIX 4.2 and lower, the check
6528           # below for broken collect2 doesn't work under 4.3+
6529           collect2name=`${CC} -print-prog-name=collect2`
6530           if test -f "$collect2name" &&
6531              strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6532           then
6533             # We have reworked collect2
6534             :
6535           else
6536             # We have old collect2
6537             _LT_TAGVAR(hardcode_direct, $1)=unsupported
6538             # It fails to find uninstalled libraries when the uninstalled
6539             # path is not listed in the libpath.  Setting hardcode_minus_L
6540             # to unsupported forces relinking
6541             _LT_TAGVAR(hardcode_minus_L, $1)=yes
6542             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6543             _LT_TAGVAR(hardcode_libdir_separator, $1)=
6544           fi
6545           esac
6546           shared_flag='-shared'
6547           if test "$aix_use_runtimelinking" = yes; then
6548             shared_flag="$shared_flag "'${wl}-G'
6549           fi
6550         else
6551           # not using gcc
6552           if test "$host_cpu" = ia64; then
6553           # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6554           # chokes on -Wl,-G. The following line is correct:
6555           shared_flag='-G'
6556           else
6557             if test "$aix_use_runtimelinking" = yes; then
6558               shared_flag='${wl}-G'
6559             else
6560               shared_flag='${wl}-bM:SRE'
6561             fi
6562           fi
6563         fi
6564
6565         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6566         # It seems that -bexpall does not export symbols beginning with
6567         # underscore (_), so it is better to generate a list of symbols to
6568         # export.
6569         _LT_TAGVAR(always_export_symbols, $1)=yes
6570         if test "$aix_use_runtimelinking" = yes; then
6571           # Warning - without using the other runtime loading flags (-brtl),
6572           # -berok will link without error, but may produce a broken library.
6573           _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6574           # Determine the default libpath from the value encoded in an empty
6575           # executable.
6576           _LT_SYS_MODULE_PATH_AIX
6577           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6578
6579           _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 $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
6580         else
6581           if test "$host_cpu" = ia64; then
6582             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6583             _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6584             _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"
6585           else
6586             # Determine the default libpath from the value encoded in an
6587             # empty executable.
6588             _LT_SYS_MODULE_PATH_AIX
6589             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6590             # Warning - without using the other run time loading flags,
6591             # -berok will link without error, but may produce a broken library.
6592             _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6593             _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6594             # Exported symbols can be pulled into shared objects from archives
6595             _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6596             _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6597             # This is similar to how AIX traditionally builds its shared
6598             # libraries.
6599             _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'
6600           fi
6601         fi
6602         ;;
6603
6604       beos*)
6605         if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6606           _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6607           # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6608           # support --undefined.  This deserves some investigation.  FIXME
6609           _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6610         else
6611           _LT_TAGVAR(ld_shlibs, $1)=no
6612         fi
6613         ;;
6614
6615       chorus*)
6616         case $cc_basename in
6617           *)
6618           # FIXME: insert proper C++ library support
6619           _LT_TAGVAR(ld_shlibs, $1)=no
6620           ;;
6621         esac
6622         ;;
6623
6624       cygwin* | mingw* | pw32* | cegcc*)
6625         # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6626         # as there is no search path for DLLs.
6627         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6628         _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6629         _LT_TAGVAR(always_export_symbols, $1)=no
6630         _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6631
6632         if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6633           _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'
6634           # If the export-symbols file already is a .def file (1st line
6635           # is EXPORTS), use it as is; otherwise, prepend...
6636           _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6637             cp $export_symbols $output_objdir/$soname.def;
6638           else
6639             echo EXPORTS > $output_objdir/$soname.def;
6640             cat $export_symbols >> $output_objdir/$soname.def;
6641           fi~
6642           $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'
6643         else
6644           _LT_TAGVAR(ld_shlibs, $1)=no
6645         fi
6646         ;;
6647       darwin* | rhapsody*)
6648         _LT_DARWIN_LINKER_FEATURES($1)
6649         ;;
6650
6651       dgux*)
6652         case $cc_basename in
6653           ec++*)
6654             # FIXME: insert proper C++ library support
6655             _LT_TAGVAR(ld_shlibs, $1)=no
6656             ;;
6657           ghcx*)
6658             # Green Hills C++ Compiler
6659             # FIXME: insert proper C++ library support
6660             _LT_TAGVAR(ld_shlibs, $1)=no
6661             ;;
6662           *)
6663             # FIXME: insert proper C++ library support
6664             _LT_TAGVAR(ld_shlibs, $1)=no
6665             ;;
6666         esac
6667         ;;
6668
6669       freebsd[[12]]*)
6670         # C++ shared libraries reported to be fairly broken before
6671         # switch to ELF
6672         _LT_TAGVAR(ld_shlibs, $1)=no
6673         ;;
6674
6675       freebsd-elf*)
6676         _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6677         ;;
6678
6679       freebsd* | dragonfly*)
6680         # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
6681         # conventions
6682         _LT_TAGVAR(ld_shlibs, $1)=yes
6683         ;;
6684
6685       gnu*)
6686         ;;
6687
6688       hpux9*)
6689         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6690         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6691         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6692         _LT_TAGVAR(hardcode_direct, $1)=yes
6693         _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6694                                              # but as the default
6695                                              # location of the library.
6696
6697         case $cc_basename in
6698           CC*)
6699             # FIXME: insert proper C++ library support
6700             _LT_TAGVAR(ld_shlibs, $1)=no
6701             ;;
6702           aCC*)
6703             _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'
6704             # Commands to make compiler produce verbose output that lists
6705             # what "hidden" libraries, object files and flags are used when
6706             # linking a shared library.
6707             #
6708             # There doesn't appear to be a way to prevent this compiler from
6709             # explicitly linking system object files so we need to strip them
6710             # from the output so that they don't get included in the library
6711             # dependencies.
6712             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; $ECHO "X$list" | $Xsed'
6713             ;;
6714           *)
6715             if test "$GXX" = yes; then
6716               _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6717             else
6718               # FIXME: insert proper C++ library support
6719               _LT_TAGVAR(ld_shlibs, $1)=no
6720             fi
6721             ;;
6722         esac
6723         ;;
6724
6725       hpux10*|hpux11*)
6726         if test $with_gnu_ld = no; then
6727           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6728           _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6729
6730           case $host_cpu in
6731             hppa*64*|ia64*)
6732               ;;
6733             *)
6734               _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6735               ;;
6736           esac
6737         fi
6738         case $host_cpu in
6739           hppa*64*|ia64*)
6740             _LT_TAGVAR(hardcode_direct, $1)=no
6741             _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6742             ;;
6743           *)
6744             _LT_TAGVAR(hardcode_direct, $1)=yes
6745             _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6746             _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6747                                                  # but as the default
6748                                                  # location of the library.
6749             ;;
6750         esac
6751
6752         case $cc_basename in
6753           CC*)
6754             # FIXME: insert proper C++ library support
6755             _LT_TAGVAR(ld_shlibs, $1)=no
6756             ;;
6757           aCC*)
6758             case $host_cpu in
6759               hppa*64*)
6760                 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6761                 ;;
6762               ia64*)
6763                 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6764                 ;;
6765               *)
6766                 _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'
6767                 ;;
6768             esac
6769             # Commands to make compiler produce verbose output that lists
6770             # what "hidden" libraries, object files and flags are used when
6771             # linking a shared library.
6772             #
6773             # There doesn't appear to be a way to prevent this compiler from
6774             # explicitly linking system object files so we need to strip them
6775             # from the output so that they don't get included in the library
6776             # dependencies.
6777             output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
6778             ;;
6779           *)
6780             if test "$GXX" = yes; then
6781               if test $with_gnu_ld = no; then
6782                 case $host_cpu in
6783                   hppa*64*)
6784                     _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6785                     ;;
6786                   ia64*)
6787                     _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6788                     ;;
6789                   *)
6790                     _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6791                     ;;
6792                 esac
6793               fi
6794             else
6795               # FIXME: insert proper C++ library support
6796               _LT_TAGVAR(ld_shlibs, $1)=no
6797             fi
6798             ;;
6799         esac
6800         ;;
6801
6802       interix[[3-9]]*)
6803         _LT_TAGVAR(hardcode_direct, $1)=no
6804         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6805         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6806         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6807         # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6808         # Instead, shared libraries are loaded at an image base (0x10000000 by
6809         # default) and relocated if they conflict, which is a slow very memory
6810         # consuming and fragmenting process.  To avoid this, we pick a random,
6811         # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6812         # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
6813         _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'
6814         _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'
6815         ;;
6816       irix5* | irix6*)
6817         case $cc_basename in
6818           CC*)
6819             # SGI C++
6820             _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
6821
6822             # Archives containing C++ object files must be created using
6823             # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
6824             # necessary to make sure instantiated templates are included
6825             # in the archive.
6826             _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
6827             ;;
6828           *)
6829             if test "$GXX" = yes; then
6830               if test "$with_gnu_ld" = no; then
6831                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6832               else
6833                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
6834               fi
6835             fi
6836             _LT_TAGVAR(link_all_deplibs, $1)=yes
6837             ;;
6838         esac
6839         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6840         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6841         _LT_TAGVAR(inherit_rpath, $1)=yes
6842         ;;
6843
6844       linux* | k*bsd*-gnu | kopensolaris*-gnu)
6845         case $cc_basename in
6846           KCC*)
6847             # Kuck and Associates, Inc. (KAI) C++ Compiler
6848
6849             # KCC will only create a shared library if the output file
6850             # ends with ".so" (or ".sl" for HP-UX), so rename the library
6851             # to its proper name (with version) after linking.
6852             _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'
6853             _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'
6854             # Commands to make compiler produce verbose output that lists
6855             # what "hidden" libraries, object files and flags are used when
6856             # linking a shared library.
6857             #
6858             # There doesn't appear to be a way to prevent this compiler from
6859             # explicitly linking system object files so we need to strip them
6860             # from the output so that they don't get included in the library
6861             # dependencies.
6862             output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
6863
6864             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6865             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6866
6867             # Archives containing C++ object files must be created using
6868             # "CC -Bstatic", where "CC" is the KAI C++ compiler.
6869             _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
6870             ;;
6871           icpc* | ecpc* )
6872             # Intel C++
6873             with_gnu_ld=yes
6874             # version 8.0 and above of icpc choke on multiply defined symbols
6875             # if we add $predep_objects and $postdep_objects, however 7.1 and
6876             # earlier do not add the objects themselves.
6877             case `$CC -V 2>&1` in
6878               *"Version 7."*)
6879                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6880                 _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'
6881                 ;;
6882               *)  # Version 8.0 or newer
6883                 tmp_idyn=
6884                 case $host_cpu in
6885                   ia64*) tmp_idyn=' -i_dynamic';;
6886                 esac
6887                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6888                 _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'
6889                 ;;
6890             esac
6891             _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6892             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6893             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6894             _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6895             ;;
6896           pgCC* | pgcpp*)
6897             # Portland Group C++ compiler
6898             case `$CC -V` in
6899             *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
6900               _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
6901                 rm -rf $tpldir~
6902                 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
6903                 compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
6904               _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
6905                 rm -rf $tpldir~
6906                 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
6907                 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
6908                 $RANLIB $oldlib'
6909               _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
6910                 rm -rf $tpldir~
6911                 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6912                 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6913               _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
6914                 rm -rf $tpldir~
6915                 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6916                 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
6917               ;;
6918             *) # Version 6 will use weak symbols
6919               _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6920               _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'
6921               ;;
6922             esac
6923
6924             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6925             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6926             _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
6927             ;;
6928           cxx*)
6929             # Compaq C++
6930             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6931             _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'
6932
6933             runpath_var=LD_RUN_PATH
6934             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6935             _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6936
6937             # Commands to make compiler produce verbose output that lists
6938             # what "hidden" libraries, object files and flags are used when
6939             # linking a shared library.
6940             #
6941             # There doesn't appear to be a way to prevent this compiler from
6942             # explicitly linking system object files so we need to strip them
6943             # from the output so that they don't get included in the library
6944             # dependencies.
6945             output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
6946             ;;
6947           xl*)
6948             # IBM XL 8.0 on PPC, with GNU ld
6949             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6950             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6951             _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6952             if test "x$supports_anon_versioning" = xyes; then
6953               _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6954                 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6955                 echo "local: *; };" >> $output_objdir/$libname.ver~
6956                 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6957             fi
6958             ;;
6959           *)
6960             case `$CC -V 2>&1 | sed 5q` in
6961             *Sun\ C*)
6962               # Sun C++ 5.9
6963               _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6964               _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6965               _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'
6966               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6967               _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; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
6968               _LT_TAGVAR(compiler_needs_object, $1)=yes
6969
6970               # Not sure whether something based on
6971               # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
6972               # would be better.
6973               output_verbose_link_cmd='echo'
6974
6975               # Archives containing C++ object files must be created using
6976               # "CC -xar", where "CC" is the Sun C++ compiler.  This is
6977               # necessary to make sure instantiated templates are included
6978               # in the archive.
6979               _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6980               ;;
6981             esac
6982             ;;
6983         esac
6984         ;;
6985
6986       lynxos*)
6987         # FIXME: insert proper C++ library support
6988         _LT_TAGVAR(ld_shlibs, $1)=no
6989         ;;
6990
6991       m88k*)
6992         # FIXME: insert proper C++ library support
6993         _LT_TAGVAR(ld_shlibs, $1)=no
6994         ;;
6995
6996       mvs*)
6997         case $cc_basename in
6998           cxx*)
6999             # FIXME: insert proper C++ library support
7000             _LT_TAGVAR(ld_shlibs, $1)=no
7001             ;;
7002           *)
7003             # FIXME: insert proper C++ library support
7004             _LT_TAGVAR(ld_shlibs, $1)=no
7005             ;;
7006         esac
7007         ;;
7008
7009       netbsd*)
7010         if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7011           _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
7012           wlarc=
7013           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7014           _LT_TAGVAR(hardcode_direct, $1)=yes
7015           _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7016         fi
7017         # Workaround some broken pre-1.5 toolchains
7018         output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
7019         ;;
7020
7021       *nto* | *qnx*)
7022         _LT_TAGVAR(ld_shlibs, $1)=yes
7023         ;;
7024
7025       openbsd2*)
7026         # C++ shared libraries are fairly broken
7027         _LT_TAGVAR(ld_shlibs, $1)=no
7028         ;;
7029
7030       openbsd*)
7031         if test -f /usr/libexec/ld.so; then
7032           _LT_TAGVAR(hardcode_direct, $1)=yes
7033           _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7034           _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7035           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7036           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7037           if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7038             _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'
7039             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7040             _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7041           fi
7042           output_verbose_link_cmd=echo
7043         else
7044           _LT_TAGVAR(ld_shlibs, $1)=no
7045         fi
7046         ;;
7047
7048       osf3* | osf4* | osf5*)
7049         case $cc_basename in
7050           KCC*)
7051             # Kuck and Associates, Inc. (KAI) C++ Compiler
7052
7053             # KCC will only create a shared library if the output file
7054             # ends with ".so" (or ".sl" for HP-UX), so rename the library
7055             # to its proper name (with version) after linking.
7056             _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'
7057
7058             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7059             _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7060
7061             # Archives containing C++ object files must be created using
7062             # the KAI C++ compiler.
7063             case $host in
7064               osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
7065               *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
7066             esac
7067             ;;
7068           RCC*)
7069             # Rational C++ 2.4.1
7070             # FIXME: insert proper C++ library support
7071             _LT_TAGVAR(ld_shlibs, $1)=no
7072             ;;
7073           cxx*)
7074             case $host in
7075               osf3*)
7076                 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7077                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
7078                 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7079                 ;;
7080               *)
7081                 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7082                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
7083                 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
7084                   echo "-hidden">> $lib.exp~
7085                   $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 "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
7086                   $RM $lib.exp'
7087                 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7088                 ;;
7089             esac
7090
7091             _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7092
7093             # Commands to make compiler produce verbose output that lists
7094             # what "hidden" libraries, object files and flags are used when
7095             # linking a shared library.
7096             #
7097             # There doesn't appear to be a way to prevent this compiler from
7098             # explicitly linking system object files so we need to strip them
7099             # from the output so that they don't get included in the library
7100             # dependencies.
7101             output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
7102             ;;
7103           *)
7104             if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7105               _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7106               case $host in
7107                 osf3*)
7108                   _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" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7109                   ;;
7110                 *)
7111                   _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7112                   ;;
7113               esac
7114
7115               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7116               _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7117
7118               # Commands to make compiler produce verbose output that lists
7119               # what "hidden" libraries, object files and flags are used when
7120               # linking a shared library.
7121               output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
7122
7123             else
7124               # FIXME: insert proper C++ library support
7125               _LT_TAGVAR(ld_shlibs, $1)=no
7126             fi
7127             ;;
7128         esac
7129         ;;
7130
7131       psos*)
7132         # FIXME: insert proper C++ library support
7133         _LT_TAGVAR(ld_shlibs, $1)=no
7134         ;;
7135
7136       sunos4*)
7137         case $cc_basename in
7138           CC*)
7139             # Sun C++ 4.x
7140             # FIXME: insert proper C++ library support
7141             _LT_TAGVAR(ld_shlibs, $1)=no
7142             ;;
7143           lcc*)
7144             # Lucid
7145             # FIXME: insert proper C++ library support
7146             _LT_TAGVAR(ld_shlibs, $1)=no
7147             ;;
7148           *)
7149             # FIXME: insert proper C++ library support
7150             _LT_TAGVAR(ld_shlibs, $1)=no
7151             ;;
7152         esac
7153         ;;
7154
7155       solaris*)
7156         case $cc_basename in
7157           CC*)
7158             # Sun C++ 4.2, 5.x and Centerline C++
7159             _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
7160             _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7161             _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7162             _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7163               $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'
7164
7165             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7166             _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7167             case $host_os in
7168               solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7169               *)
7170                 # The compiler driver will combine and reorder linker options,
7171                 # but understands `-z linker_flag'.
7172                 # Supported since Solaris 2.6 (maybe 2.5.1?)
7173                 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7174                 ;;
7175             esac
7176             _LT_TAGVAR(link_all_deplibs, $1)=yes
7177
7178             output_verbose_link_cmd='echo'
7179
7180             # Archives containing C++ object files must be created using
7181             # "CC -xar", where "CC" is the Sun C++ compiler.  This is
7182             # necessary to make sure instantiated templates are included
7183             # in the archive.
7184             _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7185             ;;
7186           gcx*)
7187             # Green Hills C++ Compiler
7188             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7189
7190             # The C++ compiler must be used to create the archive.
7191             _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
7192             ;;
7193           *)
7194             # GNU C++ compiler with Solaris linker
7195             if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7196               _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
7197               if $CC --version | $GREP -v '^2\.7' > /dev/null; then
7198                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7199                 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7200                   $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7201
7202                 # Commands to make compiler produce verbose output that lists
7203                 # what "hidden" libraries, object files and flags are used when
7204                 # linking a shared library.
7205                 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
7206               else
7207                 # g++ 2.7 appears to require `-G' NOT `-shared' on this
7208                 # platform.
7209                 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7210                 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7211                   $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7212
7213                 # Commands to make compiler produce verbose output that lists
7214                 # what "hidden" libraries, object files and flags are used when
7215                 # linking a shared library.
7216                 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
7217               fi
7218
7219               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
7220               case $host_os in
7221                 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7222                 *)
7223                   _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
7224                   ;;
7225               esac
7226             fi
7227             ;;
7228         esac
7229         ;;
7230
7231     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7232       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7233       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7234       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7235       runpath_var='LD_RUN_PATH'
7236
7237       case $cc_basename in
7238         CC*)
7239           _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7240           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7241           ;;
7242         *)
7243           _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7244           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7245           ;;
7246       esac
7247       ;;
7248
7249       sysv5* | sco3.2v5* | sco5v6*)
7250         # Note: We can NOT use -z defs as we might desire, because we do not
7251         # link with -lc, and that would cause any symbols used from libc to
7252         # always be unresolved, which means just about no library would
7253         # ever link correctly.  If we're not using GNU ld we use -z text
7254         # though, which does catch some bad symbols but isn't as heavy-handed
7255         # as -z defs.
7256         _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7257         _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
7258         _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7259         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7260         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
7261         _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7262         _LT_TAGVAR(link_all_deplibs, $1)=yes
7263         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
7264         runpath_var='LD_RUN_PATH'
7265
7266         case $cc_basename in
7267           CC*)
7268             _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7269             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7270             ;;
7271           *)
7272             _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7273             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7274             ;;
7275         esac
7276       ;;
7277
7278       tandem*)
7279         case $cc_basename in
7280           NCC*)
7281             # NonStop-UX NCC 3.20
7282             # FIXME: insert proper C++ library support
7283             _LT_TAGVAR(ld_shlibs, $1)=no
7284             ;;
7285           *)
7286             # FIXME: insert proper C++ library support
7287             _LT_TAGVAR(ld_shlibs, $1)=no
7288             ;;
7289         esac
7290         ;;
7291
7292       vxworks*)
7293         # FIXME: insert proper C++ library support
7294         _LT_TAGVAR(ld_shlibs, $1)=no
7295         ;;
7296
7297       *)
7298         # FIXME: insert proper C++ library support
7299         _LT_TAGVAR(ld_shlibs, $1)=no
7300         ;;
7301     esac
7302
7303     AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7304     test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7305
7306     _LT_TAGVAR(GCC, $1)="$GXX"
7307     _LT_TAGVAR(LD, $1)="$LD"
7308
7309     ## CAVEAT EMPTOR:
7310     ## There is no encapsulation within the following macros, do not change
7311     ## the running order or otherwise move them around unless you know exactly
7312     ## what you are doing...
7313     _LT_SYS_HIDDEN_LIBDEPS($1)
7314     _LT_COMPILER_PIC($1)
7315     _LT_COMPILER_C_O($1)
7316     _LT_COMPILER_FILE_LOCKS($1)
7317     _LT_LINKER_SHLIBS($1)
7318     _LT_SYS_DYNAMIC_LINKER($1)
7319     _LT_LINKER_HARDCODE_LIBPATH($1)
7320
7321     _LT_CONFIG($1)
7322   fi # test -n "$compiler"
7323
7324   CC=$lt_save_CC
7325   LDCXX=$LD
7326   LD=$lt_save_LD
7327   GCC=$lt_save_GCC
7328   with_gnu_ld=$lt_save_with_gnu_ld
7329   lt_cv_path_LDCXX=$lt_cv_path_LD
7330   lt_cv_path_LD=$lt_save_path_LD
7331   lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
7332   lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
7333 fi # test "$_lt_caught_CXX_error" != yes
7334
7335 AC_LANG_POP
7336 ])# _LT_LANG_CXX_CONFIG
7337
7338
7339 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
7340 # ---------------------------------
7341 # Figure out "hidden" library dependencies from verbose
7342 # compiler output when linking a shared library.
7343 # Parse the compiler output and extract the necessary
7344 # objects, libraries and library flags.
7345 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
7346 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7347 # Dependencies to place before and after the object being linked:
7348 _LT_TAGVAR(predep_objects, $1)=
7349 _LT_TAGVAR(postdep_objects, $1)=
7350 _LT_TAGVAR(predeps, $1)=
7351 _LT_TAGVAR(postdeps, $1)=
7352 _LT_TAGVAR(compiler_lib_search_path, $1)=
7353
7354 dnl we can't use the lt_simple_compile_test_code here,
7355 dnl because it contains code intended for an executable,
7356 dnl not a library.  It's possible we should let each
7357 dnl tag define a new lt_????_link_test_code variable,
7358 dnl but it's only used here...
7359 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
7360 int a;
7361 void foo (void) { a = 0; }
7362 _LT_EOF
7363 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
7364 class Foo
7365 {
7366 public:
7367   Foo (void) { a = 0; }
7368 private:
7369   int a;
7370 };
7371 _LT_EOF
7372 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
7373       subroutine foo
7374       implicit none
7375       integer*4 a
7376       a=0
7377       return
7378       end
7379 _LT_EOF
7380 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
7381       subroutine foo
7382       implicit none
7383       integer a
7384       a=0
7385       return
7386       end
7387 _LT_EOF
7388 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
7389 public class foo {
7390   private int a;
7391   public void bar (void) {
7392     a = 0;
7393   }
7394 };
7395 _LT_EOF
7396 ])
7397 dnl Parse the compiler output and extract the necessary
7398 dnl objects, libraries and library flags.
7399 if AC_TRY_EVAL(ac_compile); then
7400   # Parse the compiler output and extract the necessary
7401   # objects, libraries and library flags.
7402
7403   # Sentinel used to keep track of whether or not we are before
7404   # the conftest object file.
7405   pre_test_object_deps_done=no
7406
7407   for p in `eval "$output_verbose_link_cmd"`; do
7408     case $p in
7409
7410     -L* | -R* | -l*)
7411        # Some compilers place space between "-{L,R}" and the path.
7412        # Remove the space.
7413        if test $p = "-L" ||
7414           test $p = "-R"; then
7415          prev=$p
7416          continue
7417        else
7418          prev=
7419        fi
7420
7421        if test "$pre_test_object_deps_done" = no; then
7422          case $p in
7423          -L* | -R*)
7424            # Internal compiler library paths should come after those
7425            # provided the user.  The postdeps already come after the
7426            # user supplied libs so there is no need to process them.
7427            if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
7428              _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
7429            else
7430              _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
7431            fi
7432            ;;
7433          # The "-l" case would never come before the object being
7434          # linked, so don't bother handling this case.
7435          esac
7436        else
7437          if test -z "$_LT_TAGVAR(postdeps, $1)"; then
7438            _LT_TAGVAR(postdeps, $1)="${prev}${p}"
7439          else
7440            _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
7441          fi
7442        fi
7443        ;;
7444
7445     *.$objext)
7446        # This assumes that the test object file only shows up
7447        # once in the compiler output.
7448        if test "$p" = "conftest.$objext"; then
7449          pre_test_object_deps_done=yes
7450          continue
7451        fi
7452
7453        if test "$pre_test_object_deps_done" = no; then
7454          if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
7455            _LT_TAGVAR(predep_objects, $1)="$p"
7456          else
7457            _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
7458          fi
7459        else
7460          if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
7461            _LT_TAGVAR(postdep_objects, $1)="$p"
7462          else
7463            _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
7464          fi
7465        fi
7466        ;;
7467
7468     *) ;; # Ignore the rest.
7469
7470     esac
7471   done
7472
7473   # Clean up.
7474   rm -f a.out a.exe
7475 else
7476   echo "libtool.m4: error: problem compiling $1 test program"
7477 fi
7478
7479 $RM -f confest.$objext
7480
7481 # PORTME: override above test on systems where it is broken
7482 m4_if([$1], [CXX],
7483 [case $host_os in
7484 interix[[3-9]]*)
7485   # Interix 3.5 installs completely hosed .la files for C++, so rather than
7486   # hack all around it, let's just trust "g++" to DTRT.
7487   _LT_TAGVAR(predep_objects,$1)=
7488   _LT_TAGVAR(postdep_objects,$1)=
7489   _LT_TAGVAR(postdeps,$1)=
7490   ;;
7491
7492 linux*)
7493   case `$CC -V 2>&1 | sed 5q` in
7494   *Sun\ C*)
7495     # Sun C++ 5.9
7496
7497     # The more standards-conforming stlport4 library is
7498     # incompatible with the Cstd library. Avoid specifying
7499     # it if it's in CXXFLAGS. Ignore libCrun as
7500     # -library=stlport4 depends on it.
7501     case " $CXX $CXXFLAGS " in
7502     *" -library=stlport4 "*)
7503       solaris_use_stlport4=yes
7504       ;;
7505     esac
7506
7507     if test "$solaris_use_stlport4" != yes; then
7508       _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7509     fi
7510     ;;
7511   esac
7512   ;;
7513
7514 solaris*)
7515   case $cc_basename in
7516   CC*)
7517     # The more standards-conforming stlport4 library is
7518     # incompatible with the Cstd library. Avoid specifying
7519     # it if it's in CXXFLAGS. Ignore libCrun as
7520     # -library=stlport4 depends on it.
7521     case " $CXX $CXXFLAGS " in
7522     *" -library=stlport4 "*)
7523       solaris_use_stlport4=yes
7524       ;;
7525     esac
7526
7527     # Adding this requires a known-good setup of shared libraries for
7528     # Sun compiler versions before 5.6, else PIC objects from an old
7529     # archive will be linked into the output, leading to subtle bugs.
7530     if test "$solaris_use_stlport4" != yes; then
7531       _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7532     fi
7533     ;;
7534   esac
7535   ;;
7536 esac
7537 ])
7538
7539 case " $_LT_TAGVAR(postdeps, $1) " in
7540 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
7541 esac
7542  _LT_TAGVAR(compiler_lib_search_dirs, $1)=
7543 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
7544  _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
7545 fi
7546 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
7547     [The directories searched by this compiler when creating a shared library])
7548 _LT_TAGDECL([], [predep_objects], [1],
7549     [Dependencies to place before and after the objects being linked to
7550     create a shared library])
7551 _LT_TAGDECL([], [postdep_objects], [1])
7552 _LT_TAGDECL([], [predeps], [1])
7553 _LT_TAGDECL([], [postdeps], [1])
7554 _LT_TAGDECL([], [compiler_lib_search_path], [1],
7555     [The library search path used internally by the compiler when linking
7556     a shared library])
7557 ])# _LT_SYS_HIDDEN_LIBDEPS
7558
7559
7560 # _LT_PROG_F77
7561 # ------------
7562 # Since AC_PROG_F77 is broken, in that it returns the empty string
7563 # if there is no fortran compiler, we have our own version here.
7564 m4_defun([_LT_PROG_F77],
7565 [
7566 pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
7567 AC_PROG_F77
7568 if test -z "$F77" || test "X$F77" = "Xno"; then
7569   _lt_disable_F77=yes
7570 fi
7571 popdef([AC_MSG_ERROR])
7572 ])# _LT_PROG_F77
7573
7574 dnl aclocal-1.4 backwards compatibility:
7575 dnl AC_DEFUN([_LT_PROG_F77], [])
7576
7577
7578 # _LT_LANG_F77_CONFIG([TAG])
7579 # --------------------------
7580 # Ensure that the configuration variables for a Fortran 77 compiler are
7581 # suitably defined.  These variables are subsequently used by _LT_CONFIG
7582 # to write the compiler configuration to `libtool'.
7583 m4_defun([_LT_LANG_F77_CONFIG],
7584 [AC_REQUIRE([_LT_PROG_F77])dnl
7585 AC_LANG_PUSH(Fortran 77)
7586
7587 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7588 _LT_TAGVAR(allow_undefined_flag, $1)=
7589 _LT_TAGVAR(always_export_symbols, $1)=no
7590 _LT_TAGVAR(archive_expsym_cmds, $1)=
7591 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7592 _LT_TAGVAR(hardcode_direct, $1)=no
7593 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7594 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7595 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7596 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7597 _LT_TAGVAR(hardcode_minus_L, $1)=no
7598 _LT_TAGVAR(hardcode_automatic, $1)=no
7599 _LT_TAGVAR(inherit_rpath, $1)=no
7600 _LT_TAGVAR(module_cmds, $1)=
7601 _LT_TAGVAR(module_expsym_cmds, $1)=
7602 _LT_TAGVAR(link_all_deplibs, $1)=unknown
7603 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7604 _LT_TAGVAR(no_undefined_flag, $1)=
7605 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7606 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7607
7608 # Source file extension for f77 test sources.
7609 ac_ext=f
7610
7611 # Object file extension for compiled f77 test sources.
7612 objext=o
7613 _LT_TAGVAR(objext, $1)=$objext
7614
7615 # No sense in running all these tests if we already determined that
7616 # the F77 compiler isn't working.  Some variables (like enable_shared)
7617 # are currently assumed to apply to all compilers on this platform,
7618 # and will be corrupted by setting them based on a non-working compiler.
7619 if test "$_lt_disable_F77" != yes; then
7620   # Code to be used in simple compile tests
7621   lt_simple_compile_test_code="\
7622       subroutine t
7623       return
7624       end
7625 "
7626
7627   # Code to be used in simple link tests
7628   lt_simple_link_test_code="\
7629       program t
7630       end
7631 "
7632
7633   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7634   _LT_TAG_COMPILER
7635
7636   # save warnings/boilerplate of simple test code
7637   _LT_COMPILER_BOILERPLATE
7638   _LT_LINKER_BOILERPLATE
7639
7640   # Allow CC to be a program name with arguments.
7641   lt_save_CC="$CC"
7642   lt_save_GCC=$GCC
7643   CC=${F77-"f77"}
7644   compiler=$CC
7645   _LT_TAGVAR(compiler, $1)=$CC
7646   _LT_CC_BASENAME([$compiler])
7647   GCC=$G77
7648   if test -n "$compiler"; then
7649     AC_MSG_CHECKING([if libtool supports shared libraries])
7650     AC_MSG_RESULT([$can_build_shared])
7651
7652     AC_MSG_CHECKING([whether to build shared libraries])
7653     test "$can_build_shared" = "no" && enable_shared=no
7654
7655     # On AIX, shared libraries and static libraries use the same namespace, and
7656     # are all built from PIC.
7657     case $host_os in
7658       aix3*)
7659         test "$enable_shared" = yes && enable_static=no
7660         if test -n "$RANLIB"; then
7661           archive_cmds="$archive_cmds~\$RANLIB \$lib"
7662           postinstall_cmds='$RANLIB $lib'
7663         fi
7664         ;;
7665       aix[[4-9]]*)
7666         if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7667           test "$enable_shared" = yes && enable_static=no
7668         fi
7669         ;;
7670     esac
7671     AC_MSG_RESULT([$enable_shared])
7672
7673     AC_MSG_CHECKING([whether to build static libraries])
7674     # Make sure either enable_shared or enable_static is yes.
7675     test "$enable_shared" = yes || enable_static=yes
7676     AC_MSG_RESULT([$enable_static])
7677
7678     _LT_TAGVAR(GCC, $1)="$G77"
7679     _LT_TAGVAR(LD, $1)="$LD"
7680
7681     ## CAVEAT EMPTOR:
7682     ## There is no encapsulation within the following macros, do not change
7683     ## the running order or otherwise move them around unless you know exactly
7684     ## what you are doing...
7685     _LT_COMPILER_PIC($1)
7686     _LT_COMPILER_C_O($1)
7687     _LT_COMPILER_FILE_LOCKS($1)
7688     _LT_LINKER_SHLIBS($1)
7689     _LT_SYS_DYNAMIC_LINKER($1)
7690     _LT_LINKER_HARDCODE_LIBPATH($1)
7691
7692     _LT_CONFIG($1)
7693   fi # test -n "$compiler"
7694
7695   GCC=$lt_save_GCC
7696   CC="$lt_save_CC"
7697 fi # test "$_lt_disable_F77" != yes
7698
7699 AC_LANG_POP
7700 ])# _LT_LANG_F77_CONFIG
7701
7702
7703 # _LT_PROG_FC
7704 # -----------
7705 # Since AC_PROG_FC is broken, in that it returns the empty string
7706 # if there is no fortran compiler, we have our own version here.
7707 m4_defun([_LT_PROG_FC],
7708 [
7709 pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
7710 AC_PROG_FC
7711 if test -z "$FC" || test "X$FC" = "Xno"; then
7712   _lt_disable_FC=yes
7713 fi
7714 popdef([AC_MSG_ERROR])
7715 ])# _LT_PROG_FC
7716
7717 dnl aclocal-1.4 backwards compatibility:
7718 dnl AC_DEFUN([_LT_PROG_FC], [])
7719
7720
7721 # _LT_LANG_FC_CONFIG([TAG])
7722 # -------------------------
7723 # Ensure that the configuration variables for a Fortran compiler are
7724 # suitably defined.  These variables are subsequently used by _LT_CONFIG
7725 # to write the compiler configuration to `libtool'.
7726 m4_defun([_LT_LANG_FC_CONFIG],
7727 [AC_REQUIRE([_LT_PROG_FC])dnl
7728 AC_LANG_PUSH(Fortran)
7729
7730 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7731 _LT_TAGVAR(allow_undefined_flag, $1)=
7732 _LT_TAGVAR(always_export_symbols, $1)=no
7733 _LT_TAGVAR(archive_expsym_cmds, $1)=
7734 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7735 _LT_TAGVAR(hardcode_direct, $1)=no
7736 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7737 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7738 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7739 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7740 _LT_TAGVAR(hardcode_minus_L, $1)=no
7741 _LT_TAGVAR(hardcode_automatic, $1)=no
7742 _LT_TAGVAR(inherit_rpath, $1)=no
7743 _LT_TAGVAR(module_cmds, $1)=
7744 _LT_TAGVAR(module_expsym_cmds, $1)=
7745 _LT_TAGVAR(link_all_deplibs, $1)=unknown
7746 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7747 _LT_TAGVAR(no_undefined_flag, $1)=
7748 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7749 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7750
7751 # Source file extension for fc test sources.
7752 ac_ext=${ac_fc_srcext-f}
7753
7754 # Object file extension for compiled fc test sources.
7755 objext=o
7756 _LT_TAGVAR(objext, $1)=$objext
7757
7758 # No sense in running all these tests if we already determined that
7759 # the FC compiler isn't working.  Some variables (like enable_shared)
7760 # are currently assumed to apply to all compilers on this platform,
7761 # and will be corrupted by setting them based on a non-working compiler.
7762 if test "$_lt_disable_FC" != yes; then
7763   # Code to be used in simple compile tests
7764   lt_simple_compile_test_code="\
7765       subroutine t
7766       return
7767       end
7768 "
7769
7770   # Code to be used in simple link tests
7771   lt_simple_link_test_code="\
7772       program t
7773       end
7774 "
7775
7776   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7777   _LT_TAG_COMPILER
7778
7779   # save warnings/boilerplate of simple test code
7780   _LT_COMPILER_BOILERPLATE
7781   _LT_LINKER_BOILERPLATE
7782
7783   # Allow CC to be a program name with arguments.
7784   lt_save_CC="$CC"
7785   lt_save_GCC=$GCC
7786   CC=${FC-"f95"}
7787   compiler=$CC
7788   GCC=$ac_cv_fc_compiler_gnu
7789
7790   _LT_TAGVAR(compiler, $1)=$CC
7791   _LT_CC_BASENAME([$compiler])
7792
7793   if test -n "$compiler"; then
7794     AC_MSG_CHECKING([if libtool supports shared libraries])
7795     AC_MSG_RESULT([$can_build_shared])
7796
7797     AC_MSG_CHECKING([whether to build shared libraries])
7798     test "$can_build_shared" = "no" && enable_shared=no
7799
7800     # On AIX, shared libraries and static libraries use the same namespace, and
7801     # are all built from PIC.
7802     case $host_os in
7803       aix3*)
7804         test "$enable_shared" = yes && enable_static=no
7805         if test -n "$RANLIB"; then
7806           archive_cmds="$archive_cmds~\$RANLIB \$lib"
7807           postinstall_cmds='$RANLIB $lib'
7808         fi
7809         ;;
7810       aix[[4-9]]*)
7811         if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7812           test "$enable_shared" = yes && enable_static=no
7813         fi
7814         ;;
7815     esac
7816     AC_MSG_RESULT([$enable_shared])
7817
7818     AC_MSG_CHECKING([whether to build static libraries])
7819     # Make sure either enable_shared or enable_static is yes.
7820     test "$enable_shared" = yes || enable_static=yes
7821     AC_MSG_RESULT([$enable_static])
7822
7823     _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
7824     _LT_TAGVAR(LD, $1)="$LD"
7825
7826     ## CAVEAT EMPTOR:
7827     ## There is no encapsulation within the following macros, do not change
7828     ## the running order or otherwise move them around unless you know exactly
7829     ## what you are doing...
7830     _LT_SYS_HIDDEN_LIBDEPS($1)
7831     _LT_COMPILER_PIC($1)
7832     _LT_COMPILER_C_O($1)
7833     _LT_COMPILER_FILE_LOCKS($1)
7834     _LT_LINKER_SHLIBS($1)
7835     _LT_SYS_DYNAMIC_LINKER($1)
7836     _LT_LINKER_HARDCODE_LIBPATH($1)
7837
7838     _LT_CONFIG($1)
7839   fi # test -n "$compiler"
7840
7841   GCC=$lt_save_GCC
7842   CC="$lt_save_CC"
7843 fi # test "$_lt_disable_FC" != yes
7844
7845 AC_LANG_POP
7846 ])# _LT_LANG_FC_CONFIG
7847
7848
7849 # _LT_LANG_GCJ_CONFIG([TAG])
7850 # --------------------------
7851 # Ensure that the configuration variables for the GNU Java Compiler compiler
7852 # are suitably defined.  These variables are subsequently used by _LT_CONFIG
7853 # to write the compiler configuration to `libtool'.
7854 m4_defun([_LT_LANG_GCJ_CONFIG],
7855 [AC_REQUIRE([LT_PROG_GCJ])dnl
7856 AC_LANG_SAVE
7857
7858 # Source file extension for Java test sources.
7859 ac_ext=java
7860
7861 # Object file extension for compiled Java test sources.
7862 objext=o
7863 _LT_TAGVAR(objext, $1)=$objext
7864
7865 # Code to be used in simple compile tests
7866 lt_simple_compile_test_code="class foo {}"
7867
7868 # Code to be used in simple link tests
7869 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
7870
7871 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7872 _LT_TAG_COMPILER
7873
7874 # save warnings/boilerplate of simple test code
7875 _LT_COMPILER_BOILERPLATE
7876 _LT_LINKER_BOILERPLATE
7877
7878 # Allow CC to be a program name with arguments.
7879 lt_save_CC="$CC"
7880 lt_save_GCC=$GCC
7881 GCC=yes
7882 CC=${GCJ-"gcj"}
7883 compiler=$CC
7884 _LT_TAGVAR(compiler, $1)=$CC
7885 _LT_TAGVAR(LD, $1)="$LD"
7886 _LT_CC_BASENAME([$compiler])
7887
7888 # GCJ did not exist at the time GCC didn't implicitly link libc in.
7889 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7890
7891 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7892
7893 if test -n "$compiler"; then
7894   _LT_COMPILER_NO_RTTI($1)
7895   _LT_COMPILER_PIC($1)
7896   _LT_COMPILER_C_O($1)
7897   _LT_COMPILER_FILE_LOCKS($1)
7898   _LT_LINKER_SHLIBS($1)
7899   _LT_LINKER_HARDCODE_LIBPATH($1)
7900
7901   _LT_CONFIG($1)
7902 fi
7903
7904 AC_LANG_RESTORE
7905
7906 GCC=$lt_save_GCC
7907 CC="$lt_save_CC"
7908 ])# _LT_LANG_GCJ_CONFIG
7909
7910
7911 # _LT_LANG_RC_CONFIG([TAG])
7912 # -------------------------
7913 # Ensure that the configuration variables for the Windows resource compiler
7914 # are suitably defined.  These variables are subsequently used by _LT_CONFIG
7915 # to write the compiler configuration to `libtool'.
7916 m4_defun([_LT_LANG_RC_CONFIG],
7917 [AC_REQUIRE([LT_PROG_RC])dnl
7918 AC_LANG_SAVE
7919
7920 # Source file extension for RC test sources.
7921 ac_ext=rc
7922
7923 # Object file extension for compiled RC test sources.
7924 objext=o
7925 _LT_TAGVAR(objext, $1)=$objext
7926
7927 # Code to be used in simple compile tests
7928 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
7929
7930 # Code to be used in simple link tests
7931 lt_simple_link_test_code="$lt_simple_compile_test_code"
7932
7933 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7934 _LT_TAG_COMPILER
7935
7936 # save warnings/boilerplate of simple test code
7937 _LT_COMPILER_BOILERPLATE
7938 _LT_LINKER_BOILERPLATE
7939
7940 # Allow CC to be a program name with arguments.
7941 lt_save_CC="$CC"
7942 lt_save_GCC=$GCC
7943 GCC=
7944 CC=${RC-"windres"}
7945 compiler=$CC
7946 _LT_TAGVAR(compiler, $1)=$CC
7947 _LT_CC_BASENAME([$compiler])
7948 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
7949
7950 if test -n "$compiler"; then
7951   :
7952   _LT_CONFIG($1)
7953 fi
7954
7955 GCC=$lt_save_GCC
7956 AC_LANG_RESTORE
7957 CC="$lt_save_CC"
7958 ])# _LT_LANG_RC_CONFIG
7959
7960
7961 # LT_PROG_GCJ
7962 # -----------
7963 AC_DEFUN([LT_PROG_GCJ],
7964 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
7965   [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
7966     [AC_CHECK_TOOL(GCJ, gcj,)
7967       test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
7968       AC_SUBST(GCJFLAGS)])])[]dnl
7969 ])
7970
7971 # Old name:
7972 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
7973 dnl aclocal-1.4 backwards compatibility:
7974 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
7975
7976
7977 # LT_PROG_RC
7978 # ----------
7979 AC_DEFUN([LT_PROG_RC],
7980 [AC_CHECK_TOOL(RC, windres,)
7981 ])
7982
7983 # Old name:
7984 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
7985 dnl aclocal-1.4 backwards compatibility:
7986 dnl AC_DEFUN([LT_AC_PROG_RC], [])
7987
7988
7989 # _LT_DECL_EGREP
7990 # --------------
7991 # If we don't have a new enough Autoconf to choose the best grep
7992 # available, choose the one first in the user's PATH.
7993 m4_defun([_LT_DECL_EGREP],
7994 [AC_REQUIRE([AC_PROG_EGREP])dnl
7995 AC_REQUIRE([AC_PROG_FGREP])dnl
7996 test -z "$GREP" && GREP=grep
7997 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
7998 _LT_DECL([], [EGREP], [1], [An ERE matcher])
7999 _LT_DECL([], [FGREP], [1], [A literal string matcher])
8000 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
8001 AC_SUBST([GREP])
8002 ])
8003
8004
8005 # _LT_DECL_OBJDUMP
8006 # --------------
8007 # If we don't have a new enough Autoconf to choose the best objdump
8008 # available, choose the one first in the user's PATH.
8009 m4_defun([_LT_DECL_OBJDUMP],
8010 [AC_CHECK_TOOL(OBJDUMP, objdump, false)
8011 test -z "$OBJDUMP" && OBJDUMP=objdump
8012 _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
8013 AC_SUBST([OBJDUMP])
8014 ])
8015
8016
8017 # _LT_DECL_SED
8018 # ------------
8019 # Check for a fully-functional sed program, that truncates
8020 # as few characters as possible.  Prefer GNU sed if found.
8021 m4_defun([_LT_DECL_SED],
8022 [AC_PROG_SED
8023 test -z "$SED" && SED=sed
8024 Xsed="$SED -e 1s/^X//"
8025 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
8026 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
8027     [Sed that helps us avoid accidentally triggering echo(1) options like -n])
8028 ])# _LT_DECL_SED
8029
8030 m4_ifndef([AC_PROG_SED], [
8031 # NOTE: This macro has been submitted for inclusion into   #
8032 #  GNU Autoconf as AC_PROG_SED.  When it is available in   #
8033 #  a released version of Autoconf we should remove this    #
8034 #  macro and use it instead.                               #
8035
8036 m4_defun([AC_PROG_SED],
8037 [AC_MSG_CHECKING([for a sed that does not truncate output])
8038 AC_CACHE_VAL(lt_cv_path_SED,
8039 [# Loop through the user's path and test for sed and gsed.
8040 # Then use that list of sed's as ones to test for truncation.
8041 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8042 for as_dir in $PATH
8043 do
8044   IFS=$as_save_IFS
8045   test -z "$as_dir" && as_dir=.
8046   for lt_ac_prog in sed gsed; do
8047     for ac_exec_ext in '' $ac_executable_extensions; do
8048       if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
8049         lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
8050       fi
8051     done
8052   done
8053 done
8054 IFS=$as_save_IFS
8055 lt_ac_max=0
8056 lt_ac_count=0
8057 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
8058 # along with /bin/sed that truncates output.
8059 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
8060   test ! -f $lt_ac_sed && continue
8061   cat /dev/null > conftest.in
8062   lt_ac_count=0
8063   echo $ECHO_N "0123456789$ECHO_C" >conftest.in
8064   # Check for GNU sed and select it if it is found.
8065   if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
8066     lt_cv_path_SED=$lt_ac_sed
8067     break
8068   fi
8069   while true; do
8070     cat conftest.in conftest.in >conftest.tmp
8071     mv conftest.tmp conftest.in
8072     cp conftest.in conftest.nl
8073     echo >>conftest.nl
8074     $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
8075     cmp -s conftest.out conftest.nl || break
8076     # 10000 chars as input seems more than enough
8077     test $lt_ac_count -gt 10 && break
8078     lt_ac_count=`expr $lt_ac_count + 1`
8079     if test $lt_ac_count -gt $lt_ac_max; then
8080       lt_ac_max=$lt_ac_count
8081       lt_cv_path_SED=$lt_ac_sed
8082     fi
8083   done
8084 done
8085 ])
8086 SED=$lt_cv_path_SED
8087 AC_SUBST([SED])
8088 AC_MSG_RESULT([$SED])
8089 ])#AC_PROG_SED
8090 ])#m4_ifndef
8091
8092 # Old name:
8093 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
8094 dnl aclocal-1.4 backwards compatibility:
8095 dnl AC_DEFUN([LT_AC_PROG_SED], [])
8096
8097
8098 # _LT_CHECK_SHELL_FEATURES
8099 # ------------------------
8100 # Find out whether the shell is Bourne or XSI compatible,
8101 # or has some other useful features.
8102 m4_defun([_LT_CHECK_SHELL_FEATURES],
8103 [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
8104 # Try some XSI features
8105 xsi_shell=no
8106 ( _lt_dummy="a/b/c"
8107   test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
8108       = c,a/b,, \
8109     && eval 'test $(( 1 + 1 )) -eq 2 \
8110     && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
8111   && xsi_shell=yes
8112 AC_MSG_RESULT([$xsi_shell])
8113 _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
8114
8115 AC_MSG_CHECKING([whether the shell understands "+="])
8116 lt_shell_append=no
8117 ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
8118     >/dev/null 2>&1 \
8119   && lt_shell_append=yes
8120 AC_MSG_RESULT([$lt_shell_append])
8121 _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
8122
8123 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
8124   lt_unset=unset
8125 else
8126   lt_unset=false
8127 fi
8128 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
8129
8130 # test EBCDIC or ASCII
8131 case `echo X|tr X '\101'` in
8132  A) # ASCII based system
8133     # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
8134   lt_SP2NL='tr \040 \012'
8135   lt_NL2SP='tr \015\012 \040\040'
8136   ;;
8137  *) # EBCDIC based system
8138   lt_SP2NL='tr \100 \n'
8139   lt_NL2SP='tr \r\n \100\100'
8140   ;;
8141 esac
8142 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
8143 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
8144 ])# _LT_CHECK_SHELL_FEATURES
8145
8146
8147 # _LT_PROG_XSI_SHELLFNS
8148 # ---------------------
8149 # Bourne and XSI compatible variants of some useful shell functions.
8150 m4_defun([_LT_PROG_XSI_SHELLFNS],
8151 [case $xsi_shell in
8152   yes)
8153     cat << \_LT_EOF >> "$cfgfile"
8154
8155 # func_dirname file append nondir_replacement
8156 # Compute the dirname of FILE.  If nonempty, add APPEND to the result,
8157 # otherwise set result to NONDIR_REPLACEMENT.
8158 func_dirname ()
8159 {
8160   case ${1} in
8161     */*) func_dirname_result="${1%/*}${2}" ;;
8162     *  ) func_dirname_result="${3}" ;;
8163   esac
8164 }
8165
8166 # func_basename file
8167 func_basename ()
8168 {
8169   func_basename_result="${1##*/}"
8170 }
8171
8172 # func_dirname_and_basename file append nondir_replacement
8173 # perform func_basename and func_dirname in a single function
8174 # call:
8175 #   dirname:  Compute the dirname of FILE.  If nonempty,
8176 #             add APPEND to the result, otherwise set result
8177 #             to NONDIR_REPLACEMENT.
8178 #             value returned in "$func_dirname_result"
8179 #   basename: Compute filename of FILE.
8180 #             value retuned in "$func_basename_result"
8181 # Implementation must be kept synchronized with func_dirname
8182 # and func_basename. For efficiency, we do not delegate to
8183 # those functions but instead duplicate the functionality here.
8184 func_dirname_and_basename ()
8185 {
8186   case ${1} in
8187     */*) func_dirname_result="${1%/*}${2}" ;;
8188     *  ) func_dirname_result="${3}" ;;
8189   esac
8190   func_basename_result="${1##*/}"
8191 }
8192
8193 # func_stripname prefix suffix name
8194 # strip PREFIX and SUFFIX off of NAME.
8195 # PREFIX and SUFFIX must not contain globbing or regex special
8196 # characters, hashes, percent signs, but SUFFIX may contain a leading
8197 # dot (in which case that matches only a dot).
8198 func_stripname ()
8199 {
8200   # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
8201   # positional parameters, so assign one to ordinary parameter first.
8202   func_stripname_result=${3}
8203   func_stripname_result=${func_stripname_result#"${1}"}
8204   func_stripname_result=${func_stripname_result%"${2}"}
8205 }
8206
8207 # func_opt_split
8208 func_opt_split ()
8209 {
8210   func_opt_split_opt=${1%%=*}
8211   func_opt_split_arg=${1#*=}
8212 }
8213
8214 # func_lo2o object
8215 func_lo2o ()
8216 {
8217   case ${1} in
8218     *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
8219     *)    func_lo2o_result=${1} ;;
8220   esac
8221 }
8222
8223 # func_xform libobj-or-source
8224 func_xform ()
8225 {
8226   func_xform_result=${1%.*}.lo
8227 }
8228
8229 # func_arith arithmetic-term...
8230 func_arith ()
8231 {
8232   func_arith_result=$(( $[*] ))
8233 }
8234
8235 # func_len string
8236 # STRING may not start with a hyphen.
8237 func_len ()
8238 {
8239   func_len_result=${#1}
8240 }
8241
8242 _LT_EOF
8243     ;;
8244   *) # Bourne compatible functions.
8245     cat << \_LT_EOF >> "$cfgfile"
8246
8247 # func_dirname file append nondir_replacement
8248 # Compute the dirname of FILE.  If nonempty, add APPEND to the result,
8249 # otherwise set result to NONDIR_REPLACEMENT.
8250 func_dirname ()
8251 {
8252   # Extract subdirectory from the argument.
8253   func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
8254   if test "X$func_dirname_result" = "X${1}"; then
8255     func_dirname_result="${3}"
8256   else
8257     func_dirname_result="$func_dirname_result${2}"
8258   fi
8259 }
8260
8261 # func_basename file
8262 func_basename ()
8263 {
8264   func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
8265 }
8266
8267 dnl func_dirname_and_basename
8268 dnl A portable version of this function is already defined in general.m4sh
8269 dnl so there is no need for it here.
8270
8271 # func_stripname prefix suffix name
8272 # strip PREFIX and SUFFIX off of NAME.
8273 # PREFIX and SUFFIX must not contain globbing or regex special
8274 # characters, hashes, percent signs, but SUFFIX may contain a leading
8275 # dot (in which case that matches only a dot).
8276 # func_strip_suffix prefix name
8277 func_stripname ()
8278 {
8279   case ${2} in
8280     .*) func_stripname_result=`$ECHO "X${3}" \
8281            | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
8282     *)  func_stripname_result=`$ECHO "X${3}" \
8283            | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
8284   esac
8285 }
8286
8287 # sed scripts:
8288 my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
8289 my_sed_long_arg='1s/^-[[^=]]*=//'
8290
8291 # func_opt_split
8292 func_opt_split ()
8293 {
8294   func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
8295   func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
8296 }
8297
8298 # func_lo2o object
8299 func_lo2o ()
8300 {
8301   func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
8302 }
8303
8304 # func_xform libobj-or-source
8305 func_xform ()
8306 {
8307   func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
8308 }
8309
8310 # func_arith arithmetic-term...
8311 func_arith ()
8312 {
8313   func_arith_result=`expr "$[@]"`
8314 }
8315
8316 # func_len string
8317 # STRING may not start with a hyphen.
8318 func_len ()
8319 {
8320   func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
8321 }
8322
8323 _LT_EOF
8324 esac
8325
8326 case $lt_shell_append in
8327   yes)
8328     cat << \_LT_EOF >> "$cfgfile"
8329
8330 # func_append var value
8331 # Append VALUE to the end of shell variable VAR.
8332 func_append ()
8333 {
8334   eval "$[1]+=\$[2]"
8335 }
8336 _LT_EOF
8337     ;;
8338   *)
8339     cat << \_LT_EOF >> "$cfgfile"
8340
8341 # func_append var value
8342 # Append VALUE to the end of shell variable VAR.
8343 func_append ()
8344 {
8345   eval "$[1]=\$$[1]\$[2]"
8346 }
8347
8348 _LT_EOF
8349     ;;
8350   esac
8351 ])
8352
8353 # Helper functions for option handling.                    -*- Autoconf -*-
8354 #
8355 #   Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
8356 #   Written by Gary V. Vaughan, 2004
8357 #
8358 # This file is free software; the Free Software Foundation gives
8359 # unlimited permission to copy and/or distribute it, with or without
8360 # modifications, as long as this notice is preserved.
8361
8362 # serial 6 ltoptions.m4
8363
8364 # This is to help aclocal find these macros, as it can't see m4_define.
8365 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
8366
8367
8368 # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
8369 # ------------------------------------------
8370 m4_define([_LT_MANGLE_OPTION],
8371 [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
8372
8373
8374 # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
8375 # ---------------------------------------
8376 # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
8377 # matching handler defined, dispatch to it.  Other OPTION-NAMEs are
8378 # saved as a flag.
8379 m4_define([_LT_SET_OPTION],
8380 [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
8381 m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
8382         _LT_MANGLE_DEFUN([$1], [$2]),
8383     [m4_warning([Unknown $1 option `$2'])])[]dnl
8384 ])
8385
8386
8387 # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
8388 # ------------------------------------------------------------
8389 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
8390 m4_define([_LT_IF_OPTION],
8391 [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
8392
8393
8394 # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
8395 # -------------------------------------------------------
8396 # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
8397 # are set.
8398 m4_define([_LT_UNLESS_OPTIONS],
8399 [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8400             [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
8401                       [m4_define([$0_found])])])[]dnl
8402 m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
8403 ])[]dnl
8404 ])
8405
8406
8407 # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
8408 # ----------------------------------------
8409 # OPTION-LIST is a space-separated list of Libtool options associated
8410 # with MACRO-NAME.  If any OPTION has a matching handler declared with
8411 # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
8412 # the unknown option and exit.
8413 m4_defun([_LT_SET_OPTIONS],
8414 [# Set options
8415 m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8416     [_LT_SET_OPTION([$1], _LT_Option)])
8417
8418 m4_if([$1],[LT_INIT],[
8419   dnl
8420   dnl Simply set some default values (i.e off) if boolean options were not
8421   dnl specified:
8422   _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
8423   ])
8424   _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
8425   ])
8426   dnl
8427   dnl If no reference was made to various pairs of opposing options, then
8428   dnl we run the default mode handler for the pair.  For example, if neither
8429   dnl `shared' nor `disable-shared' was passed, we enable building of shared
8430   dnl archives by default:
8431   _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
8432   _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
8433   _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
8434   _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
8435                    [_LT_ENABLE_FAST_INSTALL])
8436   ])
8437 ])# _LT_SET_OPTIONS
8438
8439
8440
8441 # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
8442 # -----------------------------------------
8443 m4_define([_LT_MANGLE_DEFUN],
8444 [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
8445
8446
8447 # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
8448 # -----------------------------------------------
8449 m4_define([LT_OPTION_DEFINE],
8450 [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
8451 ])# LT_OPTION_DEFINE
8452
8453
8454 # dlopen
8455 # ------
8456 LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
8457 ])
8458
8459 AU_DEFUN([AC_LIBTOOL_DLOPEN],
8460 [_LT_SET_OPTION([LT_INIT], [dlopen])
8461 AC_DIAGNOSE([obsolete],
8462 [$0: Remove this warning and the call to _LT_SET_OPTION when you
8463 put the `dlopen' option into LT_INIT's first parameter.])
8464 ])
8465
8466 dnl aclocal-1.4 backwards compatibility:
8467 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
8468
8469
8470 # win32-dll
8471 # ---------
8472 # Declare package support for building win32 dll's.
8473 LT_OPTION_DEFINE([LT_INIT], [win32-dll],
8474 [enable_win32_dll=yes
8475
8476 case $host in
8477 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
8478   AC_CHECK_TOOL(AS, as, false)
8479   AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8480   AC_CHECK_TOOL(OBJDUMP, objdump, false)
8481   ;;
8482 esac
8483
8484 test -z "$AS" && AS=as
8485 _LT_DECL([], [AS],      [0], [Assembler program])dnl
8486
8487 test -z "$DLLTOOL" && DLLTOOL=dlltool
8488 _LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
8489
8490 test -z "$OBJDUMP" && OBJDUMP=objdump
8491 _LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
8492 ])# win32-dll
8493
8494 AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
8495 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
8496 _LT_SET_OPTION([LT_INIT], [win32-dll])
8497 AC_DIAGNOSE([obsolete],
8498 [$0: Remove this warning and the call to _LT_SET_OPTION when you
8499 put the `win32-dll' option into LT_INIT's first parameter.])
8500 ])
8501
8502 dnl aclocal-1.4 backwards compatibility:
8503 dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
8504
8505
8506 # _LT_ENABLE_SHARED([DEFAULT])
8507 # ----------------------------
8508 # implement the --enable-shared flag, and supports the `shared' and
8509 # `disable-shared' LT_INIT options.
8510 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
8511 m4_define([_LT_ENABLE_SHARED],
8512 [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
8513 AC_ARG_ENABLE([shared],
8514     [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
8515         [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
8516     [p=${PACKAGE-default}
8517     case $enableval in
8518     yes) enable_shared=yes ;;
8519     no) enable_shared=no ;;
8520     *)
8521       enable_shared=no
8522       # Look at the argument we got.  We use all the common list separators.
8523       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8524       for pkg in $enableval; do
8525         IFS="$lt_save_ifs"
8526         if test "X$pkg" = "X$p"; then
8527           enable_shared=yes
8528         fi
8529       done
8530       IFS="$lt_save_ifs"
8531       ;;
8532     esac],
8533     [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
8534
8535     _LT_DECL([build_libtool_libs], [enable_shared], [0],
8536         [Whether or not to build shared libraries])
8537 ])# _LT_ENABLE_SHARED
8538
8539 LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
8540 LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
8541
8542 # Old names:
8543 AC_DEFUN([AC_ENABLE_SHARED],
8544 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
8545 ])
8546
8547 AC_DEFUN([AC_DISABLE_SHARED],
8548 [_LT_SET_OPTION([LT_INIT], [disable-shared])
8549 ])
8550
8551 AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
8552 AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
8553
8554 dnl aclocal-1.4 backwards compatibility:
8555 dnl AC_DEFUN([AM_ENABLE_SHARED], [])
8556 dnl AC_DEFUN([AM_DISABLE_SHARED], [])
8557
8558
8559
8560 # _LT_ENABLE_STATIC([DEFAULT])
8561 # ----------------------------
8562 # implement the --enable-static flag, and support the `static' and
8563 # `disable-static' LT_INIT options.
8564 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
8565 m4_define([_LT_ENABLE_STATIC],
8566 [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
8567 AC_ARG_ENABLE([static],
8568     [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
8569         [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
8570     [p=${PACKAGE-default}
8571     case $enableval in
8572     yes) enable_static=yes ;;
8573     no) enable_static=no ;;
8574     *)
8575      enable_static=no
8576       # Look at the argument we got.  We use all the common list separators.
8577       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8578       for pkg in $enableval; do
8579         IFS="$lt_save_ifs"
8580         if test "X$pkg" = "X$p"; then
8581           enable_static=yes
8582         fi
8583       done
8584       IFS="$lt_save_ifs"
8585       ;;
8586     esac],
8587     [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
8588
8589     _LT_DECL([build_old_libs], [enable_static], [0],
8590         [Whether or not to build static libraries])
8591 ])# _LT_ENABLE_STATIC
8592
8593 LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
8594 LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
8595
8596 # Old names:
8597 AC_DEFUN([AC_ENABLE_STATIC],
8598 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
8599 ])
8600
8601 AC_DEFUN([AC_DISABLE_STATIC],
8602 [_LT_SET_OPTION([LT_INIT], [disable-static])
8603 ])
8604
8605 AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
8606 AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
8607
8608 dnl aclocal-1.4 backwards compatibility:
8609 dnl AC_DEFUN([AM_ENABLE_STATIC], [])
8610 dnl AC_DEFUN([AM_DISABLE_STATIC], [])
8611
8612
8613
8614 # _LT_ENABLE_FAST_INSTALL([DEFAULT])
8615 # ----------------------------------
8616 # implement the --enable-fast-install flag, and support the `fast-install'
8617 # and `disable-fast-install' LT_INIT options.
8618 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
8619 m4_define([_LT_ENABLE_FAST_INSTALL],
8620 [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
8621 AC_ARG_ENABLE([fast-install],
8622     [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
8623     [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
8624     [p=${PACKAGE-default}
8625     case $enableval in
8626     yes) enable_fast_install=yes ;;
8627     no) enable_fast_install=no ;;
8628     *)
8629       enable_fast_install=no
8630       # Look at the argument we got.  We use all the common list separators.
8631       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8632       for pkg in $enableval; do
8633         IFS="$lt_save_ifs"
8634         if test "X$pkg" = "X$p"; then
8635           enable_fast_install=yes
8636         fi
8637       done
8638       IFS="$lt_save_ifs"
8639       ;;
8640     esac],
8641     [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
8642
8643 _LT_DECL([fast_install], [enable_fast_install], [0],
8644          [Whether or not to optimize for fast installation])dnl
8645 ])# _LT_ENABLE_FAST_INSTALL
8646
8647 LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
8648 LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
8649
8650 # Old names:
8651 AU_DEFUN([AC_ENABLE_FAST_INSTALL],
8652 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
8653 AC_DIAGNOSE([obsolete],
8654 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
8655 the `fast-install' option into LT_INIT's first parameter.])
8656 ])
8657
8658 AU_DEFUN([AC_DISABLE_FAST_INSTALL],
8659 [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
8660 AC_DIAGNOSE([obsolete],
8661 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
8662 the `disable-fast-install' option into LT_INIT's first parameter.])
8663 ])
8664
8665 dnl aclocal-1.4 backwards compatibility:
8666 dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
8667 dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
8668
8669
8670 # _LT_WITH_PIC([MODE])
8671 # --------------------
8672 # implement the --with-pic flag, and support the `pic-only' and `no-pic'
8673 # LT_INIT options.
8674 # MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
8675 m4_define([_LT_WITH_PIC],
8676 [AC_ARG_WITH([pic],
8677     [AS_HELP_STRING([--with-pic],
8678         [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
8679     [pic_mode="$withval"],
8680     [pic_mode=default])
8681
8682 test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
8683
8684 _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
8685 ])# _LT_WITH_PIC
8686
8687 LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
8688 LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
8689
8690 # Old name:
8691 AU_DEFUN([AC_LIBTOOL_PICMODE],
8692 [_LT_SET_OPTION([LT_INIT], [pic-only])
8693 AC_DIAGNOSE([obsolete],
8694 [$0: Remove this warning and the call to _LT_SET_OPTION when you
8695 put the `pic-only' option into LT_INIT's first parameter.])
8696 ])
8697
8698 dnl aclocal-1.4 backwards compatibility:
8699 dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
8700
8701
8702 m4_define([_LTDL_MODE], [])
8703 LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
8704                  [m4_define([_LTDL_MODE], [nonrecursive])])
8705 LT_OPTION_DEFINE([LTDL_INIT], [recursive],
8706                  [m4_define([_LTDL_MODE], [recursive])])
8707 LT_OPTION_DEFINE([LTDL_INIT], [subproject],
8708                  [m4_define([_LTDL_MODE], [subproject])])
8709
8710 m4_define([_LTDL_TYPE], [])
8711 LT_OPTION_DEFINE([LTDL_INIT], [installable],
8712                  [m4_define([_LTDL_TYPE], [installable])])
8713 LT_OPTION_DEFINE([LTDL_INIT], [convenience],
8714                  [m4_define([_LTDL_TYPE], [convenience])])
8715
8716 # ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
8717 #
8718 # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
8719 # Written by Gary V. Vaughan, 2004
8720 #
8721 # This file is free software; the Free Software Foundation gives
8722 # unlimited permission to copy and/or distribute it, with or without
8723 # modifications, as long as this notice is preserved.
8724
8725 # serial 6 ltsugar.m4
8726
8727 # This is to help aclocal find these macros, as it can't see m4_define.
8728 AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
8729
8730
8731 # lt_join(SEP, ARG1, [ARG2...])
8732 # -----------------------------
8733 # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
8734 # associated separator.
8735 # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
8736 # versions in m4sugar had bugs.
8737 m4_define([lt_join],
8738 [m4_if([$#], [1], [],
8739        [$#], [2], [[$2]],
8740        [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
8741 m4_define([_lt_join],
8742 [m4_if([$#$2], [2], [],
8743        [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
8744
8745
8746 # lt_car(LIST)
8747 # lt_cdr(LIST)
8748 # ------------
8749 # Manipulate m4 lists.
8750 # These macros are necessary as long as will still need to support
8751 # Autoconf-2.59 which quotes differently.
8752 m4_define([lt_car], [[$1]])
8753 m4_define([lt_cdr],
8754 [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
8755        [$#], 1, [],
8756        [m4_dquote(m4_shift($@))])])
8757 m4_define([lt_unquote], $1)
8758
8759
8760 # lt_append(MACRO-NAME, STRING, [SEPARATOR])
8761 # ------------------------------------------
8762 # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
8763 # Note that neither SEPARATOR nor STRING are expanded; they are appended
8764 # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
8765 # No SEPARATOR is output if MACRO-NAME was previously undefined (different
8766 # than defined and empty).
8767 #
8768 # This macro is needed until we can rely on Autoconf 2.62, since earlier
8769 # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
8770 m4_define([lt_append],
8771 [m4_define([$1],
8772            m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
8773
8774
8775
8776 # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
8777 # ----------------------------------------------------------
8778 # Produce a SEP delimited list of all paired combinations of elements of
8779 # PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
8780 # has the form PREFIXmINFIXSUFFIXn.
8781 # Needed until we can rely on m4_combine added in Autoconf 2.62.
8782 m4_define([lt_combine],
8783 [m4_if(m4_eval([$# > 3]), [1],
8784        [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
8785 [[m4_foreach([_Lt_prefix], [$2],
8786              [m4_foreach([_Lt_suffix],
8787                 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
8788         [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
8789
8790
8791 # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
8792 # -----------------------------------------------------------------------
8793 # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
8794 # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
8795 m4_define([lt_if_append_uniq],
8796 [m4_ifdef([$1],
8797           [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
8798                  [lt_append([$1], [$2], [$3])$4],
8799                  [$5])],
8800           [lt_append([$1], [$2], [$3])$4])])
8801
8802
8803 # lt_dict_add(DICT, KEY, VALUE)
8804 # -----------------------------
8805 m4_define([lt_dict_add],
8806 [m4_define([$1($2)], [$3])])
8807
8808
8809 # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
8810 # --------------------------------------------
8811 m4_define([lt_dict_add_subkey],
8812 [m4_define([$1($2:$3)], [$4])])
8813
8814
8815 # lt_dict_fetch(DICT, KEY, [SUBKEY])
8816 # ----------------------------------
8817 m4_define([lt_dict_fetch],
8818 [m4_ifval([$3],
8819         m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
8820     m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
8821
8822
8823 # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
8824 # -----------------------------------------------------------------
8825 m4_define([lt_if_dict_fetch],
8826 [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
8827         [$5],
8828     [$6])])
8829
8830
8831 # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
8832 # --------------------------------------------------------------
8833 m4_define([lt_dict_filter],
8834 [m4_if([$5], [], [],
8835   [lt_join(m4_quote(m4_default([$4], [[, ]])),
8836            lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
8837                       [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
8838 ])
8839
8840 # ltversion.m4 -- version numbers                       -*- Autoconf -*-
8841 #
8842 #   Copyright (C) 2004 Free Software Foundation, Inc.
8843 #   Written by Scott James Remnant, 2004
8844 #
8845 # This file is free software; the Free Software Foundation gives
8846 # unlimited permission to copy and/or distribute it, with or without
8847 # modifications, as long as this notice is preserved.
8848
8849 # Generated from ltversion.in.
8850
8851 # serial 3017 ltversion.m4
8852 # This file is part of GNU Libtool
8853
8854 m4_define([LT_PACKAGE_VERSION], [2.2.6b])
8855 m4_define([LT_PACKAGE_REVISION], [1.3017])
8856
8857 AC_DEFUN([LTVERSION_VERSION],
8858 [macro_version='2.2.6b'
8859 macro_revision='1.3017'
8860 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
8861 _LT_DECL(, macro_revision, 0)
8862 ])
8863
8864 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
8865 #
8866 #   Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
8867 #   Written by Scott James Remnant, 2004.
8868 #
8869 # This file is free software; the Free Software Foundation gives
8870 # unlimited permission to copy and/or distribute it, with or without
8871 # modifications, as long as this notice is preserved.
8872
8873 # serial 4 lt~obsolete.m4
8874
8875 # These exist entirely to fool aclocal when bootstrapping libtool.
8876 #
8877 # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
8878 # which have later been changed to m4_define as they aren't part of the
8879 # exported API, or moved to Autoconf or Automake where they belong.
8880 #
8881 # The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
8882 # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
8883 # using a macro with the same name in our local m4/libtool.m4 it'll
8884 # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
8885 # and doesn't know about Autoconf macros at all.)
8886 #
8887 # So we provide this file, which has a silly filename so it's always
8888 # included after everything else.  This provides aclocal with the
8889 # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
8890 # because those macros already exist, or will be overwritten later.
8891 # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
8892 #
8893 # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
8894 # Yes, that means every name once taken will need to remain here until
8895 # we give up compatibility with versions before 1.7, at which point
8896 # we need to keep only those names which we still refer to.
8897
8898 # This is to help aclocal find these macros, as it can't see m4_define.
8899 AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
8900
8901 m4_ifndef([AC_LIBTOOL_LINKER_OPTION],   [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
8902 m4_ifndef([AC_PROG_EGREP],              [AC_DEFUN([AC_PROG_EGREP])])
8903 m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
8904 m4_ifndef([_LT_AC_SHELL_INIT],          [AC_DEFUN([_LT_AC_SHELL_INIT])])
8905 m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],     [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
8906 m4_ifndef([_LT_PROG_LTMAIN],            [AC_DEFUN([_LT_PROG_LTMAIN])])
8907 m4_ifndef([_LT_AC_TAGVAR],              [AC_DEFUN([_LT_AC_TAGVAR])])
8908 m4_ifndef([AC_LTDL_ENABLE_INSTALL],     [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
8909 m4_ifndef([AC_LTDL_PREOPEN],            [AC_DEFUN([AC_LTDL_PREOPEN])])
8910 m4_ifndef([_LT_AC_SYS_COMPILER],        [AC_DEFUN([_LT_AC_SYS_COMPILER])])
8911 m4_ifndef([_LT_AC_LOCK],                [AC_DEFUN([_LT_AC_LOCK])])
8912 m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
8913 m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],     [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
8914 m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],     [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
8915 m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
8916 m4_ifndef([AC_LIBTOOL_OBJDIR],          [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
8917 m4_ifndef([AC_LTDL_OBJDIR],             [AC_DEFUN([AC_LTDL_OBJDIR])])
8918 m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
8919 m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],   [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
8920 m4_ifndef([AC_PATH_MAGIC],              [AC_DEFUN([AC_PATH_MAGIC])])
8921 m4_ifndef([AC_PROG_LD_GNU],             [AC_DEFUN([AC_PROG_LD_GNU])])
8922 m4_ifndef([AC_PROG_LD_RELOAD_FLAG],     [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
8923 m4_ifndef([AC_DEPLIBS_CHECK_METHOD],    [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
8924 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
8925 m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
8926 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
8927 m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],  [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
8928 m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],  [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
8929 m4_ifndef([LT_AC_PROG_EGREP],           [AC_DEFUN([LT_AC_PROG_EGREP])])
8930 m4_ifndef([LT_AC_PROG_SED],             [AC_DEFUN([LT_AC_PROG_SED])])
8931 m4_ifndef([_LT_CC_BASENAME],            [AC_DEFUN([_LT_CC_BASENAME])])
8932 m4_ifndef([_LT_COMPILER_BOILERPLATE],   [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
8933 m4_ifndef([_LT_LINKER_BOILERPLATE],     [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
8934 m4_ifndef([_AC_PROG_LIBTOOL],           [AC_DEFUN([_AC_PROG_LIBTOOL])])
8935 m4_ifndef([AC_LIBTOOL_SETUP],           [AC_DEFUN([AC_LIBTOOL_SETUP])])
8936 m4_ifndef([_LT_AC_CHECK_DLFCN],         [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
8937 m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],      [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
8938 m4_ifndef([_LT_AC_TAGCONFIG],           [AC_DEFUN([_LT_AC_TAGCONFIG])])
8939 m4_ifndef([AC_DISABLE_FAST_INSTALL],    [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
8940 m4_ifndef([_LT_AC_LANG_CXX],            [AC_DEFUN([_LT_AC_LANG_CXX])])
8941 m4_ifndef([_LT_AC_LANG_F77],            [AC_DEFUN([_LT_AC_LANG_F77])])
8942 m4_ifndef([_LT_AC_LANG_GCJ],            [AC_DEFUN([_LT_AC_LANG_GCJ])])
8943 m4_ifndef([AC_LIBTOOL_RC],              [AC_DEFUN([AC_LIBTOOL_RC])])
8944 m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],   [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
8945 m4_ifndef([_LT_AC_LANG_C_CONFIG],       [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
8946 m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
8947 m4_ifndef([_LT_AC_LANG_CXX_CONFIG],     [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
8948 m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
8949 m4_ifndef([_LT_AC_LANG_F77_CONFIG],     [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
8950 m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
8951 m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],     [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
8952 m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],  [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
8953 m4_ifndef([_LT_AC_LANG_RC_CONFIG],      [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
8954 m4_ifndef([AC_LIBTOOL_CONFIG],          [AC_DEFUN([AC_LIBTOOL_CONFIG])])
8955 m4_ifndef([_LT_AC_FILE_LTDLL_C],        [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
8956
8957 dnl -*- mode: autoconf -*-
8958
8959 # serial 1
8960
8961 dnl Usage:
8962 dnl   GTK_DOC_CHECK([minimum-gtk-doc-version])
8963 AC_DEFUN([GTK_DOC_CHECK],
8964 [
8965   AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
8966   AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
8967
8968   dnl check for tools we added during development
8969   AC_PATH_PROG([GTKDOC_CHECK],[gtkdoc-check])
8970   AC_PATH_PROGS([GTKDOC_REBASE],[gtkdoc-rebase],[true])
8971   AC_PATH_PROG([GTKDOC_MKPDF],[gtkdoc-mkpdf])
8972
8973   dnl for overriding the documentation installation directory
8974   AC_ARG_WITH([html-dir],
8975     AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),,
8976     [with_html_dir='${datadir}/gtk-doc/html'])
8977   HTML_DIR="$with_html_dir"
8978   AC_SUBST([HTML_DIR])
8979
8980   dnl enable/disable documentation building
8981   AC_ARG_ENABLE([gtk-doc],
8982     AS_HELP_STRING([--enable-gtk-doc],
8983                    [use gtk-doc to build documentation [[default=no]]]),,
8984     [enable_gtk_doc=no])
8985
8986   if test x$enable_gtk_doc = xyes; then
8987     ifelse([$1],[],
8988       [PKG_CHECK_EXISTS([gtk-doc],,
8989                         AC_MSG_ERROR([gtk-doc not installed and --enable-gtk-doc requested]))],
8990       [PKG_CHECK_EXISTS([gtk-doc >= $1],,
8991                         AC_MSG_ERROR([You need to have gtk-doc >= $1 installed to build $PACKAGE_NAME]))])
8992   fi
8993
8994   AC_MSG_CHECKING([whether to build gtk-doc documentation])
8995   AC_MSG_RESULT($enable_gtk_doc)
8996
8997   dnl enable/disable output formats
8998   AC_ARG_ENABLE([gtk-doc-html],
8999     AS_HELP_STRING([--enable-gtk-doc-html],
9000                    [build documentation in html format [[default=yes]]]),,
9001     [enable_gtk_doc_html=yes])
9002     AC_ARG_ENABLE([gtk-doc-pdf],
9003       AS_HELP_STRING([--enable-gtk-doc-pdf],
9004                      [build documentation in pdf format [[default=no]]]),,
9005       [enable_gtk_doc_pdf=no])
9006
9007   if test -z "$GTKDOC_MKPDF"; then
9008     enable_gtk_doc_pdf=no
9009   fi
9010
9011
9012   AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes])
9013   AM_CONDITIONAL([GTK_DOC_BUILD_HTML], [test x$enable_gtk_doc_html = xyes])
9014   AM_CONDITIONAL([GTK_DOC_BUILD_PDF], [test x$enable_gtk_doc_pdf = xyes])
9015   AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"])
9016   AM_CONDITIONAL([GTK_DOC_USE_REBASE], [test -n "$GTKDOC_REBASE"])
9017 ])
9018
9019 dnl -*- mode: autoconf -*-
9020 dnl Copyright 2009 Johan Dahlin
9021 dnl
9022 dnl This file is free software; the author(s) gives unlimited
9023 dnl permission to copy and/or distribute it, with or without
9024 dnl modifications, as long as this notice is preserved.
9025 dnl
9026
9027 # serial 1
9028
9029 m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL],
9030 [
9031     AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
9032     AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
9033     AC_BEFORE([LT_INIT],[$0])dnl setup libtool first
9034
9035     dnl enable/disable introspection
9036     m4_if([$2], [require],
9037     [dnl
9038         enable_introspection=yes
9039     ],[dnl
9040         AC_ARG_ENABLE(introspection,
9041                   AS_HELP_STRING([--enable-introspection[=@<:@no/auto/yes@:>@]],
9042                                  [Enable introspection for this build]),, 
9043                                  [enable_introspection=auto])
9044     ])dnl
9045
9046     AC_MSG_CHECKING([for gobject-introspection])
9047
9048     dnl presence/version checking
9049     AS_CASE([$enable_introspection],
9050     [no], [dnl
9051         found_introspection="no (disabled, use --enable-introspection to enable)"
9052     ],dnl
9053     [yes],[dnl
9054         PKG_CHECK_EXISTS([gobject-introspection-1.0],,
9055                          AC_MSG_ERROR([gobject-introspection-1.0 is not installed]))
9056         PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1],
9057                          found_introspection=yes,
9058                          AC_MSG_ERROR([You need to have gobject-introspection >= $1 installed to build AC_PACKAGE_NAME]))
9059     ],dnl
9060     [auto],[dnl
9061         PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], found_introspection=yes, found_introspection=no)
9062     ],dnl
9063     [dnl        
9064         AC_MSG_ERROR([invalid argument passed to --enable-introspection, should be one of @<:@no/auto/yes@:>@])
9065     ])dnl
9066
9067     AC_MSG_RESULT([$found_introspection])
9068
9069     INTROSPECTION_SCANNER=
9070     INTROSPECTION_COMPILER=
9071     INTROSPECTION_GENERATE=
9072     INTROSPECTION_GIRDIR=
9073     INTROSPECTION_TYPELIBDIR=
9074     if test "x$found_introspection" = "xyes"; then
9075        INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
9076        INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
9077        INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
9078        INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
9079        INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
9080        INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0`
9081        INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0`
9082        INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
9083     fi
9084     AC_SUBST(INTROSPECTION_SCANNER)
9085     AC_SUBST(INTROSPECTION_COMPILER)
9086     AC_SUBST(INTROSPECTION_GENERATE)
9087     AC_SUBST(INTROSPECTION_GIRDIR)
9088     AC_SUBST(INTROSPECTION_TYPELIBDIR)
9089     AC_SUBST(INTROSPECTION_CFLAGS)
9090     AC_SUBST(INTROSPECTION_LIBS)
9091     AC_SUBST(INTROSPECTION_MAKEFILE)
9092
9093     AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes")
9094 ])
9095
9096
9097 dnl Usage:
9098 dnl   GOBJECT_INTROSPECTION_CHECK([minimum-g-i-version])
9099
9100 AC_DEFUN([GOBJECT_INTROSPECTION_CHECK],
9101 [
9102   _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1])
9103 ])
9104
9105 dnl Usage:
9106 dnl   GOBJECT_INTROSPECTION_REQUIRE([minimum-g-i-version])
9107
9108
9109 AC_DEFUN([GOBJECT_INTROSPECTION_REQUIRE],
9110 [
9111   _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1], [require])
9112 ])
9113
9114 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
9115
9116 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
9117 #
9118 # This program is free software; you can redistribute it and/or modify
9119 # it under the terms of the GNU General Public License as published by
9120 # the Free Software Foundation; either version 2 of the License, or
9121 # (at your option) any later version.
9122 #
9123 # This program is distributed in the hope that it will be useful, but
9124 # WITHOUT ANY WARRANTY; without even the implied warranty of
9125 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
9126 # General Public License for more details.
9127 #
9128 # You should have received a copy of the GNU General Public License
9129 # along with this program; if not, write to the Free Software
9130 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
9131 #
9132 # As a special exception to the GNU General Public License, if you
9133 # distribute this file as part of a program that contains a
9134 # configuration script generated by Autoconf, you may include it under
9135 # the same distribution terms that you use for the rest of that program.
9136
9137 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
9138 # ----------------------------------
9139 AC_DEFUN([PKG_PROG_PKG_CONFIG],
9140 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
9141 m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
9142 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
9143 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9144         AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
9145 fi
9146 if test -n "$PKG_CONFIG"; then
9147         _pkg_min_version=m4_default([$1], [0.9.0])
9148         AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
9149         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9150                 AC_MSG_RESULT([yes])
9151         else
9152                 AC_MSG_RESULT([no])
9153                 PKG_CONFIG=""
9154         fi
9155                 
9156 fi[]dnl
9157 ])# PKG_PROG_PKG_CONFIG
9158
9159 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
9160 #
9161 # Check to see whether a particular set of modules exists.  Similar
9162 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
9163 #
9164 #
9165 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
9166 # this or PKG_CHECK_MODULES is called, or make sure to call
9167 # PKG_CHECK_EXISTS manually
9168 # --------------------------------------------------------------
9169 AC_DEFUN([PKG_CHECK_EXISTS],
9170 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9171 if test -n "$PKG_CONFIG" && \
9172     AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
9173   m4_ifval([$2], [$2], [:])
9174 m4_ifvaln([$3], [else
9175   $3])dnl
9176 fi])
9177
9178
9179 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
9180 # ---------------------------------------------
9181 m4_define([_PKG_CONFIG],
9182 [if test -n "$$1"; then
9183     pkg_cv_[]$1="$$1"
9184  elif test -n "$PKG_CONFIG"; then
9185     PKG_CHECK_EXISTS([$3],
9186                      [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
9187                      [pkg_failed=yes])
9188  else
9189     pkg_failed=untried
9190 fi[]dnl
9191 ])# _PKG_CONFIG
9192
9193 # _PKG_SHORT_ERRORS_SUPPORTED
9194 # -----------------------------
9195 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
9196 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9197 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9198         _pkg_short_errors_supported=yes
9199 else
9200         _pkg_short_errors_supported=no
9201 fi[]dnl
9202 ])# _PKG_SHORT_ERRORS_SUPPORTED
9203
9204
9205 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
9206 # [ACTION-IF-NOT-FOUND])
9207 #
9208 #
9209 # Note that if there is a possibility the first call to
9210 # PKG_CHECK_MODULES might not happen, you should be sure to include an
9211 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
9212 #
9213 #
9214 # --------------------------------------------------------------
9215 AC_DEFUN([PKG_CHECK_MODULES],
9216 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9217 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
9218 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
9219
9220 pkg_failed=no
9221 AC_MSG_CHECKING([for $1])
9222
9223 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
9224 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
9225
9226 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
9227 and $1[]_LIBS to avoid the need to call pkg-config.
9228 See the pkg-config man page for more details.])
9229
9230 if test $pkg_failed = yes; then
9231         _PKG_SHORT_ERRORS_SUPPORTED
9232         if test $_pkg_short_errors_supported = yes; then
9233                 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
9234         else 
9235                 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
9236         fi
9237         # Put the nasty error message in config.log where it belongs
9238         echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
9239
9240         ifelse([$4], , [AC_MSG_ERROR(dnl
9241 [Package requirements ($2) were not met:
9242
9243 $$1_PKG_ERRORS
9244
9245 Consider adjusting the PKG_CONFIG_PATH environment variable if you
9246 installed software in a non-standard prefix.
9247
9248 _PKG_TEXT
9249 ])],
9250                 [AC_MSG_RESULT([no])
9251                 $4])
9252 elif test $pkg_failed = untried; then
9253         ifelse([$4], , [AC_MSG_FAILURE(dnl
9254 [The pkg-config script could not be found or is too old.  Make sure it
9255 is in your PATH or set the PKG_CONFIG environment variable to the full
9256 path to pkg-config.
9257
9258 _PKG_TEXT
9259
9260 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
9261                 [$4])
9262 else
9263         $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
9264         $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
9265         AC_MSG_RESULT([yes])
9266         ifelse([$3], , :, [$3])
9267 fi[]dnl
9268 ])# PKG_CHECK_MODULES
9269