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