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