source: trunk/third/libIDL/aclocal.m4 @ 21474

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