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