aclocal.m4 revision e8a5466a
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) 2009  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# serial 1
868
869# AM_SILENT_RULES([DEFAULT])
870# --------------------------
871# Enable less verbose build rules; with the default set to DEFAULT
872# (`yes' being less verbose, `no' or empty being verbose).
873AC_DEFUN([AM_SILENT_RULES],
874[AC_ARG_ENABLE([silent-rules],
875[  --enable-silent-rules          less verbose build output (undo: `make V=1')
876  --disable-silent-rules         verbose build output (undo: `make V=0')])
877case $enable_silent_rules in
878yes) AM_DEFAULT_VERBOSITY=0;;
879no)  AM_DEFAULT_VERBOSITY=1;;
880*)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
881esac
882AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
883AM_BACKSLASH='\'
884AC_SUBST([AM_BACKSLASH])dnl
885_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
886])
887
888# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
889#
890# This file is free software; the Free Software Foundation
891# gives unlimited permission to copy and/or distribute it,
892# with or without modifications, as long as this notice is preserved.
893
894# AM_PROG_INSTALL_STRIP
895# ---------------------
896# One issue with vendor `install' (even GNU) is that you can't
897# specify the program used to strip binaries.  This is especially
898# annoying in cross-compiling environments, where the build's strip
899# is unlikely to handle the host's binaries.
900# Fortunately install-sh will honor a STRIPPROG variable, so we
901# always use install-sh in `make install-strip', and initialize
902# STRIPPROG with the value of the STRIP variable (set by the user).
903AC_DEFUN([AM_PROG_INSTALL_STRIP],
904[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
905# Installed binaries are usually stripped using `strip' when the user
906# run `make install-strip'.  However `strip' might not be the right
907# tool to use in cross-compilation environments, therefore Automake
908# will honor the `STRIP' environment variable to overrule this program.
909dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
910if test "$cross_compiling" != no; then
911  AC_CHECK_TOOL([STRIP], [strip], :)
912fi
913INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
914AC_SUBST([INSTALL_STRIP_PROGRAM])])
915
916# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
917#
918# This file is free software; the Free Software Foundation
919# gives unlimited permission to copy and/or distribute it,
920# with or without modifications, as long as this notice is preserved.
921
922# serial 2
923
924# _AM_SUBST_NOTMAKE(VARIABLE)
925# ---------------------------
926# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
927# This macro is traced by Automake.
928AC_DEFUN([_AM_SUBST_NOTMAKE])
929
930# AM_SUBST_NOTMAKE(VARIABLE)
931# ---------------------------
932# Public sister of _AM_SUBST_NOTMAKE.
933AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
934
935# Check how to create a tarball.                            -*- Autoconf -*-
936
937# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
938#
939# This file is free software; the Free Software Foundation
940# gives unlimited permission to copy and/or distribute it,
941# with or without modifications, as long as this notice is preserved.
942
943# serial 2
944
945# _AM_PROG_TAR(FORMAT)
946# --------------------
947# Check how to create a tarball in format FORMAT.
948# FORMAT should be one of `v7', `ustar', or `pax'.
949#
950# Substitute a variable $(am__tar) that is a command
951# writing to stdout a FORMAT-tarball containing the directory
952# $tardir.
953#     tardir=directory && $(am__tar) > result.tar
954#
955# Substitute a variable $(am__untar) that extract such
956# a tarball read from stdin.
957#     $(am__untar) < result.tar
958AC_DEFUN([_AM_PROG_TAR],
959[# Always define AMTAR for backward compatibility.
960AM_MISSING_PROG([AMTAR], [tar])
961m4_if([$1], [v7],
962     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
963     [m4_case([$1], [ustar],, [pax],,
964              [m4_fatal([Unknown tar format])])
965AC_MSG_CHECKING([how to create a $1 tar archive])
966# Loop over all known methods to create a tar archive until one works.
967_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
968_am_tools=${am_cv_prog_tar_$1-$_am_tools}
969# Do not fold the above two line into one, because Tru64 sh and
970# Solaris sh will not grok spaces in the rhs of `-'.
971for _am_tool in $_am_tools
972do
973  case $_am_tool in
974  gnutar)
975    for _am_tar in tar gnutar gtar;
976    do
977      AM_RUN_LOG([$_am_tar --version]) && break
978    done
979    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
980    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
981    am__untar="$_am_tar -xf -"
982    ;;
983  plaintar)
984    # Must skip GNU tar: if it does not support --format= it doesn't create
985    # ustar tarball either.
986    (tar --version) >/dev/null 2>&1 && continue
987    am__tar='tar chf - "$$tardir"'
988    am__tar_='tar chf - "$tardir"'
989    am__untar='tar xf -'
990    ;;
991  pax)
992    am__tar='pax -L -x $1 -w "$$tardir"'
993    am__tar_='pax -L -x $1 -w "$tardir"'
994    am__untar='pax -r'
995    ;;
996  cpio)
997    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
998    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
999    am__untar='cpio -i -H $1 -d'
1000    ;;
1001  none)
1002    am__tar=false
1003    am__tar_=false
1004    am__untar=false
1005    ;;
1006  esac
1007
1008  # If the value was cached, stop now.  We just wanted to have am__tar
1009  # and am__untar set.
1010  test -n "${am_cv_prog_tar_$1}" && break
1011
1012  # tar/untar a dummy directory, and stop if the command works
1013  rm -rf conftest.dir
1014  mkdir conftest.dir
1015  echo GrepMe > conftest.dir/file
1016  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1017  rm -rf conftest.dir
1018  if test -s conftest.tar; then
1019    AM_RUN_LOG([$am__untar <conftest.tar])
1020    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1021  fi
1022done
1023rm -rf conftest.dir
1024
1025AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1026AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1027AC_SUBST([am__tar])
1028AC_SUBST([am__untar])
1029]) # _AM_PROG_TAR
1030
1031dnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
1032dnl
1033dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
1034dnl 
1035dnl Permission is hereby granted, free of charge, to any person obtaining a
1036dnl copy of this software and associated documentation files (the "Software"),
1037dnl to deal in the Software without restriction, including without limitation
1038dnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
1039dnl and/or sell copies of the Software, and to permit persons to whom the
1040dnl Software is furnished to do so, subject to the following conditions:
1041dnl
1042dnl The above copyright notice and this permission notice (including the next
1043dnl paragraph) shall be included in all copies or substantial portions of the
1044dnl Software.
1045dnl
1046dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1047dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1048dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
1049dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1050dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
1051dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
1052dnl DEALINGS IN THE SOFTWARE.
1053
1054# XORG_MACROS_VERSION(required-version)
1055# -------------------------------------
1056# Minimum version: 1.1.0
1057#
1058# If you're using a macro added in Version 1.1 or newer, include this in
1059# your configure.ac with the minimum required version, such as:
1060# XORG_MACROS_VERSION(1.1)
1061#
1062# To ensure that this macro is defined, also add:
1063# m4_ifndef([XORG_MACROS_VERSION],
1064#     [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
1065#
1066#
1067# See the "minimum version" comment for each macro you use to see what 
1068# version you require.
1069m4_defun([XORG_MACROS_VERSION],[
1070m4_define([vers_have], [1.10.1])
1071m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
1072m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
1073m4_if(m4_cmp(maj_have, maj_needed), 0,,
1074    [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
1075m4_if(m4_version_compare(vers_have, [$1]), -1,
1076    [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
1077m4_undefine([vers_have])
1078m4_undefine([maj_have])
1079m4_undefine([maj_needed])
1080]) # XORG_MACROS_VERSION
1081
1082# XORG_PROG_RAWCPP()
1083# ------------------
1084# Minimum version: 1.0.0
1085#
1086# Find cpp program and necessary flags for use in pre-processing text files
1087# such as man pages and config files
1088AC_DEFUN([XORG_PROG_RAWCPP],[
1089AC_REQUIRE([AC_PROG_CPP])
1090AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
1091   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
1092
1093# Check for flag to avoid builtin definitions - assumes unix is predefined,
1094# which is not the best choice for supporting other OS'es, but covers most
1095# of the ones we need for now.
1096AC_MSG_CHECKING([if $RAWCPP requires -undef])
1097AC_LANG_CONFTEST([Does cpp redefine unix ?])
1098if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
1099	AC_MSG_RESULT([no])
1100else
1101	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
1102		RAWCPPFLAGS=-undef
1103		AC_MSG_RESULT([yes])
1104	# under Cygwin unix is still defined even with -undef
1105	elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
1106		RAWCPPFLAGS="-undef -ansi"
1107		AC_MSG_RESULT([yes, with -ansi])
1108	else
1109		AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
1110	fi
1111fi
1112rm -f conftest.$ac_ext
1113
1114AC_MSG_CHECKING([if $RAWCPP requires -traditional])
1115AC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
1116if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
1117	AC_MSG_RESULT([no])
1118else
1119	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
1120		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
1121		AC_MSG_RESULT([yes])
1122	else
1123		AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
1124	fi
1125fi
1126rm -f conftest.$ac_ext
1127AC_SUBST(RAWCPPFLAGS)
1128]) # XORG_PROG_RAWCPP
1129
1130# XORG_MANPAGE_SECTIONS()
1131# -----------------------
1132# Minimum version: 1.0.0
1133#
1134# Determine which sections man pages go in for the different man page types
1135# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
1136# Not sure if there's any better way than just hardcoding by OS name.
1137# Override default settings by setting environment variables
1138# Added MAN_SUBSTS in version 1.8
1139# Added AC_PROG_SED in version 1.8
1140
1141AC_DEFUN([XORG_MANPAGE_SECTIONS],[
1142AC_REQUIRE([AC_CANONICAL_HOST])
1143AC_REQUIRE([AC_PROG_SED])
1144
1145if test x$APP_MAN_SUFFIX = x    ; then
1146    APP_MAN_SUFFIX=1
1147fi
1148if test x$APP_MAN_DIR = x    ; then
1149    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
1150fi
1151
1152if test x$LIB_MAN_SUFFIX = x    ; then
1153    LIB_MAN_SUFFIX=3
1154fi
1155if test x$LIB_MAN_DIR = x    ; then
1156    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
1157fi
1158
1159if test x$FILE_MAN_SUFFIX = x    ; then
1160    case $host_os in
1161	solaris*)	FILE_MAN_SUFFIX=4  ;;
1162	*)		FILE_MAN_SUFFIX=5  ;;
1163    esac
1164fi
1165if test x$FILE_MAN_DIR = x    ; then
1166    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
1167fi
1168
1169if test x$MISC_MAN_SUFFIX = x    ; then
1170    case $host_os in
1171	solaris*)	MISC_MAN_SUFFIX=5  ;;
1172	*)		MISC_MAN_SUFFIX=7  ;;
1173    esac
1174fi
1175if test x$MISC_MAN_DIR = x    ; then
1176    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
1177fi
1178
1179if test x$DRIVER_MAN_SUFFIX = x    ; then
1180    case $host_os in
1181	solaris*)	DRIVER_MAN_SUFFIX=7  ;;
1182	*)		DRIVER_MAN_SUFFIX=4  ;;
1183    esac
1184fi
1185if test x$DRIVER_MAN_DIR = x    ; then
1186    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
1187fi
1188
1189if test x$ADMIN_MAN_SUFFIX = x    ; then
1190    case $host_os in
1191	solaris*)	ADMIN_MAN_SUFFIX=1m ;;
1192	*)		ADMIN_MAN_SUFFIX=8  ;;
1193    esac
1194fi
1195if test x$ADMIN_MAN_DIR = x    ; then
1196    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
1197fi
1198
1199
1200AC_SUBST([APP_MAN_SUFFIX])
1201AC_SUBST([LIB_MAN_SUFFIX])
1202AC_SUBST([FILE_MAN_SUFFIX])
1203AC_SUBST([MISC_MAN_SUFFIX])
1204AC_SUBST([DRIVER_MAN_SUFFIX])
1205AC_SUBST([ADMIN_MAN_SUFFIX])
1206AC_SUBST([APP_MAN_DIR])
1207AC_SUBST([LIB_MAN_DIR])
1208AC_SUBST([FILE_MAN_DIR])
1209AC_SUBST([MISC_MAN_DIR])
1210AC_SUBST([DRIVER_MAN_DIR])
1211AC_SUBST([ADMIN_MAN_DIR])
1212
1213XORG_MAN_PAGE="X Version 11"
1214AC_SUBST([XORG_MAN_PAGE])
1215MAN_SUBSTS="\
1216	-e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
1217	-e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
1218	-e 's|__xservername__|Xorg|g' \
1219	-e 's|__xconfigfile__|xorg.conf|g' \
1220	-e 's|__projectroot__|\$(prefix)|g' \
1221	-e 's|__apploaddir__|\$(appdefaultdir)|g' \
1222	-e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
1223	-e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
1224	-e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
1225	-e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
1226	-e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
1227	-e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
1228AC_SUBST([MAN_SUBSTS])
1229
1230]) # XORG_MANPAGE_SECTIONS
1231
1232# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION])
1233# ------------------------
1234# Minimum version: 1.7.0
1235#
1236# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent
1237# provided by xorg-sgml-doctools, if installed.
1238AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[
1239AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])])
1240XORG_SGML_PATH=
1241PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])],
1242    [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`],
1243    [m4_ifval([$1],[:],
1244        [if test x"$cross_compiling" != x"yes" ; then
1245            AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent],
1246                          [XORG_SGML_PATH=$prefix/share/sgml])
1247         fi])
1248    ])
1249
1250# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing
1251# the path and the name of the doc stylesheet
1252if test "x$XORG_SGML_PATH" != "x" ; then
1253   AC_MSG_RESULT([$XORG_SGML_PATH])
1254   STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11
1255   XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl
1256else
1257   AC_MSG_RESULT([no])
1258fi
1259
1260AC_SUBST(XORG_SGML_PATH)
1261AC_SUBST(STYLESHEET_SRCDIR)
1262AC_SUBST(XSL_STYLESHEET)
1263AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"])
1264]) # XORG_CHECK_SGML_DOCTOOLS
1265
1266# XORG_CHECK_LINUXDOC
1267# -------------------
1268# Minimum version: 1.0.0
1269#
1270# Defines the variable MAKE_TEXT if the necessary tools and
1271# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
1272# Whether or not the necessary tools and files are found can be checked
1273# with the AM_CONDITIONAL "BUILD_LINUXDOC"
1274AC_DEFUN([XORG_CHECK_LINUXDOC],[
1275AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
1276AC_REQUIRE([XORG_WITH_PS2PDF])
1277
1278AC_PATH_PROG(LINUXDOC, linuxdoc)
1279
1280AC_MSG_CHECKING([whether to build documentation])
1281
1282if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then
1283   BUILDDOC=yes
1284else
1285   BUILDDOC=no
1286fi
1287
1288AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
1289
1290AC_MSG_RESULT([$BUILDDOC])
1291
1292AC_MSG_CHECKING([whether to build pdf documentation])
1293
1294if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then
1295   BUILDPDFDOC=yes
1296else
1297   BUILDPDFDOC=no
1298fi
1299
1300AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
1301
1302AC_MSG_RESULT([$BUILDPDFDOC])
1303
1304MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f"
1305MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
1306MAKE_PDF="$PS2PDF"
1307MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
1308
1309AC_SUBST(MAKE_TEXT)
1310AC_SUBST(MAKE_PS)
1311AC_SUBST(MAKE_PDF)
1312AC_SUBST(MAKE_HTML)
1313]) # XORG_CHECK_LINUXDOC
1314
1315# XORG_CHECK_DOCBOOK
1316# -------------------
1317# Minimum version: 1.0.0
1318#
1319# Checks for the ability to build output formats from SGML DocBook source.
1320# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
1321# indicates whether the necessary tools and files are found and, if set,
1322# $(MAKE_XXX) blah.sgml will produce blah.xxx.
1323AC_DEFUN([XORG_CHECK_DOCBOOK],[
1324AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
1325
1326BUILDTXTDOC=no
1327BUILDPDFDOC=no
1328BUILDPSDOC=no
1329BUILDHTMLDOC=no
1330
1331AC_PATH_PROG(DOCBOOKPS, docbook2ps)
1332AC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
1333AC_PATH_PROG(DOCBOOKHTML, docbook2html)
1334AC_PATH_PROG(DOCBOOKTXT, docbook2txt)
1335
1336AC_MSG_CHECKING([whether to build text documentation])
1337if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x &&
1338   test x$BUILD_TXTDOC != xno; then
1339	BUILDTXTDOC=yes
1340fi
1341AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
1342AC_MSG_RESULT([$BUILDTXTDOC])
1343
1344AC_MSG_CHECKING([whether to build PDF documentation])
1345if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x &&
1346   test x$BUILD_PDFDOC != xno; then
1347	BUILDPDFDOC=yes
1348fi
1349AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
1350AC_MSG_RESULT([$BUILDPDFDOC])
1351
1352AC_MSG_CHECKING([whether to build PostScript documentation])
1353if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x &&
1354   test x$BUILD_PSDOC != xno; then
1355	BUILDPSDOC=yes
1356fi
1357AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
1358AC_MSG_RESULT([$BUILDPSDOC])
1359
1360AC_MSG_CHECKING([whether to build HTML documentation])
1361if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x &&
1362   test x$BUILD_HTMLDOC != xno; then
1363	BUILDHTMLDOC=yes
1364fi
1365AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
1366AC_MSG_RESULT([$BUILDHTMLDOC])
1367
1368MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
1369MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
1370MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
1371MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
1372
1373AC_SUBST(MAKE_TEXT)
1374AC_SUBST(MAKE_PS)
1375AC_SUBST(MAKE_PDF)
1376AC_SUBST(MAKE_HTML)
1377]) # XORG_CHECK_DOCBOOK
1378
1379# XORG_WITH_XMLTO([MIN-VERSION])
1380# ----------------
1381# Minimum version: 1.5.0
1382#
1383# Documentation tools are not always available on all platforms and sometimes
1384# not at the appropriate level. This macro enables a module to test for the
1385# presence of the tool and obtain it's path in separate variables. Coupled with
1386# the --with-xmlto option, it allows maximum flexibilty in making decisions
1387# as whether or not to use the xmlto package.
1388#
1389# Interface to module:
1390# HAVE_XMLTO: 	used in makefiles to conditionally generate documentation
1391# XMLTO:	returns the path of the xmlto program found
1392#		returns the path set by the user in the environment
1393# --with-xmlto:	'yes' user instructs the module to use xmlto
1394#		'no' user instructs the module not to use xmlto
1395#
1396# Added in version 1.10.0
1397# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation
1398#                  xmlto for text output requires either lynx, links, or w3m browsers
1399#
1400# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path.
1401#
1402AC_DEFUN([XORG_WITH_XMLTO],[
1403AC_ARG_VAR([XMLTO], [Path to xmlto command])
1404AC_ARG_WITH(xmlto,
1405	AS_HELP_STRING([--with-xmlto],
1406	   [Use xmlto to regenerate documentation (default: yes, if installed)]),
1407	   [use_xmlto=$withval], [use_xmlto=auto])
1408
1409if test "x$use_xmlto" = x"auto"; then
1410   AC_PATH_PROG([XMLTO], [xmlto])
1411   if test "x$XMLTO" = "x"; then
1412        AC_MSG_WARN([xmlto not found - documentation targets will be skipped])
1413	have_xmlto=no
1414   else
1415        have_xmlto=yes
1416   fi
1417elif test "x$use_xmlto" = x"yes" ; then
1418   AC_PATH_PROG([XMLTO], [xmlto])
1419   if test "x$XMLTO" = "x"; then
1420        AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH])
1421   fi
1422   have_xmlto=yes
1423elif test "x$use_xmlto" = x"no" ; then
1424   if test "x$XMLTO" != "x"; then
1425      AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified])
1426   fi
1427   have_xmlto=no
1428else
1429   AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no'])
1430fi
1431
1432# Test for a minimum version of xmlto, if provided.
1433m4_ifval([$1],
1434[if test "$have_xmlto" = yes; then
1435    # scrape the xmlto version
1436    AC_MSG_CHECKING([the xmlto version])
1437    xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3`
1438    AC_MSG_RESULT([$xmlto_version])
1439    AS_VERSION_COMPARE([$xmlto_version], [$1],
1440        [if test "x$use_xmlto" = xauto; then
1441            AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed])
1442            have_xmlto=no
1443        else
1444            AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed])
1445        fi])
1446fi])
1447
1448# Test for the ability of xmlto to generate a text target
1449have_xmlto_text=no
1450cat > conftest.xml << "EOF"
1451EOF
1452AS_IF([test "$have_xmlto" = yes],
1453      [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
1454             [have_xmlto_text=yes],
1455             [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])
1456rm -f conftest.xml
1457AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes])
1458AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
1459]) # XORG_WITH_XMLTO
1460
1461# XORG_WITH_ASCIIDOC([MIN-VERSION])
1462# ----------------
1463# Minimum version: 1.5.0
1464#
1465# Documentation tools are not always available on all platforms and sometimes
1466# not at the appropriate level. This macro enables a module to test for the
1467# presence of the tool and obtain it's path in separate variables. Coupled with
1468# the --with-asciidoc option, it allows maximum flexibilty in making decisions
1469# as whether or not to use the asciidoc package.
1470#
1471# Interface to module:
1472# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation
1473# ASCIIDOC:	 returns the path of the asciidoc program found
1474#		 returns the path set by the user in the environment
1475# --with-asciidoc: 'yes' user instructs the module to use asciidoc
1476#		  'no' user instructs the module not to use asciidoc
1477#
1478# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path.
1479#
1480AC_DEFUN([XORG_WITH_ASCIIDOC],[
1481AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
1482AC_ARG_WITH(asciidoc,
1483	AS_HELP_STRING([--with-asciidoc],
1484	   [Use asciidoc to regenerate documentation (default: yes, if installed)]),
1485	   [use_asciidoc=$withval], [use_asciidoc=auto])
1486
1487if test "x$use_asciidoc" = x"auto"; then
1488   AC_PATH_PROG([ASCIIDOC], [asciidoc])
1489   if test "x$ASCIIDOC" = "x"; then
1490        AC_MSG_WARN([asciidoc not found - documentation targets will be skipped])
1491	have_asciidoc=no
1492   else
1493        have_asciidoc=yes
1494   fi
1495elif test "x$use_asciidoc" = x"yes" ; then
1496   AC_PATH_PROG([ASCIIDOC], [asciidoc])
1497   if test "x$ASCIIDOC" = "x"; then
1498        AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH])
1499   fi
1500   have_asciidoc=yes
1501elif test "x$use_asciidoc" = x"no" ; then
1502   if test "x$ASCIIDOC" != "x"; then
1503      AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified])
1504   fi
1505   have_asciidoc=no
1506else
1507   AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no'])
1508fi
1509m4_ifval([$1],
1510[if test "$have_asciidoc" = yes; then
1511    # scrape the asciidoc version
1512    AC_MSG_CHECKING([the asciidoc version])
1513    asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2`
1514    AC_MSG_RESULT([$asciidoc_version])
1515    AS_VERSION_COMPARE([$asciidoc_version], [$1],
1516        [if test "x$use_asciidoc" = xauto; then
1517            AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed])
1518            have_asciidoc=no
1519        else
1520            AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed])
1521        fi])
1522fi])
1523AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
1524]) # XORG_WITH_ASCIIDOC
1525
1526# XORG_WITH_DOXYGEN([MIN-VERSION])
1527# --------------------------------
1528# Minimum version: 1.5.0
1529#
1530# Documentation tools are not always available on all platforms and sometimes
1531# not at the appropriate level. This macro enables a module to test for the
1532# presence of the tool and obtain it's path in separate variables. Coupled with
1533# the --with-doxygen option, it allows maximum flexibilty in making decisions
1534# as whether or not to use the doxygen package.
1535#
1536# Interface to module:
1537# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation
1538# DOXYGEN:	 returns the path of the doxygen program found
1539#		 returns the path set by the user in the environment
1540# --with-doxygen: 'yes' user instructs the module to use doxygen
1541#		  'no' user instructs the module not to use doxygen
1542#
1543# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path.
1544#
1545AC_DEFUN([XORG_WITH_DOXYGEN],[
1546AC_ARG_VAR([DOXYGEN], [Path to doxygen command])
1547AC_ARG_WITH(doxygen,
1548	AS_HELP_STRING([--with-doxygen],
1549	   [Use doxygen to regenerate documentation (default: yes, if installed)]),
1550	   [use_doxygen=$withval], [use_doxygen=auto])
1551
1552if test "x$use_doxygen" = x"auto"; then
1553   AC_PATH_PROG([DOXYGEN], [doxygen])
1554   if test "x$DOXYGEN" = "x"; then
1555        AC_MSG_WARN([doxygen not found - documentation targets will be skipped])
1556	have_doxygen=no
1557   else
1558        have_doxygen=yes
1559   fi
1560elif test "x$use_doxygen" = x"yes" ; then
1561   AC_PATH_PROG([DOXYGEN], [doxygen])
1562   if test "x$DOXYGEN" = "x"; then
1563        AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH])
1564   fi
1565   have_doxygen=yes
1566elif test "x$use_doxygen" = x"no" ; then
1567   if test "x$DOXYGEN" != "x"; then
1568      AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified])
1569   fi
1570   have_doxygen=no
1571else
1572   AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no'])
1573fi
1574m4_ifval([$1],
1575[if test "$have_doxygen" = yes; then
1576    # scrape the doxygen version
1577    AC_MSG_CHECKING([the doxygen version])
1578    doxygen_version=`$DOXYGEN --version 2>/dev/null`
1579    AC_MSG_RESULT([$doxygen_version])
1580    AS_VERSION_COMPARE([$doxygen_version], [$1],
1581        [if test "x$use_doxygen" = xauto; then
1582            AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed])
1583            have_doxygen=no
1584        else
1585            AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed])
1586        fi])
1587fi])
1588AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
1589]) # XORG_WITH_DOXYGEN
1590
1591# XORG_WITH_GROFF
1592# ----------------
1593# Minimum version: 1.6.0
1594#
1595# Documentation tools are not always available on all platforms and sometimes
1596# not at the appropriate level. This macro enables a module to test for the
1597# presence of the tool and obtain it's path in separate variables. Coupled with
1598# the --with-groff option, it allows maximum flexibilty in making decisions
1599# as whether or not to use the groff package.
1600#
1601# Interface to module:
1602# HAVE_GROFF:	 used in makefiles to conditionally generate documentation
1603# HAVE_GROFF_MM: the memorandum macros (-mm) package
1604# HAVE_GROFF_MS: the -ms macros package
1605# GROFF:	 returns the path of the groff program found
1606#		 returns the path set by the user in the environment
1607# --with-groff:	 'yes' user instructs the module to use groff
1608#		 'no' user instructs the module not to use groff
1609#
1610# Added in version 1.9.0:
1611# HAVE_GROFF_HTML: groff has dependencies to output HTML format:
1612#		   pnmcut pnmcrop pnmtopng pnmtops from the netpbm package.
1613#		   psselect from the psutils package.
1614#		   the ghostcript package. Refer to the grohtml man pages
1615#
1616# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path.
1617#
1618# OS and distros often splits groff in a basic and full package, the former
1619# having the groff program and the later having devices, fonts and macros
1620# Checking for the groff executable is not enough.
1621#
1622# If macros are missing, we cannot assume that groff is useless, so we don't
1623# unset HAVE_GROFF or GROFF env variables.
1624# HAVE_GROFF_?? can never be true while HAVE_GROFF is false.
1625#
1626AC_DEFUN([XORG_WITH_GROFF],[
1627AC_ARG_VAR([GROFF], [Path to groff command])
1628AC_ARG_WITH(groff,
1629	AS_HELP_STRING([--with-groff],
1630	   [Use groff to regenerate documentation (default: yes, if installed)]),
1631	   [use_groff=$withval], [use_groff=auto])
1632
1633if test "x$use_groff" = x"auto"; then
1634   AC_PATH_PROG([GROFF], [groff])
1635   if test "x$GROFF" = "x"; then
1636        AC_MSG_WARN([groff not found - documentation targets will be skipped])
1637	have_groff=no
1638   else
1639        have_groff=yes
1640   fi
1641elif test "x$use_groff" = x"yes" ; then
1642   AC_PATH_PROG([GROFF], [groff])
1643   if test "x$GROFF" = "x"; then
1644        AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH])
1645   fi
1646   have_groff=yes
1647elif test "x$use_groff" = x"no" ; then
1648   if test "x$GROFF" != "x"; then
1649      AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified])
1650   fi
1651   have_groff=no
1652else
1653   AC_MSG_ERROR([--with-groff expects 'yes' or 'no'])
1654fi
1655
1656# We have groff, test for the presence of the macro packages
1657if test "x$have_groff" = x"yes"; then
1658    AC_MSG_CHECKING([for ${GROFF} -ms macros])
1659    if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then
1660        groff_ms_works=yes
1661    else
1662        groff_ms_works=no
1663    fi
1664    AC_MSG_RESULT([$groff_ms_works])
1665    AC_MSG_CHECKING([for ${GROFF} -mm macros])
1666    if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then
1667        groff_mm_works=yes
1668    else
1669        groff_mm_works=no
1670    fi
1671    AC_MSG_RESULT([$groff_mm_works])
1672fi
1673
1674# We have groff, test for HTML dependencies, one command per package
1675if test "x$have_groff" = x"yes"; then
1676   AC_PATH_PROGS(GS_PATH, [gs gswin32c])
1677   AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng])
1678   AC_PATH_PROG(PSSELECT_PATH, [psselect])
1679   if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then
1680      have_groff_html=yes
1681   else
1682      have_groff_html=no
1683      AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages])
1684   fi
1685fi
1686
1687# Set Automake conditionals for Makefiles
1688AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes])
1689AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes])
1690AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes])
1691AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
1692]) # XORG_WITH_GROFF
1693
1694# XORG_WITH_FOP
1695# ----------------
1696# Minimum version: 1.6.0
1697#
1698# Documentation tools are not always available on all platforms and sometimes
1699# not at the appropriate level. This macro enables a module to test for the
1700# presence of the tool and obtain it's path in separate variables. Coupled with
1701# the --with-fop option, it allows maximum flexibilty in making decisions
1702# as whether or not to use the fop package.
1703#
1704# Interface to module:
1705# HAVE_FOP: 	used in makefiles to conditionally generate documentation
1706# FOP:	 	returns the path of the fop program found
1707#		returns the path set by the user in the environment
1708# --with-fop: 	'yes' user instructs the module to use fop
1709#		'no' user instructs the module not to use fop
1710#
1711# If the user sets the value of FOP, AC_PATH_PROG skips testing the path.
1712#
1713AC_DEFUN([XORG_WITH_FOP],[
1714AC_ARG_VAR([FOP], [Path to fop command])
1715AC_ARG_WITH(fop,
1716	AS_HELP_STRING([--with-fop],
1717	   [Use fop to regenerate documentation (default: yes, if installed)]),
1718	   [use_fop=$withval], [use_fop=auto])
1719
1720if test "x$use_fop" = x"auto"; then
1721   AC_PATH_PROG([FOP], [fop])
1722   if test "x$FOP" = "x"; then
1723        AC_MSG_WARN([fop not found - documentation targets will be skipped])
1724	have_fop=no
1725   else
1726        have_fop=yes
1727   fi
1728elif test "x$use_fop" = x"yes" ; then
1729   AC_PATH_PROG([FOP], [fop])
1730   if test "x$FOP" = "x"; then
1731        AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH])
1732   fi
1733   have_fop=yes
1734elif test "x$use_fop" = x"no" ; then
1735   if test "x$FOP" != "x"; then
1736      AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified])
1737   fi
1738   have_fop=no
1739else
1740   AC_MSG_ERROR([--with-fop expects 'yes' or 'no'])
1741fi
1742AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
1743]) # XORG_WITH_FOP
1744
1745# XORG_WITH_PS2PDF
1746# ----------------
1747# Minimum version: 1.6.0
1748#
1749# Documentation tools are not always available on all platforms and sometimes
1750# not at the appropriate level. This macro enables a module to test for the
1751# presence of the tool and obtain it's path in separate variables. Coupled with
1752# the --with-ps2pdf option, it allows maximum flexibilty in making decisions
1753# as whether or not to use the ps2pdf package.
1754#
1755# Interface to module:
1756# HAVE_PS2PDF: 	used in makefiles to conditionally generate documentation
1757# PS2PDF:	returns the path of the ps2pdf program found
1758#		returns the path set by the user in the environment
1759# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf
1760#		 'no' user instructs the module not to use ps2pdf
1761#
1762# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path.
1763#
1764AC_DEFUN([XORG_WITH_PS2PDF],[
1765AC_ARG_VAR([PS2PDF], [Path to ps2pdf command])
1766AC_ARG_WITH(ps2pdf,
1767	AS_HELP_STRING([--with-ps2pdf],
1768	   [Use ps2pdf to regenerate documentation (default: yes, if installed)]),
1769	   [use_ps2pdf=$withval], [use_ps2pdf=auto])
1770
1771if test "x$use_ps2pdf" = x"auto"; then
1772   AC_PATH_PROG([PS2PDF], [ps2pdf])
1773   if test "x$PS2PDF" = "x"; then
1774        AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped])
1775	have_ps2pdf=no
1776   else
1777        have_ps2pdf=yes
1778   fi
1779elif test "x$use_ps2pdf" = x"yes" ; then
1780   AC_PATH_PROG([PS2PDF], [ps2pdf])
1781   if test "x$PS2PDF" = "x"; then
1782        AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH])
1783   fi
1784   have_ps2pdf=yes
1785elif test "x$use_ps2pdf" = x"no" ; then
1786   if test "x$PS2PDF" != "x"; then
1787      AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified])
1788   fi
1789   have_ps2pdf=no
1790else
1791   AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no'])
1792fi
1793AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
1794]) # XORG_WITH_PS2PDF
1795
1796# XORG_ENABLE_DOCS (enable_docs=yes)
1797# ----------------
1798# Minimum version: 1.6.0
1799#
1800# Documentation tools are not always available on all platforms and sometimes
1801# not at the appropriate level. This macro enables a builder to skip all
1802# documentation targets except traditional man pages.
1803# Combined with the specific tool checking macros XORG_WITH_*, it provides
1804# maximum flexibilty in controlling documentation building.
1805# Refer to:
1806# XORG_WITH_XMLTO         --with-xmlto
1807# XORG_WITH_ASCIIDOC      --with-asciidoc
1808# XORG_WITH_DOXYGEN       --with-doxygen
1809# XORG_WITH_FOP           --with-fop
1810# XORG_WITH_GROFF         --with-groff
1811# XORG_WITH_PS2PDF        --with-ps2pdf
1812#
1813# Interface to module:
1814# ENABLE_DOCS: 	  used in makefiles to conditionally generate documentation
1815# --enable-docs: 'yes' user instructs the module to generate docs
1816#		 'no' user instructs the module not to generate docs
1817# parm1:	specify the default value, yes or no.
1818#
1819AC_DEFUN([XORG_ENABLE_DOCS],[
1820default=$1
1821if test "x$default" = x ; then
1822  default="yes"
1823fi
1824AC_ARG_ENABLE(docs,
1825	AS_HELP_STRING([--enable-docs],
1826	   [Enable building the documentation (default: yes)]),
1827	   [build_docs=$enableval], [build_docs=$default])
1828AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes])
1829AC_MSG_CHECKING([whether to build documentation])
1830AC_MSG_RESULT([$build_docs])
1831]) # XORG_ENABLE_DOCS
1832
1833# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes)
1834# ----------------
1835# Minimum version: 1.6.0
1836#
1837# This macro enables a builder to skip all developer documentation.
1838# Combined with the specific tool checking macros XORG_WITH_*, it provides
1839# maximum flexibilty in controlling documentation building.
1840# Refer to:
1841# XORG_WITH_XMLTO         --with-xmlto
1842# XORG_WITH_ASCIIDOC      --with-asciidoc
1843# XORG_WITH_DOXYGEN       --with-doxygen
1844# XORG_WITH_FOP           --with-fop
1845# XORG_WITH_GROFF         --with-groff
1846# XORG_WITH_PS2PDF        --with-ps2pdf
1847#
1848# Interface to module:
1849# ENABLE_DEVEL_DOCS:	used in makefiles to conditionally generate developer docs
1850# --enable-devel-docs:	'yes' user instructs the module to generate developer docs
1851#			'no' user instructs the module not to generate developer docs
1852# parm1:		specify the default value, yes or no.
1853#
1854AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[
1855devel_default=$1
1856if test "x$devel_default" = x ; then
1857  devel_default="yes"
1858fi
1859AC_ARG_ENABLE(devel-docs,
1860	AS_HELP_STRING([--enable-devel-docs],
1861	   [Enable building the developer documentation (default: yes)]),
1862	   [build_devel_docs=$enableval], [build_devel_docs=$devel_default])
1863AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes])
1864AC_MSG_CHECKING([whether to build developer documentation])
1865AC_MSG_RESULT([$build_devel_docs])
1866]) # XORG_ENABLE_DEVEL_DOCS
1867
1868# XORG_ENABLE_SPECS (enable_specs=yes)
1869# ----------------
1870# Minimum version: 1.6.0
1871#
1872# This macro enables a builder to skip all functional specification targets.
1873# Combined with the specific tool checking macros XORG_WITH_*, it provides
1874# maximum flexibilty in controlling documentation building.
1875# Refer to:
1876# XORG_WITH_XMLTO         --with-xmlto
1877# XORG_WITH_ASCIIDOC      --with-asciidoc
1878# XORG_WITH_DOXYGEN       --with-doxygen
1879# XORG_WITH_FOP           --with-fop
1880# XORG_WITH_GROFF         --with-groff
1881# XORG_WITH_PS2PDF        --with-ps2pdf
1882#
1883# Interface to module:
1884# ENABLE_SPECS:		used in makefiles to conditionally generate specs
1885# --enable-specs:	'yes' user instructs the module to generate specs
1886#			'no' user instructs the module not to generate specs
1887# parm1:		specify the default value, yes or no.
1888#
1889AC_DEFUN([XORG_ENABLE_SPECS],[
1890spec_default=$1
1891if test "x$spec_default" = x ; then
1892  spec_default="yes"
1893fi
1894AC_ARG_ENABLE(specs,
1895	AS_HELP_STRING([--enable-specs],
1896	   [Enable building the specs (default: yes)]),
1897	   [build_specs=$enableval], [build_specs=$spec_default])
1898AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes])
1899AC_MSG_CHECKING([whether to build functional specifications])
1900AC_MSG_RESULT([$build_specs])
1901]) # XORG_ENABLE_SPECS
1902
1903# XORG_CHECK_MALLOC_ZERO
1904# ----------------------
1905# Minimum version: 1.0.0
1906#
1907# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
1908# malloc(0) returns NULL.  Packages should add one of these cflags to
1909# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
1910AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
1911AC_ARG_ENABLE(malloc0returnsnull,
1912	AS_HELP_STRING([--enable-malloc0returnsnull],
1913		       [malloc(0) returns NULL (default: auto)]),
1914	[MALLOC_ZERO_RETURNS_NULL=$enableval],
1915	[MALLOC_ZERO_RETURNS_NULL=auto])
1916
1917AC_MSG_CHECKING([whether malloc(0) returns NULL])
1918if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
1919	AC_RUN_IFELSE([
1920char *malloc();
1921char *realloc();
1922char *calloc();
1923main() {
1924    char *m0, *r0, *c0, *p;
1925    m0 = malloc(0);
1926    p = malloc(10);
1927    r0 = realloc(p,0);
1928    c0 = calloc(0);
1929    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
1930}],
1931		[MALLOC_ZERO_RETURNS_NULL=yes],
1932		[MALLOC_ZERO_RETURNS_NULL=no],
1933		[MALLOC_ZERO_RETURNS_NULL=yes])
1934fi
1935AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
1936
1937if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
1938	MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
1939	XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
1940	XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
1941else
1942	MALLOC_ZERO_CFLAGS=""
1943	XMALLOC_ZERO_CFLAGS=""
1944	XTMALLOC_ZERO_CFLAGS=""
1945fi
1946
1947AC_SUBST([MALLOC_ZERO_CFLAGS])
1948AC_SUBST([XMALLOC_ZERO_CFLAGS])
1949AC_SUBST([XTMALLOC_ZERO_CFLAGS])
1950]) # XORG_CHECK_MALLOC_ZERO
1951
1952# XORG_WITH_LINT()
1953# ----------------
1954# Minimum version: 1.1.0
1955#
1956# This macro enables the use of a tool that flags some suspicious and
1957# non-portable constructs (likely to be bugs) in C language source code.
1958# It will attempt to locate the tool and use appropriate options.
1959# There are various lint type tools on different platforms.
1960#
1961# Interface to module:
1962# LINT:		returns the path to the tool found on the platform
1963#		or the value set to LINT on the configure cmd line
1964#		also an Automake conditional
1965# LINT_FLAGS:	an Automake variable with appropriate flags
1966#
1967# --with-lint:	'yes' user instructs the module to use lint
1968#		'no' user instructs the module not to use lint (default)
1969#
1970# If the user sets the value of LINT, AC_PATH_PROG skips testing the path.
1971# If the user sets the value of LINT_FLAGS, they are used verbatim.
1972#
1973AC_DEFUN([XORG_WITH_LINT],[
1974
1975AC_ARG_VAR([LINT], [Path to a lint-style command])
1976AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command])
1977AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
1978		[Use a lint-style source code checker (default: disabled)])],
1979		[use_lint=$withval], [use_lint=no])
1980
1981# Obtain platform specific info like program name and options
1982# The lint program on FreeBSD and NetBSD is different from the one on Solaris
1983case $host_os in
1984  *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*)
1985	lint_name=splint
1986	lint_options="-badflag"
1987	;;
1988  *freebsd* | *netbsd*)
1989	lint_name=lint
1990	lint_options="-u -b"
1991	;;
1992  *solaris*)
1993	lint_name=lint
1994	lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
1995	;;
1996esac
1997
1998# Test for the presence of the program (either guessed by the code or spelled out by the user)
1999if test "x$use_lint" = x"yes" ; then
2000   AC_PATH_PROG([LINT], [$lint_name])
2001   if test "x$LINT" = "x"; then
2002        AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH])
2003   fi
2004elif test "x$use_lint" = x"no" ; then
2005   if test "x$LINT" != "x"; then
2006      AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified])
2007   fi
2008else
2009   AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.])
2010fi
2011
2012# User supplied flags override default flags
2013if test "x$LINT_FLAGS" != "x"; then
2014   lint_options=$LINT_FLAGS
2015fi
2016
2017AC_SUBST([LINT_FLAGS],[$lint_options])
2018AM_CONDITIONAL(LINT, [test "x$LINT" != x])
2019
2020]) # XORG_WITH_LINT
2021
2022# XORG_LINT_LIBRARY(LIBNAME)
2023# --------------------------
2024# Minimum version: 1.1.0
2025#
2026# Sets up flags for building lint libraries for checking programs that call
2027# functions in the library.
2028#
2029# Interface to module:
2030# LINTLIB		- Automake variable with the name of lint library file to make
2031# MAKE_LINT_LIB		- Automake conditional
2032#
2033# --enable-lint-library:  - 'yes' user instructs the module to created a lint library
2034#			  - 'no' user instructs the module not to create a lint library (default)
2035
2036AC_DEFUN([XORG_LINT_LIBRARY],[
2037AC_REQUIRE([XORG_WITH_LINT])
2038AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
2039	[Create lint library (default: disabled)])],
2040	[make_lint_lib=$enableval], [make_lint_lib=no])
2041
2042if test "x$make_lint_lib" = x"yes" ; then
2043   LINTLIB=llib-l$1.ln
2044   if test "x$LINT" = "x"; then
2045        AC_MSG_ERROR([Cannot make lint library without --with-lint])
2046   fi
2047elif test "x$make_lint_lib" != x"no" ; then
2048   AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.])
2049fi
2050
2051AC_SUBST(LINTLIB)
2052AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
2053
2054]) # XORG_LINT_LIBRARY
2055
2056# XORG_CWARNFLAGS
2057# ---------------
2058# Minimum version: 1.2.0
2059#
2060# Defines CWARNFLAGS to enable C compiler warnings.
2061#
2062AC_DEFUN([XORG_CWARNFLAGS], [
2063AC_REQUIRE([AC_PROG_CC_C99])
2064if  test "x$GCC" = xyes ; then
2065    CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
2066-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
2067-Wbad-function-cast -Wformat=2"
2068    case `$CC -dumpversion` in
2069    3.4.* | 4.*)
2070	CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
2071	;;
2072    esac
2073else
2074    AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
2075    if test "x$SUNCC" = "xyes"; then
2076	CWARNFLAGS="-v"
2077    fi
2078fi
2079AC_SUBST(CWARNFLAGS)
2080]) # XORG_CWARNFLAGS
2081
2082# XORG_STRICT_OPTION
2083# -----------------------
2084# Minimum version: 1.3.0
2085#
2086# Add configure option to enable strict compilation
2087AC_DEFUN([XORG_STRICT_OPTION], [
2088# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89
2089AC_REQUIRE([AC_PROG_CC_C99])
2090AC_REQUIRE([XORG_CWARNFLAGS])
2091
2092AC_ARG_ENABLE(strict-compilation,
2093			  AS_HELP_STRING([--enable-strict-compilation],
2094			  [Enable all warnings from compiler and make them errors (default: disabled)]),
2095			  [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
2096if test "x$STRICT_COMPILE" = "xyes"; then
2097	AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
2098	AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
2099	if test "x$GCC" = xyes ; then
2100		STRICT_CFLAGS="-pedantic -Werror"
2101	elif test "x$SUNCC" = "xyes"; then
2102		STRICT_CFLAGS="-errwarn"
2103    elif test "x$INTELCC" = "xyes"; then
2104		STRICT_CFLAGS="-Werror"
2105	fi
2106fi
2107CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
2108AC_SUBST([CWARNFLAGS])
2109]) # XORG_STRICT_OPTION
2110
2111# XORG_DEFAULT_OPTIONS
2112# --------------------
2113# Minimum version: 1.3.0
2114#
2115# Defines default options for X.Org modules.
2116#
2117AC_DEFUN([XORG_DEFAULT_OPTIONS], [
2118AC_REQUIRE([AC_PROG_INSTALL])
2119XORG_CWARNFLAGS
2120XORG_STRICT_OPTION
2121XORG_RELEASE_VERSION
2122XORG_CHANGELOG
2123XORG_INSTALL
2124XORG_MANPAGE_SECTIONS
2125m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
2126    [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
2127]) # XORG_DEFAULT_OPTIONS
2128
2129# XORG_INSTALL()
2130# ----------------
2131# Minimum version: 1.4.0
2132#
2133# Defines the variable INSTALL_CMD as the command to copy
2134# INSTALL from $prefix/share/util-macros.
2135#
2136AC_DEFUN([XORG_INSTALL], [
2137AC_REQUIRE([PKG_PROG_PKG_CONFIG])
2138macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
2139INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
2140mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
2141|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
2142echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
2143AC_SUBST([INSTALL_CMD])
2144]) # XORG_INSTALL
2145dnl Copyright 2005 Red Hat, Inc
2146dnl
2147dnl Permission to use, copy, modify, distribute, and sell this software and its
2148dnl documentation for any purpose is hereby granted without fee, provided that
2149dnl the above copyright notice appear in all copies and that both that
2150dnl copyright notice and this permission notice appear in supporting
2151dnl documentation.
2152dnl
2153dnl The above copyright notice and this permission notice shall be included
2154dnl in all copies or substantial portions of the Software.
2155dnl
2156dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
2157dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
2158dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
2159dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
2160dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
2161dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
2162dnl OTHER DEALINGS IN THE SOFTWARE.
2163dnl
2164dnl Except as contained in this notice, the name of the copyright holders shall
2165dnl not be used in advertising or otherwise to promote the sale, use or
2166dnl other dealings in this Software without prior written authorization
2167dnl from the copyright holders.
2168dnl
2169
2170# XORG_RELEASE_VERSION
2171# --------------------
2172# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
2173 
2174AC_DEFUN([XORG_RELEASE_VERSION],[
2175	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
2176		[`echo $PACKAGE_VERSION | cut -d . -f 1`],
2177		[Major version of this package])
2178	PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
2179	if test "x$PVM" = "x"; then
2180		PVM="0"
2181	fi
2182	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
2183		[$PVM],
2184		[Minor version of this package])
2185	PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
2186	if test "x$PVP" = "x"; then
2187		PVP="0"
2188	fi
2189	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
2190		[$PVP],
2191		[Patch version of this package])
2192])
2193
2194# XORG_CHANGELOG()
2195# ----------------
2196# Minimum version: 1.2.0
2197#
2198# Defines the variable CHANGELOG_CMD as the command to generate
2199# ChangeLog from git.
2200#
2201#
2202AC_DEFUN([XORG_CHANGELOG], [
2203CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
2204mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
2205|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
2206echo 'git directory not found: installing possibly empty changelog.' >&2)"
2207AC_SUBST([CHANGELOG_CMD])
2208]) # XORG_CHANGELOG
2209
2210# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2211# 
2212# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
2213#
2214# This program is free software; you can redistribute it and/or modify
2215# it under the terms of the GNU General Public License as published by
2216# the Free Software Foundation; either version 2 of the License, or
2217# (at your option) any later version.
2218#
2219# This program is distributed in the hope that it will be useful, but
2220# WITHOUT ANY WARRANTY; without even the implied warranty of
2221# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
2222# General Public License for more details.
2223#
2224# You should have received a copy of the GNU General Public License
2225# along with this program; if not, write to the Free Software
2226# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2227#
2228# As a special exception to the GNU General Public License, if you
2229# distribute this file as part of a program that contains a
2230# configuration script generated by Autoconf, you may include it under
2231# the same distribution terms that you use for the rest of that program.
2232
2233# PKG_PROG_PKG_CONFIG([MIN-VERSION])
2234# ----------------------------------
2235AC_DEFUN([PKG_PROG_PKG_CONFIG],
2236[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
2237m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
2238AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
2239if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
2240	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
2241fi
2242if test -n "$PKG_CONFIG"; then
2243	_pkg_min_version=m4_default([$1], [0.9.0])
2244	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
2245	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
2246		AC_MSG_RESULT([yes])
2247	else
2248		AC_MSG_RESULT([no])
2249		PKG_CONFIG=""
2250	fi
2251		
2252fi[]dnl
2253])# PKG_PROG_PKG_CONFIG
2254
2255# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2256#
2257# Check to see whether a particular set of modules exists.  Similar
2258# to PKG_CHECK_MODULES(), but does not set variables or print errors.
2259#
2260#
2261# Similar to PKG_CHECK_MODULES, make sure that the first instance of
2262# this or PKG_CHECK_MODULES is called, or make sure to call
2263# PKG_CHECK_EXISTS manually
2264# --------------------------------------------------------------
2265AC_DEFUN([PKG_CHECK_EXISTS],
2266[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
2267if test -n "$PKG_CONFIG" && \
2268    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
2269  m4_ifval([$2], [$2], [:])
2270m4_ifvaln([$3], [else
2271  $3])dnl
2272fi])
2273
2274
2275# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
2276# ---------------------------------------------
2277m4_define([_PKG_CONFIG],
2278[if test -n "$$1"; then
2279    pkg_cv_[]$1="$$1"
2280 elif test -n "$PKG_CONFIG"; then
2281    PKG_CHECK_EXISTS([$3],
2282                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
2283		     [pkg_failed=yes])
2284 else
2285    pkg_failed=untried
2286fi[]dnl
2287])# _PKG_CONFIG
2288
2289# _PKG_SHORT_ERRORS_SUPPORTED
2290# -----------------------------
2291AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
2292[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
2293if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
2294        _pkg_short_errors_supported=yes
2295else
2296        _pkg_short_errors_supported=no
2297fi[]dnl
2298])# _PKG_SHORT_ERRORS_SUPPORTED
2299
2300
2301# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
2302# [ACTION-IF-NOT-FOUND])
2303#
2304#
2305# Note that if there is a possibility the first call to
2306# PKG_CHECK_MODULES might not happen, you should be sure to include an
2307# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
2308#
2309#
2310# --------------------------------------------------------------
2311AC_DEFUN([PKG_CHECK_MODULES],
2312[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
2313AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
2314AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
2315
2316pkg_failed=no
2317AC_MSG_CHECKING([for $1])
2318
2319_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
2320_PKG_CONFIG([$1][_LIBS], [libs], [$2])
2321
2322m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
2323and $1[]_LIBS to avoid the need to call pkg-config.
2324See the pkg-config man page for more details.])
2325
2326if test $pkg_failed = yes; then
2327        _PKG_SHORT_ERRORS_SUPPORTED
2328        if test $_pkg_short_errors_supported = yes; then
2329	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
2330        else 
2331	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
2332        fi
2333	# Put the nasty error message in config.log where it belongs
2334	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
2335
2336	ifelse([$4], , [AC_MSG_ERROR(dnl
2337[Package requirements ($2) were not met:
2338
2339$$1_PKG_ERRORS
2340
2341Consider adjusting the PKG_CONFIG_PATH environment variable if you
2342installed software in a non-standard prefix.
2343
2344_PKG_TEXT
2345])],
2346		[AC_MSG_RESULT([no])
2347                $4])
2348elif test $pkg_failed = untried; then
2349	ifelse([$4], , [AC_MSG_FAILURE(dnl
2350[The pkg-config script could not be found or is too old.  Make sure it
2351is in your PATH or set the PKG_CONFIG environment variable to the full
2352path to pkg-config.
2353
2354_PKG_TEXT
2355
2356To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
2357		[$4])
2358else
2359	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
2360	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
2361        AC_MSG_RESULT([yes])
2362	ifelse([$3], , :, [$3])
2363fi[]dnl
2364])# PKG_CHECK_MODULES
2365
2366# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
2367#
2368#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
2369#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
2370#                 Inc.
2371#   Written by Gordon Matzigkeit, 1996
2372#
2373# This file is free software; the Free Software Foundation gives
2374# unlimited permission to copy and/or distribute it, with or without
2375# modifications, as long as this notice is preserved.
2376
2377m4_define([_LT_COPYING], [dnl
2378#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
2379#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
2380#                 Inc.
2381#   Written by Gordon Matzigkeit, 1996
2382#
2383#   This file is part of GNU Libtool.
2384#
2385# GNU Libtool is free software; you can redistribute it and/or
2386# modify it under the terms of the GNU General Public License as
2387# published by the Free Software Foundation; either version 2 of
2388# the License, or (at your option) any later version.
2389#
2390# As a special exception to the GNU General Public License,
2391# if you distribute this file as part of a program or library that
2392# is built using GNU Libtool, you may include this file under the
2393# same distribution terms that you use for the rest of that program.
2394#
2395# GNU Libtool is distributed in the hope that it will be useful,
2396# but WITHOUT ANY WARRANTY; without even the implied warranty of
2397# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2398# GNU General Public License for more details.
2399#
2400# You should have received a copy of the GNU General Public License
2401# along with GNU Libtool; see the file COPYING.  If not, a copy
2402# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
2403# obtained by writing to the Free Software Foundation, Inc.,
2404# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
2405])
2406
2407# serial 57 LT_INIT
2408
2409
2410# LT_PREREQ(VERSION)
2411# ------------------
2412# Complain and exit if this libtool version is less that VERSION.
2413m4_defun([LT_PREREQ],
2414[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
2415       [m4_default([$3],
2416		   [m4_fatal([Libtool version $1 or higher is required],
2417		             63)])],
2418       [$2])])
2419
2420
2421# _LT_CHECK_BUILDDIR
2422# ------------------
2423# Complain if the absolute build directory name contains unusual characters
2424m4_defun([_LT_CHECK_BUILDDIR],
2425[case `pwd` in
2426  *\ * | *\	*)
2427    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
2428esac
2429])
2430
2431
2432# LT_INIT([OPTIONS])
2433# ------------------
2434AC_DEFUN([LT_INIT],
2435[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
2436AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
2437AC_BEFORE([$0], [LT_LANG])dnl
2438AC_BEFORE([$0], [LT_OUTPUT])dnl
2439AC_BEFORE([$0], [LTDL_INIT])dnl
2440m4_require([_LT_CHECK_BUILDDIR])dnl
2441
2442dnl Autoconf doesn't catch unexpanded LT_ macros by default:
2443m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
2444m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
2445dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
2446dnl unless we require an AC_DEFUNed macro:
2447AC_REQUIRE([LTOPTIONS_VERSION])dnl
2448AC_REQUIRE([LTSUGAR_VERSION])dnl
2449AC_REQUIRE([LTVERSION_VERSION])dnl
2450AC_REQUIRE([LTOBSOLETE_VERSION])dnl
2451m4_require([_LT_PROG_LTMAIN])dnl
2452
2453_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
2454
2455dnl Parse OPTIONS
2456_LT_SET_OPTIONS([$0], [$1])
2457
2458# This can be used to rebuild libtool when needed
2459LIBTOOL_DEPS="$ltmain"
2460
2461# Always use our own libtool.
2462LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2463AC_SUBST(LIBTOOL)dnl
2464
2465_LT_SETUP
2466
2467# Only expand once:
2468m4_define([LT_INIT])
2469])# LT_INIT
2470
2471# Old names:
2472AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
2473AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
2474dnl aclocal-1.4 backwards compatibility:
2475dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
2476dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
2477
2478
2479# _LT_CC_BASENAME(CC)
2480# -------------------
2481# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
2482m4_defun([_LT_CC_BASENAME],
2483[for cc_temp in $1""; do
2484  case $cc_temp in
2485    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
2486    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
2487    \-*) ;;
2488    *) break;;
2489  esac
2490done
2491cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
2492])
2493
2494
2495# _LT_FILEUTILS_DEFAULTS
2496# ----------------------
2497# It is okay to use these file commands and assume they have been set
2498# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
2499m4_defun([_LT_FILEUTILS_DEFAULTS],
2500[: ${CP="cp -f"}
2501: ${MV="mv -f"}
2502: ${RM="rm -f"}
2503])# _LT_FILEUTILS_DEFAULTS
2504
2505
2506# _LT_SETUP
2507# ---------
2508m4_defun([_LT_SETUP],
2509[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2510AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2511AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
2512AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
2513
2514_LT_DECL([], [host_alias], [0], [The host system])dnl
2515_LT_DECL([], [host], [0])dnl
2516_LT_DECL([], [host_os], [0])dnl
2517dnl
2518_LT_DECL([], [build_alias], [0], [The build system])dnl
2519_LT_DECL([], [build], [0])dnl
2520_LT_DECL([], [build_os], [0])dnl
2521dnl
2522AC_REQUIRE([AC_PROG_CC])dnl
2523AC_REQUIRE([LT_PATH_LD])dnl
2524AC_REQUIRE([LT_PATH_NM])dnl
2525dnl
2526AC_REQUIRE([AC_PROG_LN_S])dnl
2527test -z "$LN_S" && LN_S="ln -s"
2528_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
2529dnl
2530AC_REQUIRE([LT_CMD_MAX_LEN])dnl
2531_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
2532_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
2533dnl
2534m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2535m4_require([_LT_CHECK_SHELL_FEATURES])dnl
2536m4_require([_LT_CMD_RELOAD])dnl
2537m4_require([_LT_CHECK_MAGIC_METHOD])dnl
2538m4_require([_LT_CMD_OLD_ARCHIVE])dnl
2539m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
2540
2541_LT_CONFIG_LIBTOOL_INIT([
2542# See if we are running on zsh, and set the options which allow our
2543# commands through without removal of \ escapes INIT.
2544if test -n "\${ZSH_VERSION+set}" ; then
2545   setopt NO_GLOB_SUBST
2546fi
2547])
2548if test -n "${ZSH_VERSION+set}" ; then
2549   setopt NO_GLOB_SUBST
2550fi
2551
2552_LT_CHECK_OBJDIR
2553
2554m4_require([_LT_TAG_COMPILER])dnl
2555
2556case $host_os in
2557aix3*)
2558  # AIX sometimes has problems with the GCC collect2 program.  For some
2559  # reason, if we set the COLLECT_NAMES environment variable, the problems
2560  # vanish in a puff of smoke.
2561  if test "X${COLLECT_NAMES+set}" != Xset; then
2562    COLLECT_NAMES=
2563    export COLLECT_NAMES
2564  fi
2565  ;;
2566esac
2567
2568# Global variables:
2569ofile=libtool
2570can_build_shared=yes
2571
2572# All known linkers require a `.a' archive for static linking (except MSVC,
2573# which needs '.lib').
2574libext=a
2575
2576with_gnu_ld="$lt_cv_prog_gnu_ld"
2577
2578old_CC="$CC"
2579old_CFLAGS="$CFLAGS"
2580
2581# Set sane defaults for various variables
2582test -z "$CC" && CC=cc
2583test -z "$LTCC" && LTCC=$CC
2584test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
2585test -z "$LD" && LD=ld
2586test -z "$ac_objext" && ac_objext=o
2587
2588_LT_CC_BASENAME([$compiler])
2589
2590# Only perform the check for file, if the check method requires it
2591test -z "$MAGIC_CMD" && MAGIC_CMD=file
2592case $deplibs_check_method in
2593file_magic*)
2594  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
2595    _LT_PATH_MAGIC
2596  fi
2597  ;;
2598esac
2599
2600# Use C for the default configuration in the libtool script
2601LT_SUPPORTED_TAG([CC])
2602_LT_LANG_C_CONFIG
2603_LT_LANG_DEFAULT_CONFIG
2604_LT_CONFIG_COMMANDS
2605])# _LT_SETUP
2606
2607
2608# _LT_PREPARE_SED_QUOTE_VARS
2609# --------------------------
2610# Define a few sed substitution that help us do robust quoting.
2611m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
2612[# Backslashify metacharacters that are still active within
2613# double-quoted strings.
2614sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
2615
2616# Same as above, but do not quote variable references.
2617double_quote_subst='s/\([["`\\]]\)/\\\1/g'
2618
2619# Sed substitution to delay expansion of an escaped shell variable in a
2620# double_quote_subst'ed string.
2621delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
2622
2623# Sed substitution to delay expansion of an escaped single quote.
2624delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
2625
2626# Sed substitution to avoid accidental globbing in evaled expressions
2627no_glob_subst='s/\*/\\\*/g'
2628])
2629
2630# _LT_PROG_LTMAIN
2631# ---------------
2632# Note that this code is called both from `configure', and `config.status'
2633# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
2634# `config.status' has no value for ac_aux_dir unless we are using Automake,
2635# so we pass a copy along to make sure it has a sensible value anyway.
2636m4_defun([_LT_PROG_LTMAIN],
2637[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
2638_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
2639ltmain="$ac_aux_dir/ltmain.sh"
2640])# _LT_PROG_LTMAIN
2641
2642
2643
2644# So that we can recreate a full libtool script including additional
2645# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
2646# in macros and then make a single call at the end using the `libtool'
2647# label.
2648
2649
2650# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
2651# ----------------------------------------
2652# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
2653m4_define([_LT_CONFIG_LIBTOOL_INIT],
2654[m4_ifval([$1],
2655          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
2656                     [$1
2657])])])
2658
2659# Initialize.
2660m4_define([_LT_OUTPUT_LIBTOOL_INIT])
2661
2662
2663# _LT_CONFIG_LIBTOOL([COMMANDS])
2664# ------------------------------
2665# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
2666m4_define([_LT_CONFIG_LIBTOOL],
2667[m4_ifval([$1],
2668          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
2669                     [$1
2670])])])
2671
2672# Initialize.
2673m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
2674
2675
2676# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
2677# -----------------------------------------------------
2678m4_defun([_LT_CONFIG_SAVE_COMMANDS],
2679[_LT_CONFIG_LIBTOOL([$1])
2680_LT_CONFIG_LIBTOOL_INIT([$2])
2681])
2682
2683
2684# _LT_FORMAT_COMMENT([COMMENT])
2685# -----------------------------
2686# Add leading comment marks to the start of each line, and a trailing
2687# full-stop to the whole comment if one is not present already.
2688m4_define([_LT_FORMAT_COMMENT],
2689[m4_ifval([$1], [
2690m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
2691              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
2692)])
2693
2694
2695
2696
2697
2698# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
2699# -------------------------------------------------------------------
2700# CONFIGNAME is the name given to the value in the libtool script.
2701# VARNAME is the (base) name used in the configure script.
2702# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
2703# VARNAME.  Any other value will be used directly.
2704m4_define([_LT_DECL],
2705[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
2706    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
2707	[m4_ifval([$1], [$1], [$2])])
2708    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
2709    m4_ifval([$4],
2710	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
2711    lt_dict_add_subkey([lt_decl_dict], [$2],
2712	[tagged?], [m4_ifval([$5], [yes], [no])])])
2713])
2714
2715
2716# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
2717# --------------------------------------------------------
2718m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
2719
2720
2721# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
2722# ------------------------------------------------
2723m4_define([lt_decl_tag_varnames],
2724[_lt_decl_filter([tagged?], [yes], $@)])
2725
2726
2727# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
2728# ---------------------------------------------------------
2729m4_define([_lt_decl_filter],
2730[m4_case([$#],
2731  [0], [m4_fatal([$0: too few arguments: $#])],
2732  [1], [m4_fatal([$0: too few arguments: $#: $1])],
2733  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
2734  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
2735  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
2736])
2737
2738
2739# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
2740# --------------------------------------------------
2741m4_define([lt_decl_quote_varnames],
2742[_lt_decl_filter([value], [1], $@)])
2743
2744
2745# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
2746# ---------------------------------------------------
2747m4_define([lt_decl_dquote_varnames],
2748[_lt_decl_filter([value], [2], $@)])
2749
2750
2751# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
2752# ---------------------------------------------------
2753m4_define([lt_decl_varnames_tagged],
2754[m4_assert([$# <= 2])dnl
2755_$0(m4_quote(m4_default([$1], [[, ]])),
2756    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
2757    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
2758m4_define([_lt_decl_varnames_tagged],
2759[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
2760
2761
2762# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
2763# ------------------------------------------------
2764m4_define([lt_decl_all_varnames],
2765[_$0(m4_quote(m4_default([$1], [[, ]])),
2766     m4_if([$2], [],
2767	   m4_quote(lt_decl_varnames),
2768	m4_quote(m4_shift($@))))[]dnl
2769])
2770m4_define([_lt_decl_all_varnames],
2771[lt_join($@, lt_decl_varnames_tagged([$1],
2772			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
2773])
2774
2775
2776# _LT_CONFIG_STATUS_DECLARE([VARNAME])
2777# ------------------------------------
2778# Quote a variable value, and forward it to `config.status' so that its
2779# declaration there will have the same value as in `configure'.  VARNAME
2780# must have a single quote delimited value for this to work.
2781m4_define([_LT_CONFIG_STATUS_DECLARE],
2782[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
2783
2784
2785# _LT_CONFIG_STATUS_DECLARATIONS
2786# ------------------------------
2787# We delimit libtool config variables with single quotes, so when
2788# we write them to config.status, we have to be sure to quote all
2789# embedded single quotes properly.  In configure, this macro expands
2790# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
2791#
2792#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
2793m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
2794[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
2795    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
2796
2797
2798# _LT_LIBTOOL_TAGS
2799# ----------------
2800# Output comment and list of tags supported by the script
2801m4_defun([_LT_LIBTOOL_TAGS],
2802[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
2803available_tags="_LT_TAGS"dnl
2804])
2805
2806
2807# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
2808# -----------------------------------
2809# Extract the dictionary values for VARNAME (optionally with TAG) and
2810# expand to a commented shell variable setting:
2811#
2812#    # Some comment about what VAR is for.
2813#    visible_name=$lt_internal_name
2814m4_define([_LT_LIBTOOL_DECLARE],
2815[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
2816					   [description])))[]dnl
2817m4_pushdef([_libtool_name],
2818    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
2819m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
2820    [0], [_libtool_name=[$]$1],
2821    [1], [_libtool_name=$lt_[]$1],
2822    [2], [_libtool_name=$lt_[]$1],
2823    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
2824m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
2825])
2826
2827
2828# _LT_LIBTOOL_CONFIG_VARS
2829# -----------------------
2830# Produce commented declarations of non-tagged libtool config variables
2831# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
2832# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
2833# section) are produced by _LT_LIBTOOL_TAG_VARS.
2834m4_defun([_LT_LIBTOOL_CONFIG_VARS],
2835[m4_foreach([_lt_var],
2836    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
2837    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
2838
2839
2840# _LT_LIBTOOL_TAG_VARS(TAG)
2841# -------------------------
2842m4_define([_LT_LIBTOOL_TAG_VARS],
2843[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
2844    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
2845
2846
2847# _LT_TAGVAR(VARNAME, [TAGNAME])
2848# ------------------------------
2849m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
2850
2851
2852# _LT_CONFIG_COMMANDS
2853# -------------------
2854# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
2855# variables for single and double quote escaping we saved from calls
2856# to _LT_DECL, we can put quote escaped variables declarations
2857# into `config.status', and then the shell code to quote escape them in
2858# for loops in `config.status'.  Finally, any additional code accumulated
2859# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
2860m4_defun([_LT_CONFIG_COMMANDS],
2861[AC_PROVIDE_IFELSE([LT_OUTPUT],
2862	dnl If the libtool generation code has been placed in $CONFIG_LT,
2863	dnl instead of duplicating it all over again into config.status,
2864	dnl then we will have config.status run $CONFIG_LT later, so it
2865	dnl needs to know what name is stored there:
2866        [AC_CONFIG_COMMANDS([libtool],
2867            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
2868    dnl If the libtool generation code is destined for config.status,
2869    dnl expand the accumulated commands and init code now:
2870    [AC_CONFIG_COMMANDS([libtool],
2871        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
2872])#_LT_CONFIG_COMMANDS
2873
2874
2875# Initialize.
2876m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
2877[
2878
2879# The HP-UX ksh and POSIX shell print the target directory to stdout
2880# if CDPATH is set.
2881(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
2882
2883sed_quote_subst='$sed_quote_subst'
2884double_quote_subst='$double_quote_subst'
2885delay_variable_subst='$delay_variable_subst'
2886_LT_CONFIG_STATUS_DECLARATIONS
2887LTCC='$LTCC'
2888LTCFLAGS='$LTCFLAGS'
2889compiler='$compiler_DEFAULT'
2890
2891# A function that is used when there is no print builtin or printf.
2892func_fallback_echo ()
2893{
2894  eval 'cat <<_LTECHO_EOF
2895\$[]1
2896_LTECHO_EOF'
2897}
2898
2899# Quote evaled strings.
2900for var in lt_decl_all_varnames([[ \
2901]], lt_decl_quote_varnames); do
2902    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
2903    *[[\\\\\\\`\\"\\\$]]*)
2904      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
2905      ;;
2906    *)
2907      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
2908      ;;
2909    esac
2910done
2911
2912# Double-quote double-evaled strings.
2913for var in lt_decl_all_varnames([[ \
2914]], lt_decl_dquote_varnames); do
2915    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
2916    *[[\\\\\\\`\\"\\\$]]*)
2917      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
2918      ;;
2919    *)
2920      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
2921      ;;
2922    esac
2923done
2924
2925_LT_OUTPUT_LIBTOOL_INIT
2926])
2927
2928# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
2929# ------------------------------------
2930# Generate a child script FILE with all initialization necessary to
2931# reuse the environment learned by the parent script, and make the
2932# file executable.  If COMMENT is supplied, it is inserted after the
2933# `#!' sequence but before initialization text begins.  After this
2934# macro, additional text can be appended to FILE to form the body of
2935# the child script.  The macro ends with non-zero status if the
2936# file could not be fully written (such as if the disk is full).
2937m4_ifdef([AS_INIT_GENERATED],
2938[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
2939[m4_defun([_LT_GENERATED_FILE_INIT],
2940[m4_require([AS_PREPARE])]dnl
2941[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
2942[lt_write_fail=0
2943cat >$1 <<_ASEOF || lt_write_fail=1
2944#! $SHELL
2945# Generated by $as_me.
2946$2
2947SHELL=\${CONFIG_SHELL-$SHELL}
2948export SHELL
2949_ASEOF
2950cat >>$1 <<\_ASEOF || lt_write_fail=1
2951AS_SHELL_SANITIZE
2952_AS_PREPARE
2953exec AS_MESSAGE_FD>&1
2954_ASEOF
2955test $lt_write_fail = 0 && chmod +x $1[]dnl
2956m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
2957
2958# LT_OUTPUT
2959# ---------
2960# This macro allows early generation of the libtool script (before
2961# AC_OUTPUT is called), incase it is used in configure for compilation
2962# tests.
2963AC_DEFUN([LT_OUTPUT],
2964[: ${CONFIG_LT=./config.lt}
2965AC_MSG_NOTICE([creating $CONFIG_LT])
2966_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
2967[# Run this file to recreate a libtool stub with the current configuration.])
2968
2969cat >>"$CONFIG_LT" <<\_LTEOF
2970lt_cl_silent=false
2971exec AS_MESSAGE_LOG_FD>>config.log
2972{
2973  echo
2974  AS_BOX([Running $as_me.])
2975} >&AS_MESSAGE_LOG_FD
2976
2977lt_cl_help="\
2978\`$as_me' creates a local libtool stub from the current configuration,
2979for use in further configure time tests before the real libtool is
2980generated.
2981
2982Usage: $[0] [[OPTIONS]]
2983
2984  -h, --help      print this help, then exit
2985  -V, --version   print version number, then exit
2986  -q, --quiet     do not print progress messages
2987  -d, --debug     don't remove temporary files
2988
2989Report bugs to <bug-libtool@gnu.org>."
2990
2991lt_cl_version="\
2992m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
2993m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
2994configured by $[0], generated by m4_PACKAGE_STRING.
2995
2996Copyright (C) 2010 Free Software Foundation, Inc.
2997This config.lt script is free software; the Free Software Foundation
2998gives unlimited permision to copy, distribute and modify it."
2999
3000while test $[#] != 0
3001do
3002  case $[1] in
3003    --version | --v* | -V )
3004      echo "$lt_cl_version"; exit 0 ;;
3005    --help | --h* | -h )
3006      echo "$lt_cl_help"; exit 0 ;;
3007    --debug | --d* | -d )
3008      debug=: ;;
3009    --quiet | --q* | --silent | --s* | -q )
3010      lt_cl_silent=: ;;
3011
3012    -*) AC_MSG_ERROR([unrecognized option: $[1]
3013Try \`$[0] --help' for more information.]) ;;
3014
3015    *) AC_MSG_ERROR([unrecognized argument: $[1]
3016Try \`$[0] --help' for more information.]) ;;
3017  esac
3018  shift
3019done
3020
3021if $lt_cl_silent; then
3022  exec AS_MESSAGE_FD>/dev/null
3023fi
3024_LTEOF
3025
3026cat >>"$CONFIG_LT" <<_LTEOF
3027_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
3028_LTEOF
3029
3030cat >>"$CONFIG_LT" <<\_LTEOF
3031AC_MSG_NOTICE([creating $ofile])
3032_LT_OUTPUT_LIBTOOL_COMMANDS
3033AS_EXIT(0)
3034_LTEOF
3035chmod +x "$CONFIG_LT"
3036
3037# configure is writing to config.log, but config.lt does its own redirection,
3038# appending to config.log, which fails on DOS, as config.log is still kept
3039# open by configure.  Here we exec the FD to /dev/null, effectively closing
3040# config.log, so it can be properly (re)opened and appended to by config.lt.
3041lt_cl_success=:
3042test "$silent" = yes &&
3043  lt_config_lt_args="$lt_config_lt_args --quiet"
3044exec AS_MESSAGE_LOG_FD>/dev/null
3045$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
3046exec AS_MESSAGE_LOG_FD>>config.log
3047$lt_cl_success || AS_EXIT(1)
3048])# LT_OUTPUT
3049
3050
3051# _LT_CONFIG(TAG)
3052# ---------------
3053# If TAG is the built-in tag, create an initial libtool script with a
3054# default configuration from the untagged config vars.  Otherwise add code
3055# to config.status for appending the configuration named by TAG from the
3056# matching tagged config vars.
3057m4_defun([_LT_CONFIG],
3058[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3059_LT_CONFIG_SAVE_COMMANDS([
3060  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
3061  m4_if(_LT_TAG, [C], [
3062    # See if we are running on zsh, and set the options which allow our
3063    # commands through without removal of \ escapes.
3064    if test -n "${ZSH_VERSION+set}" ; then
3065      setopt NO_GLOB_SUBST
3066    fi
3067
3068    cfgfile="${ofile}T"
3069    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
3070    $RM "$cfgfile"
3071
3072    cat <<_LT_EOF >> "$cfgfile"
3073#! $SHELL
3074
3075# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
3076# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
3077# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3078# NOTE: Changes made to this file will be lost: look at ltmain.sh.
3079#
3080_LT_COPYING
3081_LT_LIBTOOL_TAGS
3082
3083# ### BEGIN LIBTOOL CONFIG
3084_LT_LIBTOOL_CONFIG_VARS
3085_LT_LIBTOOL_TAG_VARS
3086# ### END LIBTOOL CONFIG
3087
3088_LT_EOF
3089
3090  case $host_os in
3091  aix3*)
3092    cat <<\_LT_EOF >> "$cfgfile"
3093# AIX sometimes has problems with the GCC collect2 program.  For some
3094# reason, if we set the COLLECT_NAMES environment variable, the problems
3095# vanish in a puff of smoke.
3096if test "X${COLLECT_NAMES+set}" != Xset; then
3097  COLLECT_NAMES=
3098  export COLLECT_NAMES
3099fi
3100_LT_EOF
3101    ;;
3102  esac
3103
3104  _LT_PROG_LTMAIN
3105
3106  # We use sed instead of cat because bash on DJGPP gets confused if
3107  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
3108  # text mode, it properly converts lines to CR/LF.  This bash problem
3109  # is reportedly fixed, but why not run on old versions too?
3110  sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
3111    || (rm -f "$cfgfile"; exit 1)
3112
3113  _LT_PROG_XSI_SHELLFNS
3114
3115  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
3116    || (rm -f "$cfgfile"; exit 1)
3117
3118  mv -f "$cfgfile" "$ofile" ||
3119    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
3120  chmod +x "$ofile"
3121],
3122[cat <<_LT_EOF >> "$ofile"
3123
3124dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
3125dnl in a comment (ie after a #).
3126# ### BEGIN LIBTOOL TAG CONFIG: $1
3127_LT_LIBTOOL_TAG_VARS(_LT_TAG)
3128# ### END LIBTOOL TAG CONFIG: $1
3129_LT_EOF
3130])dnl /m4_if
3131],
3132[m4_if([$1], [], [
3133    PACKAGE='$PACKAGE'
3134    VERSION='$VERSION'
3135    TIMESTAMP='$TIMESTAMP'
3136    RM='$RM'
3137    ofile='$ofile'], [])
3138])dnl /_LT_CONFIG_SAVE_COMMANDS
3139])# _LT_CONFIG
3140
3141
3142# LT_SUPPORTED_TAG(TAG)
3143# ---------------------
3144# Trace this macro to discover what tags are supported by the libtool
3145# --tag option, using:
3146#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
3147AC_DEFUN([LT_SUPPORTED_TAG], [])
3148
3149
3150# C support is built-in for now
3151m4_define([_LT_LANG_C_enabled], [])
3152m4_define([_LT_TAGS], [])
3153
3154
3155# LT_LANG(LANG)
3156# -------------
3157# Enable libtool support for the given language if not already enabled.
3158AC_DEFUN([LT_LANG],
3159[AC_BEFORE([$0], [LT_OUTPUT])dnl
3160m4_case([$1],
3161  [C],			[_LT_LANG(C)],
3162  [C++],		[_LT_LANG(CXX)],
3163  [Java],		[_LT_LANG(GCJ)],
3164  [Fortran 77],		[_LT_LANG(F77)],
3165  [Fortran],		[_LT_LANG(FC)],
3166  [Windows Resource],	[_LT_LANG(RC)],
3167  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
3168    [_LT_LANG($1)],
3169    [m4_fatal([$0: unsupported language: "$1"])])])dnl
3170])# LT_LANG
3171
3172
3173# _LT_LANG(LANGNAME)
3174# ------------------
3175m4_defun([_LT_LANG],
3176[m4_ifdef([_LT_LANG_]$1[_enabled], [],
3177  [LT_SUPPORTED_TAG([$1])dnl
3178  m4_append([_LT_TAGS], [$1 ])dnl
3179  m4_define([_LT_LANG_]$1[_enabled], [])dnl
3180  _LT_LANG_$1_CONFIG($1)])dnl
3181])# _LT_LANG
3182
3183
3184# _LT_LANG_DEFAULT_CONFIG
3185# -----------------------
3186m4_defun([_LT_LANG_DEFAULT_CONFIG],
3187[AC_PROVIDE_IFELSE([AC_PROG_CXX],
3188  [LT_LANG(CXX)],
3189  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
3190
3191AC_PROVIDE_IFELSE([AC_PROG_F77],
3192  [LT_LANG(F77)],
3193  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
3194
3195AC_PROVIDE_IFELSE([AC_PROG_FC],
3196  [LT_LANG(FC)],
3197  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
3198
3199dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
3200dnl pulling things in needlessly.
3201AC_PROVIDE_IFELSE([AC_PROG_GCJ],
3202  [LT_LANG(GCJ)],
3203  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
3204    [LT_LANG(GCJ)],
3205    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
3206      [LT_LANG(GCJ)],
3207      [m4_ifdef([AC_PROG_GCJ],
3208	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
3209       m4_ifdef([A][M_PROG_GCJ],
3210	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
3211       m4_ifdef([LT_PROG_GCJ],
3212	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
3213
3214AC_PROVIDE_IFELSE([LT_PROG_RC],
3215  [LT_LANG(RC)],
3216  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
3217])# _LT_LANG_DEFAULT_CONFIG
3218
3219# Obsolete macros:
3220AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
3221AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
3222AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
3223AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
3224AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
3225dnl aclocal-1.4 backwards compatibility:
3226dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
3227dnl AC_DEFUN([AC_LIBTOOL_F77], [])
3228dnl AC_DEFUN([AC_LIBTOOL_FC], [])
3229dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
3230dnl AC_DEFUN([AC_LIBTOOL_RC], [])
3231
3232
3233# _LT_TAG_COMPILER
3234# ----------------
3235m4_defun([_LT_TAG_COMPILER],
3236[AC_REQUIRE([AC_PROG_CC])dnl
3237
3238_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
3239_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
3240_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
3241_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
3242
3243# If no C compiler was specified, use CC.
3244LTCC=${LTCC-"$CC"}
3245
3246# If no C compiler flags were specified, use CFLAGS.
3247LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
3248
3249# Allow CC to be a program name with arguments.
3250compiler=$CC
3251])# _LT_TAG_COMPILER
3252
3253
3254# _LT_COMPILER_BOILERPLATE
3255# ------------------------
3256# Check for compiler boilerplate output or warnings with
3257# the simple compiler test code.
3258m4_defun([_LT_COMPILER_BOILERPLATE],
3259[m4_require([_LT_DECL_SED])dnl
3260ac_outfile=conftest.$ac_objext
3261echo "$lt_simple_compile_test_code" >conftest.$ac_ext
3262eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
3263_lt_compiler_boilerplate=`cat conftest.err`
3264$RM conftest*
3265])# _LT_COMPILER_BOILERPLATE
3266
3267
3268# _LT_LINKER_BOILERPLATE
3269# ----------------------
3270# Check for linker boilerplate output or warnings with
3271# the simple link test code.
3272m4_defun([_LT_LINKER_BOILERPLATE],
3273[m4_require([_LT_DECL_SED])dnl
3274ac_outfile=conftest.$ac_objext
3275echo "$lt_simple_link_test_code" >conftest.$ac_ext
3276eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
3277_lt_linker_boilerplate=`cat conftest.err`
3278$RM -r conftest*
3279])# _LT_LINKER_BOILERPLATE
3280
3281# _LT_REQUIRED_DARWIN_CHECKS
3282# -------------------------
3283m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
3284  case $host_os in
3285    rhapsody* | darwin*)
3286    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
3287    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
3288    AC_CHECK_TOOL([LIPO], [lipo], [:])
3289    AC_CHECK_TOOL([OTOOL], [otool], [:])
3290    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
3291    _LT_DECL([], [DSYMUTIL], [1],
3292      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
3293    _LT_DECL([], [NMEDIT], [1],
3294      [Tool to change global to local symbols on Mac OS X])
3295    _LT_DECL([], [LIPO], [1],
3296      [Tool to manipulate fat objects and archives on Mac OS X])
3297    _LT_DECL([], [OTOOL], [1],
3298      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
3299    _LT_DECL([], [OTOOL64], [1],
3300      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
3301
3302    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
3303      [lt_cv_apple_cc_single_mod=no
3304      if test -z "${LT_MULTI_MODULE}"; then
3305	# By default we will add the -single_module flag. You can override
3306	# by either setting the environment variable LT_MULTI_MODULE
3307	# non-empty at configure time, or by adding -multi_module to the
3308	# link flags.
3309	rm -rf libconftest.dylib*
3310	echo "int foo(void){return 1;}" > conftest.c
3311	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
3312-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
3313	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
3314	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
3315        _lt_result=$?
3316	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
3317	  lt_cv_apple_cc_single_mod=yes
3318	else
3319	  cat conftest.err >&AS_MESSAGE_LOG_FD
3320	fi
3321	rm -rf libconftest.dylib*
3322	rm -f conftest.*
3323      fi])
3324    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
3325      [lt_cv_ld_exported_symbols_list],
3326      [lt_cv_ld_exported_symbols_list=no
3327      save_LDFLAGS=$LDFLAGS
3328      echo "_main" > conftest.sym
3329      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
3330      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
3331	[lt_cv_ld_exported_symbols_list=yes],
3332	[lt_cv_ld_exported_symbols_list=no])
3333	LDFLAGS="$save_LDFLAGS"
3334    ])
3335    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
3336      [lt_cv_ld_force_load=no
3337      cat > conftest.c << _LT_EOF
3338int forced_loaded() { return 2;}
3339_LT_EOF
3340      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
3341      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
3342      echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
3343      $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
3344      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
3345      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
3346      cat > conftest.c << _LT_EOF
3347int main() { return 0;}
3348_LT_EOF
3349      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
3350      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
3351      _lt_result=$?
3352      if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
3353	lt_cv_ld_force_load=yes
3354      else
3355	cat conftest.err >&AS_MESSAGE_LOG_FD
3356      fi
3357        rm -f conftest.err libconftest.a conftest conftest.c
3358        rm -rf conftest.dSYM
3359    ])
3360    case $host_os in
3361    rhapsody* | darwin1.[[012]])
3362      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
3363    darwin1.*)
3364      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
3365    darwin*) # darwin 5.x on
3366      # if running on 10.5 or later, the deployment target defaults
3367      # to the OS version, if on x86, and 10.4, the deployment
3368      # target defaults to 10.4. Don't you love it?
3369      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
3370	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
3371	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
3372	10.[[012]]*)
3373	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
3374	10.*)
3375	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
3376      esac
3377    ;;
3378  esac
3379    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
3380      _lt_dar_single_mod='$single_module'
3381    fi
3382    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
3383      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
3384    else
3385      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
3386    fi
3387    if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
3388      _lt_dsymutil='~$DSYMUTIL $lib || :'
3389    else
3390      _lt_dsymutil=
3391    fi
3392    ;;
3393  esac
3394])
3395
3396
3397# _LT_DARWIN_LINKER_FEATURES
3398# --------------------------
3399# Checks for linker and compiler features on darwin
3400m4_defun([_LT_DARWIN_LINKER_FEATURES],
3401[
3402  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
3403  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
3404  _LT_TAGVAR(hardcode_direct, $1)=no
3405  _LT_TAGVAR(hardcode_automatic, $1)=yes
3406  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3407  if test "$lt_cv_ld_force_load" = "yes"; then
3408    _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\"`'
3409  else
3410    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
3411  fi
3412  _LT_TAGVAR(link_all_deplibs, $1)=yes
3413  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
3414  case $cc_basename in
3415     ifort*) _lt_dar_can_shared=yes ;;
3416     *) _lt_dar_can_shared=$GCC ;;
3417  esac
3418  if test "$_lt_dar_can_shared" = "yes"; then
3419    output_verbose_link_cmd=func_echo_all
3420    _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}"
3421    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
3422    _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}"
3423    _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}"
3424    m4_if([$1], [CXX],
3425[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
3426      _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}"
3427      _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}"
3428    fi
3429],[])
3430  else
3431  _LT_TAGVAR(ld_shlibs, $1)=no
3432  fi
3433])
3434
3435# _LT_SYS_MODULE_PATH_AIX
3436# -----------------------
3437# Links a minimal program and checks the executable
3438# for the system default hardcoded library path. In most cases,
3439# this is /usr/lib:/lib, but when the MPI compilers are used
3440# the location of the communication and MPI libs are included too.
3441# If we don't find anything, use the default library path according
3442# to the aix ld manual.
3443m4_defun([_LT_SYS_MODULE_PATH_AIX],
3444[m4_require([_LT_DECL_SED])dnl
3445AC_LINK_IFELSE(AC_LANG_PROGRAM,[
3446lt_aix_libpath_sed='
3447    /Import File Strings/,/^$/ {
3448	/^0/ {
3449	    s/^0  *\(.*\)$/\1/
3450	    p
3451	}
3452    }'
3453aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
3454# Check for a 64-bit object if we didn't find anything.
3455if test -z "$aix_libpath"; then
3456  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
3457fi],[])
3458if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
3459])# _LT_SYS_MODULE_PATH_AIX
3460
3461
3462# _LT_SHELL_INIT(ARG)
3463# -------------------
3464m4_define([_LT_SHELL_INIT],
3465[m4_divert_text([M4SH-INIT], [$1
3466])])# _LT_SHELL_INIT
3467
3468
3469
3470# _LT_PROG_ECHO_BACKSLASH
3471# -----------------------
3472# Find how we can fake an echo command that does not interpret backslash.
3473# In particular, with Autoconf 2.60 or later we add some code to the start
3474# of the generated configure script which will find a shell with a builtin
3475# printf (which we can use as an echo command).
3476m4_defun([_LT_PROG_ECHO_BACKSLASH],
3477[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
3478ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
3479ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
3480
3481AC_MSG_CHECKING([how to print strings])
3482# Test print first, because it will be a builtin if present.
3483if test "X`print -r -- -n 2>/dev/null`" = X-n && \
3484   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
3485  ECHO='print -r --'
3486elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
3487  ECHO='printf %s\n'
3488else
3489  # Use this function as a fallback that always works.
3490  func_fallback_echo ()
3491  {
3492    eval 'cat <<_LTECHO_EOF
3493$[]1
3494_LTECHO_EOF'
3495  }
3496  ECHO='func_fallback_echo'
3497fi
3498
3499# func_echo_all arg...
3500# Invoke $ECHO with all args, space-separated.
3501func_echo_all ()
3502{
3503    $ECHO "$*" 
3504}
3505
3506case "$ECHO" in
3507  printf*) AC_MSG_RESULT([printf]) ;;
3508  print*) AC_MSG_RESULT([print -r]) ;;
3509  *) AC_MSG_RESULT([cat]) ;;
3510esac
3511
3512m4_ifdef([_AS_DETECT_SUGGESTED],
3513[_AS_DETECT_SUGGESTED([
3514  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
3515    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
3516    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
3517    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
3518    PATH=/empty FPATH=/empty; export PATH FPATH
3519    test "X`printf %s $ECHO`" = "X$ECHO" \
3520      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
3521
3522_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
3523_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
3524])# _LT_PROG_ECHO_BACKSLASH
3525
3526
3527# _LT_ENABLE_LOCK
3528# ---------------
3529m4_defun([_LT_ENABLE_LOCK],
3530[AC_ARG_ENABLE([libtool-lock],
3531  [AS_HELP_STRING([--disable-libtool-lock],
3532    [avoid locking (might break parallel builds)])])
3533test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
3534
3535# Some flags need to be propagated to the compiler or linker for good
3536# libtool support.
3537case $host in
3538ia64-*-hpux*)
3539  # Find out which ABI we are using.
3540  echo 'int i;' > conftest.$ac_ext
3541  if AC_TRY_EVAL(ac_compile); then
3542    case `/usr/bin/file conftest.$ac_objext` in
3543      *ELF-32*)
3544	HPUX_IA64_MODE="32"
3545	;;
3546      *ELF-64*)
3547	HPUX_IA64_MODE="64"
3548	;;
3549    esac
3550  fi
3551  rm -rf conftest*
3552  ;;
3553*-*-irix6*)
3554  # Find out which ABI we are using.
3555  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
3556  if AC_TRY_EVAL(ac_compile); then
3557    if test "$lt_cv_prog_gnu_ld" = yes; then
3558      case `/usr/bin/file conftest.$ac_objext` in
3559	*32-bit*)
3560	  LD="${LD-ld} -melf32bsmip"
3561	  ;;
3562	*N32*)
3563	  LD="${LD-ld} -melf32bmipn32"
3564	  ;;
3565	*64-bit*)
3566	  LD="${LD-ld} -melf64bmip"
3567	;;
3568      esac
3569    else
3570      case `/usr/bin/file conftest.$ac_objext` in
3571	*32-bit*)
3572	  LD="${LD-ld} -32"
3573	  ;;
3574	*N32*)
3575	  LD="${LD-ld} -n32"
3576	  ;;
3577	*64-bit*)
3578	  LD="${LD-ld} -64"
3579	  ;;
3580      esac
3581    fi
3582  fi
3583  rm -rf conftest*
3584  ;;
3585
3586x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
3587s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
3588  # Find out which ABI we are using.
3589  echo 'int i;' > conftest.$ac_ext
3590  if AC_TRY_EVAL(ac_compile); then
3591    case `/usr/bin/file conftest.o` in
3592      *32-bit*)
3593	case $host in
3594	  x86_64-*kfreebsd*-gnu)
3595	    LD="${LD-ld} -m elf_i386_fbsd"
3596	    ;;
3597	  x86_64-*linux*)
3598	    LD="${LD-ld} -m elf_i386"
3599	    ;;
3600	  ppc64-*linux*|powerpc64-*linux*)
3601	    LD="${LD-ld} -m elf32ppclinux"
3602	    ;;
3603	  s390x-*linux*)
3604	    LD="${LD-ld} -m elf_s390"
3605	    ;;
3606	  sparc64-*linux*)
3607	    LD="${LD-ld} -m elf32_sparc"
3608	    ;;
3609	esac
3610	;;
3611      *64-bit*)
3612	case $host in
3613	  x86_64-*kfreebsd*-gnu)
3614	    LD="${LD-ld} -m elf_x86_64_fbsd"
3615	    ;;
3616	  x86_64-*linux*)
3617	    LD="${LD-ld} -m elf_x86_64"
3618	    ;;
3619	  ppc*-*linux*|powerpc*-*linux*)
3620	    LD="${LD-ld} -m elf64ppc"
3621	    ;;
3622	  s390*-*linux*|s390*-*tpf*)
3623	    LD="${LD-ld} -m elf64_s390"
3624	    ;;
3625	  sparc*-*linux*)
3626	    LD="${LD-ld} -m elf64_sparc"
3627	    ;;
3628	esac
3629	;;
3630    esac
3631  fi
3632  rm -rf conftest*
3633  ;;
3634
3635*-*-sco3.2v5*)
3636  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3637  SAVE_CFLAGS="$CFLAGS"
3638  CFLAGS="$CFLAGS -belf"
3639  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
3640    [AC_LANG_PUSH(C)
3641     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
3642     AC_LANG_POP])
3643  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3644    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3645    CFLAGS="$SAVE_CFLAGS"
3646  fi
3647  ;;
3648sparc*-*solaris*)
3649  # Find out which ABI we are using.
3650  echo 'int i;' > conftest.$ac_ext
3651  if AC_TRY_EVAL(ac_compile); then
3652    case `/usr/bin/file conftest.o` in
3653    *64-bit*)
3654      case $lt_cv_prog_gnu_ld in
3655      yes*) LD="${LD-ld} -m elf64_sparc" ;;
3656      *)
3657	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
3658	  LD="${LD-ld} -64"
3659	fi
3660	;;
3661      esac
3662      ;;
3663    esac
3664  fi
3665  rm -rf conftest*
3666  ;;
3667esac
3668
3669need_locks="$enable_libtool_lock"
3670])# _LT_ENABLE_LOCK
3671
3672
3673# _LT_CMD_OLD_ARCHIVE
3674# -------------------
3675m4_defun([_LT_CMD_OLD_ARCHIVE],
3676[AC_CHECK_TOOL(AR, ar, false)
3677test -z "$AR" && AR=ar
3678test -z "$AR_FLAGS" && AR_FLAGS=cru
3679_LT_DECL([], [AR], [1], [The archiver])
3680_LT_DECL([], [AR_FLAGS], [1])
3681
3682AC_CHECK_TOOL(STRIP, strip, :)
3683test -z "$STRIP" && STRIP=:
3684_LT_DECL([], [STRIP], [1], [A symbol stripping program])
3685
3686AC_CHECK_TOOL(RANLIB, ranlib, :)
3687test -z "$RANLIB" && RANLIB=:
3688_LT_DECL([], [RANLIB], [1],
3689    [Commands used to install an old-style archive])
3690
3691# Determine commands to create old-style static archives.
3692old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
3693old_postinstall_cmds='chmod 644 $oldlib'
3694old_postuninstall_cmds=
3695
3696if test -n "$RANLIB"; then
3697  case $host_os in
3698  openbsd*)
3699    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
3700    ;;
3701  *)
3702    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
3703    ;;
3704  esac
3705  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
3706fi
3707
3708case $host_os in
3709  darwin*)
3710    lock_old_archive_extraction=yes ;;
3711  *)
3712    lock_old_archive_extraction=no ;;
3713esac
3714_LT_DECL([], [old_postinstall_cmds], [2])
3715_LT_DECL([], [old_postuninstall_cmds], [2])
3716_LT_TAGDECL([], [old_archive_cmds], [2],
3717    [Commands used to build an old-style archive])
3718_LT_DECL([], [lock_old_archive_extraction], [0],
3719    [Whether to use a lock for old archive extraction])
3720])# _LT_CMD_OLD_ARCHIVE
3721
3722
3723# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
3724#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
3725# ----------------------------------------------------------------
3726# Check whether the given compiler option works
3727AC_DEFUN([_LT_COMPILER_OPTION],
3728[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3729m4_require([_LT_DECL_SED])dnl
3730AC_CACHE_CHECK([$1], [$2],
3731  [$2=no
3732   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
3733   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
3734   lt_compiler_flag="$3"
3735   # Insert the option either (1) after the last *FLAGS variable, or
3736   # (2) before a word containing "conftest.", or (3) at the end.
3737   # Note that $ac_compile itself does not contain backslashes and begins
3738   # with a dollar sign (not a hyphen), so the echo should work correctly.
3739   # The option is referenced via a variable to avoid confusing sed.
3740   lt_compile=`echo "$ac_compile" | $SED \
3741   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
3742   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
3743   -e 's:$: $lt_compiler_flag:'`
3744   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
3745   (eval "$lt_compile" 2>conftest.err)
3746   ac_status=$?
3747   cat conftest.err >&AS_MESSAGE_LOG_FD
3748   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
3749   if (exit $ac_status) && test -s "$ac_outfile"; then
3750     # The compiler can only warn and ignore the option if not recognized
3751     # So say no if there are warnings other than the usual output.
3752     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
3753     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
3754     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
3755       $2=yes
3756     fi
3757   fi
3758   $RM conftest*
3759])
3760
3761if test x"[$]$2" = xyes; then
3762    m4_if([$5], , :, [$5])
3763else
3764    m4_if([$6], , :, [$6])
3765fi
3766])# _LT_COMPILER_OPTION
3767
3768# Old name:
3769AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
3770dnl aclocal-1.4 backwards compatibility:
3771dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
3772
3773
3774# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
3775#                  [ACTION-SUCCESS], [ACTION-FAILURE])
3776# ----------------------------------------------------
3777# Check whether the given linker option works
3778AC_DEFUN([_LT_LINKER_OPTION],
3779[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3780m4_require([_LT_DECL_SED])dnl
3781AC_CACHE_CHECK([$1], [$2],
3782  [$2=no
3783   save_LDFLAGS="$LDFLAGS"
3784   LDFLAGS="$LDFLAGS $3"
3785   echo "$lt_simple_link_test_code" > conftest.$ac_ext
3786   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
3787     # The linker can only warn and ignore the option if not recognized
3788     # So say no if there are warnings
3789     if test -s conftest.err; then
3790       # Append any errors to the config.log.
3791       cat conftest.err 1>&AS_MESSAGE_LOG_FD
3792       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
3793       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
3794       if diff conftest.exp conftest.er2 >/dev/null; then
3795         $2=yes
3796       fi
3797     else
3798       $2=yes
3799     fi
3800   fi
3801   $RM -r conftest*
3802   LDFLAGS="$save_LDFLAGS"
3803])
3804
3805if test x"[$]$2" = xyes; then
3806    m4_if([$4], , :, [$4])
3807else
3808    m4_if([$5], , :, [$5])
3809fi
3810])# _LT_LINKER_OPTION
3811
3812# Old name:
3813AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
3814dnl aclocal-1.4 backwards compatibility:
3815dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
3816
3817
3818# LT_CMD_MAX_LEN
3819#---------------
3820AC_DEFUN([LT_CMD_MAX_LEN],
3821[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3822# find the maximum length of command line arguments
3823AC_MSG_CHECKING([the maximum length of command line arguments])
3824AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
3825  i=0
3826  teststring="ABCD"
3827
3828  case $build_os in
3829  msdosdjgpp*)
3830    # On DJGPP, this test can blow up pretty badly due to problems in libc
3831    # (any single argument exceeding 2000 bytes causes a buffer overrun
3832    # during glob expansion).  Even if it were fixed, the result of this
3833    # check would be larger than it should be.
3834    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
3835    ;;
3836
3837  gnu*)
3838    # Under GNU Hurd, this test is not required because there is
3839    # no limit to the length of command line arguments.
3840    # Libtool will interpret -1 as no limit whatsoever
3841    lt_cv_sys_max_cmd_len=-1;
3842    ;;
3843
3844  cygwin* | mingw* | cegcc*)
3845    # On Win9x/ME, this test blows up -- it succeeds, but takes
3846    # about 5 minutes as the teststring grows exponentially.
3847    # Worse, since 9x/ME are not pre-emptively multitasking,
3848    # you end up with a "frozen" computer, even though with patience
3849    # the test eventually succeeds (with a max line length of 256k).
3850    # Instead, let's just punt: use the minimum linelength reported by
3851    # all of the supported platforms: 8192 (on NT/2K/XP).
3852    lt_cv_sys_max_cmd_len=8192;
3853    ;;
3854
3855  mint*)
3856    # On MiNT this can take a long time and run out of memory.
3857    lt_cv_sys_max_cmd_len=8192;
3858    ;;
3859
3860  amigaos*)
3861    # On AmigaOS with pdksh, this test takes hours, literally.
3862    # So we just punt and use a minimum line length of 8192.
3863    lt_cv_sys_max_cmd_len=8192;
3864    ;;
3865
3866  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
3867    # This has been around since 386BSD, at least.  Likely further.
3868    if test -x /sbin/sysctl; then
3869      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
3870    elif test -x /usr/sbin/sysctl; then
3871      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
3872    else
3873      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
3874    fi
3875    # And add a safety zone
3876    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
3877    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
3878    ;;
3879
3880  interix*)
3881    # We know the value 262144 and hardcode it with a safety zone (like BSD)
3882    lt_cv_sys_max_cmd_len=196608
3883    ;;
3884
3885  osf*)
3886    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
3887    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
3888    # nice to cause kernel panics so lets avoid the loop below.
3889    # First set a reasonable default.
3890    lt_cv_sys_max_cmd_len=16384
3891    #
3892    if test -x /sbin/sysconfig; then
3893      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
3894        *1*) lt_cv_sys_max_cmd_len=-1 ;;
3895      esac
3896    fi
3897    ;;
3898  sco3.2v5*)
3899    lt_cv_sys_max_cmd_len=102400
3900    ;;
3901  sysv5* | sco5v6* | sysv4.2uw2*)
3902    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
3903    if test -n "$kargmax"; then
3904      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
3905    else
3906      lt_cv_sys_max_cmd_len=32768
3907    fi
3908    ;;
3909  *)
3910    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
3911    if test -n "$lt_cv_sys_max_cmd_len"; then
3912      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
3913      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
3914    else
3915      # Make teststring a little bigger before we do anything with it.
3916      # a 1K string should be a reasonable start.
3917      for i in 1 2 3 4 5 6 7 8 ; do
3918        teststring=$teststring$teststring
3919      done
3920      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
3921      # If test is not a shell built-in, we'll probably end up computing a
3922      # maximum length that is only half of the actual maximum length, but
3923      # we can't tell.
3924      while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
3925	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
3926	      test $i != 17 # 1/2 MB should be enough
3927      do
3928        i=`expr $i + 1`
3929        teststring=$teststring$teststring
3930      done
3931      # Only check the string length outside the loop.
3932      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
3933      teststring=
3934      # Add a significant safety factor because C++ compilers can tack on
3935      # massive amounts of additional arguments before passing them to the
3936      # linker.  It appears as though 1/2 is a usable value.
3937      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
3938    fi
3939    ;;
3940  esac
3941])
3942if test -n $lt_cv_sys_max_cmd_len ; then
3943  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
3944else
3945  AC_MSG_RESULT(none)
3946fi
3947max_cmd_len=$lt_cv_sys_max_cmd_len
3948_LT_DECL([], [max_cmd_len], [0],
3949    [What is the maximum length of a command?])
3950])# LT_CMD_MAX_LEN
3951
3952# Old name:
3953AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
3954dnl aclocal-1.4 backwards compatibility:
3955dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
3956
3957
3958# _LT_HEADER_DLFCN
3959# ----------------
3960m4_defun([_LT_HEADER_DLFCN],
3961[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
3962])# _LT_HEADER_DLFCN
3963
3964
3965# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
3966#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
3967# ----------------------------------------------------------------
3968m4_defun([_LT_TRY_DLOPEN_SELF],
3969[m4_require([_LT_HEADER_DLFCN])dnl
3970if test "$cross_compiling" = yes; then :
3971  [$4]
3972else
3973  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
3974  lt_status=$lt_dlunknown
3975  cat > conftest.$ac_ext <<_LT_EOF
3976[#line $LINENO "configure"
3977#include "confdefs.h"
3978
3979#if HAVE_DLFCN_H
3980#include <dlfcn.h>
3981#endif
3982
3983#include <stdio.h>
3984
3985#ifdef RTLD_GLOBAL
3986#  define LT_DLGLOBAL		RTLD_GLOBAL
3987#else
3988#  ifdef DL_GLOBAL
3989#    define LT_DLGLOBAL		DL_GLOBAL
3990#  else
3991#    define LT_DLGLOBAL		0
3992#  endif
3993#endif
3994
3995/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
3996   find out it does not work in some platform. */
3997#ifndef LT_DLLAZY_OR_NOW
3998#  ifdef RTLD_LAZY
3999#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
4000#  else
4001#    ifdef DL_LAZY
4002#      define LT_DLLAZY_OR_NOW		DL_LAZY
4003#    else
4004#      ifdef RTLD_NOW
4005#        define LT_DLLAZY_OR_NOW	RTLD_NOW
4006#      else
4007#        ifdef DL_NOW
4008#          define LT_DLLAZY_OR_NOW	DL_NOW
4009#        else
4010#          define LT_DLLAZY_OR_NOW	0
4011#        endif
4012#      endif
4013#    endif
4014#  endif
4015#endif
4016
4017/* When -fvisbility=hidden is used, assume the code has been annotated
4018   correspondingly for the symbols needed.  */
4019#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
4020void fnord () __attribute__((visibility("default")));
4021#endif
4022
4023void fnord () { int i=42; }
4024int main ()
4025{
4026  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
4027  int status = $lt_dlunknown;
4028
4029  if (self)
4030    {
4031      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
4032      else
4033        {
4034	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
4035          else puts (dlerror ());
4036	}
4037      /* dlclose (self); */
4038    }
4039  else
4040    puts (dlerror ());
4041
4042  return status;
4043}]
4044_LT_EOF
4045  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
4046    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
4047    lt_status=$?
4048    case x$lt_status in
4049      x$lt_dlno_uscore) $1 ;;
4050      x$lt_dlneed_uscore) $2 ;;
4051      x$lt_dlunknown|x*) $3 ;;
4052    esac
4053  else :
4054    # compilation failed
4055    $3
4056  fi
4057fi
4058rm -fr conftest*
4059])# _LT_TRY_DLOPEN_SELF
4060
4061
4062# LT_SYS_DLOPEN_SELF
4063# ------------------
4064AC_DEFUN([LT_SYS_DLOPEN_SELF],
4065[m4_require([_LT_HEADER_DLFCN])dnl
4066if test "x$enable_dlopen" != xyes; then
4067  enable_dlopen=unknown
4068  enable_dlopen_self=unknown
4069  enable_dlopen_self_static=unknown
4070else
4071  lt_cv_dlopen=no
4072  lt_cv_dlopen_libs=
4073
4074  case $host_os in
4075  beos*)
4076    lt_cv_dlopen="load_add_on"
4077    lt_cv_dlopen_libs=
4078    lt_cv_dlopen_self=yes
4079    ;;
4080
4081  mingw* | pw32* | cegcc*)
4082    lt_cv_dlopen="LoadLibrary"
4083    lt_cv_dlopen_libs=
4084    ;;
4085
4086  cygwin*)
4087    lt_cv_dlopen="dlopen"
4088    lt_cv_dlopen_libs=
4089    ;;
4090
4091  darwin*)
4092  # if libdl is installed we need to link against it
4093    AC_CHECK_LIB([dl], [dlopen],
4094		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
4095    lt_cv_dlopen="dyld"
4096    lt_cv_dlopen_libs=
4097    lt_cv_dlopen_self=yes
4098    ])
4099    ;;
4100
4101  *)
4102    AC_CHECK_FUNC([shl_load],
4103	  [lt_cv_dlopen="shl_load"],
4104      [AC_CHECK_LIB([dld], [shl_load],
4105	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
4106	[AC_CHECK_FUNC([dlopen],
4107	      [lt_cv_dlopen="dlopen"],
4108	  [AC_CHECK_LIB([dl], [dlopen],
4109		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
4110	    [AC_CHECK_LIB([svld], [dlopen],
4111		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
4112	      [AC_CHECK_LIB([dld], [dld_link],
4113		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
4114	      ])
4115	    ])
4116	  ])
4117	])
4118      ])
4119    ;;
4120  esac
4121
4122  if test "x$lt_cv_dlopen" != xno; then
4123    enable_dlopen=yes
4124  else
4125    enable_dlopen=no
4126  fi
4127
4128  case $lt_cv_dlopen in
4129  dlopen)
4130    save_CPPFLAGS="$CPPFLAGS"
4131    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
4132
4133    save_LDFLAGS="$LDFLAGS"
4134    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
4135
4136    save_LIBS="$LIBS"
4137    LIBS="$lt_cv_dlopen_libs $LIBS"
4138
4139    AC_CACHE_CHECK([whether a program can dlopen itself],
4140	  lt_cv_dlopen_self, [dnl
4141	  _LT_TRY_DLOPEN_SELF(
4142	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
4143	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
4144    ])
4145
4146    if test "x$lt_cv_dlopen_self" = xyes; then
4147      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
4148      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
4149	  lt_cv_dlopen_self_static, [dnl
4150	  _LT_TRY_DLOPEN_SELF(
4151	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
4152	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
4153      ])
4154    fi
4155
4156    CPPFLAGS="$save_CPPFLAGS"
4157    LDFLAGS="$save_LDFLAGS"
4158    LIBS="$save_LIBS"
4159    ;;
4160  esac
4161
4162  case $lt_cv_dlopen_self in
4163  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
4164  *) enable_dlopen_self=unknown ;;
4165  esac
4166
4167  case $lt_cv_dlopen_self_static in
4168  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
4169  *) enable_dlopen_self_static=unknown ;;
4170  esac
4171fi
4172_LT_DECL([dlopen_support], [enable_dlopen], [0],
4173	 [Whether dlopen is supported])
4174_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
4175	 [Whether dlopen of programs is supported])
4176_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
4177	 [Whether dlopen of statically linked programs is supported])
4178])# LT_SYS_DLOPEN_SELF
4179
4180# Old name:
4181AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
4182dnl aclocal-1.4 backwards compatibility:
4183dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
4184
4185
4186# _LT_COMPILER_C_O([TAGNAME])
4187# ---------------------------
4188# Check to see if options -c and -o are simultaneously supported by compiler.
4189# This macro does not hard code the compiler like AC_PROG_CC_C_O.
4190m4_defun([_LT_COMPILER_C_O],
4191[m4_require([_LT_DECL_SED])dnl
4192m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4193m4_require([_LT_TAG_COMPILER])dnl
4194AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
4195  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
4196  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
4197   $RM -r conftest 2>/dev/null
4198   mkdir conftest
4199   cd conftest
4200   mkdir out
4201   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
4202
4203   lt_compiler_flag="-o out/conftest2.$ac_objext"
4204   # Insert the option either (1) after the last *FLAGS variable, or
4205   # (2) before a word containing "conftest.", or (3) at the end.
4206   # Note that $ac_compile itself does not contain backslashes and begins
4207   # with a dollar sign (not a hyphen), so the echo should work correctly.
4208   lt_compile=`echo "$ac_compile" | $SED \
4209   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
4210   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
4211   -e 's:$: $lt_compiler_flag:'`
4212   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
4213   (eval "$lt_compile" 2>out/conftest.err)
4214   ac_status=$?
4215   cat out/conftest.err >&AS_MESSAGE_LOG_FD
4216   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
4217   if (exit $ac_status) && test -s out/conftest2.$ac_objext
4218   then
4219     # The compiler can only warn and ignore the option if not recognized
4220     # So say no if there are warnings
4221     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
4222     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
4223     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
4224       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
4225     fi
4226   fi
4227   chmod u+w . 2>&AS_MESSAGE_LOG_FD
4228   $RM conftest*
4229   # SGI C++ compiler will create directory out/ii_files/ for
4230   # template instantiation
4231   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
4232   $RM out/* && rmdir out
4233   cd ..
4234   $RM -r conftest
4235   $RM conftest*
4236])
4237_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
4238	[Does compiler simultaneously support -c and -o options?])
4239])# _LT_COMPILER_C_O
4240
4241
4242# _LT_COMPILER_FILE_LOCKS([TAGNAME])
4243# ----------------------------------
4244# Check to see if we can do hard links to lock some files if needed
4245m4_defun([_LT_COMPILER_FILE_LOCKS],
4246[m4_require([_LT_ENABLE_LOCK])dnl
4247m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4248_LT_COMPILER_C_O([$1])
4249
4250hard_links="nottested"
4251if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
4252  # do not overwrite the value of need_locks provided by the user
4253  AC_MSG_CHECKING([if we can lock with hard links])
4254  hard_links=yes
4255  $RM conftest*
4256  ln conftest.a conftest.b 2>/dev/null && hard_links=no
4257  touch conftest.a
4258  ln conftest.a conftest.b 2>&5 || hard_links=no
4259  ln conftest.a conftest.b 2>/dev/null && hard_links=no
4260  AC_MSG_RESULT([$hard_links])
4261  if test "$hard_links" = no; then
4262    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
4263    need_locks=warn
4264  fi
4265else
4266  need_locks=no
4267fi
4268_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
4269])# _LT_COMPILER_FILE_LOCKS
4270
4271
4272# _LT_CHECK_OBJDIR
4273# ----------------
4274m4_defun([_LT_CHECK_OBJDIR],
4275[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
4276[rm -f .libs 2>/dev/null
4277mkdir .libs 2>/dev/null
4278if test -d .libs; then
4279  lt_cv_objdir=.libs
4280else
4281  # MS-DOS does not allow filenames that begin with a dot.
4282  lt_cv_objdir=_libs
4283fi
4284rmdir .libs 2>/dev/null])
4285objdir=$lt_cv_objdir
4286_LT_DECL([], [objdir], [0],
4287         [The name of the directory that contains temporary libtool files])dnl
4288m4_pattern_allow([LT_OBJDIR])dnl
4289AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
4290  [Define to the sub-directory in which libtool stores uninstalled libraries.])
4291])# _LT_CHECK_OBJDIR
4292
4293
4294# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
4295# --------------------------------------
4296# Check hardcoding attributes.
4297m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
4298[AC_MSG_CHECKING([how to hardcode library paths into programs])
4299_LT_TAGVAR(hardcode_action, $1)=
4300if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
4301   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
4302   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
4303
4304  # We can hardcode non-existent directories.
4305  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
4306     # If the only mechanism to avoid hardcoding is shlibpath_var, we
4307     # have to relink, otherwise we might link with an installed library
4308     # when we should be linking with a yet-to-be-installed one
4309     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
4310     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
4311    # Linking always hardcodes the temporary library directory.
4312    _LT_TAGVAR(hardcode_action, $1)=relink
4313  else
4314    # We can link without hardcoding, and we can hardcode nonexisting dirs.
4315    _LT_TAGVAR(hardcode_action, $1)=immediate
4316  fi
4317else
4318  # We cannot hardcode anything, or else we can only hardcode existing
4319  # directories.
4320  _LT_TAGVAR(hardcode_action, $1)=unsupported
4321fi
4322AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
4323
4324if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
4325   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
4326  # Fast installation is not supported
4327  enable_fast_install=no
4328elif test "$shlibpath_overrides_runpath" = yes ||
4329     test "$enable_shared" = no; then
4330  # Fast installation is not necessary
4331  enable_fast_install=needless
4332fi
4333_LT_TAGDECL([], [hardcode_action], [0],
4334    [How to hardcode a shared library path into an executable])
4335])# _LT_LINKER_HARDCODE_LIBPATH
4336
4337
4338# _LT_CMD_STRIPLIB
4339# ----------------
4340m4_defun([_LT_CMD_STRIPLIB],
4341[m4_require([_LT_DECL_EGREP])
4342striplib=
4343old_striplib=
4344AC_MSG_CHECKING([whether stripping libraries is possible])
4345if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
4346  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
4347  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
4348  AC_MSG_RESULT([yes])
4349else
4350# FIXME - insert some real tests, host_os isn't really good enough
4351  case $host_os in
4352  darwin*)
4353    if test -n "$STRIP" ; then
4354      striplib="$STRIP -x"
4355      old_striplib="$STRIP -S"
4356      AC_MSG_RESULT([yes])
4357    else
4358      AC_MSG_RESULT([no])
4359    fi
4360    ;;
4361  *)
4362    AC_MSG_RESULT([no])
4363    ;;
4364  esac
4365fi
4366_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
4367_LT_DECL([], [striplib], [1])
4368])# _LT_CMD_STRIPLIB
4369
4370
4371# _LT_SYS_DYNAMIC_LINKER([TAG])
4372# -----------------------------
4373# PORTME Fill in your ld.so characteristics
4374m4_defun([_LT_SYS_DYNAMIC_LINKER],
4375[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4376m4_require([_LT_DECL_EGREP])dnl
4377m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4378m4_require([_LT_DECL_OBJDUMP])dnl
4379m4_require([_LT_DECL_SED])dnl
4380m4_require([_LT_CHECK_SHELL_FEATURES])dnl
4381AC_MSG_CHECKING([dynamic linker characteristics])
4382m4_if([$1],
4383	[], [
4384if test "$GCC" = yes; then
4385  case $host_os in
4386    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
4387    *) lt_awk_arg="/^libraries:/" ;;
4388  esac
4389  case $host_os in
4390    mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
4391    *) lt_sed_strip_eq="s,=/,/,g" ;;
4392  esac
4393  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
4394  case $lt_search_path_spec in
4395  *\;*)
4396    # if the path contains ";" then we assume it to be the separator
4397    # otherwise default to the standard path separator (i.e. ":") - it is
4398    # assumed that no part of a normal pathname contains ";" but that should
4399    # okay in the real world where ";" in dirpaths is itself problematic.
4400    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
4401    ;;
4402  *)
4403    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
4404    ;;
4405  esac
4406  # Ok, now we have the path, separated by spaces, we can step through it
4407  # and add multilib dir if necessary.
4408  lt_tmp_lt_search_path_spec=
4409  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
4410  for lt_sys_path in $lt_search_path_spec; do
4411    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
4412      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
4413    else
4414      test -d "$lt_sys_path" && \
4415	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
4416    fi
4417  done
4418  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
4419BEGIN {RS=" "; FS="/|\n";} {
4420  lt_foo="";
4421  lt_count=0;
4422  for (lt_i = NF; lt_i > 0; lt_i--) {
4423    if ($lt_i != "" && $lt_i != ".") {
4424      if ($lt_i == "..") {
4425        lt_count++;
4426      } else {
4427        if (lt_count == 0) {
4428          lt_foo="/" $lt_i lt_foo;
4429        } else {
4430          lt_count--;
4431        }
4432      }
4433    }
4434  }
4435  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
4436  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
4437}'`
4438  # AWK program above erroneously prepends '/' to C:/dos/paths
4439  # for these hosts.
4440  case $host_os in
4441    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
4442      $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
4443  esac
4444  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
4445else
4446  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
4447fi])
4448library_names_spec=
4449libname_spec='lib$name'
4450soname_spec=
4451shrext_cmds=".so"
4452postinstall_cmds=
4453postuninstall_cmds=
4454finish_cmds=
4455finish_eval=
4456shlibpath_var=
4457shlibpath_overrides_runpath=unknown
4458version_type=none
4459dynamic_linker="$host_os ld.so"
4460sys_lib_dlsearch_path_spec="/lib /usr/lib"
4461need_lib_prefix=unknown
4462hardcode_into_libs=no
4463
4464# when you set need_version to no, make sure it does not cause -set_version
4465# flags to be left without arguments
4466need_version=unknown
4467
4468case $host_os in
4469aix3*)
4470  version_type=linux
4471  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
4472  shlibpath_var=LIBPATH
4473
4474  # AIX 3 has no versioning support, so we append a major version to the name.
4475  soname_spec='${libname}${release}${shared_ext}$major'
4476  ;;
4477
4478aix[[4-9]]*)
4479  version_type=linux
4480  need_lib_prefix=no
4481  need_version=no
4482  hardcode_into_libs=yes
4483  if test "$host_cpu" = ia64; then
4484    # AIX 5 supports IA64
4485    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
4486    shlibpath_var=LD_LIBRARY_PATH
4487  else
4488    # With GCC up to 2.95.x, collect2 would create an import file
4489    # for dependence libraries.  The import file would start with
4490    # the line `#! .'.  This would cause the generated library to
4491    # depend on `.', always an invalid library.  This was fixed in
4492    # development snapshots of GCC prior to 3.0.
4493    case $host_os in
4494      aix4 | aix4.[[01]] | aix4.[[01]].*)
4495      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
4496	   echo ' yes '
4497	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
4498	:
4499      else
4500	can_build_shared=no
4501      fi
4502      ;;
4503    esac
4504    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
4505    # soname into executable. Probably we can add versioning support to
4506    # collect2, so additional links can be useful in future.
4507    if test "$aix_use_runtimelinking" = yes; then
4508      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
4509      # instead of lib<name>.a to let people know that these are not
4510      # typical AIX shared libraries.
4511      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4512    else
4513      # We preserve .a as extension for shared libraries through AIX4.2
4514      # and later when we are not doing run time linking.
4515      library_names_spec='${libname}${release}.a $libname.a'
4516      soname_spec='${libname}${release}${shared_ext}$major'
4517    fi
4518    shlibpath_var=LIBPATH
4519  fi
4520  ;;
4521
4522amigaos*)
4523  case $host_cpu in
4524  powerpc)
4525    # Since July 2007 AmigaOS4 officially supports .so libraries.
4526    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
4527    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4528    ;;
4529  m68k)
4530    library_names_spec='$libname.ixlibrary $libname.a'
4531    # Create ${libname}_ixlibrary.a entries in /sys/libs.
4532    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'
4533    ;;
4534  esac
4535  ;;
4536
4537beos*)
4538  library_names_spec='${libname}${shared_ext}'
4539  dynamic_linker="$host_os ld.so"
4540  shlibpath_var=LIBRARY_PATH
4541  ;;
4542
4543bsdi[[45]]*)
4544  version_type=linux
4545  need_version=no
4546  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4547  soname_spec='${libname}${release}${shared_ext}$major'
4548  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
4549  shlibpath_var=LD_LIBRARY_PATH
4550  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
4551  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
4552  # the default ld.so.conf also contains /usr/contrib/lib and
4553  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
4554  # libtool to hard-code these into programs
4555  ;;
4556
4557cygwin* | mingw* | pw32* | cegcc*)
4558  version_type=windows
4559  shrext_cmds=".dll"
4560  need_version=no
4561  need_lib_prefix=no
4562
4563  case $GCC,$host_os in
4564  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
4565    library_names_spec='$libname.dll.a'
4566    # DLL is installed to $(libdir)/../bin by postinstall_cmds
4567    postinstall_cmds='base_file=`basename \${file}`~
4568      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
4569      dldir=$destdir/`dirname \$dlpath`~
4570      test -d \$dldir || mkdir -p \$dldir~
4571      $install_prog $dir/$dlname \$dldir/$dlname~
4572      chmod a+x \$dldir/$dlname~
4573      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
4574        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
4575      fi'
4576    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
4577      dlpath=$dir/\$dldll~
4578       $RM \$dlpath'
4579    shlibpath_overrides_runpath=yes
4580
4581    case $host_os in
4582    cygwin*)
4583      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
4584      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
4585m4_if([$1], [],[
4586      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
4587      ;;
4588    mingw* | cegcc*)
4589      # MinGW DLLs use traditional 'lib' prefix
4590      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
4591      ;;
4592    pw32*)
4593      # pw32 DLLs use 'pw' prefix rather than 'lib'
4594      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
4595      ;;
4596    esac
4597    ;;
4598
4599  *)
4600    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
4601    ;;
4602  esac
4603  dynamic_linker='Win32 ld.exe'
4604  # FIXME: first we should search . and the directory the executable is in
4605  shlibpath_var=PATH
4606  ;;
4607
4608darwin* | rhapsody*)
4609  dynamic_linker="$host_os dyld"
4610  version_type=darwin
4611  need_lib_prefix=no
4612  need_version=no
4613  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
4614  soname_spec='${libname}${release}${major}$shared_ext'
4615  shlibpath_overrides_runpath=yes
4616  shlibpath_var=DYLD_LIBRARY_PATH
4617  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
4618m4_if([$1], [],[
4619  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
4620  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
4621  ;;
4622
4623dgux*)
4624  version_type=linux
4625  need_lib_prefix=no
4626  need_version=no
4627  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
4628  soname_spec='${libname}${release}${shared_ext}$major'
4629  shlibpath_var=LD_LIBRARY_PATH
4630  ;;
4631
4632freebsd1*)
4633  dynamic_linker=no
4634  ;;
4635
4636freebsd* | dragonfly*)
4637  # DragonFly does not have aout.  When/if they implement a new
4638  # versioning mechanism, adjust this.
4639  if test -x /usr/bin/objformat; then
4640    objformat=`/usr/bin/objformat`
4641  else
4642    case $host_os in
4643    freebsd[[123]]*) objformat=aout ;;
4644    *) objformat=elf ;;
4645    esac
4646  fi
4647  version_type=freebsd-$objformat
4648  case $version_type in
4649    freebsd-elf*)
4650      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
4651      need_version=no
4652      need_lib_prefix=no
4653      ;;
4654    freebsd-*)
4655      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
4656      need_version=yes
4657      ;;
4658  esac
4659  shlibpath_var=LD_LIBRARY_PATH
4660  case $host_os in
4661  freebsd2*)
4662    shlibpath_overrides_runpath=yes
4663    ;;
4664  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
4665    shlibpath_overrides_runpath=yes
4666    hardcode_into_libs=yes
4667    ;;
4668  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
4669  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
4670    shlibpath_overrides_runpath=no
4671    hardcode_into_libs=yes
4672    ;;
4673  *) # from 4.6 on, and DragonFly
4674    shlibpath_overrides_runpath=yes
4675    hardcode_into_libs=yes
4676    ;;
4677  esac
4678  ;;
4679
4680gnu*)
4681  version_type=linux
4682  need_lib_prefix=no
4683  need_version=no
4684  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
4685  soname_spec='${libname}${release}${shared_ext}$major'
4686  shlibpath_var=LD_LIBRARY_PATH
4687  hardcode_into_libs=yes
4688  ;;
4689
4690haiku*)
4691  version_type=linux
4692  need_lib_prefix=no
4693  need_version=no
4694  dynamic_linker="$host_os runtime_loader"
4695  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
4696  soname_spec='${libname}${release}${shared_ext}$major'
4697  shlibpath_var=LIBRARY_PATH
4698  shlibpath_overrides_runpath=yes
4699  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
4700  hardcode_into_libs=yes
4701  ;;
4702
4703hpux9* | hpux10* | hpux11*)
4704  # Give a soname corresponding to the major version so that dld.sl refuses to
4705  # link against other versions.
4706  version_type=sunos
4707  need_lib_prefix=no
4708  need_version=no
4709  case $host_cpu in
4710  ia64*)
4711    shrext_cmds='.so'
4712    hardcode_into_libs=yes
4713    dynamic_linker="$host_os dld.so"
4714    shlibpath_var=LD_LIBRARY_PATH
4715    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
4716    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4717    soname_spec='${libname}${release}${shared_ext}$major'
4718    if test "X$HPUX_IA64_MODE" = X32; then
4719      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
4720    else
4721      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
4722    fi
4723    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
4724    ;;
4725  hppa*64*)
4726    shrext_cmds='.sl'
4727    hardcode_into_libs=yes
4728    dynamic_linker="$host_os dld.sl"
4729    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
4730    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
4731    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4732    soname_spec='${libname}${release}${shared_ext}$major'
4733    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
4734    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
4735    ;;
4736  *)
4737    shrext_cmds='.sl'
4738    dynamic_linker="$host_os dld.sl"
4739    shlibpath_var=SHLIB_PATH
4740    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
4741    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4742    soname_spec='${libname}${release}${shared_ext}$major'
4743    ;;
4744  esac
4745  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
4746  postinstall_cmds='chmod 555 $lib'
4747  # or fails outright, so override atomically:
4748  install_override_mode=555
4749  ;;
4750
4751interix[[3-9]]*)
4752  version_type=linux
4753  need_lib_prefix=no
4754  need_version=no
4755  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
4756  soname_spec='${libname}${release}${shared_ext}$major'
4757  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
4758  shlibpath_var=LD_LIBRARY_PATH
4759  shlibpath_overrides_runpath=no
4760  hardcode_into_libs=yes
4761  ;;
4762
4763irix5* | irix6* | nonstopux*)
4764  case $host_os in
4765    nonstopux*) version_type=nonstopux ;;
4766    *)
4767	if test "$lt_cv_prog_gnu_ld" = yes; then
4768		version_type=linux
4769	else
4770		version_type=irix
4771	fi ;;
4772  esac
4773  need_lib_prefix=no
4774  need_version=no
4775  soname_spec='${libname}${release}${shared_ext}$major'
4776  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
4777  case $host_os in
4778  irix5* | nonstopux*)
4779    libsuff= shlibsuff=
4780    ;;
4781  *)
4782    case $LD in # libtool.m4 will add one of these switches to LD
4783    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
4784      libsuff= shlibsuff= libmagic=32-bit;;
4785    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
4786      libsuff=32 shlibsuff=N32 libmagic=N32;;
4787    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
4788      libsuff=64 shlibsuff=64 libmagic=64-bit;;
4789    *) libsuff= shlibsuff= libmagic=never-match;;
4790    esac
4791    ;;
4792  esac
4793  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
4794  shlibpath_overrides_runpath=no
4795  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
4796  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
4797  hardcode_into_libs=yes
4798  ;;
4799
4800# No shared lib support for Linux oldld, aout, or coff.
4801linux*oldld* | linux*aout* | linux*coff*)
4802  dynamic_linker=no
4803  ;;
4804
4805# This must be Linux ELF.
4806linux* | k*bsd*-gnu | kopensolaris*-gnu)
4807  version_type=linux
4808  need_lib_prefix=no
4809  need_version=no
4810  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4811  soname_spec='${libname}${release}${shared_ext}$major'
4812  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
4813  shlibpath_var=LD_LIBRARY_PATH
4814  shlibpath_overrides_runpath=no
4815
4816  # Some binutils ld are patched to set DT_RUNPATH
4817  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
4818    [lt_cv_shlibpath_overrides_runpath=no
4819    save_LDFLAGS=$LDFLAGS
4820    save_libdir=$libdir
4821    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
4822	 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
4823    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
4824      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
4825	 [lt_cv_shlibpath_overrides_runpath=yes])])
4826    LDFLAGS=$save_LDFLAGS
4827    libdir=$save_libdir
4828    ])
4829  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
4830
4831  # This implies no fast_install, which is unacceptable.
4832  # Some rework will be needed to allow for fast_install
4833  # before this can be enabled.
4834  hardcode_into_libs=yes
4835
4836  # Append ld.so.conf contents to the search path
4837  if test -f /etc/ld.so.conf; then
4838    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' ' '`
4839    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
4840  fi
4841
4842  # We used to test for /lib/ld.so.1 and disable shared libraries on
4843  # powerpc, because MkLinux only supported shared libraries with the
4844  # GNU dynamic linker.  Since this was broken with cross compilers,
4845  # most powerpc-linux boxes support dynamic linking these days and
4846  # people can always --disable-shared, the test was removed, and we
4847  # assume the GNU/Linux dynamic linker is in use.
4848  dynamic_linker='GNU/Linux ld.so'
4849  ;;
4850
4851netbsd*)
4852  version_type=sunos
4853  need_lib_prefix=no
4854  need_version=no
4855  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4856    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4857    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
4858    dynamic_linker='NetBSD (a.out) ld.so'
4859  else
4860    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
4861    soname_spec='${libname}${release}${shared_ext}$major'
4862    dynamic_linker='NetBSD ld.elf_so'
4863  fi
4864  shlibpath_var=LD_LIBRARY_PATH
4865  shlibpath_overrides_runpath=yes
4866  hardcode_into_libs=yes
4867  ;;
4868
4869newsos6)
4870  version_type=linux
4871  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4872  shlibpath_var=LD_LIBRARY_PATH
4873  shlibpath_overrides_runpath=yes
4874  ;;
4875
4876*nto* | *qnx*)
4877  version_type=qnx
4878  need_lib_prefix=no
4879  need_version=no
4880  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4881  soname_spec='${libname}${release}${shared_ext}$major'
4882  shlibpath_var=LD_LIBRARY_PATH
4883  shlibpath_overrides_runpath=no
4884  hardcode_into_libs=yes
4885  dynamic_linker='ldqnx.so'
4886  ;;
4887
4888openbsd*)
4889  version_type=sunos
4890  sys_lib_dlsearch_path_spec="/usr/lib"
4891  need_lib_prefix=no
4892  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
4893  case $host_os in
4894    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
4895    *)				need_version=no  ;;
4896  esac
4897  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4898  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
4899  shlibpath_var=LD_LIBRARY_PATH
4900  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4901    case $host_os in
4902      openbsd2.[[89]] | openbsd2.[[89]].*)
4903	shlibpath_overrides_runpath=no
4904	;;
4905      *)
4906	shlibpath_overrides_runpath=yes
4907	;;
4908      esac
4909  else
4910    shlibpath_overrides_runpath=yes
4911  fi
4912  ;;
4913
4914os2*)
4915  libname_spec='$name'
4916  shrext_cmds=".dll"
4917  need_lib_prefix=no
4918  library_names_spec='$libname${shared_ext} $libname.a'
4919  dynamic_linker='OS/2 ld.exe'
4920  shlibpath_var=LIBPATH
4921  ;;
4922
4923osf3* | osf4* | osf5*)
4924  version_type=osf
4925  need_lib_prefix=no
4926  need_version=no
4927  soname_spec='${libname}${release}${shared_ext}$major'
4928  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4929  shlibpath_var=LD_LIBRARY_PATH
4930  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
4931  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
4932  ;;
4933
4934rdos*)
4935  dynamic_linker=no
4936  ;;
4937
4938solaris*)
4939  version_type=linux
4940  need_lib_prefix=no
4941  need_version=no
4942  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4943  soname_spec='${libname}${release}${shared_ext}$major'
4944  shlibpath_var=LD_LIBRARY_PATH
4945  shlibpath_overrides_runpath=yes
4946  hardcode_into_libs=yes
4947  # ldd complains unless libraries are executable
4948  postinstall_cmds='chmod +x $lib'
4949  ;;
4950
4951sunos4*)
4952  version_type=sunos
4953  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4954  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
4955  shlibpath_var=LD_LIBRARY_PATH
4956  shlibpath_overrides_runpath=yes
4957  if test "$with_gnu_ld" = yes; then
4958    need_lib_prefix=no
4959  fi
4960  need_version=yes
4961  ;;
4962
4963sysv4 | sysv4.3*)
4964  version_type=linux
4965  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4966  soname_spec='${libname}${release}${shared_ext}$major'
4967  shlibpath_var=LD_LIBRARY_PATH
4968  case $host_vendor in
4969    sni)
4970      shlibpath_overrides_runpath=no
4971      need_lib_prefix=no
4972      runpath_var=LD_RUN_PATH
4973      ;;
4974    siemens)
4975      need_lib_prefix=no
4976      ;;
4977    motorola)
4978      need_lib_prefix=no
4979      need_version=no
4980      shlibpath_overrides_runpath=no
4981      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
4982      ;;
4983  esac
4984  ;;
4985
4986sysv4*MP*)
4987  if test -d /usr/nec ;then
4988    version_type=linux
4989    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
4990    soname_spec='$libname${shared_ext}.$major'
4991    shlibpath_var=LD_LIBRARY_PATH
4992  fi
4993  ;;
4994
4995sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4996  version_type=freebsd-elf
4997  need_lib_prefix=no
4998  need_version=no
4999  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
5000  soname_spec='${libname}${release}${shared_ext}$major'
5001  shlibpath_var=LD_LIBRARY_PATH
5002  shlibpath_overrides_runpath=yes
5003  hardcode_into_libs=yes
5004  if test "$with_gnu_ld" = yes; then
5005    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
5006  else
5007    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
5008    case $host_os in
5009      sco3.2v5*)
5010        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
5011	;;
5012    esac
5013  fi
5014  sys_lib_dlsearch_path_spec='/usr/lib'
5015  ;;
5016
5017tpf*)
5018  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
5019  version_type=linux
5020  need_lib_prefix=no
5021  need_version=no
5022  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
5023  shlibpath_var=LD_LIBRARY_PATH
5024  shlibpath_overrides_runpath=no
5025  hardcode_into_libs=yes
5026  ;;
5027
5028uts4*)
5029  version_type=linux
5030  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
5031  soname_spec='${libname}${release}${shared_ext}$major'
5032  shlibpath_var=LD_LIBRARY_PATH
5033  ;;
5034
5035*)
5036  dynamic_linker=no
5037  ;;
5038esac
5039AC_MSG_RESULT([$dynamic_linker])
5040test "$dynamic_linker" = no && can_build_shared=no
5041
5042variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
5043if test "$GCC" = yes; then
5044  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
5045fi
5046
5047if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
5048  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
5049fi
5050if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
5051  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
5052fi
5053
5054_LT_DECL([], [variables_saved_for_relink], [1],
5055    [Variables whose values should be saved in libtool wrapper scripts and
5056    restored at link time])
5057_LT_DECL([], [need_lib_prefix], [0],
5058    [Do we need the "lib" prefix for modules?])
5059_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
5060_LT_DECL([], [version_type], [0], [Library versioning type])
5061_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
5062_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
5063_LT_DECL([], [shlibpath_overrides_runpath], [0],
5064    [Is shlibpath searched before the hard-coded library search path?])
5065_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
5066_LT_DECL([], [library_names_spec], [1],
5067    [[List of archive names.  First name is the real one, the rest are links.
5068    The last name is the one that the linker finds with -lNAME]])
5069_LT_DECL([], [soname_spec], [1],
5070    [[The coded name of the library, if different from the real name]])
5071_LT_DECL([], [install_override_mode], [1],
5072    [Permission mode override for installation of shared libraries])
5073_LT_DECL([], [postinstall_cmds], [2],
5074    [Command to use after installation of a shared archive])
5075_LT_DECL([], [postuninstall_cmds], [2],
5076    [Command to use after uninstallation of a shared archive])
5077_LT_DECL([], [finish_cmds], [2],
5078    [Commands used to finish a libtool library installation in a directory])
5079_LT_DECL([], [finish_eval], [1],
5080    [[As "finish_cmds", except a single script fragment to be evaled but
5081    not shown]])
5082_LT_DECL([], [hardcode_into_libs], [0],
5083    [Whether we should hardcode library paths into libraries])
5084_LT_DECL([], [sys_lib_search_path_spec], [2],
5085    [Compile-time system search path for libraries])
5086_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
5087    [Run-time system search path for libraries])
5088])# _LT_SYS_DYNAMIC_LINKER
5089
5090
5091# _LT_PATH_TOOL_PREFIX(TOOL)
5092# --------------------------
5093# find a file program which can recognize shared library
5094AC_DEFUN([_LT_PATH_TOOL_PREFIX],
5095[m4_require([_LT_DECL_EGREP])dnl
5096AC_MSG_CHECKING([for $1])
5097AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
5098[case $MAGIC_CMD in
5099[[\\/*] |  ?:[\\/]*])
5100  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
5101  ;;
5102*)
5103  lt_save_MAGIC_CMD="$MAGIC_CMD"
5104  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5105dnl $ac_dummy forces splitting on constant user-supplied paths.
5106dnl POSIX.2 word splitting is done only on the output of word expansions,
5107dnl not every word.  This closes a longstanding sh security hole.
5108  ac_dummy="m4_if([$2], , $PATH, [$2])"
5109  for ac_dir in $ac_dummy; do
5110    IFS="$lt_save_ifs"
5111    test -z "$ac_dir" && ac_dir=.
5112    if test -f $ac_dir/$1; then
5113      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
5114      if test -n "$file_magic_test_file"; then
5115	case $deplibs_check_method in
5116	"file_magic "*)
5117	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
5118	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
5119	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
5120	    $EGREP "$file_magic_regex" > /dev/null; then
5121	    :
5122	  else
5123	    cat <<_LT_EOF 1>&2
5124
5125*** Warning: the command libtool uses to detect shared libraries,
5126*** $file_magic_cmd, produces output that libtool cannot recognize.
5127*** The result is that libtool may fail to recognize shared libraries
5128*** as such.  This will affect the creation of libtool libraries that
5129*** depend on shared libraries, but programs linked with such libtool
5130*** libraries will work regardless of this problem.  Nevertheless, you
5131*** may want to report the problem to your system manager and/or to
5132*** bug-libtool@gnu.org
5133
5134_LT_EOF
5135	  fi ;;
5136	esac
5137      fi
5138      break
5139    fi
5140  done
5141  IFS="$lt_save_ifs"
5142  MAGIC_CMD="$lt_save_MAGIC_CMD"
5143  ;;
5144esac])
5145MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
5146if test -n "$MAGIC_CMD"; then
5147  AC_MSG_RESULT($MAGIC_CMD)
5148else
5149  AC_MSG_RESULT(no)
5150fi
5151_LT_DECL([], [MAGIC_CMD], [0],
5152	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
5153])# _LT_PATH_TOOL_PREFIX
5154
5155# Old name:
5156AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
5157dnl aclocal-1.4 backwards compatibility:
5158dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
5159
5160
5161# _LT_PATH_MAGIC
5162# --------------
5163# find a file program which can recognize a shared library
5164m4_defun([_LT_PATH_MAGIC],
5165[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
5166if test -z "$lt_cv_path_MAGIC_CMD"; then
5167  if test -n "$ac_tool_prefix"; then
5168    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
5169  else
5170    MAGIC_CMD=:
5171  fi
5172fi
5173])# _LT_PATH_MAGIC
5174
5175
5176# LT_PATH_LD
5177# ----------
5178# find the pathname to the GNU or non-GNU linker
5179AC_DEFUN([LT_PATH_LD],
5180[AC_REQUIRE([AC_PROG_CC])dnl
5181AC_REQUIRE([AC_CANONICAL_HOST])dnl
5182AC_REQUIRE([AC_CANONICAL_BUILD])dnl
5183m4_require([_LT_DECL_SED])dnl
5184m4_require([_LT_DECL_EGREP])dnl
5185m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
5186
5187AC_ARG_WITH([gnu-ld],
5188    [AS_HELP_STRING([--with-gnu-ld],
5189	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
5190    [test "$withval" = no || with_gnu_ld=yes],
5191    [with_gnu_ld=no])dnl
5192
5193ac_prog=ld
5194if test "$GCC" = yes; then
5195  # Check if gcc -print-prog-name=ld gives a path.
5196  AC_MSG_CHECKING([for ld used by $CC])
5197  case $host in
5198  *-*-mingw*)
5199    # gcc leaves a trailing carriage return which upsets mingw
5200    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
5201  *)
5202    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
5203  esac
5204  case $ac_prog in
5205    # Accept absolute paths.
5206    [[\\/]]* | ?:[[\\/]]*)
5207      re_direlt='/[[^/]][[^/]]*/\.\./'
5208      # Canonicalize the pathname of ld
5209      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
5210      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
5211	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
5212      done
5213      test -z "$LD" && LD="$ac_prog"
5214      ;;
5215  "")
5216    # If it fails, then pretend we aren't using GCC.
5217    ac_prog=ld
5218    ;;
5219  *)
5220    # If it is relative, then search for the first ld in PATH.
5221    with_gnu_ld=unknown
5222    ;;
5223  esac
5224elif test "$with_gnu_ld" = yes; then
5225  AC_MSG_CHECKING([for GNU ld])
5226else
5227  AC_MSG_CHECKING([for non-GNU ld])
5228fi
5229AC_CACHE_VAL(lt_cv_path_LD,
5230[if test -z "$LD"; then
5231  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5232  for ac_dir in $PATH; do
5233    IFS="$lt_save_ifs"
5234    test -z "$ac_dir" && ac_dir=.
5235    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
5236      lt_cv_path_LD="$ac_dir/$ac_prog"
5237      # Check to see if the program is GNU ld.  I'd rather use --version,
5238      # but apparently some variants of GNU ld only accept -v.
5239      # Break only if it was the GNU/non-GNU ld that we prefer.
5240      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
5241      *GNU* | *'with BFD'*)
5242	test "$with_gnu_ld" != no && break
5243	;;
5244      *)
5245	test "$with_gnu_ld" != yes && break
5246	;;
5247      esac
5248    fi
5249  done
5250  IFS="$lt_save_ifs"
5251else
5252  lt_cv_path_LD="$LD" # Let the user override the test with a path.
5253fi])
5254LD="$lt_cv_path_LD"
5255if test -n "$LD"; then
5256  AC_MSG_RESULT($LD)
5257else
5258  AC_MSG_RESULT(no)
5259fi
5260test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
5261_LT_PATH_LD_GNU
5262AC_SUBST([LD])
5263
5264_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
5265])# LT_PATH_LD
5266
5267# Old names:
5268AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
5269AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
5270dnl aclocal-1.4 backwards compatibility:
5271dnl AC_DEFUN([AM_PROG_LD], [])
5272dnl AC_DEFUN([AC_PROG_LD], [])
5273
5274
5275# _LT_PATH_LD_GNU
5276#- --------------
5277m4_defun([_LT_PATH_LD_GNU],
5278[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
5279[# I'd rather use --version here, but apparently some GNU lds only accept -v.
5280case `$LD -v 2>&1 </dev/null` in
5281*GNU* | *'with BFD'*)
5282  lt_cv_prog_gnu_ld=yes
5283  ;;
5284*)
5285  lt_cv_prog_gnu_ld=no
5286  ;;
5287esac])
5288with_gnu_ld=$lt_cv_prog_gnu_ld
5289])# _LT_PATH_LD_GNU
5290
5291
5292# _LT_CMD_RELOAD
5293# --------------
5294# find reload flag for linker
5295#   -- PORTME Some linkers may need a different reload flag.
5296m4_defun([_LT_CMD_RELOAD],
5297[AC_CACHE_CHECK([for $LD option to reload object files],
5298  lt_cv_ld_reload_flag,
5299  [lt_cv_ld_reload_flag='-r'])
5300reload_flag=$lt_cv_ld_reload_flag
5301case $reload_flag in
5302"" | " "*) ;;
5303*) reload_flag=" $reload_flag" ;;
5304esac
5305reload_cmds='$LD$reload_flag -o $output$reload_objs'
5306case $host_os in
5307  darwin*)
5308    if test "$GCC" = yes; then
5309      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
5310    else
5311      reload_cmds='$LD$reload_flag -o $output$reload_objs'
5312    fi
5313    ;;
5314esac
5315_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
5316_LT_TAGDECL([], [reload_cmds], [2])dnl
5317])# _LT_CMD_RELOAD
5318
5319
5320# _LT_CHECK_MAGIC_METHOD
5321# ----------------------
5322# how to check for library dependencies
5323#  -- PORTME fill in with the dynamic library characteristics
5324m4_defun([_LT_CHECK_MAGIC_METHOD],
5325[m4_require([_LT_DECL_EGREP])
5326m4_require([_LT_DECL_OBJDUMP])
5327AC_CACHE_CHECK([how to recognize dependent libraries],
5328lt_cv_deplibs_check_method,
5329[lt_cv_file_magic_cmd='$MAGIC_CMD'
5330lt_cv_file_magic_test_file=
5331lt_cv_deplibs_check_method='unknown'
5332# Need to set the preceding variable on all platforms that support
5333# interlibrary dependencies.
5334# 'none' -- dependencies not supported.
5335# `unknown' -- same as none, but documents that we really don't know.
5336# 'pass_all' -- all dependencies passed with no checks.
5337# 'test_compile' -- check by making test program.
5338# 'file_magic [[regex]]' -- check by looking for files in library path
5339# which responds to the $file_magic_cmd with a given extended regex.
5340# If you have `file' or equivalent on your system and you're not sure
5341# whether `pass_all' will *always* work, you probably want this one.
5342
5343case $host_os in
5344aix[[4-9]]*)
5345  lt_cv_deplibs_check_method=pass_all
5346  ;;
5347
5348beos*)
5349  lt_cv_deplibs_check_method=pass_all
5350  ;;
5351
5352bsdi[[45]]*)
5353  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
5354  lt_cv_file_magic_cmd='/usr/bin/file -L'
5355  lt_cv_file_magic_test_file=/shlib/libc.so
5356  ;;
5357
5358cygwin*)
5359  # func_win32_libid is a shell function defined in ltmain.sh
5360  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
5361  lt_cv_file_magic_cmd='func_win32_libid'
5362  ;;
5363
5364mingw* | pw32*)
5365  # Base MSYS/MinGW do not provide the 'file' command needed by
5366  # func_win32_libid shell function, so use a weaker test based on 'objdump',
5367  # unless we find 'file', for example because we are cross-compiling.
5368  # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
5369  if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
5370    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
5371    lt_cv_file_magic_cmd='func_win32_libid'
5372  else
5373    # Keep this pattern in sync with the one in func_win32_libid.
5374    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
5375    lt_cv_file_magic_cmd='$OBJDUMP -f'
5376  fi
5377  ;;
5378
5379cegcc*)
5380  # use the weaker test based on 'objdump'. See mingw*.
5381  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
5382  lt_cv_file_magic_cmd='$OBJDUMP -f'
5383  ;;
5384
5385darwin* | rhapsody*)
5386  lt_cv_deplibs_check_method=pass_all
5387  ;;
5388
5389freebsd* | dragonfly*)
5390  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
5391    case $host_cpu in
5392    i*86 )
5393      # Not sure whether the presence of OpenBSD here was a mistake.
5394      # Let's accept both of them until this is cleared up.
5395      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
5396      lt_cv_file_magic_cmd=/usr/bin/file
5397      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
5398      ;;
5399    esac
5400  else
5401    lt_cv_deplibs_check_method=pass_all
5402  fi
5403  ;;
5404
5405gnu*)
5406  lt_cv_deplibs_check_method=pass_all
5407  ;;
5408
5409haiku*)
5410  lt_cv_deplibs_check_method=pass_all
5411  ;;
5412
5413hpux10.20* | hpux11*)
5414  lt_cv_file_magic_cmd=/usr/bin/file
5415  case $host_cpu in
5416  ia64*)
5417    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
5418    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
5419    ;;
5420  hppa*64*)
5421    [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]']
5422    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
5423    ;;
5424  *)
5425    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
5426    lt_cv_file_magic_test_file=/usr/lib/libc.sl
5427    ;;
5428  esac
5429  ;;
5430
5431interix[[3-9]]*)
5432  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
5433  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
5434  ;;
5435
5436irix5* | irix6* | nonstopux*)
5437  case $LD in
5438  *-32|*"-32 ") libmagic=32-bit;;
5439  *-n32|*"-n32 ") libmagic=N32;;
5440  *-64|*"-64 ") libmagic=64-bit;;
5441  *) libmagic=never-match;;
5442  esac
5443  lt_cv_deplibs_check_method=pass_all
5444  ;;
5445
5446# This must be Linux ELF.
5447linux* | k*bsd*-gnu | kopensolaris*-gnu)
5448  lt_cv_deplibs_check_method=pass_all
5449  ;;
5450
5451netbsd*)
5452  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
5453    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
5454  else
5455    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
5456  fi
5457  ;;
5458
5459newos6*)
5460  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
5461  lt_cv_file_magic_cmd=/usr/bin/file
5462  lt_cv_file_magic_test_file=/usr/lib/libnls.so
5463  ;;
5464
5465*nto* | *qnx*)
5466  lt_cv_deplibs_check_method=pass_all
5467  ;;
5468
5469openbsd*)
5470  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5471    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
5472  else
5473    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
5474  fi
5475  ;;
5476
5477osf3* | osf4* | osf5*)
5478  lt_cv_deplibs_check_method=pass_all
5479  ;;
5480
5481rdos*)
5482  lt_cv_deplibs_check_method=pass_all
5483  ;;
5484
5485solaris*)
5486  lt_cv_deplibs_check_method=pass_all
5487  ;;
5488
5489sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
5490  lt_cv_deplibs_check_method=pass_all
5491  ;;
5492
5493sysv4 | sysv4.3*)
5494  case $host_vendor in
5495  motorola)
5496    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]]'
5497    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
5498    ;;
5499  ncr)
5500    lt_cv_deplibs_check_method=pass_all
5501    ;;
5502  sequent)
5503    lt_cv_file_magic_cmd='/bin/file'
5504    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
5505    ;;
5506  sni)
5507    lt_cv_file_magic_cmd='/bin/file'
5508    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
5509    lt_cv_file_magic_test_file=/lib/libc.so
5510    ;;
5511  siemens)
5512    lt_cv_deplibs_check_method=pass_all
5513    ;;
5514  pc)
5515    lt_cv_deplibs_check_method=pass_all
5516    ;;
5517  esac
5518  ;;
5519
5520tpf*)
5521  lt_cv_deplibs_check_method=pass_all
5522  ;;
5523esac
5524])
5525file_magic_cmd=$lt_cv_file_magic_cmd
5526deplibs_check_method=$lt_cv_deplibs_check_method
5527test -z "$deplibs_check_method" && deplibs_check_method=unknown
5528
5529_LT_DECL([], [deplibs_check_method], [1],
5530    [Method to check whether dependent libraries are shared objects])
5531_LT_DECL([], [file_magic_cmd], [1],
5532    [Command to use when deplibs_check_method == "file_magic"])
5533])# _LT_CHECK_MAGIC_METHOD
5534
5535
5536# LT_PATH_NM
5537# ----------
5538# find the pathname to a BSD- or MS-compatible name lister
5539AC_DEFUN([LT_PATH_NM],
5540[AC_REQUIRE([AC_PROG_CC])dnl
5541AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
5542[if test -n "$NM"; then
5543  # Let the user override the test.
5544  lt_cv_path_NM="$NM"
5545else
5546  lt_nm_to_check="${ac_tool_prefix}nm"
5547  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
5548    lt_nm_to_check="$lt_nm_to_check nm"
5549  fi
5550  for lt_tmp_nm in $lt_nm_to_check; do
5551    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5552    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
5553      IFS="$lt_save_ifs"
5554      test -z "$ac_dir" && ac_dir=.
5555      tmp_nm="$ac_dir/$lt_tmp_nm"
5556      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
5557	# Check to see if the nm accepts a BSD-compat flag.
5558	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
5559	#   nm: unknown option "B" ignored
5560	# Tru64's nm complains that /dev/null is an invalid object file
5561	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
5562	*/dev/null* | *'Invalid file or object type'*)
5563	  lt_cv_path_NM="$tmp_nm -B"
5564	  break
5565	  ;;
5566	*)
5567	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
5568	  */dev/null*)
5569	    lt_cv_path_NM="$tmp_nm -p"
5570	    break
5571	    ;;
5572	  *)
5573	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
5574	    continue # so that we can try to find one that supports BSD flags
5575	    ;;
5576	  esac
5577	  ;;
5578	esac
5579      fi
5580    done
5581    IFS="$lt_save_ifs"
5582  done
5583  : ${lt_cv_path_NM=no}
5584fi])
5585if test "$lt_cv_path_NM" != "no"; then
5586  NM="$lt_cv_path_NM"
5587else
5588  # Didn't find any BSD compatible name lister, look for dumpbin.
5589  if test -n "$DUMPBIN"; then :
5590    # Let the user override the test.
5591  else
5592    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
5593    case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
5594    *COFF*)
5595      DUMPBIN="$DUMPBIN -symbols"
5596      ;;
5597    *)
5598      DUMPBIN=:
5599      ;;
5600    esac
5601  fi
5602  AC_SUBST([DUMPBIN])
5603  if test "$DUMPBIN" != ":"; then
5604    NM="$DUMPBIN"
5605  fi
5606fi
5607test -z "$NM" && NM=nm
5608AC_SUBST([NM])
5609_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
5610
5611AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
5612  [lt_cv_nm_interface="BSD nm"
5613  echo "int some_variable = 0;" > conftest.$ac_ext
5614  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
5615  (eval "$ac_compile" 2>conftest.err)
5616  cat conftest.err >&AS_MESSAGE_LOG_FD
5617  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
5618  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
5619  cat conftest.err >&AS_MESSAGE_LOG_FD
5620  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
5621  cat conftest.out >&AS_MESSAGE_LOG_FD
5622  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
5623    lt_cv_nm_interface="MS dumpbin"
5624  fi
5625  rm -f conftest*])
5626])# LT_PATH_NM
5627
5628# Old names:
5629AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
5630AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
5631dnl aclocal-1.4 backwards compatibility:
5632dnl AC_DEFUN([AM_PROG_NM], [])
5633dnl AC_DEFUN([AC_PROG_NM], [])
5634
5635
5636# LT_LIB_M
5637# --------
5638# check for math library
5639AC_DEFUN([LT_LIB_M],
5640[AC_REQUIRE([AC_CANONICAL_HOST])dnl
5641LIBM=
5642case $host in
5643*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
5644  # These system don't have libm, or don't need it
5645  ;;
5646*-ncr-sysv4.3*)
5647  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
5648  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
5649  ;;
5650*)
5651  AC_CHECK_LIB(m, cos, LIBM="-lm")
5652  ;;
5653esac
5654AC_SUBST([LIBM])
5655])# LT_LIB_M
5656
5657# Old name:
5658AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
5659dnl aclocal-1.4 backwards compatibility:
5660dnl AC_DEFUN([AC_CHECK_LIBM], [])
5661
5662
5663# _LT_COMPILER_NO_RTTI([TAGNAME])
5664# -------------------------------
5665m4_defun([_LT_COMPILER_NO_RTTI],
5666[m4_require([_LT_TAG_COMPILER])dnl
5667
5668_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5669
5670if test "$GCC" = yes; then
5671  case $cc_basename in
5672  nvcc*)
5673    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
5674  *)
5675    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
5676  esac
5677
5678  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
5679    lt_cv_prog_compiler_rtti_exceptions,
5680    [-fno-rtti -fno-exceptions], [],
5681    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
5682fi
5683_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
5684	[Compiler flag to turn off builtin functions])
5685])# _LT_COMPILER_NO_RTTI
5686
5687
5688# _LT_CMD_GLOBAL_SYMBOLS
5689# ----------------------
5690m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
5691[AC_REQUIRE([AC_CANONICAL_HOST])dnl
5692AC_REQUIRE([AC_PROG_CC])dnl
5693AC_REQUIRE([AC_PROG_AWK])dnl
5694AC_REQUIRE([LT_PATH_NM])dnl
5695AC_REQUIRE([LT_PATH_LD])dnl
5696m4_require([_LT_DECL_SED])dnl
5697m4_require([_LT_DECL_EGREP])dnl
5698m4_require([_LT_TAG_COMPILER])dnl
5699
5700# Check for command to grab the raw symbol name followed by C symbol from nm.
5701AC_MSG_CHECKING([command to parse $NM output from $compiler object])
5702AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
5703[
5704# These are sane defaults that work on at least a few old systems.
5705# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
5706
5707# Character class describing NM global symbol codes.
5708symcode='[[BCDEGRST]]'
5709
5710# Regexp to match symbols that can be accessed directly from C.
5711sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
5712
5713# Define system-specific variables.
5714case $host_os in
5715aix*)
5716  symcode='[[BCDT]]'
5717  ;;
5718cygwin* | mingw* | pw32* | cegcc*)
5719  symcode='[[ABCDGISTW]]'
5720  ;;
5721hpux*)
5722  if test "$host_cpu" = ia64; then
5723    symcode='[[ABCDEGRST]]'
5724  fi
5725  ;;
5726irix* | nonstopux*)
5727  symcode='[[BCDEGRST]]'
5728  ;;
5729osf*)
5730  symcode='[[BCDEGQRST]]'
5731  ;;
5732solaris*)
5733  symcode='[[BDRT]]'
5734  ;;
5735sco3.2v5*)
5736  symcode='[[DT]]'
5737  ;;
5738sysv4.2uw2*)
5739  symcode='[[DT]]'
5740  ;;
5741sysv5* | sco5v6* | unixware* | OpenUNIX*)
5742  symcode='[[ABDT]]'
5743  ;;
5744sysv4)
5745  symcode='[[DFNSTU]]'
5746  ;;
5747esac
5748
5749# If we're using GNU nm, then use its standard symbol codes.
5750case `$NM -V 2>&1` in
5751*GNU* | *'with BFD'*)
5752  symcode='[[ABCDGIRSTW]]' ;;
5753esac
5754
5755# Transform an extracted symbol line into a proper C declaration.
5756# Some systems (esp. on ia64) link data and code symbols differently,
5757# so use this general approach.
5758lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5759
5760# Transform an extracted symbol line into symbol name and symbol address
5761lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
5762lt_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'"
5763
5764# Handle CRLF in mingw tool chain
5765opt_cr=
5766case $build_os in
5767mingw*)
5768  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
5769  ;;
5770esac
5771
5772# Try without a prefix underscore, then with it.
5773for ac_symprfx in "" "_"; do
5774
5775  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
5776  symxfrm="\\1 $ac_symprfx\\2 \\2"
5777
5778  # Write the raw and C identifiers.
5779  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
5780    # Fake it for dumpbin and say T for any non-static function
5781    # and D for any global variable.
5782    # Also find C++ and __fastcall symbols from MSVC++,
5783    # which start with @ or ?.
5784    lt_cv_sys_global_symbol_pipe="$AWK ['"\
5785"     {last_section=section; section=\$ 3};"\
5786"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
5787"     \$ 0!~/External *\|/{next};"\
5788"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
5789"     {if(hide[section]) next};"\
5790"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
5791"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
5792"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
5793"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
5794"     ' prfx=^$ac_symprfx]"
5795  else
5796    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
5797  fi
5798
5799  # Check to see that the pipe works correctly.
5800  pipe_works=no
5801
5802  rm -f conftest*
5803  cat > conftest.$ac_ext <<_LT_EOF
5804#ifdef __cplusplus
5805extern "C" {
5806#endif
5807char nm_test_var;
5808void nm_test_func(void);
5809void nm_test_func(void){}
5810#ifdef __cplusplus
5811}
5812#endif
5813int main(){nm_test_var='a';nm_test_func();return(0);}
5814_LT_EOF
5815
5816  if AC_TRY_EVAL(ac_compile); then
5817    # Now try to grab the symbols.
5818    nlist=conftest.nm
5819    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
5820      # Try sorting and uniquifying the output.
5821      if sort "$nlist" | uniq > "$nlist"T; then
5822	mv -f "$nlist"T "$nlist"
5823      else
5824	rm -f "$nlist"T
5825      fi
5826
5827      # Make sure that we snagged all the symbols we need.
5828      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
5829	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
5830	  cat <<_LT_EOF > conftest.$ac_ext
5831#ifdef __cplusplus
5832extern "C" {
5833#endif
5834
5835_LT_EOF
5836	  # Now generate the symbol file.
5837	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
5838
5839	  cat <<_LT_EOF >> conftest.$ac_ext
5840
5841/* The mapping between symbol names and symbols.  */
5842const struct {
5843  const char *name;
5844  void       *address;
5845}
5846lt__PROGRAM__LTX_preloaded_symbols[[]] =
5847{
5848  { "@PROGRAM@", (void *) 0 },
5849_LT_EOF
5850	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
5851	  cat <<\_LT_EOF >> conftest.$ac_ext
5852  {0, (void *) 0}
5853};
5854
5855/* This works around a problem in FreeBSD linker */
5856#ifdef FREEBSD_WORKAROUND
5857static const void *lt_preloaded_setup() {
5858  return lt__PROGRAM__LTX_preloaded_symbols;
5859}
5860#endif
5861
5862#ifdef __cplusplus
5863}
5864#endif
5865_LT_EOF
5866	  # Now try linking the two files.
5867	  mv conftest.$ac_objext conftstm.$ac_objext
5868	  lt_save_LIBS="$LIBS"
5869	  lt_save_CFLAGS="$CFLAGS"
5870	  LIBS="conftstm.$ac_objext"
5871	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
5872	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
5873	    pipe_works=yes
5874	  fi
5875	  LIBS="$lt_save_LIBS"
5876	  CFLAGS="$lt_save_CFLAGS"
5877	else
5878	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
5879	fi
5880      else
5881	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
5882      fi
5883    else
5884      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
5885    fi
5886  else
5887    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
5888    cat conftest.$ac_ext >&5
5889  fi
5890  rm -rf conftest* conftst*
5891
5892  # Do not use the global_symbol_pipe unless it works.
5893  if test "$pipe_works" = yes; then
5894    break
5895  else
5896    lt_cv_sys_global_symbol_pipe=
5897  fi
5898done
5899])
5900if test -z "$lt_cv_sys_global_symbol_pipe"; then
5901  lt_cv_sys_global_symbol_to_cdecl=
5902fi
5903if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
5904  AC_MSG_RESULT(failed)
5905else
5906  AC_MSG_RESULT(ok)
5907fi
5908
5909_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
5910    [Take the output of nm and produce a listing of raw symbols and C names])
5911_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
5912    [Transform the output of nm in a proper C declaration])
5913_LT_DECL([global_symbol_to_c_name_address],
5914    [lt_cv_sys_global_symbol_to_c_name_address], [1],
5915    [Transform the output of nm in a C name address pair])
5916_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
5917    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
5918    [Transform the output of nm in a C name address pair when lib prefix is needed])
5919]) # _LT_CMD_GLOBAL_SYMBOLS
5920
5921
5922# _LT_COMPILER_PIC([TAGNAME])
5923# ---------------------------
5924m4_defun([_LT_COMPILER_PIC],
5925[m4_require([_LT_TAG_COMPILER])dnl
5926_LT_TAGVAR(lt_prog_compiler_wl, $1)=
5927_LT_TAGVAR(lt_prog_compiler_pic, $1)=
5928_LT_TAGVAR(lt_prog_compiler_static, $1)=
5929
5930AC_MSG_CHECKING([for $compiler option to produce PIC])
5931m4_if([$1], [CXX], [
5932  # C++ specific cases for pic, static, wl, etc.
5933  if test "$GXX" = yes; then
5934    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5935    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5936
5937    case $host_os in
5938    aix*)
5939      # All AIX code is PIC.
5940      if test "$host_cpu" = ia64; then
5941	# AIX 5 now supports IA64 processor
5942	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5943      fi
5944      ;;
5945
5946    amigaos*)
5947      case $host_cpu in
5948      powerpc)
5949            # see comment about AmigaOS4 .so support
5950            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5951        ;;
5952      m68k)
5953            # FIXME: we need at least 68020 code to build shared libraries, but
5954            # adding the `-m68020' flag to GCC prevents building anything better,
5955            # like `-m68040'.
5956            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5957        ;;
5958      esac
5959      ;;
5960
5961    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5962      # PIC is the default for these OSes.
5963      ;;
5964    mingw* | cygwin* | os2* | pw32* | cegcc*)
5965      # This hack is so that the source file can tell whether it is being
5966      # built for inclusion in a dll (and should export symbols for example).
5967      # Although the cygwin gcc ignores -fPIC, still need this for old-style
5968      # (--disable-auto-import) libraries
5969      m4_if([$1], [GCJ], [],
5970	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5971      ;;
5972    darwin* | rhapsody*)
5973      # PIC is the default on this platform
5974      # Common symbols not allowed in MH_DYLIB files
5975      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5976      ;;
5977    *djgpp*)
5978      # DJGPP does not support shared libraries at all
5979      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5980      ;;
5981    haiku*)
5982      # PIC is the default for Haiku.
5983      # The "-static" flag exists, but is broken.
5984      _LT_TAGVAR(lt_prog_compiler_static, $1)=
5985      ;;
5986    interix[[3-9]]*)
5987      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5988      # Instead, we relocate shared libraries at runtime.
5989      ;;
5990    sysv4*MP*)
5991      if test -d /usr/nec; then
5992	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5993      fi
5994      ;;
5995    hpux*)
5996      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
5997      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
5998      # sets the default TLS model and affects inlining.
5999      case $host_cpu in
6000      hppa*64*)
6001	;;
6002      *)
6003	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6004	;;
6005      esac
6006      ;;
6007    *qnx* | *nto*)
6008      # QNX uses GNU C++, but need to define -shared option too, otherwise
6009      # it will coredump.
6010      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
6011      ;;
6012    *)
6013      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6014      ;;
6015    esac
6016  else
6017    case $host_os in
6018      aix[[4-9]]*)
6019	# All AIX code is PIC.
6020	if test "$host_cpu" = ia64; then
6021	  # AIX 5 now supports IA64 processor
6022	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6023	else
6024	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
6025	fi
6026	;;
6027      chorus*)
6028	case $cc_basename in
6029	cxch68*)
6030	  # Green Hills C++ Compiler
6031	  # _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"
6032	  ;;
6033	esac
6034	;;
6035      dgux*)
6036	case $cc_basename in
6037	  ec++*)
6038	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6039	    ;;
6040	  ghcx*)
6041	    # Green Hills C++ Compiler
6042	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6043	    ;;
6044	  *)
6045	    ;;
6046	esac
6047	;;
6048      freebsd* | dragonfly*)
6049	# FreeBSD uses GNU C++
6050	;;
6051      hpux9* | hpux10* | hpux11*)
6052	case $cc_basename in
6053	  CC*)
6054	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6055	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6056	    if test "$host_cpu" != ia64; then
6057	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6058	    fi
6059	    ;;
6060	  aCC*)
6061	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6062	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6063	    case $host_cpu in
6064	    hppa*64*|ia64*)
6065	      # +Z the default
6066	      ;;
6067	    *)
6068	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6069	      ;;
6070	    esac
6071	    ;;
6072	  *)
6073	    ;;
6074	esac
6075	;;
6076      interix*)
6077	# This is c89, which is MS Visual C++ (no shared libs)
6078	# Anyone wants to do a port?
6079	;;
6080      irix5* | irix6* | nonstopux*)
6081	case $cc_basename in
6082	  CC*)
6083	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6084	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6085	    # CC pic flag -KPIC is the default.
6086	    ;;
6087	  *)
6088	    ;;
6089	esac
6090	;;
6091      linux* | k*bsd*-gnu | kopensolaris*-gnu)
6092	case $cc_basename in
6093	  KCC*)
6094	    # KAI C++ Compiler
6095	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
6096	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6097	    ;;
6098	  ecpc* )
6099	    # old Intel C++ for x86_64 which still supported -KPIC.
6100	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6101	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6102	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6103	    ;;
6104	  icpc* )
6105	    # Intel C++, used to be incompatible with GCC.
6106	    # ICC 10 doesn't accept -KPIC any more.
6107	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6108	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6109	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6110	    ;;
6111	  pgCC* | pgcpp*)
6112	    # Portland Group C++ compiler
6113	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6114	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6115	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6116	    ;;
6117	  cxx*)
6118	    # Compaq C++
6119	    # Make sure the PIC flag is empty.  It appears that all Alpha
6120	    # Linux and Compaq Tru64 Unix objects are PIC.
6121	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
6122	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6123	    ;;
6124	  xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
6125	    # IBM XL 8.0, 9.0 on PPC and BlueGene
6126	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6127	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
6128	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
6129	    ;;
6130	  *)
6131	    case `$CC -V 2>&1 | sed 5q` in
6132	    *Sun\ C*)
6133	      # Sun C++ 5.9
6134	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6135	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6136	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6137	      ;;
6138	    esac
6139	    ;;
6140	esac
6141	;;
6142      lynxos*)
6143	;;
6144      m88k*)
6145	;;
6146      mvs*)
6147	case $cc_basename in
6148	  cxx*)
6149	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
6150	    ;;
6151	  *)
6152	    ;;
6153	esac
6154	;;
6155      netbsd*)
6156	;;
6157      *qnx* | *nto*)
6158        # QNX uses GNU C++, but need to define -shared option too, otherwise
6159        # it will coredump.
6160        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
6161        ;;
6162      osf3* | osf4* | osf5*)
6163	case $cc_basename in
6164	  KCC*)
6165	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
6166	    ;;
6167	  RCC*)
6168	    # Rational C++ 2.4.1
6169	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6170	    ;;
6171	  cxx*)
6172	    # Digital/Compaq C++
6173	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6174	    # Make sure the PIC flag is empty.  It appears that all Alpha
6175	    # Linux and Compaq Tru64 Unix objects are PIC.
6176	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
6177	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6178	    ;;
6179	  *)
6180	    ;;
6181	esac
6182	;;
6183      psos*)
6184	;;
6185      solaris*)
6186	case $cc_basename in
6187	  CC* | sunCC*)
6188	    # Sun C++ 4.2, 5.x and Centerline C++
6189	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6190	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6191	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6192	    ;;
6193	  gcx*)
6194	    # Green Hills C++ Compiler
6195	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6196	    ;;
6197	  *)
6198	    ;;
6199	esac
6200	;;
6201      sunos4*)
6202	case $cc_basename in
6203	  CC*)
6204	    # Sun C++ 4.x
6205	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6206	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6207	    ;;
6208	  lcc*)
6209	    # Lucid
6210	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6211	    ;;
6212	  *)
6213	    ;;
6214	esac
6215	;;
6216      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
6217	case $cc_basename in
6218	  CC*)
6219	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6220	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6221	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6222	    ;;
6223	esac
6224	;;
6225      tandem*)
6226	case $cc_basename in
6227	  NCC*)
6228	    # NonStop-UX NCC 3.20
6229	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6230	    ;;
6231	  *)
6232	    ;;
6233	esac
6234	;;
6235      vxworks*)
6236	;;
6237      *)
6238	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6239	;;
6240    esac
6241  fi
6242],
6243[
6244  if test "$GCC" = yes; then
6245    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6246    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6247
6248    case $host_os in
6249      aix*)
6250      # All AIX code is PIC.
6251      if test "$host_cpu" = ia64; then
6252	# AIX 5 now supports IA64 processor
6253	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6254      fi
6255      ;;
6256
6257    amigaos*)
6258      case $host_cpu in
6259      powerpc)
6260            # see comment about AmigaOS4 .so support
6261            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6262        ;;
6263      m68k)
6264            # FIXME: we need at least 68020 code to build shared libraries, but
6265            # adding the `-m68020' flag to GCC prevents building anything better,
6266            # like `-m68040'.
6267            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
6268        ;;
6269      esac
6270      ;;
6271
6272    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
6273      # PIC is the default for these OSes.
6274      ;;
6275
6276    mingw* | cygwin* | pw32* | os2* | cegcc*)
6277      # This hack is so that the source file can tell whether it is being
6278      # built for inclusion in a dll (and should export symbols for example).
6279      # Although the cygwin gcc ignores -fPIC, still need this for old-style
6280      # (--disable-auto-import) libraries
6281      m4_if([$1], [GCJ], [],
6282	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
6283      ;;
6284
6285    darwin* | rhapsody*)
6286      # PIC is the default on this platform
6287      # Common symbols not allowed in MH_DYLIB files
6288      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
6289      ;;
6290
6291    haiku*)
6292      # PIC is the default for Haiku.
6293      # The "-static" flag exists, but is broken.
6294      _LT_TAGVAR(lt_prog_compiler_static, $1)=
6295      ;;
6296
6297    hpux*)
6298      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
6299      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
6300      # sets the default TLS model and affects inlining.
6301      case $host_cpu in
6302      hppa*64*)
6303	# +Z the default
6304	;;
6305      *)
6306	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6307	;;
6308      esac
6309      ;;
6310
6311    interix[[3-9]]*)
6312      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
6313      # Instead, we relocate shared libraries at runtime.
6314      ;;
6315
6316    msdosdjgpp*)
6317      # Just because we use GCC doesn't mean we suddenly get shared libraries
6318      # on systems that don't support them.
6319      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6320      enable_shared=no
6321      ;;
6322
6323    *nto* | *qnx*)
6324      # QNX uses GNU C++, but need to define -shared option too, otherwise
6325      # it will coredump.
6326      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
6327      ;;
6328
6329    sysv4*MP*)
6330      if test -d /usr/nec; then
6331	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
6332      fi
6333      ;;
6334
6335    *)
6336      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6337      ;;
6338    esac
6339
6340    case $cc_basename in
6341    nvcc*) # Cuda Compiler Driver 2.2
6342      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
6343      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC'
6344      ;;
6345    esac
6346  else
6347    # PORTME Check for flag to pass linker flags through the system compiler.
6348    case $host_os in
6349    aix*)
6350      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6351      if test "$host_cpu" = ia64; then
6352	# AIX 5 now supports IA64 processor
6353	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6354      else
6355	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
6356      fi
6357      ;;
6358
6359    mingw* | cygwin* | pw32* | os2* | cegcc*)
6360      # This hack is so that the source file can tell whether it is being
6361      # built for inclusion in a dll (and should export symbols for example).
6362      m4_if([$1], [GCJ], [],
6363	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
6364      ;;
6365
6366    hpux9* | hpux10* | hpux11*)
6367      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6368      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6369      # not for PA HP-UX.
6370      case $host_cpu in
6371      hppa*64*|ia64*)
6372	# +Z the default
6373	;;
6374      *)
6375	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6376	;;
6377      esac
6378      # Is there a better lt_prog_compiler_static that works with the bundled CC?
6379      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6380      ;;
6381
6382    irix5* | irix6* | nonstopux*)
6383      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6384      # PIC (with -KPIC) is the default.
6385      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6386      ;;
6387
6388    linux* | k*bsd*-gnu | kopensolaris*-gnu)
6389      case $cc_basename in
6390      # old Intel for x86_64 which still supported -KPIC.
6391      ecc*)
6392	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6393	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6394	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6395        ;;
6396      # icc used to be incompatible with GCC.
6397      # ICC 10 doesn't accept -KPIC any more.
6398      icc* | ifort*)
6399	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6400	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6401	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6402        ;;
6403      # Lahey Fortran 8.1.
6404      lf95*)
6405	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6406	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
6407	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
6408	;;
6409      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
6410        # Portland Group compilers (*not* the Pentium gcc compiler,
6411	# which looks to be a dead project)
6412	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6413	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6414	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6415        ;;
6416      ccc*)
6417        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6418        # All Alpha code is PIC.
6419        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6420        ;;
6421      xl* | bgxl* | bgf* | mpixl*)
6422	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
6423	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6424	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
6425	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
6426	;;
6427      *)
6428	case `$CC -V 2>&1 | sed 5q` in
6429	*Sun\ F* | *Sun*Fortran*)
6430	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
6431	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6432	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6433	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
6434	  ;;
6435	*Sun\ C*)
6436	  # Sun C 5.9
6437	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6438	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6439	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6440	  ;;
6441	esac
6442	;;
6443      esac
6444      ;;
6445
6446    newsos6)
6447      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6448      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6449      ;;
6450
6451    *nto* | *qnx*)
6452      # QNX uses GNU C++, but need to define -shared option too, otherwise
6453      # it will coredump.
6454      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
6455      ;;
6456
6457    osf3* | osf4* | osf5*)
6458      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6459      # All OSF/1 code is PIC.
6460      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6461      ;;
6462
6463    rdos*)
6464      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6465      ;;
6466
6467    solaris*)
6468      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6469      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6470      case $cc_basename in
6471      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
6472	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
6473      *)
6474	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
6475      esac
6476      ;;
6477
6478    sunos4*)
6479      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6480      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6481      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6482      ;;
6483
6484    sysv4 | sysv4.2uw2* | sysv4.3*)
6485      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6486      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6487      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6488      ;;
6489
6490    sysv4*MP*)
6491      if test -d /usr/nec ;then
6492	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
6493	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6494      fi
6495      ;;
6496
6497    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
6498      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6499      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6500      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6501      ;;
6502
6503    unicos*)
6504      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6505      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6506      ;;
6507
6508    uts4*)
6509      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6510      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6511      ;;
6512
6513    *)
6514      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6515      ;;
6516    esac
6517  fi
6518])
6519case $host_os in
6520  # For platforms which do not support PIC, -DPIC is meaningless:
6521  *djgpp*)
6522    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
6523    ;;
6524  *)
6525    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
6526    ;;
6527esac
6528AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
6529_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
6530	[How to pass a linker flag through the compiler])
6531
6532#
6533# Check to make sure the PIC flag actually works.
6534#
6535if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
6536  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
6537    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
6538    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
6539    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
6540     "" | " "*) ;;
6541     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
6542     esac],
6543    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
6544     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
6545fi
6546_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
6547	[Additional compiler flags for building library objects])
6548
6549#
6550# Check to make sure the static flag actually works.
6551#
6552wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
6553_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
6554  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
6555  $lt_tmp_static_flag,
6556  [],
6557  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
6558_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
6559	[Compiler flag to prevent dynamic linking])
6560])# _LT_COMPILER_PIC
6561
6562
6563# _LT_LINKER_SHLIBS([TAGNAME])
6564# ----------------------------
6565# See if the linker supports building shared libraries.
6566m4_defun([_LT_LINKER_SHLIBS],
6567[AC_REQUIRE([LT_PATH_LD])dnl
6568AC_REQUIRE([LT_PATH_NM])dnl
6569m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6570m4_require([_LT_DECL_EGREP])dnl
6571m4_require([_LT_DECL_SED])dnl
6572m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
6573m4_require([_LT_TAG_COMPILER])dnl
6574AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6575m4_if([$1], [CXX], [
6576  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6577  case $host_os in
6578  aix[[4-9]]*)
6579    # If we're using GNU nm, then we don't want the "-C" option.
6580    # -C means demangle to AIX nm, but means don't demangle with GNU nm
6581    # Also, AIX nm treats weak defined symbols like other global defined
6582    # symbols, whereas GNU nm marks them as "W".
6583    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
6584      _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'
6585    else
6586      _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'
6587    fi
6588    ;;
6589  pw32*)
6590    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
6591  ;;
6592  cygwin* | mingw* | cegcc*)
6593    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
6594  ;;
6595  *)
6596    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6597  ;;
6598  esac
6599  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
6600], [
6601  runpath_var=
6602  _LT_TAGVAR(allow_undefined_flag, $1)=
6603  _LT_TAGVAR(always_export_symbols, $1)=no
6604  _LT_TAGVAR(archive_cmds, $1)=
6605  _LT_TAGVAR(archive_expsym_cmds, $1)=
6606  _LT_TAGVAR(compiler_needs_object, $1)=no
6607  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6608  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6609  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6610  _LT_TAGVAR(hardcode_automatic, $1)=no
6611  _LT_TAGVAR(hardcode_direct, $1)=no
6612  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6613  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6614  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6615  _LT_TAGVAR(hardcode_libdir_separator, $1)=
6616  _LT_TAGVAR(hardcode_minus_L, $1)=no
6617  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6618  _LT_TAGVAR(inherit_rpath, $1)=no
6619  _LT_TAGVAR(link_all_deplibs, $1)=unknown
6620  _LT_TAGVAR(module_cmds, $1)=
6621  _LT_TAGVAR(module_expsym_cmds, $1)=
6622  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
6623  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
6624  _LT_TAGVAR(thread_safe_flag_spec, $1)=
6625  _LT_TAGVAR(whole_archive_flag_spec, $1)=
6626  # include_expsyms should be a list of space-separated symbols to be *always*
6627  # included in the symbol list
6628  _LT_TAGVAR(include_expsyms, $1)=
6629  # exclude_expsyms can be an extended regexp of symbols to exclude
6630  # it will be wrapped by ` (' and `)$', so one must not match beginning or
6631  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
6632  # as well as any symbol that contains `d'.
6633  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
6634  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
6635  # platforms (ab)use it in PIC code, but their linkers get confused if
6636  # the symbol is explicitly referenced.  Since portable code cannot
6637  # rely on this symbol name, it's probably fine to never include it in
6638  # preloaded symbol tables.
6639  # Exclude shared library initialization/finalization symbols.
6640dnl Note also adjust exclude_expsyms for C++ above.
6641  extract_expsyms_cmds=
6642
6643  case $host_os in
6644  cygwin* | mingw* | pw32* | cegcc*)
6645    # FIXME: the MSVC++ port hasn't been tested in a loooong time
6646    # When not using gcc, we currently assume that we are using
6647    # Microsoft Visual C++.
6648    if test "$GCC" != yes; then
6649      with_gnu_ld=no
6650    fi
6651    ;;
6652  interix*)
6653    # we just hope/assume this is gcc and not c89 (= MSVC++)
6654    with_gnu_ld=yes
6655    ;;
6656  openbsd*)
6657    with_gnu_ld=no
6658    ;;
6659  esac
6660
6661  _LT_TAGVAR(ld_shlibs, $1)=yes
6662
6663  # On some targets, GNU ld is compatible enough with the native linker
6664  # that we're better off using the native interface for both.
6665  lt_use_gnu_ld_interface=no
6666  if test "$with_gnu_ld" = yes; then
6667    case $host_os in
6668      aix*)
6669	# The AIX port of GNU ld has always aspired to compatibility
6670	# with the native linker.  However, as the warning in the GNU ld
6671	# block says, versions before 2.19.5* couldn't really create working
6672	# shared libraries, regardless of the interface used.
6673	case `$LD -v 2>&1` in
6674	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
6675	  *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
6676	  *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
6677	  *)
6678	    lt_use_gnu_ld_interface=yes
6679	    ;;
6680	esac
6681	;;
6682      *)
6683	lt_use_gnu_ld_interface=yes
6684	;;
6685    esac
6686  fi
6687
6688  if test "$lt_use_gnu_ld_interface" = yes; then
6689    # If archive_cmds runs LD, not CC, wlarc should be empty
6690    wlarc='${wl}'
6691
6692    # Set some defaults for GNU ld with shared library support. These
6693    # are reset later if shared libraries are not supported. Putting them
6694    # here allows them to be overridden if necessary.
6695    runpath_var=LD_RUN_PATH
6696    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6697    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6698    # ancient GNU ld didn't support --whole-archive et. al.
6699    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
6700      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6701    else
6702      _LT_TAGVAR(whole_archive_flag_spec, $1)=
6703    fi
6704    supports_anon_versioning=no
6705    case `$LD -v 2>&1` in
6706      *GNU\ gold*) supports_anon_versioning=yes ;;
6707      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
6708      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
6709      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
6710      *\ 2.11.*) ;; # other 2.11 versions
6711      *) supports_anon_versioning=yes ;;
6712    esac
6713
6714    # See if GNU ld supports shared libraries.
6715    case $host_os in
6716    aix[[3-9]]*)
6717      # On AIX/PPC, the GNU linker is very broken
6718      if test "$host_cpu" != ia64; then
6719	_LT_TAGVAR(ld_shlibs, $1)=no
6720	cat <<_LT_EOF 1>&2
6721
6722*** Warning: the GNU linker, at least up to release 2.19, is reported
6723*** to be unable to reliably create shared libraries on AIX.
6724*** Therefore, libtool is disabling shared libraries support.  If you
6725*** really care for shared libraries, you may want to install binutils
6726*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
6727*** You will then need to restart the configuration process.
6728
6729_LT_EOF
6730      fi
6731      ;;
6732
6733    amigaos*)
6734      case $host_cpu in
6735      powerpc)
6736            # see comment about AmigaOS4 .so support
6737            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6738            _LT_TAGVAR(archive_expsym_cmds, $1)=''
6739        ;;
6740      m68k)
6741            _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)'
6742            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6743            _LT_TAGVAR(hardcode_minus_L, $1)=yes
6744        ;;
6745      esac
6746      ;;
6747
6748    beos*)
6749      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6750	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6751	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6752	# support --undefined.  This deserves some investigation.  FIXME
6753	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6754      else
6755	_LT_TAGVAR(ld_shlibs, $1)=no
6756      fi
6757      ;;
6758
6759    cygwin* | mingw* | pw32* | cegcc*)
6760      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6761      # as there is no search path for DLLs.
6762      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6763      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
6764      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6765      _LT_TAGVAR(always_export_symbols, $1)=no
6766      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6767      _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'
6768
6769      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6770        _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'
6771	# If the export-symbols file already is a .def file (1st line
6772	# is EXPORTS), use it as is; otherwise, prepend...
6773	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6774	  cp $export_symbols $output_objdir/$soname.def;
6775	else
6776	  echo EXPORTS > $output_objdir/$soname.def;
6777	  cat $export_symbols >> $output_objdir/$soname.def;
6778	fi~
6779	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6780      else
6781	_LT_TAGVAR(ld_shlibs, $1)=no
6782      fi
6783      ;;
6784
6785    haiku*)
6786      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6787      _LT_TAGVAR(link_all_deplibs, $1)=yes
6788      ;;
6789
6790    interix[[3-9]]*)
6791      _LT_TAGVAR(hardcode_direct, $1)=no
6792      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6793      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6794      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6795      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6796      # Instead, shared libraries are loaded at an image base (0x10000000 by
6797      # default) and relocated if they conflict, which is a slow very memory
6798      # consuming and fragmenting process.  To avoid this, we pick a random,
6799      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6800      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
6801      _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'
6802      _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'
6803      ;;
6804
6805    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
6806      tmp_diet=no
6807      if test "$host_os" = linux-dietlibc; then
6808	case $cc_basename in
6809	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
6810	esac
6811      fi
6812      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
6813	 && test "$tmp_diet" = no
6814      then
6815	tmp_addflag=
6816	tmp_sharedflag='-shared'
6817	case $cc_basename,$host_cpu in
6818        pgcc*)				# Portland Group C compiler
6819	  _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'
6820	  tmp_addflag=' $pic_flag'
6821	  ;;
6822	pgf77* | pgf90* | pgf95* | pgfortran*)
6823					# Portland Group f77 and f90 compilers
6824	  _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'
6825	  tmp_addflag=' $pic_flag -Mnomain' ;;
6826	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
6827	  tmp_addflag=' -i_dynamic' ;;
6828	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
6829	  tmp_addflag=' -i_dynamic -nofor_main' ;;
6830	ifc* | ifort*)			# Intel Fortran compiler
6831	  tmp_addflag=' -nofor_main' ;;
6832	lf95*)				# Lahey Fortran 8.1
6833	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
6834	  tmp_sharedflag='--shared' ;;
6835	xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
6836	  tmp_sharedflag='-qmkshrobj'
6837	  tmp_addflag= ;;
6838	nvcc*)	# Cuda Compiler Driver 2.2
6839	  _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'
6840	  _LT_TAGVAR(compiler_needs_object, $1)=yes
6841	  ;;
6842	esac
6843	case `$CC -V 2>&1 | sed 5q` in
6844	*Sun\ C*)			# Sun C 5.9
6845	  _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'
6846	  _LT_TAGVAR(compiler_needs_object, $1)=yes
6847	  tmp_sharedflag='-G' ;;
6848	*Sun\ F*)			# Sun Fortran 8.3
6849	  tmp_sharedflag='-G' ;;
6850	esac
6851	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6852
6853        if test "x$supports_anon_versioning" = xyes; then
6854          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6855	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6856	    echo "local: *; };" >> $output_objdir/$libname.ver~
6857	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6858        fi
6859
6860	case $cc_basename in
6861	xlf* | bgf* | bgxlf* | mpixlf*)
6862	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
6863	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
6864	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6865	  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
6866	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
6867	  if test "x$supports_anon_versioning" = xyes; then
6868	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6869	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6870	      echo "local: *; };" >> $output_objdir/$libname.ver~
6871	      $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
6872	  fi
6873	  ;;
6874	esac
6875      else
6876        _LT_TAGVAR(ld_shlibs, $1)=no
6877      fi
6878      ;;
6879
6880    netbsd*)
6881      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6882	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
6883	wlarc=
6884      else
6885	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6886	_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'
6887      fi
6888      ;;
6889
6890    solaris*)
6891      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
6892	_LT_TAGVAR(ld_shlibs, $1)=no
6893	cat <<_LT_EOF 1>&2
6894
6895*** Warning: The releases 2.8.* of the GNU linker cannot reliably
6896*** create shared libraries on Solaris systems.  Therefore, libtool
6897*** is disabling shared libraries support.  We urge you to upgrade GNU
6898*** binutils to release 2.9.1 or newer.  Another option is to modify
6899*** your PATH or compiler configuration so that the native linker is
6900*** used, and then restart.
6901
6902_LT_EOF
6903      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6904	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6905	_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'
6906      else
6907	_LT_TAGVAR(ld_shlibs, $1)=no
6908      fi
6909      ;;
6910
6911    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
6912      case `$LD -v 2>&1` in
6913        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
6914	_LT_TAGVAR(ld_shlibs, $1)=no
6915	cat <<_LT_EOF 1>&2
6916
6917*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
6918*** reliably create shared libraries on SCO systems.  Therefore, libtool
6919*** is disabling shared libraries support.  We urge you to upgrade GNU
6920*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
6921*** your PATH or compiler configuration so that the native linker is
6922*** used, and then restart.
6923
6924_LT_EOF
6925	;;
6926	*)
6927	  # For security reasons, it is highly recommended that you always
6928	  # use absolute paths for naming shared libraries, and exclude the
6929	  # DT_RUNPATH tag from executables and libraries.  But doing so
6930	  # requires that you compile everything twice, which is a pain.
6931	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6932	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6933	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6934	    _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'
6935	  else
6936	    _LT_TAGVAR(ld_shlibs, $1)=no
6937	  fi
6938	;;
6939      esac
6940      ;;
6941
6942    sunos4*)
6943      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6944      wlarc=
6945      _LT_TAGVAR(hardcode_direct, $1)=yes
6946      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6947      ;;
6948
6949    *)
6950      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6951	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6952	_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'
6953      else
6954	_LT_TAGVAR(ld_shlibs, $1)=no
6955      fi
6956      ;;
6957    esac
6958
6959    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
6960      runpath_var=
6961      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6962      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6963      _LT_TAGVAR(whole_archive_flag_spec, $1)=
6964    fi
6965  else
6966    # PORTME fill in a description of your system's linker (not GNU ld)
6967    case $host_os in
6968    aix3*)
6969      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6970      _LT_TAGVAR(always_export_symbols, $1)=yes
6971      _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'
6972      # Note: this linker hardcodes the directories in LIBPATH if there
6973      # are no directories specified by -L.
6974      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6975      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
6976	# Neither direct hardcoding nor static linking is supported with a
6977	# broken collect2.
6978	_LT_TAGVAR(hardcode_direct, $1)=unsupported
6979      fi
6980      ;;
6981
6982    aix[[4-9]]*)
6983      if test "$host_cpu" = ia64; then
6984	# On IA64, the linker does run time linking by default, so we don't
6985	# have to do anything special.
6986	aix_use_runtimelinking=no
6987	exp_sym_flag='-Bexport'
6988	no_entry_flag=""
6989      else
6990	# If we're using GNU nm, then we don't want the "-C" option.
6991	# -C means demangle to AIX nm, but means don't demangle with GNU nm
6992	# Also, AIX nm treats weak defined symbols like other global
6993	# defined symbols, whereas GNU nm marks them as "W".
6994	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
6995	  _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'
6996	else
6997	  _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'
6998	fi
6999	aix_use_runtimelinking=no
7000
7001	# Test if we are trying to use run time linking or normal
7002	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
7003	# need to do runtime linking.
7004	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
7005	  for ld_flag in $LDFLAGS; do
7006	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
7007	    aix_use_runtimelinking=yes
7008	    break
7009	  fi
7010	  done
7011	  ;;
7012	esac
7013
7014	exp_sym_flag='-bexport'
7015	no_entry_flag='-bnoentry'
7016      fi
7017
7018      # When large executables or shared objects are built, AIX ld can
7019      # have problems creating the table of contents.  If linking a library
7020      # or program results in "error TOC overflow" add -mminimal-toc to
7021      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
7022      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7023
7024      _LT_TAGVAR(archive_cmds, $1)=''
7025      _LT_TAGVAR(hardcode_direct, $1)=yes
7026      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7027      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7028      _LT_TAGVAR(link_all_deplibs, $1)=yes
7029      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
7030
7031      if test "$GCC" = yes; then
7032	case $host_os in aix4.[[012]]|aix4.[[012]].*)
7033	# We only want to do this on AIX 4.2 and lower, the check
7034	# below for broken collect2 doesn't work under 4.3+
7035	  collect2name=`${CC} -print-prog-name=collect2`
7036	  if test -f "$collect2name" &&
7037	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
7038	  then
7039	  # We have reworked collect2
7040	  :
7041	  else
7042	  # We have old collect2
7043	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
7044	  # It fails to find uninstalled libraries when the uninstalled
7045	  # path is not listed in the libpath.  Setting hardcode_minus_L
7046	  # to unsupported forces relinking
7047	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
7048	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7049	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
7050	  fi
7051	  ;;
7052	esac
7053	shared_flag='-shared'
7054	if test "$aix_use_runtimelinking" = yes; then
7055	  shared_flag="$shared_flag "'${wl}-G'
7056	fi
7057      else
7058	# not using gcc
7059	if test "$host_cpu" = ia64; then
7060	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
7061	# chokes on -Wl,-G. The following line is correct:
7062	  shared_flag='-G'
7063	else
7064	  if test "$aix_use_runtimelinking" = yes; then
7065	    shared_flag='${wl}-G'
7066	  else
7067	    shared_flag='${wl}-bM:SRE'
7068	  fi
7069	fi
7070      fi
7071
7072      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
7073      # It seems that -bexpall does not export symbols beginning with
7074      # underscore (_), so it is better to generate a list of symbols to export.
7075      _LT_TAGVAR(always_export_symbols, $1)=yes
7076      if test "$aix_use_runtimelinking" = yes; then
7077	# Warning - without using the other runtime loading flags (-brtl),
7078	# -berok will link without error, but may produce a broken library.
7079	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
7080        # Determine the default libpath from the value encoded in an
7081        # empty executable.
7082        _LT_SYS_MODULE_PATH_AIX
7083        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7084        _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"
7085      else
7086	if test "$host_cpu" = ia64; then
7087	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
7088	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
7089	  _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"
7090	else
7091	 # Determine the default libpath from the value encoded in an
7092	 # empty executable.
7093	 _LT_SYS_MODULE_PATH_AIX
7094	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7095	  # Warning - without using the other run time loading flags,
7096	  # -berok will link without error, but may produce a broken library.
7097	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
7098	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
7099	  if test "$with_gnu_ld" = yes; then
7100	    # We only use this code for GNU lds that support --whole-archive.
7101	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
7102	  else
7103	    # Exported symbols can be pulled into shared objects from archives
7104	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
7105	  fi
7106	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7107	  # This is similar to how AIX traditionally builds its shared libraries.
7108	  _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'
7109	fi
7110      fi
7111      ;;
7112
7113    amigaos*)
7114      case $host_cpu in
7115      powerpc)
7116            # see comment about AmigaOS4 .so support
7117            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7118            _LT_TAGVAR(archive_expsym_cmds, $1)=''
7119        ;;
7120      m68k)
7121            _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)'
7122            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7123            _LT_TAGVAR(hardcode_minus_L, $1)=yes
7124        ;;
7125      esac
7126      ;;
7127
7128    bsdi[[45]]*)
7129      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
7130      ;;
7131
7132    cygwin* | mingw* | pw32* | cegcc*)
7133      # When not using gcc, we currently assume that we are using
7134      # Microsoft Visual C++.
7135      # hardcode_libdir_flag_spec is actually meaningless, as there is
7136      # no search path for DLLs.
7137      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
7138      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7139      # Tell ltmain to make .lib files, not .a files.
7140      libext=lib
7141      # Tell ltmain to make .dll files, not .so files.
7142      shrext_cmds=".dll"
7143      # FIXME: Setting linknames here is a bad hack.
7144      _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
7145      # The linker will automatically build a .lib file if we build a DLL.
7146      _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
7147      # FIXME: Should let the user specify the lib program.
7148      _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
7149      _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
7150      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7151      ;;
7152
7153    darwin* | rhapsody*)
7154      _LT_DARWIN_LINKER_FEATURES($1)
7155      ;;
7156
7157    dgux*)
7158      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7159      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7160      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7161      ;;
7162
7163    freebsd1*)
7164      _LT_TAGVAR(ld_shlibs, $1)=no
7165      ;;
7166
7167    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
7168    # support.  Future versions do this automatically, but an explicit c++rt0.o
7169    # does not break anything, and helps significantly (at the cost of a little
7170    # extra space).
7171    freebsd2.2*)
7172      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
7173      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7174      _LT_TAGVAR(hardcode_direct, $1)=yes
7175      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7176      ;;
7177
7178    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
7179    freebsd2*)
7180      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7181      _LT_TAGVAR(hardcode_direct, $1)=yes
7182      _LT_TAGVAR(hardcode_minus_L, $1)=yes
7183      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7184      ;;
7185
7186    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
7187    freebsd* | dragonfly*)
7188      _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
7189      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7190      _LT_TAGVAR(hardcode_direct, $1)=yes
7191      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7192      ;;
7193
7194    hpux9*)
7195      if test "$GCC" = yes; then
7196	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
7197      else
7198	_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'
7199      fi
7200      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7201      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7202      _LT_TAGVAR(hardcode_direct, $1)=yes
7203
7204      # hardcode_minus_L: Not really in the search PATH,
7205      # but as the default location of the library.
7206      _LT_TAGVAR(hardcode_minus_L, $1)=yes
7207      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7208      ;;
7209
7210    hpux10*)
7211      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
7212	_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7213      else
7214	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
7215      fi
7216      if test "$with_gnu_ld" = no; then
7217	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7218	_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
7219	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
7220	_LT_TAGVAR(hardcode_direct, $1)=yes
7221	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7222	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7223	# hardcode_minus_L: Not really in the search PATH,
7224	# but as the default location of the library.
7225	_LT_TAGVAR(hardcode_minus_L, $1)=yes
7226      fi
7227      ;;
7228
7229    hpux11*)
7230      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
7231	case $host_cpu in
7232	hppa*64*)
7233	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7234	  ;;
7235	ia64*)
7236	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
7237	  ;;
7238	*)
7239	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7240	  ;;
7241	esac
7242      else
7243	case $host_cpu in
7244	hppa*64*)
7245	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7246	  ;;
7247	ia64*)
7248	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
7249	  ;;
7250	*)
7251	m4_if($1, [], [
7252	  # Older versions of the 11.00 compiler do not understand -b yet
7253	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
7254	  _LT_LINKER_OPTION([if $CC understands -b],
7255	    _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
7256	    [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
7257	    [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
7258	  [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
7259	  ;;
7260	esac
7261      fi
7262      if test "$with_gnu_ld" = no; then
7263	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7264	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
7265
7266	case $host_cpu in
7267	hppa*64*|ia64*)
7268	  _LT_TAGVAR(hardcode_direct, $1)=no
7269	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7270	  ;;
7271	*)
7272	  _LT_TAGVAR(hardcode_direct, $1)=yes
7273	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7274	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7275
7276	  # hardcode_minus_L: Not really in the search PATH,
7277	  # but as the default location of the library.
7278	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
7279	  ;;
7280	esac
7281      fi
7282      ;;
7283
7284    irix5* | irix6* | nonstopux*)
7285      if test "$GCC" = yes; then
7286	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $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'
7287	# Try to use the -exported_symbol ld option, if it does not
7288	# work, assume that -exports_file does not work either and
7289	# implicitly export all symbols.
7290        save_LDFLAGS="$LDFLAGS"
7291        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
7292        AC_LINK_IFELSE(int foo(void) {},
7293          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $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'
7294        )
7295        LDFLAGS="$save_LDFLAGS"
7296      else
7297	_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'
7298	_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'
7299      fi
7300      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
7301      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7302      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7303      _LT_TAGVAR(inherit_rpath, $1)=yes
7304      _LT_TAGVAR(link_all_deplibs, $1)=yes
7305      ;;
7306
7307    netbsd*)
7308      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7309	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
7310      else
7311	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
7312      fi
7313      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7314      _LT_TAGVAR(hardcode_direct, $1)=yes
7315      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7316      ;;
7317
7318    newsos6)
7319      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7320      _LT_TAGVAR(hardcode_direct, $1)=yes
7321      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7322      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7323      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7324      ;;
7325
7326    *nto* | *qnx*)
7327      ;;
7328
7329    openbsd*)
7330      if test -f /usr/libexec/ld.so; then
7331	_LT_TAGVAR(hardcode_direct, $1)=yes
7332	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7333	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7334	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7335	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7336	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
7337	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7338	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7339	else
7340	  case $host_os in
7341	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
7342	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7343	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7344	     ;;
7345	   *)
7346	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7347	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7348	     ;;
7349	  esac
7350	fi
7351      else
7352	_LT_TAGVAR(ld_shlibs, $1)=no
7353      fi
7354      ;;
7355
7356    os2*)
7357      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7358      _LT_TAGVAR(hardcode_minus_L, $1)=yes
7359      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7360      _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'
7361      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
7362      ;;
7363
7364    osf3*)
7365      if test "$GCC" = yes; then
7366	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7367	_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'
7368      else
7369	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7370	_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'
7371      fi
7372      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
7373      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7374      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7375      ;;
7376
7377    osf4* | osf5*)	# as osf3* with the addition of -msym flag
7378      if test "$GCC" = yes; then
7379	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7380	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_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'
7381	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7382      else
7383	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7384	_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'
7385	_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~
7386	$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'
7387
7388	# Both c and cxx compiler support -rpath directly
7389	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7390      fi
7391      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
7392      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7393      ;;
7394
7395    solaris*)
7396      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
7397      if test "$GCC" = yes; then
7398	wlarc='${wl}'
7399	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7400	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7401	  $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
7402      else
7403	case `$CC -V 2>&1` in
7404	*"Compilers 5.0"*)
7405	  wlarc=''
7406	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
7407	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7408	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
7409	  ;;
7410	*)
7411	  wlarc='${wl}'
7412	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
7413	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7414	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
7415	  ;;
7416	esac
7417      fi
7418      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7419      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7420      case $host_os in
7421      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7422      *)
7423	# The compiler driver will combine and reorder linker options,
7424	# but understands `-z linker_flag'.  GCC discards it without `$wl',
7425	# but is careful enough not to reorder.
7426	# Supported since Solaris 2.6 (maybe 2.5.1?)
7427	if test "$GCC" = yes; then
7428	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
7429	else
7430	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7431	fi
7432	;;
7433      esac
7434      _LT_TAGVAR(link_all_deplibs, $1)=yes
7435      ;;
7436
7437    sunos4*)
7438      if test "x$host_vendor" = xsequent; then
7439	# Use $CC to link under sequent, because it throws in some extra .o
7440	# files that make .init and .fini sections work.
7441	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
7442      else
7443	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
7444      fi
7445      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7446      _LT_TAGVAR(hardcode_direct, $1)=yes
7447      _LT_TAGVAR(hardcode_minus_L, $1)=yes
7448      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7449      ;;
7450
7451    sysv4)
7452      case $host_vendor in
7453	sni)
7454	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7455	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
7456	;;
7457	siemens)
7458	  ## LD is ld it makes a PLAMLIB
7459	  ## CC just makes a GrossModule.
7460	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
7461	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
7462	  _LT_TAGVAR(hardcode_direct, $1)=no
7463        ;;
7464	motorola)
7465	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7466	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
7467	;;
7468      esac
7469      runpath_var='LD_RUN_PATH'
7470      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7471      ;;
7472
7473    sysv4.3*)
7474      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7475      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7476      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
7477      ;;
7478
7479    sysv4*MP*)
7480      if test -d /usr/nec; then
7481	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7482	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7483	runpath_var=LD_RUN_PATH
7484	hardcode_runpath_var=yes
7485	_LT_TAGVAR(ld_shlibs, $1)=yes
7486      fi
7487      ;;
7488
7489    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7490      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7491      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7492      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7493      runpath_var='LD_RUN_PATH'
7494
7495      if test "$GCC" = yes; then
7496	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7497	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7498      else
7499	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7500	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7501      fi
7502      ;;
7503
7504    sysv5* | sco3.2v5* | sco5v6*)
7505      # Note: We can NOT use -z defs as we might desire, because we do not
7506      # link with -lc, and that would cause any symbols used from libc to
7507      # always be unresolved, which means just about no library would
7508      # ever link correctly.  If we're not using GNU ld we use -z text
7509      # though, which does catch some bad symbols but isn't as heavy-handed
7510      # as -z defs.
7511      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7512      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
7513      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7514      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7515      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
7516      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7517      _LT_TAGVAR(link_all_deplibs, $1)=yes
7518      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
7519      runpath_var='LD_RUN_PATH'
7520
7521      if test "$GCC" = yes; then
7522	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7523	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7524      else
7525	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7526	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7527      fi
7528      ;;
7529
7530    uts4*)
7531      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7532      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7533      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7534      ;;
7535
7536    *)
7537      _LT_TAGVAR(ld_shlibs, $1)=no
7538      ;;
7539    esac
7540
7541    if test x$host_vendor = xsni; then
7542      case $host in
7543      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
7544	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
7545	;;
7546      esac
7547    fi
7548  fi
7549])
7550AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7551test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7552
7553_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
7554
7555_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
7556_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
7557_LT_DECL([], [extract_expsyms_cmds], [2],
7558    [The commands to extract the exported symbol list from a shared archive])
7559
7560#
7561# Do we need to explicitly link libc?
7562#
7563case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
7564x|xyes)
7565  # Assume -lc should be added
7566  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7567
7568  if test "$enable_shared" = yes && test "$GCC" = yes; then
7569    case $_LT_TAGVAR(archive_cmds, $1) in
7570    *'~'*)
7571      # FIXME: we may have to deal with multi-command sequences.
7572      ;;
7573    '$CC '*)
7574      # Test whether the compiler implicitly links with -lc since on some
7575      # systems, -lgcc has to come before -lc. If gcc already passes -lc
7576      # to ld, don't add -lc before -lgcc.
7577      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
7578	[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
7579	[$RM conftest*
7580	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
7581
7582	if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
7583	  soname=conftest
7584	  lib=conftest
7585	  libobjs=conftest.$ac_objext
7586	  deplibs=
7587	  wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
7588	  pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
7589	  compiler_flags=-v
7590	  linker_flags=-v
7591	  verstring=
7592	  output_objdir=.
7593	  libname=conftest
7594	  lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
7595	  _LT_TAGVAR(allow_undefined_flag, $1)=
7596	  if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
7597	  then
7598	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7599	  else
7600	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7601	  fi
7602	  _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
7603	else
7604	  cat conftest.err 1>&5
7605	fi
7606	$RM conftest*
7607	])
7608      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
7609      ;;
7610    esac
7611  fi
7612  ;;
7613esac
7614
7615_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
7616    [Whether or not to add -lc for building shared libraries])
7617_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
7618    [enable_shared_with_static_runtimes], [0],
7619    [Whether or not to disallow shared libs when runtime libs are static])
7620_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
7621    [Compiler flag to allow reflexive dlopens])
7622_LT_TAGDECL([], [whole_archive_flag_spec], [1],
7623    [Compiler flag to generate shared objects directly from archives])
7624_LT_TAGDECL([], [compiler_needs_object], [1],
7625    [Whether the compiler copes with passing no objects directly])
7626_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
7627    [Create an old-style archive from a shared archive])
7628_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
7629    [Create a temporary old-style archive to link instead of a shared archive])
7630_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
7631_LT_TAGDECL([], [archive_expsym_cmds], [2])
7632_LT_TAGDECL([], [module_cmds], [2],
7633    [Commands used to build a loadable module if different from building
7634    a shared archive.])
7635_LT_TAGDECL([], [module_expsym_cmds], [2])
7636_LT_TAGDECL([], [with_gnu_ld], [1],
7637    [Whether we are building with GNU ld or not])
7638_LT_TAGDECL([], [allow_undefined_flag], [1],
7639    [Flag that allows shared libraries with undefined symbols to be built])
7640_LT_TAGDECL([], [no_undefined_flag], [1],
7641    [Flag that enforces no undefined symbols])
7642_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
7643    [Flag to hardcode $libdir into a binary during linking.
7644    This must work even if $libdir does not exist])
7645_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
7646    [[If ld is used when linking, flag to hardcode $libdir into a binary
7647    during linking.  This must work even if $libdir does not exist]])
7648_LT_TAGDECL([], [hardcode_libdir_separator], [1],
7649    [Whether we need a single "-rpath" flag with a separated argument])
7650_LT_TAGDECL([], [hardcode_direct], [0],
7651    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
7652    DIR into the resulting binary])
7653_LT_TAGDECL([], [hardcode_direct_absolute], [0],
7654    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
7655    DIR into the resulting binary and the resulting library dependency is
7656    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
7657    library is relocated])
7658_LT_TAGDECL([], [hardcode_minus_L], [0],
7659    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
7660    into the resulting binary])
7661_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
7662    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
7663    into the resulting binary])
7664_LT_TAGDECL([], [hardcode_automatic], [0],
7665    [Set to "yes" if building a shared library automatically hardcodes DIR
7666    into the library and all subsequent libraries and executables linked
7667    against it])
7668_LT_TAGDECL([], [inherit_rpath], [0],
7669    [Set to yes if linker adds runtime paths of dependent libraries
7670    to runtime path list])
7671_LT_TAGDECL([], [link_all_deplibs], [0],
7672    [Whether libtool must link a program against all its dependency libraries])
7673_LT_TAGDECL([], [fix_srcfile_path], [1],
7674    [Fix the shell variable $srcfile for the compiler])
7675_LT_TAGDECL([], [always_export_symbols], [0],
7676    [Set to "yes" if exported symbols are required])
7677_LT_TAGDECL([], [export_symbols_cmds], [2],
7678    [The commands to list exported symbols])
7679_LT_TAGDECL([], [exclude_expsyms], [1],
7680    [Symbols that should not be listed in the preloaded symbols])
7681_LT_TAGDECL([], [include_expsyms], [1],
7682    [Symbols that must always be exported])
7683_LT_TAGDECL([], [prelink_cmds], [2],
7684    [Commands necessary for linking programs (against libraries) with templates])
7685_LT_TAGDECL([], [file_list_spec], [1],
7686    [Specify filename containing input files])
7687dnl FIXME: Not yet implemented
7688dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
7689dnl    [Compiler flag to generate thread safe objects])
7690])# _LT_LINKER_SHLIBS
7691
7692
7693# _LT_LANG_C_CONFIG([TAG])
7694# ------------------------
7695# Ensure that the configuration variables for a C compiler are suitably
7696# defined.  These variables are subsequently used by _LT_CONFIG to write
7697# the compiler configuration to `libtool'.
7698m4_defun([_LT_LANG_C_CONFIG],
7699[m4_require([_LT_DECL_EGREP])dnl
7700lt_save_CC="$CC"
7701AC_LANG_PUSH(C)
7702
7703# Source file extension for C test sources.
7704ac_ext=c
7705
7706# Object file extension for compiled C test sources.
7707objext=o
7708_LT_TAGVAR(objext, $1)=$objext
7709
7710# Code to be used in simple compile tests
7711lt_simple_compile_test_code="int some_variable = 0;"
7712
7713# Code to be used in simple link tests
7714lt_simple_link_test_code='int main(){return(0);}'
7715
7716_LT_TAG_COMPILER
7717# Save the default compiler, since it gets overwritten when the other
7718# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
7719compiler_DEFAULT=$CC
7720
7721# save warnings/boilerplate of simple test code
7722_LT_COMPILER_BOILERPLATE
7723_LT_LINKER_BOILERPLATE
7724
7725if test -n "$compiler"; then
7726  _LT_COMPILER_NO_RTTI($1)
7727  _LT_COMPILER_PIC($1)
7728  _LT_COMPILER_C_O($1)
7729  _LT_COMPILER_FILE_LOCKS($1)
7730  _LT_LINKER_SHLIBS($1)
7731  _LT_SYS_DYNAMIC_LINKER($1)
7732  _LT_LINKER_HARDCODE_LIBPATH($1)
7733  LT_SYS_DLOPEN_SELF
7734  _LT_CMD_STRIPLIB
7735
7736  # Report which library types will actually be built
7737  AC_MSG_CHECKING([if libtool supports shared libraries])
7738  AC_MSG_RESULT([$can_build_shared])
7739
7740  AC_MSG_CHECKING([whether to build shared libraries])
7741  test "$can_build_shared" = "no" && enable_shared=no
7742
7743  # On AIX, shared libraries and static libraries use the same namespace, and
7744  # are all built from PIC.
7745  case $host_os in
7746  aix3*)
7747    test "$enable_shared" = yes && enable_static=no
7748    if test -n "$RANLIB"; then
7749      archive_cmds="$archive_cmds~\$RANLIB \$lib"
7750      postinstall_cmds='$RANLIB $lib'
7751    fi
7752    ;;
7753
7754  aix[[4-9]]*)
7755    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7756      test "$enable_shared" = yes && enable_static=no
7757    fi
7758    ;;
7759  esac
7760  AC_MSG_RESULT([$enable_shared])
7761
7762  AC_MSG_CHECKING([whether to build static libraries])
7763  # Make sure either enable_shared or enable_static is yes.
7764  test "$enable_shared" = yes || enable_static=yes
7765  AC_MSG_RESULT([$enable_static])
7766
7767  _LT_CONFIG($1)
7768fi
7769AC_LANG_POP
7770CC="$lt_save_CC"
7771])# _LT_LANG_C_CONFIG
7772
7773
7774# _LT_LANG_CXX_CONFIG([TAG])
7775# --------------------------
7776# Ensure that the configuration variables for a C++ compiler are suitably
7777# defined.  These variables are subsequently used by _LT_CONFIG to write
7778# the compiler configuration to `libtool'.
7779m4_defun([_LT_LANG_CXX_CONFIG],
7780[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7781m4_require([_LT_DECL_EGREP])dnl
7782if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
7783    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
7784    (test "X$CXX" != "Xg++"))) ; then
7785  AC_PROG_CXXCPP
7786else
7787  _lt_caught_CXX_error=yes
7788fi
7789
7790AC_LANG_PUSH(C++)
7791_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7792_LT_TAGVAR(allow_undefined_flag, $1)=
7793_LT_TAGVAR(always_export_symbols, $1)=no
7794_LT_TAGVAR(archive_expsym_cmds, $1)=
7795_LT_TAGVAR(compiler_needs_object, $1)=no
7796_LT_TAGVAR(export_dynamic_flag_spec, $1)=
7797_LT_TAGVAR(hardcode_direct, $1)=no
7798_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7799_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7800_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7801_LT_TAGVAR(hardcode_libdir_separator, $1)=
7802_LT_TAGVAR(hardcode_minus_L, $1)=no
7803_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
7804_LT_TAGVAR(hardcode_automatic, $1)=no
7805_LT_TAGVAR(inherit_rpath, $1)=no
7806_LT_TAGVAR(module_cmds, $1)=
7807_LT_TAGVAR(module_expsym_cmds, $1)=
7808_LT_TAGVAR(link_all_deplibs, $1)=unknown
7809_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7810_LT_TAGVAR(reload_flag, $1)=$reload_flag
7811_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7812_LT_TAGVAR(no_undefined_flag, $1)=
7813_LT_TAGVAR(whole_archive_flag_spec, $1)=
7814_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7815
7816# Source file extension for C++ test sources.
7817ac_ext=cpp
7818
7819# Object file extension for compiled C++ test sources.
7820objext=o
7821_LT_TAGVAR(objext, $1)=$objext
7822
7823# No sense in running all these tests if we already determined that
7824# the CXX compiler isn't working.  Some variables (like enable_shared)
7825# are currently assumed to apply to all compilers on this platform,
7826# and will be corrupted by setting them based on a non-working compiler.
7827if test "$_lt_caught_CXX_error" != yes; then
7828  # Code to be used in simple compile tests
7829  lt_simple_compile_test_code="int some_variable = 0;"
7830
7831  # Code to be used in simple link tests
7832  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
7833
7834  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7835  _LT_TAG_COMPILER
7836
7837  # save warnings/boilerplate of simple test code
7838  _LT_COMPILER_BOILERPLATE
7839  _LT_LINKER_BOILERPLATE
7840
7841  # Allow CC to be a program name with arguments.
7842  lt_save_CC=$CC
7843  lt_save_LD=$LD
7844  lt_save_GCC=$GCC
7845  GCC=$GXX
7846  lt_save_with_gnu_ld=$with_gnu_ld
7847  lt_save_path_LD=$lt_cv_path_LD
7848  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
7849    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
7850  else
7851    $as_unset lt_cv_prog_gnu_ld
7852  fi
7853  if test -n "${lt_cv_path_LDCXX+set}"; then
7854    lt_cv_path_LD=$lt_cv_path_LDCXX
7855  else
7856    $as_unset lt_cv_path_LD
7857  fi
7858  test -z "${LDCXX+set}" || LD=$LDCXX
7859  CC=${CXX-"c++"}
7860  compiler=$CC
7861  _LT_TAGVAR(compiler, $1)=$CC
7862  _LT_CC_BASENAME([$compiler])
7863
7864  if test -n "$compiler"; then
7865    # We don't want -fno-exception when compiling C++ code, so set the
7866    # no_builtin_flag separately
7867    if test "$GXX" = yes; then
7868      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
7869    else
7870      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
7871    fi
7872
7873    if test "$GXX" = yes; then
7874      # Set up default GNU C++ configuration
7875
7876      LT_PATH_LD
7877
7878      # Check if GNU C++ uses GNU ld as the underlying linker, since the
7879      # archiving commands below assume that GNU ld is being used.
7880      if test "$with_gnu_ld" = yes; then
7881        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7882        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7883
7884        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7885        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7886
7887        # If archive_cmds runs LD, not CC, wlarc should be empty
7888        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
7889        #     investigate it a little bit more. (MM)
7890        wlarc='${wl}'
7891
7892        # ancient GNU ld didn't support --whole-archive et. al.
7893        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
7894	  $GREP 'no-whole-archive' > /dev/null; then
7895          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7896        else
7897          _LT_TAGVAR(whole_archive_flag_spec, $1)=
7898        fi
7899      else
7900        with_gnu_ld=no
7901        wlarc=
7902
7903        # A generic and very simple default shared library creation
7904        # command for GNU C++ for the case where it uses the native
7905        # linker, instead of GNU ld.  If possible, this setting should
7906        # overridden to take advantage of the native linker features on
7907        # the platform it is being used on.
7908        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7909      fi
7910
7911      # Commands to make compiler produce verbose output that lists
7912      # what "hidden" libraries, object files and flags are used when
7913      # linking a shared library.
7914      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7915
7916    else
7917      GXX=no
7918      with_gnu_ld=no
7919      wlarc=
7920    fi
7921
7922    # PORTME: fill in a description of your system's C++ link characteristics
7923    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
7924    _LT_TAGVAR(ld_shlibs, $1)=yes
7925    case $host_os in
7926      aix3*)
7927        # FIXME: insert proper C++ library support
7928        _LT_TAGVAR(ld_shlibs, $1)=no
7929        ;;
7930      aix[[4-9]]*)
7931        if test "$host_cpu" = ia64; then
7932          # On IA64, the linker does run time linking by default, so we don't
7933          # have to do anything special.
7934          aix_use_runtimelinking=no
7935          exp_sym_flag='-Bexport'
7936          no_entry_flag=""
7937        else
7938          aix_use_runtimelinking=no
7939
7940          # Test if we are trying to use run time linking or normal
7941          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
7942          # need to do runtime linking.
7943          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
7944	    for ld_flag in $LDFLAGS; do
7945	      case $ld_flag in
7946	      *-brtl*)
7947	        aix_use_runtimelinking=yes
7948	        break
7949	        ;;
7950	      esac
7951	    done
7952	    ;;
7953          esac
7954
7955          exp_sym_flag='-bexport'
7956          no_entry_flag='-bnoentry'
7957        fi
7958
7959        # When large executables or shared objects are built, AIX ld can
7960        # have problems creating the table of contents.  If linking a library
7961        # or program results in "error TOC overflow" add -mminimal-toc to
7962        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
7963        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7964
7965        _LT_TAGVAR(archive_cmds, $1)=''
7966        _LT_TAGVAR(hardcode_direct, $1)=yes
7967        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7968        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7969        _LT_TAGVAR(link_all_deplibs, $1)=yes
7970        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
7971
7972        if test "$GXX" = yes; then
7973          case $host_os in aix4.[[012]]|aix4.[[012]].*)
7974          # We only want to do this on AIX 4.2 and lower, the check
7975          # below for broken collect2 doesn't work under 4.3+
7976	  collect2name=`${CC} -print-prog-name=collect2`
7977	  if test -f "$collect2name" &&
7978	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
7979	  then
7980	    # We have reworked collect2
7981	    :
7982	  else
7983	    # We have old collect2
7984	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
7985	    # It fails to find uninstalled libraries when the uninstalled
7986	    # path is not listed in the libpath.  Setting hardcode_minus_L
7987	    # to unsupported forces relinking
7988	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
7989	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7990	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
7991	  fi
7992          esac
7993          shared_flag='-shared'
7994	  if test "$aix_use_runtimelinking" = yes; then
7995	    shared_flag="$shared_flag "'${wl}-G'
7996	  fi
7997        else
7998          # not using gcc
7999          if test "$host_cpu" = ia64; then
8000	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
8001	  # chokes on -Wl,-G. The following line is correct:
8002	  shared_flag='-G'
8003          else
8004	    if test "$aix_use_runtimelinking" = yes; then
8005	      shared_flag='${wl}-G'
8006	    else
8007	      shared_flag='${wl}-bM:SRE'
8008	    fi
8009          fi
8010        fi
8011
8012        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
8013        # It seems that -bexpall does not export symbols beginning with
8014        # underscore (_), so it is better to generate a list of symbols to
8015	# export.
8016        _LT_TAGVAR(always_export_symbols, $1)=yes
8017        if test "$aix_use_runtimelinking" = yes; then
8018          # Warning - without using the other runtime loading flags (-brtl),
8019          # -berok will link without error, but may produce a broken library.
8020          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
8021          # Determine the default libpath from the value encoded in an empty
8022          # executable.
8023          _LT_SYS_MODULE_PATH_AIX
8024          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
8025
8026          _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"
8027        else
8028          if test "$host_cpu" = ia64; then
8029	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
8030	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
8031	    _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"
8032          else
8033	    # Determine the default libpath from the value encoded in an
8034	    # empty executable.
8035	    _LT_SYS_MODULE_PATH_AIX
8036	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
8037	    # Warning - without using the other run time loading flags,
8038	    # -berok will link without error, but may produce a broken library.
8039	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
8040	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
8041	    if test "$with_gnu_ld" = yes; then
8042	      # We only use this code for GNU lds that support --whole-archive.
8043	      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
8044	    else
8045	      # Exported symbols can be pulled into shared objects from archives
8046	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
8047	    fi
8048	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
8049	    # This is similar to how AIX traditionally builds its shared
8050	    # libraries.
8051	    _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'
8052          fi
8053        fi
8054        ;;
8055
8056      beos*)
8057	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
8058	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
8059	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
8060	  # support --undefined.  This deserves some investigation.  FIXME
8061	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8062	else
8063	  _LT_TAGVAR(ld_shlibs, $1)=no
8064	fi
8065	;;
8066
8067      chorus*)
8068        case $cc_basename in
8069          *)
8070	  # FIXME: insert proper C++ library support
8071	  _LT_TAGVAR(ld_shlibs, $1)=no
8072	  ;;
8073        esac
8074        ;;
8075
8076      cygwin* | mingw* | pw32* | cegcc*)
8077        # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
8078        # as there is no search path for DLLs.
8079        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8080        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
8081        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
8082        _LT_TAGVAR(always_export_symbols, $1)=no
8083        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
8084
8085        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
8086          _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'
8087          # If the export-symbols file already is a .def file (1st line
8088          # is EXPORTS), use it as is; otherwise, prepend...
8089          _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
8090	    cp $export_symbols $output_objdir/$soname.def;
8091          else
8092	    echo EXPORTS > $output_objdir/$soname.def;
8093	    cat $export_symbols >> $output_objdir/$soname.def;
8094          fi~
8095          $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'
8096        else
8097          _LT_TAGVAR(ld_shlibs, $1)=no
8098        fi
8099        ;;
8100      darwin* | rhapsody*)
8101        _LT_DARWIN_LINKER_FEATURES($1)
8102	;;
8103
8104      dgux*)
8105        case $cc_basename in
8106          ec++*)
8107	    # FIXME: insert proper C++ library support
8108	    _LT_TAGVAR(ld_shlibs, $1)=no
8109	    ;;
8110          ghcx*)
8111	    # Green Hills C++ Compiler
8112	    # FIXME: insert proper C++ library support
8113	    _LT_TAGVAR(ld_shlibs, $1)=no
8114	    ;;
8115          *)
8116	    # FIXME: insert proper C++ library support
8117	    _LT_TAGVAR(ld_shlibs, $1)=no
8118	    ;;
8119        esac
8120        ;;
8121
8122      freebsd[[12]]*)
8123        # C++ shared libraries reported to be fairly broken before
8124	# switch to ELF
8125        _LT_TAGVAR(ld_shlibs, $1)=no
8126        ;;
8127
8128      freebsd-elf*)
8129        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8130        ;;
8131
8132      freebsd* | dragonfly*)
8133        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
8134        # conventions
8135        _LT_TAGVAR(ld_shlibs, $1)=yes
8136        ;;
8137
8138      gnu*)
8139        ;;
8140
8141      haiku*)
8142        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8143        _LT_TAGVAR(link_all_deplibs, $1)=yes
8144        ;;
8145
8146      hpux9*)
8147        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8148        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8149        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8150        _LT_TAGVAR(hardcode_direct, $1)=yes
8151        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
8152				             # but as the default
8153				             # location of the library.
8154
8155        case $cc_basename in
8156          CC*)
8157            # FIXME: insert proper C++ library support
8158            _LT_TAGVAR(ld_shlibs, $1)=no
8159            ;;
8160          aCC*)
8161            _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'
8162            # Commands to make compiler produce verbose output that lists
8163            # what "hidden" libraries, object files and flags are used when
8164            # linking a shared library.
8165            #
8166            # There doesn't appear to be a way to prevent this compiler from
8167            # explicitly linking system object files so we need to strip them
8168            # from the output so that they don't get included in the library
8169            # dependencies.
8170            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"'
8171            ;;
8172          *)
8173            if test "$GXX" = yes; then
8174              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
8175            else
8176              # FIXME: insert proper C++ library support
8177              _LT_TAGVAR(ld_shlibs, $1)=no
8178            fi
8179            ;;
8180        esac
8181        ;;
8182
8183      hpux10*|hpux11*)
8184        if test $with_gnu_ld = no; then
8185	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8186	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8187
8188          case $host_cpu in
8189            hppa*64*|ia64*)
8190              ;;
8191            *)
8192	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8193              ;;
8194          esac
8195        fi
8196        case $host_cpu in
8197          hppa*64*|ia64*)
8198            _LT_TAGVAR(hardcode_direct, $1)=no
8199            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8200            ;;
8201          *)
8202            _LT_TAGVAR(hardcode_direct, $1)=yes
8203            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
8204            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
8205					         # but as the default
8206					         # location of the library.
8207            ;;
8208        esac
8209
8210        case $cc_basename in
8211          CC*)
8212	    # FIXME: insert proper C++ library support
8213	    _LT_TAGVAR(ld_shlibs, $1)=no
8214	    ;;
8215          aCC*)
8216	    case $host_cpu in
8217	      hppa*64*)
8218	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8219	        ;;
8220	      ia64*)
8221	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8222	        ;;
8223	      *)
8224	        _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'
8225	        ;;
8226	    esac
8227	    # Commands to make compiler produce verbose output that lists
8228	    # what "hidden" libraries, object files and flags are used when
8229	    # linking a shared library.
8230	    #
8231	    # There doesn't appear to be a way to prevent this compiler from
8232	    # explicitly linking system object files so we need to strip them
8233	    # from the output so that they don't get included in the library
8234	    # dependencies.
8235	    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"'
8236	    ;;
8237          *)
8238	    if test "$GXX" = yes; then
8239	      if test $with_gnu_ld = no; then
8240	        case $host_cpu in
8241	          hppa*64*)
8242	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8243	            ;;
8244	          ia64*)
8245	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8246	            ;;
8247	          *)
8248	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8249	            ;;
8250	        esac
8251	      fi
8252	    else
8253	      # FIXME: insert proper C++ library support
8254	      _LT_TAGVAR(ld_shlibs, $1)=no
8255	    fi
8256	    ;;
8257        esac
8258        ;;
8259
8260      interix[[3-9]]*)
8261	_LT_TAGVAR(hardcode_direct, $1)=no
8262	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8263	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8264	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8265	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
8266	# Instead, shared libraries are loaded at an image base (0x10000000 by
8267	# default) and relocated if they conflict, which is a slow very memory
8268	# consuming and fragmenting process.  To avoid this, we pick a random,
8269	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
8270	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
8271	_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'
8272	_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'
8273	;;
8274      irix5* | irix6*)
8275        case $cc_basename in
8276          CC*)
8277	    # SGI C++
8278	    _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'
8279
8280	    # Archives containing C++ object files must be created using
8281	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
8282	    # necessary to make sure instantiated templates are included
8283	    # in the archive.
8284	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
8285	    ;;
8286          *)
8287	    if test "$GXX" = yes; then
8288	      if test "$with_gnu_ld" = no; then
8289	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -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'
8290	      else
8291	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -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'
8292	      fi
8293	    fi
8294	    _LT_TAGVAR(link_all_deplibs, $1)=yes
8295	    ;;
8296        esac
8297        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8298        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8299        _LT_TAGVAR(inherit_rpath, $1)=yes
8300        ;;
8301
8302      linux* | k*bsd*-gnu | kopensolaris*-gnu)
8303        case $cc_basename in
8304          KCC*)
8305	    # Kuck and Associates, Inc. (KAI) C++ Compiler
8306
8307	    # KCC will only create a shared library if the output file
8308	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
8309	    # to its proper name (with version) after linking.
8310	    _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'
8311	    _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'
8312	    # Commands to make compiler produce verbose output that lists
8313	    # what "hidden" libraries, object files and flags are used when
8314	    # linking a shared library.
8315	    #
8316	    # There doesn't appear to be a way to prevent this compiler from
8317	    # explicitly linking system object files so we need to strip them
8318	    # from the output so that they don't get included in the library
8319	    # dependencies.
8320	    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"'
8321
8322	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8323	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8324
8325	    # Archives containing C++ object files must be created using
8326	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
8327	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
8328	    ;;
8329	  icpc* | ecpc* )
8330	    # Intel C++
8331	    with_gnu_ld=yes
8332	    # version 8.0 and above of icpc choke on multiply defined symbols
8333	    # if we add $predep_objects and $postdep_objects, however 7.1 and
8334	    # earlier do not add the objects themselves.
8335	    case `$CC -V 2>&1` in
8336	      *"Version 7."*)
8337	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
8338		_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'
8339		;;
8340	      *)  # Version 8.0 or newer
8341	        tmp_idyn=
8342	        case $host_cpu in
8343		  ia64*) tmp_idyn=' -i_dynamic';;
8344		esac
8345	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8346		_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'
8347		;;
8348	    esac
8349	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8350	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8351	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8352	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
8353	    ;;
8354          pgCC* | pgcpp*)
8355            # Portland Group C++ compiler
8356	    case `$CC -V` in
8357	    *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
8358	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
8359		rm -rf $tpldir~
8360		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
8361		compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
8362	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
8363		rm -rf $tpldir~
8364		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
8365		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
8366		$RANLIB $oldlib'
8367	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
8368		rm -rf $tpldir~
8369		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
8370		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
8371	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
8372		rm -rf $tpldir~
8373		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
8374		$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'
8375	      ;;
8376	    *) # Version 6 and above use weak symbols
8377	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
8378	      _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'
8379	      ;;
8380	    esac
8381
8382	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
8383	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8384	    _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'
8385            ;;
8386	  cxx*)
8387	    # Compaq C++
8388	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
8389	    _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'
8390
8391	    runpath_var=LD_RUN_PATH
8392	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
8393	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8394
8395	    # Commands to make compiler produce verbose output that lists
8396	    # what "hidden" libraries, object files and flags are used when
8397	    # linking a shared library.
8398	    #
8399	    # There doesn't appear to be a way to prevent this compiler from
8400	    # explicitly linking system object files so we need to strip them
8401	    # from the output so that they don't get included in the library
8402	    # dependencies.
8403	    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'
8404	    ;;
8405	  xl* | mpixl* | bgxl*)
8406	    # IBM XL 8.0 on PPC, with GNU ld
8407	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8408	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8409	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8410	    if test "x$supports_anon_versioning" = xyes; then
8411	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
8412		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
8413		echo "local: *; };" >> $output_objdir/$libname.ver~
8414		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
8415	    fi
8416	    ;;
8417	  *)
8418	    case `$CC -V 2>&1 | sed 5q` in
8419	    *Sun\ C*)
8420	      # Sun C++ 5.9
8421	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
8422	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8423	      _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'
8424	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8425	      _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'
8426	      _LT_TAGVAR(compiler_needs_object, $1)=yes
8427
8428	      # Not sure whether something based on
8429	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
8430	      # would be better.
8431	      output_verbose_link_cmd='func_echo_all'
8432
8433	      # Archives containing C++ object files must be created using
8434	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
8435	      # necessary to make sure instantiated templates are included
8436	      # in the archive.
8437	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
8438	      ;;
8439	    esac
8440	    ;;
8441	esac
8442	;;
8443
8444      lynxos*)
8445        # FIXME: insert proper C++ library support
8446	_LT_TAGVAR(ld_shlibs, $1)=no
8447	;;
8448
8449      m88k*)
8450        # FIXME: insert proper C++ library support
8451        _LT_TAGVAR(ld_shlibs, $1)=no
8452	;;
8453
8454      mvs*)
8455        case $cc_basename in
8456          cxx*)
8457	    # FIXME: insert proper C++ library support
8458	    _LT_TAGVAR(ld_shlibs, $1)=no
8459	    ;;
8460	  *)
8461	    # FIXME: insert proper C++ library support
8462	    _LT_TAGVAR(ld_shlibs, $1)=no
8463	    ;;
8464	esac
8465	;;
8466
8467      netbsd*)
8468        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
8469	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
8470	  wlarc=
8471	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8472	  _LT_TAGVAR(hardcode_direct, $1)=yes
8473	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8474	fi
8475	# Workaround some broken pre-1.5 toolchains
8476	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
8477	;;
8478
8479      *nto* | *qnx*)
8480        _LT_TAGVAR(ld_shlibs, $1)=yes
8481	;;
8482
8483      openbsd2*)
8484        # C++ shared libraries are fairly broken
8485	_LT_TAGVAR(ld_shlibs, $1)=no
8486	;;
8487
8488      openbsd*)
8489	if test -f /usr/libexec/ld.so; then
8490	  _LT_TAGVAR(hardcode_direct, $1)=yes
8491	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8492	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
8493	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
8494	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8495	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
8496	    _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'
8497	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8498	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
8499	  fi
8500	  output_verbose_link_cmd=func_echo_all
8501	else
8502	  _LT_TAGVAR(ld_shlibs, $1)=no
8503	fi
8504	;;
8505
8506      osf3* | osf4* | osf5*)
8507        case $cc_basename in
8508          KCC*)
8509	    # Kuck and Associates, Inc. (KAI) C++ Compiler
8510
8511	    # KCC will only create a shared library if the output file
8512	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
8513	    # to its proper name (with version) after linking.
8514	    _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'
8515
8516	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8517	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8518
8519	    # Archives containing C++ object files must be created using
8520	    # the KAI C++ compiler.
8521	    case $host in
8522	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
8523	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
8524	    esac
8525	    ;;
8526          RCC*)
8527	    # Rational C++ 2.4.1
8528	    # FIXME: insert proper C++ library support
8529	    _LT_TAGVAR(ld_shlibs, $1)=no
8530	    ;;
8531          cxx*)
8532	    case $host in
8533	      osf3*)
8534	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8535	        _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'
8536	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8537		;;
8538	      *)
8539	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
8540	        _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'
8541	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
8542	          echo "-hidden">> $lib.exp~
8543	          $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~
8544	          $RM $lib.exp'
8545	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
8546		;;
8547	    esac
8548
8549	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8550
8551	    # Commands to make compiler produce verbose output that lists
8552	    # what "hidden" libraries, object files and flags are used when
8553	    # linking a shared library.
8554	    #
8555	    # There doesn't appear to be a way to prevent this compiler from
8556	    # explicitly linking system object files so we need to strip them
8557	    # from the output so that they don't get included in the library
8558	    # dependencies.
8559	    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"'
8560	    ;;
8561	  *)
8562	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8563	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8564	      case $host in
8565	        osf3*)
8566	          _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'
8567		  ;;
8568	        *)
8569	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
8570		  ;;
8571	      esac
8572
8573	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8574	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8575
8576	      # Commands to make compiler produce verbose output that lists
8577	      # what "hidden" libraries, object files and flags are used when
8578	      # linking a shared library.
8579	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
8580
8581	    else
8582	      # FIXME: insert proper C++ library support
8583	      _LT_TAGVAR(ld_shlibs, $1)=no
8584	    fi
8585	    ;;
8586        esac
8587        ;;
8588
8589      psos*)
8590        # FIXME: insert proper C++ library support
8591        _LT_TAGVAR(ld_shlibs, $1)=no
8592        ;;
8593
8594      sunos4*)
8595        case $cc_basename in
8596          CC*)
8597	    # Sun C++ 4.x
8598	    # FIXME: insert proper C++ library support
8599	    _LT_TAGVAR(ld_shlibs, $1)=no
8600	    ;;
8601          lcc*)
8602	    # Lucid
8603	    # FIXME: insert proper C++ library support
8604	    _LT_TAGVAR(ld_shlibs, $1)=no
8605	    ;;
8606          *)
8607	    # FIXME: insert proper C++ library support
8608	    _LT_TAGVAR(ld_shlibs, $1)=no
8609	    ;;
8610        esac
8611        ;;
8612
8613      solaris*)
8614        case $cc_basename in
8615          CC* | sunCC*)
8616	    # Sun C++ 4.2, 5.x and Centerline C++
8617            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
8618	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
8619	    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8620	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8621	      $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'
8622
8623	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8624	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8625	    case $host_os in
8626	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
8627	      *)
8628		# The compiler driver will combine and reorder linker options,
8629		# but understands `-z linker_flag'.
8630	        # Supported since Solaris 2.6 (maybe 2.5.1?)
8631		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
8632	        ;;
8633	    esac
8634	    _LT_TAGVAR(link_all_deplibs, $1)=yes
8635
8636	    output_verbose_link_cmd='func_echo_all'
8637
8638	    # Archives containing C++ object files must be created using
8639	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
8640	    # necessary to make sure instantiated templates are included
8641	    # in the archive.
8642	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
8643	    ;;
8644          gcx*)
8645	    # Green Hills C++ Compiler
8646	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
8647
8648	    # The C++ compiler must be used to create the archive.
8649	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
8650	    ;;
8651          *)
8652	    # GNU C++ compiler with Solaris linker
8653	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8654	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
8655	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
8656	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
8657	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8658		  $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
8659
8660	        # Commands to make compiler produce verbose output that lists
8661	        # what "hidden" libraries, object files and flags are used when
8662	        # linking a shared library.
8663	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
8664	      else
8665	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
8666	        # platform.
8667	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
8668	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8669		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
8670
8671	        # Commands to make compiler produce verbose output that lists
8672	        # what "hidden" libraries, object files and flags are used when
8673	        # linking a shared library.
8674	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
8675	      fi
8676
8677	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
8678	      case $host_os in
8679		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
8680		*)
8681		  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
8682		  ;;
8683	      esac
8684	    fi
8685	    ;;
8686        esac
8687        ;;
8688
8689    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
8690      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
8691      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8692      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8693      runpath_var='LD_RUN_PATH'
8694
8695      case $cc_basename in
8696        CC*)
8697	  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8698	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8699	  ;;
8700	*)
8701	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8702	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8703	  ;;
8704      esac
8705      ;;
8706
8707      sysv5* | sco3.2v5* | sco5v6*)
8708	# Note: We can NOT use -z defs as we might desire, because we do not
8709	# link with -lc, and that would cause any symbols used from libc to
8710	# always be unresolved, which means just about no library would
8711	# ever link correctly.  If we're not using GNU ld we use -z text
8712	# though, which does catch some bad symbols but isn't as heavy-handed
8713	# as -z defs.
8714	_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
8715	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
8716	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8717	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8718	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
8719	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
8720	_LT_TAGVAR(link_all_deplibs, $1)=yes
8721	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
8722	runpath_var='LD_RUN_PATH'
8723
8724	case $cc_basename in
8725          CC*)
8726	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8727	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8728	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
8729	      '"$_LT_TAGVAR(old_archive_cmds, $1)"
8730	    _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
8731	      '"$_LT_TAGVAR(reload_cmds, $1)"
8732	    ;;
8733	  *)
8734	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8735	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8736	    ;;
8737	esac
8738      ;;
8739
8740      tandem*)
8741        case $cc_basename in
8742          NCC*)
8743	    # NonStop-UX NCC 3.20
8744	    # FIXME: insert proper C++ library support
8745	    _LT_TAGVAR(ld_shlibs, $1)=no
8746	    ;;
8747          *)
8748	    # FIXME: insert proper C++ library support
8749	    _LT_TAGVAR(ld_shlibs, $1)=no
8750	    ;;
8751        esac
8752        ;;
8753
8754      vxworks*)
8755        # FIXME: insert proper C++ library support
8756        _LT_TAGVAR(ld_shlibs, $1)=no
8757        ;;
8758
8759      *)
8760        # FIXME: insert proper C++ library support
8761        _LT_TAGVAR(ld_shlibs, $1)=no
8762        ;;
8763    esac
8764
8765    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
8766    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
8767
8768    _LT_TAGVAR(GCC, $1)="$GXX"
8769    _LT_TAGVAR(LD, $1)="$LD"
8770
8771    ## CAVEAT EMPTOR:
8772    ## There is no encapsulation within the following macros, do not change
8773    ## the running order or otherwise move them around unless you know exactly
8774    ## what you are doing...
8775    _LT_SYS_HIDDEN_LIBDEPS($1)
8776    _LT_COMPILER_PIC($1)
8777    _LT_COMPILER_C_O($1)
8778    _LT_COMPILER_FILE_LOCKS($1)
8779    _LT_LINKER_SHLIBS($1)
8780    _LT_SYS_DYNAMIC_LINKER($1)
8781    _LT_LINKER_HARDCODE_LIBPATH($1)
8782
8783    _LT_CONFIG($1)
8784  fi # test -n "$compiler"
8785
8786  CC=$lt_save_CC
8787  LDCXX=$LD
8788  LD=$lt_save_LD
8789  GCC=$lt_save_GCC
8790  with_gnu_ld=$lt_save_with_gnu_ld
8791  lt_cv_path_LDCXX=$lt_cv_path_LD
8792  lt_cv_path_LD=$lt_save_path_LD
8793  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
8794  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
8795fi # test "$_lt_caught_CXX_error" != yes
8796
8797AC_LANG_POP
8798])# _LT_LANG_CXX_CONFIG
8799
8800
8801# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
8802# ---------------------------------
8803# Figure out "hidden" library dependencies from verbose
8804# compiler output when linking a shared library.
8805# Parse the compiler output and extract the necessary
8806# objects, libraries and library flags.
8807m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
8808[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
8809# Dependencies to place before and after the object being linked:
8810_LT_TAGVAR(predep_objects, $1)=
8811_LT_TAGVAR(postdep_objects, $1)=
8812_LT_TAGVAR(predeps, $1)=
8813_LT_TAGVAR(postdeps, $1)=
8814_LT_TAGVAR(compiler_lib_search_path, $1)=
8815
8816dnl we can't use the lt_simple_compile_test_code here,
8817dnl because it contains code intended for an executable,
8818dnl not a library.  It's possible we should let each
8819dnl tag define a new lt_????_link_test_code variable,
8820dnl but it's only used here...
8821m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
8822int a;
8823void foo (void) { a = 0; }
8824_LT_EOF
8825], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
8826class Foo
8827{
8828public:
8829  Foo (void) { a = 0; }
8830private:
8831  int a;
8832};
8833_LT_EOF
8834], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
8835      subroutine foo
8836      implicit none
8837      integer*4 a
8838      a=0
8839      return
8840      end
8841_LT_EOF
8842], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
8843      subroutine foo
8844      implicit none
8845      integer a
8846      a=0
8847      return
8848      end
8849_LT_EOF
8850], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
8851public class foo {
8852  private int a;
8853  public void bar (void) {
8854    a = 0;
8855  }
8856};
8857_LT_EOF
8858])
8859dnl Parse the compiler output and extract the necessary
8860dnl objects, libraries and library flags.
8861if AC_TRY_EVAL(ac_compile); then
8862  # Parse the compiler output and extract the necessary
8863  # objects, libraries and library flags.
8864
8865  # Sentinel used to keep track of whether or not we are before
8866  # the conftest object file.
8867  pre_test_object_deps_done=no
8868
8869  for p in `eval "$output_verbose_link_cmd"`; do
8870    case $p in
8871
8872    -L* | -R* | -l*)
8873       # Some compilers place space between "-{L,R}" and the path.
8874       # Remove the space.
8875       if test $p = "-L" ||
8876          test $p = "-R"; then
8877	 prev=$p
8878	 continue
8879       else
8880	 prev=
8881       fi
8882
8883       if test "$pre_test_object_deps_done" = no; then
8884	 case $p in
8885	 -L* | -R*)
8886	   # Internal compiler library paths should come after those
8887	   # provided the user.  The postdeps already come after the
8888	   # user supplied libs so there is no need to process them.
8889	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
8890	     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
8891	   else
8892	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
8893	   fi
8894	   ;;
8895	 # The "-l" case would never come before the object being
8896	 # linked, so don't bother handling this case.
8897	 esac
8898       else
8899	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
8900	   _LT_TAGVAR(postdeps, $1)="${prev}${p}"
8901	 else
8902	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
8903	 fi
8904       fi
8905       ;;
8906
8907    *.$objext)
8908       # This assumes that the test object file only shows up
8909       # once in the compiler output.
8910       if test "$p" = "conftest.$objext"; then
8911	 pre_test_object_deps_done=yes
8912	 continue
8913       fi
8914
8915       if test "$pre_test_object_deps_done" = no; then
8916	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
8917	   _LT_TAGVAR(predep_objects, $1)="$p"
8918	 else
8919	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
8920	 fi
8921       else
8922	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
8923	   _LT_TAGVAR(postdep_objects, $1)="$p"
8924	 else
8925	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
8926	 fi
8927       fi
8928       ;;
8929
8930    *) ;; # Ignore the rest.
8931
8932    esac
8933  done
8934
8935  # Clean up.
8936  rm -f a.out a.exe
8937else
8938  echo "libtool.m4: error: problem compiling $1 test program"
8939fi
8940
8941$RM -f confest.$objext
8942
8943# PORTME: override above test on systems where it is broken
8944m4_if([$1], [CXX],
8945[case $host_os in
8946interix[[3-9]]*)
8947  # Interix 3.5 installs completely hosed .la files for C++, so rather than
8948  # hack all around it, let's just trust "g++" to DTRT.
8949  _LT_TAGVAR(predep_objects,$1)=
8950  _LT_TAGVAR(postdep_objects,$1)=
8951  _LT_TAGVAR(postdeps,$1)=
8952  ;;
8953
8954linux*)
8955  case `$CC -V 2>&1 | sed 5q` in
8956  *Sun\ C*)
8957    # Sun C++ 5.9
8958
8959    # The more standards-conforming stlport4 library is
8960    # incompatible with the Cstd library. Avoid specifying
8961    # it if it's in CXXFLAGS. Ignore libCrun as
8962    # -library=stlport4 depends on it.
8963    case " $CXX $CXXFLAGS " in
8964    *" -library=stlport4 "*)
8965      solaris_use_stlport4=yes
8966      ;;
8967    esac
8968
8969    if test "$solaris_use_stlport4" != yes; then
8970      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8971    fi
8972    ;;
8973  esac
8974  ;;
8975
8976solaris*)
8977  case $cc_basename in
8978  CC* | sunCC*)
8979    # The more standards-conforming stlport4 library is
8980    # incompatible with the Cstd library. Avoid specifying
8981    # it if it's in CXXFLAGS. Ignore libCrun as
8982    # -library=stlport4 depends on it.
8983    case " $CXX $CXXFLAGS " in
8984    *" -library=stlport4 "*)
8985      solaris_use_stlport4=yes
8986      ;;
8987    esac
8988
8989    # Adding this requires a known-good setup of shared libraries for
8990    # Sun compiler versions before 5.6, else PIC objects from an old
8991    # archive will be linked into the output, leading to subtle bugs.
8992    if test "$solaris_use_stlport4" != yes; then
8993      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8994    fi
8995    ;;
8996  esac
8997  ;;
8998esac
8999])
9000
9001case " $_LT_TAGVAR(postdeps, $1) " in
9002*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
9003esac
9004 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
9005if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
9006 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
9007fi
9008_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
9009    [The directories searched by this compiler when creating a shared library])
9010_LT_TAGDECL([], [predep_objects], [1],
9011    [Dependencies to place before and after the objects being linked to
9012    create a shared library])
9013_LT_TAGDECL([], [postdep_objects], [1])
9014_LT_TAGDECL([], [predeps], [1])
9015_LT_TAGDECL([], [postdeps], [1])
9016_LT_TAGDECL([], [compiler_lib_search_path], [1],
9017    [The library search path used internally by the compiler when linking
9018    a shared library])
9019])# _LT_SYS_HIDDEN_LIBDEPS
9020
9021
9022# _LT_LANG_F77_CONFIG([TAG])
9023# --------------------------
9024# Ensure that the configuration variables for a Fortran 77 compiler are
9025# suitably defined.  These variables are subsequently used by _LT_CONFIG
9026# to write the compiler configuration to `libtool'.
9027m4_defun([_LT_LANG_F77_CONFIG],
9028[AC_LANG_PUSH(Fortran 77)
9029if test -z "$F77" || test "X$F77" = "Xno"; then
9030  _lt_disable_F77=yes
9031fi
9032
9033_LT_TAGVAR(archive_cmds_need_lc, $1)=no
9034_LT_TAGVAR(allow_undefined_flag, $1)=
9035_LT_TAGVAR(always_export_symbols, $1)=no
9036_LT_TAGVAR(archive_expsym_cmds, $1)=
9037_LT_TAGVAR(export_dynamic_flag_spec, $1)=
9038_LT_TAGVAR(hardcode_direct, $1)=no
9039_LT_TAGVAR(hardcode_direct_absolute, $1)=no
9040_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
9041_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
9042_LT_TAGVAR(hardcode_libdir_separator, $1)=
9043_LT_TAGVAR(hardcode_minus_L, $1)=no
9044_LT_TAGVAR(hardcode_automatic, $1)=no
9045_LT_TAGVAR(inherit_rpath, $1)=no
9046_LT_TAGVAR(module_cmds, $1)=
9047_LT_TAGVAR(module_expsym_cmds, $1)=
9048_LT_TAGVAR(link_all_deplibs, $1)=unknown
9049_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
9050_LT_TAGVAR(reload_flag, $1)=$reload_flag
9051_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
9052_LT_TAGVAR(no_undefined_flag, $1)=
9053_LT_TAGVAR(whole_archive_flag_spec, $1)=
9054_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
9055
9056# Source file extension for f77 test sources.
9057ac_ext=f
9058
9059# Object file extension for compiled f77 test sources.
9060objext=o
9061_LT_TAGVAR(objext, $1)=$objext
9062
9063# No sense in running all these tests if we already determined that
9064# the F77 compiler isn't working.  Some variables (like enable_shared)
9065# are currently assumed to apply to all compilers on this platform,
9066# and will be corrupted by setting them based on a non-working compiler.
9067if test "$_lt_disable_F77" != yes; then
9068  # Code to be used in simple compile tests
9069  lt_simple_compile_test_code="\
9070      subroutine t
9071      return
9072      end
9073"
9074
9075  # Code to be used in simple link tests
9076  lt_simple_link_test_code="\
9077      program t
9078      end
9079"
9080
9081  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
9082  _LT_TAG_COMPILER
9083
9084  # save warnings/boilerplate of simple test code
9085  _LT_COMPILER_BOILERPLATE
9086  _LT_LINKER_BOILERPLATE
9087
9088  # Allow CC to be a program name with arguments.
9089  lt_save_CC="$CC"
9090  lt_save_GCC=$GCC
9091  CC=${F77-"f77"}
9092  compiler=$CC
9093  _LT_TAGVAR(compiler, $1)=$CC
9094  _LT_CC_BASENAME([$compiler])
9095  GCC=$G77
9096  if test -n "$compiler"; then
9097    AC_MSG_CHECKING([if libtool supports shared libraries])
9098    AC_MSG_RESULT([$can_build_shared])
9099
9100    AC_MSG_CHECKING([whether to build shared libraries])
9101    test "$can_build_shared" = "no" && enable_shared=no
9102
9103    # On AIX, shared libraries and static libraries use the same namespace, and
9104    # are all built from PIC.
9105    case $host_os in
9106      aix3*)
9107        test "$enable_shared" = yes && enable_static=no
9108        if test -n "$RANLIB"; then
9109          archive_cmds="$archive_cmds~\$RANLIB \$lib"
9110          postinstall_cmds='$RANLIB $lib'
9111        fi
9112        ;;
9113      aix[[4-9]]*)
9114	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
9115	  test "$enable_shared" = yes && enable_static=no
9116	fi
9117        ;;
9118    esac
9119    AC_MSG_RESULT([$enable_shared])
9120
9121    AC_MSG_CHECKING([whether to build static libraries])
9122    # Make sure either enable_shared or enable_static is yes.
9123    test "$enable_shared" = yes || enable_static=yes
9124    AC_MSG_RESULT([$enable_static])
9125
9126    _LT_TAGVAR(GCC, $1)="$G77"
9127    _LT_TAGVAR(LD, $1)="$LD"
9128
9129    ## CAVEAT EMPTOR:
9130    ## There is no encapsulation within the following macros, do not change
9131    ## the running order or otherwise move them around unless you know exactly
9132    ## what you are doing...
9133    _LT_COMPILER_PIC($1)
9134    _LT_COMPILER_C_O($1)
9135    _LT_COMPILER_FILE_LOCKS($1)
9136    _LT_LINKER_SHLIBS($1)
9137    _LT_SYS_DYNAMIC_LINKER($1)
9138    _LT_LINKER_HARDCODE_LIBPATH($1)
9139
9140    _LT_CONFIG($1)
9141  fi # test -n "$compiler"
9142
9143  GCC=$lt_save_GCC
9144  CC="$lt_save_CC"
9145fi # test "$_lt_disable_F77" != yes
9146
9147AC_LANG_POP
9148])# _LT_LANG_F77_CONFIG
9149
9150
9151# _LT_LANG_FC_CONFIG([TAG])
9152# -------------------------
9153# Ensure that the configuration variables for a Fortran compiler are
9154# suitably defined.  These variables are subsequently used by _LT_CONFIG
9155# to write the compiler configuration to `libtool'.
9156m4_defun([_LT_LANG_FC_CONFIG],
9157[AC_LANG_PUSH(Fortran)
9158
9159if test -z "$FC" || test "X$FC" = "Xno"; then
9160  _lt_disable_FC=yes
9161fi
9162
9163_LT_TAGVAR(archive_cmds_need_lc, $1)=no
9164_LT_TAGVAR(allow_undefined_flag, $1)=
9165_LT_TAGVAR(always_export_symbols, $1)=no
9166_LT_TAGVAR(archive_expsym_cmds, $1)=
9167_LT_TAGVAR(export_dynamic_flag_spec, $1)=
9168_LT_TAGVAR(hardcode_direct, $1)=no
9169_LT_TAGVAR(hardcode_direct_absolute, $1)=no
9170_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
9171_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
9172_LT_TAGVAR(hardcode_libdir_separator, $1)=
9173_LT_TAGVAR(hardcode_minus_L, $1)=no
9174_LT_TAGVAR(hardcode_automatic, $1)=no
9175_LT_TAGVAR(inherit_rpath, $1)=no
9176_LT_TAGVAR(module_cmds, $1)=
9177_LT_TAGVAR(module_expsym_cmds, $1)=
9178_LT_TAGVAR(link_all_deplibs, $1)=unknown
9179_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
9180_LT_TAGVAR(reload_flag, $1)=$reload_flag
9181_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
9182_LT_TAGVAR(no_undefined_flag, $1)=
9183_LT_TAGVAR(whole_archive_flag_spec, $1)=
9184_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
9185
9186# Source file extension for fc test sources.
9187ac_ext=${ac_fc_srcext-f}
9188
9189# Object file extension for compiled fc test sources.
9190objext=o
9191_LT_TAGVAR(objext, $1)=$objext
9192
9193# No sense in running all these tests if we already determined that
9194# the FC compiler isn't working.  Some variables (like enable_shared)
9195# are currently assumed to apply to all compilers on this platform,
9196# and will be corrupted by setting them based on a non-working compiler.
9197if test "$_lt_disable_FC" != yes; then
9198  # Code to be used in simple compile tests
9199  lt_simple_compile_test_code="\
9200      subroutine t
9201      return
9202      end
9203"
9204
9205  # Code to be used in simple link tests
9206  lt_simple_link_test_code="\
9207      program t
9208      end
9209"
9210
9211  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
9212  _LT_TAG_COMPILER
9213
9214  # save warnings/boilerplate of simple test code
9215  _LT_COMPILER_BOILERPLATE
9216  _LT_LINKER_BOILERPLATE
9217
9218  # Allow CC to be a program name with arguments.
9219  lt_save_CC="$CC"
9220  lt_save_GCC=$GCC
9221  CC=${FC-"f95"}
9222  compiler=$CC
9223  GCC=$ac_cv_fc_compiler_gnu
9224
9225  _LT_TAGVAR(compiler, $1)=$CC
9226  _LT_CC_BASENAME([$compiler])
9227
9228  if test -n "$compiler"; then
9229    AC_MSG_CHECKING([if libtool supports shared libraries])
9230    AC_MSG_RESULT([$can_build_shared])
9231
9232    AC_MSG_CHECKING([whether to build shared libraries])
9233    test "$can_build_shared" = "no" && enable_shared=no
9234
9235    # On AIX, shared libraries and static libraries use the same namespace, and
9236    # are all built from PIC.
9237    case $host_os in
9238      aix3*)
9239        test "$enable_shared" = yes && enable_static=no
9240        if test -n "$RANLIB"; then
9241          archive_cmds="$archive_cmds~\$RANLIB \$lib"
9242          postinstall_cmds='$RANLIB $lib'
9243        fi
9244        ;;
9245      aix[[4-9]]*)
9246	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
9247	  test "$enable_shared" = yes && enable_static=no
9248	fi
9249        ;;
9250    esac
9251    AC_MSG_RESULT([$enable_shared])
9252
9253    AC_MSG_CHECKING([whether to build static libraries])
9254    # Make sure either enable_shared or enable_static is yes.
9255    test "$enable_shared" = yes || enable_static=yes
9256    AC_MSG_RESULT([$enable_static])
9257
9258    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
9259    _LT_TAGVAR(LD, $1)="$LD"
9260
9261    ## CAVEAT EMPTOR:
9262    ## There is no encapsulation within the following macros, do not change
9263    ## the running order or otherwise move them around unless you know exactly
9264    ## what you are doing...
9265    _LT_SYS_HIDDEN_LIBDEPS($1)
9266    _LT_COMPILER_PIC($1)
9267    _LT_COMPILER_C_O($1)
9268    _LT_COMPILER_FILE_LOCKS($1)
9269    _LT_LINKER_SHLIBS($1)
9270    _LT_SYS_DYNAMIC_LINKER($1)
9271    _LT_LINKER_HARDCODE_LIBPATH($1)
9272
9273    _LT_CONFIG($1)
9274  fi # test -n "$compiler"
9275
9276  GCC=$lt_save_GCC
9277  CC="$lt_save_CC"
9278fi # test "$_lt_disable_FC" != yes
9279
9280AC_LANG_POP
9281])# _LT_LANG_FC_CONFIG
9282
9283
9284# _LT_LANG_GCJ_CONFIG([TAG])
9285# --------------------------
9286# Ensure that the configuration variables for the GNU Java Compiler compiler
9287# are suitably defined.  These variables are subsequently used by _LT_CONFIG
9288# to write the compiler configuration to `libtool'.
9289m4_defun([_LT_LANG_GCJ_CONFIG],
9290[AC_REQUIRE([LT_PROG_GCJ])dnl
9291AC_LANG_SAVE
9292
9293# Source file extension for Java test sources.
9294ac_ext=java
9295
9296# Object file extension for compiled Java test sources.
9297objext=o
9298_LT_TAGVAR(objext, $1)=$objext
9299
9300# Code to be used in simple compile tests
9301lt_simple_compile_test_code="class foo {}"
9302
9303# Code to be used in simple link tests
9304lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
9305
9306# ltmain only uses $CC for tagged configurations so make sure $CC is set.
9307_LT_TAG_COMPILER
9308
9309# save warnings/boilerplate of simple test code
9310_LT_COMPILER_BOILERPLATE
9311_LT_LINKER_BOILERPLATE
9312
9313# Allow CC to be a program name with arguments.
9314lt_save_CC="$CC"
9315lt_save_GCC=$GCC
9316GCC=yes
9317CC=${GCJ-"gcj"}
9318compiler=$CC
9319_LT_TAGVAR(compiler, $1)=$CC
9320_LT_TAGVAR(LD, $1)="$LD"
9321_LT_CC_BASENAME([$compiler])
9322
9323# GCJ did not exist at the time GCC didn't implicitly link libc in.
9324_LT_TAGVAR(archive_cmds_need_lc, $1)=no
9325
9326_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
9327_LT_TAGVAR(reload_flag, $1)=$reload_flag
9328_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
9329
9330if test -n "$compiler"; then
9331  _LT_COMPILER_NO_RTTI($1)
9332  _LT_COMPILER_PIC($1)
9333  _LT_COMPILER_C_O($1)
9334  _LT_COMPILER_FILE_LOCKS($1)
9335  _LT_LINKER_SHLIBS($1)
9336  _LT_LINKER_HARDCODE_LIBPATH($1)
9337
9338  _LT_CONFIG($1)
9339fi
9340
9341AC_LANG_RESTORE
9342
9343GCC=$lt_save_GCC
9344CC="$lt_save_CC"
9345])# _LT_LANG_GCJ_CONFIG
9346
9347
9348# _LT_LANG_RC_CONFIG([TAG])
9349# -------------------------
9350# Ensure that the configuration variables for the Windows resource compiler
9351# are suitably defined.  These variables are subsequently used by _LT_CONFIG
9352# to write the compiler configuration to `libtool'.
9353m4_defun([_LT_LANG_RC_CONFIG],
9354[AC_REQUIRE([LT_PROG_RC])dnl
9355AC_LANG_SAVE
9356
9357# Source file extension for RC test sources.
9358ac_ext=rc
9359
9360# Object file extension for compiled RC test sources.
9361objext=o
9362_LT_TAGVAR(objext, $1)=$objext
9363
9364# Code to be used in simple compile tests
9365lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
9366
9367# Code to be used in simple link tests
9368lt_simple_link_test_code="$lt_simple_compile_test_code"
9369
9370# ltmain only uses $CC for tagged configurations so make sure $CC is set.
9371_LT_TAG_COMPILER
9372
9373# save warnings/boilerplate of simple test code
9374_LT_COMPILER_BOILERPLATE
9375_LT_LINKER_BOILERPLATE
9376
9377# Allow CC to be a program name with arguments.
9378lt_save_CC="$CC"
9379lt_save_GCC=$GCC
9380GCC=
9381CC=${RC-"windres"}
9382compiler=$CC
9383_LT_TAGVAR(compiler, $1)=$CC
9384_LT_CC_BASENAME([$compiler])
9385_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
9386
9387if test -n "$compiler"; then
9388  :
9389  _LT_CONFIG($1)
9390fi
9391
9392GCC=$lt_save_GCC
9393AC_LANG_RESTORE
9394CC="$lt_save_CC"
9395])# _LT_LANG_RC_CONFIG
9396
9397
9398# LT_PROG_GCJ
9399# -----------
9400AC_DEFUN([LT_PROG_GCJ],
9401[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
9402  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
9403    [AC_CHECK_TOOL(GCJ, gcj,)
9404      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
9405      AC_SUBST(GCJFLAGS)])])[]dnl
9406])
9407
9408# Old name:
9409AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
9410dnl aclocal-1.4 backwards compatibility:
9411dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
9412
9413
9414# LT_PROG_RC
9415# ----------
9416AC_DEFUN([LT_PROG_RC],
9417[AC_CHECK_TOOL(RC, windres,)
9418])
9419
9420# Old name:
9421AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
9422dnl aclocal-1.4 backwards compatibility:
9423dnl AC_DEFUN([LT_AC_PROG_RC], [])
9424
9425
9426# _LT_DECL_EGREP
9427# --------------
9428# If we don't have a new enough Autoconf to choose the best grep
9429# available, choose the one first in the user's PATH.
9430m4_defun([_LT_DECL_EGREP],
9431[AC_REQUIRE([AC_PROG_EGREP])dnl
9432AC_REQUIRE([AC_PROG_FGREP])dnl
9433test -z "$GREP" && GREP=grep
9434_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
9435_LT_DECL([], [EGREP], [1], [An ERE matcher])
9436_LT_DECL([], [FGREP], [1], [A literal string matcher])
9437dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
9438AC_SUBST([GREP])
9439])
9440
9441
9442# _LT_DECL_OBJDUMP
9443# --------------
9444# If we don't have a new enough Autoconf to choose the best objdump
9445# available, choose the one first in the user's PATH.
9446m4_defun([_LT_DECL_OBJDUMP],
9447[AC_CHECK_TOOL(OBJDUMP, objdump, false)
9448test -z "$OBJDUMP" && OBJDUMP=objdump
9449_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
9450AC_SUBST([OBJDUMP])
9451])
9452
9453
9454# _LT_DECL_SED
9455# ------------
9456# Check for a fully-functional sed program, that truncates
9457# as few characters as possible.  Prefer GNU sed if found.
9458m4_defun([_LT_DECL_SED],
9459[AC_PROG_SED
9460test -z "$SED" && SED=sed
9461Xsed="$SED -e 1s/^X//"
9462_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
9463_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
9464    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
9465])# _LT_DECL_SED
9466
9467m4_ifndef([AC_PROG_SED], [
9468# NOTE: This macro has been submitted for inclusion into   #
9469#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
9470#  a released version of Autoconf we should remove this    #
9471#  macro and use it instead.                               #
9472
9473m4_defun([AC_PROG_SED],
9474[AC_MSG_CHECKING([for a sed that does not truncate output])
9475AC_CACHE_VAL(lt_cv_path_SED,
9476[# Loop through the user's path and test for sed and gsed.
9477# Then use that list of sed's as ones to test for truncation.
9478as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9479for as_dir in $PATH
9480do
9481  IFS=$as_save_IFS
9482  test -z "$as_dir" && as_dir=.
9483  for lt_ac_prog in sed gsed; do
9484    for ac_exec_ext in '' $ac_executable_extensions; do
9485      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
9486        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
9487      fi
9488    done
9489  done
9490done
9491IFS=$as_save_IFS
9492lt_ac_max=0
9493lt_ac_count=0
9494# Add /usr/xpg4/bin/sed as it is typically found on Solaris
9495# along with /bin/sed that truncates output.
9496for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
9497  test ! -f $lt_ac_sed && continue
9498  cat /dev/null > conftest.in
9499  lt_ac_count=0
9500  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
9501  # Check for GNU sed and select it if it is found.
9502  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
9503    lt_cv_path_SED=$lt_ac_sed
9504    break
9505  fi
9506  while true; do
9507    cat conftest.in conftest.in >conftest.tmp
9508    mv conftest.tmp conftest.in
9509    cp conftest.in conftest.nl
9510    echo >>conftest.nl
9511    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
9512    cmp -s conftest.out conftest.nl || break
9513    # 10000 chars as input seems more than enough
9514    test $lt_ac_count -gt 10 && break
9515    lt_ac_count=`expr $lt_ac_count + 1`
9516    if test $lt_ac_count -gt $lt_ac_max; then
9517      lt_ac_max=$lt_ac_count
9518      lt_cv_path_SED=$lt_ac_sed
9519    fi
9520  done
9521done
9522])
9523SED=$lt_cv_path_SED
9524AC_SUBST([SED])
9525AC_MSG_RESULT([$SED])
9526])#AC_PROG_SED
9527])#m4_ifndef
9528
9529# Old name:
9530AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
9531dnl aclocal-1.4 backwards compatibility:
9532dnl AC_DEFUN([LT_AC_PROG_SED], [])
9533
9534
9535# _LT_CHECK_SHELL_FEATURES
9536# ------------------------
9537# Find out whether the shell is Bourne or XSI compatible,
9538# or has some other useful features.
9539m4_defun([_LT_CHECK_SHELL_FEATURES],
9540[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
9541# Try some XSI features
9542xsi_shell=no
9543( _lt_dummy="a/b/c"
9544  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
9545      = c,a/b,, \
9546    && eval 'test $(( 1 + 1 )) -eq 2 \
9547    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
9548  && xsi_shell=yes
9549AC_MSG_RESULT([$xsi_shell])
9550_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
9551
9552AC_MSG_CHECKING([whether the shell understands "+="])
9553lt_shell_append=no
9554( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
9555    >/dev/null 2>&1 \
9556  && lt_shell_append=yes
9557AC_MSG_RESULT([$lt_shell_append])
9558_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
9559
9560if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
9561  lt_unset=unset
9562else
9563  lt_unset=false
9564fi
9565_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
9566
9567# test EBCDIC or ASCII
9568case `echo X|tr X '\101'` in
9569 A) # ASCII based system
9570    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
9571  lt_SP2NL='tr \040 \012'
9572  lt_NL2SP='tr \015\012 \040\040'
9573  ;;
9574 *) # EBCDIC based system
9575  lt_SP2NL='tr \100 \n'
9576  lt_NL2SP='tr \r\n \100\100'
9577  ;;
9578esac
9579_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
9580_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
9581])# _LT_CHECK_SHELL_FEATURES
9582
9583
9584# _LT_PROG_XSI_SHELLFNS
9585# ---------------------
9586# Bourne and XSI compatible variants of some useful shell functions.
9587m4_defun([_LT_PROG_XSI_SHELLFNS],
9588[case $xsi_shell in
9589  yes)
9590    cat << \_LT_EOF >> "$cfgfile"
9591
9592# func_dirname file append nondir_replacement
9593# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
9594# otherwise set result to NONDIR_REPLACEMENT.
9595func_dirname ()
9596{
9597  case ${1} in
9598    */*) func_dirname_result="${1%/*}${2}" ;;
9599    *  ) func_dirname_result="${3}" ;;
9600  esac
9601}
9602
9603# func_basename file
9604func_basename ()
9605{
9606  func_basename_result="${1##*/}"
9607}
9608
9609# func_dirname_and_basename file append nondir_replacement
9610# perform func_basename and func_dirname in a single function
9611# call:
9612#   dirname:  Compute the dirname of FILE.  If nonempty,
9613#             add APPEND to the result, otherwise set result
9614#             to NONDIR_REPLACEMENT.
9615#             value returned in "$func_dirname_result"
9616#   basename: Compute filename of FILE.
9617#             value retuned in "$func_basename_result"
9618# Implementation must be kept synchronized with func_dirname
9619# and func_basename. For efficiency, we do not delegate to
9620# those functions but instead duplicate the functionality here.
9621func_dirname_and_basename ()
9622{
9623  case ${1} in
9624    */*) func_dirname_result="${1%/*}${2}" ;;
9625    *  ) func_dirname_result="${3}" ;;
9626  esac
9627  func_basename_result="${1##*/}"
9628}
9629
9630# func_stripname prefix suffix name
9631# strip PREFIX and SUFFIX off of NAME.
9632# PREFIX and SUFFIX must not contain globbing or regex special
9633# characters, hashes, percent signs, but SUFFIX may contain a leading
9634# dot (in which case that matches only a dot).
9635func_stripname ()
9636{
9637  # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
9638  # positional parameters, so assign one to ordinary parameter first.
9639  func_stripname_result=${3}
9640  func_stripname_result=${func_stripname_result#"${1}"}
9641  func_stripname_result=${func_stripname_result%"${2}"}
9642}
9643
9644# func_opt_split
9645func_opt_split ()
9646{
9647  func_opt_split_opt=${1%%=*}
9648  func_opt_split_arg=${1#*=}
9649}
9650
9651# func_lo2o object
9652func_lo2o ()
9653{
9654  case ${1} in
9655    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
9656    *)    func_lo2o_result=${1} ;;
9657  esac
9658}
9659
9660# func_xform libobj-or-source
9661func_xform ()
9662{
9663  func_xform_result=${1%.*}.lo
9664}
9665
9666# func_arith arithmetic-term...
9667func_arith ()
9668{
9669  func_arith_result=$(( $[*] ))
9670}
9671
9672# func_len string
9673# STRING may not start with a hyphen.
9674func_len ()
9675{
9676  func_len_result=${#1}
9677}
9678
9679_LT_EOF
9680    ;;
9681  *) # Bourne compatible functions.
9682    cat << \_LT_EOF >> "$cfgfile"
9683
9684# func_dirname file append nondir_replacement
9685# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
9686# otherwise set result to NONDIR_REPLACEMENT.
9687func_dirname ()
9688{
9689  # Extract subdirectory from the argument.
9690  func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
9691  if test "X$func_dirname_result" = "X${1}"; then
9692    func_dirname_result="${3}"
9693  else
9694    func_dirname_result="$func_dirname_result${2}"
9695  fi
9696}
9697
9698# func_basename file
9699func_basename ()
9700{
9701  func_basename_result=`$ECHO "${1}" | $SED "$basename"`
9702}
9703
9704dnl func_dirname_and_basename
9705dnl A portable version of this function is already defined in general.m4sh
9706dnl so there is no need for it here.
9707
9708# func_stripname prefix suffix name
9709# strip PREFIX and SUFFIX off of NAME.
9710# PREFIX and SUFFIX must not contain globbing or regex special
9711# characters, hashes, percent signs, but SUFFIX may contain a leading
9712# dot (in which case that matches only a dot).
9713# func_strip_suffix prefix name
9714func_stripname ()
9715{
9716  case ${2} in
9717    .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
9718    *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
9719  esac
9720}
9721
9722# sed scripts:
9723my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
9724my_sed_long_arg='1s/^-[[^=]]*=//'
9725
9726# func_opt_split
9727func_opt_split ()
9728{
9729  func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"`
9730  func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"`
9731}
9732
9733# func_lo2o object
9734func_lo2o ()
9735{
9736  func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
9737}
9738
9739# func_xform libobj-or-source
9740func_xform ()
9741{
9742  func_xform_result=`$ECHO "${1}" | $SED 's/\.[[^.]]*$/.lo/'`
9743}
9744
9745# func_arith arithmetic-term...
9746func_arith ()
9747{
9748  func_arith_result=`expr "$[@]"`
9749}
9750
9751# func_len string
9752# STRING may not start with a hyphen.
9753func_len ()
9754{
9755  func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
9756}
9757
9758_LT_EOF
9759esac
9760
9761case $lt_shell_append in
9762  yes)
9763    cat << \_LT_EOF >> "$cfgfile"
9764
9765# func_append var value
9766# Append VALUE to the end of shell variable VAR.
9767func_append ()
9768{
9769  eval "$[1]+=\$[2]"
9770}
9771_LT_EOF
9772    ;;
9773  *)
9774    cat << \_LT_EOF >> "$cfgfile"
9775
9776# func_append var value
9777# Append VALUE to the end of shell variable VAR.
9778func_append ()
9779{
9780  eval "$[1]=\$$[1]\$[2]"
9781}
9782
9783_LT_EOF
9784    ;;
9785  esac
9786])
9787
9788# Helper functions for option handling.                    -*- Autoconf -*-
9789#
9790#   Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
9791#   Inc.
9792#   Written by Gary V. Vaughan, 2004
9793#
9794# This file is free software; the Free Software Foundation gives
9795# unlimited permission to copy and/or distribute it, with or without
9796# modifications, as long as this notice is preserved.
9797
9798# serial 7 ltoptions.m4
9799
9800# This is to help aclocal find these macros, as it can't see m4_define.
9801AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
9802
9803
9804# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
9805# ------------------------------------------
9806m4_define([_LT_MANGLE_OPTION],
9807[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
9808
9809
9810# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
9811# ---------------------------------------
9812# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
9813# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
9814# saved as a flag.
9815m4_define([_LT_SET_OPTION],
9816[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
9817m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
9818        _LT_MANGLE_DEFUN([$1], [$2]),
9819    [m4_warning([Unknown $1 option `$2'])])[]dnl
9820])
9821
9822
9823# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
9824# ------------------------------------------------------------
9825# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
9826m4_define([_LT_IF_OPTION],
9827[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
9828
9829
9830# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
9831# -------------------------------------------------------
9832# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
9833# are set.
9834m4_define([_LT_UNLESS_OPTIONS],
9835[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9836	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
9837		      [m4_define([$0_found])])])[]dnl
9838m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
9839])[]dnl
9840])
9841
9842
9843# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
9844# ----------------------------------------
9845# OPTION-LIST is a space-separated list of Libtool options associated
9846# with MACRO-NAME.  If any OPTION has a matching handler declared with
9847# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
9848# the unknown option and exit.
9849m4_defun([_LT_SET_OPTIONS],
9850[# Set options
9851m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9852    [_LT_SET_OPTION([$1], _LT_Option)])
9853
9854m4_if([$1],[LT_INIT],[
9855  dnl
9856  dnl Simply set some default values (i.e off) if boolean options were not
9857  dnl specified:
9858  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
9859  ])
9860  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
9861  ])
9862  dnl
9863  dnl If no reference was made to various pairs of opposing options, then
9864  dnl we run the default mode handler for the pair.  For example, if neither
9865  dnl `shared' nor `disable-shared' was passed, we enable building of shared
9866  dnl archives by default:
9867  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
9868  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
9869  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
9870  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
9871  		   [_LT_ENABLE_FAST_INSTALL])
9872  ])
9873])# _LT_SET_OPTIONS
9874
9875
9876
9877# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
9878# -----------------------------------------
9879m4_define([_LT_MANGLE_DEFUN],
9880[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
9881
9882
9883# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
9884# -----------------------------------------------
9885m4_define([LT_OPTION_DEFINE],
9886[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
9887])# LT_OPTION_DEFINE
9888
9889
9890# dlopen
9891# ------
9892LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
9893])
9894
9895AU_DEFUN([AC_LIBTOOL_DLOPEN],
9896[_LT_SET_OPTION([LT_INIT], [dlopen])
9897AC_DIAGNOSE([obsolete],
9898[$0: Remove this warning and the call to _LT_SET_OPTION when you
9899put the `dlopen' option into LT_INIT's first parameter.])
9900])
9901
9902dnl aclocal-1.4 backwards compatibility:
9903dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
9904
9905
9906# win32-dll
9907# ---------
9908# Declare package support for building win32 dll's.
9909LT_OPTION_DEFINE([LT_INIT], [win32-dll],
9910[enable_win32_dll=yes
9911
9912case $host in
9913*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
9914  AC_CHECK_TOOL(AS, as, false)
9915  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
9916  AC_CHECK_TOOL(OBJDUMP, objdump, false)
9917  ;;
9918esac
9919
9920test -z "$AS" && AS=as
9921_LT_DECL([], [AS],      [1], [Assembler program])dnl
9922
9923test -z "$DLLTOOL" && DLLTOOL=dlltool
9924_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
9925
9926test -z "$OBJDUMP" && OBJDUMP=objdump
9927_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
9928])# win32-dll
9929
9930AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
9931[AC_REQUIRE([AC_CANONICAL_HOST])dnl
9932_LT_SET_OPTION([LT_INIT], [win32-dll])
9933AC_DIAGNOSE([obsolete],
9934[$0: Remove this warning and the call to _LT_SET_OPTION when you
9935put the `win32-dll' option into LT_INIT's first parameter.])
9936])
9937
9938dnl aclocal-1.4 backwards compatibility:
9939dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
9940
9941
9942# _LT_ENABLE_SHARED([DEFAULT])
9943# ----------------------------
9944# implement the --enable-shared flag, and supports the `shared' and
9945# `disable-shared' LT_INIT options.
9946# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9947m4_define([_LT_ENABLE_SHARED],
9948[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
9949AC_ARG_ENABLE([shared],
9950    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
9951	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
9952    [p=${PACKAGE-default}
9953    case $enableval in
9954    yes) enable_shared=yes ;;
9955    no) enable_shared=no ;;
9956    *)
9957      enable_shared=no
9958      # Look at the argument we got.  We use all the common list separators.
9959      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9960      for pkg in $enableval; do
9961	IFS="$lt_save_ifs"
9962	if test "X$pkg" = "X$p"; then
9963	  enable_shared=yes
9964	fi
9965      done
9966      IFS="$lt_save_ifs"
9967      ;;
9968    esac],
9969    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
9970
9971    _LT_DECL([build_libtool_libs], [enable_shared], [0],
9972	[Whether or not to build shared libraries])
9973])# _LT_ENABLE_SHARED
9974
9975LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
9976LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
9977
9978# Old names:
9979AC_DEFUN([AC_ENABLE_SHARED],
9980[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
9981])
9982
9983AC_DEFUN([AC_DISABLE_SHARED],
9984[_LT_SET_OPTION([LT_INIT], [disable-shared])
9985])
9986
9987AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
9988AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
9989
9990dnl aclocal-1.4 backwards compatibility:
9991dnl AC_DEFUN([AM_ENABLE_SHARED], [])
9992dnl AC_DEFUN([AM_DISABLE_SHARED], [])
9993
9994
9995
9996# _LT_ENABLE_STATIC([DEFAULT])
9997# ----------------------------
9998# implement the --enable-static flag, and support the `static' and
9999# `disable-static' LT_INIT options.
10000# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
10001m4_define([_LT_ENABLE_STATIC],
10002[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
10003AC_ARG_ENABLE([static],
10004    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
10005	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
10006    [p=${PACKAGE-default}
10007    case $enableval in
10008    yes) enable_static=yes ;;
10009    no) enable_static=no ;;
10010    *)
10011     enable_static=no
10012      # Look at the argument we got.  We use all the common list separators.
10013      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
10014      for pkg in $enableval; do
10015	IFS="$lt_save_ifs"
10016	if test "X$pkg" = "X$p"; then
10017	  enable_static=yes
10018	fi
10019      done
10020      IFS="$lt_save_ifs"
10021      ;;
10022    esac],
10023    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
10024
10025    _LT_DECL([build_old_libs], [enable_static], [0],
10026	[Whether or not to build static libraries])
10027])# _LT_ENABLE_STATIC
10028
10029LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
10030LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
10031
10032# Old names:
10033AC_DEFUN([AC_ENABLE_STATIC],
10034[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
10035])
10036
10037AC_DEFUN([AC_DISABLE_STATIC],
10038[_LT_SET_OPTION([LT_INIT], [disable-static])
10039])
10040
10041AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
10042AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
10043
10044dnl aclocal-1.4 backwards compatibility:
10045dnl AC_DEFUN([AM_ENABLE_STATIC], [])
10046dnl AC_DEFUN([AM_DISABLE_STATIC], [])
10047
10048
10049
10050# _LT_ENABLE_FAST_INSTALL([DEFAULT])
10051# ----------------------------------
10052# implement the --enable-fast-install flag, and support the `fast-install'
10053# and `disable-fast-install' LT_INIT options.
10054# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
10055m4_define([_LT_ENABLE_FAST_INSTALL],
10056[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
10057AC_ARG_ENABLE([fast-install],
10058    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
10059    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
10060    [p=${PACKAGE-default}
10061    case $enableval in
10062    yes) enable_fast_install=yes ;;
10063    no) enable_fast_install=no ;;
10064    *)
10065      enable_fast_install=no
10066      # Look at the argument we got.  We use all the common list separators.
10067      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
10068      for pkg in $enableval; do
10069	IFS="$lt_save_ifs"
10070	if test "X$pkg" = "X$p"; then
10071	  enable_fast_install=yes
10072	fi
10073      done
10074      IFS="$lt_save_ifs"
10075      ;;
10076    esac],
10077    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
10078
10079_LT_DECL([fast_install], [enable_fast_install], [0],
10080	 [Whether or not to optimize for fast installation])dnl
10081])# _LT_ENABLE_FAST_INSTALL
10082
10083LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
10084LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
10085
10086# Old names:
10087AU_DEFUN([AC_ENABLE_FAST_INSTALL],
10088[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
10089AC_DIAGNOSE([obsolete],
10090[$0: Remove this warning and the call to _LT_SET_OPTION when you put
10091the `fast-install' option into LT_INIT's first parameter.])
10092])
10093
10094AU_DEFUN([AC_DISABLE_FAST_INSTALL],
10095[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
10096AC_DIAGNOSE([obsolete],
10097[$0: Remove this warning and the call to _LT_SET_OPTION when you put
10098the `disable-fast-install' option into LT_INIT's first parameter.])
10099])
10100
10101dnl aclocal-1.4 backwards compatibility:
10102dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
10103dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
10104
10105
10106# _LT_WITH_PIC([MODE])
10107# --------------------
10108# implement the --with-pic flag, and support the `pic-only' and `no-pic'
10109# LT_INIT options.
10110# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
10111m4_define([_LT_WITH_PIC],
10112[AC_ARG_WITH([pic],
10113    [AS_HELP_STRING([--with-pic],
10114	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
10115    [pic_mode="$withval"],
10116    [pic_mode=default])
10117
10118test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
10119
10120_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
10121])# _LT_WITH_PIC
10122
10123LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
10124LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
10125
10126# Old name:
10127AU_DEFUN([AC_LIBTOOL_PICMODE],
10128[_LT_SET_OPTION([LT_INIT], [pic-only])
10129AC_DIAGNOSE([obsolete],
10130[$0: Remove this warning and the call to _LT_SET_OPTION when you
10131put the `pic-only' option into LT_INIT's first parameter.])
10132])
10133
10134dnl aclocal-1.4 backwards compatibility:
10135dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
10136
10137
10138m4_define([_LTDL_MODE], [])
10139LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
10140		 [m4_define([_LTDL_MODE], [nonrecursive])])
10141LT_OPTION_DEFINE([LTDL_INIT], [recursive],
10142		 [m4_define([_LTDL_MODE], [recursive])])
10143LT_OPTION_DEFINE([LTDL_INIT], [subproject],
10144		 [m4_define([_LTDL_MODE], [subproject])])
10145
10146m4_define([_LTDL_TYPE], [])
10147LT_OPTION_DEFINE([LTDL_INIT], [installable],
10148		 [m4_define([_LTDL_TYPE], [installable])])
10149LT_OPTION_DEFINE([LTDL_INIT], [convenience],
10150		 [m4_define([_LTDL_TYPE], [convenience])])
10151
10152# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
10153#
10154# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
10155# Written by Gary V. Vaughan, 2004
10156#
10157# This file is free software; the Free Software Foundation gives
10158# unlimited permission to copy and/or distribute it, with or without
10159# modifications, as long as this notice is preserved.
10160
10161# serial 6 ltsugar.m4
10162
10163# This is to help aclocal find these macros, as it can't see m4_define.
10164AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
10165
10166
10167# lt_join(SEP, ARG1, [ARG2...])
10168# -----------------------------
10169# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
10170# associated separator.
10171# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
10172# versions in m4sugar had bugs.
10173m4_define([lt_join],
10174[m4_if([$#], [1], [],
10175       [$#], [2], [[$2]],
10176       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
10177m4_define([_lt_join],
10178[m4_if([$#$2], [2], [],
10179       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
10180
10181
10182# lt_car(LIST)
10183# lt_cdr(LIST)
10184# ------------
10185# Manipulate m4 lists.
10186# These macros are necessary as long as will still need to support
10187# Autoconf-2.59 which quotes differently.
10188m4_define([lt_car], [[$1]])
10189m4_define([lt_cdr],
10190[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
10191       [$#], 1, [],
10192       [m4_dquote(m4_shift($@))])])
10193m4_define([lt_unquote], $1)
10194
10195
10196# lt_append(MACRO-NAME, STRING, [SEPARATOR])
10197# ------------------------------------------
10198# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
10199# Note that neither SEPARATOR nor STRING are expanded; they are appended
10200# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
10201# No SEPARATOR is output if MACRO-NAME was previously undefined (different
10202# than defined and empty).
10203#
10204# This macro is needed until we can rely on Autoconf 2.62, since earlier
10205# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
10206m4_define([lt_append],
10207[m4_define([$1],
10208	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
10209
10210
10211
10212# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
10213# ----------------------------------------------------------
10214# Produce a SEP delimited list of all paired combinations of elements of
10215# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
10216# has the form PREFIXmINFIXSUFFIXn.
10217# Needed until we can rely on m4_combine added in Autoconf 2.62.
10218m4_define([lt_combine],
10219[m4_if(m4_eval([$# > 3]), [1],
10220       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
10221[[m4_foreach([_Lt_prefix], [$2],
10222	     [m4_foreach([_Lt_suffix],
10223		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
10224	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
10225
10226
10227# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
10228# -----------------------------------------------------------------------
10229# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
10230# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
10231m4_define([lt_if_append_uniq],
10232[m4_ifdef([$1],
10233	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
10234		 [lt_append([$1], [$2], [$3])$4],
10235		 [$5])],
10236	  [lt_append([$1], [$2], [$3])$4])])
10237
10238
10239# lt_dict_add(DICT, KEY, VALUE)
10240# -----------------------------
10241m4_define([lt_dict_add],
10242[m4_define([$1($2)], [$3])])
10243
10244
10245# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
10246# --------------------------------------------
10247m4_define([lt_dict_add_subkey],
10248[m4_define([$1($2:$3)], [$4])])
10249
10250
10251# lt_dict_fetch(DICT, KEY, [SUBKEY])
10252# ----------------------------------
10253m4_define([lt_dict_fetch],
10254[m4_ifval([$3],
10255	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
10256    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
10257
10258
10259# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
10260# -----------------------------------------------------------------
10261m4_define([lt_if_dict_fetch],
10262[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
10263	[$5],
10264    [$6])])
10265
10266
10267# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
10268# --------------------------------------------------------------
10269m4_define([lt_dict_filter],
10270[m4_if([$5], [], [],
10271  [lt_join(m4_quote(m4_default([$4], [[, ]])),
10272           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
10273		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
10274])
10275
10276# ltversion.m4 -- version numbers			-*- Autoconf -*-
10277#
10278#   Copyright (C) 2004 Free Software Foundation, Inc.
10279#   Written by Scott James Remnant, 2004
10280#
10281# This file is free software; the Free Software Foundation gives
10282# unlimited permission to copy and/or distribute it, with or without
10283# modifications, as long as this notice is preserved.
10284
10285# Generated from ltversion.in.
10286
10287# serial 3175 ltversion.m4
10288# This file is part of GNU Libtool
10289
10290m4_define([LT_PACKAGE_VERSION], [2.2.10])
10291m4_define([LT_PACKAGE_REVISION], [1.3175])
10292
10293AC_DEFUN([LTVERSION_VERSION],
10294[macro_version='2.2.10'
10295macro_revision='1.3175'
10296_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
10297_LT_DECL(, macro_revision, 0)
10298])
10299
10300# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
10301#
10302#   Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
10303#   Written by Scott James Remnant, 2004.
10304#
10305# This file is free software; the Free Software Foundation gives
10306# unlimited permission to copy and/or distribute it, with or without
10307# modifications, as long as this notice is preserved.
10308
10309# serial 5 lt~obsolete.m4
10310
10311# These exist entirely to fool aclocal when bootstrapping libtool.
10312#
10313# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
10314# which have later been changed to m4_define as they aren't part of the
10315# exported API, or moved to Autoconf or Automake where they belong.
10316#
10317# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
10318# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
10319# using a macro with the same name in our local m4/libtool.m4 it'll
10320# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
10321# and doesn't know about Autoconf macros at all.)
10322#
10323# So we provide this file, which has a silly filename so it's always
10324# included after everything else.  This provides aclocal with the
10325# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
10326# because those macros already exist, or will be overwritten later.
10327# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
10328#
10329# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
10330# Yes, that means every name once taken will need to remain here until
10331# we give up compatibility with versions before 1.7, at which point
10332# we need to keep only those names which we still refer to.
10333
10334# This is to help aclocal find these macros, as it can't see m4_define.
10335AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
10336
10337m4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
10338m4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
10339m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
10340m4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
10341m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
10342m4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
10343m4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
10344m4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
10345m4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
10346m4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
10347m4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
10348m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
10349m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
10350m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
10351m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
10352m4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
10353m4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
10354m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
10355m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
10356m4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
10357m4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
10358m4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
10359m4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
10360m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
10361m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
10362m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
10363m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
10364m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
10365m4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
10366m4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
10367m4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
10368m4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
10369m4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
10370m4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
10371m4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
10372m4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
10373m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
10374m4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
10375m4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
10376m4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
10377m4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
10378m4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
10379m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
10380m4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
10381m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
10382m4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
10383m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
10384m4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
10385m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
10386m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
10387m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
10388m4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
10389m4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
10390m4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
10391m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS],	[AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
10392m4_ifndef([_LT_AC_PROG_CXXCPP],		[AC_DEFUN([_LT_AC_PROG_CXXCPP])])
10393m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS],	[AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
10394m4_ifndef([_LT_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
10395m4_ifndef([_LT_PROG_F77],		[AC_DEFUN([_LT_PROG_F77])])
10396m4_ifndef([_LT_PROG_FC],		[AC_DEFUN([_LT_PROG_FC])])
10397m4_ifndef([_LT_PROG_CXX],		[AC_DEFUN([_LT_PROG_CXX])])
10398
10399