1# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
2
3# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4# 2005, 2006, 2007, 2008, 2009  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_ifndef([AC_AUTOCONF_VERSION],
15  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
17[m4_warning([this file was generated for autoconf 2.68.
18You have another version of autoconf.  It may work, but is not guaranteed to.
19If you have problems, you may need to regenerate the build system entirely.
20To do so, use the procedure documented by the package, typically `autoreconf'.])])
21
22# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
23#
24# This file is free software; the Free Software Foundation
25# gives unlimited permission to copy and/or distribute it,
26# with or without modifications, as long as this notice is preserved.
27
28# AM_AUTOMAKE_VERSION(VERSION)
29# ----------------------------
30# Automake X.Y traces this macro to ensure aclocal.m4 has been
31# generated from the m4 files accompanying Automake X.Y.
32# (This private macro should not be called outside this file.)
33AC_DEFUN([AM_AUTOMAKE_VERSION],
34[am__api_version='1.11'
35dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
36dnl require some minimum version.  Point them to the right macro.
37m4_if([$1], [1.11.1], [],
38      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
39])
40
41# _AM_AUTOCONF_VERSION(VERSION)
42# -----------------------------
43# aclocal traces this macro to find the Autoconf version.
44# This is a private macro too.  Using m4_define simplifies
45# the logic in aclocal, which can simply ignore this definition.
46m4_define([_AM_AUTOCONF_VERSION], [])
47
48# AM_SET_CURRENT_AUTOMAKE_VERSION
49# -------------------------------
50# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
51# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
52AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
53[AM_AUTOMAKE_VERSION([1.11.1])dnl
54m4_ifndef([AC_AUTOCONF_VERSION],
55  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
56_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
57
58# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
59
60# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
61#
62# This file is free software; the Free Software Foundation
63# gives unlimited permission to copy and/or distribute it,
64# with or without modifications, as long as this notice is preserved.
65
66# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
67# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
68# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
69#
70# Of course, Automake must honor this variable whenever it calls a
71# tool from the auxiliary directory.  The problem is that $srcdir (and
72# therefore $ac_aux_dir as well) can be either absolute or relative,
73# depending on how configure is run.  This is pretty annoying, since
74# it makes $ac_aux_dir quite unusable in subdirectories: in the top
75# source directory, any form will work fine, but in subdirectories a
76# relative path needs to be adjusted first.
77#
78# $ac_aux_dir/missing
79#    fails when called from a subdirectory if $ac_aux_dir is relative
80# $top_srcdir/$ac_aux_dir/missing
81#    fails if $ac_aux_dir is absolute,
82#    fails when called from a subdirectory in a VPATH build with
83#          a relative $ac_aux_dir
84#
85# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
86# are both prefixed by $srcdir.  In an in-source build this is usually
87# harmless because $srcdir is `.', but things will broke when you
88# start a VPATH build or use an absolute $srcdir.
89#
90# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
91# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
92#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
93# and then we would define $MISSING as
94#   MISSING="\${SHELL} $am_aux_dir/missing"
95# This will work as long as MISSING is not called from configure, because
96# unfortunately $(top_srcdir) has no meaning in configure.
97# However there are other variables, like CC, which are often used in
98# configure, and could therefore not use this "fixed" $ac_aux_dir.
99#
100# Another solution, used here, is to always expand $ac_aux_dir to an
101# absolute PATH.  The drawback is that using absolute paths prevent a
102# configured tree to be moved without reconfiguration.
103
104AC_DEFUN([AM_AUX_DIR_EXPAND],
105[dnl Rely on autoconf to set up CDPATH properly.
106AC_PREREQ([2.50])dnl
107# expand $ac_aux_dir to an absolute path
108am_aux_dir=`cd $ac_aux_dir && pwd`
109])
110
111# AM_CONDITIONAL                                            -*- Autoconf -*-
112
113# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
114# Free Software Foundation, Inc.
115#
116# This file is free software; the Free Software Foundation
117# gives unlimited permission to copy and/or distribute it,
118# with or without modifications, as long as this notice is preserved.
119
120# serial 9
121
122# AM_CONDITIONAL(NAME, SHELL-CONDITION)
123# -------------------------------------
124# Define a conditional.
125AC_DEFUN([AM_CONDITIONAL],
126[AC_PREREQ(2.52)dnl
127 ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
128	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
129AC_SUBST([$1_TRUE])dnl
130AC_SUBST([$1_FALSE])dnl
131_AM_SUBST_NOTMAKE([$1_TRUE])dnl
132_AM_SUBST_NOTMAKE([$1_FALSE])dnl
133m4_define([_AM_COND_VALUE_$1], [$2])dnl
134if $2; then
135  $1_TRUE=
136  $1_FALSE='#'
137else
138  $1_TRUE='#'
139  $1_FALSE=
140fi
141AC_CONFIG_COMMANDS_PRE(
142[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
143  AC_MSG_ERROR([[conditional "$1" was never defined.
144Usually this means the macro was only invoked conditionally.]])
145fi])])
146
147# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
148# Free Software Foundation, Inc.
149#
150# This file is free software; the Free Software Foundation
151# gives unlimited permission to copy and/or distribute it,
152# with or without modifications, as long as this notice is preserved.
153
154# serial 10
155
156# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
157# written in clear, in which case automake, when reading aclocal.m4,
158# will think it sees a *use*, and therefore will trigger all it's
159# C support machinery.  Also note that it means that autoscan, seeing
160# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
161
162
163# _AM_DEPENDENCIES(NAME)
164# ----------------------
165# See how the compiler implements dependency checking.
166# NAME is "CC", "CXX", "GCJ", or "OBJC".
167# We try a few techniques and use that to set a single cache variable.
168#
169# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
170# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
171# dependency, and given that the user is not expected to run this macro,
172# just rely on AC_PROG_CC.
173AC_DEFUN([_AM_DEPENDENCIES],
174[AC_REQUIRE([AM_SET_DEPDIR])dnl
175AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
176AC_REQUIRE([AM_MAKE_INCLUDE])dnl
177AC_REQUIRE([AM_DEP_TRACK])dnl
178
179ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
180       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
181       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
182       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
183       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
184                   [depcc="$$1"   am_compiler_list=])
185
186AC_CACHE_CHECK([dependency style of $depcc],
187               [am_cv_$1_dependencies_compiler_type],
188[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
189  # We make a subdir and do the tests there.  Otherwise we can end up
190  # making bogus files that we don't know about and never remove.  For
191  # instance it was reported that on HP-UX the gcc test will end up
192  # making a dummy file named `D' -- because `-MD' means `put the output
193  # in D'.
194  mkdir conftest.dir
195  # Copy depcomp to subdir because otherwise we won't find it if we're
196  # using a relative directory.
197  cp "$am_depcomp" conftest.dir
198  cd conftest.dir
199  # We will build objects and dependencies in a subdirectory because
200  # it helps to detect inapplicable dependency modes.  For instance
201  # both Tru64's cc and ICC support -MD to output dependencies as a
202  # side effect of compilation, but ICC will put the dependencies in
203  # the current directory while Tru64 will put them in the object
204  # directory.
205  mkdir sub
206
207  am_cv_$1_dependencies_compiler_type=none
208  if test "$am_compiler_list" = ""; then
209     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
210  fi
211  am__universal=false
212  m4_case([$1], [CC],
213    [case " $depcc " in #(
214     *\ -arch\ *\ -arch\ *) am__universal=true ;;
215     esac],
216    [CXX],
217    [case " $depcc " in #(
218     *\ -arch\ *\ -arch\ *) am__universal=true ;;
219     esac])
220
221  for depmode in $am_compiler_list; do
222    # Setup a source with many dependencies, because some compilers
223    # like to wrap large dependency lists on column 80 (with \), and
224    # we should not choose a depcomp mode which is confused by this.
225    #
226    # We need to recreate these files for each test, as the compiler may
227    # overwrite some of them when testing with obscure command lines.
228    # This happens at least with the AIX C compiler.
229    : > sub/conftest.c
230    for i in 1 2 3 4 5 6; do
231      echo '#include "conftst'$i'.h"' >> sub/conftest.c
232      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
233      # Solaris 8's {/usr,}/bin/sh.
234      touch sub/conftst$i.h
235    done
236    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
237
238    # We check with `-c' and `-o' for the sake of the "dashmstdout"
239    # mode.  It turns out that the SunPro C++ compiler does not properly
240    # handle `-M -o', and we need to detect this.  Also, some Intel
241    # versions had trouble with output in subdirs
242    am__obj=sub/conftest.${OBJEXT-o}
243    am__minus_obj="-o $am__obj"
244    case $depmode in
245    gcc)
246      # This depmode causes a compiler race in universal mode.
247      test "$am__universal" = false || continue
248      ;;
249    nosideeffect)
250      # after this tag, mechanisms are not by side-effect, so they'll
251      # only be used when explicitly requested
252      if test "x$enable_dependency_tracking" = xyes; then
253	continue
254      else
255	break
256      fi
257      ;;
258    msvisualcpp | msvcmsys)
259      # This compiler won't grok `-c -o', but also, the minuso test has
260      # not run yet.  These depmodes are late enough in the game, and
261      # so weak that their functioning should not be impacted.
262      am__obj=conftest.${OBJEXT-o}
263      am__minus_obj=
264      ;;
265    none) break ;;
266    esac
267    if depmode=$depmode \
268       source=sub/conftest.c object=$am__obj \
269       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
270       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
271         >/dev/null 2>conftest.err &&
272       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
273       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
274       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
275       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
276      # icc doesn't choke on unknown options, it will just issue warnings
277      # or remarks (even with -Werror).  So we grep stderr for any message
278      # that says an option was ignored or not supported.
279      # When given -MP, icc 7.0 and 7.1 complain thusly:
280      #   icc: Command line warning: ignoring option '-M'; no argument required
281      # The diagnosis changed in icc 8.0:
282      #   icc: Command line remark: option '-MP' not supported
283      if (grep 'ignoring option' conftest.err ||
284          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
285        am_cv_$1_dependencies_compiler_type=$depmode
286        break
287      fi
288    fi
289  done
290
291  cd ..
292  rm -rf conftest.dir
293else
294  am_cv_$1_dependencies_compiler_type=none
295fi
296])
297AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
298AM_CONDITIONAL([am__fastdep$1], [
299  test "x$enable_dependency_tracking" != xno \
300  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
301])
302
303
304# AM_SET_DEPDIR
305# -------------
306# Choose a directory name for dependency files.
307# This macro is AC_REQUIREd in _AM_DEPENDENCIES
308AC_DEFUN([AM_SET_DEPDIR],
309[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
310AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
311])
312
313
314# AM_DEP_TRACK
315# ------------
316AC_DEFUN([AM_DEP_TRACK],
317[AC_ARG_ENABLE(dependency-tracking,
318[  --disable-dependency-tracking  speeds up one-time build
319  --enable-dependency-tracking   do not reject slow dependency extractors])
320if test "x$enable_dependency_tracking" != xno; then
321  am_depcomp="$ac_aux_dir/depcomp"
322  AMDEPBACKSLASH='\'
323fi
324AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
325AC_SUBST([AMDEPBACKSLASH])dnl
326_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
327])
328
329# Generate code to set up dependency tracking.              -*- Autoconf -*-
330
331# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
332# Free Software Foundation, Inc.
333#
334# This file is free software; the Free Software Foundation
335# gives unlimited permission to copy and/or distribute it,
336# with or without modifications, as long as this notice is preserved.
337
338#serial 5
339
340# _AM_OUTPUT_DEPENDENCY_COMMANDS
341# ------------------------------
342AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
343[{
344  # Autoconf 2.62 quotes --file arguments for eval, but not when files
345  # are listed without --file.  Let's play safe and only enable the eval
346  # if we detect the quoting.
347  case $CONFIG_FILES in
348  *\'*) eval set x "$CONFIG_FILES" ;;
349  *)   set x $CONFIG_FILES ;;
350  esac
351  shift
352  for mf
353  do
354    # Strip MF so we end up with the name of the file.
355    mf=`echo "$mf" | sed -e 's/:.*$//'`
356    # Check whether this is an Automake generated Makefile or not.
357    # We used to match only the files named `Makefile.in', but
358    # some people rename them; so instead we look at the file content.
359    # Grep'ing the first line is not enough: some people post-process
360    # each Makefile.in and add a new line on top of each file to say so.
361    # Grep'ing the whole file is not good either: AIX grep has a line
362    # limit of 2048, but all sed's we know have understand at least 4000.
363    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
364      dirpart=`AS_DIRNAME("$mf")`
365    else
366      continue
367    fi
368    # Extract the definition of DEPDIR, am__include, and am__quote
369    # from the Makefile without running `make'.
370    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
371    test -z "$DEPDIR" && continue
372    am__include=`sed -n 's/^am__include = //p' < "$mf"`
373    test -z "am__include" && continue
374    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
375    # When using ansi2knr, U may be empty or an underscore; expand it
376    U=`sed -n 's/^U = //p' < "$mf"`
377    # Find all dependency output files, they are included files with
378    # $(DEPDIR) in their names.  We invoke sed twice because it is the
379    # simplest approach to changing $(DEPDIR) to its actual value in the
380    # expansion.
381    for file in `sed -n "
382      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
383	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
384      # Make sure the directory exists.
385      test -f "$dirpart/$file" && continue
386      fdir=`AS_DIRNAME(["$file"])`
387      AS_MKDIR_P([$dirpart/$fdir])
388      # echo "creating $dirpart/$file"
389      echo '# dummy' > "$dirpart/$file"
390    done
391  done
392}
393])# _AM_OUTPUT_DEPENDENCY_COMMANDS
394
395
396# AM_OUTPUT_DEPENDENCY_COMMANDS
397# -----------------------------
398# This macro should only be invoked once -- use via AC_REQUIRE.
399#
400# This code is only required when automatic dependency tracking
401# is enabled.  FIXME.  This creates each `.P' file that we will
402# need in order to bootstrap the dependency handling code.
403AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
404[AC_CONFIG_COMMANDS([depfiles],
405     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
406     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
407])
408
409# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
410# Free Software Foundation, Inc.
411#
412# This file is free software; the Free Software Foundation
413# gives unlimited permission to copy and/or distribute it,
414# with or without modifications, as long as this notice is preserved.
415
416# serial 8
417
418# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
419AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
420
421# Do all the work for Automake.                             -*- Autoconf -*-
422
423# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
424# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
425#
426# This file is free software; the Free Software Foundation
427# gives unlimited permission to copy and/or distribute it,
428# with or without modifications, as long as this notice is preserved.
429
430# serial 16
431
432# This macro actually does too much.  Some checks are only needed if
433# your package does certain things.  But this isn't really a big deal.
434
435# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
436# AM_INIT_AUTOMAKE([OPTIONS])
437# -----------------------------------------------
438# The call with PACKAGE and VERSION arguments is the old style
439# call (pre autoconf-2.50), which is being phased out.  PACKAGE
440# and VERSION should now be passed to AC_INIT and removed from
441# the call to AM_INIT_AUTOMAKE.
442# We support both call styles for the transition.  After
443# the next Automake release, Autoconf can make the AC_INIT
444# arguments mandatory, and then we can depend on a new Autoconf
445# release and drop the old call support.
446AC_DEFUN([AM_INIT_AUTOMAKE],
447[AC_PREREQ([2.62])dnl
448dnl Autoconf wants to disallow AM_ names.  We explicitly allow
449dnl the ones we care about.
450m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
451AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
452AC_REQUIRE([AC_PROG_INSTALL])dnl
453if test "`cd $srcdir && pwd`" != "`pwd`"; then
454  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
455  # is not polluted with repeated "-I."
456  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
457  # test to see if srcdir already configured
458  if test -f $srcdir/config.status; then
459    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
460  fi
461fi
462
463# test whether we have cygpath
464if test -z "$CYGPATH_W"; then
465  if (cygpath --version) >/dev/null 2>/dev/null; then
466    CYGPATH_W='cygpath -w'
467  else
468    CYGPATH_W=echo
469  fi
470fi
471AC_SUBST([CYGPATH_W])
472
473# Define the identity of the package.
474dnl Distinguish between old-style and new-style calls.
475m4_ifval([$2],
476[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
477 AC_SUBST([PACKAGE], [$1])dnl
478 AC_SUBST([VERSION], [$2])],
479[_AM_SET_OPTIONS([$1])dnl
480dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
481m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
482  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
483 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
484 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
485
486_AM_IF_OPTION([no-define],,
487[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
488 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
489
490# Some tools Automake needs.
491AC_REQUIRE([AM_SANITY_CHECK])dnl
492AC_REQUIRE([AC_ARG_PROGRAM])dnl
493AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
494AM_MISSING_PROG(AUTOCONF, autoconf)
495AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
496AM_MISSING_PROG(AUTOHEADER, autoheader)
497AM_MISSING_PROG(MAKEINFO, makeinfo)
498AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
499AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
500AC_REQUIRE([AM_PROG_MKDIR_P])dnl
501# We need awk for the "check" target.  The system "awk" is bad on
502# some platforms.
503AC_REQUIRE([AC_PROG_AWK])dnl
504AC_REQUIRE([AC_PROG_MAKE_SET])dnl
505AC_REQUIRE([AM_SET_LEADING_DOT])dnl
506_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
507	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
508			     [_AM_PROG_TAR([v7])])])
509_AM_IF_OPTION([no-dependencies],,
510[AC_PROVIDE_IFELSE([AC_PROG_CC],
511		  [_AM_DEPENDENCIES(CC)],
512		  [define([AC_PROG_CC],
513			  defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
514AC_PROVIDE_IFELSE([AC_PROG_CXX],
515		  [_AM_DEPENDENCIES(CXX)],
516		  [define([AC_PROG_CXX],
517			  defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
518AC_PROVIDE_IFELSE([AC_PROG_OBJC],
519		  [_AM_DEPENDENCIES(OBJC)],
520		  [define([AC_PROG_OBJC],
521			  defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
522])
523_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
524dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
525dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
526dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
527AC_CONFIG_COMMANDS_PRE(dnl
528[m4_provide_if([_AM_COMPILER_EXEEXT],
529  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
530])
531
532dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
533dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
534dnl mangled by Autoconf and run in a shell conditional statement.
535m4_define([_AC_COMPILER_EXEEXT],
536m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
537
538
539# When config.status generates a header, we must update the stamp-h file.
540# This file resides in the same directory as the config header
541# that is generated.  The stamp files are numbered to have different names.
542
543# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
544# loop where config.status creates the headers, so we can generate
545# our stamp files there.
546AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
547[# Compute $1's index in $config_headers.
548_am_arg=$1
549_am_stamp_count=1
550for _am_header in $config_headers :; do
551  case $_am_header in
552    $_am_arg | $_am_arg:* )
553      break ;;
554    * )
555      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
556  esac
557done
558echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
559
560# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
561#
562# This file is free software; the Free Software Foundation
563# gives unlimited permission to copy and/or distribute it,
564# with or without modifications, as long as this notice is preserved.
565
566# AM_PROG_INSTALL_SH
567# ------------------
568# Define $install_sh.
569AC_DEFUN([AM_PROG_INSTALL_SH],
570[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
571if test x"${install_sh}" != xset; then
572  case $am_aux_dir in
573  *\ * | *\	*)
574    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
575  *)
576    install_sh="\${SHELL} $am_aux_dir/install-sh"
577  esac
578fi
579AC_SUBST(install_sh)])
580
581# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
582#
583# This file is free software; the Free Software Foundation
584# gives unlimited permission to copy and/or distribute it,
585# with or without modifications, as long as this notice is preserved.
586
587# serial 2
588
589# Check whether the underlying file-system supports filenames
590# with a leading dot.  For instance MS-DOS doesn't.
591AC_DEFUN([AM_SET_LEADING_DOT],
592[rm -rf .tst 2>/dev/null
593mkdir .tst 2>/dev/null
594if test -d .tst; then
595  am__leading_dot=.
596else
597  am__leading_dot=_
598fi
599rmdir .tst 2>/dev/null
600AC_SUBST([am__leading_dot])])
601
602# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
603# From Jim Meyering
604
605# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
606# Free Software Foundation, Inc.
607#
608# This file is free software; the Free Software Foundation
609# gives unlimited permission to copy and/or distribute it,
610# with or without modifications, as long as this notice is preserved.
611
612# serial 5
613
614# AM_MAINTAINER_MODE([DEFAULT-MODE])
615# ----------------------------------
616# Control maintainer-specific portions of Makefiles.
617# Default is to disable them, unless `enable' is passed literally.
618# For symmetry, `disable' may be passed as well.  Anyway, the user
619# can override the default with the --enable/--disable switch.
620AC_DEFUN([AM_MAINTAINER_MODE],
621[m4_case(m4_default([$1], [disable]),
622       [enable], [m4_define([am_maintainer_other], [disable])],
623       [disable], [m4_define([am_maintainer_other], [enable])],
624       [m4_define([am_maintainer_other], [enable])
625        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
626AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
627  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
628  AC_ARG_ENABLE([maintainer-mode],
629[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
630			  (and sometimes confusing) to the casual installer],
631      [USE_MAINTAINER_MODE=$enableval],
632      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
633  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
634  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
635  MAINT=$MAINTAINER_MODE_TRUE
636  AC_SUBST([MAINT])dnl
637]
638)
639
640AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
641
642# Check to see how 'make' treats includes.	            -*- Autoconf -*-
643
644# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
645#
646# This file is free software; the Free Software Foundation
647# gives unlimited permission to copy and/or distribute it,
648# with or without modifications, as long as this notice is preserved.
649
650# serial 4
651
652# AM_MAKE_INCLUDE()
653# -----------------
654# Check to see how make treats includes.
655AC_DEFUN([AM_MAKE_INCLUDE],
656[am_make=${MAKE-make}
657cat > confinc << 'END'
658am__doit:
659	@echo this is the am__doit target
660.PHONY: am__doit
661END
662# If we don't find an include directive, just comment out the code.
663AC_MSG_CHECKING([for style of include used by $am_make])
664am__include="#"
665am__quote=
666_am_result=none
667# First try GNU make style include.
668echo "include confinc" > confmf
669# Ignore all kinds of additional output from `make'.
670case `$am_make -s -f confmf 2> /dev/null` in #(
671*the\ am__doit\ target*)
672  am__include=include
673  am__quote=
674  _am_result=GNU
675  ;;
676esac
677# Now try BSD make style include.
678if test "$am__include" = "#"; then
679   echo '.include "confinc"' > confmf
680   case `$am_make -s -f confmf 2> /dev/null` in #(
681   *the\ am__doit\ target*)
682     am__include=.include
683     am__quote="\""
684     _am_result=BSD
685     ;;
686   esac
687fi
688AC_SUBST([am__include])
689AC_SUBST([am__quote])
690AC_MSG_RESULT([$_am_result])
691rm -f confinc confmf
692])
693
694# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
695
696# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
697# Free Software Foundation, Inc.
698#
699# This file is free software; the Free Software Foundation
700# gives unlimited permission to copy and/or distribute it,
701# with or without modifications, as long as this notice is preserved.
702
703# serial 6
704
705# AM_MISSING_PROG(NAME, PROGRAM)
706# ------------------------------
707AC_DEFUN([AM_MISSING_PROG],
708[AC_REQUIRE([AM_MISSING_HAS_RUN])
709$1=${$1-"${am_missing_run}$2"}
710AC_SUBST($1)])
711
712
713# AM_MISSING_HAS_RUN
714# ------------------
715# Define MISSING if not defined so far and test if it supports --run.
716# If it does, set am_missing_run to use it, otherwise, to nothing.
717AC_DEFUN([AM_MISSING_HAS_RUN],
718[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
719AC_REQUIRE_AUX_FILE([missing])dnl
720if test x"${MISSING+set}" != xset; then
721  case $am_aux_dir in
722  *\ * | *\	*)
723    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
724  *)
725    MISSING="\${SHELL} $am_aux_dir/missing" ;;
726  esac
727fi
728# Use eval to expand $SHELL
729if eval "$MISSING --run true"; then
730  am_missing_run="$MISSING --run "
731else
732  am_missing_run=
733  AC_MSG_WARN([`missing' script is too old or missing])
734fi
735])
736
737# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
738#
739# This file is free software; the Free Software Foundation
740# gives unlimited permission to copy and/or distribute it,
741# with or without modifications, as long as this notice is preserved.
742
743# AM_PROG_MKDIR_P
744# ---------------
745# Check for `mkdir -p'.
746AC_DEFUN([AM_PROG_MKDIR_P],
747[AC_PREREQ([2.60])dnl
748AC_REQUIRE([AC_PROG_MKDIR_P])dnl
749dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
750dnl while keeping a definition of mkdir_p for backward compatibility.
751dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
752dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
753dnl Makefile.ins that do not define MKDIR_P, so we do our own
754dnl adjustment using top_builddir (which is defined more often than
755dnl MKDIR_P).
756AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
757case $mkdir_p in
758  [[\\/$]]* | ?:[[\\/]]*) ;;
759  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
760esac
761])
762
763# Helper functions for option handling.                     -*- Autoconf -*-
764
765# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
766#
767# This file is free software; the Free Software Foundation
768# gives unlimited permission to copy and/or distribute it,
769# with or without modifications, as long as this notice is preserved.
770
771# serial 4
772
773# _AM_MANGLE_OPTION(NAME)
774# -----------------------
775AC_DEFUN([_AM_MANGLE_OPTION],
776[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
777
778# _AM_SET_OPTION(NAME)
779# ------------------------------
780# Set option NAME.  Presently that only means defining a flag for this option.
781AC_DEFUN([_AM_SET_OPTION],
782[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
783
784# _AM_SET_OPTIONS(OPTIONS)
785# ----------------------------------
786# OPTIONS is a space-separated list of Automake options.
787AC_DEFUN([_AM_SET_OPTIONS],
788[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
789
790# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
791# -------------------------------------------
792# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
793AC_DEFUN([_AM_IF_OPTION],
794[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
795
796# Check to make sure that the build environment is sane.    -*- Autoconf -*-
797
798# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
799# Free Software Foundation, Inc.
800#
801# This file is free software; the Free Software Foundation
802# gives unlimited permission to copy and/or distribute it,
803# with or without modifications, as long as this notice is preserved.
804
805# serial 5
806
807# AM_SANITY_CHECK
808# ---------------
809AC_DEFUN([AM_SANITY_CHECK],
810[AC_MSG_CHECKING([whether build environment is sane])
811# Just in case
812sleep 1
813echo timestamp > conftest.file
814# Reject unsafe characters in $srcdir or the absolute working directory
815# name.  Accept space and tab only in the latter.
816am_lf='
817'
818case `pwd` in
819  *[[\\\"\#\$\&\'\`$am_lf]]*)
820    AC_MSG_ERROR([unsafe absolute working directory name]);;
821esac
822case $srcdir in
823  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
824    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
825esac
826
827# Do `set' in a subshell so we don't clobber the current shell's
828# arguments.  Must try -L first in case configure is actually a
829# symlink; some systems play weird games with the mod time of symlinks
830# (eg FreeBSD returns the mod time of the symlink's containing
831# directory).
832if (
833   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
834   if test "$[*]" = "X"; then
835      # -L didn't work.
836      set X `ls -t "$srcdir/configure" conftest.file`
837   fi
838   rm -f conftest.file
839   if test "$[*]" != "X $srcdir/configure conftest.file" \
840      && test "$[*]" != "X conftest.file $srcdir/configure"; then
841
842      # If neither matched, then we have a broken ls.  This can happen
843      # if, for instance, CONFIG_SHELL is bash and it inherits a
844      # broken ls alias from the environment.  This has actually
845      # happened.  Such a system could not be considered "sane".
846      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
847alias in your environment])
848   fi
849
850   test "$[2]" = conftest.file
851   )
852then
853   # Ok.
854   :
855else
856   AC_MSG_ERROR([newly created file is older than distributed files!
857Check your system clock])
858fi
859AC_MSG_RESULT(yes)])
860
861# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
862#
863# This file is free software; the Free Software Foundation
864# gives unlimited permission to copy and/or distribute it,
865# with or without modifications, as long as this notice is preserved.
866
867# AM_PROG_INSTALL_STRIP
868# ---------------------
869# One issue with vendor `install' (even GNU) is that you can't
870# specify the program used to strip binaries.  This is especially
871# annoying in cross-compiling environments, where the build's strip
872# is unlikely to handle the host's binaries.
873# Fortunately install-sh will honor a STRIPPROG variable, so we
874# always use install-sh in `make install-strip', and initialize
875# STRIPPROG with the value of the STRIP variable (set by the user).
876AC_DEFUN([AM_PROG_INSTALL_STRIP],
877[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
878# Installed binaries are usually stripped using `strip' when the user
879# run `make install-strip'.  However `strip' might not be the right
880# tool to use in cross-compilation environments, therefore Automake
881# will honor the `STRIP' environment variable to overrule this program.
882dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
883if test "$cross_compiling" != no; then
884  AC_CHECK_TOOL([STRIP], [strip], :)
885fi
886INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
887AC_SUBST([INSTALL_STRIP_PROGRAM])])
888
889# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
890#
891# This file is free software; the Free Software Foundation
892# gives unlimited permission to copy and/or distribute it,
893# with or without modifications, as long as this notice is preserved.
894
895# serial 2
896
897# _AM_SUBST_NOTMAKE(VARIABLE)
898# ---------------------------
899# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
900# This macro is traced by Automake.
901AC_DEFUN([_AM_SUBST_NOTMAKE])
902
903# AM_SUBST_NOTMAKE(VARIABLE)
904# ---------------------------
905# Public sister of _AM_SUBST_NOTMAKE.
906AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
907
908# Check how to create a tarball.                            -*- Autoconf -*-
909
910# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
911#
912# This file is free software; the Free Software Foundation
913# gives unlimited permission to copy and/or distribute it,
914# with or without modifications, as long as this notice is preserved.
915
916# serial 2
917
918# _AM_PROG_TAR(FORMAT)
919# --------------------
920# Check how to create a tarball in format FORMAT.
921# FORMAT should be one of `v7', `ustar', or `pax'.
922#
923# Substitute a variable $(am__tar) that is a command
924# writing to stdout a FORMAT-tarball containing the directory
925# $tardir.
926#     tardir=directory && $(am__tar) > result.tar
927#
928# Substitute a variable $(am__untar) that extract such
929# a tarball read from stdin.
930#     $(am__untar) < result.tar
931AC_DEFUN([_AM_PROG_TAR],
932[# Always define AMTAR for backward compatibility.
933AM_MISSING_PROG([AMTAR], [tar])
934m4_if([$1], [v7],
935     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
936     [m4_case([$1], [ustar],, [pax],,
937              [m4_fatal([Unknown tar format])])
938AC_MSG_CHECKING([how to create a $1 tar archive])
939# Loop over all known methods to create a tar archive until one works.
940_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
941_am_tools=${am_cv_prog_tar_$1-$_am_tools}
942# Do not fold the above two line into one, because Tru64 sh and
943# Solaris sh will not grok spaces in the rhs of `-'.
944for _am_tool in $_am_tools
945do
946  case $_am_tool in
947  gnutar)
948    for _am_tar in tar gnutar gtar;
949    do
950      AM_RUN_LOG([$_am_tar --version]) && break
951    done
952    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
953    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
954    am__untar="$_am_tar -xf -"
955    ;;
956  plaintar)
957    # Must skip GNU tar: if it does not support --format= it doesn't create
958    # ustar tarball either.
959    (tar --version) >/dev/null 2>&1 && continue
960    am__tar='tar chf - "$$tardir"'
961    am__tar_='tar chf - "$tardir"'
962    am__untar='tar xf -'
963    ;;
964  pax)
965    am__tar='pax -L -x $1 -w "$$tardir"'
966    am__tar_='pax -L -x $1 -w "$tardir"'
967    am__untar='pax -r'
968    ;;
969  cpio)
970    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
971    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
972    am__untar='cpio -i -H $1 -d'
973    ;;
974  none)
975    am__tar=false
976    am__tar_=false
977    am__untar=false
978    ;;
979  esac
980
981  # If the value was cached, stop now.  We just wanted to have am__tar
982  # and am__untar set.
983  test -n "${am_cv_prog_tar_$1}" && break
984
985  # tar/untar a dummy directory, and stop if the command works
986  rm -rf conftest.dir
987  mkdir conftest.dir
988  echo GrepMe > conftest.dir/file
989  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
990  rm -rf conftest.dir
991  if test -s conftest.tar; then
992    AM_RUN_LOG([$am__untar <conftest.tar])
993    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
994  fi
995done
996rm -rf conftest.dir
997
998AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
999AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1000AC_SUBST([am__tar])
1001AC_SUBST([am__untar])
1002]) # _AM_PROG_TAR
1003
1004# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1005#
1006#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1007#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
1008#                 Inc.
1009#   Written by Gordon Matzigkeit, 1996
1010#
1011# This file is free software; the Free Software Foundation gives
1012# unlimited permission to copy and/or distribute it, with or without
1013# modifications, as long as this notice is preserved.
1014
1015m4_define([_LT_COPYING], [dnl
1016#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1017#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
1018#                 Inc.
1019#   Written by Gordon Matzigkeit, 1996
1020#
1021#   This file is part of GNU Libtool.
1022#
1023# GNU Libtool is free software; you can redistribute it and/or
1024# modify it under the terms of the GNU General Public License as
1025# published by the Free Software Foundation; either version 2 of
1026# the License, or (at your option) any later version.
1027#
1028# As a special exception to the GNU General Public License,
1029# if you distribute this file as part of a program or library that
1030# is built using GNU Libtool, you may include this file under the
1031# same distribution terms that you use for the rest of that program.
1032#
1033# GNU Libtool is distributed in the hope that it will be useful,
1034# but WITHOUT ANY WARRANTY; without even the implied warranty of
1035# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1036# GNU General Public License for more details.
1037#
1038# You should have received a copy of the GNU General Public License
1039# along with GNU Libtool; see the file COPYING.  If not, a copy
1040# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
1041# obtained by writing to the Free Software Foundation, Inc.,
1042# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1043])
1044
1045# serial 57 LT_INIT
1046
1047
1048# LT_PREREQ(VERSION)
1049# ------------------
1050# Complain and exit if this libtool version is less that VERSION.
1051m4_defun([LT_PREREQ],
1052[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
1053       [m4_default([$3],
1054		   [m4_fatal([Libtool version $1 or higher is required],
1055		             63)])],
1056       [$2])])
1057
1058
1059# _LT_CHECK_BUILDDIR
1060# ------------------
1061# Complain if the absolute build directory name contains unusual characters
1062m4_defun([_LT_CHECK_BUILDDIR],
1063[case `pwd` in
1064  *\ * | *\	*)
1065    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
1066esac
1067])
1068
1069
1070# LT_INIT([OPTIONS])
1071# ------------------
1072AC_DEFUN([LT_INIT],
1073[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
1074AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
1075AC_BEFORE([$0], [LT_LANG])dnl
1076AC_BEFORE([$0], [LT_OUTPUT])dnl
1077AC_BEFORE([$0], [LTDL_INIT])dnl
1078m4_require([_LT_CHECK_BUILDDIR])dnl
1079
1080dnl Autoconf doesn't catch unexpanded LT_ macros by default:
1081m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
1082m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
1083dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
1084dnl unless we require an AC_DEFUNed macro:
1085AC_REQUIRE([LTOPTIONS_VERSION])dnl
1086AC_REQUIRE([LTSUGAR_VERSION])dnl
1087AC_REQUIRE([LTVERSION_VERSION])dnl
1088AC_REQUIRE([LTOBSOLETE_VERSION])dnl
1089m4_require([_LT_PROG_LTMAIN])dnl
1090
1091_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
1092
1093dnl Parse OPTIONS
1094_LT_SET_OPTIONS([$0], [$1])
1095
1096# This can be used to rebuild libtool when needed
1097LIBTOOL_DEPS="$ltmain"
1098
1099# Always use our own libtool.
1100LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1101AC_SUBST(LIBTOOL)dnl
1102
1103_LT_SETUP
1104
1105# Only expand once:
1106m4_define([LT_INIT])
1107])# LT_INIT
1108
1109# Old names:
1110AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
1111AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
1112dnl aclocal-1.4 backwards compatibility:
1113dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
1114dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
1115
1116
1117# _LT_CC_BASENAME(CC)
1118# -------------------
1119# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
1120m4_defun([_LT_CC_BASENAME],
1121[for cc_temp in $1""; do
1122  case $cc_temp in
1123    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1124    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1125    \-*) ;;
1126    *) break;;
1127  esac
1128done
1129cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
1130])
1131
1132
1133# _LT_FILEUTILS_DEFAULTS
1134# ----------------------
1135# It is okay to use these file commands and assume they have been set
1136# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
1137m4_defun([_LT_FILEUTILS_DEFAULTS],
1138[: ${CP="cp -f"}
1139: ${MV="mv -f"}
1140: ${RM="rm -f"}
1141])# _LT_FILEUTILS_DEFAULTS
1142
1143
1144# _LT_SETUP
1145# ---------
1146m4_defun([_LT_SETUP],
1147[AC_REQUIRE([AC_CANONICAL_HOST])dnl
1148AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1149AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
1150AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
1151
1152_LT_DECL([], [host_alias], [0], [The host system])dnl
1153_LT_DECL([], [host], [0])dnl
1154_LT_DECL([], [host_os], [0])dnl
1155dnl
1156_LT_DECL([], [build_alias], [0], [The build system])dnl
1157_LT_DECL([], [build], [0])dnl
1158_LT_DECL([], [build_os], [0])dnl
1159dnl
1160AC_REQUIRE([AC_PROG_CC])dnl
1161AC_REQUIRE([LT_PATH_LD])dnl
1162AC_REQUIRE([LT_PATH_NM])dnl
1163dnl
1164AC_REQUIRE([AC_PROG_LN_S])dnl
1165test -z "$LN_S" && LN_S="ln -s"
1166_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
1167dnl
1168AC_REQUIRE([LT_CMD_MAX_LEN])dnl
1169_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
1170_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
1171dnl
1172m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1173m4_require([_LT_CHECK_SHELL_FEATURES])dnl
1174m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
1175m4_require([_LT_CMD_RELOAD])dnl
1176m4_require([_LT_CHECK_MAGIC_METHOD])dnl
1177m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
1178m4_require([_LT_CMD_OLD_ARCHIVE])dnl
1179m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
1180m4_require([_LT_WITH_SYSROOT])dnl
1181
1182_LT_CONFIG_LIBTOOL_INIT([
1183# See if we are running on zsh, and set the options which allow our
1184# commands through without removal of \ escapes INIT.
1185if test -n "\${ZSH_VERSION+set}" ; then
1186   setopt NO_GLOB_SUBST
1187fi
1188])
1189if test -n "${ZSH_VERSION+set}" ; then
1190   setopt NO_GLOB_SUBST
1191fi
1192
1193_LT_CHECK_OBJDIR
1194
1195m4_require([_LT_TAG_COMPILER])dnl
1196
1197case $host_os in
1198aix3*)
1199  # AIX sometimes has problems with the GCC collect2 program.  For some
1200  # reason, if we set the COLLECT_NAMES environment variable, the problems
1201  # vanish in a puff of smoke.
1202  if test "X${COLLECT_NAMES+set}" != Xset; then
1203    COLLECT_NAMES=
1204    export COLLECT_NAMES
1205  fi
1206  ;;
1207esac
1208
1209# Global variables:
1210ofile=libtool
1211can_build_shared=yes
1212
1213# All known linkers require a `.a' archive for static linking (except MSVC,
1214# which needs '.lib').
1215libext=a
1216
1217with_gnu_ld="$lt_cv_prog_gnu_ld"
1218
1219old_CC="$CC"
1220old_CFLAGS="$CFLAGS"
1221
1222# Set sane defaults for various variables
1223test -z "$CC" && CC=cc
1224test -z "$LTCC" && LTCC=$CC
1225test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
1226test -z "$LD" && LD=ld
1227test -z "$ac_objext" && ac_objext=o
1228
1229_LT_CC_BASENAME([$compiler])
1230
1231# Only perform the check for file, if the check method requires it
1232test -z "$MAGIC_CMD" && MAGIC_CMD=file
1233case $deplibs_check_method in
1234file_magic*)
1235  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1236    _LT_PATH_MAGIC
1237  fi
1238  ;;
1239esac
1240
1241# Use C for the default configuration in the libtool script
1242LT_SUPPORTED_TAG([CC])
1243_LT_LANG_C_CONFIG
1244_LT_LANG_DEFAULT_CONFIG
1245_LT_CONFIG_COMMANDS
1246])# _LT_SETUP
1247
1248
1249# _LT_PREPARE_SED_QUOTE_VARS
1250# --------------------------
1251# Define a few sed substitution that help us do robust quoting.
1252m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
1253[# Backslashify metacharacters that are still active within
1254# double-quoted strings.
1255sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
1256
1257# Same as above, but do not quote variable references.
1258double_quote_subst='s/\([["`\\]]\)/\\\1/g'
1259
1260# Sed substitution to delay expansion of an escaped shell variable in a
1261# double_quote_subst'ed string.
1262delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1263
1264# Sed substitution to delay expansion of an escaped single quote.
1265delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
1266
1267# Sed substitution to avoid accidental globbing in evaled expressions
1268no_glob_subst='s/\*/\\\*/g'
1269])
1270
1271# _LT_PROG_LTMAIN
1272# ---------------
1273# Note that this code is called both from `configure', and `config.status'
1274# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
1275# `config.status' has no value for ac_aux_dir unless we are using Automake,
1276# so we pass a copy along to make sure it has a sensible value anyway.
1277m4_defun([_LT_PROG_LTMAIN],
1278[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
1279_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
1280ltmain="$ac_aux_dir/ltmain.sh"
1281])# _LT_PROG_LTMAIN
1282
1283
1284
1285# So that we can recreate a full libtool script including additional
1286# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
1287# in macros and then make a single call at the end using the `libtool'
1288# label.
1289
1290
1291# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
1292# ----------------------------------------
1293# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1294m4_define([_LT_CONFIG_LIBTOOL_INIT],
1295[m4_ifval([$1],
1296          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
1297                     [$1
1298])])])
1299
1300# Initialize.
1301m4_define([_LT_OUTPUT_LIBTOOL_INIT])
1302
1303
1304# _LT_CONFIG_LIBTOOL([COMMANDS])
1305# ------------------------------
1306# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1307m4_define([_LT_CONFIG_LIBTOOL],
1308[m4_ifval([$1],
1309          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
1310                     [$1
1311])])])
1312
1313# Initialize.
1314m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
1315
1316
1317# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
1318# -----------------------------------------------------
1319m4_defun([_LT_CONFIG_SAVE_COMMANDS],
1320[_LT_CONFIG_LIBTOOL([$1])
1321_LT_CONFIG_LIBTOOL_INIT([$2])
1322])
1323
1324
1325# _LT_FORMAT_COMMENT([COMMENT])
1326# -----------------------------
1327# Add leading comment marks to the start of each line, and a trailing
1328# full-stop to the whole comment if one is not present already.
1329m4_define([_LT_FORMAT_COMMENT],
1330[m4_ifval([$1], [
1331m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
1332              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
1333)])
1334
1335
1336
1337
1338
1339# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
1340# -------------------------------------------------------------------
1341# CONFIGNAME is the name given to the value in the libtool script.
1342# VARNAME is the (base) name used in the configure script.
1343# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
1344# VARNAME.  Any other value will be used directly.
1345m4_define([_LT_DECL],
1346[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
1347    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
1348	[m4_ifval([$1], [$1], [$2])])
1349    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
1350    m4_ifval([$4],
1351	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
1352    lt_dict_add_subkey([lt_decl_dict], [$2],
1353	[tagged?], [m4_ifval([$5], [yes], [no])])])
1354])
1355
1356
1357# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
1358# --------------------------------------------------------
1359m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
1360
1361
1362# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
1363# ------------------------------------------------
1364m4_define([lt_decl_tag_varnames],
1365[_lt_decl_filter([tagged?], [yes], $@)])
1366
1367
1368# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
1369# ---------------------------------------------------------
1370m4_define([_lt_decl_filter],
1371[m4_case([$#],
1372  [0], [m4_fatal([$0: too few arguments: $#])],
1373  [1], [m4_fatal([$0: too few arguments: $#: $1])],
1374  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
1375  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
1376  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
1377])
1378
1379
1380# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
1381# --------------------------------------------------
1382m4_define([lt_decl_quote_varnames],
1383[_lt_decl_filter([value], [1], $@)])
1384
1385
1386# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
1387# ---------------------------------------------------
1388m4_define([lt_decl_dquote_varnames],
1389[_lt_decl_filter([value], [2], $@)])
1390
1391
1392# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
1393# ---------------------------------------------------
1394m4_define([lt_decl_varnames_tagged],
1395[m4_assert([$# <= 2])dnl
1396_$0(m4_quote(m4_default([$1], [[, ]])),
1397    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
1398    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
1399m4_define([_lt_decl_varnames_tagged],
1400[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
1401
1402
1403# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
1404# ------------------------------------------------
1405m4_define([lt_decl_all_varnames],
1406[_$0(m4_quote(m4_default([$1], [[, ]])),
1407     m4_if([$2], [],
1408	   m4_quote(lt_decl_varnames),
1409	m4_quote(m4_shift($@))))[]dnl
1410])
1411m4_define([_lt_decl_all_varnames],
1412[lt_join($@, lt_decl_varnames_tagged([$1],
1413			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
1414])
1415
1416
1417# _LT_CONFIG_STATUS_DECLARE([VARNAME])
1418# ------------------------------------
1419# Quote a variable value, and forward it to `config.status' so that its
1420# declaration there will have the same value as in `configure'.  VARNAME
1421# must have a single quote delimited value for this to work.
1422m4_define([_LT_CONFIG_STATUS_DECLARE],
1423[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
1424
1425
1426# _LT_CONFIG_STATUS_DECLARATIONS
1427# ------------------------------
1428# We delimit libtool config variables with single quotes, so when
1429# we write them to config.status, we have to be sure to quote all
1430# embedded single quotes properly.  In configure, this macro expands
1431# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
1432#
1433#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
1434m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
1435[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
1436    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
1437
1438
1439# _LT_LIBTOOL_TAGS
1440# ----------------
1441# Output comment and list of tags supported by the script
1442m4_defun([_LT_LIBTOOL_TAGS],
1443[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
1444available_tags="_LT_TAGS"dnl
1445])
1446
1447
1448# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
1449# -----------------------------------
1450# Extract the dictionary values for VARNAME (optionally with TAG) and
1451# expand to a commented shell variable setting:
1452#
1453#    # Some comment about what VAR is for.
1454#    visible_name=$lt_internal_name
1455m4_define([_LT_LIBTOOL_DECLARE],
1456[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
1457					   [description])))[]dnl
1458m4_pushdef([_libtool_name],
1459    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
1460m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
1461    [0], [_libtool_name=[$]$1],
1462    [1], [_libtool_name=$lt_[]$1],
1463    [2], [_libtool_name=$lt_[]$1],
1464    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
1465m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
1466])
1467
1468
1469# _LT_LIBTOOL_CONFIG_VARS
1470# -----------------------
1471# Produce commented declarations of non-tagged libtool config variables
1472# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
1473# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
1474# section) are produced by _LT_LIBTOOL_TAG_VARS.
1475m4_defun([_LT_LIBTOOL_CONFIG_VARS],
1476[m4_foreach([_lt_var],
1477    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
1478    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
1479
1480
1481# _LT_LIBTOOL_TAG_VARS(TAG)
1482# -------------------------
1483m4_define([_LT_LIBTOOL_TAG_VARS],
1484[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
1485    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
1486
1487
1488# _LT_TAGVAR(VARNAME, [TAGNAME])
1489# ------------------------------
1490m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
1491
1492
1493# _LT_CONFIG_COMMANDS
1494# -------------------
1495# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
1496# variables for single and double quote escaping we saved from calls
1497# to _LT_DECL, we can put quote escaped variables declarations
1498# into `config.status', and then the shell code to quote escape them in
1499# for loops in `config.status'.  Finally, any additional code accumulated
1500# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
1501m4_defun([_LT_CONFIG_COMMANDS],
1502[AC_PROVIDE_IFELSE([LT_OUTPUT],
1503	dnl If the libtool generation code has been placed in $CONFIG_LT,
1504	dnl instead of duplicating it all over again into config.status,
1505	dnl then we will have config.status run $CONFIG_LT later, so it
1506	dnl needs to know what name is stored there:
1507        [AC_CONFIG_COMMANDS([libtool],
1508            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
1509    dnl If the libtool generation code is destined for config.status,
1510    dnl expand the accumulated commands and init code now:
1511    [AC_CONFIG_COMMANDS([libtool],
1512        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
1513])#_LT_CONFIG_COMMANDS
1514
1515
1516# Initialize.
1517m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
1518[
1519
1520# The HP-UX ksh and POSIX shell print the target directory to stdout
1521# if CDPATH is set.
1522(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1523
1524sed_quote_subst='$sed_quote_subst'
1525double_quote_subst='$double_quote_subst'
1526delay_variable_subst='$delay_variable_subst'
1527_LT_CONFIG_STATUS_DECLARATIONS
1528LTCC='$LTCC'
1529LTCFLAGS='$LTCFLAGS'
1530compiler='$compiler_DEFAULT'
1531
1532# A function that is used when there is no print builtin or printf.
1533func_fallback_echo ()
1534{
1535  eval 'cat <<_LTECHO_EOF
1536\$[]1
1537_LTECHO_EOF'
1538}
1539
1540# Quote evaled strings.
1541for var in lt_decl_all_varnames([[ \
1542]], lt_decl_quote_varnames); do
1543    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
1544    *[[\\\\\\\`\\"\\\$]]*)
1545      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
1546      ;;
1547    *)
1548      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1549      ;;
1550    esac
1551done
1552
1553# Double-quote double-evaled strings.
1554for var in lt_decl_all_varnames([[ \
1555]], lt_decl_dquote_varnames); do
1556    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
1557    *[[\\\\\\\`\\"\\\$]]*)
1558      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
1559      ;;
1560    *)
1561      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1562      ;;
1563    esac
1564done
1565
1566_LT_OUTPUT_LIBTOOL_INIT
1567])
1568
1569# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
1570# ------------------------------------
1571# Generate a child script FILE with all initialization necessary to
1572# reuse the environment learned by the parent script, and make the
1573# file executable.  If COMMENT is supplied, it is inserted after the
1574# `#!' sequence but before initialization text begins.  After this
1575# macro, additional text can be appended to FILE to form the body of
1576# the child script.  The macro ends with non-zero status if the
1577# file could not be fully written (such as if the disk is full).
1578m4_ifdef([AS_INIT_GENERATED],
1579[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
1580[m4_defun([_LT_GENERATED_FILE_INIT],
1581[m4_require([AS_PREPARE])]dnl
1582[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
1583[lt_write_fail=0
1584cat >$1 <<_ASEOF || lt_write_fail=1
1585#! $SHELL
1586# Generated by $as_me.
1587$2
1588SHELL=\${CONFIG_SHELL-$SHELL}
1589export SHELL
1590_ASEOF
1591cat >>$1 <<\_ASEOF || lt_write_fail=1
1592AS_SHELL_SANITIZE
1593_AS_PREPARE
1594exec AS_MESSAGE_FD>&1
1595_ASEOF
1596test $lt_write_fail = 0 && chmod +x $1[]dnl
1597m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
1598
1599# LT_OUTPUT
1600# ---------
1601# This macro allows early generation of the libtool script (before
1602# AC_OUTPUT is called), incase it is used in configure for compilation
1603# tests.
1604AC_DEFUN([LT_OUTPUT],
1605[: ${CONFIG_LT=./config.lt}
1606AC_MSG_NOTICE([creating $CONFIG_LT])
1607_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
1608[# Run this file to recreate a libtool stub with the current configuration.])
1609
1610cat >>"$CONFIG_LT" <<\_LTEOF
1611lt_cl_silent=false
1612exec AS_MESSAGE_LOG_FD>>config.log
1613{
1614  echo
1615  AS_BOX([Running $as_me.])
1616} >&AS_MESSAGE_LOG_FD
1617
1618lt_cl_help="\
1619\`$as_me' creates a local libtool stub from the current configuration,
1620for use in further configure time tests before the real libtool is
1621generated.
1622
1623Usage: $[0] [[OPTIONS]]
1624
1625  -h, --help      print this help, then exit
1626  -V, --version   print version number, then exit
1627  -q, --quiet     do not print progress messages
1628  -d, --debug     don't remove temporary files
1629
1630Report bugs to <bug-libtool@gnu.org>."
1631
1632lt_cl_version="\
1633m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
1634m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
1635configured by $[0], generated by m4_PACKAGE_STRING.
1636
1637Copyright (C) 2010 Free Software Foundation, Inc.
1638This config.lt script is free software; the Free Software Foundation
1639gives unlimited permision to copy, distribute and modify it."
1640
1641while test $[#] != 0
1642do
1643  case $[1] in
1644    --version | --v* | -V )
1645      echo "$lt_cl_version"; exit 0 ;;
1646    --help | --h* | -h )
1647      echo "$lt_cl_help"; exit 0 ;;
1648    --debug | --d* | -d )
1649      debug=: ;;
1650    --quiet | --q* | --silent | --s* | -q )
1651      lt_cl_silent=: ;;
1652
1653    -*) AC_MSG_ERROR([unrecognized option: $[1]
1654Try \`$[0] --help' for more information.]) ;;
1655
1656    *) AC_MSG_ERROR([unrecognized argument: $[1]
1657Try \`$[0] --help' for more information.]) ;;
1658  esac
1659  shift
1660done
1661
1662if $lt_cl_silent; then
1663  exec AS_MESSAGE_FD>/dev/null
1664fi
1665_LTEOF
1666
1667cat >>"$CONFIG_LT" <<_LTEOF
1668_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
1669_LTEOF
1670
1671cat >>"$CONFIG_LT" <<\_LTEOF
1672AC_MSG_NOTICE([creating $ofile])
1673_LT_OUTPUT_LIBTOOL_COMMANDS
1674AS_EXIT(0)
1675_LTEOF
1676chmod +x "$CONFIG_LT"
1677
1678# configure is writing to config.log, but config.lt does its own redirection,
1679# appending to config.log, which fails on DOS, as config.log is still kept
1680# open by configure.  Here we exec the FD to /dev/null, effectively closing
1681# config.log, so it can be properly (re)opened and appended to by config.lt.
1682lt_cl_success=:
1683test "$silent" = yes &&
1684  lt_config_lt_args="$lt_config_lt_args --quiet"
1685exec AS_MESSAGE_LOG_FD>/dev/null
1686$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
1687exec AS_MESSAGE_LOG_FD>>config.log
1688$lt_cl_success || AS_EXIT(1)
1689])# LT_OUTPUT
1690
1691
1692# _LT_CONFIG(TAG)
1693# ---------------
1694# If TAG is the built-in tag, create an initial libtool script with a
1695# default configuration from the untagged config vars.  Otherwise add code
1696# to config.status for appending the configuration named by TAG from the
1697# matching tagged config vars.
1698m4_defun([_LT_CONFIG],
1699[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1700_LT_CONFIG_SAVE_COMMANDS([
1701  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
1702  m4_if(_LT_TAG, [C], [
1703    # See if we are running on zsh, and set the options which allow our
1704    # commands through without removal of \ escapes.
1705    if test -n "${ZSH_VERSION+set}" ; then
1706      setopt NO_GLOB_SUBST
1707    fi
1708
1709    cfgfile="${ofile}T"
1710    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
1711    $RM "$cfgfile"
1712
1713    cat <<_LT_EOF >> "$cfgfile"
1714#! $SHELL
1715
1716# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
1717# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
1718# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1719# NOTE: Changes made to this file will be lost: look at ltmain.sh.
1720#
1721_LT_COPYING
1722_LT_LIBTOOL_TAGS
1723
1724# ### BEGIN LIBTOOL CONFIG
1725_LT_LIBTOOL_CONFIG_VARS
1726_LT_LIBTOOL_TAG_VARS
1727# ### END LIBTOOL CONFIG
1728
1729_LT_EOF
1730
1731  case $host_os in
1732  aix3*)
1733    cat <<\_LT_EOF >> "$cfgfile"
1734# AIX sometimes has problems with the GCC collect2 program.  For some
1735# reason, if we set the COLLECT_NAMES environment variable, the problems
1736# vanish in a puff of smoke.
1737if test "X${COLLECT_NAMES+set}" != Xset; then
1738  COLLECT_NAMES=
1739  export COLLECT_NAMES
1740fi
1741_LT_EOF
1742    ;;
1743  esac
1744
1745  _LT_PROG_LTMAIN
1746
1747  # We use sed instead of cat because bash on DJGPP gets confused if
1748  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
1749  # text mode, it properly converts lines to CR/LF.  This bash problem
1750  # is reportedly fixed, but why not run on old versions too?
1751  sed '$q' "$ltmain" >> "$cfgfile" \
1752     || (rm -f "$cfgfile"; exit 1)
1753
1754  _LT_PROG_REPLACE_SHELLFNS
1755
1756   mv -f "$cfgfile" "$ofile" ||
1757    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
1758  chmod +x "$ofile"
1759],
1760[cat <<_LT_EOF >> "$ofile"
1761
1762dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
1763dnl in a comment (ie after a #).
1764# ### BEGIN LIBTOOL TAG CONFIG: $1
1765_LT_LIBTOOL_TAG_VARS(_LT_TAG)
1766# ### END LIBTOOL TAG CONFIG: $1
1767_LT_EOF
1768])dnl /m4_if
1769],
1770[m4_if([$1], [], [
1771    PACKAGE='$PACKAGE'
1772    VERSION='$VERSION'
1773    TIMESTAMP='$TIMESTAMP'
1774    RM='$RM'
1775    ofile='$ofile'], [])
1776])dnl /_LT_CONFIG_SAVE_COMMANDS
1777])# _LT_CONFIG
1778
1779
1780# LT_SUPPORTED_TAG(TAG)
1781# ---------------------
1782# Trace this macro to discover what tags are supported by the libtool
1783# --tag option, using:
1784#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
1785AC_DEFUN([LT_SUPPORTED_TAG], [])
1786
1787
1788# C support is built-in for now
1789m4_define([_LT_LANG_C_enabled], [])
1790m4_define([_LT_TAGS], [])
1791
1792
1793# LT_LANG(LANG)
1794# -------------
1795# Enable libtool support for the given language if not already enabled.
1796AC_DEFUN([LT_LANG],
1797[AC_BEFORE([$0], [LT_OUTPUT])dnl
1798m4_case([$1],
1799  [C],			[_LT_LANG(C)],
1800  [C++],		[_LT_LANG(CXX)],
1801  [Java],		[_LT_LANG(GCJ)],
1802  [Fortran 77],		[_LT_LANG(F77)],
1803  [Fortran],		[_LT_LANG(FC)],
1804  [Windows Resource],	[_LT_LANG(RC)],
1805  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
1806    [_LT_LANG($1)],
1807    [m4_fatal([$0: unsupported language: "$1"])])])dnl
1808])# LT_LANG
1809
1810
1811# _LT_LANG(LANGNAME)
1812# ------------------
1813m4_defun([_LT_LANG],
1814[m4_ifdef([_LT_LANG_]$1[_enabled], [],
1815  [LT_SUPPORTED_TAG([$1])dnl
1816  m4_append([_LT_TAGS], [$1 ])dnl
1817  m4_define([_LT_LANG_]$1[_enabled], [])dnl
1818  _LT_LANG_$1_CONFIG($1)])dnl
1819])# _LT_LANG
1820
1821
1822# _LT_LANG_DEFAULT_CONFIG
1823# -----------------------
1824m4_defun([_LT_LANG_DEFAULT_CONFIG],
1825[AC_PROVIDE_IFELSE([AC_PROG_CXX],
1826  [LT_LANG(CXX)],
1827  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
1828
1829AC_PROVIDE_IFELSE([AC_PROG_F77],
1830  [LT_LANG(F77)],
1831  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
1832
1833AC_PROVIDE_IFELSE([AC_PROG_FC],
1834  [LT_LANG(FC)],
1835  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
1836
1837dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
1838dnl pulling things in needlessly.
1839AC_PROVIDE_IFELSE([AC_PROG_GCJ],
1840  [LT_LANG(GCJ)],
1841  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
1842    [LT_LANG(GCJ)],
1843    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
1844      [LT_LANG(GCJ)],
1845      [m4_ifdef([AC_PROG_GCJ],
1846	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
1847       m4_ifdef([A][M_PROG_GCJ],
1848	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
1849       m4_ifdef([LT_PROG_GCJ],
1850	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
1851
1852AC_PROVIDE_IFELSE([LT_PROG_RC],
1853  [LT_LANG(RC)],
1854  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
1855])# _LT_LANG_DEFAULT_CONFIG
1856
1857# Obsolete macros:
1858AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
1859AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
1860AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
1861AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
1862AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
1863dnl aclocal-1.4 backwards compatibility:
1864dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
1865dnl AC_DEFUN([AC_LIBTOOL_F77], [])
1866dnl AC_DEFUN([AC_LIBTOOL_FC], [])
1867dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
1868dnl AC_DEFUN([AC_LIBTOOL_RC], [])
1869
1870
1871# _LT_TAG_COMPILER
1872# ----------------
1873m4_defun([_LT_TAG_COMPILER],
1874[AC_REQUIRE([AC_PROG_CC])dnl
1875
1876_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
1877_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
1878_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
1879_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
1880
1881# If no C compiler was specified, use CC.
1882LTCC=${LTCC-"$CC"}
1883
1884# If no C compiler flags were specified, use CFLAGS.
1885LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
1886
1887# Allow CC to be a program name with arguments.
1888compiler=$CC
1889])# _LT_TAG_COMPILER
1890
1891
1892# _LT_COMPILER_BOILERPLATE
1893# ------------------------
1894# Check for compiler boilerplate output or warnings with
1895# the simple compiler test code.
1896m4_defun([_LT_COMPILER_BOILERPLATE],
1897[m4_require([_LT_DECL_SED])dnl
1898ac_outfile=conftest.$ac_objext
1899echo "$lt_simple_compile_test_code" >conftest.$ac_ext
1900eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1901_lt_compiler_boilerplate=`cat conftest.err`
1902$RM conftest*
1903])# _LT_COMPILER_BOILERPLATE
1904
1905
1906# _LT_LINKER_BOILERPLATE
1907# ----------------------
1908# Check for linker boilerplate output or warnings with
1909# the simple link test code.
1910m4_defun([_LT_LINKER_BOILERPLATE],
1911[m4_require([_LT_DECL_SED])dnl
1912ac_outfile=conftest.$ac_objext
1913echo "$lt_simple_link_test_code" >conftest.$ac_ext
1914eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1915_lt_linker_boilerplate=`cat conftest.err`
1916$RM -r conftest*
1917])# _LT_LINKER_BOILERPLATE
1918
1919# _LT_REQUIRED_DARWIN_CHECKS
1920# -------------------------
1921m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
1922  case $host_os in
1923    rhapsody* | darwin*)
1924    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
1925    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
1926    AC_CHECK_TOOL([LIPO], [lipo], [:])
1927    AC_CHECK_TOOL([OTOOL], [otool], [:])
1928    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
1929    _LT_DECL([], [DSYMUTIL], [1],
1930      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
1931    _LT_DECL([], [NMEDIT], [1],
1932      [Tool to change global to local symbols on Mac OS X])
1933    _LT_DECL([], [LIPO], [1],
1934      [Tool to manipulate fat objects and archives on Mac OS X])
1935    _LT_DECL([], [OTOOL], [1],
1936      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
1937    _LT_DECL([], [OTOOL64], [1],
1938      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
1939
1940    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
1941      [lt_cv_apple_cc_single_mod=no
1942      if test -z "${LT_MULTI_MODULE}"; then
1943	# By default we will add the -single_module flag. You can override
1944	# by either setting the environment variable LT_MULTI_MODULE
1945	# non-empty at configure time, or by adding -multi_module to the
1946	# link flags.
1947	rm -rf libconftest.dylib*
1948	echo "int foo(void){return 1;}" > conftest.c
1949	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1950-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
1951	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1952	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
1953        _lt_result=$?
1954	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
1955	  lt_cv_apple_cc_single_mod=yes
1956	else
1957	  cat conftest.err >&AS_MESSAGE_LOG_FD
1958	fi
1959	rm -rf libconftest.dylib*
1960	rm -f conftest.*
1961      fi])
1962    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1963      [lt_cv_ld_exported_symbols_list],
1964      [lt_cv_ld_exported_symbols_list=no
1965      save_LDFLAGS=$LDFLAGS
1966      echo "_main" > conftest.sym
1967      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1968      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1969	[lt_cv_ld_exported_symbols_list=yes],
1970	[lt_cv_ld_exported_symbols_list=no])
1971	LDFLAGS="$save_LDFLAGS"
1972    ])
1973    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
1974      [lt_cv_ld_force_load=no
1975      cat > conftest.c << _LT_EOF
1976int forced_loaded() { return 2;}
1977_LT_EOF
1978      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
1979      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
1980      echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
1981      $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
1982      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
1983      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
1984      cat > conftest.c << _LT_EOF
1985int main() { return 0;}
1986_LT_EOF
1987      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
1988      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
1989      _lt_result=$?
1990      if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
1991	lt_cv_ld_force_load=yes
1992      else
1993	cat conftest.err >&AS_MESSAGE_LOG_FD
1994      fi
1995        rm -f conftest.err libconftest.a conftest conftest.c
1996        rm -rf conftest.dSYM
1997    ])
1998    case $host_os in
1999    rhapsody* | darwin1.[[012]])
2000      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
2001    darwin1.*)
2002      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
2003    darwin*) # darwin 5.x on
2004      # if running on 10.5 or later, the deployment target defaults
2005      # to the OS version, if on x86, and 10.4, the deployment
2006      # target defaults to 10.4. Don't you love it?
2007      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
2008	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
2009	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2010	10.[[012]]*)
2011	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
2012	10.*)
2013	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2014      esac
2015    ;;
2016  esac
2017    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
2018      _lt_dar_single_mod='$single_module'
2019    fi
2020    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
2021      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
2022    else
2023      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
2024    fi
2025    if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
2026      _lt_dsymutil='~$DSYMUTIL $lib || :'
2027    else
2028      _lt_dsymutil=
2029    fi
2030    ;;
2031  esac
2032])
2033
2034
2035# _LT_DARWIN_LINKER_FEATURES
2036# --------------------------
2037# Checks for linker and compiler features on darwin
2038m4_defun([_LT_DARWIN_LINKER_FEATURES],
2039[
2040  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
2041  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
2042  _LT_TAGVAR(hardcode_direct, $1)=no
2043  _LT_TAGVAR(hardcode_automatic, $1)=yes
2044  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2045  if test "$lt_cv_ld_force_load" = "yes"; then
2046    _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
2047  else
2048    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
2049  fi
2050  _LT_TAGVAR(link_all_deplibs, $1)=yes
2051  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
2052  case $cc_basename in
2053     ifort*) _lt_dar_can_shared=yes ;;
2054     *) _lt_dar_can_shared=$GCC ;;
2055  esac
2056  if test "$_lt_dar_can_shared" = "yes"; then
2057    output_verbose_link_cmd=func_echo_all
2058    _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
2059    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
2060    _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
2061    _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
2062    m4_if([$1], [CXX],
2063[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
2064      _LT_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${_lt_dsymutil}"
2065      _LT_TAGVAR(archive_expsym_cmds, $1)="sed '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${_lt_dar_export_syms}${_lt_dsymutil}"
2066    fi
2067],[])
2068  else
2069  _LT_TAGVAR(ld_shlibs, $1)=no
2070  fi
2071])
2072
2073# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
2074# ----------------------------------
2075# Links a minimal program and checks the executable
2076# for the system default hardcoded library path. In most cases,
2077# this is /usr/lib:/lib, but when the MPI compilers are used
2078# the location of the communication and MPI libs are included too.
2079# If we don't find anything, use the default library path according
2080# to the aix ld manual.
2081# Store the results from the different compilers for each TAGNAME.
2082# Allow to override them for all tags through lt_cv_aix_libpath.
2083m4_defun([_LT_SYS_MODULE_PATH_AIX],
2084[m4_require([_LT_DECL_SED])dnl
2085if test "${lt_cv_aix_libpath+set}" = set; then
2086  aix_libpath=$lt_cv_aix_libpath
2087else
2088  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
2089  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
2090  lt_aix_libpath_sed='[
2091      /Import File Strings/,/^$/ {
2092	  /^0/ {
2093	      s/^0  *\([^ ]*\) *$/\1/
2094	      p
2095	  }
2096      }]'
2097  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2098  # Check for a 64-bit object if we didn't find anything.
2099  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
2100    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2101  fi],[])
2102  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
2103    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
2104  fi
2105  ])
2106  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
2107fi
2108])# _LT_SYS_MODULE_PATH_AIX
2109
2110
2111# _LT_SHELL_INIT(ARG)
2112# -------------------
2113m4_define([_LT_SHELL_INIT],
2114[m4_divert_text([M4SH-INIT], [$1
2115])])# _LT_SHELL_INIT
2116
2117
2118
2119# _LT_PROG_ECHO_BACKSLASH
2120# -----------------------
2121# Find how we can fake an echo command that does not interpret backslash.
2122# In particular, with Autoconf 2.60 or later we add some code to the start
2123# of the generated configure script which will find a shell with a builtin
2124# printf (which we can use as an echo command).
2125m4_defun([_LT_PROG_ECHO_BACKSLASH],
2126[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
2127ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
2128ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
2129
2130AC_MSG_CHECKING([how to print strings])
2131# Test print first, because it will be a builtin if present.
2132if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
2133   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
2134  ECHO='print -r --'
2135elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
2136  ECHO='printf %s\n'
2137else
2138  # Use this function as a fallback that always works.
2139  func_fallback_echo ()
2140  {
2141    eval 'cat <<_LTECHO_EOF
2142$[]1
2143_LTECHO_EOF'
2144  }
2145  ECHO='func_fallback_echo'
2146fi
2147
2148# func_echo_all arg...
2149# Invoke $ECHO with all args, space-separated.
2150func_echo_all ()
2151{
2152    $ECHO "$*"
2153}
2154
2155case "$ECHO" in
2156  printf*) AC_MSG_RESULT([printf]) ;;
2157  print*) AC_MSG_RESULT([print -r]) ;;
2158  *) AC_MSG_RESULT([cat]) ;;
2159esac
2160
2161m4_ifdef([_AS_DETECT_SUGGESTED],
2162[_AS_DETECT_SUGGESTED([
2163  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
2164    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
2165    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
2166    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
2167    PATH=/empty FPATH=/empty; export PATH FPATH
2168    test "X`printf %s $ECHO`" = "X$ECHO" \
2169      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
2170
2171_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
2172_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
2173])# _LT_PROG_ECHO_BACKSLASH
2174
2175
2176# _LT_WITH_SYSROOT
2177# ----------------
2178AC_DEFUN([_LT_WITH_SYSROOT],
2179[AC_MSG_CHECKING([for sysroot])
2180AC_ARG_WITH([sysroot],
2181[  --with-sysroot[=DIR] Search for dependent libraries within DIR
2182                        (or the compiler's sysroot if not specified).],
2183[], [with_sysroot=no])
2184
2185dnl lt_sysroot will always be passed unquoted.  We quote it here
2186dnl in case the user passed a directory name.
2187lt_sysroot=
2188case ${with_sysroot} in #(
2189 yes)
2190   if test "$GCC" = yes; then
2191     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
2192   fi
2193   ;; #(
2194 /*)
2195   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
2196   ;; #(
2197 no|'')
2198   ;; #(
2199 *)
2200   AC_MSG_RESULT([${with_sysroot}])
2201   AC_MSG_ERROR([The sysroot must be an absolute path.])
2202   ;;
2203esac
2204
2205 AC_MSG_RESULT([${lt_sysroot:-no}])
2206_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
2207[dependent libraries, and in which our libraries should be installed.])])
2208
2209# _LT_ENABLE_LOCK
2210# ---------------
2211m4_defun([_LT_ENABLE_LOCK],
2212[AC_ARG_ENABLE([libtool-lock],
2213  [AS_HELP_STRING([--disable-libtool-lock],
2214    [avoid locking (might break parallel builds)])])
2215test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
2216
2217# Some flags need to be propagated to the compiler or linker for good
2218# libtool support.
2219case $host in
2220ia64-*-hpux*)
2221  # Find out which ABI we are using.
2222  echo 'int i;' > conftest.$ac_ext
2223  if AC_TRY_EVAL(ac_compile); then
2224    case `/usr/bin/file conftest.$ac_objext` in
2225      *ELF-32*)
2226	HPUX_IA64_MODE="32"
2227	;;
2228      *ELF-64*)
2229	HPUX_IA64_MODE="64"
2230	;;
2231    esac
2232  fi
2233  rm -rf conftest*
2234  ;;
2235*-*-irix6*)
2236  # Find out which ABI we are using.
2237  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
2238  if AC_TRY_EVAL(ac_compile); then
2239    if test "$lt_cv_prog_gnu_ld" = yes; then
2240      case `/usr/bin/file conftest.$ac_objext` in
2241	*32-bit*)
2242	  LD="${LD-ld} -melf32bsmip"
2243	  ;;
2244	*N32*)
2245	  LD="${LD-ld} -melf32bmipn32"
2246	  ;;
2247	*64-bit*)
2248	  LD="${LD-ld} -melf64bmip"
2249	;;
2250      esac
2251    else
2252      case `/usr/bin/file conftest.$ac_objext` in
2253	*32-bit*)
2254	  LD="${LD-ld} -32"
2255	  ;;
2256	*N32*)
2257	  LD="${LD-ld} -n32"
2258	  ;;
2259	*64-bit*)
2260	  LD="${LD-ld} -64"
2261	  ;;
2262      esac
2263    fi
2264  fi
2265  rm -rf conftest*
2266  ;;
2267
2268x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
2269s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
2270  # Find out which ABI we are using.
2271  echo 'int i;' > conftest.$ac_ext
2272  if AC_TRY_EVAL(ac_compile); then
2273    case `/usr/bin/file conftest.o` in
2274      *32-bit*)
2275	case $host in
2276	  x86_64-*kfreebsd*-gnu)
2277	    LD="${LD-ld} -m elf_i386_fbsd"
2278	    ;;
2279	  x86_64-*linux*)
2280	    LD="${LD-ld} -m elf_i386"
2281	    ;;
2282	  ppc64-*linux*|powerpc64-*linux*)
2283	    LD="${LD-ld} -m elf32ppclinux"
2284	    ;;
2285	  s390x-*linux*)
2286	    LD="${LD-ld} -m elf_s390"
2287	    ;;
2288	  sparc64-*linux*)
2289	    LD="${LD-ld} -m elf32_sparc"
2290	    ;;
2291	esac
2292	;;
2293      *64-bit*)
2294	case $host in
2295	  x86_64-*kfreebsd*-gnu)
2296	    LD="${LD-ld} -m elf_x86_64_fbsd"
2297	    ;;
2298	  x86_64-*linux*)
2299	    LD="${LD-ld} -m elf_x86_64"
2300	    ;;
2301	  ppc*-*linux*|powerpc*-*linux*)
2302	    LD="${LD-ld} -m elf64ppc"
2303	    ;;
2304	  s390*-*linux*|s390*-*tpf*)
2305	    LD="${LD-ld} -m elf64_s390"
2306	    ;;
2307	  sparc*-*linux*)
2308	    LD="${LD-ld} -m elf64_sparc"
2309	    ;;
2310	esac
2311	;;
2312    esac
2313  fi
2314  rm -rf conftest*
2315  ;;
2316
2317*-*-sco3.2v5*)
2318  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2319  SAVE_CFLAGS="$CFLAGS"
2320  CFLAGS="$CFLAGS -belf"
2321  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
2322    [AC_LANG_PUSH(C)
2323     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
2324     AC_LANG_POP])
2325  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2326    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2327    CFLAGS="$SAVE_CFLAGS"
2328  fi
2329  ;;
2330sparc*-*solaris*)
2331  # Find out which ABI we are using.
2332  echo 'int i;' > conftest.$ac_ext
2333  if AC_TRY_EVAL(ac_compile); then
2334    case `/usr/bin/file conftest.o` in
2335    *64-bit*)
2336      case $lt_cv_prog_gnu_ld in
2337      yes*) LD="${LD-ld} -m elf64_sparc" ;;
2338      *)
2339	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
2340	  LD="${LD-ld} -64"
2341	fi
2342	;;
2343      esac
2344      ;;
2345    esac
2346  fi
2347  rm -rf conftest*
2348  ;;
2349esac
2350
2351need_locks="$enable_libtool_lock"
2352])# _LT_ENABLE_LOCK
2353
2354
2355# _LT_PROG_AR
2356# -----------
2357m4_defun([_LT_PROG_AR],
2358[AC_CHECK_TOOLS(AR, [ar], false)
2359: ${AR=ar}
2360: ${AR_FLAGS=cru}
2361_LT_DECL([], [AR], [1], [The archiver])
2362_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
2363
2364AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
2365  [lt_cv_ar_at_file=no
2366   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
2367     [echo conftest.$ac_objext > conftest.lst
2368      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
2369      AC_TRY_EVAL([lt_ar_try])
2370      if test "$ac_status" -eq 0; then
2371	# Ensure the archiver fails upon bogus file names.
2372	rm -f conftest.$ac_objext libconftest.a
2373	AC_TRY_EVAL([lt_ar_try])
2374	if test "$ac_status" -ne 0; then
2375          lt_cv_ar_at_file=@
2376        fi
2377      fi
2378      rm -f conftest.* libconftest.a
2379     ])
2380  ])
2381
2382if test "x$lt_cv_ar_at_file" = xno; then
2383  archiver_list_spec=
2384else
2385  archiver_list_spec=$lt_cv_ar_at_file
2386fi
2387_LT_DECL([], [archiver_list_spec], [1],
2388  [How to feed a file listing to the archiver])
2389])# _LT_PROG_AR
2390
2391
2392# _LT_CMD_OLD_ARCHIVE
2393# -------------------
2394m4_defun([_LT_CMD_OLD_ARCHIVE],
2395[_LT_PROG_AR
2396
2397AC_CHECK_TOOL(STRIP, strip, :)
2398test -z "$STRIP" && STRIP=:
2399_LT_DECL([], [STRIP], [1], [A symbol stripping program])
2400
2401AC_CHECK_TOOL(RANLIB, ranlib, :)
2402test -z "$RANLIB" && RANLIB=:
2403_LT_DECL([], [RANLIB], [1],
2404    [Commands used to install an old-style archive])
2405
2406# Determine commands to create old-style static archives.
2407old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
2408old_postinstall_cmds='chmod 644 $oldlib'
2409old_postuninstall_cmds=
2410
2411if test -n "$RANLIB"; then
2412  case $host_os in
2413  openbsd*)
2414    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
2415    ;;
2416  *)
2417    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
2418    ;;
2419  esac
2420  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
2421fi
2422
2423case $host_os in
2424  darwin*)
2425    lock_old_archive_extraction=yes ;;
2426  *)
2427    lock_old_archive_extraction=no ;;
2428esac
2429_LT_DECL([], [old_postinstall_cmds], [2])
2430_LT_DECL([], [old_postuninstall_cmds], [2])
2431_LT_TAGDECL([], [old_archive_cmds], [2],
2432    [Commands used to build an old-style archive])
2433_LT_DECL([], [lock_old_archive_extraction], [0],
2434    [Whether to use a lock for old archive extraction])
2435])# _LT_CMD_OLD_ARCHIVE
2436
2437
2438# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2439#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
2440# ----------------------------------------------------------------
2441# Check whether the given compiler option works
2442AC_DEFUN([_LT_COMPILER_OPTION],
2443[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2444m4_require([_LT_DECL_SED])dnl
2445AC_CACHE_CHECK([$1], [$2],
2446  [$2=no
2447   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
2448   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2449   lt_compiler_flag="$3"
2450   # Insert the option either (1) after the last *FLAGS variable, or
2451   # (2) before a word containing "conftest.", or (3) at the end.
2452   # Note that $ac_compile itself does not contain backslashes and begins
2453   # with a dollar sign (not a hyphen), so the echo should work correctly.
2454   # The option is referenced via a variable to avoid confusing sed.
2455   lt_compile=`echo "$ac_compile" | $SED \
2456   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2457   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2458   -e 's:$: $lt_compiler_flag:'`
2459   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2460   (eval "$lt_compile" 2>conftest.err)
2461   ac_status=$?
2462   cat conftest.err >&AS_MESSAGE_LOG_FD
2463   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2464   if (exit $ac_status) && test -s "$ac_outfile"; then
2465     # The compiler can only warn and ignore the option if not recognized
2466     # So say no if there are warnings other than the usual output.
2467     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
2468     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2469     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
2470       $2=yes
2471     fi
2472   fi
2473   $RM conftest*
2474])
2475
2476if test x"[$]$2" = xyes; then
2477    m4_if([$5], , :, [$5])
2478else
2479    m4_if([$6], , :, [$6])
2480fi
2481])# _LT_COMPILER_OPTION
2482
2483# Old name:
2484AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
2485dnl aclocal-1.4 backwards compatibility:
2486dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
2487
2488
2489# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2490#                  [ACTION-SUCCESS], [ACTION-FAILURE])
2491# ----------------------------------------------------
2492# Check whether the given linker option works
2493AC_DEFUN([_LT_LINKER_OPTION],
2494[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2495m4_require([_LT_DECL_SED])dnl
2496AC_CACHE_CHECK([$1], [$2],
2497  [$2=no
2498   save_LDFLAGS="$LDFLAGS"
2499   LDFLAGS="$LDFLAGS $3"
2500   echo "$lt_simple_link_test_code" > conftest.$ac_ext
2501   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
2502     # The linker can only warn and ignore the option if not recognized
2503     # So say no if there are warnings
2504     if test -s conftest.err; then
2505       # Append any errors to the config.log.
2506       cat conftest.err 1>&AS_MESSAGE_LOG_FD
2507       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
2508       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2509       if diff conftest.exp conftest.er2 >/dev/null; then
2510         $2=yes
2511       fi
2512     else
2513       $2=yes
2514     fi
2515   fi
2516   $RM -r conftest*
2517   LDFLAGS="$save_LDFLAGS"
2518])
2519
2520if test x"[$]$2" = xyes; then
2521    m4_if([$4], , :, [$4])
2522else
2523    m4_if([$5], , :, [$5])
2524fi
2525])# _LT_LINKER_OPTION
2526
2527# Old name:
2528AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
2529dnl aclocal-1.4 backwards compatibility:
2530dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
2531
2532
2533# LT_CMD_MAX_LEN
2534#---------------
2535AC_DEFUN([LT_CMD_MAX_LEN],
2536[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2537# find the maximum length of command line arguments
2538AC_MSG_CHECKING([the maximum length of command line arguments])
2539AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
2540  i=0
2541  teststring="ABCD"
2542
2543  case $build_os in
2544  msdosdjgpp*)
2545    # On DJGPP, this test can blow up pretty badly due to problems in libc
2546    # (any single argument exceeding 2000 bytes causes a buffer overrun
2547    # during glob expansion).  Even if it were fixed, the result of this
2548    # check would be larger than it should be.
2549    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
2550    ;;
2551
2552  gnu*)
2553    # Under GNU Hurd, this test is not required because there is
2554    # no limit to the length of command line arguments.
2555    # Libtool will interpret -1 as no limit whatsoever
2556    lt_cv_sys_max_cmd_len=-1;
2557    ;;
2558
2559  cygwin* | mingw* | cegcc*)
2560    # On Win9x/ME, this test blows up -- it succeeds, but takes
2561    # about 5 minutes as the teststring grows exponentially.
2562    # Worse, since 9x/ME are not pre-emptively multitasking,
2563    # you end up with a "frozen" computer, even though with patience
2564    # the test eventually succeeds (with a max line length of 256k).
2565    # Instead, let's just punt: use the minimum linelength reported by
2566    # all of the supported platforms: 8192 (on NT/2K/XP).
2567    lt_cv_sys_max_cmd_len=8192;
2568    ;;
2569
2570  mint*)
2571    # On MiNT this can take a long time and run out of memory.
2572    lt_cv_sys_max_cmd_len=8192;
2573    ;;
2574
2575  amigaos*)
2576    # On AmigaOS with pdksh, this test takes hours, literally.
2577    # So we just punt and use a minimum line length of 8192.
2578    lt_cv_sys_max_cmd_len=8192;
2579    ;;
2580
2581  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
2582    # This has been around since 386BSD, at least.  Likely further.
2583    if test -x /sbin/sysctl; then
2584      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
2585    elif test -x /usr/sbin/sysctl; then
2586      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
2587    else
2588      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
2589    fi
2590    # And add a safety zone
2591    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2592    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2593    ;;
2594
2595  interix*)
2596    # We know the value 262144 and hardcode it with a safety zone (like BSD)
2597    lt_cv_sys_max_cmd_len=196608
2598    ;;
2599
2600  osf*)
2601    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
2602    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
2603    # nice to cause kernel panics so lets avoid the loop below.
2604    # First set a reasonable default.
2605    lt_cv_sys_max_cmd_len=16384
2606    #
2607    if test -x /sbin/sysconfig; then
2608      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
2609        *1*) lt_cv_sys_max_cmd_len=-1 ;;
2610      esac
2611    fi
2612    ;;
2613  sco3.2v5*)
2614    lt_cv_sys_max_cmd_len=102400
2615    ;;
2616  sysv5* | sco5v6* | sysv4.2uw2*)
2617    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
2618    if test -n "$kargmax"; then
2619      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
2620    else
2621      lt_cv_sys_max_cmd_len=32768
2622    fi
2623    ;;
2624  *)
2625    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
2626    if test -n "$lt_cv_sys_max_cmd_len"; then
2627      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2628      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2629    else
2630      # Make teststring a little bigger before we do anything with it.
2631      # a 1K string should be a reasonable start.
2632      for i in 1 2 3 4 5 6 7 8 ; do
2633        teststring=$teststring$teststring
2634      done
2635      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
2636      # If test is not a shell built-in, we'll probably end up computing a
2637      # maximum length that is only half of the actual maximum length, but
2638      # we can't tell.
2639      while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
2640	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
2641	      test $i != 17 # 1/2 MB should be enough
2642      do
2643        i=`expr $i + 1`
2644        teststring=$teststring$teststring
2645      done
2646      # Only check the string length outside the loop.
2647      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
2648      teststring=
2649      # Add a significant safety factor because C++ compilers can tack on
2650      # massive amounts of additional arguments before passing them to the
2651      # linker.  It appears as though 1/2 is a usable value.
2652      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
2653    fi
2654    ;;
2655  esac
2656])
2657if test -n $lt_cv_sys_max_cmd_len ; then
2658  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
2659else
2660  AC_MSG_RESULT(none)
2661fi
2662max_cmd_len=$lt_cv_sys_max_cmd_len
2663_LT_DECL([], [max_cmd_len], [0],
2664    [What is the maximum length of a command?])
2665])# LT_CMD_MAX_LEN
2666
2667# Old name:
2668AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
2669dnl aclocal-1.4 backwards compatibility:
2670dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
2671
2672
2673# _LT_HEADER_DLFCN
2674# ----------------
2675m4_defun([_LT_HEADER_DLFCN],
2676[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
2677])# _LT_HEADER_DLFCN
2678
2679
2680# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
2681#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
2682# ----------------------------------------------------------------
2683m4_defun([_LT_TRY_DLOPEN_SELF],
2684[m4_require([_LT_HEADER_DLFCN])dnl
2685if test "$cross_compiling" = yes; then :
2686  [$4]
2687else
2688  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2689  lt_status=$lt_dlunknown
2690  cat > conftest.$ac_ext <<_LT_EOF
2691[#line $LINENO "configure"
2692#include "confdefs.h"
2693
2694#if HAVE_DLFCN_H
2695#include <dlfcn.h>
2696#endif
2697
2698#include <stdio.h>
2699
2700#ifdef RTLD_GLOBAL
2701#  define LT_DLGLOBAL		RTLD_GLOBAL
2702#else
2703#  ifdef DL_GLOBAL
2704#    define LT_DLGLOBAL		DL_GLOBAL
2705#  else
2706#    define LT_DLGLOBAL		0
2707#  endif
2708#endif
2709
2710/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
2711   find out it does not work in some platform. */
2712#ifndef LT_DLLAZY_OR_NOW
2713#  ifdef RTLD_LAZY
2714#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
2715#  else
2716#    ifdef DL_LAZY
2717#      define LT_DLLAZY_OR_NOW		DL_LAZY
2718#    else
2719#      ifdef RTLD_NOW
2720#        define LT_DLLAZY_OR_NOW	RTLD_NOW
2721#      else
2722#        ifdef DL_NOW
2723#          define LT_DLLAZY_OR_NOW	DL_NOW
2724#        else
2725#          define LT_DLLAZY_OR_NOW	0
2726#        endif
2727#      endif
2728#    endif
2729#  endif
2730#endif
2731
2732/* When -fvisbility=hidden is used, assume the code has been annotated
2733   correspondingly for the symbols needed.  */
2734#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
2735int fnord () __attribute__((visibility("default")));
2736#endif
2737
2738int fnord () { return 42; }
2739int main ()
2740{
2741  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
2742  int status = $lt_dlunknown;
2743
2744  if (self)
2745    {
2746      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
2747      else
2748        {
2749	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
2750          else puts (dlerror ());
2751	}
2752      /* dlclose (self); */
2753    }
2754  else
2755    puts (dlerror ());
2756
2757  return status;
2758}]
2759_LT_EOF
2760  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
2761    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
2762    lt_status=$?
2763    case x$lt_status in
2764      x$lt_dlno_uscore) $1 ;;
2765      x$lt_dlneed_uscore) $2 ;;
2766      x$lt_dlunknown|x*) $3 ;;
2767    esac
2768  else :
2769    # compilation failed
2770    $3
2771  fi
2772fi
2773rm -fr conftest*
2774])# _LT_TRY_DLOPEN_SELF
2775
2776
2777# LT_SYS_DLOPEN_SELF
2778# ------------------
2779AC_DEFUN([LT_SYS_DLOPEN_SELF],
2780[m4_require([_LT_HEADER_DLFCN])dnl
2781if test "x$enable_dlopen" != xyes; then
2782  enable_dlopen=unknown
2783  enable_dlopen_self=unknown
2784  enable_dlopen_self_static=unknown
2785else
2786  lt_cv_dlopen=no
2787  lt_cv_dlopen_libs=
2788
2789  case $host_os in
2790  beos*)
2791    lt_cv_dlopen="load_add_on"
2792    lt_cv_dlopen_libs=
2793    lt_cv_dlopen_self=yes
2794    ;;
2795
2796  mingw* | pw32* | cegcc*)
2797    lt_cv_dlopen="LoadLibrary"
2798    lt_cv_dlopen_libs=
2799    ;;
2800
2801  cygwin*)
2802    lt_cv_dlopen="dlopen"
2803    lt_cv_dlopen_libs=
2804    ;;
2805
2806  darwin*)
2807  # if libdl is installed we need to link against it
2808    AC_CHECK_LIB([dl], [dlopen],
2809		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
2810    lt_cv_dlopen="dyld"
2811    lt_cv_dlopen_libs=
2812    lt_cv_dlopen_self=yes
2813    ])
2814    ;;
2815
2816  *)
2817    AC_CHECK_FUNC([shl_load],
2818	  [lt_cv_dlopen="shl_load"],
2819      [AC_CHECK_LIB([dld], [shl_load],
2820	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
2821	[AC_CHECK_FUNC([dlopen],
2822	      [lt_cv_dlopen="dlopen"],
2823	  [AC_CHECK_LIB([dl], [dlopen],
2824		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
2825	    [AC_CHECK_LIB([svld], [dlopen],
2826		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
2827	      [AC_CHECK_LIB([dld], [dld_link],
2828		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
2829	      ])
2830	    ])
2831	  ])
2832	])
2833      ])
2834    ;;
2835  esac
2836
2837  if test "x$lt_cv_dlopen" != xno; then
2838    enable_dlopen=yes
2839  else
2840    enable_dlopen=no
2841  fi
2842
2843  case $lt_cv_dlopen in
2844  dlopen)
2845    save_CPPFLAGS="$CPPFLAGS"
2846    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2847
2848    save_LDFLAGS="$LDFLAGS"
2849    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2850
2851    save_LIBS="$LIBS"
2852    LIBS="$lt_cv_dlopen_libs $LIBS"
2853
2854    AC_CACHE_CHECK([whether a program can dlopen itself],
2855	  lt_cv_dlopen_self, [dnl
2856	  _LT_TRY_DLOPEN_SELF(
2857	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2858	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2859    ])
2860
2861    if test "x$lt_cv_dlopen_self" = xyes; then
2862      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2863      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2864	  lt_cv_dlopen_self_static, [dnl
2865	  _LT_TRY_DLOPEN_SELF(
2866	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2867	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
2868      ])
2869    fi
2870
2871    CPPFLAGS="$save_CPPFLAGS"
2872    LDFLAGS="$save_LDFLAGS"
2873    LIBS="$save_LIBS"
2874    ;;
2875  esac
2876
2877  case $lt_cv_dlopen_self in
2878  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2879  *) enable_dlopen_self=unknown ;;
2880  esac
2881
2882  case $lt_cv_dlopen_self_static in
2883  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2884  *) enable_dlopen_self_static=unknown ;;
2885  esac
2886fi
2887_LT_DECL([dlopen_support], [enable_dlopen], [0],
2888	 [Whether dlopen is supported])
2889_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
2890	 [Whether dlopen of programs is supported])
2891_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
2892	 [Whether dlopen of statically linked programs is supported])
2893])# LT_SYS_DLOPEN_SELF
2894
2895# Old name:
2896AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
2897dnl aclocal-1.4 backwards compatibility:
2898dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
2899
2900
2901# _LT_COMPILER_C_O([TAGNAME])
2902# ---------------------------
2903# Check to see if options -c and -o are simultaneously supported by compiler.
2904# This macro does not hard code the compiler like AC_PROG_CC_C_O.
2905m4_defun([_LT_COMPILER_C_O],
2906[m4_require([_LT_DECL_SED])dnl
2907m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2908m4_require([_LT_TAG_COMPILER])dnl
2909AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2910  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2911  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2912   $RM -r conftest 2>/dev/null
2913   mkdir conftest
2914   cd conftest
2915   mkdir out
2916   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2917
2918   lt_compiler_flag="-o out/conftest2.$ac_objext"
2919   # Insert the option either (1) after the last *FLAGS variable, or
2920   # (2) before a word containing "conftest.", or (3) at the end.
2921   # Note that $ac_compile itself does not contain backslashes and begins
2922   # with a dollar sign (not a hyphen), so the echo should work correctly.
2923   lt_compile=`echo "$ac_compile" | $SED \
2924   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2925   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2926   -e 's:$: $lt_compiler_flag:'`
2927   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2928   (eval "$lt_compile" 2>out/conftest.err)
2929   ac_status=$?
2930   cat out/conftest.err >&AS_MESSAGE_LOG_FD
2931   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2932   if (exit $ac_status) && test -s out/conftest2.$ac_objext
2933   then
2934     # The compiler can only warn and ignore the option if not recognized
2935     # So say no if there are warnings
2936     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
2937     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2938     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2939       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2940     fi
2941   fi
2942   chmod u+w . 2>&AS_MESSAGE_LOG_FD
2943   $RM conftest*
2944   # SGI C++ compiler will create directory out/ii_files/ for
2945   # template instantiation
2946   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
2947   $RM out/* && rmdir out
2948   cd ..
2949   $RM -r conftest
2950   $RM conftest*
2951])
2952_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
2953	[Does compiler simultaneously support -c and -o options?])
2954])# _LT_COMPILER_C_O
2955
2956
2957# _LT_COMPILER_FILE_LOCKS([TAGNAME])
2958# ----------------------------------
2959# Check to see if we can do hard links to lock some files if needed
2960m4_defun([_LT_COMPILER_FILE_LOCKS],
2961[m4_require([_LT_ENABLE_LOCK])dnl
2962m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2963_LT_COMPILER_C_O([$1])
2964
2965hard_links="nottested"
2966if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
2967  # do not overwrite the value of need_locks provided by the user
2968  AC_MSG_CHECKING([if we can lock with hard links])
2969  hard_links=yes
2970  $RM conftest*
2971  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2972  touch conftest.a
2973  ln conftest.a conftest.b 2>&5 || hard_links=no
2974  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2975  AC_MSG_RESULT([$hard_links])
2976  if test "$hard_links" = no; then
2977    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2978    need_locks=warn
2979  fi
2980else
2981  need_locks=no
2982fi
2983_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
2984])# _LT_COMPILER_FILE_LOCKS
2985
2986
2987# _LT_CHECK_OBJDIR
2988# ----------------
2989m4_defun([_LT_CHECK_OBJDIR],
2990[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2991[rm -f .libs 2>/dev/null
2992mkdir .libs 2>/dev/null
2993if test -d .libs; then
2994  lt_cv_objdir=.libs
2995else
2996  # MS-DOS does not allow filenames that begin with a dot.
2997  lt_cv_objdir=_libs
2998fi
2999rmdir .libs 2>/dev/null])
3000objdir=$lt_cv_objdir
3001_LT_DECL([], [objdir], [0],
3002         [The name of the directory that contains temporary libtool files])dnl
3003m4_pattern_allow([LT_OBJDIR])dnl
3004AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
3005  [Define to the sub-directory in which libtool stores uninstalled libraries.])
3006])# _LT_CHECK_OBJDIR
3007
3008
3009# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
3010# --------------------------------------
3011# Check hardcoding attributes.
3012m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
3013[AC_MSG_CHECKING([how to hardcode library paths into programs])
3014_LT_TAGVAR(hardcode_action, $1)=
3015if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
3016   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
3017   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
3018
3019  # We can hardcode non-existent directories.
3020  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
3021     # If the only mechanism to avoid hardcoding is shlibpath_var, we
3022     # have to relink, otherwise we might link with an installed library
3023     # when we should be linking with a yet-to-be-installed one
3024     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
3025     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
3026    # Linking always hardcodes the temporary library directory.
3027    _LT_TAGVAR(hardcode_action, $1)=relink
3028  else
3029    # We can link without hardcoding, and we can hardcode nonexisting dirs.
3030    _LT_TAGVAR(hardcode_action, $1)=immediate
3031  fi
3032else
3033  # We cannot hardcode anything, or else we can only hardcode existing
3034  # directories.
3035  _LT_TAGVAR(hardcode_action, $1)=unsupported
3036fi
3037AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
3038
3039if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
3040   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
3041  # Fast installation is not supported
3042  enable_fast_install=no
3043elif test "$shlibpath_overrides_runpath" = yes ||
3044     test "$enable_shared" = no; then
3045  # Fast installation is not necessary
3046  enable_fast_install=needless
3047fi
3048_LT_TAGDECL([], [hardcode_action], [0],
3049    [How to hardcode a shared library path into an executable])
3050])# _LT_LINKER_HARDCODE_LIBPATH
3051
3052
3053# _LT_CMD_STRIPLIB
3054# ----------------
3055m4_defun([_LT_CMD_STRIPLIB],
3056[m4_require([_LT_DECL_EGREP])
3057striplib=
3058old_striplib=
3059AC_MSG_CHECKING([whether stripping libraries is possible])
3060if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
3061  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
3062  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
3063  AC_MSG_RESULT([yes])
3064else
3065# FIXME - insert some real tests, host_os isn't really good enough
3066  case $host_os in
3067  darwin*)
3068    if test -n "$STRIP" ; then
3069      striplib="$STRIP -x"
3070      old_striplib="$STRIP -S"
3071      AC_MSG_RESULT([yes])
3072    else
3073      AC_MSG_RESULT([no])
3074    fi
3075    ;;
3076  *)
3077    AC_MSG_RESULT([no])
3078    ;;
3079  esac
3080fi
3081_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
3082_LT_DECL([], [striplib], [1])
3083])# _LT_CMD_STRIPLIB
3084
3085
3086# _LT_SYS_DYNAMIC_LINKER([TAG])
3087# -----------------------------
3088# PORTME Fill in your ld.so characteristics
3089m4_defun([_LT_SYS_DYNAMIC_LINKER],
3090[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3091m4_require([_LT_DECL_EGREP])dnl
3092m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3093m4_require([_LT_DECL_OBJDUMP])dnl
3094m4_require([_LT_DECL_SED])dnl
3095m4_require([_LT_CHECK_SHELL_FEATURES])dnl
3096AC_MSG_CHECKING([dynamic linker characteristics])
3097m4_if([$1],
3098	[], [
3099if test "$GCC" = yes; then
3100  case $host_os in
3101    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
3102    *) lt_awk_arg="/^libraries:/" ;;
3103  esac
3104  case $host_os in
3105    mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
3106    *) lt_sed_strip_eq="s,=/,/,g" ;;
3107  esac
3108  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
3109  case $lt_search_path_spec in
3110  *\;*)
3111    # if the path contains ";" then we assume it to be the separator
3112    # otherwise default to the standard path separator (i.e. ":") - it is
3113    # assumed that no part of a normal pathname contains ";" but that should
3114    # okay in the real world where ";" in dirpaths is itself problematic.
3115    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
3116    ;;
3117  *)
3118    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
3119    ;;
3120  esac
3121  # Ok, now we have the path, separated by spaces, we can step through it
3122  # and add multilib dir if necessary.
3123  lt_tmp_lt_search_path_spec=
3124  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
3125  for lt_sys_path in $lt_search_path_spec; do
3126    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
3127      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
3128    else
3129      test -d "$lt_sys_path" && \
3130	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
3131    fi
3132  done
3133  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
3134BEGIN {RS=" "; FS="/|\n";} {
3135  lt_foo="";
3136  lt_count=0;
3137  for (lt_i = NF; lt_i > 0; lt_i--) {
3138    if ($lt_i != "" && $lt_i != ".") {
3139      if ($lt_i == "..") {
3140        lt_count++;
3141      } else {
3142        if (lt_count == 0) {
3143          lt_foo="/" $lt_i lt_foo;
3144        } else {
3145          lt_count--;
3146        }
3147      }
3148    }
3149  }
3150  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
3151  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
3152}'`
3153  # AWK program above erroneously prepends '/' to C:/dos/paths
3154  # for these hosts.
3155  case $host_os in
3156    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
3157      $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
3158  esac
3159  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
3160else
3161  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
3162fi])
3163library_names_spec=
3164libname_spec='lib$name'
3165soname_spec=
3166shrext_cmds=".so"
3167postinstall_cmds=
3168postuninstall_cmds=
3169finish_cmds=
3170finish_eval=
3171shlibpath_var=
3172shlibpath_overrides_runpath=unknown
3173version_type=none
3174dynamic_linker="$host_os ld.so"
3175sys_lib_dlsearch_path_spec="/lib /usr/lib"
3176need_lib_prefix=unknown
3177hardcode_into_libs=no
3178
3179# when you set need_version to no, make sure it does not cause -set_version
3180# flags to be left without arguments
3181need_version=unknown
3182
3183case $host_os in
3184aix3*)
3185  version_type=linux
3186  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
3187  shlibpath_var=LIBPATH
3188
3189  # AIX 3 has no versioning support, so we append a major version to the name.
3190  soname_spec='${libname}${release}${shared_ext}$major'
3191  ;;
3192
3193aix[[4-9]]*)
3194  version_type=linux
3195  need_lib_prefix=no
3196  need_version=no
3197  hardcode_into_libs=yes
3198  if test "$host_cpu" = ia64; then
3199    # AIX 5 supports IA64
3200    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
3201    shlibpath_var=LD_LIBRARY_PATH
3202  else
3203    # With GCC up to 2.95.x, collect2 would create an import file
3204    # for dependence libraries.  The import file would start with
3205    # the line `#! .'.  This would cause the generated library to
3206    # depend on `.', always an invalid library.  This was fixed in
3207    # development snapshots of GCC prior to 3.0.
3208    case $host_os in
3209      aix4 | aix4.[[01]] | aix4.[[01]].*)
3210      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
3211	   echo ' yes '
3212	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
3213	:
3214      else
3215	can_build_shared=no
3216      fi
3217      ;;
3218    esac
3219    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
3220    # soname into executable. Probably we can add versioning support to
3221    # collect2, so additional links can be useful in future.
3222    if test "$aix_use_runtimelinking" = yes; then
3223      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
3224      # instead of lib<name>.a to let people know that these are not
3225      # typical AIX shared libraries.
3226      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3227    else
3228      # We preserve .a as extension for shared libraries through AIX4.2
3229      # and later when we are not doing run time linking.
3230      library_names_spec='${libname}${release}.a $libname.a'
3231      soname_spec='${libname}${release}${shared_ext}$major'
3232    fi
3233    shlibpath_var=LIBPATH
3234  fi
3235  ;;
3236
3237amigaos*)
3238  case $host_cpu in
3239  powerpc)
3240    # Since July 2007 AmigaOS4 officially supports .so libraries.
3241    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
3242    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3243    ;;
3244  m68k)
3245    library_names_spec='$libname.ixlibrary $libname.a'
3246    # Create ${libname}_ixlibrary.a entries in /sys/libs.
3247    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''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'
3248    ;;
3249  esac
3250  ;;
3251
3252beos*)
3253  library_names_spec='${libname}${shared_ext}'
3254  dynamic_linker="$host_os ld.so"
3255  shlibpath_var=LIBRARY_PATH
3256  ;;
3257
3258bsdi[[45]]*)
3259  version_type=linux
3260  need_version=no
3261  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3262  soname_spec='${libname}${release}${shared_ext}$major'
3263  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
3264  shlibpath_var=LD_LIBRARY_PATH
3265  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
3266  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
3267  # the default ld.so.conf also contains /usr/contrib/lib and
3268  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
3269  # libtool to hard-code these into programs
3270  ;;
3271
3272cygwin* | mingw* | pw32* | cegcc*)
3273  version_type=windows
3274  shrext_cmds=".dll"
3275  need_version=no
3276  need_lib_prefix=no
3277
3278  case $GCC,$cc_basename in
3279  yes,*)
3280    # gcc
3281    library_names_spec='$libname.dll.a'
3282    # DLL is installed to $(libdir)/../bin by postinstall_cmds
3283    postinstall_cmds='base_file=`basename \${file}`~
3284      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
3285      dldir=$destdir/`dirname \$dlpath`~
3286      test -d \$dldir || mkdir -p \$dldir~
3287      $install_prog $dir/$dlname \$dldir/$dlname~
3288      chmod a+x \$dldir/$dlname~
3289      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
3290        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
3291      fi'
3292    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3293      dlpath=$dir/\$dldll~
3294       $RM \$dlpath'
3295    shlibpath_overrides_runpath=yes
3296
3297    case $host_os in
3298    cygwin*)
3299      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
3300      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3301m4_if([$1], [],[
3302      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
3303      ;;
3304    mingw* | cegcc*)
3305      # MinGW DLLs use traditional 'lib' prefix
3306      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3307      ;;
3308    pw32*)
3309      # pw32 DLLs use 'pw' prefix rather than 'lib'
3310      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3311      ;;
3312    esac
3313    dynamic_linker='Win32 ld.exe'
3314    ;;
3315
3316  *,cl*)
3317    # Native MSVC
3318    libname_spec='$name'
3319    soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3320    library_names_spec='${libname}.dll.lib'
3321
3322    case $build_os in
3323    mingw*)
3324      sys_lib_search_path_spec=
3325      lt_save_ifs=$IFS
3326      IFS=';'
3327      for lt_path in $LIB
3328      do
3329        IFS=$lt_save_ifs
3330        # Let DOS variable expansion print the short 8.3 style file name.
3331        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
3332        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
3333      done
3334      IFS=$lt_save_ifs
3335      # Convert to MSYS style.
3336      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
3337      ;;
3338    cygwin*)
3339      # Convert to unix form, then to dos form, then back to unix form
3340      # but this time dos style (no spaces!) so that the unix form looks
3341      # like /cygdrive/c/PROGRA~1:/cygdr...
3342      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
3343      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
3344      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3345      ;;
3346    *)
3347      sys_lib_search_path_spec="$LIB"
3348      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
3349        # It is most probably a Windows format PATH.
3350        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
3351      else
3352        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3353      fi
3354      # FIXME: find the short name or the path components, as spaces are
3355      # common. (e.g. "Program Files" -> "PROGRA~1")
3356      ;;
3357    esac
3358
3359    # DLL is installed to $(libdir)/../bin by postinstall_cmds
3360    postinstall_cmds='base_file=`basename \${file}`~
3361      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
3362      dldir=$destdir/`dirname \$dlpath`~
3363      test -d \$dldir || mkdir -p \$dldir~
3364      $install_prog $dir/$dlname \$dldir/$dlname'
3365    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3366      dlpath=$dir/\$dldll~
3367       $RM \$dlpath'
3368    shlibpath_overrides_runpath=yes
3369    dynamic_linker='Win32 link.exe'
3370    ;;
3371
3372  *)
3373    # Assume MSVC wrapper
3374    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
3375    dynamic_linker='Win32 ld.exe'
3376    ;;
3377  esac
3378  # FIXME: first we should search . and the directory the executable is in
3379  shlibpath_var=PATH
3380  ;;
3381
3382darwin* | rhapsody*)
3383  dynamic_linker="$host_os dyld"
3384  version_type=darwin
3385  need_lib_prefix=no
3386  need_version=no
3387  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
3388  soname_spec='${libname}${release}${major}$shared_ext'
3389  shlibpath_overrides_runpath=yes
3390  shlibpath_var=DYLD_LIBRARY_PATH
3391  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
3392m4_if([$1], [],[
3393  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
3394  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
3395  ;;
3396
3397dgux*)
3398  version_type=linux
3399  need_lib_prefix=no
3400  need_version=no
3401  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
3402  soname_spec='${libname}${release}${shared_ext}$major'
3403  shlibpath_var=LD_LIBRARY_PATH
3404  ;;
3405
3406freebsd1*)
3407  dynamic_linker=no
3408  ;;
3409
3410freebsd* | dragonfly*)
3411  # DragonFly does not have aout.  When/if they implement a new
3412  # versioning mechanism, adjust this.
3413  if test -x /usr/bin/objformat; then
3414    objformat=`/usr/bin/objformat`
3415  else
3416    case $host_os in
3417    freebsd[[123]]*) objformat=aout ;;
3418    *) objformat=elf ;;
3419    esac
3420  fi
3421  version_type=freebsd-$objformat
3422  case $version_type in
3423    freebsd-elf*)
3424      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3425      need_version=no
3426      need_lib_prefix=no
3427      ;;
3428    freebsd-*)
3429      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
3430      need_version=yes
3431      ;;
3432  esac
3433  shlibpath_var=LD_LIBRARY_PATH
3434  case $host_os in
3435  freebsd2*)
3436    shlibpath_overrides_runpath=yes
3437    ;;
3438  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
3439    shlibpath_overrides_runpath=yes
3440    hardcode_into_libs=yes
3441    ;;
3442  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
3443  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
3444    shlibpath_overrides_runpath=no
3445    hardcode_into_libs=yes
3446    ;;
3447  *) # from 4.6 on, and DragonFly
3448    shlibpath_overrides_runpath=yes
3449    hardcode_into_libs=yes
3450    ;;
3451  esac
3452  ;;
3453
3454gnu*)
3455  version_type=linux
3456  need_lib_prefix=no
3457  need_version=no
3458  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
3459  soname_spec='${libname}${release}${shared_ext}$major'
3460  shlibpath_var=LD_LIBRARY_PATH
3461  hardcode_into_libs=yes
3462  ;;
3463
3464haiku*)
3465  version_type=linux
3466  need_lib_prefix=no
3467  need_version=no
3468  dynamic_linker="$host_os runtime_loader"
3469  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
3470  soname_spec='${libname}${release}${shared_ext}$major'
3471  shlibpath_var=LIBRARY_PATH
3472  shlibpath_overrides_runpath=yes
3473  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
3474  hardcode_into_libs=yes
3475  ;;
3476
3477hpux9* | hpux10* | hpux11*)
3478  # Give a soname corresponding to the major version so that dld.sl refuses to
3479  # link against other versions.
3480  version_type=sunos
3481  need_lib_prefix=no
3482  need_version=no
3483  case $host_cpu in
3484  ia64*)
3485    shrext_cmds='.so'
3486    hardcode_into_libs=yes
3487    dynamic_linker="$host_os dld.so"
3488    shlibpath_var=LD_LIBRARY_PATH
3489    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3490    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3491    soname_spec='${libname}${release}${shared_ext}$major'
3492    if test "X$HPUX_IA64_MODE" = X32; then
3493      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
3494    else
3495      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
3496    fi
3497    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3498    ;;
3499  hppa*64*)
3500    shrext_cmds='.sl'
3501    hardcode_into_libs=yes
3502    dynamic_linker="$host_os dld.sl"
3503    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
3504    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3505    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3506    soname_spec='${libname}${release}${shared_ext}$major'
3507    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
3508    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3509    ;;
3510  *)
3511    shrext_cmds='.sl'
3512    dynamic_linker="$host_os dld.sl"
3513    shlibpath_var=SHLIB_PATH
3514    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
3515    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3516    soname_spec='${libname}${release}${shared_ext}$major'
3517    ;;
3518  esac
3519  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
3520  postinstall_cmds='chmod 555 $lib'
3521  # or fails outright, so override atomically:
3522  install_override_mode=555
3523  ;;
3524
3525interix[[3-9]]*)
3526  version_type=linux
3527  need_lib_prefix=no
3528  need_version=no
3529  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3530  soname_spec='${libname}${release}${shared_ext}$major'
3531  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
3532  shlibpath_var=LD_LIBRARY_PATH
3533  shlibpath_overrides_runpath=no
3534  hardcode_into_libs=yes
3535  ;;
3536
3537irix5* | irix6* | nonstopux*)
3538  case $host_os in
3539    nonstopux*) version_type=nonstopux ;;
3540    *)
3541	if test "$lt_cv_prog_gnu_ld" = yes; then
3542		version_type=linux
3543	else
3544		version_type=irix
3545	fi ;;
3546  esac
3547  need_lib_prefix=no
3548  need_version=no
3549  soname_spec='${libname}${release}${shared_ext}$major'
3550  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
3551  case $host_os in
3552  irix5* | nonstopux*)
3553    libsuff= shlibsuff=
3554    ;;
3555  *)
3556    case $LD in # libtool.m4 will add one of these switches to LD
3557    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
3558      libsuff= shlibsuff= libmagic=32-bit;;
3559    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
3560      libsuff=32 shlibsuff=N32 libmagic=N32;;
3561    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
3562      libsuff=64 shlibsuff=64 libmagic=64-bit;;
3563    *) libsuff= shlibsuff= libmagic=never-match;;
3564    esac
3565    ;;
3566  esac
3567  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
3568  shlibpath_overrides_runpath=no
3569  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
3570  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
3571  hardcode_into_libs=yes
3572  ;;
3573
3574# No shared lib support for Linux oldld, aout, or coff.
3575linux*oldld* | linux*aout* | linux*coff*)
3576  dynamic_linker=no
3577  ;;
3578
3579# This must be Linux ELF.
3580linux* | k*bsd*-gnu | kopensolaris*-gnu)
3581  version_type=linux
3582  need_lib_prefix=no
3583  need_version=no
3584  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3585  soname_spec='${libname}${release}${shared_ext}$major'
3586  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
3587  shlibpath_var=LD_LIBRARY_PATH
3588  shlibpath_overrides_runpath=no
3589
3590  # Some binutils ld are patched to set DT_RUNPATH
3591  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
3592    [lt_cv_shlibpath_overrides_runpath=no
3593    save_LDFLAGS=$LDFLAGS
3594    save_libdir=$libdir
3595    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
3596	 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
3597    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
3598      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
3599	 [lt_cv_shlibpath_overrides_runpath=yes])])
3600    LDFLAGS=$save_LDFLAGS
3601    libdir=$save_libdir
3602    ])
3603  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
3604
3605  # This implies no fast_install, which is unacceptable.
3606  # Some rework will be needed to allow for fast_install
3607  # before this can be enabled.
3608  hardcode_into_libs=yes
3609
3610  # Add ABI-specific directories to the system library path.
3611  sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
3612
3613  # Append ld.so.conf contents to the search path
3614  if test -f /etc/ld.so.conf; then
3615    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
3616    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
3617
3618  fi
3619
3620  # We used to test for /lib/ld.so.1 and disable shared libraries on
3621  # powerpc, because MkLinux only supported shared libraries with the
3622  # GNU dynamic linker.  Since this was broken with cross compilers,
3623  # most powerpc-linux boxes support dynamic linking these days and
3624  # people can always --disable-shared, the test was removed, and we
3625  # assume the GNU/Linux dynamic linker is in use.
3626  dynamic_linker='GNU/Linux ld.so'
3627  ;;
3628
3629netbsd*)
3630  version_type=sunos
3631  need_lib_prefix=no
3632  need_version=no
3633  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
3634    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3635    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3636    dynamic_linker='NetBSD (a.out) ld.so'
3637  else
3638    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3639    soname_spec='${libname}${release}${shared_ext}$major'
3640    dynamic_linker='NetBSD ld.elf_so'
3641  fi
3642  shlibpath_var=LD_LIBRARY_PATH
3643  shlibpath_overrides_runpath=yes
3644  hardcode_into_libs=yes
3645  ;;
3646
3647newsos6)
3648  version_type=linux
3649  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3650  shlibpath_var=LD_LIBRARY_PATH
3651  shlibpath_overrides_runpath=yes
3652  ;;
3653
3654*nto* | *qnx*)
3655  version_type=qnx
3656  need_lib_prefix=no
3657  need_version=no
3658  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3659  soname_spec='${libname}${release}${shared_ext}$major'
3660  shlibpath_var=LD_LIBRARY_PATH
3661  shlibpath_overrides_runpath=no
3662  hardcode_into_libs=yes
3663  dynamic_linker='ldqnx.so'
3664  ;;
3665
3666openbsd*)
3667  version_type=sunos
3668  sys_lib_dlsearch_path_spec="/usr/lib"
3669  need_lib_prefix=no
3670  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
3671  case $host_os in
3672    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
3673    *)				need_version=no  ;;
3674  esac
3675  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3676  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3677  shlibpath_var=LD_LIBRARY_PATH
3678  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3679    case $host_os in
3680      openbsd2.[[89]] | openbsd2.[[89]].*)
3681	shlibpath_overrides_runpath=no
3682	;;
3683      *)
3684	shlibpath_overrides_runpath=yes
3685	;;
3686      esac
3687  else
3688    shlibpath_overrides_runpath=yes
3689  fi
3690  ;;
3691
3692os2*)
3693  libname_spec='$name'
3694  shrext_cmds=".dll"
3695  need_lib_prefix=no
3696  library_names_spec='$libname${shared_ext} $libname.a'
3697  dynamic_linker='OS/2 ld.exe'
3698  shlibpath_var=LIBPATH
3699  ;;
3700
3701osf3* | osf4* | osf5*)
3702  version_type=osf
3703  need_lib_prefix=no
3704  need_version=no
3705  soname_spec='${libname}${release}${shared_ext}$major'
3706  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3707  shlibpath_var=LD_LIBRARY_PATH
3708  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3709  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
3710  ;;
3711
3712rdos*)
3713  dynamic_linker=no
3714  ;;
3715
3716solaris*)
3717  version_type=linux
3718  need_lib_prefix=no
3719  need_version=no
3720  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3721  soname_spec='${libname}${release}${shared_ext}$major'
3722  shlibpath_var=LD_LIBRARY_PATH
3723  shlibpath_overrides_runpath=yes
3724  hardcode_into_libs=yes
3725  # ldd complains unless libraries are executable
3726  postinstall_cmds='chmod +x $lib'
3727  ;;
3728
3729sunos4*)
3730  version_type=sunos
3731  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3732  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3733  shlibpath_var=LD_LIBRARY_PATH
3734  shlibpath_overrides_runpath=yes
3735  if test "$with_gnu_ld" = yes; then
3736    need_lib_prefix=no
3737  fi
3738  need_version=yes
3739  ;;
3740
3741sysv4 | sysv4.3*)
3742  version_type=linux
3743  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3744  soname_spec='${libname}${release}${shared_ext}$major'
3745  shlibpath_var=LD_LIBRARY_PATH
3746  case $host_vendor in
3747    sni)
3748      shlibpath_overrides_runpath=no
3749      need_lib_prefix=no
3750      runpath_var=LD_RUN_PATH
3751      ;;
3752    siemens)
3753      need_lib_prefix=no
3754      ;;
3755    motorola)
3756      need_lib_prefix=no
3757      need_version=no
3758      shlibpath_overrides_runpath=no
3759      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3760      ;;
3761  esac
3762  ;;
3763
3764sysv4*MP*)
3765  if test -d /usr/nec ;then
3766    version_type=linux
3767    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
3768    soname_spec='$libname${shared_ext}.$major'
3769    shlibpath_var=LD_LIBRARY_PATH
3770  fi
3771  ;;
3772
3773sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3774  version_type=freebsd-elf
3775  need_lib_prefix=no
3776  need_version=no
3777  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3778  soname_spec='${libname}${release}${shared_ext}$major'
3779  shlibpath_var=LD_LIBRARY_PATH
3780  shlibpath_overrides_runpath=yes
3781  hardcode_into_libs=yes
3782  if test "$with_gnu_ld" = yes; then
3783    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
3784  else
3785    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
3786    case $host_os in
3787      sco3.2v5*)
3788        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
3789	;;
3790    esac
3791  fi
3792  sys_lib_dlsearch_path_spec='/usr/lib'
3793  ;;
3794
3795tpf*)
3796  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
3797  version_type=linux
3798  need_lib_prefix=no
3799  need_version=no
3800  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3801  shlibpath_var=LD_LIBRARY_PATH
3802  shlibpath_overrides_runpath=no
3803  hardcode_into_libs=yes
3804  ;;
3805
3806uts4*)
3807  version_type=linux
3808  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3809  soname_spec='${libname}${release}${shared_ext}$major'
3810  shlibpath_var=LD_LIBRARY_PATH
3811  ;;
3812
3813*)
3814  dynamic_linker=no
3815  ;;
3816esac
3817AC_MSG_RESULT([$dynamic_linker])
3818test "$dynamic_linker" = no && can_build_shared=no
3819
3820variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3821if test "$GCC" = yes; then
3822  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3823fi
3824
3825if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
3826  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
3827fi
3828if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
3829  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
3830fi
3831
3832_LT_DECL([], [variables_saved_for_relink], [1],
3833    [Variables whose values should be saved in libtool wrapper scripts and
3834    restored at link time])
3835_LT_DECL([], [need_lib_prefix], [0],
3836    [Do we need the "lib" prefix for modules?])
3837_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
3838_LT_DECL([], [version_type], [0], [Library versioning type])
3839_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
3840_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
3841_LT_DECL([], [shlibpath_overrides_runpath], [0],
3842    [Is shlibpath searched before the hard-coded library search path?])
3843_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
3844_LT_DECL([], [library_names_spec], [1],
3845    [[List of archive names.  First name is the real one, the rest are links.
3846    The last name is the one that the linker finds with -lNAME]])
3847_LT_DECL([], [soname_spec], [1],
3848    [[The coded name of the library, if different from the real name]])
3849_LT_DECL([], [install_override_mode], [1],
3850    [Permission mode override for installation of shared libraries])
3851_LT_DECL([], [postinstall_cmds], [2],
3852    [Command to use after installation of a shared archive])
3853_LT_DECL([], [postuninstall_cmds], [2],
3854    [Command to use after uninstallation of a shared archive])
3855_LT_DECL([], [finish_cmds], [2],
3856    [Commands used to finish a libtool library installation in a directory])
3857_LT_DECL([], [finish_eval], [1],
3858    [[As "finish_cmds", except a single script fragment to be evaled but
3859    not shown]])
3860_LT_DECL([], [hardcode_into_libs], [0],
3861    [Whether we should hardcode library paths into libraries])
3862_LT_DECL([], [sys_lib_search_path_spec], [2],
3863    [Compile-time system search path for libraries])
3864_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
3865    [Run-time system search path for libraries])
3866])# _LT_SYS_DYNAMIC_LINKER
3867
3868
3869# _LT_PATH_TOOL_PREFIX(TOOL)
3870# --------------------------
3871# find a file program which can recognize shared library
3872AC_DEFUN([_LT_PATH_TOOL_PREFIX],
3873[m4_require([_LT_DECL_EGREP])dnl
3874AC_MSG_CHECKING([for $1])
3875AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3876[case $MAGIC_CMD in
3877[[\\/*] |  ?:[\\/]*])
3878  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3879  ;;
3880*)
3881  lt_save_MAGIC_CMD="$MAGIC_CMD"
3882  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3883dnl $ac_dummy forces splitting on constant user-supplied paths.
3884dnl POSIX.2 word splitting is done only on the output of word expansions,
3885dnl not every word.  This closes a longstanding sh security hole.
3886  ac_dummy="m4_if([$2], , $PATH, [$2])"
3887  for ac_dir in $ac_dummy; do
3888    IFS="$lt_save_ifs"
3889    test -z "$ac_dir" && ac_dir=.
3890    if test -f $ac_dir/$1; then
3891      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3892      if test -n "$file_magic_test_file"; then
3893	case $deplibs_check_method in
3894	"file_magic "*)
3895	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3896	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3897	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3898	    $EGREP "$file_magic_regex" > /dev/null; then
3899	    :
3900	  else
3901	    cat <<_LT_EOF 1>&2
3902
3903*** Warning: the command libtool uses to detect shared libraries,
3904*** $file_magic_cmd, produces output that libtool cannot recognize.
3905*** The result is that libtool may fail to recognize shared libraries
3906*** as such.  This will affect the creation of libtool libraries that
3907*** depend on shared libraries, but programs linked with such libtool
3908*** libraries will work regardless of this problem.  Nevertheless, you
3909*** may want to report the problem to your system manager and/or to
3910*** bug-libtool@gnu.org
3911
3912_LT_EOF
3913	  fi ;;
3914	esac
3915      fi
3916      break
3917    fi
3918  done
3919  IFS="$lt_save_ifs"
3920  MAGIC_CMD="$lt_save_MAGIC_CMD"
3921  ;;
3922esac])
3923MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3924if test -n "$MAGIC_CMD"; then
3925  AC_MSG_RESULT($MAGIC_CMD)
3926else
3927  AC_MSG_RESULT(no)
3928fi
3929_LT_DECL([], [MAGIC_CMD], [0],
3930	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
3931])# _LT_PATH_TOOL_PREFIX
3932
3933# Old name:
3934AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
3935dnl aclocal-1.4 backwards compatibility:
3936dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
3937
3938
3939# _LT_PATH_MAGIC
3940# --------------
3941# find a file program which can recognize a shared library
3942m4_defun([_LT_PATH_MAGIC],
3943[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3944if test -z "$lt_cv_path_MAGIC_CMD"; then
3945  if test -n "$ac_tool_prefix"; then
3946    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3947  else
3948    MAGIC_CMD=:
3949  fi
3950fi
3951])# _LT_PATH_MAGIC
3952
3953
3954# LT_PATH_LD
3955# ----------
3956# find the pathname to the GNU or non-GNU linker
3957AC_DEFUN([LT_PATH_LD],
3958[AC_REQUIRE([AC_PROG_CC])dnl
3959AC_REQUIRE([AC_CANONICAL_HOST])dnl
3960AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3961m4_require([_LT_DECL_SED])dnl
3962m4_require([_LT_DECL_EGREP])dnl
3963m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
3964
3965AC_ARG_WITH([gnu-ld],
3966    [AS_HELP_STRING([--with-gnu-ld],
3967	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
3968    [test "$withval" = no || with_gnu_ld=yes],
3969    [with_gnu_ld=no])dnl
3970
3971ac_prog=ld
3972if test "$GCC" = yes; then
3973  # Check if gcc -print-prog-name=ld gives a path.
3974  AC_MSG_CHECKING([for ld used by $CC])
3975  case $host in
3976  *-*-mingw*)
3977    # gcc leaves a trailing carriage return which upsets mingw
3978    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3979  *)
3980    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3981  esac
3982  case $ac_prog in
3983    # Accept absolute paths.
3984    [[\\/]]* | ?:[[\\/]]*)
3985      re_direlt='/[[^/]][[^/]]*/\.\./'
3986      # Canonicalize the pathname of ld
3987      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
3988      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
3989	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
3990      done
3991      test -z "$LD" && LD="$ac_prog"
3992      ;;
3993  "")
3994    # If it fails, then pretend we aren't using GCC.
3995    ac_prog=ld
3996    ;;
3997  *)
3998    # If it is relative, then search for the first ld in PATH.
3999    with_gnu_ld=unknown
4000    ;;
4001  esac
4002elif test "$with_gnu_ld" = yes; then
4003  AC_MSG_CHECKING([for GNU ld])
4004else
4005  AC_MSG_CHECKING([for non-GNU ld])
4006fi
4007AC_CACHE_VAL(lt_cv_path_LD,
4008[if test -z "$LD"; then
4009  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4010  for ac_dir in $PATH; do
4011    IFS="$lt_save_ifs"
4012    test -z "$ac_dir" && ac_dir=.
4013    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4014      lt_cv_path_LD="$ac_dir/$ac_prog"
4015      # Check to see if the program is GNU ld.  I'd rather use --version,
4016      # but apparently some variants of GNU ld only accept -v.
4017      # Break only if it was the GNU/non-GNU ld that we prefer.
4018      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
4019      *GNU* | *'with BFD'*)
4020	test "$with_gnu_ld" != no && break
4021	;;
4022      *)
4023	test "$with_gnu_ld" != yes && break
4024	;;
4025      esac
4026    fi
4027  done
4028  IFS="$lt_save_ifs"
4029else
4030  lt_cv_path_LD="$LD" # Let the user override the test with a path.
4031fi])
4032LD="$lt_cv_path_LD"
4033if test -n "$LD"; then
4034  AC_MSG_RESULT($LD)
4035else
4036  AC_MSG_RESULT(no)
4037fi
4038test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
4039_LT_PATH_LD_GNU
4040AC_SUBST([LD])
4041
4042_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
4043])# LT_PATH_LD
4044
4045# Old names:
4046AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
4047AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
4048dnl aclocal-1.4 backwards compatibility:
4049dnl AC_DEFUN([AM_PROG_LD], [])
4050dnl AC_DEFUN([AC_PROG_LD], [])
4051
4052
4053# _LT_PATH_LD_GNU
4054#- --------------
4055m4_defun([_LT_PATH_LD_GNU],
4056[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
4057[# I'd rather use --version here, but apparently some GNU lds only accept -v.
4058case `$LD -v 2>&1 </dev/null` in
4059*GNU* | *'with BFD'*)
4060  lt_cv_prog_gnu_ld=yes
4061  ;;
4062*)
4063  lt_cv_prog_gnu_ld=no
4064  ;;
4065esac])
4066with_gnu_ld=$lt_cv_prog_gnu_ld
4067])# _LT_PATH_LD_GNU
4068
4069
4070# _LT_CMD_RELOAD
4071# --------------
4072# find reload flag for linker
4073#   -- PORTME Some linkers may need a different reload flag.
4074m4_defun([_LT_CMD_RELOAD],
4075[AC_CACHE_CHECK([for $LD option to reload object files],
4076  lt_cv_ld_reload_flag,
4077  [lt_cv_ld_reload_flag='-r'])
4078reload_flag=$lt_cv_ld_reload_flag
4079case $reload_flag in
4080"" | " "*) ;;
4081*) reload_flag=" $reload_flag" ;;
4082esac
4083reload_cmds='$LD$reload_flag -o $output$reload_objs'
4084case $host_os in
4085  cygwin* | mingw* | pw32* | cegcc*)
4086    if test "$GCC" != yes; then
4087      reload_cmds=false
4088    fi
4089    ;;
4090  darwin*)
4091    if test "$GCC" = yes; then
4092      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
4093    else
4094      reload_cmds='$LD$reload_flag -o $output$reload_objs'
4095    fi
4096    ;;
4097esac
4098_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
4099_LT_TAGDECL([], [reload_cmds], [2])dnl
4100])# _LT_CMD_RELOAD
4101
4102
4103# _LT_CHECK_MAGIC_METHOD
4104# ----------------------
4105# how to check for library dependencies
4106#  -- PORTME fill in with the dynamic library characteristics
4107m4_defun([_LT_CHECK_MAGIC_METHOD],
4108[m4_require([_LT_DECL_EGREP])
4109m4_require([_LT_DECL_OBJDUMP])
4110AC_CACHE_CHECK([how to recognize dependent libraries],
4111lt_cv_deplibs_check_method,
4112[lt_cv_file_magic_cmd='$MAGIC_CMD'
4113lt_cv_file_magic_test_file=
4114lt_cv_deplibs_check_method='unknown'
4115# Need to set the preceding variable on all platforms that support
4116# interlibrary dependencies.
4117# 'none' -- dependencies not supported.
4118# `unknown' -- same as none, but documents that we really don't know.
4119# 'pass_all' -- all dependencies passed with no checks.
4120# 'test_compile' -- check by making test program.
4121# 'file_magic [[regex]]' -- check by looking for files in library path
4122# which responds to the $file_magic_cmd with a given extended regex.
4123# If you have `file' or equivalent on your system and you're not sure
4124# whether `pass_all' will *always* work, you probably want this one.
4125
4126case $host_os in
4127aix[[4-9]]*)
4128  lt_cv_deplibs_check_method=pass_all
4129  ;;
4130
4131beos*)
4132  lt_cv_deplibs_check_method=pass_all
4133  ;;
4134
4135bsdi[[45]]*)
4136  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
4137  lt_cv_file_magic_cmd='/usr/bin/file -L'
4138  lt_cv_file_magic_test_file=/shlib/libc.so
4139  ;;
4140
4141cygwin*)
4142  # func_win32_libid is a shell function defined in ltmain.sh
4143  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4144  lt_cv_file_magic_cmd='func_win32_libid'
4145  ;;
4146
4147mingw* | pw32*)
4148  # Base MSYS/MinGW do not provide the 'file' command needed by
4149  # func_win32_libid shell function, so use a weaker test based on 'objdump',
4150  # unless we find 'file', for example because we are cross-compiling.
4151  # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
4152  if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
4153    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4154    lt_cv_file_magic_cmd='func_win32_libid'
4155  else
4156    # Keep this pattern in sync with the one in func_win32_libid.
4157    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
4158    lt_cv_file_magic_cmd='$OBJDUMP -f'
4159  fi
4160  ;;
4161
4162cegcc*)
4163  # use the weaker test based on 'objdump'. See mingw*.
4164  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
4165  lt_cv_file_magic_cmd='$OBJDUMP -f'
4166  ;;
4167
4168darwin* | rhapsody*)
4169  lt_cv_deplibs_check_method=pass_all
4170  ;;
4171
4172freebsd* | dragonfly*)
4173  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4174    case $host_cpu in
4175    i*86 )
4176      # Not sure whether the presence of OpenBSD here was a mistake.
4177      # Let's accept both of them until this is cleared up.
4178      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
4179      lt_cv_file_magic_cmd=/usr/bin/file
4180      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4181      ;;
4182    esac
4183  else
4184    lt_cv_deplibs_check_method=pass_all
4185  fi
4186  ;;
4187
4188gnu*)
4189  lt_cv_deplibs_check_method=pass_all
4190  ;;
4191
4192haiku*)
4193  lt_cv_deplibs_check_method=pass_all
4194  ;;
4195
4196hpux10.20* | hpux11*)
4197  lt_cv_file_magic_cmd=/usr/bin/file
4198  case $host_cpu in
4199  ia64*)
4200    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
4201    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
4202    ;;
4203  hppa*64*)
4204    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
4205    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
4206    ;;
4207  *)
4208    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
4209    lt_cv_file_magic_test_file=/usr/lib/libc.sl
4210    ;;
4211  esac
4212  ;;
4213
4214interix[[3-9]]*)
4215  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
4216  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
4217  ;;
4218
4219irix5* | irix6* | nonstopux*)
4220  case $LD in
4221  *-32|*"-32 ") libmagic=32-bit;;
4222  *-n32|*"-n32 ") libmagic=N32;;
4223  *-64|*"-64 ") libmagic=64-bit;;
4224  *) libmagic=never-match;;
4225  esac
4226  lt_cv_deplibs_check_method=pass_all
4227  ;;
4228
4229# This must be Linux ELF.
4230linux* | k*bsd*-gnu | kopensolaris*-gnu)
4231  lt_cv_deplibs_check_method=pass_all
4232  ;;
4233
4234netbsd*)
4235  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4236    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4237  else
4238    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
4239  fi
4240  ;;
4241
4242newos6*)
4243  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
4244  lt_cv_file_magic_cmd=/usr/bin/file
4245  lt_cv_file_magic_test_file=/usr/lib/libnls.so
4246  ;;
4247
4248*nto* | *qnx*)
4249  lt_cv_deplibs_check_method=pass_all
4250  ;;
4251
4252openbsd*)
4253  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4254    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
4255  else
4256    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4257  fi
4258  ;;
4259
4260osf3* | osf4* | osf5*)
4261  lt_cv_deplibs_check_method=pass_all
4262  ;;
4263
4264rdos*)
4265  lt_cv_deplibs_check_method=pass_all
4266  ;;
4267
4268solaris*)
4269  lt_cv_deplibs_check_method=pass_all
4270  ;;
4271
4272sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4273  lt_cv_deplibs_check_method=pass_all
4274  ;;
4275
4276sysv4 | sysv4.3*)
4277  case $host_vendor in
4278  motorola)
4279    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]]'
4280    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4281    ;;
4282  ncr)
4283    lt_cv_deplibs_check_method=pass_all
4284    ;;
4285  sequent)
4286    lt_cv_file_magic_cmd='/bin/file'
4287    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
4288    ;;
4289  sni)
4290    lt_cv_file_magic_cmd='/bin/file'
4291    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4292    lt_cv_file_magic_test_file=/lib/libc.so
4293    ;;
4294  siemens)
4295    lt_cv_deplibs_check_method=pass_all
4296    ;;
4297  pc)
4298    lt_cv_deplibs_check_method=pass_all
4299    ;;
4300  esac
4301  ;;
4302
4303tpf*)
4304  lt_cv_deplibs_check_method=pass_all
4305  ;;
4306esac
4307])
4308
4309file_magic_glob=
4310want_nocaseglob=no
4311if test "$build" = "$host"; then
4312  case $host_os in
4313  mingw* | pw32*)
4314    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
4315      want_nocaseglob=yes
4316    else
4317      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
4318    fi
4319    ;;
4320  esac
4321fi
4322
4323file_magic_cmd=$lt_cv_file_magic_cmd
4324deplibs_check_method=$lt_cv_deplibs_check_method
4325test -z "$deplibs_check_method" && deplibs_check_method=unknown
4326
4327_LT_DECL([], [deplibs_check_method], [1],
4328    [Method to check whether dependent libraries are shared objects])
4329_LT_DECL([], [file_magic_cmd], [1],
4330    [Command to use when deplibs_check_method = "file_magic"])
4331_LT_DECL([], [file_magic_glob], [1],
4332    [How to find potential files when deplibs_check_method = "file_magic"])
4333_LT_DECL([], [want_nocaseglob], [1],
4334    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
4335])# _LT_CHECK_MAGIC_METHOD
4336
4337
4338# LT_PATH_NM
4339# ----------
4340# find the pathname to a BSD- or MS-compatible name lister
4341AC_DEFUN([LT_PATH_NM],
4342[AC_REQUIRE([AC_PROG_CC])dnl
4343AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
4344[if test -n "$NM"; then
4345  # Let the user override the test.
4346  lt_cv_path_NM="$NM"
4347else
4348  lt_nm_to_check="${ac_tool_prefix}nm"
4349  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
4350    lt_nm_to_check="$lt_nm_to_check nm"
4351  fi
4352  for lt_tmp_nm in $lt_nm_to_check; do
4353    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4354    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
4355      IFS="$lt_save_ifs"
4356      test -z "$ac_dir" && ac_dir=.
4357      tmp_nm="$ac_dir/$lt_tmp_nm"
4358      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
4359	# Check to see if the nm accepts a BSD-compat flag.
4360	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
4361	#   nm: unknown option "B" ignored
4362	# Tru64's nm complains that /dev/null is an invalid object file
4363	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
4364	*/dev/null* | *'Invalid file or object type'*)
4365	  lt_cv_path_NM="$tmp_nm -B"
4366	  break
4367	  ;;
4368	*)
4369	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
4370	  */dev/null*)
4371	    lt_cv_path_NM="$tmp_nm -p"
4372	    break
4373	    ;;
4374	  *)
4375	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4376	    continue # so that we can try to find one that supports BSD flags
4377	    ;;
4378	  esac
4379	  ;;
4380	esac
4381      fi
4382    done
4383    IFS="$lt_save_ifs"
4384  done
4385  : ${lt_cv_path_NM=no}
4386fi])
4387if test "$lt_cv_path_NM" != "no"; then
4388  NM="$lt_cv_path_NM"
4389else
4390  # Didn't find any BSD compatible name lister, look for dumpbin.
4391  if test -n "$DUMPBIN"; then :
4392    # Let the user override the test.
4393  else
4394    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
4395    case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
4396    *COFF*)
4397      DUMPBIN="$DUMPBIN -symbols"
4398      ;;
4399    *)
4400      DUMPBIN=:
4401      ;;
4402    esac
4403  fi
4404  AC_SUBST([DUMPBIN])
4405  if test "$DUMPBIN" != ":"; then
4406    NM="$DUMPBIN"
4407  fi
4408fi
4409test -z "$NM" && NM=nm
4410AC_SUBST([NM])
4411_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
4412
4413AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
4414  [lt_cv_nm_interface="BSD nm"
4415  echo "int some_variable = 0;" > conftest.$ac_ext
4416  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
4417  (eval "$ac_compile" 2>conftest.err)
4418  cat conftest.err >&AS_MESSAGE_LOG_FD
4419  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
4420  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
4421  cat conftest.err >&AS_MESSAGE_LOG_FD
4422  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
4423  cat conftest.out >&AS_MESSAGE_LOG_FD
4424  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
4425    lt_cv_nm_interface="MS dumpbin"
4426  fi
4427  rm -f conftest*])
4428])# LT_PATH_NM
4429
4430# Old names:
4431AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
4432AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
4433dnl aclocal-1.4 backwards compatibility:
4434dnl AC_DEFUN([AM_PROG_NM], [])
4435dnl AC_DEFUN([AC_PROG_NM], [])
4436
4437# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
4438# --------------------------------
4439# how to determine the name of the shared library
4440# associated with a specific link library.
4441#  -- PORTME fill in with the dynamic library characteristics
4442m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
4443[m4_require([_LT_DECL_EGREP])
4444m4_require([_LT_DECL_OBJDUMP])
4445m4_require([_LT_DECL_DLLTOOL])
4446AC_CACHE_CHECK([how to associate runtime and link libraries],
4447lt_cv_sharedlib_from_linklib_cmd,
4448[lt_cv_sharedlib_from_linklib_cmd='unknown'
4449
4450case $host_os in
4451cygwin* | mingw* | pw32* | cegcc*)
4452  # two different shell functions defined in ltmain.sh
4453  # decide which to use based on capabilities of $DLLTOOL
4454  case `$DLLTOOL --help 2>&1` in
4455  *--identify-strict*)
4456    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
4457    ;;
4458  *)
4459    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
4460    ;;
4461  esac
4462  ;;
4463*)
4464  # fallback: assume linklib IS sharedlib
4465  lt_cv_sharedlib_from_linklib_cmd="$ECHO"
4466  ;;
4467esac
4468])
4469sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
4470test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
4471
4472_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
4473    [Command to associate shared and link libraries])
4474])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
4475
4476
4477# _LT_PATH_MANIFEST_TOOL
4478# ----------------------
4479# locate the manifest tool
4480m4_defun([_LT_PATH_MANIFEST_TOOL],
4481[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
4482test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
4483AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
4484  [lt_cv_path_mainfest_tool=no
4485  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
4486  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
4487  cat conftest.err >&AS_MESSAGE_LOG_FD
4488  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
4489    lt_cv_path_mainfest_tool=yes
4490  fi
4491  rm -f conftest*])
4492if test "x$lt_cv_path_mainfest_tool" != xyes; then
4493  MANIFEST_TOOL=:
4494fi
4495_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
4496])# _LT_PATH_MANIFEST_TOOL
4497
4498
4499# LT_LIB_M
4500# --------
4501# check for math library
4502AC_DEFUN([LT_LIB_M],
4503[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4504LIBM=
4505case $host in
4506*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
4507  # These system don't have libm, or don't need it
4508  ;;
4509*-ncr-sysv4.3*)
4510  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4511  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
4512  ;;
4513*)
4514  AC_CHECK_LIB(m, cos, LIBM="-lm")
4515  ;;
4516esac
4517AC_SUBST([LIBM])
4518])# LT_LIB_M
4519
4520# Old name:
4521AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
4522dnl aclocal-1.4 backwards compatibility:
4523dnl AC_DEFUN([AC_CHECK_LIBM], [])
4524
4525
4526# _LT_COMPILER_NO_RTTI([TAGNAME])
4527# -------------------------------
4528m4_defun([_LT_COMPILER_NO_RTTI],
4529[m4_require([_LT_TAG_COMPILER])dnl
4530
4531_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4532
4533if test "$GCC" = yes; then
4534  case $cc_basename in
4535  nvcc*)
4536    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
4537  *)
4538    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
4539  esac
4540
4541  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4542    lt_cv_prog_compiler_rtti_exceptions,
4543    [-fno-rtti -fno-exceptions], [],
4544    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4545fi
4546_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
4547	[Compiler flag to turn off builtin functions])
4548])# _LT_COMPILER_NO_RTTI
4549
4550
4551# _LT_CMD_GLOBAL_SYMBOLS
4552# ----------------------
4553m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
4554[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4555AC_REQUIRE([AC_PROG_CC])dnl
4556AC_REQUIRE([AC_PROG_AWK])dnl
4557AC_REQUIRE([LT_PATH_NM])dnl
4558AC_REQUIRE([LT_PATH_LD])dnl
4559m4_require([_LT_DECL_SED])dnl
4560m4_require([_LT_DECL_EGREP])dnl
4561m4_require([_LT_TAG_COMPILER])dnl
4562
4563# Check for command to grab the raw symbol name followed by C symbol from nm.
4564AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4565AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4566[
4567# These are sane defaults that work on at least a few old systems.
4568# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4569
4570# Character class describing NM global symbol codes.
4571symcode='[[BCDEGRST]]'
4572
4573# Regexp to match symbols that can be accessed directly from C.
4574sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4575
4576# Define system-specific variables.
4577case $host_os in
4578aix*)
4579  symcode='[[BCDT]]'
4580  ;;
4581cygwin* | mingw* | pw32* | cegcc*)
4582  symcode='[[ABCDGISTW]]'
4583  ;;
4584hpux*)
4585  if test "$host_cpu" = ia64; then
4586    symcode='[[ABCDEGRST]]'
4587  fi
4588  ;;
4589irix* | nonstopux*)
4590  symcode='[[BCDEGRST]]'
4591  ;;
4592osf*)
4593  symcode='[[BCDEGQRST]]'
4594  ;;
4595solaris*)
4596  symcode='[[BDRT]]'
4597  ;;
4598sco3.2v5*)
4599  symcode='[[DT]]'
4600  ;;
4601sysv4.2uw2*)
4602  symcode='[[DT]]'
4603  ;;
4604sysv5* | sco5v6* | unixware* | OpenUNIX*)
4605  symcode='[[ABDT]]'
4606  ;;
4607sysv4)
4608  symcode='[[DFNSTU]]'
4609  ;;
4610esac
4611
4612# If we're using GNU nm, then use its standard symbol codes.
4613case `$NM -V 2>&1` in
4614*GNU* | *'with BFD'*)
4615  symcode='[[ABCDGIRSTW]]' ;;
4616esac
4617
4618# Transform an extracted symbol line into a proper C declaration.
4619# Some systems (esp. on ia64) link data and code symbols differently,
4620# so use this general approach.
4621lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4622
4623# Transform an extracted symbol line into symbol name and symbol address
4624lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
4625lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
4626
4627# Handle CRLF in mingw tool chain
4628opt_cr=
4629case $build_os in
4630mingw*)
4631  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4632  ;;
4633esac
4634
4635# Try without a prefix underscore, then with it.
4636for ac_symprfx in "" "_"; do
4637
4638  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4639  symxfrm="\\1 $ac_symprfx\\2 \\2"
4640
4641  # Write the raw and C identifiers.
4642  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4643    # Fake it for dumpbin and say T for any non-static function
4644    # and D for any global variable.
4645    # Also find C++ and __fastcall symbols from MSVC++,
4646    # which start with @ or ?.
4647    lt_cv_sys_global_symbol_pipe="$AWK ['"\
4648"     {last_section=section; section=\$ 3};"\
4649"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
4650"     \$ 0!~/External *\|/{next};"\
4651"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
4652"     {if(hide[section]) next};"\
4653"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
4654"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
4655"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
4656"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
4657"     ' prfx=^$ac_symprfx]"
4658  else
4659    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4660  fi
4661  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
4662
4663  # Check to see that the pipe works correctly.
4664  pipe_works=no
4665
4666  rm -f conftest*
4667  cat > conftest.$ac_ext <<_LT_EOF
4668#ifdef __cplusplus
4669extern "C" {
4670#endif
4671char nm_test_var;
4672void nm_test_func(void);
4673void nm_test_func(void){}
4674#ifdef __cplusplus
4675}
4676#endif
4677int main(){nm_test_var='a';nm_test_func();return(0);}
4678_LT_EOF
4679
4680  if AC_TRY_EVAL(ac_compile); then
4681    # Now try to grab the symbols.
4682    nlist=conftest.nm
4683    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
4684      # Try sorting and uniquifying the output.
4685      if sort "$nlist" | uniq > "$nlist"T; then
4686	mv -f "$nlist"T "$nlist"
4687      else
4688	rm -f "$nlist"T
4689      fi
4690
4691      # Make sure that we snagged all the symbols we need.
4692      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
4693	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
4694	  cat <<_LT_EOF > conftest.$ac_ext
4695/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
4696#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
4697/* DATA imports from DLLs on WIN32 con't be const, because runtime
4698   relocations are performed -- see ld's documentation on pseudo-relocs.  */
4699# define LT@&t@_DLSYM_CONST
4700#elif defined(__osf__)
4701/* This system does not cope well with relocations in const data.  */
4702# define LT@&t@_DLSYM_CONST
4703#else
4704# define LT@&t@_DLSYM_CONST const
4705#endif
4706
4707#ifdef __cplusplus
4708extern "C" {
4709#endif
4710
4711_LT_EOF
4712	  # Now generate the symbol file.
4713	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
4714
4715	  cat <<_LT_EOF >> conftest.$ac_ext
4716
4717/* The mapping between symbol names and symbols.  */
4718LT@&t@_DLSYM_CONST struct {
4719  const char *name;
4720  void       *address;
4721}
4722lt__PROGRAM__LTX_preloaded_symbols[[]] =
4723{
4724  { "@PROGRAM@", (void *) 0 },
4725_LT_EOF
4726	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
4727	  cat <<\_LT_EOF >> conftest.$ac_ext
4728  {0, (void *) 0}
4729};
4730
4731/* This works around a problem in FreeBSD linker */
4732#ifdef FREEBSD_WORKAROUND
4733static const void *lt_preloaded_setup() {
4734  return lt__PROGRAM__LTX_preloaded_symbols;
4735}
4736#endif
4737
4738#ifdef __cplusplus
4739}
4740#endif
4741_LT_EOF
4742	  # Now try linking the two files.
4743	  mv conftest.$ac_objext conftstm.$ac_objext
4744	  lt_globsym_save_LIBS=$LIBS
4745	  lt_globsym_save_CFLAGS=$CFLAGS
4746	  LIBS="conftstm.$ac_objext"
4747	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4748	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4749	    pipe_works=yes
4750	  fi
4751	  LIBS=$lt_globsym_save_LIBS
4752	  CFLAGS=$lt_globsym_save_CFLAGS
4753	else
4754	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4755	fi
4756      else
4757	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4758      fi
4759    else
4760      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4761    fi
4762  else
4763    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4764    cat conftest.$ac_ext >&5
4765  fi
4766  rm -rf conftest* conftst*
4767
4768  # Do not use the global_symbol_pipe unless it works.
4769  if test "$pipe_works" = yes; then
4770    break
4771  else
4772    lt_cv_sys_global_symbol_pipe=
4773  fi
4774done
4775])
4776if test -z "$lt_cv_sys_global_symbol_pipe"; then
4777  lt_cv_sys_global_symbol_to_cdecl=
4778fi
4779if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4780  AC_MSG_RESULT(failed)
4781else
4782  AC_MSG_RESULT(ok)
4783fi
4784
4785# Response file support.
4786if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4787  nm_file_list_spec='@'
4788elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
4789  nm_file_list_spec='@'
4790fi
4791
4792_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
4793    [Take the output of nm and produce a listing of raw symbols and C names])
4794_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
4795    [Transform the output of nm in a proper C declaration])
4796_LT_DECL([global_symbol_to_c_name_address],
4797    [lt_cv_sys_global_symbol_to_c_name_address], [1],
4798    [Transform the output of nm in a C name address pair])
4799_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
4800    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
4801    [Transform the output of nm in a C name address pair when lib prefix is needed])
4802_LT_DECL([], [nm_file_list_spec], [1],
4803    [Specify filename containing input files for $NM])
4804]) # _LT_CMD_GLOBAL_SYMBOLS
4805
4806
4807# _LT_COMPILER_PIC([TAGNAME])
4808# ---------------------------
4809m4_defun([_LT_COMPILER_PIC],
4810[m4_require([_LT_TAG_COMPILER])dnl
4811_LT_TAGVAR(lt_prog_compiler_wl, $1)=
4812_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4813_LT_TAGVAR(lt_prog_compiler_static, $1)=
4814
4815m4_if([$1], [CXX], [
4816  # C++ specific cases for pic, static, wl, etc.
4817  if test "$GXX" = yes; then
4818    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4819    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4820
4821    case $host_os in
4822    aix*)
4823      # All AIX code is PIC.
4824      if test "$host_cpu" = ia64; then
4825	# AIX 5 now supports IA64 processor
4826	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4827      fi
4828      ;;
4829
4830    amigaos*)
4831      case $host_cpu in
4832      powerpc)
4833            # see comment about AmigaOS4 .so support
4834            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4835        ;;
4836      m68k)
4837            # FIXME: we need at least 68020 code to build shared libraries, but
4838            # adding the `-m68020' flag to GCC prevents building anything better,
4839            # like `-m68040'.
4840            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4841        ;;
4842      esac
4843      ;;
4844
4845    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4846      # PIC is the default for these OSes.
4847      ;;
4848    mingw* | cygwin* | os2* | pw32* | cegcc*)
4849      # This hack is so that the source file can tell whether it is being
4850      # built for inclusion in a dll (and should export symbols for example).
4851      # Although the cygwin gcc ignores -fPIC, still need this for old-style
4852      # (--disable-auto-import) libraries
4853      m4_if([$1], [GCJ], [],
4854	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4855      ;;
4856    darwin* | rhapsody*)
4857      # PIC is the default on this platform
4858      # Common symbols not allowed in MH_DYLIB files
4859      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4860      ;;
4861    *djgpp*)
4862      # DJGPP does not support shared libraries at all
4863      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4864      ;;
4865    haiku*)
4866      # PIC is the default for Haiku.
4867      # The "-static" flag exists, but is broken.
4868      _LT_TAGVAR(lt_prog_compiler_static, $1)=
4869      ;;
4870    interix[[3-9]]*)
4871      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4872      # Instead, we relocate shared libraries at runtime.
4873      ;;
4874    sysv4*MP*)
4875      if test -d /usr/nec; then
4876	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4877      fi
4878      ;;
4879    hpux*)
4880      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4881      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
4882      # sets the default TLS model and affects inlining.
4883      case $host_cpu in
4884      hppa*64*)
4885	;;
4886      *)
4887	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4888	;;
4889      esac
4890      ;;
4891    *qnx* | *nto*)
4892      # QNX uses GNU C++, but need to define -shared option too, otherwise
4893      # it will coredump.
4894      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4895      ;;
4896    *)
4897      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4898      ;;
4899    esac
4900  else
4901    case $host_os in
4902      aix[[4-9]]*)
4903	# All AIX code is PIC.
4904	if test "$host_cpu" = ia64; then
4905	  # AIX 5 now supports IA64 processor
4906	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4907	else
4908	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4909	fi
4910	;;
4911      chorus*)
4912	case $cc_basename in
4913	cxch68*)
4914	  # Green Hills C++ Compiler
4915	  # _LT_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"
4916	  ;;
4917	esac
4918	;;
4919      mingw* | cygwin* | os2* | pw32* | cegcc*)
4920	# This hack is so that the source file can tell whether it is being
4921	# built for inclusion in a dll (and should export symbols for example).
4922	m4_if([$1], [GCJ], [],
4923	  [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4924	;;
4925      dgux*)
4926	case $cc_basename in
4927	  ec++*)
4928	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4929	    ;;
4930	  ghcx*)
4931	    # Green Hills C++ Compiler
4932	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4933	    ;;
4934	  *)
4935	    ;;
4936	esac
4937	;;
4938      freebsd* | dragonfly*)
4939	# FreeBSD uses GNU C++
4940	;;
4941      hpux9* | hpux10* | hpux11*)
4942	case $cc_basename in
4943	  CC*)
4944	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4945	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4946	    if test "$host_cpu" != ia64; then
4947	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4948	    fi
4949	    ;;
4950	  aCC*)
4951	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4952	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4953	    case $host_cpu in
4954	    hppa*64*|ia64*)
4955	      # +Z the default
4956	      ;;
4957	    *)
4958	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4959	      ;;
4960	    esac
4961	    ;;
4962	  *)
4963	    ;;
4964	esac
4965	;;
4966      interix*)
4967	# This is c89, which is MS Visual C++ (no shared libs)
4968	# Anyone wants to do a port?
4969	;;
4970      irix5* | irix6* | nonstopux*)
4971	case $cc_basename in
4972	  CC*)
4973	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4974	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4975	    # CC pic flag -KPIC is the default.
4976	    ;;
4977	  *)
4978	    ;;
4979	esac
4980	;;
4981      linux* | k*bsd*-gnu | kopensolaris*-gnu)
4982	case $cc_basename in
4983	  KCC*)
4984	    # KAI C++ Compiler
4985	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4986	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4987	    ;;
4988	  ecpc* )
4989	    # old Intel C++ for x86_64 which still supported -KPIC.
4990	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4991	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4992	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4993	    ;;
4994	  icpc* )
4995	    # Intel C++, used to be incompatible with GCC.
4996	    # ICC 10 doesn't accept -KPIC any more.
4997	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4998	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4999	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5000	    ;;
5001	  pgCC* | pgcpp*)
5002	    # Portland Group C++ compiler
5003	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5004	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5005	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5006	    ;;
5007	  cxx*)
5008	    # Compaq C++
5009	    # Make sure the PIC flag is empty.  It appears that all Alpha
5010	    # Linux and Compaq Tru64 Unix objects are PIC.
5011	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5012	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5013	    ;;
5014	  xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
5015	    # IBM XL 8.0, 9.0 on PPC and BlueGene
5016	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5017	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5018	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5019	    ;;
5020	  *)
5021	    case `$CC -V 2>&1 | sed 5q` in
5022	    *Sun\ C*)
5023	      # Sun C++ 5.9
5024	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5025	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5026	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5027	      ;;
5028	    esac
5029	    ;;
5030	esac
5031	;;
5032      lynxos*)
5033	;;
5034      m88k*)
5035	;;
5036      mvs*)
5037	case $cc_basename in
5038	  cxx*)
5039	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5040	    ;;
5041	  *)
5042	    ;;
5043	esac
5044	;;
5045      netbsd*)
5046	;;
5047      *qnx* | *nto*)
5048        # QNX uses GNU C++, but need to define -shared option too, otherwise
5049        # it will coredump.
5050        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5051        ;;
5052      osf3* | osf4* | osf5*)
5053	case $cc_basename in
5054	  KCC*)
5055	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5056	    ;;
5057	  RCC*)
5058	    # Rational C++ 2.4.1
5059	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5060	    ;;
5061	  cxx*)
5062	    # Digital/Compaq C++
5063	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5064	    # Make sure the PIC flag is empty.  It appears that all Alpha
5065	    # Linux and Compaq Tru64 Unix objects are PIC.
5066	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5067	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5068	    ;;
5069	  *)
5070	    ;;
5071	esac
5072	;;
5073      psos*)
5074	;;
5075      solaris*)
5076	case $cc_basename in
5077	  CC* | sunCC*)
5078	    # Sun C++ 4.2, 5.x and Centerline C++
5079	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5080	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5081	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5082	    ;;
5083	  gcx*)
5084	    # Green Hills C++ Compiler
5085	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5086	    ;;
5087	  *)
5088	    ;;
5089	esac
5090	;;
5091      sunos4*)
5092	case $cc_basename in
5093	  CC*)
5094	    # Sun C++ 4.x
5095	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5096	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5097	    ;;
5098	  lcc*)
5099	    # Lucid
5100	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5101	    ;;
5102	  *)
5103	    ;;
5104	esac
5105	;;
5106      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5107	case $cc_basename in
5108	  CC*)
5109	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5110	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5111	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5112	    ;;
5113	esac
5114	;;
5115      tandem*)
5116	case $cc_basename in
5117	  NCC*)
5118	    # NonStop-UX NCC 3.20
5119	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5120	    ;;
5121	  *)
5122	    ;;
5123	esac
5124	;;
5125      vxworks*)
5126	;;
5127      *)
5128	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5129	;;
5130    esac
5131  fi
5132],
5133[
5134  if test "$GCC" = yes; then
5135    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5136    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5137
5138    case $host_os in
5139      aix*)
5140      # All AIX code is PIC.
5141      if test "$host_cpu" = ia64; then
5142	# AIX 5 now supports IA64 processor
5143	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5144      fi
5145      ;;
5146
5147    amigaos*)
5148      case $host_cpu in
5149      powerpc)
5150            # see comment about AmigaOS4 .so support
5151            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5152        ;;
5153      m68k)
5154            # FIXME: we need at least 68020 code to build shared libraries, but
5155            # adding the `-m68020' flag to GCC prevents building anything better,
5156            # like `-m68040'.
5157            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5158        ;;
5159      esac
5160      ;;
5161
5162    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5163      # PIC is the default for these OSes.
5164      ;;
5165
5166    mingw* | cygwin* | pw32* | os2* | cegcc*)
5167      # This hack is so that the source file can tell whether it is being
5168      # built for inclusion in a dll (and should export symbols for example).
5169      # Although the cygwin gcc ignores -fPIC, still need this for old-style
5170      # (--disable-auto-import) libraries
5171      m4_if([$1], [GCJ], [],
5172	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5173      ;;
5174
5175    darwin* | rhapsody*)
5176      # PIC is the default on this platform
5177      # Common symbols not allowed in MH_DYLIB files
5178      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5179      ;;
5180
5181    haiku*)
5182      # PIC is the default for Haiku.
5183      # The "-static" flag exists, but is broken.
5184      _LT_TAGVAR(lt_prog_compiler_static, $1)=
5185      ;;
5186
5187    hpux*)
5188      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
5189      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
5190      # sets the default TLS model and affects inlining.
5191      case $host_cpu in
5192      hppa*64*)
5193	# +Z the default
5194	;;
5195      *)
5196	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5197	;;
5198      esac
5199      ;;
5200
5201    interix[[3-9]]*)
5202      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5203      # Instead, we relocate shared libraries at runtime.
5204      ;;
5205
5206    msdosdjgpp*)
5207      # Just because we use GCC doesn't mean we suddenly get shared libraries
5208      # on systems that don't support them.
5209      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5210      enable_shared=no
5211      ;;
5212
5213    *nto* | *qnx*)
5214      # QNX uses GNU C++, but need to define -shared option too, otherwise
5215      # it will coredump.
5216      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5217      ;;
5218
5219    sysv4*MP*)
5220      if test -d /usr/nec; then
5221	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5222      fi
5223      ;;
5224
5225    *)
5226      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5227      ;;
5228    esac
5229
5230    case $cc_basename in
5231    nvcc*) # Cuda Compiler Driver 2.2
5232      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
5233      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC'
5234      ;;
5235    esac
5236  else
5237    # PORTME Check for flag to pass linker flags through the system compiler.
5238    case $host_os in
5239    aix*)
5240      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5241      if test "$host_cpu" = ia64; then
5242	# AIX 5 now supports IA64 processor
5243	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5244      else
5245	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5246      fi
5247      ;;
5248
5249    mingw* | cygwin* | pw32* | os2* | cegcc*)
5250      # This hack is so that the source file can tell whether it is being
5251      # built for inclusion in a dll (and should export symbols for example).
5252      m4_if([$1], [GCJ], [],
5253	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5254      ;;
5255
5256    hpux9* | hpux10* | hpux11*)
5257      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5258      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5259      # not for PA HP-UX.
5260      case $host_cpu in
5261      hppa*64*|ia64*)
5262	# +Z the default
5263	;;
5264      *)
5265	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5266	;;
5267      esac
5268      # Is there a better lt_prog_compiler_static that works with the bundled CC?
5269      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5270      ;;
5271
5272    irix5* | irix6* | nonstopux*)
5273      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5274      # PIC (with -KPIC) is the default.
5275      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5276      ;;
5277
5278    linux* | k*bsd*-gnu | kopensolaris*-gnu)
5279      case $cc_basename in
5280      # old Intel for x86_64 which still supported -KPIC.
5281      ecc*)
5282	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5283	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5284	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5285        ;;
5286      # icc used to be incompatible with GCC.
5287      # ICC 10 doesn't accept -KPIC any more.
5288      icc* | ifort*)
5289	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5290	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5291	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5292        ;;
5293      # Lahey Fortran 8.1.
5294      lf95*)
5295	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5296	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
5297	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
5298	;;
5299      nagfor*)
5300	# NAG Fortran compiler
5301	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
5302	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5303	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5304	;;
5305      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
5306        # Portland Group compilers (*not* the Pentium gcc compiler,
5307	# which looks to be a dead project)
5308	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5309	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5310	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5311        ;;
5312      ccc*)
5313        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5314        # All Alpha code is PIC.
5315        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5316        ;;
5317      xl* | bgxl* | bgf* | mpixl*)
5318	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
5319	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5320	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5321	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5322	;;
5323      *)
5324	case `$CC -V 2>&1 | sed 5q` in
5325	*Sun\ F* | *Sun*Fortran*)
5326	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
5327	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5328	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5329	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
5330	  ;;
5331	*Sun\ C*)
5332	  # Sun C 5.9
5333	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5334	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5335	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5336	  ;;
5337	esac
5338	;;
5339      esac
5340      ;;
5341
5342    newsos6)
5343      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5344      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5345      ;;
5346
5347    *nto* | *qnx*)
5348      # QNX uses GNU C++, but need to define -shared option too, otherwise
5349      # it will coredump.
5350      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5351      ;;
5352
5353    osf3* | osf4* | osf5*)
5354      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5355      # All OSF/1 code is PIC.
5356      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5357      ;;
5358
5359    rdos*)
5360      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5361      ;;
5362
5363    solaris*)
5364      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5365      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5366      case $cc_basename in
5367      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
5368	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5369      *)
5370	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5371      esac
5372      ;;
5373
5374    sunos4*)
5375      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5376      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5377      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5378      ;;
5379
5380    sysv4 | sysv4.2uw2* | sysv4.3*)
5381      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5382      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5383      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5384      ;;
5385
5386    sysv4*MP*)
5387      if test -d /usr/nec ;then
5388	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5389	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5390      fi
5391      ;;
5392
5393    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5394      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5395      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5396      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5397      ;;
5398
5399    unicos*)
5400      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5401      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5402      ;;
5403
5404    uts4*)
5405      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5406      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5407      ;;
5408
5409    *)
5410      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5411      ;;
5412    esac
5413  fi
5414])
5415case $host_os in
5416  # For platforms which do not support PIC, -DPIC is meaningless:
5417  *djgpp*)
5418    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5419    ;;
5420  *)
5421    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
5422    ;;
5423esac
5424
5425AC_CACHE_CHECK([for $compiler option to produce PIC],
5426  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
5427  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
5428_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
5429
5430#
5431# Check to make sure the PIC flag actually works.
5432#
5433if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
5434  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
5435    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
5436    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
5437    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
5438     "" | " "*) ;;
5439     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5440     esac],
5441    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
5442     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5443fi
5444_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
5445	[Additional compiler flags for building library objects])
5446
5447_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
5448	[How to pass a linker flag through the compiler])
5449#
5450# Check to make sure the static flag actually works.
5451#
5452wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
5453_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
5454  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
5455  $lt_tmp_static_flag,
5456  [],
5457  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
5458_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
5459	[Compiler flag to prevent dynamic linking])
5460])# _LT_COMPILER_PIC
5461
5462
5463# _LT_LINKER_SHLIBS([TAGNAME])
5464# ----------------------------
5465# See if the linker supports building shared libraries.
5466m4_defun([_LT_LINKER_SHLIBS],
5467[AC_REQUIRE([LT_PATH_LD])dnl
5468AC_REQUIRE([LT_PATH_NM])dnl
5469m4_require([_LT_PATH_MANIFEST_TOOL])dnl
5470m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5471m4_require([_LT_DECL_EGREP])dnl
5472m4_require([_LT_DECL_SED])dnl
5473m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
5474m4_require([_LT_TAG_COMPILER])dnl
5475AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5476m4_if([$1], [CXX], [
5477  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5478  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5479  case $host_os in
5480  aix[[4-9]]*)
5481    # If we're using GNU nm, then we don't want the "-C" option.
5482    # -C means demangle to AIX nm, but means don't demangle with GNU nm
5483    # Also, AIX nm treats weak defined symbols like other global defined
5484    # symbols, whereas GNU nm marks them as "W".
5485    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5486      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
5487    else
5488      _LT_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'
5489    fi
5490    ;;
5491  pw32*)
5492    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5493    ;;
5494  cygwin* | mingw* | cegcc*)
5495    case $cc_basename in
5496    cl*) ;;
5497    *)
5498      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
5499      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5500      ;;
5501    esac
5502    ;;
5503  *)
5504    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5505    ;;
5506  esac
5507], [
5508  runpath_var=
5509  _LT_TAGVAR(allow_undefined_flag, $1)=
5510  _LT_TAGVAR(always_export_symbols, $1)=no
5511  _LT_TAGVAR(archive_cmds, $1)=
5512  _LT_TAGVAR(archive_expsym_cmds, $1)=
5513  _LT_TAGVAR(compiler_needs_object, $1)=no
5514  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5515  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5516  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5517  _LT_TAGVAR(hardcode_automatic, $1)=no
5518  _LT_TAGVAR(hardcode_direct, $1)=no
5519  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5520  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5521  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5522  _LT_TAGVAR(hardcode_libdir_separator, $1)=
5523  _LT_TAGVAR(hardcode_minus_L, $1)=no
5524  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5525  _LT_TAGVAR(inherit_rpath, $1)=no
5526  _LT_TAGVAR(link_all_deplibs, $1)=unknown
5527  _LT_TAGVAR(module_cmds, $1)=
5528  _LT_TAGVAR(module_expsym_cmds, $1)=
5529  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
5530  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5531  _LT_TAGVAR(thread_safe_flag_spec, $1)=
5532  _LT_TAGVAR(whole_archive_flag_spec, $1)=
5533  # include_expsyms should be a list of space-separated symbols to be *always*
5534  # included in the symbol list
5535  _LT_TAGVAR(include_expsyms, $1)=
5536  # exclude_expsyms can be an extended regexp of symbols to exclude
5537  # it will be wrapped by ` (' and `)$', so one must not match beginning or
5538  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5539  # as well as any symbol that contains `d'.
5540  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5541  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5542  # platforms (ab)use it in PIC code, but their linkers get confused if
5543  # the symbol is explicitly referenced.  Since portable code cannot
5544  # rely on this symbol name, it's probably fine to never include it in
5545  # preloaded symbol tables.
5546  # Exclude shared library initialization/finalization symbols.
5547dnl Note also adjust exclude_expsyms for C++ above.
5548  extract_expsyms_cmds=
5549
5550  case $host_os in
5551  cygwin* | mingw* | pw32* | cegcc*)
5552    # FIXME: the MSVC++ port hasn't been tested in a loooong time
5553    # When not using gcc, we currently assume that we are using
5554    # Microsoft Visual C++.
5555    if test "$GCC" != yes; then
5556      with_gnu_ld=no
5557    fi
5558    ;;
5559  interix*)
5560    # we just hope/assume this is gcc and not c89 (= MSVC++)
5561    with_gnu_ld=yes
5562    ;;
5563  openbsd*)
5564    with_gnu_ld=no
5565    ;;
5566  esac
5567
5568  _LT_TAGVAR(ld_shlibs, $1)=yes
5569
5570  # On some targets, GNU ld is compatible enough with the native linker
5571  # that we're better off using the native interface for both.
5572  lt_use_gnu_ld_interface=no
5573  if test "$with_gnu_ld" = yes; then
5574    case $host_os in
5575      aix*)
5576	# The AIX port of GNU ld has always aspired to compatibility
5577	# with the native linker.  However, as the warning in the GNU ld
5578	# block says, versions before 2.19.5* couldn't really create working
5579	# shared libraries, regardless of the interface used.
5580	case `$LD -v 2>&1` in
5581	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
5582	  *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
5583	  *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
5584	  *)
5585	    lt_use_gnu_ld_interface=yes
5586	    ;;
5587	esac
5588	;;
5589      *)
5590	lt_use_gnu_ld_interface=yes
5591	;;
5592    esac
5593  fi
5594
5595  if test "$lt_use_gnu_ld_interface" = yes; then
5596    # If archive_cmds runs LD, not CC, wlarc should be empty
5597    wlarc='${wl}'
5598
5599    # Set some defaults for GNU ld with shared library support. These
5600    # are reset later if shared libraries are not supported. Putting them
5601    # here allows them to be overridden if necessary.
5602    runpath_var=LD_RUN_PATH
5603    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5604    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5605    # ancient GNU ld didn't support --whole-archive et. al.
5606    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
5607      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5608    else
5609      _LT_TAGVAR(whole_archive_flag_spec, $1)=
5610    fi
5611    supports_anon_versioning=no
5612    case `$LD -v 2>&1` in
5613      *GNU\ gold*) supports_anon_versioning=yes ;;
5614      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5615      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5616      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5617      *\ 2.11.*) ;; # other 2.11 versions
5618      *) supports_anon_versioning=yes ;;
5619    esac
5620
5621    # See if GNU ld supports shared libraries.
5622    case $host_os in
5623    aix[[3-9]]*)
5624      # On AIX/PPC, the GNU linker is very broken
5625      if test "$host_cpu" != ia64; then
5626	_LT_TAGVAR(ld_shlibs, $1)=no
5627	cat <<_LT_EOF 1>&2
5628
5629*** Warning: the GNU linker, at least up to release 2.19, is reported
5630*** to be unable to reliably create shared libraries on AIX.
5631*** Therefore, libtool is disabling shared libraries support.  If you
5632*** really care for shared libraries, you may want to install binutils
5633*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
5634*** You will then need to restart the configuration process.
5635
5636_LT_EOF
5637      fi
5638      ;;
5639
5640    amigaos*)
5641      case $host_cpu in
5642      powerpc)
5643            # see comment about AmigaOS4 .so support
5644            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5645            _LT_TAGVAR(archive_expsym_cmds, $1)=''
5646        ;;
5647      m68k)
5648            _LT_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)'
5649            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5650            _LT_TAGVAR(hardcode_minus_L, $1)=yes
5651        ;;
5652      esac
5653      ;;
5654
5655    beos*)
5656      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5657	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5658	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5659	# support --undefined.  This deserves some investigation.  FIXME
5660	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5661      else
5662	_LT_TAGVAR(ld_shlibs, $1)=no
5663      fi
5664      ;;
5665
5666    cygwin* | mingw* | pw32* | cegcc*)
5667      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5668      # as there is no search path for DLLs.
5669      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5670      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
5671      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5672      _LT_TAGVAR(always_export_symbols, $1)=no
5673      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5674      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
5675      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5676
5677      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5678        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5679	# If the export-symbols file already is a .def file (1st line
5680	# is EXPORTS), use it as is; otherwise, prepend...
5681	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5682	  cp $export_symbols $output_objdir/$soname.def;
5683	else
5684	  echo EXPORTS > $output_objdir/$soname.def;
5685	  cat $export_symbols >> $output_objdir/$soname.def;
5686	fi~
5687	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5688      else
5689	_LT_TAGVAR(ld_shlibs, $1)=no
5690      fi
5691      ;;
5692
5693    haiku*)
5694      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5695      _LT_TAGVAR(link_all_deplibs, $1)=yes
5696      ;;
5697
5698    interix[[3-9]]*)
5699      _LT_TAGVAR(hardcode_direct, $1)=no
5700      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5701      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5702      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5703      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5704      # Instead, shared libraries are loaded at an image base (0x10000000 by
5705      # default) and relocated if they conflict, which is a slow very memory
5706      # consuming and fragmenting process.  To avoid this, we pick a random,
5707      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5708      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
5709      _LT_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'
5710      _LT_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'
5711      ;;
5712
5713    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
5714      tmp_diet=no
5715      if test "$host_os" = linux-dietlibc; then
5716	case $cc_basename in
5717	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
5718	esac
5719      fi
5720      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
5721	 && test "$tmp_diet" = no
5722      then
5723	tmp_addflag=' $pic_flag'
5724	tmp_sharedflag='-shared'
5725	case $cc_basename,$host_cpu in
5726        pgcc*)				# Portland Group C compiler
5727	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
5728	  tmp_addflag=' $pic_flag'
5729	  ;;
5730	pgf77* | pgf90* | pgf95* | pgfortran*)
5731					# Portland Group f77 and f90 compilers
5732	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
5733	  tmp_addflag=' $pic_flag -Mnomain' ;;
5734	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
5735	  tmp_addflag=' -i_dynamic' ;;
5736	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
5737	  tmp_addflag=' -i_dynamic -nofor_main' ;;
5738	ifc* | ifort*)			# Intel Fortran compiler
5739	  tmp_addflag=' -nofor_main' ;;
5740	lf95*)				# Lahey Fortran 8.1
5741	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
5742	  tmp_sharedflag='--shared' ;;
5743	xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
5744	  tmp_sharedflag='-qmkshrobj'
5745	  tmp_addflag= ;;
5746	nvcc*)	# Cuda Compiler Driver 2.2
5747	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
5748	  _LT_TAGVAR(compiler_needs_object, $1)=yes
5749	  ;;
5750	esac
5751	case `$CC -V 2>&1 | sed 5q` in
5752	*Sun\ C*)			# Sun C 5.9
5753	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
5754	  _LT_TAGVAR(compiler_needs_object, $1)=yes
5755	  tmp_sharedflag='-G' ;;
5756	*Sun\ F*)			# Sun Fortran 8.3
5757	  tmp_sharedflag='-G' ;;
5758	esac
5759	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5760
5761        if test "x$supports_anon_versioning" = xyes; then
5762          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5763	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5764	    echo "local: *; };" >> $output_objdir/$libname.ver~
5765	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5766        fi
5767
5768	case $cc_basename in
5769	xlf* | bgf* | bgxlf* | mpixlf*)
5770	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
5771	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
5772	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5773	  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
5774	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
5775	  if test "x$supports_anon_versioning" = xyes; then
5776	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5777	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5778	      echo "local: *; };" >> $output_objdir/$libname.ver~
5779	      $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
5780	  fi
5781	  ;;
5782	esac
5783      else
5784        _LT_TAGVAR(ld_shlibs, $1)=no
5785      fi
5786      ;;
5787
5788    netbsd*)
5789      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5790	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5791	wlarc=
5792      else
5793	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5794	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5795      fi
5796      ;;
5797
5798    solaris*)
5799      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
5800	_LT_TAGVAR(ld_shlibs, $1)=no
5801	cat <<_LT_EOF 1>&2
5802
5803*** Warning: The releases 2.8.* of the GNU linker cannot reliably
5804*** create shared libraries on Solaris systems.  Therefore, libtool
5805*** is disabling shared libraries support.  We urge you to upgrade GNU
5806*** binutils to release 2.9.1 or newer.  Another option is to modify
5807*** your PATH or compiler configuration so that the native linker is
5808*** used, and then restart.
5809
5810_LT_EOF
5811      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5812	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5813	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5814      else
5815	_LT_TAGVAR(ld_shlibs, $1)=no
5816      fi
5817      ;;
5818
5819    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5820      case `$LD -v 2>&1` in
5821        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5822	_LT_TAGVAR(ld_shlibs, $1)=no
5823	cat <<_LT_EOF 1>&2
5824
5825*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
5826*** reliably create shared libraries on SCO systems.  Therefore, libtool
5827*** is disabling shared libraries support.  We urge you to upgrade GNU
5828*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
5829*** your PATH or compiler configuration so that the native linker is
5830*** used, and then restart.
5831
5832_LT_EOF
5833	;;
5834	*)
5835	  # For security reasons, it is highly recommended that you always
5836	  # use absolute paths for naming shared libraries, and exclude the
5837	  # DT_RUNPATH tag from executables and libraries.  But doing so
5838	  # requires that you compile everything twice, which is a pain.
5839	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5840	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5841	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5842	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5843	  else
5844	    _LT_TAGVAR(ld_shlibs, $1)=no
5845	  fi
5846	;;
5847      esac
5848      ;;
5849
5850    sunos4*)
5851      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5852      wlarc=
5853      _LT_TAGVAR(hardcode_direct, $1)=yes
5854      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5855      ;;
5856
5857    *)
5858      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5859	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5860	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5861      else
5862	_LT_TAGVAR(ld_shlibs, $1)=no
5863      fi
5864      ;;
5865    esac
5866
5867    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
5868      runpath_var=
5869      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5870      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5871      _LT_TAGVAR(whole_archive_flag_spec, $1)=
5872    fi
5873  else
5874    # PORTME fill in a description of your system's linker (not GNU ld)
5875    case $host_os in
5876    aix3*)
5877      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5878      _LT_TAGVAR(always_export_symbols, $1)=yes
5879      _LT_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'
5880      # Note: this linker hardcodes the directories in LIBPATH if there
5881      # are no directories specified by -L.
5882      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5883      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
5884	# Neither direct hardcoding nor static linking is supported with a
5885	# broken collect2.
5886	_LT_TAGVAR(hardcode_direct, $1)=unsupported
5887      fi
5888      ;;
5889
5890    aix[[4-9]]*)
5891      if test "$host_cpu" = ia64; then
5892	# On IA64, the linker does run time linking by default, so we don't
5893	# have to do anything special.
5894	aix_use_runtimelinking=no
5895	exp_sym_flag='-Bexport'
5896	no_entry_flag=""
5897      else
5898	# If we're using GNU nm, then we don't want the "-C" option.
5899	# -C means demangle to AIX nm, but means don't demangle with GNU nm
5900	# Also, AIX nm treats weak defined symbols like other global
5901	# defined symbols, whereas GNU nm marks them as "W".
5902	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5903	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
5904	else
5905	  _LT_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'
5906	fi
5907	aix_use_runtimelinking=no
5908
5909	# Test if we are trying to use run time linking or normal
5910	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
5911	# need to do runtime linking.
5912	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5913	  for ld_flag in $LDFLAGS; do
5914	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5915	    aix_use_runtimelinking=yes
5916	    break
5917	  fi
5918	  done
5919	  ;;
5920	esac
5921
5922	exp_sym_flag='-bexport'
5923	no_entry_flag='-bnoentry'
5924      fi
5925
5926      # When large executables or shared objects are built, AIX ld can
5927      # have problems creating the table of contents.  If linking a library
5928      # or program results in "error TOC overflow" add -mminimal-toc to
5929      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5930      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5931
5932      _LT_TAGVAR(archive_cmds, $1)=''
5933      _LT_TAGVAR(hardcode_direct, $1)=yes
5934      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5935      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5936      _LT_TAGVAR(link_all_deplibs, $1)=yes
5937      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
5938
5939      if test "$GCC" = yes; then
5940	case $host_os in aix4.[[012]]|aix4.[[012]].*)
5941	# We only want to do this on AIX 4.2 and lower, the check
5942	# below for broken collect2 doesn't work under 4.3+
5943	  collect2name=`${CC} -print-prog-name=collect2`
5944	  if test -f "$collect2name" &&
5945	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5946	  then
5947	  # We have reworked collect2
5948	  :
5949	  else
5950	  # We have old collect2
5951	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
5952	  # It fails to find uninstalled libraries when the uninstalled
5953	  # path is not listed in the libpath.  Setting hardcode_minus_L
5954	  # to unsupported forces relinking
5955	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
5956	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5957	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
5958	  fi
5959	  ;;
5960	esac
5961	shared_flag='-shared'
5962	if test "$aix_use_runtimelinking" = yes; then
5963	  shared_flag="$shared_flag "'${wl}-G'
5964	fi
5965      else
5966	# not using gcc
5967	if test "$host_cpu" = ia64; then
5968	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5969	# chokes on -Wl,-G. The following line is correct:
5970	  shared_flag='-G'
5971	else
5972	  if test "$aix_use_runtimelinking" = yes; then
5973	    shared_flag='${wl}-G'
5974	  else
5975	    shared_flag='${wl}-bM:SRE'
5976	  fi
5977	fi
5978      fi
5979
5980      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
5981      # It seems that -bexpall does not export symbols beginning with
5982      # underscore (_), so it is better to generate a list of symbols to export.
5983      _LT_TAGVAR(always_export_symbols, $1)=yes
5984      if test "$aix_use_runtimelinking" = yes; then
5985	# Warning - without using the other runtime loading flags (-brtl),
5986	# -berok will link without error, but may produce a broken library.
5987	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5988        # Determine the default libpath from the value encoded in an
5989        # empty executable.
5990        _LT_SYS_MODULE_PATH_AIX([$1])
5991        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5992        _LT_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 func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
5993      else
5994	if test "$host_cpu" = ia64; then
5995	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5996	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5997	  _LT_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"
5998	else
5999	 # Determine the default libpath from the value encoded in an
6000	 # empty executable.
6001	 _LT_SYS_MODULE_PATH_AIX([$1])
6002	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6003	  # Warning - without using the other run time loading flags,
6004	  # -berok will link without error, but may produce a broken library.
6005	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6006	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6007	  if test "$with_gnu_ld" = yes; then
6008	    # We only use this code for GNU lds that support --whole-archive.
6009	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6010	  else
6011	    # Exported symbols can be pulled into shared objects from archives
6012	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6013	  fi
6014	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6015	  # This is similar to how AIX traditionally builds its shared libraries.
6016	  _LT_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'
6017	fi
6018      fi
6019      ;;
6020
6021    amigaos*)
6022      case $host_cpu in
6023      powerpc)
6024            # see comment about AmigaOS4 .so support
6025            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6026            _LT_TAGVAR(archive_expsym_cmds, $1)=''
6027        ;;
6028      m68k)
6029            _LT_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)'
6030            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6031            _LT_TAGVAR(hardcode_minus_L, $1)=yes
6032        ;;
6033      esac
6034      ;;
6035
6036    bsdi[[45]]*)
6037      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6038      ;;
6039
6040    cygwin* | mingw* | pw32* | cegcc*)
6041      # When not using gcc, we currently assume that we are using
6042      # Microsoft Visual C++.
6043      # hardcode_libdir_flag_spec is actually meaningless, as there is
6044      # no search path for DLLs.
6045      case $cc_basename in
6046      cl*)
6047	# Native MSVC
6048	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6049	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6050	_LT_TAGVAR(always_export_symbols, $1)=yes
6051	_LT_TAGVAR(file_list_spec, $1)='@'
6052	# Tell ltmain to make .lib files, not .a files.
6053	libext=lib
6054	# Tell ltmain to make .dll files, not .so files.
6055	shrext_cmds=".dll"
6056	# FIXME: Setting linknames here is a bad hack.
6057	_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
6058	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6059	    sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
6060	  else
6061	    sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
6062	  fi~
6063	  $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6064	  linknames='
6065	# The linker will not automatically build a static lib if we build a DLL.
6066	# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6067	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6068	_LT_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'
6069	# Don't use ranlib
6070	_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6071	_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6072	  lt_tool_outputfile="@TOOL_OUTPUT@"~
6073	  case $lt_outputfile in
6074	    *.exe|*.EXE) ;;
6075	    *)
6076	      lt_outputfile="$lt_outputfile.exe"
6077	      lt_tool_outputfile="$lt_tool_outputfile.exe"
6078	      ;;
6079	  esac~
6080	  if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
6081	    $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6082	    $RM "$lt_outputfile.manifest";
6083	  fi'
6084	;;
6085      *)
6086	# Assume MSVC wrapper
6087	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6088	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6089	# Tell ltmain to make .lib files, not .a files.
6090	libext=lib
6091	# Tell ltmain to make .dll files, not .so files.
6092	shrext_cmds=".dll"
6093	# FIXME: Setting linknames here is a bad hack.
6094	_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
6095	# The linker will automatically build a .lib file if we build a DLL.
6096	_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6097	# FIXME: Should let the user specify the lib program.
6098	_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
6099	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6100	;;
6101      esac
6102      ;;
6103
6104    darwin* | rhapsody*)
6105      _LT_DARWIN_LINKER_FEATURES($1)
6106      ;;
6107
6108    dgux*)
6109      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6110      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6111      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6112      ;;
6113
6114    freebsd1*)
6115      _LT_TAGVAR(ld_shlibs, $1)=no
6116      ;;
6117
6118    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6119    # support.  Future versions do this automatically, but an explicit c++rt0.o
6120    # does not break anything, and helps significantly (at the cost of a little
6121    # extra space).
6122    freebsd2.2*)
6123      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6124      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6125      _LT_TAGVAR(hardcode_direct, $1)=yes
6126      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6127      ;;
6128
6129    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6130    freebsd2*)
6131      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6132      _LT_TAGVAR(hardcode_direct, $1)=yes
6133      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6134      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6135      ;;
6136
6137    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6138    freebsd* | dragonfly*)
6139      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6140      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6141      _LT_TAGVAR(hardcode_direct, $1)=yes
6142      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6143      ;;
6144
6145    hpux9*)
6146      if test "$GCC" = yes; then
6147	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6148      else
6149	_LT_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'
6150      fi
6151      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6152      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6153      _LT_TAGVAR(hardcode_direct, $1)=yes
6154
6155      # hardcode_minus_L: Not really in the search PATH,
6156      # but as the default location of the library.
6157      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6158      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6159      ;;
6160
6161    hpux10*)
6162      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
6163	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6164      else
6165	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6166      fi
6167      if test "$with_gnu_ld" = no; then
6168	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6169	_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
6170	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6171	_LT_TAGVAR(hardcode_direct, $1)=yes
6172	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6173	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6174	# hardcode_minus_L: Not really in the search PATH,
6175	# but as the default location of the library.
6176	_LT_TAGVAR(hardcode_minus_L, $1)=yes
6177      fi
6178      ;;
6179
6180    hpux11*)
6181      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
6182	case $host_cpu in
6183	hppa*64*)
6184	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6185	  ;;
6186	ia64*)
6187	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6188	  ;;
6189	*)
6190	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6191	  ;;
6192	esac
6193      else
6194	case $host_cpu in
6195	hppa*64*)
6196	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6197	  ;;
6198	ia64*)
6199	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6200	  ;;
6201	*)
6202	m4_if($1, [], [
6203	  # Older versions of the 11.00 compiler do not understand -b yet
6204	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
6205	  _LT_LINKER_OPTION([if $CC understands -b],
6206	    _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
6207	    [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
6208	    [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
6209	  [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
6210	  ;;
6211	esac
6212      fi
6213      if test "$with_gnu_ld" = no; then
6214	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6215	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6216
6217	case $host_cpu in
6218	hppa*64*|ia64*)
6219	  _LT_TAGVAR(hardcode_direct, $1)=no
6220	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6221	  ;;
6222	*)
6223	  _LT_TAGVAR(hardcode_direct, $1)=yes
6224	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6225	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6226
6227	  # hardcode_minus_L: Not really in the search PATH,
6228	  # but as the default location of the library.
6229	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
6230	  ;;
6231	esac
6232      fi
6233      ;;
6234
6235    irix5* | irix6* | nonstopux*)
6236      if test "$GCC" = yes; then
6237	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6238	# Try to use the -exported_symbol ld option, if it does not
6239	# work, assume that -exports_file does not work either and
6240	# implicitly export all symbols.
6241	# This should be the same for all languages, so no per-tag cache variable.
6242	AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
6243	  [lt_cv_irix_exported_symbol],
6244	  [save_LDFLAGS="$LDFLAGS"
6245	   LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
6246	   AC_LINK_IFELSE(
6247	     [AC_LANG_SOURCE(
6248	        [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
6249			      [C++], [[int foo (void) { return 0; }]],
6250			      [Fortran 77], [[
6251      subroutine foo
6252      end]],
6253			      [Fortran], [[
6254      subroutine foo
6255      end]])])],
6256	      [lt_cv_irix_exported_symbol=yes],
6257	      [lt_cv_irix_exported_symbol=no])
6258           LDFLAGS="$save_LDFLAGS"])
6259	if test "$lt_cv_irix_exported_symbol" = yes; then
6260          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
6261	fi
6262      else
6263	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6264	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
6265      fi
6266      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6267      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6268      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6269      _LT_TAGVAR(inherit_rpath, $1)=yes
6270      _LT_TAGVAR(link_all_deplibs, $1)=yes
6271      ;;
6272
6273    netbsd*)
6274      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6275	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
6276      else
6277	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
6278      fi
6279      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6280      _LT_TAGVAR(hardcode_direct, $1)=yes
6281      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6282      ;;
6283
6284    newsos6)
6285      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6286      _LT_TAGVAR(hardcode_direct, $1)=yes
6287      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6288      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6289      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6290      ;;
6291
6292    *nto* | *qnx*)
6293      ;;
6294
6295    openbsd*)
6296      if test -f /usr/libexec/ld.so; then
6297	_LT_TAGVAR(hardcode_direct, $1)=yes
6298	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6299	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6300	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6301	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6302	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6303	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6304	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6305	else
6306	  case $host_os in
6307	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6308	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6309	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6310	     ;;
6311	   *)
6312	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6313	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6314	     ;;
6315	  esac
6316	fi
6317      else
6318	_LT_TAGVAR(ld_shlibs, $1)=no
6319      fi
6320      ;;
6321
6322    os2*)
6323      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6324      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6325      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6326      _LT_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'
6327      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6328      ;;
6329
6330    osf3*)
6331      if test "$GCC" = yes; then
6332	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6333	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6334      else
6335	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6336	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6337      fi
6338      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6339      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6340      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6341      ;;
6342
6343    osf4* | osf5*)	# as osf3* with the addition of -msym flag
6344      if test "$GCC" = yes; then
6345	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6346	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6347	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6348      else
6349	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6350	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6351	_LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
6352	$CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
6353
6354	# Both c and cxx compiler support -rpath directly
6355	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6356      fi
6357      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6358      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6359      ;;
6360
6361    solaris*)
6362      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
6363      if test "$GCC" = yes; then
6364	wlarc='${wl}'
6365	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6366	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6367	  $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
6368      else
6369	case `$CC -V 2>&1` in
6370	*"Compilers 5.0"*)
6371	  wlarc=''
6372	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6373	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6374	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
6375	  ;;
6376	*)
6377	  wlarc='${wl}'
6378	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
6379	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6380	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
6381	  ;;
6382	esac
6383      fi
6384      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6385      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6386      case $host_os in
6387      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6388      *)
6389	# The compiler driver will combine and reorder linker options,
6390	# but understands `-z linker_flag'.  GCC discards it without `$wl',
6391	# but is careful enough not to reorder.
6392	# Supported since Solaris 2.6 (maybe 2.5.1?)
6393	if test "$GCC" = yes; then
6394	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6395	else
6396	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6397	fi
6398	;;
6399      esac
6400      _LT_TAGVAR(link_all_deplibs, $1)=yes
6401      ;;
6402
6403    sunos4*)
6404      if test "x$host_vendor" = xsequent; then
6405	# Use $CC to link under sequent, because it throws in some extra .o
6406	# files that make .init and .fini sections work.
6407	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6408      else
6409	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6410      fi
6411      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6412      _LT_TAGVAR(hardcode_direct, $1)=yes
6413      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6414      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6415      ;;
6416
6417    sysv4)
6418      case $host_vendor in
6419	sni)
6420	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6421	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6422	;;
6423	siemens)
6424	  ## LD is ld it makes a PLAMLIB
6425	  ## CC just makes a GrossModule.
6426	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6427	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6428	  _LT_TAGVAR(hardcode_direct, $1)=no
6429        ;;
6430	motorola)
6431	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6432	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6433	;;
6434      esac
6435      runpath_var='LD_RUN_PATH'
6436      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6437      ;;
6438
6439    sysv4.3*)
6440      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6441      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6442      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6443      ;;
6444
6445    sysv4*MP*)
6446      if test -d /usr/nec; then
6447	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6448	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6449	runpath_var=LD_RUN_PATH
6450	hardcode_runpath_var=yes
6451	_LT_TAGVAR(ld_shlibs, $1)=yes
6452      fi
6453      ;;
6454
6455    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6456      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6457      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6458      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6459      runpath_var='LD_RUN_PATH'
6460
6461      if test "$GCC" = yes; then
6462	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6463	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6464      else
6465	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6466	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6467      fi
6468      ;;
6469
6470    sysv5* | sco3.2v5* | sco5v6*)
6471      # Note: We can NOT use -z defs as we might desire, because we do not
6472      # link with -lc, and that would cause any symbols used from libc to
6473      # always be unresolved, which means just about no library would
6474      # ever link correctly.  If we're not using GNU ld we use -z text
6475      # though, which does catch some bad symbols but isn't as heavy-handed
6476      # as -z defs.
6477      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6478      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6479      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6480      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6481      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6482      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6483      _LT_TAGVAR(link_all_deplibs, $1)=yes
6484      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6485      runpath_var='LD_RUN_PATH'
6486
6487      if test "$GCC" = yes; then
6488	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6489	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6490      else
6491	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6492	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6493      fi
6494      ;;
6495
6496    uts4*)
6497      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6498      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6499      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6500      ;;
6501
6502    *)
6503      _LT_TAGVAR(ld_shlibs, $1)=no
6504      ;;
6505    esac
6506
6507    if test x$host_vendor = xsni; then
6508      case $host in
6509      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6510	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
6511	;;
6512      esac
6513    fi
6514  fi
6515])
6516AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6517test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6518
6519_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
6520
6521_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
6522_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
6523_LT_DECL([], [extract_expsyms_cmds], [2],
6524    [The commands to extract the exported symbol list from a shared archive])
6525
6526#
6527# Do we need to explicitly link libc?
6528#
6529case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
6530x|xyes)
6531  # Assume -lc should be added
6532  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6533
6534  if test "$enable_shared" = yes && test "$GCC" = yes; then
6535    case $_LT_TAGVAR(archive_cmds, $1) in
6536    *'~'*)
6537      # FIXME: we may have to deal with multi-command sequences.
6538      ;;
6539    '$CC '*)
6540      # Test whether the compiler implicitly links with -lc since on some
6541      # systems, -lgcc has to come before -lc. If gcc already passes -lc
6542      # to ld, don't add -lc before -lgcc.
6543      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
6544	[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
6545	[$RM conftest*
6546	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6547
6548	if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6549	  soname=conftest
6550	  lib=conftest
6551	  libobjs=conftest.$ac_objext
6552	  deplibs=
6553	  wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
6554	  pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
6555	  compiler_flags=-v
6556	  linker_flags=-v
6557	  verstring=
6558	  output_objdir=.
6559	  libname=conftest
6560	  lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
6561	  _LT_TAGVAR(allow_undefined_flag, $1)=
6562	  if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
6563	  then
6564	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6565	  else
6566	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6567	  fi
6568	  _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6569	else
6570	  cat conftest.err 1>&5
6571	fi
6572	$RM conftest*
6573	])
6574      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
6575      ;;
6576    esac
6577  fi
6578  ;;
6579esac
6580
6581_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
6582    [Whether or not to add -lc for building shared libraries])
6583_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
6584    [enable_shared_with_static_runtimes], [0],
6585    [Whether or not to disallow shared libs when runtime libs are static])
6586_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
6587    [Compiler flag to allow reflexive dlopens])
6588_LT_TAGDECL([], [whole_archive_flag_spec], [1],
6589    [Compiler flag to generate shared objects directly from archives])
6590_LT_TAGDECL([], [compiler_needs_object], [1],
6591    [Whether the compiler copes with passing no objects directly])
6592_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
6593    [Create an old-style archive from a shared archive])
6594_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
6595    [Create a temporary old-style archive to link instead of a shared archive])
6596_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
6597_LT_TAGDECL([], [archive_expsym_cmds], [2])
6598_LT_TAGDECL([], [module_cmds], [2],
6599    [Commands used to build a loadable module if different from building
6600    a shared archive.])
6601_LT_TAGDECL([], [module_expsym_cmds], [2])
6602_LT_TAGDECL([], [with_gnu_ld], [1],
6603    [Whether we are building with GNU ld or not])
6604_LT_TAGDECL([], [allow_undefined_flag], [1],
6605    [Flag that allows shared libraries with undefined symbols to be built])
6606_LT_TAGDECL([], [no_undefined_flag], [1],
6607    [Flag that enforces no undefined symbols])
6608_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
6609    [Flag to hardcode $libdir into a binary during linking.
6610    This must work even if $libdir does not exist])
6611_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
6612    [[If ld is used when linking, flag to hardcode $libdir into a binary
6613    during linking.  This must work even if $libdir does not exist]])
6614_LT_TAGDECL([], [hardcode_libdir_separator], [1],
6615    [Whether we need a single "-rpath" flag with a separated argument])
6616_LT_TAGDECL([], [hardcode_direct], [0],
6617    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6618    DIR into the resulting binary])
6619_LT_TAGDECL([], [hardcode_direct_absolute], [0],
6620    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6621    DIR into the resulting binary and the resulting library dependency is
6622    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
6623    library is relocated])
6624_LT_TAGDECL([], [hardcode_minus_L], [0],
6625    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
6626    into the resulting binary])
6627_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
6628    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
6629    into the resulting binary])
6630_LT_TAGDECL([], [hardcode_automatic], [0],
6631    [Set to "yes" if building a shared library automatically hardcodes DIR
6632    into the library and all subsequent libraries and executables linked
6633    against it])
6634_LT_TAGDECL([], [inherit_rpath], [0],
6635    [Set to yes if linker adds runtime paths of dependent libraries
6636    to runtime path list])
6637_LT_TAGDECL([], [link_all_deplibs], [0],
6638    [Whether libtool must link a program against all its dependency libraries])
6639_LT_TAGDECL([], [always_export_symbols], [0],
6640    [Set to "yes" if exported symbols are required])
6641_LT_TAGDECL([], [export_symbols_cmds], [2],
6642    [The commands to list exported symbols])
6643_LT_TAGDECL([], [exclude_expsyms], [1],
6644    [Symbols that should not be listed in the preloaded symbols])
6645_LT_TAGDECL([], [include_expsyms], [1],
6646    [Symbols that must always be exported])
6647_LT_TAGDECL([], [prelink_cmds], [2],
6648    [Commands necessary for linking programs (against libraries) with templates])
6649_LT_TAGDECL([], [postlink_cmds], [2],
6650    [Commands necessary for finishing linking programs])
6651_LT_TAGDECL([], [file_list_spec], [1],
6652    [Specify filename containing input files])
6653dnl FIXME: Not yet implemented
6654dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
6655dnl    [Compiler flag to generate thread safe objects])
6656])# _LT_LINKER_SHLIBS
6657
6658
6659# _LT_LANG_C_CONFIG([TAG])
6660# ------------------------
6661# Ensure that the configuration variables for a C compiler are suitably
6662# defined.  These variables are subsequently used by _LT_CONFIG to write
6663# the compiler configuration to `libtool'.
6664m4_defun([_LT_LANG_C_CONFIG],
6665[m4_require([_LT_DECL_EGREP])dnl
6666lt_save_CC="$CC"
6667AC_LANG_PUSH(C)
6668
6669# Source file extension for C test sources.
6670ac_ext=c
6671
6672# Object file extension for compiled C test sources.
6673objext=o
6674_LT_TAGVAR(objext, $1)=$objext
6675
6676# Code to be used in simple compile tests
6677lt_simple_compile_test_code="int some_variable = 0;"
6678
6679# Code to be used in simple link tests
6680lt_simple_link_test_code='int main(){return(0);}'
6681
6682_LT_TAG_COMPILER
6683# Save the default compiler, since it gets overwritten when the other
6684# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
6685compiler_DEFAULT=$CC
6686
6687# save warnings/boilerplate of simple test code
6688_LT_COMPILER_BOILERPLATE
6689_LT_LINKER_BOILERPLATE
6690
6691if test -n "$compiler"; then
6692  _LT_COMPILER_NO_RTTI($1)
6693  _LT_COMPILER_PIC($1)
6694  _LT_COMPILER_C_O($1)
6695  _LT_COMPILER_FILE_LOCKS($1)
6696  _LT_LINKER_SHLIBS($1)
6697  _LT_SYS_DYNAMIC_LINKER($1)
6698  _LT_LINKER_HARDCODE_LIBPATH($1)
6699  LT_SYS_DLOPEN_SELF
6700  _LT_CMD_STRIPLIB
6701
6702  # Report which library types will actually be built
6703  AC_MSG_CHECKING([if libtool supports shared libraries])
6704  AC_MSG_RESULT([$can_build_shared])
6705
6706  AC_MSG_CHECKING([whether to build shared libraries])
6707  test "$can_build_shared" = "no" && enable_shared=no
6708
6709  # On AIX, shared libraries and static libraries use the same namespace, and
6710  # are all built from PIC.
6711  case $host_os in
6712  aix3*)
6713    test "$enable_shared" = yes && enable_static=no
6714    if test -n "$RANLIB"; then
6715      archive_cmds="$archive_cmds~\$RANLIB \$lib"
6716      postinstall_cmds='$RANLIB $lib'
6717    fi
6718    ;;
6719
6720  aix[[4-9]]*)
6721    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6722      test "$enable_shared" = yes && enable_static=no
6723    fi
6724    ;;
6725  esac
6726  AC_MSG_RESULT([$enable_shared])
6727
6728  AC_MSG_CHECKING([whether to build static libraries])
6729  # Make sure either enable_shared or enable_static is yes.
6730  test "$enable_shared" = yes || enable_static=yes
6731  AC_MSG_RESULT([$enable_static])
6732
6733  _LT_CONFIG($1)
6734fi
6735AC_LANG_POP
6736CC="$lt_save_CC"
6737])# _LT_LANG_C_CONFIG
6738
6739
6740# _LT_LANG_CXX_CONFIG([TAG])
6741# --------------------------
6742# Ensure that the configuration variables for a C++ compiler are suitably
6743# defined.  These variables are subsequently used by _LT_CONFIG to write
6744# the compiler configuration to `libtool'.
6745m4_defun([_LT_LANG_CXX_CONFIG],
6746[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6747m4_require([_LT_DECL_EGREP])dnl
6748m4_require([_LT_PATH_MANIFEST_TOOL])dnl
6749if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
6750    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
6751    (test "X$CXX" != "Xg++"))) ; then
6752  AC_PROG_CXXCPP
6753else
6754  _lt_caught_CXX_error=yes
6755fi
6756
6757AC_LANG_PUSH(C++)
6758_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6759_LT_TAGVAR(allow_undefined_flag, $1)=
6760_LT_TAGVAR(always_export_symbols, $1)=no
6761_LT_TAGVAR(archive_expsym_cmds, $1)=
6762_LT_TAGVAR(compiler_needs_object, $1)=no
6763_LT_TAGVAR(export_dynamic_flag_spec, $1)=
6764_LT_TAGVAR(hardcode_direct, $1)=no
6765_LT_TAGVAR(hardcode_direct_absolute, $1)=no
6766_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6767_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6768_LT_TAGVAR(hardcode_libdir_separator, $1)=
6769_LT_TAGVAR(hardcode_minus_L, $1)=no
6770_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6771_LT_TAGVAR(hardcode_automatic, $1)=no
6772_LT_TAGVAR(inherit_rpath, $1)=no
6773_LT_TAGVAR(module_cmds, $1)=
6774_LT_TAGVAR(module_expsym_cmds, $1)=
6775_LT_TAGVAR(link_all_deplibs, $1)=unknown
6776_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6777_LT_TAGVAR(reload_flag, $1)=$reload_flag
6778_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
6779_LT_TAGVAR(no_undefined_flag, $1)=
6780_LT_TAGVAR(whole_archive_flag_spec, $1)=
6781_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6782
6783# Source file extension for C++ test sources.
6784ac_ext=cpp
6785
6786# Object file extension for compiled C++ test sources.
6787objext=o
6788_LT_TAGVAR(objext, $1)=$objext
6789
6790# No sense in running all these tests if we already determined that
6791# the CXX compiler isn't working.  Some variables (like enable_shared)
6792# are currently assumed to apply to all compilers on this platform,
6793# and will be corrupted by setting them based on a non-working compiler.
6794if test "$_lt_caught_CXX_error" != yes; then
6795  # Code to be used in simple compile tests
6796  lt_simple_compile_test_code="int some_variable = 0;"
6797
6798  # Code to be used in simple link tests
6799  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
6800
6801  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6802  _LT_TAG_COMPILER
6803
6804  # save warnings/boilerplate of simple test code
6805  _LT_COMPILER_BOILERPLATE
6806  _LT_LINKER_BOILERPLATE
6807
6808  # Allow CC to be a program name with arguments.
6809  lt_save_CC=$CC
6810  lt_save_CFLAGS=$CFLAGS
6811  lt_save_LD=$LD
6812  lt_save_GCC=$GCC
6813  GCC=$GXX
6814  lt_save_with_gnu_ld=$with_gnu_ld
6815  lt_save_path_LD=$lt_cv_path_LD
6816  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
6817    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
6818  else
6819    $as_unset lt_cv_prog_gnu_ld
6820  fi
6821  if test -n "${lt_cv_path_LDCXX+set}"; then
6822    lt_cv_path_LD=$lt_cv_path_LDCXX
6823  else
6824    $as_unset lt_cv_path_LD
6825  fi
6826  test -z "${LDCXX+set}" || LD=$LDCXX
6827  CC=${CXX-"c++"}
6828  CFLAGS=$CXXFLAGS
6829  compiler=$CC
6830  _LT_TAGVAR(compiler, $1)=$CC
6831  _LT_CC_BASENAME([$compiler])
6832
6833  if test -n "$compiler"; then
6834    # We don't want -fno-exception when compiling C++ code, so set the
6835    # no_builtin_flag separately
6836    if test "$GXX" = yes; then
6837      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
6838    else
6839      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6840    fi
6841
6842    if test "$GXX" = yes; then
6843      # Set up default GNU C++ configuration
6844
6845      LT_PATH_LD
6846
6847      # Check if GNU C++ uses GNU ld as the underlying linker, since the
6848      # archiving commands below assume that GNU ld is being used.
6849      if test "$with_gnu_ld" = yes; then
6850        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6851        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6852
6853        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6854        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6855
6856        # If archive_cmds runs LD, not CC, wlarc should be empty
6857        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
6858        #     investigate it a little bit more. (MM)
6859        wlarc='${wl}'
6860
6861        # ancient GNU ld didn't support --whole-archive et. al.
6862        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
6863	  $GREP 'no-whole-archive' > /dev/null; then
6864          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6865        else
6866          _LT_TAGVAR(whole_archive_flag_spec, $1)=
6867        fi
6868      else
6869        with_gnu_ld=no
6870        wlarc=
6871
6872        # A generic and very simple default shared library creation
6873        # command for GNU C++ for the case where it uses the native
6874        # linker, instead of GNU ld.  If possible, this setting should
6875        # overridden to take advantage of the native linker features on
6876        # the platform it is being used on.
6877        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6878      fi
6879
6880      # Commands to make compiler produce verbose output that lists
6881      # what "hidden" libraries, object files and flags are used when
6882      # linking a shared library.
6883      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6884
6885    else
6886      GXX=no
6887      with_gnu_ld=no
6888      wlarc=
6889    fi
6890
6891    # PORTME: fill in a description of your system's C++ link characteristics
6892    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6893    _LT_TAGVAR(ld_shlibs, $1)=yes
6894    case $host_os in
6895      aix3*)
6896        # FIXME: insert proper C++ library support
6897        _LT_TAGVAR(ld_shlibs, $1)=no
6898        ;;
6899      aix[[4-9]]*)
6900        if test "$host_cpu" = ia64; then
6901          # On IA64, the linker does run time linking by default, so we don't
6902          # have to do anything special.
6903          aix_use_runtimelinking=no
6904          exp_sym_flag='-Bexport'
6905          no_entry_flag=""
6906        else
6907          aix_use_runtimelinking=no
6908
6909          # Test if we are trying to use run time linking or normal
6910          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6911          # need to do runtime linking.
6912          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6913	    for ld_flag in $LDFLAGS; do
6914	      case $ld_flag in
6915	      *-brtl*)
6916	        aix_use_runtimelinking=yes
6917	        break
6918	        ;;
6919	      esac
6920	    done
6921	    ;;
6922          esac
6923
6924          exp_sym_flag='-bexport'
6925          no_entry_flag='-bnoentry'
6926        fi
6927
6928        # When large executables or shared objects are built, AIX ld can
6929        # have problems creating the table of contents.  If linking a library
6930        # or program results in "error TOC overflow" add -mminimal-toc to
6931        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
6932        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6933
6934        _LT_TAGVAR(archive_cmds, $1)=''
6935        _LT_TAGVAR(hardcode_direct, $1)=yes
6936        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6937        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6938        _LT_TAGVAR(link_all_deplibs, $1)=yes
6939        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6940
6941        if test "$GXX" = yes; then
6942          case $host_os in aix4.[[012]]|aix4.[[012]].*)
6943          # We only want to do this on AIX 4.2 and lower, the check
6944          # below for broken collect2 doesn't work under 4.3+
6945	  collect2name=`${CC} -print-prog-name=collect2`
6946	  if test -f "$collect2name" &&
6947	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6948	  then
6949	    # We have reworked collect2
6950	    :
6951	  else
6952	    # We have old collect2
6953	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
6954	    # It fails to find uninstalled libraries when the uninstalled
6955	    # path is not listed in the libpath.  Setting hardcode_minus_L
6956	    # to unsupported forces relinking
6957	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
6958	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6959	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
6960	  fi
6961          esac
6962          shared_flag='-shared'
6963	  if test "$aix_use_runtimelinking" = yes; then
6964	    shared_flag="$shared_flag "'${wl}-G'
6965	  fi
6966        else
6967          # not using gcc
6968          if test "$host_cpu" = ia64; then
6969	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6970	  # chokes on -Wl,-G. The following line is correct:
6971	  shared_flag='-G'
6972          else
6973	    if test "$aix_use_runtimelinking" = yes; then
6974	      shared_flag='${wl}-G'
6975	    else
6976	      shared_flag='${wl}-bM:SRE'
6977	    fi
6978          fi
6979        fi
6980
6981        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6982        # It seems that -bexpall does not export symbols beginning with
6983        # underscore (_), so it is better to generate a list of symbols to
6984	# export.
6985        _LT_TAGVAR(always_export_symbols, $1)=yes
6986        if test "$aix_use_runtimelinking" = yes; then
6987          # Warning - without using the other runtime loading flags (-brtl),
6988          # -berok will link without error, but may produce a broken library.
6989          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6990          # Determine the default libpath from the value encoded in an empty
6991          # executable.
6992          _LT_SYS_MODULE_PATH_AIX([$1])
6993          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6994
6995          _LT_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 func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
6996        else
6997          if test "$host_cpu" = ia64; then
6998	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6999	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
7000	    _LT_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"
7001          else
7002	    # Determine the default libpath from the value encoded in an
7003	    # empty executable.
7004	    _LT_SYS_MODULE_PATH_AIX([$1])
7005	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7006	    # Warning - without using the other run time loading flags,
7007	    # -berok will link without error, but may produce a broken library.
7008	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
7009	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
7010	    if test "$with_gnu_ld" = yes; then
7011	      # We only use this code for GNU lds that support --whole-archive.
7012	      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
7013	    else
7014	      # Exported symbols can be pulled into shared objects from archives
7015	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
7016	    fi
7017	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7018	    # This is similar to how AIX traditionally builds its shared
7019	    # libraries.
7020	    _LT_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'
7021          fi
7022        fi
7023        ;;
7024
7025      beos*)
7026	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
7027	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7028	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
7029	  # support --undefined.  This deserves some investigation.  FIXME
7030	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7031	else
7032	  _LT_TAGVAR(ld_shlibs, $1)=no
7033	fi
7034	;;
7035
7036      chorus*)
7037        case $cc_basename in
7038          *)
7039	  # FIXME: insert proper C++ library support
7040	  _LT_TAGVAR(ld_shlibs, $1)=no
7041	  ;;
7042        esac
7043        ;;
7044
7045      cygwin* | mingw* | pw32* | cegcc*)
7046	case $GXX,$cc_basename in
7047	,cl* | no,cl*)
7048	  # Native MSVC
7049	  # hardcode_libdir_flag_spec is actually meaningless, as there is
7050	  # no search path for DLLs.
7051	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
7052	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7053	  _LT_TAGVAR(always_export_symbols, $1)=yes
7054	  _LT_TAGVAR(file_list_spec, $1)='@'
7055	  # Tell ltmain to make .lib files, not .a files.
7056	  libext=lib
7057	  # Tell ltmain to make .dll files, not .so files.
7058	  shrext_cmds=".dll"
7059	  # FIXME: Setting linknames here is a bad hack.
7060	  _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
7061	  _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7062	      $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
7063	    else
7064	      $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
7065	    fi~
7066	    $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
7067	    linknames='
7068	  # The linker will not automatically build a static lib if we build a DLL.
7069	  # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
7070	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7071	  # Don't use ranlib
7072	  _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
7073	  _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
7074	    lt_tool_outputfile="@TOOL_OUTPUT@"~
7075	    case $lt_outputfile in
7076	      *.exe|*.EXE) ;;
7077	      *)
7078		lt_outputfile="$lt_outputfile.exe"
7079		lt_tool_outputfile="$lt_tool_outputfile.exe"
7080		;;
7081	    esac~
7082	    func_to_tool_file "$lt_outputfile"~
7083	    if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
7084	      $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
7085	      $RM "$lt_outputfile.manifest";
7086	    fi'
7087	  ;;
7088	*)
7089	  # g++
7090	  # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
7091	  # as there is no search path for DLLs.
7092	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7093	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
7094	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7095	  _LT_TAGVAR(always_export_symbols, $1)=no
7096	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7097
7098	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
7099	    _LT_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'
7100	    # If the export-symbols file already is a .def file (1st line
7101	    # is EXPORTS), use it as is; otherwise, prepend...
7102	    _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7103	      cp $export_symbols $output_objdir/$soname.def;
7104	    else
7105	      echo EXPORTS > $output_objdir/$soname.def;
7106	      cat $export_symbols >> $output_objdir/$soname.def;
7107	    fi~
7108	    $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'
7109	  else
7110	    _LT_TAGVAR(ld_shlibs, $1)=no
7111	  fi
7112	  ;;
7113	esac
7114	;;
7115      darwin* | rhapsody*)
7116        _LT_DARWIN_LINKER_FEATURES($1)
7117	;;
7118
7119      dgux*)
7120        case $cc_basename in
7121          ec++*)
7122	    # FIXME: insert proper C++ library support
7123	    _LT_TAGVAR(ld_shlibs, $1)=no
7124	    ;;
7125          ghcx*)
7126	    # Green Hills C++ Compiler
7127	    # FIXME: insert proper C++ library support
7128	    _LT_TAGVAR(ld_shlibs, $1)=no
7129	    ;;
7130          *)
7131	    # FIXME: insert proper C++ library support
7132	    _LT_TAGVAR(ld_shlibs, $1)=no
7133	    ;;
7134        esac
7135        ;;
7136
7137      freebsd[[12]]*)
7138        # C++ shared libraries reported to be fairly broken before
7139	# switch to ELF
7140        _LT_TAGVAR(ld_shlibs, $1)=no
7141        ;;
7142
7143      freebsd-elf*)
7144        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7145        ;;
7146
7147      freebsd* | dragonfly*)
7148        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
7149        # conventions
7150        _LT_TAGVAR(ld_shlibs, $1)=yes
7151        ;;
7152
7153      gnu*)
7154        ;;
7155
7156      haiku*)
7157        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7158        _LT_TAGVAR(link_all_deplibs, $1)=yes
7159        ;;
7160
7161      hpux9*)
7162        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7163        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7164        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7165        _LT_TAGVAR(hardcode_direct, $1)=yes
7166        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7167				             # but as the default
7168				             # location of the library.
7169
7170        case $cc_basename in
7171          CC*)
7172            # FIXME: insert proper C++ library support
7173            _LT_TAGVAR(ld_shlibs, $1)=no
7174            ;;
7175          aCC*)
7176            _LT_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'
7177            # Commands to make compiler produce verbose output that lists
7178            # what "hidden" libraries, object files and flags are used when
7179            # linking a shared library.
7180            #
7181            # There doesn't appear to be a way to prevent this compiler from
7182            # explicitly linking system object files so we need to strip them
7183            # from the output so that they don't get included in the library
7184            # dependencies.
7185            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
7186            ;;
7187          *)
7188            if test "$GXX" = yes; then
7189              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${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'
7190            else
7191              # FIXME: insert proper C++ library support
7192              _LT_TAGVAR(ld_shlibs, $1)=no
7193            fi
7194            ;;
7195        esac
7196        ;;
7197
7198      hpux10*|hpux11*)
7199        if test $with_gnu_ld = no; then
7200	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7201	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7202
7203          case $host_cpu in
7204            hppa*64*|ia64*)
7205              ;;
7206            *)
7207	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7208              ;;
7209          esac
7210        fi
7211        case $host_cpu in
7212          hppa*64*|ia64*)
7213            _LT_TAGVAR(hardcode_direct, $1)=no
7214            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7215            ;;
7216          *)
7217            _LT_TAGVAR(hardcode_direct, $1)=yes
7218            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7219            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7220					         # but as the default
7221					         # location of the library.
7222            ;;
7223        esac
7224
7225        case $cc_basename in
7226          CC*)
7227	    # FIXME: insert proper C++ library support
7228	    _LT_TAGVAR(ld_shlibs, $1)=no
7229	    ;;
7230          aCC*)
7231	    case $host_cpu in
7232	      hppa*64*)
7233	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7234	        ;;
7235	      ia64*)
7236	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7237	        ;;
7238	      *)
7239	        _LT_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'
7240	        ;;
7241	    esac
7242	    # Commands to make compiler produce verbose output that lists
7243	    # what "hidden" libraries, object files and flags are used when
7244	    # linking a shared library.
7245	    #
7246	    # There doesn't appear to be a way to prevent this compiler from
7247	    # explicitly linking system object files so we need to strip them
7248	    # from the output so that they don't get included in the library
7249	    # dependencies.
7250	    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; func_echo_all "$list"'
7251	    ;;
7252          *)
7253	    if test "$GXX" = yes; then
7254	      if test $with_gnu_ld = no; then
7255	        case $host_cpu in
7256	          hppa*64*)
7257	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7258	            ;;
7259	          ia64*)
7260	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7261	            ;;
7262	          *)
7263	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7264	            ;;
7265	        esac
7266	      fi
7267	    else
7268	      # FIXME: insert proper C++ library support
7269	      _LT_TAGVAR(ld_shlibs, $1)=no
7270	    fi
7271	    ;;
7272        esac
7273        ;;
7274
7275      interix[[3-9]]*)
7276	_LT_TAGVAR(hardcode_direct, $1)=no
7277	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7278	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7279	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7280	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
7281	# Instead, shared libraries are loaded at an image base (0x10000000 by
7282	# default) and relocated if they conflict, which is a slow very memory
7283	# consuming and fragmenting process.  To avoid this, we pick a random,
7284	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
7285	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
7286	_LT_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'
7287	_LT_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'
7288	;;
7289      irix5* | irix6*)
7290        case $cc_basename in
7291          CC*)
7292	    # SGI C++
7293	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
7294
7295	    # Archives containing C++ object files must be created using
7296	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
7297	    # necessary to make sure instantiated templates are included
7298	    # in the archive.
7299	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
7300	    ;;
7301          *)
7302	    if test "$GXX" = yes; then
7303	      if test "$with_gnu_ld" = no; then
7304	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7305	      else
7306	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
7307	      fi
7308	    fi
7309	    _LT_TAGVAR(link_all_deplibs, $1)=yes
7310	    ;;
7311        esac
7312        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7313        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7314        _LT_TAGVAR(inherit_rpath, $1)=yes
7315        ;;
7316
7317      linux* | k*bsd*-gnu | kopensolaris*-gnu)
7318        case $cc_basename in
7319          KCC*)
7320	    # Kuck and Associates, Inc. (KAI) C++ Compiler
7321
7322	    # KCC will only create a shared library if the output file
7323	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
7324	    # to its proper name (with version) after linking.
7325	    _LT_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'
7326	    _LT_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'
7327	    # Commands to make compiler produce verbose output that lists
7328	    # what "hidden" libraries, object files and flags are used when
7329	    # linking a shared library.
7330	    #
7331	    # There doesn't appear to be a way to prevent this compiler from
7332	    # explicitly linking system object files so we need to strip them
7333	    # from the output so that they don't get included in the library
7334	    # dependencies.
7335	    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; func_echo_all "$list"'
7336
7337	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7338	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7339
7340	    # Archives containing C++ object files must be created using
7341	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
7342	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
7343	    ;;
7344	  icpc* | ecpc* )
7345	    # Intel C++
7346	    with_gnu_ld=yes
7347	    # version 8.0 and above of icpc choke on multiply defined symbols
7348	    # if we add $predep_objects and $postdep_objects, however 7.1 and
7349	    # earlier do not add the objects themselves.
7350	    case `$CC -V 2>&1` in
7351	      *"Version 7."*)
7352	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7353		_LT_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'
7354		;;
7355	      *)  # Version 8.0 or newer
7356	        tmp_idyn=
7357	        case $host_cpu in
7358		  ia64*) tmp_idyn=' -i_dynamic';;
7359		esac
7360	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7361		_LT_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'
7362		;;
7363	    esac
7364	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7365	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7366	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7367	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
7368	    ;;
7369          pgCC* | pgcpp*)
7370            # Portland Group C++ compiler
7371	    case `$CC -V` in
7372	    *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
7373	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
7374		rm -rf $tpldir~
7375		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
7376		compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
7377	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
7378		rm -rf $tpldir~
7379		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
7380		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
7381		$RANLIB $oldlib'
7382	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
7383		rm -rf $tpldir~
7384		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7385		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7386	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
7387		rm -rf $tpldir~
7388		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7389		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
7390	      ;;
7391	    *) # Version 6 and above use weak symbols
7392	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7393	      _LT_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'
7394	      ;;
7395	    esac
7396
7397	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
7398	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7399	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
7400            ;;
7401	  cxx*)
7402	    # Compaq C++
7403	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7404	    _LT_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'
7405
7406	    runpath_var=LD_RUN_PATH
7407	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7408	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7409
7410	    # Commands to make compiler produce verbose output that lists
7411	    # what "hidden" libraries, object files and flags are used when
7412	    # linking a shared library.
7413	    #
7414	    # There doesn't appear to be a way to prevent this compiler from
7415	    # explicitly linking system object files so we need to strip them
7416	    # from the output so that they don't get included in the library
7417	    # dependencies.
7418	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$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; func_echo_all "X$list" | $Xsed'
7419	    ;;
7420	  xl* | mpixl* | bgxl*)
7421	    # IBM XL 8.0 on PPC, with GNU ld
7422	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7423	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7424	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7425	    if test "x$supports_anon_versioning" = xyes; then
7426	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7427		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7428		echo "local: *; };" >> $output_objdir/$libname.ver~
7429		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
7430	    fi
7431	    ;;
7432	  *)
7433	    case `$CC -V 2>&1 | sed 5q` in
7434	    *Sun\ C*)
7435	      # Sun C++ 5.9
7436	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7437	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7438	      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
7439	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7440	      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
7441	      _LT_TAGVAR(compiler_needs_object, $1)=yes
7442
7443	      # Not sure whether something based on
7444	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
7445	      # would be better.
7446	      output_verbose_link_cmd='func_echo_all'
7447
7448	      # Archives containing C++ object files must be created using
7449	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
7450	      # necessary to make sure instantiated templates are included
7451	      # in the archive.
7452	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7453	      ;;
7454	    esac
7455	    ;;
7456	esac
7457	;;
7458
7459      lynxos*)
7460        # FIXME: insert proper C++ library support
7461	_LT_TAGVAR(ld_shlibs, $1)=no
7462	;;
7463
7464      m88k*)
7465        # FIXME: insert proper C++ library support
7466        _LT_TAGVAR(ld_shlibs, $1)=no
7467	;;
7468
7469      mvs*)
7470        case $cc_basename in
7471          cxx*)
7472	    # FIXME: insert proper C++ library support
7473	    _LT_TAGVAR(ld_shlibs, $1)=no
7474	    ;;
7475	  *)
7476	    # FIXME: insert proper C++ library support
7477	    _LT_TAGVAR(ld_shlibs, $1)=no
7478	    ;;
7479	esac
7480	;;
7481
7482      netbsd*)
7483        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7484	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
7485	  wlarc=
7486	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7487	  _LT_TAGVAR(hardcode_direct, $1)=yes
7488	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7489	fi
7490	# Workaround some broken pre-1.5 toolchains
7491	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
7492	;;
7493
7494      *nto* | *qnx*)
7495        _LT_TAGVAR(ld_shlibs, $1)=yes
7496	;;
7497
7498      openbsd2*)
7499        # C++ shared libraries are fairly broken
7500	_LT_TAGVAR(ld_shlibs, $1)=no
7501	;;
7502
7503      openbsd*)
7504	if test -f /usr/libexec/ld.so; then
7505	  _LT_TAGVAR(hardcode_direct, $1)=yes
7506	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7507	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7508	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7509	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7510	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7511	    _LT_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'
7512	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7513	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7514	  fi
7515	  output_verbose_link_cmd=func_echo_all
7516	else
7517	  _LT_TAGVAR(ld_shlibs, $1)=no
7518	fi
7519	;;
7520
7521      osf3* | osf4* | osf5*)
7522        case $cc_basename in
7523          KCC*)
7524	    # Kuck and Associates, Inc. (KAI) C++ Compiler
7525
7526	    # KCC will only create a shared library if the output file
7527	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
7528	    # to its proper name (with version) after linking.
7529	    _LT_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'
7530
7531	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7532	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7533
7534	    # Archives containing C++ object files must be created using
7535	    # the KAI C++ compiler.
7536	    case $host in
7537	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
7538	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
7539	    esac
7540	    ;;
7541          RCC*)
7542	    # Rational C++ 2.4.1
7543	    # FIXME: insert proper C++ library support
7544	    _LT_TAGVAR(ld_shlibs, $1)=no
7545	    ;;
7546          cxx*)
7547	    case $host in
7548	      osf3*)
7549	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7550	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
7551	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7552		;;
7553	      *)
7554	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7555	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
7556	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
7557	          echo "-hidden">> $lib.exp~
7558	          $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~
7559	          $RM $lib.exp'
7560	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7561		;;
7562	    esac
7563
7564	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7565
7566	    # Commands to make compiler produce verbose output that lists
7567	    # what "hidden" libraries, object files and flags are used when
7568	    # linking a shared library.
7569	    #
7570	    # There doesn't appear to be a way to prevent this compiler from
7571	    # explicitly linking system object files so we need to strip them
7572	    # from the output so that they don't get included in the library
7573	    # dependencies.
7574	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$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; func_echo_all "$list"'
7575	    ;;
7576	  *)
7577	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7578	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7579	      case $host in
7580	        osf3*)
7581	          _LT_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" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7582		  ;;
7583	        *)
7584	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7585		  ;;
7586	      esac
7587
7588	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7589	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7590
7591	      # Commands to make compiler produce verbose output that lists
7592	      # what "hidden" libraries, object files and flags are used when
7593	      # linking a shared library.
7594	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7595
7596	    else
7597	      # FIXME: insert proper C++ library support
7598	      _LT_TAGVAR(ld_shlibs, $1)=no
7599	    fi
7600	    ;;
7601        esac
7602        ;;
7603
7604      psos*)
7605        # FIXME: insert proper C++ library support
7606        _LT_TAGVAR(ld_shlibs, $1)=no
7607        ;;
7608
7609      sunos4*)
7610        case $cc_basename in
7611          CC*)
7612	    # Sun C++ 4.x
7613	    # FIXME: insert proper C++ library support
7614	    _LT_TAGVAR(ld_shlibs, $1)=no
7615	    ;;
7616          lcc*)
7617	    # Lucid
7618	    # FIXME: insert proper C++ library support
7619	    _LT_TAGVAR(ld_shlibs, $1)=no
7620	    ;;
7621          *)
7622	    # FIXME: insert proper C++ library support
7623	    _LT_TAGVAR(ld_shlibs, $1)=no
7624	    ;;
7625        esac
7626        ;;
7627
7628      solaris*)
7629        case $cc_basename in
7630          CC* | sunCC*)
7631	    # Sun C++ 4.2, 5.x and Centerline C++
7632            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
7633	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7634	    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7635	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7636	      $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'
7637
7638	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7639	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7640	    case $host_os in
7641	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7642	      *)
7643		# The compiler driver will combine and reorder linker options,
7644		# but understands `-z linker_flag'.
7645	        # Supported since Solaris 2.6 (maybe 2.5.1?)
7646		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7647	        ;;
7648	    esac
7649	    _LT_TAGVAR(link_all_deplibs, $1)=yes
7650
7651	    output_verbose_link_cmd='func_echo_all'
7652
7653	    # Archives containing C++ object files must be created using
7654	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
7655	    # necessary to make sure instantiated templates are included
7656	    # in the archive.
7657	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7658	    ;;
7659          gcx*)
7660	    # Green Hills C++ Compiler
7661	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7662
7663	    # The C++ compiler must be used to create the archive.
7664	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
7665	    ;;
7666          *)
7667	    # GNU C++ compiler with Solaris linker
7668	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7669	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
7670	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
7671	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7672	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7673		  $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7674
7675	        # Commands to make compiler produce verbose output that lists
7676	        # what "hidden" libraries, object files and flags are used when
7677	        # linking a shared library.
7678	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7679	      else
7680	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
7681	        # platform.
7682	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7683	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7684		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7685
7686	        # Commands to make compiler produce verbose output that lists
7687	        # what "hidden" libraries, object files and flags are used when
7688	        # linking a shared library.
7689	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7690	      fi
7691
7692	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
7693	      case $host_os in
7694		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7695		*)
7696		  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
7697		  ;;
7698	      esac
7699	    fi
7700	    ;;
7701        esac
7702        ;;
7703
7704    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7705      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7706      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7707      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7708      runpath_var='LD_RUN_PATH'
7709
7710      case $cc_basename in
7711        CC*)
7712	  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7713	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7714	  ;;
7715	*)
7716	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7717	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7718	  ;;
7719      esac
7720      ;;
7721
7722      sysv5* | sco3.2v5* | sco5v6*)
7723	# Note: We can NOT use -z defs as we might desire, because we do not
7724	# link with -lc, and that would cause any symbols used from libc to
7725	# always be unresolved, which means just about no library would
7726	# ever link correctly.  If we're not using GNU ld we use -z text
7727	# though, which does catch some bad symbols but isn't as heavy-handed
7728	# as -z defs.
7729	_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7730	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
7731	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7732	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7733	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
7734	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7735	_LT_TAGVAR(link_all_deplibs, $1)=yes
7736	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
7737	runpath_var='LD_RUN_PATH'
7738
7739	case $cc_basename in
7740          CC*)
7741	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7742	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7743	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
7744	      '"$_LT_TAGVAR(old_archive_cmds, $1)"
7745	    _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
7746	      '"$_LT_TAGVAR(reload_cmds, $1)"
7747	    ;;
7748	  *)
7749	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7750	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7751	    ;;
7752	esac
7753      ;;
7754
7755      tandem*)
7756        case $cc_basename in
7757          NCC*)
7758	    # NonStop-UX NCC 3.20
7759	    # FIXME: insert proper C++ library support
7760	    _LT_TAGVAR(ld_shlibs, $1)=no
7761	    ;;
7762          *)
7763	    # FIXME: insert proper C++ library support
7764	    _LT_TAGVAR(ld_shlibs, $1)=no
7765	    ;;
7766        esac
7767        ;;
7768
7769      vxworks*)
7770        # FIXME: insert proper C++ library support
7771        _LT_TAGVAR(ld_shlibs, $1)=no
7772        ;;
7773
7774      *)
7775        # FIXME: insert proper C++ library support
7776        _LT_TAGVAR(ld_shlibs, $1)=no
7777        ;;
7778    esac
7779
7780    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7781    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7782
7783    _LT_TAGVAR(GCC, $1)="$GXX"
7784    _LT_TAGVAR(LD, $1)="$LD"
7785
7786    ## CAVEAT EMPTOR:
7787    ## There is no encapsulation within the following macros, do not change
7788    ## the running order or otherwise move them around unless you know exactly
7789    ## what you are doing...
7790    _LT_SYS_HIDDEN_LIBDEPS($1)
7791    _LT_COMPILER_PIC($1)
7792    _LT_COMPILER_C_O($1)
7793    _LT_COMPILER_FILE_LOCKS($1)
7794    _LT_LINKER_SHLIBS($1)
7795    _LT_SYS_DYNAMIC_LINKER($1)
7796    _LT_LINKER_HARDCODE_LIBPATH($1)
7797
7798    _LT_CONFIG($1)
7799  fi # test -n "$compiler"
7800
7801  CC=$lt_save_CC
7802  CFLAGS=$lt_save_CFLAGS
7803  LDCXX=$LD
7804  LD=$lt_save_LD
7805  GCC=$lt_save_GCC
7806  with_gnu_ld=$lt_save_with_gnu_ld
7807  lt_cv_path_LDCXX=$lt_cv_path_LD
7808  lt_cv_path_LD=$lt_save_path_LD
7809  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
7810  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
7811fi # test "$_lt_caught_CXX_error" != yes
7812
7813AC_LANG_POP
7814])# _LT_LANG_CXX_CONFIG
7815
7816
7817# _LT_FUNC_STRIPNAME_CNF
7818# ----------------------
7819# func_stripname_cnf prefix suffix name
7820# strip PREFIX and SUFFIX off of NAME.
7821# PREFIX and SUFFIX must not contain globbing or regex special
7822# characters, hashes, percent signs, but SUFFIX may contain a leading
7823# dot (in which case that matches only a dot).
7824#
7825# This function is identical to the (non-XSI) version of func_stripname,
7826# except this one can be used by m4 code that may be executed by configure,
7827# rather than the libtool script.
7828m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
7829AC_REQUIRE([_LT_DECL_SED])
7830AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
7831func_stripname_cnf ()
7832{
7833  case ${2} in
7834  .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
7835  *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
7836  esac
7837} # func_stripname_cnf
7838])# _LT_FUNC_STRIPNAME_CNF
7839
7840# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
7841# ---------------------------------
7842# Figure out "hidden" library dependencies from verbose
7843# compiler output when linking a shared library.
7844# Parse the compiler output and extract the necessary
7845# objects, libraries and library flags.
7846m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
7847[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7848AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
7849# Dependencies to place before and after the object being linked:
7850_LT_TAGVAR(predep_objects, $1)=
7851_LT_TAGVAR(postdep_objects, $1)=
7852_LT_TAGVAR(predeps, $1)=
7853_LT_TAGVAR(postdeps, $1)=
7854_LT_TAGVAR(compiler_lib_search_path, $1)=
7855
7856dnl we can't use the lt_simple_compile_test_code here,
7857dnl because it contains code intended for an executable,
7858dnl not a library.  It's possible we should let each
7859dnl tag define a new lt_????_link_test_code variable,
7860dnl but it's only used here...
7861m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
7862int a;
7863void foo (void) { a = 0; }
7864_LT_EOF
7865], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
7866class Foo
7867{
7868public:
7869  Foo (void) { a = 0; }
7870private:
7871  int a;
7872};
7873_LT_EOF
7874], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
7875      subroutine foo
7876      implicit none
7877      integer*4 a
7878      a=0
7879      return
7880      end
7881_LT_EOF
7882], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
7883      subroutine foo
7884      implicit none
7885      integer a
7886      a=0
7887      return
7888      end
7889_LT_EOF
7890], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
7891public class foo {
7892  private int a;
7893  public void bar (void) {
7894    a = 0;
7895  }
7896};
7897_LT_EOF
7898])
7899
7900_lt_libdeps_save_CFLAGS=$CFLAGS
7901case "$CC $CFLAGS " in #(
7902*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
7903*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
7904esac
7905
7906dnl Parse the compiler output and extract the necessary
7907dnl objects, libraries and library flags.
7908if AC_TRY_EVAL(ac_compile); then
7909  # Parse the compiler output and extract the necessary
7910  # objects, libraries and library flags.
7911
7912  # Sentinel used to keep track of whether or not we are before
7913  # the conftest object file.
7914  pre_test_object_deps_done=no
7915
7916  for p in `eval "$output_verbose_link_cmd"`; do
7917    case ${prev}${p} in
7918
7919    -L* | -R* | -l*)
7920       # Some compilers place space between "-{L,R}" and the path.
7921       # Remove the space.
7922       if test $p = "-L" ||
7923          test $p = "-R"; then
7924	 prev=$p
7925	 continue
7926       fi
7927
7928       # Expand the sysroot to ease extracting the directories later.
7929       if test -z "$prev"; then
7930         case $p in
7931         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
7932         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
7933         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
7934         esac
7935       fi
7936       case $p in
7937       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
7938       esac
7939       if test "$pre_test_object_deps_done" = no; then
7940	 case ${prev} in
7941	 -L | -R)
7942	   # Internal compiler library paths should come after those
7943	   # provided the user.  The postdeps already come after the
7944	   # user supplied libs so there is no need to process them.
7945	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
7946	     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
7947	   else
7948	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
7949	   fi
7950	   ;;
7951	 # The "-l" case would never come before the object being
7952	 # linked, so don't bother handling this case.
7953	 esac
7954       else
7955	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
7956	   _LT_TAGVAR(postdeps, $1)="${prev}${p}"
7957	 else
7958	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
7959	 fi
7960       fi
7961       prev=
7962       ;;
7963
7964    *.lto.$objext) ;; # Ignore GCC LTO objects
7965    *.$objext)
7966       # This assumes that the test object file only shows up
7967       # once in the compiler output.
7968       if test "$p" = "conftest.$objext"; then
7969	 pre_test_object_deps_done=yes
7970	 continue
7971       fi
7972
7973       if test "$pre_test_object_deps_done" = no; then
7974	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
7975	   _LT_TAGVAR(predep_objects, $1)="$p"
7976	 else
7977	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
7978	 fi
7979       else
7980	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
7981	   _LT_TAGVAR(postdep_objects, $1)="$p"
7982	 else
7983	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
7984	 fi
7985       fi
7986       ;;
7987
7988    *) ;; # Ignore the rest.
7989
7990    esac
7991  done
7992
7993  # Clean up.
7994  rm -f a.out a.exe
7995else
7996  echo "libtool.m4: error: problem compiling $1 test program"
7997fi
7998
7999$RM -f confest.$objext
8000CFLAGS=$_lt_libdeps_save_CFLAGS
8001
8002# PORTME: override above test on systems where it is broken
8003m4_if([$1], [CXX],
8004[case $host_os in
8005interix[[3-9]]*)
8006  # Interix 3.5 installs completely hosed .la files for C++, so rather than
8007  # hack all around it, let's just trust "g++" to DTRT.
8008  _LT_TAGVAR(predep_objects,$1)=
8009  _LT_TAGVAR(postdep_objects,$1)=
8010  _LT_TAGVAR(postdeps,$1)=
8011  ;;
8012
8013linux*)
8014  case `$CC -V 2>&1 | sed 5q` in
8015  *Sun\ C*)
8016    # Sun C++ 5.9
8017
8018    # The more standards-conforming stlport4 library is
8019    # incompatible with the Cstd library. Avoid specifying
8020    # it if it's in CXXFLAGS. Ignore libCrun as
8021    # -library=stlport4 depends on it.
8022    case " $CXX $CXXFLAGS " in
8023    *" -library=stlport4 "*)
8024      solaris_use_stlport4=yes
8025      ;;
8026    esac
8027
8028    if test "$solaris_use_stlport4" != yes; then
8029      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8030    fi
8031    ;;
8032  esac
8033  ;;
8034
8035solaris*)
8036  case $cc_basename in
8037  CC* | sunCC*)
8038    # The more standards-conforming stlport4 library is
8039    # incompatible with the Cstd library. Avoid specifying
8040    # it if it's in CXXFLAGS. Ignore libCrun as
8041    # -library=stlport4 depends on it.
8042    case " $CXX $CXXFLAGS " in
8043    *" -library=stlport4 "*)
8044      solaris_use_stlport4=yes
8045      ;;
8046    esac
8047
8048    # Adding this requires a known-good setup of shared libraries for
8049    # Sun compiler versions before 5.6, else PIC objects from an old
8050    # archive will be linked into the output, leading to subtle bugs.
8051    if test "$solaris_use_stlport4" != yes; then
8052      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8053    fi
8054    ;;
8055  esac
8056  ;;
8057esac
8058])
8059
8060case " $_LT_TAGVAR(postdeps, $1) " in
8061*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
8062esac
8063 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
8064if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
8065 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
8066fi
8067_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
8068    [The directories searched by this compiler when creating a shared library])
8069_LT_TAGDECL([], [predep_objects], [1],
8070    [Dependencies to place before and after the objects being linked to
8071    create a shared library])
8072_LT_TAGDECL([], [postdep_objects], [1])
8073_LT_TAGDECL([], [predeps], [1])
8074_LT_TAGDECL([], [postdeps], [1])
8075_LT_TAGDECL([], [compiler_lib_search_path], [1],
8076    [The library search path used internally by the compiler when linking
8077    a shared library])
8078])# _LT_SYS_HIDDEN_LIBDEPS
8079
8080
8081# _LT_LANG_F77_CONFIG([TAG])
8082# --------------------------
8083# Ensure that the configuration variables for a Fortran 77 compiler are
8084# suitably defined.  These variables are subsequently used by _LT_CONFIG
8085# to write the compiler configuration to `libtool'.
8086m4_defun([_LT_LANG_F77_CONFIG],
8087[AC_LANG_PUSH(Fortran 77)
8088if test -z "$F77" || test "X$F77" = "Xno"; then
8089  _lt_disable_F77=yes
8090fi
8091
8092_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8093_LT_TAGVAR(allow_undefined_flag, $1)=
8094_LT_TAGVAR(always_export_symbols, $1)=no
8095_LT_TAGVAR(archive_expsym_cmds, $1)=
8096_LT_TAGVAR(export_dynamic_flag_spec, $1)=
8097_LT_TAGVAR(hardcode_direct, $1)=no
8098_LT_TAGVAR(hardcode_direct_absolute, $1)=no
8099_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8100_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
8101_LT_TAGVAR(hardcode_libdir_separator, $1)=
8102_LT_TAGVAR(hardcode_minus_L, $1)=no
8103_LT_TAGVAR(hardcode_automatic, $1)=no
8104_LT_TAGVAR(inherit_rpath, $1)=no
8105_LT_TAGVAR(module_cmds, $1)=
8106_LT_TAGVAR(module_expsym_cmds, $1)=
8107_LT_TAGVAR(link_all_deplibs, $1)=unknown
8108_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8109_LT_TAGVAR(reload_flag, $1)=$reload_flag
8110_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8111_LT_TAGVAR(no_undefined_flag, $1)=
8112_LT_TAGVAR(whole_archive_flag_spec, $1)=
8113_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8114
8115# Source file extension for f77 test sources.
8116ac_ext=f
8117
8118# Object file extension for compiled f77 test sources.
8119objext=o
8120_LT_TAGVAR(objext, $1)=$objext
8121
8122# No sense in running all these tests if we already determined that
8123# the F77 compiler isn't working.  Some variables (like enable_shared)
8124# are currently assumed to apply to all compilers on this platform,
8125# and will be corrupted by setting them based on a non-working compiler.
8126if test "$_lt_disable_F77" != yes; then
8127  # Code to be used in simple compile tests
8128  lt_simple_compile_test_code="\
8129      subroutine t
8130      return
8131      end
8132"
8133
8134  # Code to be used in simple link tests
8135  lt_simple_link_test_code="\
8136      program t
8137      end
8138"
8139
8140  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8141  _LT_TAG_COMPILER
8142
8143  # save warnings/boilerplate of simple test code
8144  _LT_COMPILER_BOILERPLATE
8145  _LT_LINKER_BOILERPLATE
8146
8147  # Allow CC to be a program name with arguments.
8148  lt_save_CC="$CC"
8149  lt_save_GCC=$GCC
8150  lt_save_CFLAGS=$CFLAGS
8151  CC=${F77-"f77"}
8152  CFLAGS=$FFLAGS
8153  compiler=$CC
8154  _LT_TAGVAR(compiler, $1)=$CC
8155  _LT_CC_BASENAME([$compiler])
8156  GCC=$G77
8157  if test -n "$compiler"; then
8158    AC_MSG_CHECKING([if libtool supports shared libraries])
8159    AC_MSG_RESULT([$can_build_shared])
8160
8161    AC_MSG_CHECKING([whether to build shared libraries])
8162    test "$can_build_shared" = "no" && enable_shared=no
8163
8164    # On AIX, shared libraries and static libraries use the same namespace, and
8165    # are all built from PIC.
8166    case $host_os in
8167      aix3*)
8168        test "$enable_shared" = yes && enable_static=no
8169        if test -n "$RANLIB"; then
8170          archive_cmds="$archive_cmds~\$RANLIB \$lib"
8171          postinstall_cmds='$RANLIB $lib'
8172        fi
8173        ;;
8174      aix[[4-9]]*)
8175	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8176	  test "$enable_shared" = yes && enable_static=no
8177	fi
8178        ;;
8179    esac
8180    AC_MSG_RESULT([$enable_shared])
8181
8182    AC_MSG_CHECKING([whether to build static libraries])
8183    # Make sure either enable_shared or enable_static is yes.
8184    test "$enable_shared" = yes || enable_static=yes
8185    AC_MSG_RESULT([$enable_static])
8186
8187    _LT_TAGVAR(GCC, $1)="$G77"
8188    _LT_TAGVAR(LD, $1)="$LD"
8189
8190    ## CAVEAT EMPTOR:
8191    ## There is no encapsulation within the following macros, do not change
8192    ## the running order or otherwise move them around unless you know exactly
8193    ## what you are doing...
8194    _LT_COMPILER_PIC($1)
8195    _LT_COMPILER_C_O($1)
8196    _LT_COMPILER_FILE_LOCKS($1)
8197    _LT_LINKER_SHLIBS($1)
8198    _LT_SYS_DYNAMIC_LINKER($1)
8199    _LT_LINKER_HARDCODE_LIBPATH($1)
8200
8201    _LT_CONFIG($1)
8202  fi # test -n "$compiler"
8203
8204  GCC=$lt_save_GCC
8205  CC="$lt_save_CC"
8206  CFLAGS="$lt_save_CFLAGS"
8207fi # test "$_lt_disable_F77" != yes
8208
8209AC_LANG_POP
8210])# _LT_LANG_F77_CONFIG
8211
8212
8213# _LT_LANG_FC_CONFIG([TAG])
8214# -------------------------
8215# Ensure that the configuration variables for a Fortran compiler are
8216# suitably defined.  These variables are subsequently used by _LT_CONFIG
8217# to write the compiler configuration to `libtool'.
8218m4_defun([_LT_LANG_FC_CONFIG],
8219[AC_LANG_PUSH(Fortran)
8220
8221if test -z "$FC" || test "X$FC" = "Xno"; then
8222  _lt_disable_FC=yes
8223fi
8224
8225_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8226_LT_TAGVAR(allow_undefined_flag, $1)=
8227_LT_TAGVAR(always_export_symbols, $1)=no
8228_LT_TAGVAR(archive_expsym_cmds, $1)=
8229_LT_TAGVAR(export_dynamic_flag_spec, $1)=
8230_LT_TAGVAR(hardcode_direct, $1)=no
8231_LT_TAGVAR(hardcode_direct_absolute, $1)=no
8232_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8233_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
8234_LT_TAGVAR(hardcode_libdir_separator, $1)=
8235_LT_TAGVAR(hardcode_minus_L, $1)=no
8236_LT_TAGVAR(hardcode_automatic, $1)=no
8237_LT_TAGVAR(inherit_rpath, $1)=no
8238_LT_TAGVAR(module_cmds, $1)=
8239_LT_TAGVAR(module_expsym_cmds, $1)=
8240_LT_TAGVAR(link_all_deplibs, $1)=unknown
8241_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8242_LT_TAGVAR(reload_flag, $1)=$reload_flag
8243_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8244_LT_TAGVAR(no_undefined_flag, $1)=
8245_LT_TAGVAR(whole_archive_flag_spec, $1)=
8246_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8247
8248# Source file extension for fc test sources.
8249ac_ext=${ac_fc_srcext-f}
8250
8251# Object file extension for compiled fc test sources.
8252objext=o
8253_LT_TAGVAR(objext, $1)=$objext
8254
8255# No sense in running all these tests if we already determined that
8256# the FC compiler isn't working.  Some variables (like enable_shared)
8257# are currently assumed to apply to all compilers on this platform,
8258# and will be corrupted by setting them based on a non-working compiler.
8259if test "$_lt_disable_FC" != yes; then
8260  # Code to be used in simple compile tests
8261  lt_simple_compile_test_code="\
8262      subroutine t
8263      return
8264      end
8265"
8266
8267  # Code to be used in simple link tests
8268  lt_simple_link_test_code="\
8269      program t
8270      end
8271"
8272
8273  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8274  _LT_TAG_COMPILER
8275
8276  # save warnings/boilerplate of simple test code
8277  _LT_COMPILER_BOILERPLATE
8278  _LT_LINKER_BOILERPLATE
8279
8280  # Allow CC to be a program name with arguments.
8281  lt_save_CC="$CC"
8282  lt_save_GCC=$GCC
8283  lt_save_CFLAGS=$CFLAGS
8284  CC=${FC-"f95"}
8285  CFLAGS=$FCFLAGS
8286  compiler=$CC
8287  GCC=$ac_cv_fc_compiler_gnu
8288
8289  _LT_TAGVAR(compiler, $1)=$CC
8290  _LT_CC_BASENAME([$compiler])
8291
8292  if test -n "$compiler"; then
8293    AC_MSG_CHECKING([if libtool supports shared libraries])
8294    AC_MSG_RESULT([$can_build_shared])
8295
8296    AC_MSG_CHECKING([whether to build shared libraries])
8297    test "$can_build_shared" = "no" && enable_shared=no
8298
8299    # On AIX, shared libraries and static libraries use the same namespace, and
8300    # are all built from PIC.
8301    case $host_os in
8302      aix3*)
8303        test "$enable_shared" = yes && enable_static=no
8304        if test -n "$RANLIB"; then
8305          archive_cmds="$archive_cmds~\$RANLIB \$lib"
8306          postinstall_cmds='$RANLIB $lib'
8307        fi
8308        ;;
8309      aix[[4-9]]*)
8310	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8311	  test "$enable_shared" = yes && enable_static=no
8312	fi
8313        ;;
8314    esac
8315    AC_MSG_RESULT([$enable_shared])
8316
8317    AC_MSG_CHECKING([whether to build static libraries])
8318    # Make sure either enable_shared or enable_static is yes.
8319    test "$enable_shared" = yes || enable_static=yes
8320    AC_MSG_RESULT([$enable_static])
8321
8322    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
8323    _LT_TAGVAR(LD, $1)="$LD"
8324
8325    ## CAVEAT EMPTOR:
8326    ## There is no encapsulation within the following macros, do not change
8327    ## the running order or otherwise move them around unless you know exactly
8328    ## what you are doing...
8329    _LT_SYS_HIDDEN_LIBDEPS($1)
8330    _LT_COMPILER_PIC($1)
8331    _LT_COMPILER_C_O($1)
8332    _LT_COMPILER_FILE_LOCKS($1)
8333    _LT_LINKER_SHLIBS($1)
8334    _LT_SYS_DYNAMIC_LINKER($1)
8335    _LT_LINKER_HARDCODE_LIBPATH($1)
8336
8337    _LT_CONFIG($1)
8338  fi # test -n "$compiler"
8339
8340  GCC=$lt_save_GCC
8341  CC=$lt_save_CC
8342  CFLAGS=$lt_save_CFLAGS
8343fi # test "$_lt_disable_FC" != yes
8344
8345AC_LANG_POP
8346])# _LT_LANG_FC_CONFIG
8347
8348
8349# _LT_LANG_GCJ_CONFIG([TAG])
8350# --------------------------
8351# Ensure that the configuration variables for the GNU Java Compiler compiler
8352# are suitably defined.  These variables are subsequently used by _LT_CONFIG
8353# to write the compiler configuration to `libtool'.
8354m4_defun([_LT_LANG_GCJ_CONFIG],
8355[AC_REQUIRE([LT_PROG_GCJ])dnl
8356AC_LANG_SAVE
8357
8358# Source file extension for Java test sources.
8359ac_ext=java
8360
8361# Object file extension for compiled Java test sources.
8362objext=o
8363_LT_TAGVAR(objext, $1)=$objext
8364
8365# Code to be used in simple compile tests
8366lt_simple_compile_test_code="class foo {}"
8367
8368# Code to be used in simple link tests
8369lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
8370
8371# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8372_LT_TAG_COMPILER
8373
8374# save warnings/boilerplate of simple test code
8375_LT_COMPILER_BOILERPLATE
8376_LT_LINKER_BOILERPLATE
8377
8378# Allow CC to be a program name with arguments.
8379lt_save_CC=$CC
8380lt_save_CFLAGS=$CFLAGS
8381lt_save_GCC=$GCC
8382GCC=yes
8383CC=${GCJ-"gcj"}
8384CFLAGS=$GCJFLAGS
8385compiler=$CC
8386_LT_TAGVAR(compiler, $1)=$CC
8387_LT_TAGVAR(LD, $1)="$LD"
8388_LT_CC_BASENAME([$compiler])
8389
8390# GCJ did not exist at the time GCC didn't implicitly link libc in.
8391_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8392
8393_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8394_LT_TAGVAR(reload_flag, $1)=$reload_flag
8395_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8396
8397if test -n "$compiler"; then
8398  _LT_COMPILER_NO_RTTI($1)
8399  _LT_COMPILER_PIC($1)
8400  _LT_COMPILER_C_O($1)
8401  _LT_COMPILER_FILE_LOCKS($1)
8402  _LT_LINKER_SHLIBS($1)
8403  _LT_LINKER_HARDCODE_LIBPATH($1)
8404
8405  _LT_CONFIG($1)
8406fi
8407
8408AC_LANG_RESTORE
8409
8410GCC=$lt_save_GCC
8411CC=$lt_save_CC
8412CFLAGS=$lt_save_CFLAGS
8413])# _LT_LANG_GCJ_CONFIG
8414
8415
8416# _LT_LANG_RC_CONFIG([TAG])
8417# -------------------------
8418# Ensure that the configuration variables for the Windows resource compiler
8419# are suitably defined.  These variables are subsequently used by _LT_CONFIG
8420# to write the compiler configuration to `libtool'.
8421m4_defun([_LT_LANG_RC_CONFIG],
8422[AC_REQUIRE([LT_PROG_RC])dnl
8423AC_LANG_SAVE
8424
8425# Source file extension for RC test sources.
8426ac_ext=rc
8427
8428# Object file extension for compiled RC test sources.
8429objext=o
8430_LT_TAGVAR(objext, $1)=$objext
8431
8432# Code to be used in simple compile tests
8433lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
8434
8435# Code to be used in simple link tests
8436lt_simple_link_test_code="$lt_simple_compile_test_code"
8437
8438# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8439_LT_TAG_COMPILER
8440
8441# save warnings/boilerplate of simple test code
8442_LT_COMPILER_BOILERPLATE
8443_LT_LINKER_BOILERPLATE
8444
8445# Allow CC to be a program name with arguments.
8446lt_save_CC="$CC"
8447lt_save_CFLAGS=$CFLAGS
8448lt_save_GCC=$GCC
8449GCC=
8450CC=${RC-"windres"}
8451CFLAGS=
8452compiler=$CC
8453_LT_TAGVAR(compiler, $1)=$CC
8454_LT_CC_BASENAME([$compiler])
8455_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
8456
8457if test -n "$compiler"; then
8458  :
8459  _LT_CONFIG($1)
8460fi
8461
8462GCC=$lt_save_GCC
8463AC_LANG_RESTORE
8464CC=$lt_save_CC
8465CFLAGS=$lt_save_CFLAGS
8466])# _LT_LANG_RC_CONFIG
8467
8468
8469# LT_PROG_GCJ
8470# -----------
8471AC_DEFUN([LT_PROG_GCJ],
8472[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
8473  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
8474    [AC_CHECK_TOOL(GCJ, gcj,)
8475      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
8476      AC_SUBST(GCJFLAGS)])])[]dnl
8477])
8478
8479# Old name:
8480AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
8481dnl aclocal-1.4 backwards compatibility:
8482dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
8483
8484
8485# LT_PROG_RC
8486# ----------
8487AC_DEFUN([LT_PROG_RC],
8488[AC_CHECK_TOOL(RC, windres,)
8489])
8490
8491# Old name:
8492AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
8493dnl aclocal-1.4 backwards compatibility:
8494dnl AC_DEFUN([LT_AC_PROG_RC], [])
8495
8496
8497# _LT_DECL_EGREP
8498# --------------
8499# If we don't have a new enough Autoconf to choose the best grep
8500# available, choose the one first in the user's PATH.
8501m4_defun([_LT_DECL_EGREP],
8502[AC_REQUIRE([AC_PROG_EGREP])dnl
8503AC_REQUIRE([AC_PROG_FGREP])dnl
8504test -z "$GREP" && GREP=grep
8505_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
8506_LT_DECL([], [EGREP], [1], [An ERE matcher])
8507_LT_DECL([], [FGREP], [1], [A literal string matcher])
8508dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
8509AC_SUBST([GREP])
8510])
8511
8512
8513# _LT_DECL_OBJDUMP
8514# --------------
8515# If we don't have a new enough Autoconf to choose the best objdump
8516# available, choose the one first in the user's PATH.
8517m4_defun([_LT_DECL_OBJDUMP],
8518[AC_CHECK_TOOL(OBJDUMP, objdump, false)
8519test -z "$OBJDUMP" && OBJDUMP=objdump
8520_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
8521AC_SUBST([OBJDUMP])
8522])
8523
8524# _LT_DECL_DLLTOOL
8525# ----------------
8526# Ensure DLLTOOL variable is set.
8527m4_defun([_LT_DECL_DLLTOOL],
8528[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8529test -z "$DLLTOOL" && DLLTOOL=dlltool
8530_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
8531AC_SUBST([DLLTOOL])
8532])
8533
8534# _LT_DECL_SED
8535# ------------
8536# Check for a fully-functional sed program, that truncates
8537# as few characters as possible.  Prefer GNU sed if found.
8538m4_defun([_LT_DECL_SED],
8539[AC_PROG_SED
8540test -z "$SED" && SED=sed
8541Xsed="$SED -e 1s/^X//"
8542_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
8543_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
8544    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
8545])# _LT_DECL_SED
8546
8547m4_ifndef([AC_PROG_SED], [
8548# NOTE: This macro has been submitted for inclusion into   #
8549#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
8550#  a released version of Autoconf we should remove this    #
8551#  macro and use it instead.                               #
8552
8553m4_defun([AC_PROG_SED],
8554[AC_MSG_CHECKING([for a sed that does not truncate output])
8555AC_CACHE_VAL(lt_cv_path_SED,
8556[# Loop through the user's path and test for sed and gsed.
8557# Then use that list of sed's as ones to test for truncation.
8558as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8559for as_dir in $PATH
8560do
8561  IFS=$as_save_IFS
8562  test -z "$as_dir" && as_dir=.
8563  for lt_ac_prog in sed gsed; do
8564    for ac_exec_ext in '' $ac_executable_extensions; do
8565      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
8566        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
8567      fi
8568    done
8569  done
8570done
8571IFS=$as_save_IFS
8572lt_ac_max=0
8573lt_ac_count=0
8574# Add /usr/xpg4/bin/sed as it is typically found on Solaris
8575# along with /bin/sed that truncates output.
8576for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
8577  test ! -f $lt_ac_sed && continue
8578  cat /dev/null > conftest.in
8579  lt_ac_count=0
8580  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
8581  # Check for GNU sed and select it if it is found.
8582  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
8583    lt_cv_path_SED=$lt_ac_sed
8584    break
8585  fi
8586  while true; do
8587    cat conftest.in conftest.in >conftest.tmp
8588    mv conftest.tmp conftest.in
8589    cp conftest.in conftest.nl
8590    echo >>conftest.nl
8591    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
8592    cmp -s conftest.out conftest.nl || break
8593    # 10000 chars as input seems more than enough
8594    test $lt_ac_count -gt 10 && break
8595    lt_ac_count=`expr $lt_ac_count + 1`
8596    if test $lt_ac_count -gt $lt_ac_max; then
8597      lt_ac_max=$lt_ac_count
8598      lt_cv_path_SED=$lt_ac_sed
8599    fi
8600  done
8601done
8602])
8603SED=$lt_cv_path_SED
8604AC_SUBST([SED])
8605AC_MSG_RESULT([$SED])
8606])#AC_PROG_SED
8607])#m4_ifndef
8608
8609# Old name:
8610AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
8611dnl aclocal-1.4 backwards compatibility:
8612dnl AC_DEFUN([LT_AC_PROG_SED], [])
8613
8614
8615# _LT_CHECK_SHELL_FEATURES
8616# ------------------------
8617# Find out whether the shell is Bourne or XSI compatible,
8618# or has some other useful features.
8619m4_defun([_LT_CHECK_SHELL_FEATURES],
8620[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
8621# Try some XSI features
8622xsi_shell=no
8623( _lt_dummy="a/b/c"
8624  test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
8625      = c,a/b,b/c, \
8626    && eval 'test $(( 1 + 1 )) -eq 2 \
8627    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
8628  && xsi_shell=yes
8629AC_MSG_RESULT([$xsi_shell])
8630_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
8631
8632AC_MSG_CHECKING([whether the shell understands "+="])
8633lt_shell_append=no
8634( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
8635    >/dev/null 2>&1 \
8636  && lt_shell_append=yes
8637AC_MSG_RESULT([$lt_shell_append])
8638_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
8639
8640if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
8641  lt_unset=unset
8642else
8643  lt_unset=false
8644fi
8645_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
8646
8647# test EBCDIC or ASCII
8648case `echo X|tr X '\101'` in
8649 A) # ASCII based system
8650    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
8651  lt_SP2NL='tr \040 \012'
8652  lt_NL2SP='tr \015\012 \040\040'
8653  ;;
8654 *) # EBCDIC based system
8655  lt_SP2NL='tr \100 \n'
8656  lt_NL2SP='tr \r\n \100\100'
8657  ;;
8658esac
8659_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
8660_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
8661])# _LT_CHECK_SHELL_FEATURES
8662
8663
8664# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
8665# ------------------------------------------------------
8666# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
8667# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
8668m4_defun([_LT_PROG_FUNCTION_REPLACE],
8669[dnl {
8670sed -e '/^$1 ()$/,/^} # $1 /c\
8671$1 ()\
8672{\
8673m4_bpatsubsts([$2], [$], [\\], [^\([	 ]\)], [\\\1])
8674} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
8675  && mv -f "$cfgfile.tmp" "$cfgfile" \
8676    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8677test 0 -eq $? || _lt_function_replace_fail=:
8678])
8679
8680
8681# _LT_PROG_REPLACE_SHELLFNS
8682# -------------------------
8683# Replace existing portable implementations of several shell functions with
8684# equivalent extended shell implementations where those features are available..
8685m4_defun([_LT_PROG_REPLACE_SHELLFNS],
8686[if test x"$xsi_shell" = xyes; then
8687  _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
8688    case ${1} in
8689      */*) func_dirname_result="${1%/*}${2}" ;;
8690      *  ) func_dirname_result="${3}" ;;
8691    esac])
8692
8693  _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
8694    func_basename_result="${1##*/}"])
8695
8696  _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
8697    case ${1} in
8698      */*) func_dirname_result="${1%/*}${2}" ;;
8699      *  ) func_dirname_result="${3}" ;;
8700    esac
8701    func_basename_result="${1##*/}"])
8702
8703  _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
8704    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
8705    # positional parameters, so assign one to ordinary parameter first.
8706    func_stripname_result=${3}
8707    func_stripname_result=${func_stripname_result#"${1}"}
8708    func_stripname_result=${func_stripname_result%"${2}"}])
8709
8710  _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
8711    func_split_long_opt_name=${1%%=*}
8712    func_split_long_opt_arg=${1#*=}])
8713
8714  _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
8715    func_split_short_opt_arg=${1#??}
8716    func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
8717
8718  _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
8719    case ${1} in
8720      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
8721      *)    func_lo2o_result=${1} ;;
8722    esac])
8723
8724  _LT_PROG_FUNCTION_REPLACE([func_xform], [    func_xform_result=${1%.*}.lo])
8725
8726  _LT_PROG_FUNCTION_REPLACE([func_arith], [    func_arith_result=$(( $[*] ))])
8727
8728  _LT_PROG_FUNCTION_REPLACE([func_len], [    func_len_result=${#1}])
8729fi
8730
8731if test x"$lt_shell_append" = xyes; then
8732  _LT_PROG_FUNCTION_REPLACE([func_append], [    eval "${1}+=\\${2}"])
8733
8734  _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
8735    func_quote_for_eval "${2}"
8736dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
8737    eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
8738
8739  # Save a `func_append' function call where possible by direct use of '+='
8740  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
8741    && mv -f "$cfgfile.tmp" "$cfgfile" \
8742      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8743  test 0 -eq $? || _lt_function_replace_fail=:
8744else
8745  # Save a `func_append' function call even when '+=' is not available
8746  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
8747    && mv -f "$cfgfile.tmp" "$cfgfile" \
8748      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8749  test 0 -eq $? || _lt_function_replace_fail=:
8750fi
8751
8752if test x"$_lt_function_replace_fail" = x":"; then
8753  AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
8754fi
8755])
8756
8757# _LT_PATH_CONVERSION_FUNCTIONS
8758# -----------------------------
8759# Determine which file name conversion functions should be used by
8760# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
8761# for certain cross-compile configurations and native mingw.
8762m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
8763[AC_REQUIRE([AC_CANONICAL_HOST])dnl
8764AC_REQUIRE([AC_CANONICAL_BUILD])dnl
8765AC_MSG_CHECKING([how to convert $build file names to $host format])
8766AC_CACHE_VAL(lt_cv_to_host_file_cmd,
8767[case $host in
8768  *-*-mingw* )
8769    case $build in
8770      *-*-mingw* ) # actually msys
8771        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
8772        ;;
8773      *-*-cygwin* )
8774        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
8775        ;;
8776      * ) # otherwise, assume *nix
8777        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
8778        ;;
8779    esac
8780    ;;
8781  *-*-cygwin* )
8782    case $build in
8783      *-*-mingw* ) # actually msys
8784        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
8785        ;;
8786      *-*-cygwin* )
8787        lt_cv_to_host_file_cmd=func_convert_file_noop
8788        ;;
8789      * ) # otherwise, assume *nix
8790        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
8791        ;;
8792    esac
8793    ;;
8794  * ) # unhandled hosts (and "normal" native builds)
8795    lt_cv_to_host_file_cmd=func_convert_file_noop
8796    ;;
8797esac
8798])
8799to_host_file_cmd=$lt_cv_to_host_file_cmd
8800AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
8801_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
8802         [0], [convert $build file names to $host format])dnl
8803
8804AC_MSG_CHECKING([how to convert $build file names to toolchain format])
8805AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
8806[#assume ordinary cross tools, or native build.
8807lt_cv_to_tool_file_cmd=func_convert_file_noop
8808case $host in
8809  *-*-mingw* )
8810    case $build in
8811      *-*-mingw* ) # actually msys
8812        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
8813        ;;
8814    esac
8815    ;;
8816esac
8817])
8818to_tool_file_cmd=$lt_cv_to_tool_file_cmd
8819AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
8820_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
8821         [0], [convert $build files to toolchain format])dnl
8822])# _LT_PATH_CONVERSION_FUNCTIONS
8823
8824# Helper functions for option handling.                    -*- Autoconf -*-
8825#
8826#   Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
8827#   Inc.
8828#   Written by Gary V. Vaughan, 2004
8829#
8830# This file is free software; the Free Software Foundation gives
8831# unlimited permission to copy and/or distribute it, with or without
8832# modifications, as long as this notice is preserved.
8833
8834# serial 7 ltoptions.m4
8835
8836# This is to help aclocal find these macros, as it can't see m4_define.
8837AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
8838
8839
8840# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
8841# ------------------------------------------
8842m4_define([_LT_MANGLE_OPTION],
8843[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
8844
8845
8846# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
8847# ---------------------------------------
8848# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
8849# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
8850# saved as a flag.
8851m4_define([_LT_SET_OPTION],
8852[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
8853m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
8854        _LT_MANGLE_DEFUN([$1], [$2]),
8855    [m4_warning([Unknown $1 option `$2'])])[]dnl
8856])
8857
8858
8859# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
8860# ------------------------------------------------------------
8861# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
8862m4_define([_LT_IF_OPTION],
8863[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
8864
8865
8866# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
8867# -------------------------------------------------------
8868# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
8869# are set.
8870m4_define([_LT_UNLESS_OPTIONS],
8871[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8872	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
8873		      [m4_define([$0_found])])])[]dnl
8874m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
8875])[]dnl
8876])
8877
8878
8879# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
8880# ----------------------------------------
8881# OPTION-LIST is a space-separated list of Libtool options associated
8882# with MACRO-NAME.  If any OPTION has a matching handler declared with
8883# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
8884# the unknown option and exit.
8885m4_defun([_LT_SET_OPTIONS],
8886[# Set options
8887m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8888    [_LT_SET_OPTION([$1], _LT_Option)])
8889
8890m4_if([$1],[LT_INIT],[
8891  dnl
8892  dnl Simply set some default values (i.e off) if boolean options were not
8893  dnl specified:
8894  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
8895  ])
8896  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
8897  ])
8898  dnl
8899  dnl If no reference was made to various pairs of opposing options, then
8900  dnl we run the default mode handler for the pair.  For example, if neither
8901  dnl `shared' nor `disable-shared' was passed, we enable building of shared
8902  dnl archives by default:
8903  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
8904  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
8905  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
8906  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
8907  		   [_LT_ENABLE_FAST_INSTALL])
8908  ])
8909])# _LT_SET_OPTIONS
8910
8911
8912
8913# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
8914# -----------------------------------------
8915m4_define([_LT_MANGLE_DEFUN],
8916[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
8917
8918
8919# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
8920# -----------------------------------------------
8921m4_define([LT_OPTION_DEFINE],
8922[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
8923])# LT_OPTION_DEFINE
8924
8925
8926# dlopen
8927# ------
8928LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
8929])
8930
8931AU_DEFUN([AC_LIBTOOL_DLOPEN],
8932[_LT_SET_OPTION([LT_INIT], [dlopen])
8933AC_DIAGNOSE([obsolete],
8934[$0: Remove this warning and the call to _LT_SET_OPTION when you
8935put the `dlopen' option into LT_INIT's first parameter.])
8936])
8937
8938dnl aclocal-1.4 backwards compatibility:
8939dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
8940
8941
8942# win32-dll
8943# ---------
8944# Declare package support for building win32 dll's.
8945LT_OPTION_DEFINE([LT_INIT], [win32-dll],
8946[enable_win32_dll=yes
8947
8948case $host in
8949*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
8950  AC_CHECK_TOOL(AS, as, false)
8951  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8952  AC_CHECK_TOOL(OBJDUMP, objdump, false)
8953  ;;
8954esac
8955
8956test -z "$AS" && AS=as
8957_LT_DECL([], [AS],      [1], [Assembler program])dnl
8958
8959test -z "$DLLTOOL" && DLLTOOL=dlltool
8960_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
8961
8962test -z "$OBJDUMP" && OBJDUMP=objdump
8963_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
8964])# win32-dll
8965
8966AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
8967[AC_REQUIRE([AC_CANONICAL_HOST])dnl
8968_LT_SET_OPTION([LT_INIT], [win32-dll])
8969AC_DIAGNOSE([obsolete],
8970[$0: Remove this warning and the call to _LT_SET_OPTION when you
8971put the `win32-dll' option into LT_INIT's first parameter.])
8972])
8973
8974dnl aclocal-1.4 backwards compatibility:
8975dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
8976
8977
8978# _LT_ENABLE_SHARED([DEFAULT])
8979# ----------------------------
8980# implement the --enable-shared flag, and supports the `shared' and
8981# `disable-shared' LT_INIT options.
8982# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
8983m4_define([_LT_ENABLE_SHARED],
8984[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
8985AC_ARG_ENABLE([shared],
8986    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
8987	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
8988    [p=${PACKAGE-default}
8989    case $enableval in
8990    yes) enable_shared=yes ;;
8991    no) enable_shared=no ;;
8992    *)
8993      enable_shared=no
8994      # Look at the argument we got.  We use all the common list separators.
8995      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8996      for pkg in $enableval; do
8997	IFS="$lt_save_ifs"
8998	if test "X$pkg" = "X$p"; then
8999	  enable_shared=yes
9000	fi
9001      done
9002      IFS="$lt_save_ifs"
9003      ;;
9004    esac],
9005    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
9006
9007    _LT_DECL([build_libtool_libs], [enable_shared], [0],
9008	[Whether or not to build shared libraries])
9009])# _LT_ENABLE_SHARED
9010
9011LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
9012LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
9013
9014# Old names:
9015AC_DEFUN([AC_ENABLE_SHARED],
9016[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
9017])
9018
9019AC_DEFUN([AC_DISABLE_SHARED],
9020[_LT_SET_OPTION([LT_INIT], [disable-shared])
9021])
9022
9023AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
9024AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
9025
9026dnl aclocal-1.4 backwards compatibility:
9027dnl AC_DEFUN([AM_ENABLE_SHARED], [])
9028dnl AC_DEFUN([AM_DISABLE_SHARED], [])
9029
9030
9031
9032# _LT_ENABLE_STATIC([DEFAULT])
9033# ----------------------------
9034# implement the --enable-static flag, and support the `static' and
9035# `disable-static' LT_INIT options.
9036# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9037m4_define([_LT_ENABLE_STATIC],
9038[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
9039AC_ARG_ENABLE([static],
9040    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
9041	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
9042    [p=${PACKAGE-default}
9043    case $enableval in
9044    yes) enable_static=yes ;;
9045    no) enable_static=no ;;
9046    *)
9047     enable_static=no
9048      # Look at the argument we got.  We use all the common list separators.
9049      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9050      for pkg in $enableval; do
9051	IFS="$lt_save_ifs"
9052	if test "X$pkg" = "X$p"; then
9053	  enable_static=yes
9054	fi
9055      done
9056      IFS="$lt_save_ifs"
9057      ;;
9058    esac],
9059    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
9060
9061    _LT_DECL([build_old_libs], [enable_static], [0],
9062	[Whether or not to build static libraries])
9063])# _LT_ENABLE_STATIC
9064
9065LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
9066LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
9067
9068# Old names:
9069AC_DEFUN([AC_ENABLE_STATIC],
9070[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
9071])
9072
9073AC_DEFUN([AC_DISABLE_STATIC],
9074[_LT_SET_OPTION([LT_INIT], [disable-static])
9075])
9076
9077AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
9078AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
9079
9080dnl aclocal-1.4 backwards compatibility:
9081dnl AC_DEFUN([AM_ENABLE_STATIC], [])
9082dnl AC_DEFUN([AM_DISABLE_STATIC], [])
9083
9084
9085
9086# _LT_ENABLE_FAST_INSTALL([DEFAULT])
9087# ----------------------------------
9088# implement the --enable-fast-install flag, and support the `fast-install'
9089# and `disable-fast-install' LT_INIT options.
9090# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9091m4_define([_LT_ENABLE_FAST_INSTALL],
9092[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
9093AC_ARG_ENABLE([fast-install],
9094    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
9095    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
9096    [p=${PACKAGE-default}
9097    case $enableval in
9098    yes) enable_fast_install=yes ;;
9099    no) enable_fast_install=no ;;
9100    *)
9101      enable_fast_install=no
9102      # Look at the argument we got.  We use all the common list separators.
9103      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9104      for pkg in $enableval; do
9105	IFS="$lt_save_ifs"
9106	if test "X$pkg" = "X$p"; then
9107	  enable_fast_install=yes
9108	fi
9109      done
9110      IFS="$lt_save_ifs"
9111      ;;
9112    esac],
9113    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
9114
9115_LT_DECL([fast_install], [enable_fast_install], [0],
9116	 [Whether or not to optimize for fast installation])dnl
9117])# _LT_ENABLE_FAST_INSTALL
9118
9119LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
9120LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
9121
9122# Old names:
9123AU_DEFUN([AC_ENABLE_FAST_INSTALL],
9124[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
9125AC_DIAGNOSE([obsolete],
9126[$0: Remove this warning and the call to _LT_SET_OPTION when you put
9127the `fast-install' option into LT_INIT's first parameter.])
9128])
9129
9130AU_DEFUN([AC_DISABLE_FAST_INSTALL],
9131[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
9132AC_DIAGNOSE([obsolete],
9133[$0: Remove this warning and the call to _LT_SET_OPTION when you put
9134the `disable-fast-install' option into LT_INIT's first parameter.])
9135])
9136
9137dnl aclocal-1.4 backwards compatibility:
9138dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
9139dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
9140
9141
9142# _LT_WITH_PIC([MODE])
9143# --------------------
9144# implement the --with-pic flag, and support the `pic-only' and `no-pic'
9145# LT_INIT options.
9146# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
9147m4_define([_LT_WITH_PIC],
9148[AC_ARG_WITH([pic],
9149    [AS_HELP_STRING([--with-pic],
9150	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
9151    [pic_mode="$withval"],
9152    [pic_mode=default])
9153
9154test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
9155
9156_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
9157])# _LT_WITH_PIC
9158
9159LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
9160LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
9161
9162# Old name:
9163AU_DEFUN([AC_LIBTOOL_PICMODE],
9164[_LT_SET_OPTION([LT_INIT], [pic-only])
9165AC_DIAGNOSE([obsolete],
9166[$0: Remove this warning and the call to _LT_SET_OPTION when you
9167put the `pic-only' option into LT_INIT's first parameter.])
9168])
9169
9170dnl aclocal-1.4 backwards compatibility:
9171dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
9172
9173
9174m4_define([_LTDL_MODE], [])
9175LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
9176		 [m4_define([_LTDL_MODE], [nonrecursive])])
9177LT_OPTION_DEFINE([LTDL_INIT], [recursive],
9178		 [m4_define([_LTDL_MODE], [recursive])])
9179LT_OPTION_DEFINE([LTDL_INIT], [subproject],
9180		 [m4_define([_LTDL_MODE], [subproject])])
9181
9182m4_define([_LTDL_TYPE], [])
9183LT_OPTION_DEFINE([LTDL_INIT], [installable],
9184		 [m4_define([_LTDL_TYPE], [installable])])
9185LT_OPTION_DEFINE([LTDL_INIT], [convenience],
9186		 [m4_define([_LTDL_TYPE], [convenience])])
9187
9188# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
9189#
9190# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
9191# Written by Gary V. Vaughan, 2004
9192#
9193# This file is free software; the Free Software Foundation gives
9194# unlimited permission to copy and/or distribute it, with or without
9195# modifications, as long as this notice is preserved.
9196
9197# serial 6 ltsugar.m4
9198
9199# This is to help aclocal find these macros, as it can't see m4_define.
9200AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
9201
9202
9203# lt_join(SEP, ARG1, [ARG2...])
9204# -----------------------------
9205# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
9206# associated separator.
9207# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
9208# versions in m4sugar had bugs.
9209m4_define([lt_join],
9210[m4_if([$#], [1], [],
9211       [$#], [2], [[$2]],
9212       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
9213m4_define([_lt_join],
9214[m4_if([$#$2], [2], [],
9215       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
9216
9217
9218# lt_car(LIST)
9219# lt_cdr(LIST)
9220# ------------
9221# Manipulate m4 lists.
9222# These macros are necessary as long as will still need to support
9223# Autoconf-2.59 which quotes differently.
9224m4_define([lt_car], [[$1]])
9225m4_define([lt_cdr],
9226[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
9227       [$#], 1, [],
9228       [m4_dquote(m4_shift($@))])])
9229m4_define([lt_unquote], $1)
9230
9231
9232# lt_append(MACRO-NAME, STRING, [SEPARATOR])
9233# ------------------------------------------
9234# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
9235# Note that neither SEPARATOR nor STRING are expanded; they are appended
9236# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
9237# No SEPARATOR is output if MACRO-NAME was previously undefined (different
9238# than defined and empty).
9239#
9240# This macro is needed until we can rely on Autoconf 2.62, since earlier
9241# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
9242m4_define([lt_append],
9243[m4_define([$1],
9244	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
9245
9246
9247
9248# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
9249# ----------------------------------------------------------
9250# Produce a SEP delimited list of all paired combinations of elements of
9251# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
9252# has the form PREFIXmINFIXSUFFIXn.
9253# Needed until we can rely on m4_combine added in Autoconf 2.62.
9254m4_define([lt_combine],
9255[m4_if(m4_eval([$# > 3]), [1],
9256       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
9257[[m4_foreach([_Lt_prefix], [$2],
9258	     [m4_foreach([_Lt_suffix],
9259		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
9260	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
9261
9262
9263# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
9264# -----------------------------------------------------------------------
9265# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
9266# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
9267m4_define([lt_if_append_uniq],
9268[m4_ifdef([$1],
9269	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
9270		 [lt_append([$1], [$2], [$3])$4],
9271		 [$5])],
9272	  [lt_append([$1], [$2], [$3])$4])])
9273
9274
9275# lt_dict_add(DICT, KEY, VALUE)
9276# -----------------------------
9277m4_define([lt_dict_add],
9278[m4_define([$1($2)], [$3])])
9279
9280
9281# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
9282# --------------------------------------------
9283m4_define([lt_dict_add_subkey],
9284[m4_define([$1($2:$3)], [$4])])
9285
9286
9287# lt_dict_fetch(DICT, KEY, [SUBKEY])
9288# ----------------------------------
9289m4_define([lt_dict_fetch],
9290[m4_ifval([$3],
9291	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
9292    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
9293
9294
9295# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
9296# -----------------------------------------------------------------
9297m4_define([lt_if_dict_fetch],
9298[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
9299	[$5],
9300    [$6])])
9301
9302
9303# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
9304# --------------------------------------------------------------
9305m4_define([lt_dict_filter],
9306[m4_if([$5], [], [],
9307  [lt_join(m4_quote(m4_default([$4], [[, ]])),
9308           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
9309		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
9310])
9311
9312# ltversion.m4 -- version numbers			-*- Autoconf -*-
9313#
9314#   Copyright (C) 2004 Free Software Foundation, Inc.
9315#   Written by Scott James Remnant, 2004
9316#
9317# This file is free software; the Free Software Foundation gives
9318# unlimited permission to copy and/or distribute it, with or without
9319# modifications, as long as this notice is preserved.
9320
9321# @configure_input@
9322
9323# serial 3293 ltversion.m4
9324# This file is part of GNU Libtool
9325
9326m4_define([LT_PACKAGE_VERSION], [2.4])
9327m4_define([LT_PACKAGE_REVISION], [1.3293])
9328
9329AC_DEFUN([LTVERSION_VERSION],
9330[macro_version='2.4'
9331macro_revision='1.3293'
9332_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
9333_LT_DECL(, macro_revision, 0)
9334])
9335
9336# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
9337#
9338#   Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
9339#   Written by Scott James Remnant, 2004.
9340#
9341# This file is free software; the Free Software Foundation gives
9342# unlimited permission to copy and/or distribute it, with or without
9343# modifications, as long as this notice is preserved.
9344
9345# serial 5 lt~obsolete.m4
9346
9347# These exist entirely to fool aclocal when bootstrapping libtool.
9348#
9349# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
9350# which have later been changed to m4_define as they aren't part of the
9351# exported API, or moved to Autoconf or Automake where they belong.
9352#
9353# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
9354# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
9355# using a macro with the same name in our local m4/libtool.m4 it'll
9356# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
9357# and doesn't know about Autoconf macros at all.)
9358#
9359# So we provide this file, which has a silly filename so it's always
9360# included after everything else.  This provides aclocal with the
9361# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
9362# because those macros already exist, or will be overwritten later.
9363# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
9364#
9365# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
9366# Yes, that means every name once taken will need to remain here until
9367# we give up compatibility with versions before 1.7, at which point
9368# we need to keep only those names which we still refer to.
9369
9370# This is to help aclocal find these macros, as it can't see m4_define.
9371AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
9372
9373m4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
9374m4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
9375m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
9376m4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
9377m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
9378m4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
9379m4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
9380m4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
9381m4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
9382m4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
9383m4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
9384m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
9385m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
9386m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
9387m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
9388m4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
9389m4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
9390m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
9391m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
9392m4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
9393m4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
9394m4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
9395m4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
9396m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
9397m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
9398m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
9399m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
9400m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
9401m4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
9402m4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
9403m4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
9404m4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
9405m4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
9406m4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
9407m4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
9408m4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
9409m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
9410m4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
9411m4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
9412m4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
9413m4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
9414m4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
9415m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
9416m4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
9417m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
9418m4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
9419m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
9420m4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
9421m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
9422m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
9423m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
9424m4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
9425m4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
9426m4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
9427m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS],	[AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
9428m4_ifndef([_LT_AC_PROG_CXXCPP],		[AC_DEFUN([_LT_AC_PROG_CXXCPP])])
9429m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS],	[AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
9430m4_ifndef([_LT_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
9431m4_ifndef([_LT_PROG_F77],		[AC_DEFUN([_LT_PROG_F77])])
9432m4_ifndef([_LT_PROG_FC],		[AC_DEFUN([_LT_PROG_FC])])
9433m4_ifndef([_LT_PROG_CXX],		[AC_DEFUN([_LT_PROG_CXX])])
9434
9435# nls.m4 serial 5 (gettext-0.18)
9436dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation,
9437dnl Inc.
9438dnl This file is free software; the Free Software Foundation
9439dnl gives unlimited permission to copy and/or distribute it,
9440dnl with or without modifications, as long as this notice is preserved.
9441dnl
9442dnl This file can can be used in projects which are not available under
9443dnl the GNU General Public License or the GNU Library General Public
9444dnl License but which still want to provide support for the GNU gettext
9445dnl functionality.
9446dnl Please note that the actual code of the GNU gettext library is covered
9447dnl by the GNU Library General Public License, and the rest of the GNU
9448dnl gettext package package is covered by the GNU General Public License.
9449dnl They are *not* in the public domain.
9450
9451dnl Authors:
9452dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
9453dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
9454
9455AC_PREREQ([2.50])
9456
9457AC_DEFUN([AM_NLS],
9458[
9459  AC_MSG_CHECKING([whether NLS is requested])
9460  dnl Default is enabled NLS
9461  AC_ARG_ENABLE([nls],
9462    [  --disable-nls           do not use Native Language Support],
9463    USE_NLS=$enableval, USE_NLS=yes)
9464  AC_MSG_RESULT([$USE_NLS])
9465  AC_SUBST([USE_NLS])
9466])
9467
9468# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
9469# serial 1 (pkg-config-0.24)
9470#
9471# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
9472#
9473# This program is free software; you can redistribute it and/or modify
9474# it under the terms of the GNU General Public License as published by
9475# the Free Software Foundation; either version 2 of the License, or
9476# (at your option) any later version.
9477#
9478# This program is distributed in the hope that it will be useful, but
9479# WITHOUT ANY WARRANTY; without even the implied warranty of
9480# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
9481# General Public License for more details.
9482#
9483# You should have received a copy of the GNU General Public License
9484# along with this program; if not, write to the Free Software
9485# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
9486#
9487# As a special exception to the GNU General Public License, if you
9488# distribute this file as part of a program that contains a
9489# configuration script generated by Autoconf, you may include it under
9490# the same distribution terms that you use for the rest of that program.
9491
9492# PKG_PROG_PKG_CONFIG([MIN-VERSION])
9493# ----------------------------------
9494AC_DEFUN([PKG_PROG_PKG_CONFIG],
9495[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
9496m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
9497AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
9498AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
9499AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
9500
9501if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9502	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
9503fi
9504if test -n "$PKG_CONFIG"; then
9505	_pkg_min_version=m4_default([$1], [0.9.0])
9506	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
9507	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9508		AC_MSG_RESULT([yes])
9509	else
9510		AC_MSG_RESULT([no])
9511		PKG_CONFIG=""
9512	fi
9513fi[]dnl
9514])# PKG_PROG_PKG_CONFIG
9515
9516# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
9517#
9518# Check to see whether a particular set of modules exists.  Similar
9519# to PKG_CHECK_MODULES(), but does not set variables or print errors.
9520#
9521# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9522# only at the first occurence in configure.ac, so if the first place
9523# it's called might be skipped (such as if it is within an "if", you
9524# have to call PKG_CHECK_EXISTS manually
9525# --------------------------------------------------------------
9526AC_DEFUN([PKG_CHECK_EXISTS],
9527[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9528if test -n "$PKG_CONFIG" && \
9529    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
9530  m4_default([$2], [:])
9531m4_ifvaln([$3], [else
9532  $3])dnl
9533fi])
9534
9535# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
9536# ---------------------------------------------
9537m4_define([_PKG_CONFIG],
9538[if test -n "$$1"; then
9539    pkg_cv_[]$1="$$1"
9540 elif test -n "$PKG_CONFIG"; then
9541    PKG_CHECK_EXISTS([$3],
9542                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
9543		     [pkg_failed=yes])
9544 else
9545    pkg_failed=untried
9546fi[]dnl
9547])# _PKG_CONFIG
9548
9549# _PKG_SHORT_ERRORS_SUPPORTED
9550# -----------------------------
9551AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
9552[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9553if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9554        _pkg_short_errors_supported=yes
9555else
9556        _pkg_short_errors_supported=no
9557fi[]dnl
9558])# _PKG_SHORT_ERRORS_SUPPORTED
9559
9560
9561# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
9562# [ACTION-IF-NOT-FOUND])
9563#
9564#
9565# Note that if there is a possibility the first call to
9566# PKG_CHECK_MODULES might not happen, you should be sure to include an
9567# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
9568#
9569#
9570# --------------------------------------------------------------
9571AC_DEFUN([PKG_CHECK_MODULES],
9572[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9573AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
9574AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
9575
9576pkg_failed=no
9577AC_MSG_CHECKING([for $1])
9578
9579_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
9580_PKG_CONFIG([$1][_LIBS], [libs], [$2])
9581
9582m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
9583and $1[]_LIBS to avoid the need to call pkg-config.
9584See the pkg-config man page for more details.])
9585
9586if test $pkg_failed = yes; then
9587   	AC_MSG_RESULT([no])
9588        _PKG_SHORT_ERRORS_SUPPORTED
9589        if test $_pkg_short_errors_supported = yes; then
9590	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
9591        else
9592	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
9593        fi
9594	# Put the nasty error message in config.log where it belongs
9595	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
9596
9597	m4_default([$4], [AC_MSG_ERROR(
9598[Package requirements ($2) were not met:
9599
9600$$1_PKG_ERRORS
9601
9602Consider adjusting the PKG_CONFIG_PATH environment variable if you
9603installed software in a non-standard prefix.
9604
9605_PKG_TEXT])
9606        ])
9607elif test $pkg_failed = untried; then
9608     	AC_MSG_RESULT([no])
9609	m4_default([$4], [AC_MSG_FAILURE(
9610[The pkg-config script could not be found or is too old.  Make sure it
9611is in your PATH or set the PKG_CONFIG environment variable to the full
9612path to pkg-config.
9613
9614_PKG_TEXT
9615
9616To get pkg-config, see <http://pkg-config.freedesktop.org/>.])
9617        ])
9618else
9619	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
9620	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
9621        AC_MSG_RESULT([yes])
9622	$3
9623fi[]dnl
9624])# PKG_CHECK_MODULES
9625
9626# Copyright (C) 1995-2002 Free Software Foundation, Inc.
9627# Copyright (C) 2001-2003,2004 Red Hat, Inc.
9628#
9629# This file is free software, distributed under the terms of the GNU
9630# General Public License.  As a special exception to the GNU General
9631# Public License, this file may be distributed as part of a program
9632# that contains a configuration script generated by Autoconf, under
9633# the same distribution terms as the rest of that program.
9634#
9635# This file can be copied and used freely without restrictions.  It can
9636# be used in projects which are not available under the GNU Public License
9637# but which still want to provide support for the GNU gettext functionality.
9638#
9639# Macro to add for using GNU gettext.
9640# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
9641#
9642# Modified to never use included libintl.
9643# Owen Taylor <otaylor@redhat.com>, 12/15/1998
9644#
9645# Major rework to remove unused code
9646# Owen Taylor <otaylor@redhat.com>, 12/11/2002
9647#
9648# Added better handling of ALL_LINGUAS from GNU gettext version
9649# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
9650#
9651# Modified to require ngettext
9652# Matthias Clasen <mclasen@redhat.com> 08/06/2004
9653#
9654# We need this here as well, since someone might use autoconf-2.5x
9655# to configure GLib then an older version to configure a package
9656# using AM_GLIB_GNU_GETTEXT
9657AC_PREREQ(2.53)
9658
9659dnl
9660dnl We go to great lengths to make sure that aclocal won't
9661dnl try to pull in the installed version of these macros
9662dnl when running aclocal in the glib directory.
9663dnl
9664m4_copy([AC_DEFUN],[glib_DEFUN])
9665m4_copy([AC_REQUIRE],[glib_REQUIRE])
9666dnl
9667dnl At the end, if we're not within glib, we'll define the public
9668dnl definitions in terms of our private definitions.
9669dnl
9670
9671# GLIB_LC_MESSAGES
9672#--------------------
9673glib_DEFUN([GLIB_LC_MESSAGES],
9674  [AC_CHECK_HEADERS([locale.h])
9675    if test $ac_cv_header_locale_h = yes; then
9676    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
9677      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
9678       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
9679    if test $am_cv_val_LC_MESSAGES = yes; then
9680      AC_DEFINE(HAVE_LC_MESSAGES, 1,
9681        [Define if your <locale.h> file defines LC_MESSAGES.])
9682    fi
9683  fi])
9684
9685# GLIB_PATH_PROG_WITH_TEST
9686#----------------------------
9687dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
9688dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
9689glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
9690[# Extract the first word of "$2", so it can be a program name with args.
9691set dummy $2; ac_word=[$]2
9692AC_MSG_CHECKING([for $ac_word])
9693AC_CACHE_VAL(ac_cv_path_$1,
9694[case "[$]$1" in
9695  /*)
9696  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
9697  ;;
9698  *)
9699  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
9700  for ac_dir in ifelse([$5], , $PATH, [$5]); do
9701    test -z "$ac_dir" && ac_dir=.
9702    if test -f $ac_dir/$ac_word; then
9703      if [$3]; then
9704	ac_cv_path_$1="$ac_dir/$ac_word"
9705	break
9706      fi
9707    fi
9708  done
9709  IFS="$ac_save_ifs"
9710dnl If no 4th arg is given, leave the cache variable unset,
9711dnl so AC_PATH_PROGS will keep looking.
9712ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
9713])dnl
9714  ;;
9715esac])dnl
9716$1="$ac_cv_path_$1"
9717if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
9718  AC_MSG_RESULT([$]$1)
9719else
9720  AC_MSG_RESULT(no)
9721fi
9722AC_SUBST($1)dnl
9723])
9724
9725# GLIB_WITH_NLS
9726#-----------------
9727glib_DEFUN([GLIB_WITH_NLS],
9728  dnl NLS is obligatory
9729  [USE_NLS=yes
9730    AC_SUBST(USE_NLS)
9731
9732    gt_cv_have_gettext=no
9733
9734    CATOBJEXT=NONE
9735    XGETTEXT=:
9736    INTLLIBS=
9737
9738    AC_CHECK_HEADER(libintl.h,
9739     [gt_cv_func_dgettext_libintl="no"
9740      libintl_extra_libs=""
9741
9742      #
9743      # First check in libc
9744      #
9745      AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
9746        [AC_TRY_LINK([
9747#include <libintl.h>
9748],
9749         [return !ngettext ("","", 1)],
9750	  gt_cv_func_ngettext_libc=yes,
9751          gt_cv_func_ngettext_libc=no)
9752        ])
9753
9754      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
9755	      AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
9756        	[AC_TRY_LINK([
9757#include <libintl.h>
9758],
9759	          [return !dgettext ("","")],
9760		  gt_cv_func_dgettext_libc=yes,
9761	          gt_cv_func_dgettext_libc=no)
9762        	])
9763      fi
9764
9765      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
9766        AC_CHECK_FUNCS(bind_textdomain_codeset)
9767      fi
9768
9769      #
9770      # If we don't have everything we want, check in libintl
9771      #
9772      if test "$gt_cv_func_dgettext_libc" != "yes" \
9773	 || test "$gt_cv_func_ngettext_libc" != "yes" \
9774         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
9775
9776        AC_CHECK_LIB(intl, bindtextdomain,
9777	    [AC_CHECK_LIB(intl, ngettext,
9778		    [AC_CHECK_LIB(intl, dgettext,
9779			          gt_cv_func_dgettext_libintl=yes)])])
9780
9781	if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
9782	  AC_MSG_CHECKING([if -liconv is needed to use gettext])
9783	  AC_MSG_RESULT([])
9784  	  AC_CHECK_LIB(intl, ngettext,
9785          	[AC_CHECK_LIB(intl, dcgettext,
9786		       [gt_cv_func_dgettext_libintl=yes
9787			libintl_extra_libs=-liconv],
9788			:,-liconv)],
9789		:,-liconv)
9790        fi
9791
9792        #
9793        # If we found libintl, then check in it for bind_textdomain_codeset();
9794        # we'll prefer libc if neither have bind_textdomain_codeset(),
9795        # and both have dgettext and ngettext
9796        #
9797        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
9798          glib_save_LIBS="$LIBS"
9799          LIBS="$LIBS -lintl $libintl_extra_libs"
9800          unset ac_cv_func_bind_textdomain_codeset
9801          AC_CHECK_FUNCS(bind_textdomain_codeset)
9802          LIBS="$glib_save_LIBS"
9803
9804          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
9805            gt_cv_func_dgettext_libc=no
9806          else
9807            if test "$gt_cv_func_dgettext_libc" = "yes" \
9808		&& test "$gt_cv_func_ngettext_libc" = "yes"; then
9809              gt_cv_func_dgettext_libintl=no
9810            fi
9811          fi
9812        fi
9813      fi
9814
9815      if test "$gt_cv_func_dgettext_libc" = "yes" \
9816	|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
9817        gt_cv_have_gettext=yes
9818      fi
9819
9820      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
9821        INTLLIBS="-lintl $libintl_extra_libs"
9822      fi
9823
9824      if test "$gt_cv_have_gettext" = "yes"; then
9825	AC_DEFINE(HAVE_GETTEXT,1,
9826	  [Define if the GNU gettext() function is already present or preinstalled.])
9827	GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
9828	  [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
9829	if test "$MSGFMT" != "no"; then
9830          glib_save_LIBS="$LIBS"
9831          LIBS="$LIBS $INTLLIBS"
9832	  AC_CHECK_FUNCS(dcgettext)
9833	  MSGFMT_OPTS=
9834	  AC_MSG_CHECKING([if msgfmt accepts -c])
9835	  GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
9836msgid ""
9837msgstr ""
9838"Content-Type: text/plain; charset=UTF-8\n"
9839"Project-Id-Version: test 1.0\n"
9840"PO-Revision-Date: 2007-02-15 12:01+0100\n"
9841"Last-Translator: test <foo@bar.xx>\n"
9842"Language-Team: C <LL@li.org>\n"
9843"MIME-Version: 1.0\n"
9844"Content-Transfer-Encoding: 8bit\n"
9845], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
9846	  AC_SUBST(MSGFMT_OPTS)
9847	  AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
9848	  GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
9849	    [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
9850	  AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
9851			 return _nl_msg_cat_cntr],
9852	    [CATOBJEXT=.gmo
9853             DATADIRNAME=share],
9854	    [case $host in
9855	    *-*-solaris*)
9856	    dnl On Solaris, if bind_textdomain_codeset is in libc,
9857	    dnl GNU format message catalog is always supported,
9858            dnl since both are added to the libc all together.
9859	    dnl Hence, we'd like to go with DATADIRNAME=share and
9860	    dnl and CATOBJEXT=.gmo in this case.
9861            AC_CHECK_FUNC(bind_textdomain_codeset,
9862	      [CATOBJEXT=.gmo
9863               DATADIRNAME=share],
9864	      [CATOBJEXT=.mo
9865               DATADIRNAME=lib])
9866	    ;;
9867	    *)
9868	    CATOBJEXT=.mo
9869            DATADIRNAME=lib
9870	    ;;
9871	    esac])
9872          LIBS="$glib_save_LIBS"
9873	  INSTOBJEXT=.mo
9874	else
9875	  gt_cv_have_gettext=no
9876	fi
9877      fi
9878    ])
9879
9880    if test "$gt_cv_have_gettext" = "yes" ; then
9881      AC_DEFINE(ENABLE_NLS, 1,
9882        [always defined to indicate that i18n is enabled])
9883    fi
9884
9885    dnl Test whether we really found GNU xgettext.
9886    if test "$XGETTEXT" != ":"; then
9887      dnl If it is not GNU xgettext we define it as : so that the
9888      dnl Makefiles still can work.
9889      if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
9890        : ;
9891      else
9892        AC_MSG_RESULT(
9893	  [found xgettext program is not GNU xgettext; ignore it])
9894        XGETTEXT=":"
9895      fi
9896    fi
9897
9898    # We need to process the po/ directory.
9899    POSUB=po
9900
9901    AC_OUTPUT_COMMANDS(
9902      [case "$CONFIG_FILES" in *po/Makefile.in*)
9903        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
9904      esac])
9905
9906    dnl These rules are solely for the distribution goal.  While doing this
9907    dnl we only have to keep exactly one list of the available catalogs
9908    dnl in configure.ac.
9909    for lang in $ALL_LINGUAS; do
9910      GMOFILES="$GMOFILES $lang.gmo"
9911      POFILES="$POFILES $lang.po"
9912    done
9913
9914    dnl Make all variables we use known to autoconf.
9915    AC_SUBST(CATALOGS)
9916    AC_SUBST(CATOBJEXT)
9917    AC_SUBST(DATADIRNAME)
9918    AC_SUBST(GMOFILES)
9919    AC_SUBST(INSTOBJEXT)
9920    AC_SUBST(INTLLIBS)
9921    AC_SUBST(PO_IN_DATADIR_TRUE)
9922    AC_SUBST(PO_IN_DATADIR_FALSE)
9923    AC_SUBST(POFILES)
9924    AC_SUBST(POSUB)
9925  ])
9926
9927# AM_GLIB_GNU_GETTEXT
9928# -------------------
9929# Do checks necessary for use of gettext. If a suitable implementation
9930# of gettext is found in either in libintl or in the C library,
9931# it will set INTLLIBS to the libraries needed for use of gettext
9932# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
9933# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
9934# on various variables needed by the Makefile.in.in installed by
9935# glib-gettextize.
9936dnl
9937glib_DEFUN([GLIB_GNU_GETTEXT],
9938  [AC_REQUIRE([AC_PROG_CC])dnl
9939   AC_REQUIRE([AC_HEADER_STDC])dnl
9940
9941   GLIB_LC_MESSAGES
9942   GLIB_WITH_NLS
9943
9944   if test "$gt_cv_have_gettext" = "yes"; then
9945     if test "x$ALL_LINGUAS" = "x"; then
9946       LINGUAS=
9947     else
9948       AC_MSG_CHECKING(for catalogs to be installed)
9949       NEW_LINGUAS=
9950       for presentlang in $ALL_LINGUAS; do
9951         useit=no
9952         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
9953           desiredlanguages="$LINGUAS"
9954         else
9955           desiredlanguages="$ALL_LINGUAS"
9956         fi
9957         for desiredlang in $desiredlanguages; do
9958 	   # Use the presentlang catalog if desiredlang is
9959           #   a. equal to presentlang, or
9960           #   b. a variant of presentlang (because in this case,
9961           #      presentlang can be used as a fallback for messages
9962           #      which are not translated in the desiredlang catalog).
9963           case "$desiredlang" in
9964             "$presentlang"*) useit=yes;;
9965           esac
9966         done
9967         if test $useit = yes; then
9968           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
9969         fi
9970       done
9971       LINGUAS=$NEW_LINGUAS
9972       AC_MSG_RESULT($LINGUAS)
9973     fi
9974
9975     dnl Construct list of names of catalog files to be constructed.
9976     if test -n "$LINGUAS"; then
9977       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
9978     fi
9979   fi
9980
9981   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
9982   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
9983   dnl Try to locate is.
9984   MKINSTALLDIRS=
9985   if test -n "$ac_aux_dir"; then
9986     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
9987   fi
9988   if test -z "$MKINSTALLDIRS"; then
9989     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
9990   fi
9991   AC_SUBST(MKINSTALLDIRS)
9992
9993   dnl Generate list of files to be processed by xgettext which will
9994   dnl be included in po/Makefile.
9995   test -d po || mkdir po
9996   if test "x$srcdir" != "x."; then
9997     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
9998       posrcprefix="$srcdir/"
9999     else
10000       posrcprefix="../$srcdir/"
10001     fi
10002   else
10003     posrcprefix="../"
10004   fi
10005   rm -f po/POTFILES
10006   sed -e "/^#/d" -e "/^\$/d" -e "s,.*,	$posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
10007	< $srcdir/po/POTFILES.in > po/POTFILES
10008  ])
10009
10010# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
10011# -------------------------------
10012# Define VARIABLE to the location where catalog files will
10013# be installed by po/Makefile.
10014glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
10015[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
10016glib_save_prefix="$prefix"
10017glib_save_exec_prefix="$exec_prefix"
10018glib_save_datarootdir="$datarootdir"
10019test "x$prefix" = xNONE && prefix=$ac_default_prefix
10020test "x$exec_prefix" = xNONE && exec_prefix=$prefix
10021datarootdir=`eval echo "${datarootdir}"`
10022if test "x$CATOBJEXT" = "x.mo" ; then
10023  localedir=`eval echo "${libdir}/locale"`
10024else
10025  localedir=`eval echo "${datadir}/locale"`
10026fi
10027prefix="$glib_save_prefix"
10028exec_prefix="$glib_save_exec_prefix"
10029datarootdir="$glib_save_datarootdir"
10030AC_DEFINE_UNQUOTED($1, "$localedir",
10031  [Define the location where the catalogs will be installed])
10032])
10033
10034dnl
10035dnl Now the definitions that aclocal will find
10036dnl
10037ifdef(glib_configure_ac,[],[
10038AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
10039AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
10040])dnl
10041
10042# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
10043#
10044# Create a temporary file with TEST-FILE as its contents and pass the
10045# file name to PROGRAM.  Perform ACTION-IF-PASS if PROGRAM exits with
10046# 0 and perform ACTION-IF-FAIL for any other exit status.
10047AC_DEFUN([GLIB_RUN_PROG],
10048[cat >conftest.foo <<_ACEOF
10049$2
10050_ACEOF
10051if AC_RUN_LOG([$1 conftest.foo]); then
10052  m4_ifval([$3], [$3], [:])
10053m4_ifvaln([$4], [else $4])dnl
10054echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
10055sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
10056fi])
10057
10058
10059dnl GNOME_COMPILE_WARNINGS
10060dnl Turn on many useful compiler warnings
10061dnl For now, only works on GCC
10062AC_DEFUN([GNOME_COMPILE_WARNINGS],[
10063    dnl ******************************
10064    dnl More compiler warnings
10065    dnl ******************************
10066
10067    AC_ARG_ENABLE(compile-warnings,
10068                  AC_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
10069                                 [Turn on compiler warnings]),,
10070                  [enable_compile_warnings="m4_default([$1],[yes])"])
10071
10072    warnCFLAGS=
10073    if test "x$GCC" != xyes; then
10074	enable_compile_warnings=no
10075    fi
10076
10077    warning_flags=
10078    realsave_CFLAGS="$CFLAGS"
10079
10080    case "$enable_compile_warnings" in
10081    no)
10082	warning_flags=
10083	;;
10084    minimum)
10085	warning_flags="-Wall"
10086	;;
10087    yes)
10088	warning_flags="-Wall -Wmissing-prototypes"
10089	;;
10090    maximum|error)
10091	warning_flags="-Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
10092	CFLAGS="$warning_flags $CFLAGS"
10093	for option in -Wno-sign-compare; do
10094		SAVE_CFLAGS="$CFLAGS"
10095		CFLAGS="$CFLAGS $option"
10096		AC_MSG_CHECKING([whether gcc understands $option])
10097		AC_TRY_COMPILE([], [],
10098			has_option=yes,
10099			has_option=no,)
10100		CFLAGS="$SAVE_CFLAGS"
10101		AC_MSG_RESULT($has_option)
10102		if test $has_option = yes; then
10103		  warning_flags="$warning_flags $option"
10104		fi
10105		unset has_option
10106		unset SAVE_CFLAGS
10107	done
10108	unset option
10109	if test "$enable_compile_warnings" = "error" ; then
10110	    warning_flags="$warning_flags -Werror"
10111	fi
10112	;;
10113    *)
10114	AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
10115	;;
10116    esac
10117    CFLAGS="$realsave_CFLAGS"
10118    AC_MSG_CHECKING(what warning flags to pass to the C compiler)
10119    AC_MSG_RESULT($warning_flags)
10120
10121    AC_ARG_ENABLE(iso-c,
10122                  AC_HELP_STRING([--enable-iso-c],
10123                                 [Try to warn if code is not ISO C ]),,
10124                  [enable_iso_c=no])
10125
10126    AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
10127    complCFLAGS=
10128    if test "x$enable_iso_c" != "xno"; then
10129	if test "x$GCC" = "xyes"; then
10130	case " $CFLAGS " in
10131	    *[\ \	]-ansi[\ \	]*) ;;
10132	    *) complCFLAGS="$complCFLAGS -ansi" ;;
10133	esac
10134	case " $CFLAGS " in
10135	    *[\ \	]-pedantic[\ \	]*) ;;
10136	    *) complCFLAGS="$complCFLAGS -pedantic" ;;
10137	esac
10138	fi
10139    fi
10140    AC_MSG_RESULT($complCFLAGS)
10141
10142    WARN_CFLAGS="$warning_flags $complCFLAGS"
10143    AC_SUBST(WARN_CFLAGS)
10144])
10145
10146dnl For C++, do basically the same thing.
10147
10148AC_DEFUN([GNOME_CXX_WARNINGS],[
10149  AC_ARG_ENABLE(cxx-warnings,
10150                AC_HELP_STRING([--enable-cxx-warnings=@<:@no/minimum/yes@:>@]
10151                               [Turn on compiler warnings.]),,
10152                [enable_cxx_warnings="m4_default([$1],[minimum])"])
10153
10154  AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
10155  warnCXXFLAGS=
10156  if test "x$GXX" != xyes; then
10157    enable_cxx_warnings=no
10158  fi
10159  if test "x$enable_cxx_warnings" != "xno"; then
10160    if test "x$GXX" = "xyes"; then
10161      case " $CXXFLAGS " in
10162      *[\ \	]-Wall[\ \	]*) ;;
10163      *) warnCXXFLAGS="-Wall -Wno-unused" ;;
10164      esac
10165
10166      ## -W is not all that useful.  And it cannot be controlled
10167      ## with individual -Wno-xxx flags, unlike -Wall
10168      if test "x$enable_cxx_warnings" = "xyes"; then
10169	warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual"
10170      fi
10171    fi
10172  fi
10173  AC_MSG_RESULT($warnCXXFLAGS)
10174
10175   AC_ARG_ENABLE(iso-cxx,
10176                 AC_HELP_STRING([--enable-iso-cxx],
10177                                [Try to warn if code is not ISO C++ ]),,
10178                 [enable_iso_cxx=no])
10179
10180   AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
10181   complCXXFLAGS=
10182   if test "x$enable_iso_cxx" != "xno"; then
10183     if test "x$GXX" = "xyes"; then
10184      case " $CXXFLAGS " in
10185      *[\ \	]-ansi[\ \	]*) ;;
10186      *) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
10187      esac
10188
10189      case " $CXXFLAGS " in
10190      *[\ \	]-pedantic[\ \	]*) ;;
10191      *) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
10192      esac
10193     fi
10194   fi
10195  AC_MSG_RESULT($complCXXFLAGS)
10196
10197  WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
10198  AC_SUBST(WARN_CXXFLAGS)
10199])
10200
10201dnl -*- mode: autoconf -*-
10202
10203# serial 1
10204
10205dnl Usage:
10206dnl   GTK_DOC_CHECK([minimum-gtk-doc-version])
10207AC_DEFUN([GTK_DOC_CHECK],
10208[
10209  AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
10210  AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
10211
10212  dnl check for tools we added during development
10213  AC_PATH_PROG([GTKDOC_CHECK],[gtkdoc-check])
10214  AC_PATH_PROGS([GTKDOC_REBASE],[gtkdoc-rebase],[true])
10215  AC_PATH_PROG([GTKDOC_MKPDF],[gtkdoc-mkpdf])
10216
10217  dnl for overriding the documentation installation directory
10218  AC_ARG_WITH([html-dir],
10219    AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),,
10220    [with_html_dir='${datadir}/gtk-doc/html'])
10221  HTML_DIR="$with_html_dir"
10222  AC_SUBST([HTML_DIR])
10223
10224  dnl enable/disable documentation building
10225  AC_ARG_ENABLE([gtk-doc],
10226    AS_HELP_STRING([--enable-gtk-doc],
10227                   [use gtk-doc to build documentation [[default=no]]]),,
10228    [enable_gtk_doc=no])
10229
10230  if test x$enable_gtk_doc = xyes; then
10231    ifelse([$1],[],
10232      [PKG_CHECK_EXISTS([gtk-doc],,
10233                        AC_MSG_ERROR([gtk-doc not installed and --enable-gtk-doc requested]))],
10234      [PKG_CHECK_EXISTS([gtk-doc >= $1],,
10235                        AC_MSG_ERROR([You need to have gtk-doc >= $1 installed to build $PACKAGE_NAME]))])
10236  fi
10237
10238  AC_MSG_CHECKING([whether to build gtk-doc documentation])
10239  AC_MSG_RESULT($enable_gtk_doc)
10240
10241  dnl enable/disable output formats
10242  AC_ARG_ENABLE([gtk-doc-html],
10243    AS_HELP_STRING([--enable-gtk-doc-html],
10244                   [build documentation in html format [[default=yes]]]),,
10245    [enable_gtk_doc_html=yes])
10246    AC_ARG_ENABLE([gtk-doc-pdf],
10247      AS_HELP_STRING([--enable-gtk-doc-pdf],
10248                     [build documentation in pdf format [[default=no]]]),,
10249      [enable_gtk_doc_pdf=no])
10250
10251  if test -z "$GTKDOC_MKPDF"; then
10252    enable_gtk_doc_pdf=no
10253  fi
10254
10255
10256  AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes])
10257  AM_CONDITIONAL([GTK_DOC_BUILD_HTML], [test x$enable_gtk_doc_html = xyes])
10258  AM_CONDITIONAL([GTK_DOC_BUILD_PDF], [test x$enable_gtk_doc_pdf = xyes])
10259  AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"])
10260  AM_CONDITIONAL([GTK_DOC_USE_REBASE], [test -n "$GTKDOC_REBASE"])
10261])
10262
10263
10264dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
10265# serial 40 IT_PROG_INTLTOOL
10266AC_DEFUN([IT_PROG_INTLTOOL], [
10267AC_PREREQ([2.50])dnl
10268AC_REQUIRE([AM_NLS])dnl
10269
10270case "$am__api_version" in
10271    1.[01234])
10272	AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
10273    ;;
10274    *)
10275    ;;
10276esac
10277
10278if test -n "$1"; then
10279    AC_MSG_CHECKING([for intltool >= $1])
10280
10281    INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
10282    INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
10283    [INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
10284    ]
10285    AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
10286    test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
10287	AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
10288fi
10289
10290AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
10291AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
10292AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
10293if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
10294    AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
10295fi
10296
10297  INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
10298INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
10299     INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
10300     INTLTOOL_PROP_RULE='%.prop:      %.prop.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
10301      INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
10302     INTLTOOL_PONG_RULE='%.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
10303   INTLTOOL_SERVER_RULE='%.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
10304    INTLTOOL_SHEET_RULE='%.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
10305INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
10306       INTLTOOL_UI_RULE='%.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
10307      INTLTOOL_XML_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
10308      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@'
10309      INTLTOOL_XAM_RULE='%.xam:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
10310      INTLTOOL_KBD_RULE='%.kbd:       %.kbd.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
10311    INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
10312  INTLTOOL_SCHEMAS_RULE='%.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
10313    INTLTOOL_THEME_RULE='%.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
10314    INTLTOOL_SERVICE_RULE='%.service: %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
10315   INTLTOOL_POLICY_RULE='%.policy:    %.policy.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
10316
10317_IT_SUBST(INTLTOOL_DESKTOP_RULE)
10318_IT_SUBST(INTLTOOL_DIRECTORY_RULE)
10319_IT_SUBST(INTLTOOL_KEYS_RULE)
10320_IT_SUBST(INTLTOOL_PROP_RULE)
10321_IT_SUBST(INTLTOOL_OAF_RULE)
10322_IT_SUBST(INTLTOOL_PONG_RULE)
10323_IT_SUBST(INTLTOOL_SERVER_RULE)
10324_IT_SUBST(INTLTOOL_SHEET_RULE)
10325_IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
10326_IT_SUBST(INTLTOOL_UI_RULE)
10327_IT_SUBST(INTLTOOL_XAM_RULE)
10328_IT_SUBST(INTLTOOL_KBD_RULE)
10329_IT_SUBST(INTLTOOL_XML_RULE)
10330_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
10331_IT_SUBST(INTLTOOL_CAVES_RULE)
10332_IT_SUBST(INTLTOOL_SCHEMAS_RULE)
10333_IT_SUBST(INTLTOOL_THEME_RULE)
10334_IT_SUBST(INTLTOOL_SERVICE_RULE)
10335_IT_SUBST(INTLTOOL_POLICY_RULE)
10336
10337# Check the gettext tools to make sure they are GNU
10338AC_PATH_PROG(XGETTEXT, xgettext)
10339AC_PATH_PROG(MSGMERGE, msgmerge)
10340AC_PATH_PROG(MSGFMT, msgfmt)
10341AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
10342if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
10343    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
10344fi
10345xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
10346mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
10347mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
10348if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
10349    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
10350fi
10351
10352AC_PATH_PROG(INTLTOOL_PERL, perl)
10353if test -z "$INTLTOOL_PERL"; then
10354   AC_MSG_ERROR([perl not found])
10355fi
10356AC_MSG_CHECKING([for perl >= 5.8.1])
10357$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
10358if test $? -ne 0; then
10359   AC_MSG_ERROR([perl 5.8.1 is required for intltool])
10360else
10361   IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`"
10362   AC_MSG_RESULT([$IT_PERL_VERSION])
10363fi
10364if test "x$2" != "xno-xml"; then
10365   AC_MSG_CHECKING([for XML::Parser])
10366   if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
10367       AC_MSG_RESULT([ok])
10368   else
10369       AC_MSG_ERROR([XML::Parser perl module is required for intltool])
10370   fi
10371fi
10372
10373# Substitute ALL_LINGUAS so we can use it in po/Makefile
10374AC_SUBST(ALL_LINGUAS)
10375
10376# Set DATADIRNAME correctly if it is not set yet
10377# (copied from glib-gettext.m4)
10378if test -z "$DATADIRNAME"; then
10379  AC_LINK_IFELSE(
10380    [AC_LANG_PROGRAM([[]],
10381                     [[extern int _nl_msg_cat_cntr;
10382                       return _nl_msg_cat_cntr]])],
10383    [DATADIRNAME=share],
10384    [case $host in
10385    *-*-solaris*)
10386    dnl On Solaris, if bind_textdomain_codeset is in libc,
10387    dnl GNU format message catalog is always supported,
10388    dnl since both are added to the libc all together.
10389    dnl Hence, we'd like to go with DATADIRNAME=share
10390    dnl in this case.
10391    AC_CHECK_FUNC(bind_textdomain_codeset,
10392      [DATADIRNAME=share], [DATADIRNAME=lib])
10393    ;;
10394    *)
10395    [DATADIRNAME=lib]
10396    ;;
10397    esac])
10398fi
10399AC_SUBST(DATADIRNAME)
10400
10401IT_PO_SUBDIR([po])
10402
10403])
10404
10405
10406# IT_PO_SUBDIR(DIRNAME)
10407# ---------------------
10408# All po subdirs have to be declared with this macro; the subdir "po" is
10409# declared by IT_PROG_INTLTOOL.
10410#
10411AC_DEFUN([IT_PO_SUBDIR],
10412[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
10413dnl
10414dnl The following CONFIG_COMMANDS should be executed at the very end
10415dnl of config.status.
10416AC_CONFIG_COMMANDS_PRE([
10417  AC_CONFIG_COMMANDS([$1/stamp-it], [
10418    if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
10419       AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
10420    fi
10421    rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
10422    >"$1/stamp-it.tmp"
10423    [sed '/^#/d
10424	 s/^[[].*] *//
10425	 /^[ 	]*$/d
10426	'"s|^|	$ac_top_srcdir/|" \
10427      "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
10428    ]
10429    [sed '/^POTFILES =/,/[^\\]$/ {
10430		/^POTFILES =/!d
10431		r $1/POTFILES
10432	  }
10433	 ' "$1/Makefile.in" >"$1/Makefile"]
10434    rm -f "$1/Makefile.tmp"
10435    mv "$1/stamp-it.tmp" "$1/stamp-it"
10436  ])
10437])dnl
10438])
10439
10440# _IT_SUBST(VARIABLE)
10441# -------------------
10442# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
10443#
10444AC_DEFUN([_IT_SUBST],
10445[
10446AC_SUBST([$1])
10447m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
10448]
10449)
10450
10451# deprecated macros
10452AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
10453# A hint is needed for aclocal from Automake <= 1.9.4:
10454# AC_DEFUN([AC_PROG_INTLTOOL], ...)
10455
10456
10457