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