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