aclocal.m4 revision f353fbad
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# Do all the work for Automake.                             -*- Autoconf -*-
410
411# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
412# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
413#
414# This file is free software; the Free Software Foundation
415# gives unlimited permission to copy and/or distribute it,
416# with or without modifications, as long as this notice is preserved.
417
418# serial 16
419
420# This macro actually does too much.  Some checks are only needed if
421# your package does certain things.  But this isn't really a big deal.
422
423# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
424# AM_INIT_AUTOMAKE([OPTIONS])
425# -----------------------------------------------
426# The call with PACKAGE and VERSION arguments is the old style
427# call (pre autoconf-2.50), which is being phased out.  PACKAGE
428# and VERSION should now be passed to AC_INIT and removed from
429# the call to AM_INIT_AUTOMAKE.
430# We support both call styles for the transition.  After
431# the next Automake release, Autoconf can make the AC_INIT
432# arguments mandatory, and then we can depend on a new Autoconf
433# release and drop the old call support.
434AC_DEFUN([AM_INIT_AUTOMAKE],
435[AC_PREREQ([2.62])dnl
436dnl Autoconf wants to disallow AM_ names.  We explicitly allow
437dnl the ones we care about.
438m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
439AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
440AC_REQUIRE([AC_PROG_INSTALL])dnl
441if test "`cd $srcdir && pwd`" != "`pwd`"; then
442  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
443  # is not polluted with repeated "-I."
444  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
445  # test to see if srcdir already configured
446  if test -f $srcdir/config.status; then
447    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
448  fi
449fi
450
451# test whether we have cygpath
452if test -z "$CYGPATH_W"; then
453  if (cygpath --version) >/dev/null 2>/dev/null; then
454    CYGPATH_W='cygpath -w'
455  else
456    CYGPATH_W=echo
457  fi
458fi
459AC_SUBST([CYGPATH_W])
460
461# Define the identity of the package.
462dnl Distinguish between old-style and new-style calls.
463m4_ifval([$2],
464[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
465 AC_SUBST([PACKAGE], [$1])dnl
466 AC_SUBST([VERSION], [$2])],
467[_AM_SET_OPTIONS([$1])dnl
468dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
469m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
470  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
471 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
472 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
473
474_AM_IF_OPTION([no-define],,
475[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
476 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
477
478# Some tools Automake needs.
479AC_REQUIRE([AM_SANITY_CHECK])dnl
480AC_REQUIRE([AC_ARG_PROGRAM])dnl
481AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
482AM_MISSING_PROG(AUTOCONF, autoconf)
483AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
484AM_MISSING_PROG(AUTOHEADER, autoheader)
485AM_MISSING_PROG(MAKEINFO, makeinfo)
486AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
487AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
488AC_REQUIRE([AM_PROG_MKDIR_P])dnl
489# We need awk for the "check" target.  The system "awk" is bad on
490# some platforms.
491AC_REQUIRE([AC_PROG_AWK])dnl
492AC_REQUIRE([AC_PROG_MAKE_SET])dnl
493AC_REQUIRE([AM_SET_LEADING_DOT])dnl
494_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
495	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
496			     [_AM_PROG_TAR([v7])])])
497_AM_IF_OPTION([no-dependencies],,
498[AC_PROVIDE_IFELSE([AC_PROG_CC],
499		  [_AM_DEPENDENCIES(CC)],
500		  [define([AC_PROG_CC],
501			  defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
502AC_PROVIDE_IFELSE([AC_PROG_CXX],
503		  [_AM_DEPENDENCIES(CXX)],
504		  [define([AC_PROG_CXX],
505			  defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
506AC_PROVIDE_IFELSE([AC_PROG_OBJC],
507		  [_AM_DEPENDENCIES(OBJC)],
508		  [define([AC_PROG_OBJC],
509			  defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
510])
511_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
512dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
513dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
514dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
515AC_CONFIG_COMMANDS_PRE(dnl
516[m4_provide_if([_AM_COMPILER_EXEEXT],
517  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
518])
519
520dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
521dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
522dnl mangled by Autoconf and run in a shell conditional statement.
523m4_define([_AC_COMPILER_EXEEXT],
524m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
525
526
527# When config.status generates a header, we must update the stamp-h file.
528# This file resides in the same directory as the config header
529# that is generated.  The stamp files are numbered to have different names.
530
531# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
532# loop where config.status creates the headers, so we can generate
533# our stamp files there.
534AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
535[# Compute $1's index in $config_headers.
536_am_arg=$1
537_am_stamp_count=1
538for _am_header in $config_headers :; do
539  case $_am_header in
540    $_am_arg | $_am_arg:* )
541      break ;;
542    * )
543      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
544  esac
545done
546echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
547
548# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
549#
550# This file is free software; the Free Software Foundation
551# gives unlimited permission to copy and/or distribute it,
552# with or without modifications, as long as this notice is preserved.
553
554# AM_PROG_INSTALL_SH
555# ------------------
556# Define $install_sh.
557AC_DEFUN([AM_PROG_INSTALL_SH],
558[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
559if test x"${install_sh}" != xset; then
560  case $am_aux_dir in
561  *\ * | *\	*)
562    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
563  *)
564    install_sh="\${SHELL} $am_aux_dir/install-sh"
565  esac
566fi
567AC_SUBST(install_sh)])
568
569# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
570#
571# This file is free software; the Free Software Foundation
572# gives unlimited permission to copy and/or distribute it,
573# with or without modifications, as long as this notice is preserved.
574
575# serial 2
576
577# Check whether the underlying file-system supports filenames
578# with a leading dot.  For instance MS-DOS doesn't.
579AC_DEFUN([AM_SET_LEADING_DOT],
580[rm -rf .tst 2>/dev/null
581mkdir .tst 2>/dev/null
582if test -d .tst; then
583  am__leading_dot=.
584else
585  am__leading_dot=_
586fi
587rmdir .tst 2>/dev/null
588AC_SUBST([am__leading_dot])])
589
590# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
591# From Jim Meyering
592
593# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
594# Free Software Foundation, Inc.
595#
596# This file is free software; the Free Software Foundation
597# gives unlimited permission to copy and/or distribute it,
598# with or without modifications, as long as this notice is preserved.
599
600# serial 5
601
602# AM_MAINTAINER_MODE([DEFAULT-MODE])
603# ----------------------------------
604# Control maintainer-specific portions of Makefiles.
605# Default is to disable them, unless `enable' is passed literally.
606# For symmetry, `disable' may be passed as well.  Anyway, the user
607# can override the default with the --enable/--disable switch.
608AC_DEFUN([AM_MAINTAINER_MODE],
609[m4_case(m4_default([$1], [disable]),
610       [enable], [m4_define([am_maintainer_other], [disable])],
611       [disable], [m4_define([am_maintainer_other], [enable])],
612       [m4_define([am_maintainer_other], [enable])
613        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
614AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
615  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
616  AC_ARG_ENABLE([maintainer-mode],
617[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
618			  (and sometimes confusing) to the casual installer],
619      [USE_MAINTAINER_MODE=$enableval],
620      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
621  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
622  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
623  MAINT=$MAINTAINER_MODE_TRUE
624  AC_SUBST([MAINT])dnl
625]
626)
627
628AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
629
630# Check to see how 'make' treats includes.	            -*- Autoconf -*-
631
632# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
633#
634# This file is free software; the Free Software Foundation
635# gives unlimited permission to copy and/or distribute it,
636# with or without modifications, as long as this notice is preserved.
637
638# serial 4
639
640# AM_MAKE_INCLUDE()
641# -----------------
642# Check to see how make treats includes.
643AC_DEFUN([AM_MAKE_INCLUDE],
644[am_make=${MAKE-make}
645cat > confinc << 'END'
646am__doit:
647	@echo this is the am__doit target
648.PHONY: am__doit
649END
650# If we don't find an include directive, just comment out the code.
651AC_MSG_CHECKING([for style of include used by $am_make])
652am__include="#"
653am__quote=
654_am_result=none
655# First try GNU make style include.
656echo "include confinc" > confmf
657# Ignore all kinds of additional output from `make'.
658case `$am_make -s -f confmf 2> /dev/null` in #(
659*the\ am__doit\ target*)
660  am__include=include
661  am__quote=
662  _am_result=GNU
663  ;;
664esac
665# Now try BSD make style include.
666if test "$am__include" = "#"; then
667   echo '.include "confinc"' > confmf
668   case `$am_make -s -f confmf 2> /dev/null` in #(
669   *the\ am__doit\ target*)
670     am__include=.include
671     am__quote="\""
672     _am_result=BSD
673     ;;
674   esac
675fi
676AC_SUBST([am__include])
677AC_SUBST([am__quote])
678AC_MSG_RESULT([$_am_result])
679rm -f confinc confmf
680])
681
682# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008
683# Free Software Foundation, Inc.
684#
685# This file is free software; the Free Software Foundation
686# gives unlimited permission to copy and/or distribute it,
687# with or without modifications, as long as this notice is preserved.
688
689# serial 6
690
691# AM_PROG_CC_C_O
692# --------------
693# Like AC_PROG_CC_C_O, but changed for automake.
694AC_DEFUN([AM_PROG_CC_C_O],
695[AC_REQUIRE([AC_PROG_CC_C_O])dnl
696AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
697AC_REQUIRE_AUX_FILE([compile])dnl
698# FIXME: we rely on the cache variable name because
699# there is no other way.
700set dummy $CC
701am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
702eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
703if test "$am_t" != yes; then
704   # Losing compiler, so override with the script.
705   # FIXME: It is wrong to rewrite CC.
706   # But if we don't then we get into trouble of one sort or another.
707   # A longer-term fix would be to have automake use am__CC in this case,
708   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
709   CC="$am_aux_dir/compile $CC"
710fi
711dnl Make sure AC_PROG_CC is never called again, or it will override our
712dnl setting of CC.
713m4_define([AC_PROG_CC],
714          [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
715])
716
717# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
718
719# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
720# Free Software Foundation, Inc.
721#
722# This file is free software; the Free Software Foundation
723# gives unlimited permission to copy and/or distribute it,
724# with or without modifications, as long as this notice is preserved.
725
726# serial 6
727
728# AM_MISSING_PROG(NAME, PROGRAM)
729# ------------------------------
730AC_DEFUN([AM_MISSING_PROG],
731[AC_REQUIRE([AM_MISSING_HAS_RUN])
732$1=${$1-"${am_missing_run}$2"}
733AC_SUBST($1)])
734
735
736# AM_MISSING_HAS_RUN
737# ------------------
738# Define MISSING if not defined so far and test if it supports --run.
739# If it does, set am_missing_run to use it, otherwise, to nothing.
740AC_DEFUN([AM_MISSING_HAS_RUN],
741[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
742AC_REQUIRE_AUX_FILE([missing])dnl
743if test x"${MISSING+set}" != xset; then
744  case $am_aux_dir in
745  *\ * | *\	*)
746    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
747  *)
748    MISSING="\${SHELL} $am_aux_dir/missing" ;;
749  esac
750fi
751# Use eval to expand $SHELL
752if eval "$MISSING --run true"; then
753  am_missing_run="$MISSING --run "
754else
755  am_missing_run=
756  AC_MSG_WARN([`missing' script is too old or missing])
757fi
758])
759
760# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
761#
762# This file is free software; the Free Software Foundation
763# gives unlimited permission to copy and/or distribute it,
764# with or without modifications, as long as this notice is preserved.
765
766# AM_PROG_MKDIR_P
767# ---------------
768# Check for `mkdir -p'.
769AC_DEFUN([AM_PROG_MKDIR_P],
770[AC_PREREQ([2.60])dnl
771AC_REQUIRE([AC_PROG_MKDIR_P])dnl
772dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
773dnl while keeping a definition of mkdir_p for backward compatibility.
774dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
775dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
776dnl Makefile.ins that do not define MKDIR_P, so we do our own
777dnl adjustment using top_builddir (which is defined more often than
778dnl MKDIR_P).
779AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
780case $mkdir_p in
781  [[\\/$]]* | ?:[[\\/]]*) ;;
782  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
783esac
784])
785
786# Helper functions for option handling.                     -*- Autoconf -*-
787
788# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
789#
790# This file is free software; the Free Software Foundation
791# gives unlimited permission to copy and/or distribute it,
792# with or without modifications, as long as this notice is preserved.
793
794# serial 4
795
796# _AM_MANGLE_OPTION(NAME)
797# -----------------------
798AC_DEFUN([_AM_MANGLE_OPTION],
799[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
800
801# _AM_SET_OPTION(NAME)
802# ------------------------------
803# Set option NAME.  Presently that only means defining a flag for this option.
804AC_DEFUN([_AM_SET_OPTION],
805[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
806
807# _AM_SET_OPTIONS(OPTIONS)
808# ----------------------------------
809# OPTIONS is a space-separated list of Automake options.
810AC_DEFUN([_AM_SET_OPTIONS],
811[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
812
813# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
814# -------------------------------------------
815# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
816AC_DEFUN([_AM_IF_OPTION],
817[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
818
819# Check to make sure that the build environment is sane.    -*- Autoconf -*-
820
821# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
822# Free Software Foundation, Inc.
823#
824# This file is free software; the Free Software Foundation
825# gives unlimited permission to copy and/or distribute it,
826# with or without modifications, as long as this notice is preserved.
827
828# serial 5
829
830# AM_SANITY_CHECK
831# ---------------
832AC_DEFUN([AM_SANITY_CHECK],
833[AC_MSG_CHECKING([whether build environment is sane])
834# Just in case
835sleep 1
836echo timestamp > conftest.file
837# Reject unsafe characters in $srcdir or the absolute working directory
838# name.  Accept space and tab only in the latter.
839am_lf='
840'
841case `pwd` in
842  *[[\\\"\#\$\&\'\`$am_lf]]*)
843    AC_MSG_ERROR([unsafe absolute working directory name]);;
844esac
845case $srcdir in
846  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
847    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
848esac
849
850# Do `set' in a subshell so we don't clobber the current shell's
851# arguments.  Must try -L first in case configure is actually a
852# symlink; some systems play weird games with the mod time of symlinks
853# (eg FreeBSD returns the mod time of the symlink's containing
854# directory).
855if (
856   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
857   if test "$[*]" = "X"; then
858      # -L didn't work.
859      set X `ls -t "$srcdir/configure" conftest.file`
860   fi
861   rm -f conftest.file
862   if test "$[*]" != "X $srcdir/configure conftest.file" \
863      && test "$[*]" != "X conftest.file $srcdir/configure"; then
864
865      # If neither matched, then we have a broken ls.  This can happen
866      # if, for instance, CONFIG_SHELL is bash and it inherits a
867      # broken ls alias from the environment.  This has actually
868      # happened.  Such a system could not be considered "sane".
869      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
870alias in your environment])
871   fi
872
873   test "$[2]" = conftest.file
874   )
875then
876   # Ok.
877   :
878else
879   AC_MSG_ERROR([newly created file is older than distributed files!
880Check your system clock])
881fi
882AC_MSG_RESULT(yes)])
883
884# Copyright (C) 2009  Free Software Foundation, Inc.
885#
886# This file is free software; the Free Software Foundation
887# gives unlimited permission to copy and/or distribute it,
888# with or without modifications, as long as this notice is preserved.
889
890# serial 1
891
892# AM_SILENT_RULES([DEFAULT])
893# --------------------------
894# Enable less verbose build rules; with the default set to DEFAULT
895# (`yes' being less verbose, `no' or empty being verbose).
896AC_DEFUN([AM_SILENT_RULES],
897[AC_ARG_ENABLE([silent-rules],
898[  --enable-silent-rules          less verbose build output (undo: `make V=1')
899  --disable-silent-rules         verbose build output (undo: `make V=0')])
900case $enable_silent_rules in
901yes) AM_DEFAULT_VERBOSITY=0;;
902no)  AM_DEFAULT_VERBOSITY=1;;
903*)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
904esac
905AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
906AM_BACKSLASH='\'
907AC_SUBST([AM_BACKSLASH])dnl
908_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
909])
910
911# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
912#
913# This file is free software; the Free Software Foundation
914# gives unlimited permission to copy and/or distribute it,
915# with or without modifications, as long as this notice is preserved.
916
917# AM_PROG_INSTALL_STRIP
918# ---------------------
919# One issue with vendor `install' (even GNU) is that you can't
920# specify the program used to strip binaries.  This is especially
921# annoying in cross-compiling environments, where the build's strip
922# is unlikely to handle the host's binaries.
923# Fortunately install-sh will honor a STRIPPROG variable, so we
924# always use install-sh in `make install-strip', and initialize
925# STRIPPROG with the value of the STRIP variable (set by the user).
926AC_DEFUN([AM_PROG_INSTALL_STRIP],
927[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
928# Installed binaries are usually stripped using `strip' when the user
929# run `make install-strip'.  However `strip' might not be the right
930# tool to use in cross-compilation environments, therefore Automake
931# will honor the `STRIP' environment variable to overrule this program.
932dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
933if test "$cross_compiling" != no; then
934  AC_CHECK_TOOL([STRIP], [strip], :)
935fi
936INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
937AC_SUBST([INSTALL_STRIP_PROGRAM])])
938
939# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
940#
941# This file is free software; the Free Software Foundation
942# gives unlimited permission to copy and/or distribute it,
943# with or without modifications, as long as this notice is preserved.
944
945# serial 2
946
947# _AM_SUBST_NOTMAKE(VARIABLE)
948# ---------------------------
949# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
950# This macro is traced by Automake.
951AC_DEFUN([_AM_SUBST_NOTMAKE])
952
953# AM_SUBST_NOTMAKE(VARIABLE)
954# ---------------------------
955# Public sister of _AM_SUBST_NOTMAKE.
956AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
957
958# Check how to create a tarball.                            -*- Autoconf -*-
959
960# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
961#
962# This file is free software; the Free Software Foundation
963# gives unlimited permission to copy and/or distribute it,
964# with or without modifications, as long as this notice is preserved.
965
966# serial 2
967
968# _AM_PROG_TAR(FORMAT)
969# --------------------
970# Check how to create a tarball in format FORMAT.
971# FORMAT should be one of `v7', `ustar', or `pax'.
972#
973# Substitute a variable $(am__tar) that is a command
974# writing to stdout a FORMAT-tarball containing the directory
975# $tardir.
976#     tardir=directory && $(am__tar) > result.tar
977#
978# Substitute a variable $(am__untar) that extract such
979# a tarball read from stdin.
980#     $(am__untar) < result.tar
981AC_DEFUN([_AM_PROG_TAR],
982[# Always define AMTAR for backward compatibility.
983AM_MISSING_PROG([AMTAR], [tar])
984m4_if([$1], [v7],
985     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
986     [m4_case([$1], [ustar],, [pax],,
987              [m4_fatal([Unknown tar format])])
988AC_MSG_CHECKING([how to create a $1 tar archive])
989# Loop over all known methods to create a tar archive until one works.
990_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
991_am_tools=${am_cv_prog_tar_$1-$_am_tools}
992# Do not fold the above two line into one, because Tru64 sh and
993# Solaris sh will not grok spaces in the rhs of `-'.
994for _am_tool in $_am_tools
995do
996  case $_am_tool in
997  gnutar)
998    for _am_tar in tar gnutar gtar;
999    do
1000      AM_RUN_LOG([$_am_tar --version]) && break
1001    done
1002    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1003    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1004    am__untar="$_am_tar -xf -"
1005    ;;
1006  plaintar)
1007    # Must skip GNU tar: if it does not support --format= it doesn't create
1008    # ustar tarball either.
1009    (tar --version) >/dev/null 2>&1 && continue
1010    am__tar='tar chf - "$$tardir"'
1011    am__tar_='tar chf - "$tardir"'
1012    am__untar='tar xf -'
1013    ;;
1014  pax)
1015    am__tar='pax -L -x $1 -w "$$tardir"'
1016    am__tar_='pax -L -x $1 -w "$tardir"'
1017    am__untar='pax -r'
1018    ;;
1019  cpio)
1020    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1021    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1022    am__untar='cpio -i -H $1 -d'
1023    ;;
1024  none)
1025    am__tar=false
1026    am__tar_=false
1027    am__untar=false
1028    ;;
1029  esac
1030
1031  # If the value was cached, stop now.  We just wanted to have am__tar
1032  # and am__untar set.
1033  test -n "${am_cv_prog_tar_$1}" && break
1034
1035  # tar/untar a dummy directory, and stop if the command works
1036  rm -rf conftest.dir
1037  mkdir conftest.dir
1038  echo GrepMe > conftest.dir/file
1039  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1040  rm -rf conftest.dir
1041  if test -s conftest.tar; then
1042    AM_RUN_LOG([$am__untar <conftest.tar])
1043    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1044  fi
1045done
1046rm -rf conftest.dir
1047
1048AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1049AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1050AC_SUBST([am__tar])
1051AC_SUBST([am__untar])
1052]) # _AM_PROG_TAR
1053
1054dnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
1055dnl
1056dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
1057dnl 
1058dnl Permission is hereby granted, free of charge, to any person obtaining a
1059dnl copy of this software and associated documentation files (the "Software"),
1060dnl to deal in the Software without restriction, including without limitation
1061dnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
1062dnl and/or sell copies of the Software, and to permit persons to whom the
1063dnl Software is furnished to do so, subject to the following conditions:
1064dnl
1065dnl The above copyright notice and this permission notice (including the next
1066dnl paragraph) shall be included in all copies or substantial portions of the
1067dnl Software.
1068dnl
1069dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1070dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1071dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
1072dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1073dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
1074dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
1075dnl DEALINGS IN THE SOFTWARE.
1076
1077# XORG_MACROS_VERSION(required-version)
1078# -------------------------------------
1079# Minimum version: 1.1.0
1080#
1081# If you're using a macro added in Version 1.1 or newer, include this in
1082# your configure.ac with the minimum required version, such as:
1083# XORG_MACROS_VERSION(1.1)
1084#
1085# To ensure that this macro is defined, also add:
1086# m4_ifndef([XORG_MACROS_VERSION],
1087#     [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
1088#
1089#
1090# See the "minimum version" comment for each macro you use to see what 
1091# version you require.
1092m4_defun([XORG_MACROS_VERSION],[
1093m4_define([vers_have], [1.11.0])
1094m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
1095m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
1096m4_if(m4_cmp(maj_have, maj_needed), 0,,
1097    [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
1098m4_if(m4_version_compare(vers_have, [$1]), -1,
1099    [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
1100m4_undefine([vers_have])
1101m4_undefine([maj_have])
1102m4_undefine([maj_needed])
1103]) # XORG_MACROS_VERSION
1104
1105# XORG_PROG_RAWCPP()
1106# ------------------
1107# Minimum version: 1.0.0
1108#
1109# Find cpp program and necessary flags for use in pre-processing text files
1110# such as man pages and config files
1111AC_DEFUN([XORG_PROG_RAWCPP],[
1112AC_REQUIRE([AC_PROG_CPP])
1113AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
1114   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
1115
1116# Check for flag to avoid builtin definitions - assumes unix is predefined,
1117# which is not the best choice for supporting other OS'es, but covers most
1118# of the ones we need for now.
1119AC_MSG_CHECKING([if $RAWCPP requires -undef])
1120AC_LANG_CONFTEST([Does cpp redefine unix ?])
1121if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
1122	AC_MSG_RESULT([no])
1123else
1124	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
1125		RAWCPPFLAGS=-undef
1126		AC_MSG_RESULT([yes])
1127	# under Cygwin unix is still defined even with -undef
1128	elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
1129		RAWCPPFLAGS="-undef -ansi"
1130		AC_MSG_RESULT([yes, with -ansi])
1131	else
1132		AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
1133	fi
1134fi
1135rm -f conftest.$ac_ext
1136
1137AC_MSG_CHECKING([if $RAWCPP requires -traditional])
1138AC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
1139if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
1140	AC_MSG_RESULT([no])
1141else
1142	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
1143		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
1144		AC_MSG_RESULT([yes])
1145	else
1146		AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
1147	fi
1148fi
1149rm -f conftest.$ac_ext
1150AC_SUBST(RAWCPPFLAGS)
1151]) # XORG_PROG_RAWCPP
1152
1153# XORG_MANPAGE_SECTIONS()
1154# -----------------------
1155# Minimum version: 1.0.0
1156#
1157# Determine which sections man pages go in for the different man page types
1158# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
1159# Not sure if there's any better way than just hardcoding by OS name.
1160# Override default settings by setting environment variables
1161# Added MAN_SUBSTS in version 1.8
1162# Added AC_PROG_SED in version 1.8
1163
1164AC_DEFUN([XORG_MANPAGE_SECTIONS],[
1165AC_REQUIRE([AC_CANONICAL_HOST])
1166AC_REQUIRE([AC_PROG_SED])
1167
1168if test x$APP_MAN_SUFFIX = x    ; then
1169    APP_MAN_SUFFIX=1
1170fi
1171if test x$APP_MAN_DIR = x    ; then
1172    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
1173fi
1174
1175if test x$LIB_MAN_SUFFIX = x    ; then
1176    LIB_MAN_SUFFIX=3
1177fi
1178if test x$LIB_MAN_DIR = x    ; then
1179    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
1180fi
1181
1182if test x$FILE_MAN_SUFFIX = x    ; then
1183    case $host_os in
1184	solaris*)	FILE_MAN_SUFFIX=4  ;;
1185	*)		FILE_MAN_SUFFIX=5  ;;
1186    esac
1187fi
1188if test x$FILE_MAN_DIR = x    ; then
1189    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
1190fi
1191
1192if test x$MISC_MAN_SUFFIX = x    ; then
1193    case $host_os in
1194	solaris*)	MISC_MAN_SUFFIX=5  ;;
1195	*)		MISC_MAN_SUFFIX=7  ;;
1196    esac
1197fi
1198if test x$MISC_MAN_DIR = x    ; then
1199    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
1200fi
1201
1202if test x$DRIVER_MAN_SUFFIX = x    ; then
1203    case $host_os in
1204	solaris*)	DRIVER_MAN_SUFFIX=7  ;;
1205	*)		DRIVER_MAN_SUFFIX=4  ;;
1206    esac
1207fi
1208if test x$DRIVER_MAN_DIR = x    ; then
1209    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
1210fi
1211
1212if test x$ADMIN_MAN_SUFFIX = x    ; then
1213    case $host_os in
1214	solaris*)	ADMIN_MAN_SUFFIX=1m ;;
1215	*)		ADMIN_MAN_SUFFIX=8  ;;
1216    esac
1217fi
1218if test x$ADMIN_MAN_DIR = x    ; then
1219    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
1220fi
1221
1222
1223AC_SUBST([APP_MAN_SUFFIX])
1224AC_SUBST([LIB_MAN_SUFFIX])
1225AC_SUBST([FILE_MAN_SUFFIX])
1226AC_SUBST([MISC_MAN_SUFFIX])
1227AC_SUBST([DRIVER_MAN_SUFFIX])
1228AC_SUBST([ADMIN_MAN_SUFFIX])
1229AC_SUBST([APP_MAN_DIR])
1230AC_SUBST([LIB_MAN_DIR])
1231AC_SUBST([FILE_MAN_DIR])
1232AC_SUBST([MISC_MAN_DIR])
1233AC_SUBST([DRIVER_MAN_DIR])
1234AC_SUBST([ADMIN_MAN_DIR])
1235
1236XORG_MAN_PAGE="X Version 11"
1237AC_SUBST([XORG_MAN_PAGE])
1238MAN_SUBSTS="\
1239	-e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
1240	-e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
1241	-e 's|__xservername__|Xorg|g' \
1242	-e 's|__xconfigfile__|xorg.conf|g' \
1243	-e 's|__projectroot__|\$(prefix)|g' \
1244	-e 's|__apploaddir__|\$(appdefaultdir)|g' \
1245	-e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
1246	-e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
1247	-e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
1248	-e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
1249	-e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
1250	-e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
1251AC_SUBST([MAN_SUBSTS])
1252
1253]) # XORG_MANPAGE_SECTIONS
1254
1255# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION])
1256# ------------------------
1257# Minimum version: 1.7.0
1258#
1259# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent
1260# provided by xorg-sgml-doctools, if installed.
1261AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[
1262AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])])
1263XORG_SGML_PATH=
1264PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])],
1265    [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`],
1266    [m4_ifval([$1],[:],
1267        [if test x"$cross_compiling" != x"yes" ; then
1268            AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent],
1269                          [XORG_SGML_PATH=$prefix/share/sgml])
1270         fi])
1271    ])
1272
1273# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing
1274# the path and the name of the doc stylesheet
1275if test "x$XORG_SGML_PATH" != "x" ; then
1276   AC_MSG_RESULT([$XORG_SGML_PATH])
1277   STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11
1278   XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl
1279else
1280   AC_MSG_RESULT([no])
1281fi
1282
1283AC_SUBST(XORG_SGML_PATH)
1284AC_SUBST(STYLESHEET_SRCDIR)
1285AC_SUBST(XSL_STYLESHEET)
1286AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"])
1287]) # XORG_CHECK_SGML_DOCTOOLS
1288
1289# XORG_CHECK_LINUXDOC
1290# -------------------
1291# Minimum version: 1.0.0
1292#
1293# Defines the variable MAKE_TEXT if the necessary tools and
1294# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
1295# Whether or not the necessary tools and files are found can be checked
1296# with the AM_CONDITIONAL "BUILD_LINUXDOC"
1297AC_DEFUN([XORG_CHECK_LINUXDOC],[
1298AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
1299AC_REQUIRE([XORG_WITH_PS2PDF])
1300
1301AC_PATH_PROG(LINUXDOC, linuxdoc)
1302
1303AC_MSG_CHECKING([whether to build documentation])
1304
1305if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then
1306   BUILDDOC=yes
1307else
1308   BUILDDOC=no
1309fi
1310
1311AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
1312
1313AC_MSG_RESULT([$BUILDDOC])
1314
1315AC_MSG_CHECKING([whether to build pdf documentation])
1316
1317if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then
1318   BUILDPDFDOC=yes
1319else
1320   BUILDPDFDOC=no
1321fi
1322
1323AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
1324
1325AC_MSG_RESULT([$BUILDPDFDOC])
1326
1327MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f"
1328MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
1329MAKE_PDF="$PS2PDF"
1330MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
1331
1332AC_SUBST(MAKE_TEXT)
1333AC_SUBST(MAKE_PS)
1334AC_SUBST(MAKE_PDF)
1335AC_SUBST(MAKE_HTML)
1336]) # XORG_CHECK_LINUXDOC
1337
1338# XORG_CHECK_DOCBOOK
1339# -------------------
1340# Minimum version: 1.0.0
1341#
1342# Checks for the ability to build output formats from SGML DocBook source.
1343# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
1344# indicates whether the necessary tools and files are found and, if set,
1345# $(MAKE_XXX) blah.sgml will produce blah.xxx.
1346AC_DEFUN([XORG_CHECK_DOCBOOK],[
1347AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
1348
1349BUILDTXTDOC=no
1350BUILDPDFDOC=no
1351BUILDPSDOC=no
1352BUILDHTMLDOC=no
1353
1354AC_PATH_PROG(DOCBOOKPS, docbook2ps)
1355AC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
1356AC_PATH_PROG(DOCBOOKHTML, docbook2html)
1357AC_PATH_PROG(DOCBOOKTXT, docbook2txt)
1358
1359AC_MSG_CHECKING([whether to build text documentation])
1360if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x &&
1361   test x$BUILD_TXTDOC != xno; then
1362	BUILDTXTDOC=yes
1363fi
1364AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
1365AC_MSG_RESULT([$BUILDTXTDOC])
1366
1367AC_MSG_CHECKING([whether to build PDF documentation])
1368if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x &&
1369   test x$BUILD_PDFDOC != xno; then
1370	BUILDPDFDOC=yes
1371fi
1372AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
1373AC_MSG_RESULT([$BUILDPDFDOC])
1374
1375AC_MSG_CHECKING([whether to build PostScript documentation])
1376if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x &&
1377   test x$BUILD_PSDOC != xno; then
1378	BUILDPSDOC=yes
1379fi
1380AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
1381AC_MSG_RESULT([$BUILDPSDOC])
1382
1383AC_MSG_CHECKING([whether to build HTML documentation])
1384if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x &&
1385   test x$BUILD_HTMLDOC != xno; then
1386	BUILDHTMLDOC=yes
1387fi
1388AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
1389AC_MSG_RESULT([$BUILDHTMLDOC])
1390
1391MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
1392MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
1393MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
1394MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
1395
1396AC_SUBST(MAKE_TEXT)
1397AC_SUBST(MAKE_PS)
1398AC_SUBST(MAKE_PDF)
1399AC_SUBST(MAKE_HTML)
1400]) # XORG_CHECK_DOCBOOK
1401
1402# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT])
1403# ----------------
1404# Minimum version: 1.5.0
1405# Minimum version for optional DEFAULT argument: 1.11.0
1406#
1407# Documentation tools are not always available on all platforms and sometimes
1408# not at the appropriate level. This macro enables a module to test for the
1409# presence of the tool and obtain it's path in separate variables. Coupled with
1410# the --with-xmlto option, it allows maximum flexibilty in making decisions
1411# as whether or not to use the xmlto package. When DEFAULT is not specified,
1412# --with-xmlto assumes 'auto'.
1413#
1414# Interface to module:
1415# HAVE_XMLTO: 	used in makefiles to conditionally generate documentation
1416# XMLTO:	returns the path of the xmlto program found
1417#		returns the path set by the user in the environment
1418# --with-xmlto:	'yes' user instructs the module to use xmlto
1419#		'no' user instructs the module not to use xmlto
1420#
1421# Added in version 1.10.0
1422# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation
1423#                  xmlto for text output requires either lynx, links, or w3m browsers
1424#
1425# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path.
1426#
1427AC_DEFUN([XORG_WITH_XMLTO],[
1428AC_ARG_VAR([XMLTO], [Path to xmlto command])
1429m4_define([_defopt], m4_default([$2], [auto]))
1430AC_ARG_WITH(xmlto,
1431	AS_HELP_STRING([--with-xmlto],
1432	   [Use xmlto to regenerate documentation (default: ]_defopt[)]),
1433	   [use_xmlto=$withval], [use_xmlto=]_defopt)
1434m4_undefine([_defopt])
1435
1436if test "x$use_xmlto" = x"auto"; then
1437   AC_PATH_PROG([XMLTO], [xmlto])
1438   if test "x$XMLTO" = "x"; then
1439        AC_MSG_WARN([xmlto not found - documentation targets will be skipped])
1440	have_xmlto=no
1441   else
1442        have_xmlto=yes
1443   fi
1444elif test "x$use_xmlto" = x"yes" ; then
1445   AC_PATH_PROG([XMLTO], [xmlto])
1446   if test "x$XMLTO" = "x"; then
1447        AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH])
1448   fi
1449   have_xmlto=yes
1450elif test "x$use_xmlto" = x"no" ; then
1451   if test "x$XMLTO" != "x"; then
1452      AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified])
1453   fi
1454   have_xmlto=no
1455else
1456   AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no'])
1457fi
1458
1459# Test for a minimum version of xmlto, if provided.
1460m4_ifval([$1],
1461[if test "$have_xmlto" = yes; then
1462    # scrape the xmlto version
1463    AC_MSG_CHECKING([the xmlto version])
1464    xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3`
1465    AC_MSG_RESULT([$xmlto_version])
1466    AS_VERSION_COMPARE([$xmlto_version], [$1],
1467        [if test "x$use_xmlto" = xauto; then
1468            AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed])
1469            have_xmlto=no
1470        else
1471            AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed])
1472        fi])
1473fi])
1474
1475# Test for the ability of xmlto to generate a text target
1476have_xmlto_text=no
1477cat > conftest.xml << "EOF"
1478EOF
1479AS_IF([test "$have_xmlto" = yes],
1480      [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
1481             [have_xmlto_text=yes],
1482             [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])
1483rm -f conftest.xml
1484AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes])
1485AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
1486]) # XORG_WITH_XMLTO
1487
1488# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT])
1489# ----------------
1490# Minimum version: 1.5.0
1491# Minimum version for optional DEFAULT argument: 1.11.0
1492#
1493# Documentation tools are not always available on all platforms and sometimes
1494# not at the appropriate level. This macro enables a module to test for the
1495# presence of the tool and obtain it's path in separate variables. Coupled with
1496# the --with-asciidoc option, it allows maximum flexibilty in making decisions
1497# as whether or not to use the asciidoc package. When DEFAULT is not specified,
1498# --with-asciidoc assumes 'auto'.
1499#
1500# Interface to module:
1501# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation
1502# ASCIIDOC:	 returns the path of the asciidoc program found
1503#		 returns the path set by the user in the environment
1504# --with-asciidoc: 'yes' user instructs the module to use asciidoc
1505#		  'no' user instructs the module not to use asciidoc
1506#
1507# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path.
1508#
1509AC_DEFUN([XORG_WITH_ASCIIDOC],[
1510AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
1511m4_define([_defopt], m4_default([$2], [auto]))
1512AC_ARG_WITH(asciidoc,
1513	AS_HELP_STRING([--with-asciidoc],
1514	   [Use asciidoc to regenerate documentation (default: ]_defopt[)]),
1515	   [use_asciidoc=$withval], [use_asciidoc=]_defopt)
1516m4_undefine([_defopt])
1517
1518if test "x$use_asciidoc" = x"auto"; then
1519   AC_PATH_PROG([ASCIIDOC], [asciidoc])
1520   if test "x$ASCIIDOC" = "x"; then
1521        AC_MSG_WARN([asciidoc not found - documentation targets will be skipped])
1522	have_asciidoc=no
1523   else
1524        have_asciidoc=yes
1525   fi
1526elif test "x$use_asciidoc" = x"yes" ; then
1527   AC_PATH_PROG([ASCIIDOC], [asciidoc])
1528   if test "x$ASCIIDOC" = "x"; then
1529        AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH])
1530   fi
1531   have_asciidoc=yes
1532elif test "x$use_asciidoc" = x"no" ; then
1533   if test "x$ASCIIDOC" != "x"; then
1534      AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified])
1535   fi
1536   have_asciidoc=no
1537else
1538   AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no'])
1539fi
1540m4_ifval([$1],
1541[if test "$have_asciidoc" = yes; then
1542    # scrape the asciidoc version
1543    AC_MSG_CHECKING([the asciidoc version])
1544    asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2`
1545    AC_MSG_RESULT([$asciidoc_version])
1546    AS_VERSION_COMPARE([$asciidoc_version], [$1],
1547        [if test "x$use_asciidoc" = xauto; then
1548            AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed])
1549            have_asciidoc=no
1550        else
1551            AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed])
1552        fi])
1553fi])
1554AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
1555]) # XORG_WITH_ASCIIDOC
1556
1557# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT])
1558# --------------------------------
1559# Minimum version: 1.5.0
1560# Minimum version for optional DEFAULT argument: 1.11.0
1561#
1562# Documentation tools are not always available on all platforms and sometimes
1563# not at the appropriate level. This macro enables a module to test for the
1564# presence of the tool and obtain it's path in separate variables. Coupled with
1565# the --with-doxygen option, it allows maximum flexibilty in making decisions
1566# as whether or not to use the doxygen package. When DEFAULT is not specified,
1567# --with-doxygen assumes 'auto'.
1568#
1569# Interface to module:
1570# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation
1571# DOXYGEN:	 returns the path of the doxygen program found
1572#		 returns the path set by the user in the environment
1573# --with-doxygen: 'yes' user instructs the module to use doxygen
1574#		  'no' user instructs the module not to use doxygen
1575#
1576# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path.
1577#
1578AC_DEFUN([XORG_WITH_DOXYGEN],[
1579AC_ARG_VAR([DOXYGEN], [Path to doxygen command])
1580m4_define([_defopt], m4_default([$2], [auto]))
1581AC_ARG_WITH(doxygen,
1582	AS_HELP_STRING([--with-doxygen],
1583	   [Use doxygen to regenerate documentation (default: ]_defopt[)]),
1584	   [use_doxygen=$withval], [use_doxygen=]_defopt)
1585m4_undefine([_defopt])
1586
1587if test "x$use_doxygen" = x"auto"; then
1588   AC_PATH_PROG([DOXYGEN], [doxygen])
1589   if test "x$DOXYGEN" = "x"; then
1590        AC_MSG_WARN([doxygen not found - documentation targets will be skipped])
1591	have_doxygen=no
1592   else
1593        have_doxygen=yes
1594   fi
1595elif test "x$use_doxygen" = x"yes" ; then
1596   AC_PATH_PROG([DOXYGEN], [doxygen])
1597   if test "x$DOXYGEN" = "x"; then
1598        AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH])
1599   fi
1600   have_doxygen=yes
1601elif test "x$use_doxygen" = x"no" ; then
1602   if test "x$DOXYGEN" != "x"; then
1603      AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified])
1604   fi
1605   have_doxygen=no
1606else
1607   AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no'])
1608fi
1609m4_ifval([$1],
1610[if test "$have_doxygen" = yes; then
1611    # scrape the doxygen version
1612    AC_MSG_CHECKING([the doxygen version])
1613    doxygen_version=`$DOXYGEN --version 2>/dev/null`
1614    AC_MSG_RESULT([$doxygen_version])
1615    AS_VERSION_COMPARE([$doxygen_version], [$1],
1616        [if test "x$use_doxygen" = xauto; then
1617            AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed])
1618            have_doxygen=no
1619        else
1620            AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed])
1621        fi])
1622fi])
1623AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
1624]) # XORG_WITH_DOXYGEN
1625
1626# XORG_WITH_GROFF([DEFAULT])
1627# ----------------
1628# Minimum version: 1.6.0
1629# Minimum version for optional DEFAULT argument: 1.11.0
1630#
1631# Documentation tools are not always available on all platforms and sometimes
1632# not at the appropriate level. This macro enables a module to test for the
1633# presence of the tool and obtain it's path in separate variables. Coupled with
1634# the --with-groff option, it allows maximum flexibilty in making decisions
1635# as whether or not to use the groff package. When DEFAULT is not specified,
1636# --with-groff assumes 'auto'.
1637#
1638# Interface to module:
1639# HAVE_GROFF:	 used in makefiles to conditionally generate documentation
1640# HAVE_GROFF_MM: the memorandum macros (-mm) package
1641# HAVE_GROFF_MS: the -ms macros package
1642# GROFF:	 returns the path of the groff program found
1643#		 returns the path set by the user in the environment
1644# --with-groff:	 'yes' user instructs the module to use groff
1645#		 'no' user instructs the module not to use groff
1646#
1647# Added in version 1.9.0:
1648# HAVE_GROFF_HTML: groff has dependencies to output HTML format:
1649#		   pnmcut pnmcrop pnmtopng pnmtops from the netpbm package.
1650#		   psselect from the psutils package.
1651#		   the ghostcript package. Refer to the grohtml man pages
1652#
1653# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path.
1654#
1655# OS and distros often splits groff in a basic and full package, the former
1656# having the groff program and the later having devices, fonts and macros
1657# Checking for the groff executable is not enough.
1658#
1659# If macros are missing, we cannot assume that groff is useless, so we don't
1660# unset HAVE_GROFF or GROFF env variables.
1661# HAVE_GROFF_?? can never be true while HAVE_GROFF is false.
1662#
1663AC_DEFUN([XORG_WITH_GROFF],[
1664AC_ARG_VAR([GROFF], [Path to groff command])
1665m4_define([_defopt], m4_default([$1], [auto]))
1666AC_ARG_WITH(groff,
1667	AS_HELP_STRING([--with-groff],
1668	   [Use groff to regenerate documentation (default: ]_defopt[)]),
1669	   [use_groff=$withval], [use_groff=]_defopt)
1670m4_undefine([_defopt])
1671
1672if test "x$use_groff" = x"auto"; then
1673   AC_PATH_PROG([GROFF], [groff])
1674   if test "x$GROFF" = "x"; then
1675        AC_MSG_WARN([groff not found - documentation targets will be skipped])
1676	have_groff=no
1677   else
1678        have_groff=yes
1679   fi
1680elif test "x$use_groff" = x"yes" ; then
1681   AC_PATH_PROG([GROFF], [groff])
1682   if test "x$GROFF" = "x"; then
1683        AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH])
1684   fi
1685   have_groff=yes
1686elif test "x$use_groff" = x"no" ; then
1687   if test "x$GROFF" != "x"; then
1688      AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified])
1689   fi
1690   have_groff=no
1691else
1692   AC_MSG_ERROR([--with-groff expects 'yes' or 'no'])
1693fi
1694
1695# We have groff, test for the presence of the macro packages
1696if test "x$have_groff" = x"yes"; then
1697    AC_MSG_CHECKING([for ${GROFF} -ms macros])
1698    if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then
1699        groff_ms_works=yes
1700    else
1701        groff_ms_works=no
1702    fi
1703    AC_MSG_RESULT([$groff_ms_works])
1704    AC_MSG_CHECKING([for ${GROFF} -mm macros])
1705    if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then
1706        groff_mm_works=yes
1707    else
1708        groff_mm_works=no
1709    fi
1710    AC_MSG_RESULT([$groff_mm_works])
1711fi
1712
1713# We have groff, test for HTML dependencies, one command per package
1714if test "x$have_groff" = x"yes"; then
1715   AC_PATH_PROGS(GS_PATH, [gs gswin32c])
1716   AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng])
1717   AC_PATH_PROG(PSSELECT_PATH, [psselect])
1718   if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then
1719      have_groff_html=yes
1720   else
1721      have_groff_html=no
1722      AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages])
1723   fi
1724fi
1725
1726# Set Automake conditionals for Makefiles
1727AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes])
1728AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes])
1729AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes])
1730AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
1731]) # XORG_WITH_GROFF
1732
1733# XORG_WITH_FOP([DEFAULT])
1734# ----------------
1735# Minimum version: 1.6.0
1736# Minimum version for optional DEFAULT argument: 1.11.0
1737#
1738# Documentation tools are not always available on all platforms and sometimes
1739# not at the appropriate level. This macro enables a module to test for the
1740# presence of the tool and obtain it's path in separate variables. Coupled with
1741# the --with-fop option, it allows maximum flexibilty in making decisions
1742# as whether or not to use the fop package. When DEFAULT is not specified,
1743# --with-fop assumes 'auto'.
1744#
1745# Interface to module:
1746# HAVE_FOP: 	used in makefiles to conditionally generate documentation
1747# FOP:	 	returns the path of the fop program found
1748#		returns the path set by the user in the environment
1749# --with-fop: 	'yes' user instructs the module to use fop
1750#		'no' user instructs the module not to use fop
1751#
1752# If the user sets the value of FOP, AC_PATH_PROG skips testing the path.
1753#
1754AC_DEFUN([XORG_WITH_FOP],[
1755AC_ARG_VAR([FOP], [Path to fop command])
1756m4_define([_defopt], m4_default([$1], [auto]))
1757AC_ARG_WITH(fop,
1758	AS_HELP_STRING([--with-fop],
1759	   [Use fop to regenerate documentation (default: ]_defopt[)]),
1760	   [use_fop=$withval], [use_fop=]_defopt)
1761m4_undefine([_defopt])
1762
1763if test "x$use_fop" = x"auto"; then
1764   AC_PATH_PROG([FOP], [fop])
1765   if test "x$FOP" = "x"; then
1766        AC_MSG_WARN([fop not found - documentation targets will be skipped])
1767	have_fop=no
1768   else
1769        have_fop=yes
1770   fi
1771elif test "x$use_fop" = x"yes" ; then
1772   AC_PATH_PROG([FOP], [fop])
1773   if test "x$FOP" = "x"; then
1774        AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH])
1775   fi
1776   have_fop=yes
1777elif test "x$use_fop" = x"no" ; then
1778   if test "x$FOP" != "x"; then
1779      AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified])
1780   fi
1781   have_fop=no
1782else
1783   AC_MSG_ERROR([--with-fop expects 'yes' or 'no'])
1784fi
1785AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
1786]) # XORG_WITH_FOP
1787
1788# XORG_WITH_PS2PDF([DEFAULT])
1789# ----------------
1790# Minimum version: 1.6.0
1791# Minimum version for optional DEFAULT argument: 1.11.0
1792#
1793# Documentation tools are not always available on all platforms and sometimes
1794# not at the appropriate level. This macro enables a module to test for the
1795# presence of the tool and obtain it's path in separate variables. Coupled with
1796# the --with-ps2pdf option, it allows maximum flexibilty in making decisions
1797# as whether or not to use the ps2pdf package. When DEFAULT is not specified,
1798# --with-ps2pdf assumes 'auto'.
1799#
1800# Interface to module:
1801# HAVE_PS2PDF: 	used in makefiles to conditionally generate documentation
1802# PS2PDF:	returns the path of the ps2pdf program found
1803#		returns the path set by the user in the environment
1804# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf
1805#		 'no' user instructs the module not to use ps2pdf
1806#
1807# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path.
1808#
1809AC_DEFUN([XORG_WITH_PS2PDF],[
1810AC_ARG_VAR([PS2PDF], [Path to ps2pdf command])
1811m4_define([_defopt], m4_default([$1], [auto]))
1812AC_ARG_WITH(ps2pdf,
1813	AS_HELP_STRING([--with-ps2pdf],
1814	   [Use ps2pdf to regenerate documentation (default: ]_defopt[)]),
1815	   [use_ps2pdf=$withval], [use_ps2pdf=]_defopt)
1816m4_undefine([_defopt])
1817
1818if test "x$use_ps2pdf" = x"auto"; then
1819   AC_PATH_PROG([PS2PDF], [ps2pdf])
1820   if test "x$PS2PDF" = "x"; then
1821        AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped])
1822	have_ps2pdf=no
1823   else
1824        have_ps2pdf=yes
1825   fi
1826elif test "x$use_ps2pdf" = x"yes" ; then
1827   AC_PATH_PROG([PS2PDF], [ps2pdf])
1828   if test "x$PS2PDF" = "x"; then
1829        AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH])
1830   fi
1831   have_ps2pdf=yes
1832elif test "x$use_ps2pdf" = x"no" ; then
1833   if test "x$PS2PDF" != "x"; then
1834      AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified])
1835   fi
1836   have_ps2pdf=no
1837else
1838   AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no'])
1839fi
1840AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
1841]) # XORG_WITH_PS2PDF
1842
1843# XORG_ENABLE_DOCS (enable_docs=yes)
1844# ----------------
1845# Minimum version: 1.6.0
1846#
1847# Documentation tools are not always available on all platforms and sometimes
1848# not at the appropriate level. This macro enables a builder to skip all
1849# documentation targets except traditional man pages.
1850# Combined with the specific tool checking macros XORG_WITH_*, it provides
1851# maximum flexibilty in controlling documentation building.
1852# Refer to:
1853# XORG_WITH_XMLTO         --with-xmlto
1854# XORG_WITH_ASCIIDOC      --with-asciidoc
1855# XORG_WITH_DOXYGEN       --with-doxygen
1856# XORG_WITH_FOP           --with-fop
1857# XORG_WITH_GROFF         --with-groff
1858# XORG_WITH_PS2PDF        --with-ps2pdf
1859#
1860# Interface to module:
1861# ENABLE_DOCS: 	  used in makefiles to conditionally generate documentation
1862# --enable-docs: 'yes' user instructs the module to generate docs
1863#		 'no' user instructs the module not to generate docs
1864# parm1:	specify the default value, yes or no.
1865#
1866AC_DEFUN([XORG_ENABLE_DOCS],[
1867m4_define([docs_default], m4_default([$1], [yes]))
1868AC_ARG_ENABLE(docs,
1869	AS_HELP_STRING([--enable-docs],
1870	   [Enable building the documentation (default: ]docs_default[)]),
1871	   [build_docs=$enableval], [build_docs=]docs_default)
1872m4_undefine([docs_default])
1873AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes])
1874AC_MSG_CHECKING([whether to build documentation])
1875AC_MSG_RESULT([$build_docs])
1876]) # XORG_ENABLE_DOCS
1877
1878# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes)
1879# ----------------
1880# Minimum version: 1.6.0
1881#
1882# This macro enables a builder to skip all developer documentation.
1883# Combined with the specific tool checking macros XORG_WITH_*, it provides
1884# maximum flexibilty in controlling documentation building.
1885# Refer to:
1886# XORG_WITH_XMLTO         --with-xmlto
1887# XORG_WITH_ASCIIDOC      --with-asciidoc
1888# XORG_WITH_DOXYGEN       --with-doxygen
1889# XORG_WITH_FOP           --with-fop
1890# XORG_WITH_GROFF         --with-groff
1891# XORG_WITH_PS2PDF        --with-ps2pdf
1892#
1893# Interface to module:
1894# ENABLE_DEVEL_DOCS:	used in makefiles to conditionally generate developer docs
1895# --enable-devel-docs:	'yes' user instructs the module to generate developer docs
1896#			'no' user instructs the module not to generate developer docs
1897# parm1:		specify the default value, yes or no.
1898#
1899AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[
1900m4_define([devel_default], m4_default([$1], [yes]))
1901AC_ARG_ENABLE(devel-docs,
1902	AS_HELP_STRING([--enable-devel-docs],
1903	   [Enable building the developer documentation (default: ]devel_default[)]),
1904	   [build_devel_docs=$enableval], [build_devel_docs=]devel_default)
1905m4_undefine([devel_default])
1906AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes])
1907AC_MSG_CHECKING([whether to build developer documentation])
1908AC_MSG_RESULT([$build_devel_docs])
1909]) # XORG_ENABLE_DEVEL_DOCS
1910
1911# XORG_ENABLE_SPECS (enable_specs=yes)
1912# ----------------
1913# Minimum version: 1.6.0
1914#
1915# This macro enables a builder to skip all functional specification targets.
1916# Combined with the specific tool checking macros XORG_WITH_*, it provides
1917# maximum flexibilty in controlling documentation building.
1918# Refer to:
1919# XORG_WITH_XMLTO         --with-xmlto
1920# XORG_WITH_ASCIIDOC      --with-asciidoc
1921# XORG_WITH_DOXYGEN       --with-doxygen
1922# XORG_WITH_FOP           --with-fop
1923# XORG_WITH_GROFF         --with-groff
1924# XORG_WITH_PS2PDF        --with-ps2pdf
1925#
1926# Interface to module:
1927# ENABLE_SPECS:		used in makefiles to conditionally generate specs
1928# --enable-specs:	'yes' user instructs the module to generate specs
1929#			'no' user instructs the module not to generate specs
1930# parm1:		specify the default value, yes or no.
1931#
1932AC_DEFUN([XORG_ENABLE_SPECS],[
1933m4_define([spec_default], m4_default([$1], [yes]))
1934AC_ARG_ENABLE(specs,
1935	AS_HELP_STRING([--enable-specs],
1936	   [Enable building the specs (default: ]spec_default[)]),
1937	   [build_specs=$enableval], [build_specs=]spec_default)
1938m4_undefine([spec_default])
1939AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes])
1940AC_MSG_CHECKING([whether to build functional specifications])
1941AC_MSG_RESULT([$build_specs])
1942]) # XORG_ENABLE_SPECS
1943
1944# XORG_CHECK_MALLOC_ZERO
1945# ----------------------
1946# Minimum version: 1.0.0
1947#
1948# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
1949# malloc(0) returns NULL.  Packages should add one of these cflags to
1950# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
1951AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
1952AC_ARG_ENABLE(malloc0returnsnull,
1953	AS_HELP_STRING([--enable-malloc0returnsnull],
1954		       [malloc(0) returns NULL (default: auto)]),
1955	[MALLOC_ZERO_RETURNS_NULL=$enableval],
1956	[MALLOC_ZERO_RETURNS_NULL=auto])
1957
1958AC_MSG_CHECKING([whether malloc(0) returns NULL])
1959if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
1960	AC_RUN_IFELSE([AC_LANG_PROGRAM([
1961#include <stdlib.h>
1962],[
1963    char *m0, *r0, *c0, *p;
1964    m0 = malloc(0);
1965    p = malloc(10);
1966    r0 = realloc(p,0);
1967    c0 = calloc(0,10);
1968    exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1);
1969])],
1970		[MALLOC_ZERO_RETURNS_NULL=yes],
1971		[MALLOC_ZERO_RETURNS_NULL=no],
1972		[MALLOC_ZERO_RETURNS_NULL=yes])
1973fi
1974AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
1975
1976if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
1977	MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
1978	XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
1979	XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
1980else
1981	MALLOC_ZERO_CFLAGS=""
1982	XMALLOC_ZERO_CFLAGS=""
1983	XTMALLOC_ZERO_CFLAGS=""
1984fi
1985
1986AC_SUBST([MALLOC_ZERO_CFLAGS])
1987AC_SUBST([XMALLOC_ZERO_CFLAGS])
1988AC_SUBST([XTMALLOC_ZERO_CFLAGS])
1989]) # XORG_CHECK_MALLOC_ZERO
1990
1991# XORG_WITH_LINT()
1992# ----------------
1993# Minimum version: 1.1.0
1994#
1995# This macro enables the use of a tool that flags some suspicious and
1996# non-portable constructs (likely to be bugs) in C language source code.
1997# It will attempt to locate the tool and use appropriate options.
1998# There are various lint type tools on different platforms.
1999#
2000# Interface to module:
2001# LINT:		returns the path to the tool found on the platform
2002#		or the value set to LINT on the configure cmd line
2003#		also an Automake conditional
2004# LINT_FLAGS:	an Automake variable with appropriate flags
2005#
2006# --with-lint:	'yes' user instructs the module to use lint
2007#		'no' user instructs the module not to use lint (default)
2008#
2009# If the user sets the value of LINT, AC_PATH_PROG skips testing the path.
2010# If the user sets the value of LINT_FLAGS, they are used verbatim.
2011#
2012AC_DEFUN([XORG_WITH_LINT],[
2013
2014AC_ARG_VAR([LINT], [Path to a lint-style command])
2015AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command])
2016AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
2017		[Use a lint-style source code checker (default: disabled)])],
2018		[use_lint=$withval], [use_lint=no])
2019
2020# Obtain platform specific info like program name and options
2021# The lint program on FreeBSD and NetBSD is different from the one on Solaris
2022case $host_os in
2023  *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*)
2024	lint_name=splint
2025	lint_options="-badflag"
2026	;;
2027  *freebsd* | *netbsd*)
2028	lint_name=lint
2029	lint_options="-u -b"
2030	;;
2031  *solaris*)
2032	lint_name=lint
2033	lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
2034	;;
2035esac
2036
2037# Test for the presence of the program (either guessed by the code or spelled out by the user)
2038if test "x$use_lint" = x"yes" ; then
2039   AC_PATH_PROG([LINT], [$lint_name])
2040   if test "x$LINT" = "x"; then
2041        AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH])
2042   fi
2043elif test "x$use_lint" = x"no" ; then
2044   if test "x$LINT" != "x"; then
2045      AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified])
2046   fi
2047else
2048   AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.])
2049fi
2050
2051# User supplied flags override default flags
2052if test "x$LINT_FLAGS" != "x"; then
2053   lint_options=$LINT_FLAGS
2054fi
2055
2056AC_SUBST([LINT_FLAGS],[$lint_options])
2057AM_CONDITIONAL(LINT, [test "x$LINT" != x])
2058
2059]) # XORG_WITH_LINT
2060
2061# XORG_LINT_LIBRARY(LIBNAME)
2062# --------------------------
2063# Minimum version: 1.1.0
2064#
2065# Sets up flags for building lint libraries for checking programs that call
2066# functions in the library.
2067#
2068# Interface to module:
2069# LINTLIB		- Automake variable with the name of lint library file to make
2070# MAKE_LINT_LIB		- Automake conditional
2071#
2072# --enable-lint-library:  - 'yes' user instructs the module to created a lint library
2073#			  - 'no' user instructs the module not to create a lint library (default)
2074
2075AC_DEFUN([XORG_LINT_LIBRARY],[
2076AC_REQUIRE([XORG_WITH_LINT])
2077AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
2078	[Create lint library (default: disabled)])],
2079	[make_lint_lib=$enableval], [make_lint_lib=no])
2080
2081if test "x$make_lint_lib" = x"yes" ; then
2082   LINTLIB=llib-l$1.ln
2083   if test "x$LINT" = "x"; then
2084        AC_MSG_ERROR([Cannot make lint library without --with-lint])
2085   fi
2086elif test "x$make_lint_lib" != x"no" ; then
2087   AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.])
2088fi
2089
2090AC_SUBST(LINTLIB)
2091AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
2092
2093]) # XORG_LINT_LIBRARY
2094
2095# XORG_CWARNFLAGS
2096# ---------------
2097# Minimum version: 1.2.0
2098#
2099# Defines CWARNFLAGS to enable C compiler warnings.
2100#
2101AC_DEFUN([XORG_CWARNFLAGS], [
2102AC_REQUIRE([AC_PROG_CC_C99])
2103if  test "x$GCC" = xyes ; then
2104    CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
2105-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
2106-Wbad-function-cast -Wformat=2"
2107    case `$CC -dumpversion` in
2108    3.4.* | 4.*)
2109	CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
2110	;;
2111    esac
2112else
2113    AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
2114    if test "x$SUNCC" = "xyes"; then
2115	CWARNFLAGS="-v"
2116    fi
2117fi
2118AC_SUBST(CWARNFLAGS)
2119]) # XORG_CWARNFLAGS
2120
2121# XORG_STRICT_OPTION
2122# -----------------------
2123# Minimum version: 1.3.0
2124#
2125# Add configure option to enable strict compilation
2126AC_DEFUN([XORG_STRICT_OPTION], [
2127# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89
2128AC_REQUIRE([AC_PROG_CC_C99])
2129AC_REQUIRE([XORG_CWARNFLAGS])
2130
2131AC_ARG_ENABLE(strict-compilation,
2132			  AS_HELP_STRING([--enable-strict-compilation],
2133			  [Enable all warnings from compiler and make them errors (default: disabled)]),
2134			  [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
2135if test "x$STRICT_COMPILE" = "xyes"; then
2136	AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
2137	AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
2138	if test "x$GCC" = xyes ; then
2139		STRICT_CFLAGS="-pedantic -Werror"
2140	elif test "x$SUNCC" = "xyes"; then
2141		STRICT_CFLAGS="-errwarn"
2142    elif test "x$INTELCC" = "xyes"; then
2143		STRICT_CFLAGS="-Werror"
2144	fi
2145fi
2146CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
2147AC_SUBST([CWARNFLAGS])
2148]) # XORG_STRICT_OPTION
2149
2150# XORG_DEFAULT_OPTIONS
2151# --------------------
2152# Minimum version: 1.3.0
2153#
2154# Defines default options for X.Org modules.
2155#
2156AC_DEFUN([XORG_DEFAULT_OPTIONS], [
2157AC_REQUIRE([AC_PROG_INSTALL])
2158XORG_CWARNFLAGS
2159XORG_STRICT_OPTION
2160XORG_RELEASE_VERSION
2161XORG_CHANGELOG
2162XORG_INSTALL
2163XORG_MANPAGE_SECTIONS
2164m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
2165    [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
2166]) # XORG_DEFAULT_OPTIONS
2167
2168# XORG_INSTALL()
2169# ----------------
2170# Minimum version: 1.4.0
2171#
2172# Defines the variable INSTALL_CMD as the command to copy
2173# INSTALL from $prefix/share/util-macros.
2174#
2175AC_DEFUN([XORG_INSTALL], [
2176AC_REQUIRE([PKG_PROG_PKG_CONFIG])
2177macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
2178INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
2179mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
2180|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
2181echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
2182AC_SUBST([INSTALL_CMD])
2183]) # XORG_INSTALL
2184dnl Copyright 2005 Red Hat, Inc
2185dnl
2186dnl Permission to use, copy, modify, distribute, and sell this software and its
2187dnl documentation for any purpose is hereby granted without fee, provided that
2188dnl the above copyright notice appear in all copies and that both that
2189dnl copyright notice and this permission notice appear in supporting
2190dnl documentation.
2191dnl
2192dnl The above copyright notice and this permission notice shall be included
2193dnl in all copies or substantial portions of the Software.
2194dnl
2195dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
2196dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
2197dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
2198dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
2199dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
2200dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
2201dnl OTHER DEALINGS IN THE SOFTWARE.
2202dnl
2203dnl Except as contained in this notice, the name of the copyright holders shall
2204dnl not be used in advertising or otherwise to promote the sale, use or
2205dnl other dealings in this Software without prior written authorization
2206dnl from the copyright holders.
2207dnl
2208
2209# XORG_RELEASE_VERSION
2210# --------------------
2211# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
2212 
2213AC_DEFUN([XORG_RELEASE_VERSION],[
2214	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
2215		[`echo $PACKAGE_VERSION | cut -d . -f 1`],
2216		[Major version of this package])
2217	PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
2218	if test "x$PVM" = "x"; then
2219		PVM="0"
2220	fi
2221	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
2222		[$PVM],
2223		[Minor version of this package])
2224	PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
2225	if test "x$PVP" = "x"; then
2226		PVP="0"
2227	fi
2228	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
2229		[$PVP],
2230		[Patch version of this package])
2231])
2232
2233# XORG_CHANGELOG()
2234# ----------------
2235# Minimum version: 1.2.0
2236#
2237# Defines the variable CHANGELOG_CMD as the command to generate
2238# ChangeLog from git.
2239#
2240#
2241AC_DEFUN([XORG_CHANGELOG], [
2242CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
2243mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
2244|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
2245echo 'git directory not found: installing possibly empty changelog.' >&2)"
2246AC_SUBST([CHANGELOG_CMD])
2247]) # XORG_CHANGELOG
2248
2249# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2250# 
2251# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
2252#
2253# This program is free software; you can redistribute it and/or modify
2254# it under the terms of the GNU General Public License as published by
2255# the Free Software Foundation; either version 2 of the License, or
2256# (at your option) any later version.
2257#
2258# This program is distributed in the hope that it will be useful, but
2259# WITHOUT ANY WARRANTY; without even the implied warranty of
2260# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
2261# General Public License for more details.
2262#
2263# You should have received a copy of the GNU General Public License
2264# along with this program; if not, write to the Free Software
2265# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2266#
2267# As a special exception to the GNU General Public License, if you
2268# distribute this file as part of a program that contains a
2269# configuration script generated by Autoconf, you may include it under
2270# the same distribution terms that you use for the rest of that program.
2271
2272# PKG_PROG_PKG_CONFIG([MIN-VERSION])
2273# ----------------------------------
2274AC_DEFUN([PKG_PROG_PKG_CONFIG],
2275[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
2276m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
2277AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
2278if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
2279	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
2280fi
2281if test -n "$PKG_CONFIG"; then
2282	_pkg_min_version=m4_default([$1], [0.9.0])
2283	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
2284	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
2285		AC_MSG_RESULT([yes])
2286	else
2287		AC_MSG_RESULT([no])
2288		PKG_CONFIG=""
2289	fi
2290		
2291fi[]dnl
2292])# PKG_PROG_PKG_CONFIG
2293
2294# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2295#
2296# Check to see whether a particular set of modules exists.  Similar
2297# to PKG_CHECK_MODULES(), but does not set variables or print errors.
2298#
2299#
2300# Similar to PKG_CHECK_MODULES, make sure that the first instance of
2301# this or PKG_CHECK_MODULES is called, or make sure to call
2302# PKG_CHECK_EXISTS manually
2303# --------------------------------------------------------------
2304AC_DEFUN([PKG_CHECK_EXISTS],
2305[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
2306if test -n "$PKG_CONFIG" && \
2307    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
2308  m4_ifval([$2], [$2], [:])
2309m4_ifvaln([$3], [else
2310  $3])dnl
2311fi])
2312
2313
2314# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
2315# ---------------------------------------------
2316m4_define([_PKG_CONFIG],
2317[if test -n "$$1"; then
2318    pkg_cv_[]$1="$$1"
2319 elif test -n "$PKG_CONFIG"; then
2320    PKG_CHECK_EXISTS([$3],
2321                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
2322		     [pkg_failed=yes])
2323 else
2324    pkg_failed=untried
2325fi[]dnl
2326])# _PKG_CONFIG
2327
2328# _PKG_SHORT_ERRORS_SUPPORTED
2329# -----------------------------
2330AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
2331[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
2332if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
2333        _pkg_short_errors_supported=yes
2334else
2335        _pkg_short_errors_supported=no
2336fi[]dnl
2337])# _PKG_SHORT_ERRORS_SUPPORTED
2338
2339
2340# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
2341# [ACTION-IF-NOT-FOUND])
2342#
2343#
2344# Note that if there is a possibility the first call to
2345# PKG_CHECK_MODULES might not happen, you should be sure to include an
2346# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
2347#
2348#
2349# --------------------------------------------------------------
2350AC_DEFUN([PKG_CHECK_MODULES],
2351[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
2352AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
2353AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
2354
2355pkg_failed=no
2356AC_MSG_CHECKING([for $1])
2357
2358_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
2359_PKG_CONFIG([$1][_LIBS], [libs], [$2])
2360
2361m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
2362and $1[]_LIBS to avoid the need to call pkg-config.
2363See the pkg-config man page for more details.])
2364
2365if test $pkg_failed = yes; then
2366        _PKG_SHORT_ERRORS_SUPPORTED
2367        if test $_pkg_short_errors_supported = yes; then
2368	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
2369        else 
2370	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
2371        fi
2372	# Put the nasty error message in config.log where it belongs
2373	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
2374
2375	ifelse([$4], , [AC_MSG_ERROR(dnl
2376[Package requirements ($2) were not met:
2377
2378$$1_PKG_ERRORS
2379
2380Consider adjusting the PKG_CONFIG_PATH environment variable if you
2381installed software in a non-standard prefix.
2382
2383_PKG_TEXT
2384])],
2385		[AC_MSG_RESULT([no])
2386                $4])
2387elif test $pkg_failed = untried; then
2388	ifelse([$4], , [AC_MSG_FAILURE(dnl
2389[The pkg-config script could not be found or is too old.  Make sure it
2390is in your PATH or set the PKG_CONFIG environment variable to the full
2391path to pkg-config.
2392
2393_PKG_TEXT
2394
2395To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
2396		[$4])
2397else
2398	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
2399	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
2400        AC_MSG_RESULT([yes])
2401	ifelse([$3], , :, [$3])
2402fi[]dnl
2403])# PKG_CHECK_MODULES
2404
2405# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
2406#
2407#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
2408#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
2409#                 Inc.
2410#   Written by Gordon Matzigkeit, 1996
2411#
2412# This file is free software; the Free Software Foundation gives
2413# unlimited permission to copy and/or distribute it, with or without
2414# modifications, as long as this notice is preserved.
2415
2416m4_define([_LT_COPYING], [dnl
2417#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
2418#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
2419#                 Inc.
2420#   Written by Gordon Matzigkeit, 1996
2421#
2422#   This file is part of GNU Libtool.
2423#
2424# GNU Libtool is free software; you can redistribute it and/or
2425# modify it under the terms of the GNU General Public License as
2426# published by the Free Software Foundation; either version 2 of
2427# the License, or (at your option) any later version.
2428#
2429# As a special exception to the GNU General Public License,
2430# if you distribute this file as part of a program or library that
2431# is built using GNU Libtool, you may include this file under the
2432# same distribution terms that you use for the rest of that program.
2433#
2434# GNU Libtool is distributed in the hope that it will be useful,
2435# but WITHOUT ANY WARRANTY; without even the implied warranty of
2436# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2437# GNU General Public License for more details.
2438#
2439# You should have received a copy of the GNU General Public License
2440# along with GNU Libtool; see the file COPYING.  If not, a copy
2441# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
2442# obtained by writing to the Free Software Foundation, Inc.,
2443# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
2444])
2445
2446# serial 57 LT_INIT
2447
2448
2449# LT_PREREQ(VERSION)
2450# ------------------
2451# Complain and exit if this libtool version is less that VERSION.
2452m4_defun([LT_PREREQ],
2453[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
2454       [m4_default([$3],
2455		   [m4_fatal([Libtool version $1 or higher is required],
2456		             63)])],
2457       [$2])])
2458
2459
2460# _LT_CHECK_BUILDDIR
2461# ------------------
2462# Complain if the absolute build directory name contains unusual characters
2463m4_defun([_LT_CHECK_BUILDDIR],
2464[case `pwd` in
2465  *\ * | *\	*)
2466    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
2467esac
2468])
2469
2470
2471# LT_INIT([OPTIONS])
2472# ------------------
2473AC_DEFUN([LT_INIT],
2474[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
2475AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
2476AC_BEFORE([$0], [LT_LANG])dnl
2477AC_BEFORE([$0], [LT_OUTPUT])dnl
2478AC_BEFORE([$0], [LTDL_INIT])dnl
2479m4_require([_LT_CHECK_BUILDDIR])dnl
2480
2481dnl Autoconf doesn't catch unexpanded LT_ macros by default:
2482m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
2483m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
2484dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
2485dnl unless we require an AC_DEFUNed macro:
2486AC_REQUIRE([LTOPTIONS_VERSION])dnl
2487AC_REQUIRE([LTSUGAR_VERSION])dnl
2488AC_REQUIRE([LTVERSION_VERSION])dnl
2489AC_REQUIRE([LTOBSOLETE_VERSION])dnl
2490m4_require([_LT_PROG_LTMAIN])dnl
2491
2492_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
2493
2494dnl Parse OPTIONS
2495_LT_SET_OPTIONS([$0], [$1])
2496
2497# This can be used to rebuild libtool when needed
2498LIBTOOL_DEPS="$ltmain"
2499
2500# Always use our own libtool.
2501LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2502AC_SUBST(LIBTOOL)dnl
2503
2504_LT_SETUP
2505
2506# Only expand once:
2507m4_define([LT_INIT])
2508])# LT_INIT
2509
2510# Old names:
2511AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
2512AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
2513dnl aclocal-1.4 backwards compatibility:
2514dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
2515dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
2516
2517
2518# _LT_CC_BASENAME(CC)
2519# -------------------
2520# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
2521m4_defun([_LT_CC_BASENAME],
2522[for cc_temp in $1""; do
2523  case $cc_temp in
2524    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
2525    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
2526    \-*) ;;
2527    *) break;;
2528  esac
2529done
2530cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
2531])
2532
2533
2534# _LT_FILEUTILS_DEFAULTS
2535# ----------------------
2536# It is okay to use these file commands and assume they have been set
2537# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
2538m4_defun([_LT_FILEUTILS_DEFAULTS],
2539[: ${CP="cp -f"}
2540: ${MV="mv -f"}
2541: ${RM="rm -f"}
2542])# _LT_FILEUTILS_DEFAULTS
2543
2544
2545# _LT_SETUP
2546# ---------
2547m4_defun([_LT_SETUP],
2548[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2549AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2550AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
2551AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
2552
2553_LT_DECL([], [host_alias], [0], [The host system])dnl
2554_LT_DECL([], [host], [0])dnl
2555_LT_DECL([], [host_os], [0])dnl
2556dnl
2557_LT_DECL([], [build_alias], [0], [The build system])dnl
2558_LT_DECL([], [build], [0])dnl
2559_LT_DECL([], [build_os], [0])dnl
2560dnl
2561AC_REQUIRE([AC_PROG_CC])dnl
2562AC_REQUIRE([LT_PATH_LD])dnl
2563AC_REQUIRE([LT_PATH_NM])dnl
2564dnl
2565AC_REQUIRE([AC_PROG_LN_S])dnl
2566test -z "$LN_S" && LN_S="ln -s"
2567_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
2568dnl
2569AC_REQUIRE([LT_CMD_MAX_LEN])dnl
2570_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
2571_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
2572dnl
2573m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2574m4_require([_LT_CHECK_SHELL_FEATURES])dnl
2575m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
2576m4_require([_LT_CMD_RELOAD])dnl
2577m4_require([_LT_CHECK_MAGIC_METHOD])dnl
2578m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
2579m4_require([_LT_CMD_OLD_ARCHIVE])dnl
2580m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
2581m4_require([_LT_WITH_SYSROOT])dnl
2582
2583_LT_CONFIG_LIBTOOL_INIT([
2584# See if we are running on zsh, and set the options which allow our
2585# commands through without removal of \ escapes INIT.
2586if test -n "\${ZSH_VERSION+set}" ; then
2587   setopt NO_GLOB_SUBST
2588fi
2589])
2590if test -n "${ZSH_VERSION+set}" ; then
2591   setopt NO_GLOB_SUBST
2592fi
2593
2594_LT_CHECK_OBJDIR
2595
2596m4_require([_LT_TAG_COMPILER])dnl
2597
2598case $host_os in
2599aix3*)
2600  # AIX sometimes has problems with the GCC collect2 program.  For some
2601  # reason, if we set the COLLECT_NAMES environment variable, the problems
2602  # vanish in a puff of smoke.
2603  if test "X${COLLECT_NAMES+set}" != Xset; then
2604    COLLECT_NAMES=
2605    export COLLECT_NAMES
2606  fi
2607  ;;
2608esac
2609
2610# Global variables:
2611ofile=libtool
2612can_build_shared=yes
2613
2614# All known linkers require a `.a' archive for static linking (except MSVC,
2615# which needs '.lib').
2616libext=a
2617
2618with_gnu_ld="$lt_cv_prog_gnu_ld"
2619
2620old_CC="$CC"
2621old_CFLAGS="$CFLAGS"
2622
2623# Set sane defaults for various variables
2624test -z "$CC" && CC=cc
2625test -z "$LTCC" && LTCC=$CC
2626test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
2627test -z "$LD" && LD=ld
2628test -z "$ac_objext" && ac_objext=o
2629
2630_LT_CC_BASENAME([$compiler])
2631
2632# Only perform the check for file, if the check method requires it
2633test -z "$MAGIC_CMD" && MAGIC_CMD=file
2634case $deplibs_check_method in
2635file_magic*)
2636  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
2637    _LT_PATH_MAGIC
2638  fi
2639  ;;
2640esac
2641
2642# Use C for the default configuration in the libtool script
2643LT_SUPPORTED_TAG([CC])
2644_LT_LANG_C_CONFIG
2645_LT_LANG_DEFAULT_CONFIG
2646_LT_CONFIG_COMMANDS
2647])# _LT_SETUP
2648
2649
2650# _LT_PREPARE_SED_QUOTE_VARS
2651# --------------------------
2652# Define a few sed substitution that help us do robust quoting.
2653m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
2654[# Backslashify metacharacters that are still active within
2655# double-quoted strings.
2656sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
2657
2658# Same as above, but do not quote variable references.
2659double_quote_subst='s/\([["`\\]]\)/\\\1/g'
2660
2661# Sed substitution to delay expansion of an escaped shell variable in a
2662# double_quote_subst'ed string.
2663delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
2664
2665# Sed substitution to delay expansion of an escaped single quote.
2666delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
2667
2668# Sed substitution to avoid accidental globbing in evaled expressions
2669no_glob_subst='s/\*/\\\*/g'
2670])
2671
2672# _LT_PROG_LTMAIN
2673# ---------------
2674# Note that this code is called both from `configure', and `config.status'
2675# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
2676# `config.status' has no value for ac_aux_dir unless we are using Automake,
2677# so we pass a copy along to make sure it has a sensible value anyway.
2678m4_defun([_LT_PROG_LTMAIN],
2679[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
2680_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
2681ltmain="$ac_aux_dir/ltmain.sh"
2682])# _LT_PROG_LTMAIN
2683
2684
2685
2686# So that we can recreate a full libtool script including additional
2687# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
2688# in macros and then make a single call at the end using the `libtool'
2689# label.
2690
2691
2692# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
2693# ----------------------------------------
2694# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
2695m4_define([_LT_CONFIG_LIBTOOL_INIT],
2696[m4_ifval([$1],
2697          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
2698                     [$1
2699])])])
2700
2701# Initialize.
2702m4_define([_LT_OUTPUT_LIBTOOL_INIT])
2703
2704
2705# _LT_CONFIG_LIBTOOL([COMMANDS])
2706# ------------------------------
2707# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
2708m4_define([_LT_CONFIG_LIBTOOL],
2709[m4_ifval([$1],
2710          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
2711                     [$1
2712])])])
2713
2714# Initialize.
2715m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
2716
2717
2718# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
2719# -----------------------------------------------------
2720m4_defun([_LT_CONFIG_SAVE_COMMANDS],
2721[_LT_CONFIG_LIBTOOL([$1])
2722_LT_CONFIG_LIBTOOL_INIT([$2])
2723])
2724
2725
2726# _LT_FORMAT_COMMENT([COMMENT])
2727# -----------------------------
2728# Add leading comment marks to the start of each line, and a trailing
2729# full-stop to the whole comment if one is not present already.
2730m4_define([_LT_FORMAT_COMMENT],
2731[m4_ifval([$1], [
2732m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
2733              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
2734)])
2735
2736
2737
2738
2739
2740# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
2741# -------------------------------------------------------------------
2742# CONFIGNAME is the name given to the value in the libtool script.
2743# VARNAME is the (base) name used in the configure script.
2744# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
2745# VARNAME.  Any other value will be used directly.
2746m4_define([_LT_DECL],
2747[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
2748    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
2749	[m4_ifval([$1], [$1], [$2])])
2750    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
2751    m4_ifval([$4],
2752	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
2753    lt_dict_add_subkey([lt_decl_dict], [$2],
2754	[tagged?], [m4_ifval([$5], [yes], [no])])])
2755])
2756
2757
2758# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
2759# --------------------------------------------------------
2760m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
2761
2762
2763# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
2764# ------------------------------------------------
2765m4_define([lt_decl_tag_varnames],
2766[_lt_decl_filter([tagged?], [yes], $@)])
2767
2768
2769# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
2770# ---------------------------------------------------------
2771m4_define([_lt_decl_filter],
2772[m4_case([$#],
2773  [0], [m4_fatal([$0: too few arguments: $#])],
2774  [1], [m4_fatal([$0: too few arguments: $#: $1])],
2775  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
2776  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
2777  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
2778])
2779
2780
2781# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
2782# --------------------------------------------------
2783m4_define([lt_decl_quote_varnames],
2784[_lt_decl_filter([value], [1], $@)])
2785
2786
2787# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
2788# ---------------------------------------------------
2789m4_define([lt_decl_dquote_varnames],
2790[_lt_decl_filter([value], [2], $@)])
2791
2792
2793# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
2794# ---------------------------------------------------
2795m4_define([lt_decl_varnames_tagged],
2796[m4_assert([$# <= 2])dnl
2797_$0(m4_quote(m4_default([$1], [[, ]])),
2798    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
2799    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
2800m4_define([_lt_decl_varnames_tagged],
2801[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
2802
2803
2804# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
2805# ------------------------------------------------
2806m4_define([lt_decl_all_varnames],
2807[_$0(m4_quote(m4_default([$1], [[, ]])),
2808     m4_if([$2], [],
2809	   m4_quote(lt_decl_varnames),
2810	m4_quote(m4_shift($@))))[]dnl
2811])
2812m4_define([_lt_decl_all_varnames],
2813[lt_join($@, lt_decl_varnames_tagged([$1],
2814			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
2815])
2816
2817
2818# _LT_CONFIG_STATUS_DECLARE([VARNAME])
2819# ------------------------------------
2820# Quote a variable value, and forward it to `config.status' so that its
2821# declaration there will have the same value as in `configure'.  VARNAME
2822# must have a single quote delimited value for this to work.
2823m4_define([_LT_CONFIG_STATUS_DECLARE],
2824[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
2825
2826
2827# _LT_CONFIG_STATUS_DECLARATIONS
2828# ------------------------------
2829# We delimit libtool config variables with single quotes, so when
2830# we write them to config.status, we have to be sure to quote all
2831# embedded single quotes properly.  In configure, this macro expands
2832# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
2833#
2834#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
2835m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
2836[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
2837    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
2838
2839
2840# _LT_LIBTOOL_TAGS
2841# ----------------
2842# Output comment and list of tags supported by the script
2843m4_defun([_LT_LIBTOOL_TAGS],
2844[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
2845available_tags="_LT_TAGS"dnl
2846])
2847
2848
2849# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
2850# -----------------------------------
2851# Extract the dictionary values for VARNAME (optionally with TAG) and
2852# expand to a commented shell variable setting:
2853#
2854#    # Some comment about what VAR is for.
2855#    visible_name=$lt_internal_name
2856m4_define([_LT_LIBTOOL_DECLARE],
2857[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
2858					   [description])))[]dnl
2859m4_pushdef([_libtool_name],
2860    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
2861m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
2862    [0], [_libtool_name=[$]$1],
2863    [1], [_libtool_name=$lt_[]$1],
2864    [2], [_libtool_name=$lt_[]$1],
2865    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
2866m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
2867])
2868
2869
2870# _LT_LIBTOOL_CONFIG_VARS
2871# -----------------------
2872# Produce commented declarations of non-tagged libtool config variables
2873# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
2874# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
2875# section) are produced by _LT_LIBTOOL_TAG_VARS.
2876m4_defun([_LT_LIBTOOL_CONFIG_VARS],
2877[m4_foreach([_lt_var],
2878    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
2879    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
2880
2881
2882# _LT_LIBTOOL_TAG_VARS(TAG)
2883# -------------------------
2884m4_define([_LT_LIBTOOL_TAG_VARS],
2885[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
2886    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
2887
2888
2889# _LT_TAGVAR(VARNAME, [TAGNAME])
2890# ------------------------------
2891m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
2892
2893
2894# _LT_CONFIG_COMMANDS
2895# -------------------
2896# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
2897# variables for single and double quote escaping we saved from calls
2898# to _LT_DECL, we can put quote escaped variables declarations
2899# into `config.status', and then the shell code to quote escape them in
2900# for loops in `config.status'.  Finally, any additional code accumulated
2901# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
2902m4_defun([_LT_CONFIG_COMMANDS],
2903[AC_PROVIDE_IFELSE([LT_OUTPUT],
2904	dnl If the libtool generation code has been placed in $CONFIG_LT,
2905	dnl instead of duplicating it all over again into config.status,
2906	dnl then we will have config.status run $CONFIG_LT later, so it
2907	dnl needs to know what name is stored there:
2908        [AC_CONFIG_COMMANDS([libtool],
2909            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
2910    dnl If the libtool generation code is destined for config.status,
2911    dnl expand the accumulated commands and init code now:
2912    [AC_CONFIG_COMMANDS([libtool],
2913        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
2914])#_LT_CONFIG_COMMANDS
2915
2916
2917# Initialize.
2918m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
2919[
2920
2921# The HP-UX ksh and POSIX shell print the target directory to stdout
2922# if CDPATH is set.
2923(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
2924
2925sed_quote_subst='$sed_quote_subst'
2926double_quote_subst='$double_quote_subst'
2927delay_variable_subst='$delay_variable_subst'
2928_LT_CONFIG_STATUS_DECLARATIONS
2929LTCC='$LTCC'
2930LTCFLAGS='$LTCFLAGS'
2931compiler='$compiler_DEFAULT'
2932
2933# A function that is used when there is no print builtin or printf.
2934func_fallback_echo ()
2935{
2936  eval 'cat <<_LTECHO_EOF
2937\$[]1
2938_LTECHO_EOF'
2939}
2940
2941# Quote evaled strings.
2942for var in lt_decl_all_varnames([[ \
2943]], lt_decl_quote_varnames); do
2944    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
2945    *[[\\\\\\\`\\"\\\$]]*)
2946      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
2947      ;;
2948    *)
2949      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
2950      ;;
2951    esac
2952done
2953
2954# Double-quote double-evaled strings.
2955for var in lt_decl_all_varnames([[ \
2956]], lt_decl_dquote_varnames); do
2957    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
2958    *[[\\\\\\\`\\"\\\$]]*)
2959      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
2960      ;;
2961    *)
2962      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
2963      ;;
2964    esac
2965done
2966
2967_LT_OUTPUT_LIBTOOL_INIT
2968])
2969
2970# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
2971# ------------------------------------
2972# Generate a child script FILE with all initialization necessary to
2973# reuse the environment learned by the parent script, and make the
2974# file executable.  If COMMENT is supplied, it is inserted after the
2975# `#!' sequence but before initialization text begins.  After this
2976# macro, additional text can be appended to FILE to form the body of
2977# the child script.  The macro ends with non-zero status if the
2978# file could not be fully written (such as if the disk is full).
2979m4_ifdef([AS_INIT_GENERATED],
2980[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
2981[m4_defun([_LT_GENERATED_FILE_INIT],
2982[m4_require([AS_PREPARE])]dnl
2983[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
2984[lt_write_fail=0
2985cat >$1 <<_ASEOF || lt_write_fail=1
2986#! $SHELL
2987# Generated by $as_me.
2988$2
2989SHELL=\${CONFIG_SHELL-$SHELL}
2990export SHELL
2991_ASEOF
2992cat >>$1 <<\_ASEOF || lt_write_fail=1
2993AS_SHELL_SANITIZE
2994_AS_PREPARE
2995exec AS_MESSAGE_FD>&1
2996_ASEOF
2997test $lt_write_fail = 0 && chmod +x $1[]dnl
2998m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
2999
3000# LT_OUTPUT
3001# ---------
3002# This macro allows early generation of the libtool script (before
3003# AC_OUTPUT is called), incase it is used in configure for compilation
3004# tests.
3005AC_DEFUN([LT_OUTPUT],
3006[: ${CONFIG_LT=./config.lt}
3007AC_MSG_NOTICE([creating $CONFIG_LT])
3008_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
3009[# Run this file to recreate a libtool stub with the current configuration.])
3010
3011cat >>"$CONFIG_LT" <<\_LTEOF
3012lt_cl_silent=false
3013exec AS_MESSAGE_LOG_FD>>config.log
3014{
3015  echo
3016  AS_BOX([Running $as_me.])
3017} >&AS_MESSAGE_LOG_FD
3018
3019lt_cl_help="\
3020\`$as_me' creates a local libtool stub from the current configuration,
3021for use in further configure time tests before the real libtool is
3022generated.
3023
3024Usage: $[0] [[OPTIONS]]
3025
3026  -h, --help      print this help, then exit
3027  -V, --version   print version number, then exit
3028  -q, --quiet     do not print progress messages
3029  -d, --debug     don't remove temporary files
3030
3031Report bugs to <bug-libtool@gnu.org>."
3032
3033lt_cl_version="\
3034m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
3035m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
3036configured by $[0], generated by m4_PACKAGE_STRING.
3037
3038Copyright (C) 2010 Free Software Foundation, Inc.
3039This config.lt script is free software; the Free Software Foundation
3040gives unlimited permision to copy, distribute and modify it."
3041
3042while test $[#] != 0
3043do
3044  case $[1] in
3045    --version | --v* | -V )
3046      echo "$lt_cl_version"; exit 0 ;;
3047    --help | --h* | -h )
3048      echo "$lt_cl_help"; exit 0 ;;
3049    --debug | --d* | -d )
3050      debug=: ;;
3051    --quiet | --q* | --silent | --s* | -q )
3052      lt_cl_silent=: ;;
3053
3054    -*) AC_MSG_ERROR([unrecognized option: $[1]
3055Try \`$[0] --help' for more information.]) ;;
3056
3057    *) AC_MSG_ERROR([unrecognized argument: $[1]
3058Try \`$[0] --help' for more information.]) ;;
3059  esac
3060  shift
3061done
3062
3063if $lt_cl_silent; then
3064  exec AS_MESSAGE_FD>/dev/null
3065fi
3066_LTEOF
3067
3068cat >>"$CONFIG_LT" <<_LTEOF
3069_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
3070_LTEOF
3071
3072cat >>"$CONFIG_LT" <<\_LTEOF
3073AC_MSG_NOTICE([creating $ofile])
3074_LT_OUTPUT_LIBTOOL_COMMANDS
3075AS_EXIT(0)
3076_LTEOF
3077chmod +x "$CONFIG_LT"
3078
3079# configure is writing to config.log, but config.lt does its own redirection,
3080# appending to config.log, which fails on DOS, as config.log is still kept
3081# open by configure.  Here we exec the FD to /dev/null, effectively closing
3082# config.log, so it can be properly (re)opened and appended to by config.lt.
3083lt_cl_success=:
3084test "$silent" = yes &&
3085  lt_config_lt_args="$lt_config_lt_args --quiet"
3086exec AS_MESSAGE_LOG_FD>/dev/null
3087$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
3088exec AS_MESSAGE_LOG_FD>>config.log
3089$lt_cl_success || AS_EXIT(1)
3090])# LT_OUTPUT
3091
3092
3093# _LT_CONFIG(TAG)
3094# ---------------
3095# If TAG is the built-in tag, create an initial libtool script with a
3096# default configuration from the untagged config vars.  Otherwise add code
3097# to config.status for appending the configuration named by TAG from the
3098# matching tagged config vars.
3099m4_defun([_LT_CONFIG],
3100[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3101_LT_CONFIG_SAVE_COMMANDS([
3102  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
3103  m4_if(_LT_TAG, [C], [
3104    # See if we are running on zsh, and set the options which allow our
3105    # commands through without removal of \ escapes.
3106    if test -n "${ZSH_VERSION+set}" ; then
3107      setopt NO_GLOB_SUBST
3108    fi
3109
3110    cfgfile="${ofile}T"
3111    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
3112    $RM "$cfgfile"
3113
3114    cat <<_LT_EOF >> "$cfgfile"
3115#! $SHELL
3116
3117# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
3118# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
3119# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3120# NOTE: Changes made to this file will be lost: look at ltmain.sh.
3121#
3122_LT_COPYING
3123_LT_LIBTOOL_TAGS
3124
3125# ### BEGIN LIBTOOL CONFIG
3126_LT_LIBTOOL_CONFIG_VARS
3127_LT_LIBTOOL_TAG_VARS
3128# ### END LIBTOOL CONFIG
3129
3130_LT_EOF
3131
3132  case $host_os in
3133  aix3*)
3134    cat <<\_LT_EOF >> "$cfgfile"
3135# AIX sometimes has problems with the GCC collect2 program.  For some
3136# reason, if we set the COLLECT_NAMES environment variable, the problems
3137# vanish in a puff of smoke.
3138if test "X${COLLECT_NAMES+set}" != Xset; then
3139  COLLECT_NAMES=
3140  export COLLECT_NAMES
3141fi
3142_LT_EOF
3143    ;;
3144  esac
3145
3146  _LT_PROG_LTMAIN
3147
3148  # We use sed instead of cat because bash on DJGPP gets confused if
3149  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
3150  # text mode, it properly converts lines to CR/LF.  This bash problem
3151  # is reportedly fixed, but why not run on old versions too?
3152  sed '$q' "$ltmain" >> "$cfgfile" \
3153     || (rm -f "$cfgfile"; exit 1)
3154
3155  _LT_PROG_REPLACE_SHELLFNS
3156
3157   mv -f "$cfgfile" "$ofile" ||
3158    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
3159  chmod +x "$ofile"
3160],
3161[cat <<_LT_EOF >> "$ofile"
3162
3163dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
3164dnl in a comment (ie after a #).
3165# ### BEGIN LIBTOOL TAG CONFIG: $1
3166_LT_LIBTOOL_TAG_VARS(_LT_TAG)
3167# ### END LIBTOOL TAG CONFIG: $1
3168_LT_EOF
3169])dnl /m4_if
3170],
3171[m4_if([$1], [], [
3172    PACKAGE='$PACKAGE'
3173    VERSION='$VERSION'
3174    TIMESTAMP='$TIMESTAMP'
3175    RM='$RM'
3176    ofile='$ofile'], [])
3177])dnl /_LT_CONFIG_SAVE_COMMANDS
3178])# _LT_CONFIG
3179
3180
3181# LT_SUPPORTED_TAG(TAG)
3182# ---------------------
3183# Trace this macro to discover what tags are supported by the libtool
3184# --tag option, using:
3185#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
3186AC_DEFUN([LT_SUPPORTED_TAG], [])
3187
3188
3189# C support is built-in for now
3190m4_define([_LT_LANG_C_enabled], [])
3191m4_define([_LT_TAGS], [])
3192
3193
3194# LT_LANG(LANG)
3195# -------------
3196# Enable libtool support for the given language if not already enabled.
3197AC_DEFUN([LT_LANG],
3198[AC_BEFORE([$0], [LT_OUTPUT])dnl
3199m4_case([$1],
3200  [C],			[_LT_LANG(C)],
3201  [C++],		[_LT_LANG(CXX)],
3202  [Java],		[_LT_LANG(GCJ)],
3203  [Fortran 77],		[_LT_LANG(F77)],
3204  [Fortran],		[_LT_LANG(FC)],
3205  [Windows Resource],	[_LT_LANG(RC)],
3206  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
3207    [_LT_LANG($1)],
3208    [m4_fatal([$0: unsupported language: "$1"])])])dnl
3209])# LT_LANG
3210
3211
3212# _LT_LANG(LANGNAME)
3213# ------------------
3214m4_defun([_LT_LANG],
3215[m4_ifdef([_LT_LANG_]$1[_enabled], [],
3216  [LT_SUPPORTED_TAG([$1])dnl
3217  m4_append([_LT_TAGS], [$1 ])dnl
3218  m4_define([_LT_LANG_]$1[_enabled], [])dnl
3219  _LT_LANG_$1_CONFIG($1)])dnl
3220])# _LT_LANG
3221
3222
3223# _LT_LANG_DEFAULT_CONFIG
3224# -----------------------
3225m4_defun([_LT_LANG_DEFAULT_CONFIG],
3226[AC_PROVIDE_IFELSE([AC_PROG_CXX],
3227  [LT_LANG(CXX)],
3228  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
3229
3230AC_PROVIDE_IFELSE([AC_PROG_F77],
3231  [LT_LANG(F77)],
3232  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
3233
3234AC_PROVIDE_IFELSE([AC_PROG_FC],
3235  [LT_LANG(FC)],
3236  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
3237
3238dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
3239dnl pulling things in needlessly.
3240AC_PROVIDE_IFELSE([AC_PROG_GCJ],
3241  [LT_LANG(GCJ)],
3242  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
3243    [LT_LANG(GCJ)],
3244    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
3245      [LT_LANG(GCJ)],
3246      [m4_ifdef([AC_PROG_GCJ],
3247	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
3248       m4_ifdef([A][M_PROG_GCJ],
3249	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
3250       m4_ifdef([LT_PROG_GCJ],
3251	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
3252
3253AC_PROVIDE_IFELSE([LT_PROG_RC],
3254  [LT_LANG(RC)],
3255  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
3256])# _LT_LANG_DEFAULT_CONFIG
3257
3258# Obsolete macros:
3259AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
3260AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
3261AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
3262AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
3263AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
3264dnl aclocal-1.4 backwards compatibility:
3265dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
3266dnl AC_DEFUN([AC_LIBTOOL_F77], [])
3267dnl AC_DEFUN([AC_LIBTOOL_FC], [])
3268dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
3269dnl AC_DEFUN([AC_LIBTOOL_RC], [])
3270
3271
3272# _LT_TAG_COMPILER
3273# ----------------
3274m4_defun([_LT_TAG_COMPILER],
3275[AC_REQUIRE([AC_PROG_CC])dnl
3276
3277_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
3278_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
3279_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
3280_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
3281
3282# If no C compiler was specified, use CC.
3283LTCC=${LTCC-"$CC"}
3284
3285# If no C compiler flags were specified, use CFLAGS.
3286LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
3287
3288# Allow CC to be a program name with arguments.
3289compiler=$CC
3290])# _LT_TAG_COMPILER
3291
3292
3293# _LT_COMPILER_BOILERPLATE
3294# ------------------------
3295# Check for compiler boilerplate output or warnings with
3296# the simple compiler test code.
3297m4_defun([_LT_COMPILER_BOILERPLATE],
3298[m4_require([_LT_DECL_SED])dnl
3299ac_outfile=conftest.$ac_objext
3300echo "$lt_simple_compile_test_code" >conftest.$ac_ext
3301eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
3302_lt_compiler_boilerplate=`cat conftest.err`
3303$RM conftest*
3304])# _LT_COMPILER_BOILERPLATE
3305
3306
3307# _LT_LINKER_BOILERPLATE
3308# ----------------------
3309# Check for linker boilerplate output or warnings with
3310# the simple link test code.
3311m4_defun([_LT_LINKER_BOILERPLATE],
3312[m4_require([_LT_DECL_SED])dnl
3313ac_outfile=conftest.$ac_objext
3314echo "$lt_simple_link_test_code" >conftest.$ac_ext
3315eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
3316_lt_linker_boilerplate=`cat conftest.err`
3317$RM -r conftest*
3318])# _LT_LINKER_BOILERPLATE
3319
3320# _LT_REQUIRED_DARWIN_CHECKS
3321# -------------------------
3322m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
3323  case $host_os in
3324    rhapsody* | darwin*)
3325    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
3326    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
3327    AC_CHECK_TOOL([LIPO], [lipo], [:])
3328    AC_CHECK_TOOL([OTOOL], [otool], [:])
3329    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
3330    _LT_DECL([], [DSYMUTIL], [1],
3331      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
3332    _LT_DECL([], [NMEDIT], [1],
3333      [Tool to change global to local symbols on Mac OS X])
3334    _LT_DECL([], [LIPO], [1],
3335      [Tool to manipulate fat objects and archives on Mac OS X])
3336    _LT_DECL([], [OTOOL], [1],
3337      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
3338    _LT_DECL([], [OTOOL64], [1],
3339      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
3340
3341    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
3342      [lt_cv_apple_cc_single_mod=no
3343      if test -z "${LT_MULTI_MODULE}"; then
3344	# By default we will add the -single_module flag. You can override
3345	# by either setting the environment variable LT_MULTI_MODULE
3346	# non-empty at configure time, or by adding -multi_module to the
3347	# link flags.
3348	rm -rf libconftest.dylib*
3349	echo "int foo(void){return 1;}" > conftest.c
3350	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
3351-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
3352	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
3353	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
3354        _lt_result=$?
3355	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
3356	  lt_cv_apple_cc_single_mod=yes
3357	else
3358	  cat conftest.err >&AS_MESSAGE_LOG_FD
3359	fi
3360	rm -rf libconftest.dylib*
3361	rm -f conftest.*
3362      fi])
3363    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
3364      [lt_cv_ld_exported_symbols_list],
3365      [lt_cv_ld_exported_symbols_list=no
3366      save_LDFLAGS=$LDFLAGS
3367      echo "_main" > conftest.sym
3368      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
3369      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
3370	[lt_cv_ld_exported_symbols_list=yes],
3371	[lt_cv_ld_exported_symbols_list=no])
3372	LDFLAGS="$save_LDFLAGS"
3373    ])
3374    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
3375      [lt_cv_ld_force_load=no
3376      cat > conftest.c << _LT_EOF
3377int forced_loaded() { return 2;}
3378_LT_EOF
3379      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
3380      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
3381      echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
3382      $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
3383      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
3384      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
3385      cat > conftest.c << _LT_EOF
3386int main() { return 0;}
3387_LT_EOF
3388      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
3389      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
3390      _lt_result=$?
3391      if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
3392	lt_cv_ld_force_load=yes
3393      else
3394	cat conftest.err >&AS_MESSAGE_LOG_FD
3395      fi
3396        rm -f conftest.err libconftest.a conftest conftest.c
3397        rm -rf conftest.dSYM
3398    ])
3399    case $host_os in
3400    rhapsody* | darwin1.[[012]])
3401      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
3402    darwin1.*)
3403      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
3404    darwin*) # darwin 5.x on
3405      # if running on 10.5 or later, the deployment target defaults
3406      # to the OS version, if on x86, and 10.4, the deployment
3407      # target defaults to 10.4. Don't you love it?
3408      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
3409	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
3410	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
3411	10.[[012]]*)
3412	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
3413	10.*)
3414	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
3415      esac
3416    ;;
3417  esac
3418    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
3419      _lt_dar_single_mod='$single_module'
3420    fi
3421    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
3422      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
3423    else
3424      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
3425    fi
3426    if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
3427      _lt_dsymutil='~$DSYMUTIL $lib || :'
3428    else
3429      _lt_dsymutil=
3430    fi
3431    ;;
3432  esac
3433])
3434
3435
3436# _LT_DARWIN_LINKER_FEATURES
3437# --------------------------
3438# Checks for linker and compiler features on darwin
3439m4_defun([_LT_DARWIN_LINKER_FEATURES],
3440[
3441  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
3442  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
3443  _LT_TAGVAR(hardcode_direct, $1)=no
3444  _LT_TAGVAR(hardcode_automatic, $1)=yes
3445  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3446  if test "$lt_cv_ld_force_load" = "yes"; then
3447    _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\"`'
3448  else
3449    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
3450  fi
3451  _LT_TAGVAR(link_all_deplibs, $1)=yes
3452  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
3453  case $cc_basename in
3454     ifort*) _lt_dar_can_shared=yes ;;
3455     *) _lt_dar_can_shared=$GCC ;;
3456  esac
3457  if test "$_lt_dar_can_shared" = "yes"; then
3458    output_verbose_link_cmd=func_echo_all
3459    _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}"
3460    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
3461    _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}"
3462    _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}"
3463    m4_if([$1], [CXX],
3464[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
3465      _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}"
3466      _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}"
3467    fi
3468],[])
3469  else
3470  _LT_TAGVAR(ld_shlibs, $1)=no
3471  fi
3472])
3473
3474# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
3475# ----------------------------------
3476# Links a minimal program and checks the executable
3477# for the system default hardcoded library path. In most cases,
3478# this is /usr/lib:/lib, but when the MPI compilers are used
3479# the location of the communication and MPI libs are included too.
3480# If we don't find anything, use the default library path according
3481# to the aix ld manual.
3482# Store the results from the different compilers for each TAGNAME.
3483# Allow to override them for all tags through lt_cv_aix_libpath.
3484m4_defun([_LT_SYS_MODULE_PATH_AIX],
3485[m4_require([_LT_DECL_SED])dnl
3486if test "${lt_cv_aix_libpath+set}" = set; then
3487  aix_libpath=$lt_cv_aix_libpath
3488else
3489  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
3490  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
3491  lt_aix_libpath_sed='[
3492      /Import File Strings/,/^$/ {
3493	  /^0/ {
3494	      s/^0  *\([^ ]*\) *$/\1/
3495	      p
3496	  }
3497      }]'
3498  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
3499  # Check for a 64-bit object if we didn't find anything.
3500  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
3501    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
3502  fi],[])
3503  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
3504    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
3505  fi
3506  ])
3507  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
3508fi
3509])# _LT_SYS_MODULE_PATH_AIX
3510
3511
3512# _LT_SHELL_INIT(ARG)
3513# -------------------
3514m4_define([_LT_SHELL_INIT],
3515[m4_divert_text([M4SH-INIT], [$1
3516])])# _LT_SHELL_INIT
3517
3518
3519
3520# _LT_PROG_ECHO_BACKSLASH
3521# -----------------------
3522# Find how we can fake an echo command that does not interpret backslash.
3523# In particular, with Autoconf 2.60 or later we add some code to the start
3524# of the generated configure script which will find a shell with a builtin
3525# printf (which we can use as an echo command).
3526m4_defun([_LT_PROG_ECHO_BACKSLASH],
3527[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
3528ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
3529ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
3530
3531AC_MSG_CHECKING([how to print strings])
3532# Test print first, because it will be a builtin if present.
3533if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
3534   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
3535  ECHO='print -r --'
3536elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
3537  ECHO='printf %s\n'
3538else
3539  # Use this function as a fallback that always works.
3540  func_fallback_echo ()
3541  {
3542    eval 'cat <<_LTECHO_EOF
3543$[]1
3544_LTECHO_EOF'
3545  }
3546  ECHO='func_fallback_echo'
3547fi
3548
3549# func_echo_all arg...
3550# Invoke $ECHO with all args, space-separated.
3551func_echo_all ()
3552{
3553    $ECHO "$*" 
3554}
3555
3556case "$ECHO" in
3557  printf*) AC_MSG_RESULT([printf]) ;;
3558  print*) AC_MSG_RESULT([print -r]) ;;
3559  *) AC_MSG_RESULT([cat]) ;;
3560esac
3561
3562m4_ifdef([_AS_DETECT_SUGGESTED],
3563[_AS_DETECT_SUGGESTED([
3564  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
3565    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
3566    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
3567    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
3568    PATH=/empty FPATH=/empty; export PATH FPATH
3569    test "X`printf %s $ECHO`" = "X$ECHO" \
3570      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
3571
3572_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
3573_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
3574])# _LT_PROG_ECHO_BACKSLASH
3575
3576
3577# _LT_WITH_SYSROOT
3578# ----------------
3579AC_DEFUN([_LT_WITH_SYSROOT],
3580[AC_MSG_CHECKING([for sysroot])
3581AC_ARG_WITH([sysroot],
3582[  --with-sysroot[=DIR] Search for dependent libraries within DIR
3583                        (or the compiler's sysroot if not specified).],
3584[], [with_sysroot=no])
3585
3586dnl lt_sysroot will always be passed unquoted.  We quote it here
3587dnl in case the user passed a directory name.
3588lt_sysroot=
3589case ${with_sysroot} in #(
3590 yes)
3591   if test "$GCC" = yes; then
3592     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
3593   fi
3594   ;; #(
3595 /*)
3596   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
3597   ;; #(
3598 no|'')
3599   ;; #(
3600 *)
3601   AC_MSG_RESULT([${with_sysroot}])
3602   AC_MSG_ERROR([The sysroot must be an absolute path.])
3603   ;;
3604esac
3605
3606 AC_MSG_RESULT([${lt_sysroot:-no}])
3607_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
3608[dependent libraries, and in which our libraries should be installed.])])
3609
3610# _LT_ENABLE_LOCK
3611# ---------------
3612m4_defun([_LT_ENABLE_LOCK],
3613[AC_ARG_ENABLE([libtool-lock],
3614  [AS_HELP_STRING([--disable-libtool-lock],
3615    [avoid locking (might break parallel builds)])])
3616test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
3617
3618# Some flags need to be propagated to the compiler or linker for good
3619# libtool support.
3620case $host in
3621ia64-*-hpux*)
3622  # Find out which ABI we are using.
3623  echo 'int i;' > conftest.$ac_ext
3624  if AC_TRY_EVAL(ac_compile); then
3625    case `/usr/bin/file conftest.$ac_objext` in
3626      *ELF-32*)
3627	HPUX_IA64_MODE="32"
3628	;;
3629      *ELF-64*)
3630	HPUX_IA64_MODE="64"
3631	;;
3632    esac
3633  fi
3634  rm -rf conftest*
3635  ;;
3636*-*-irix6*)
3637  # Find out which ABI we are using.
3638  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
3639  if AC_TRY_EVAL(ac_compile); then
3640    if test "$lt_cv_prog_gnu_ld" = yes; then
3641      case `/usr/bin/file conftest.$ac_objext` in
3642	*32-bit*)
3643	  LD="${LD-ld} -melf32bsmip"
3644	  ;;
3645	*N32*)
3646	  LD="${LD-ld} -melf32bmipn32"
3647	  ;;
3648	*64-bit*)
3649	  LD="${LD-ld} -melf64bmip"
3650	;;
3651      esac
3652    else
3653      case `/usr/bin/file conftest.$ac_objext` in
3654	*32-bit*)
3655	  LD="${LD-ld} -32"
3656	  ;;
3657	*N32*)
3658	  LD="${LD-ld} -n32"
3659	  ;;
3660	*64-bit*)
3661	  LD="${LD-ld} -64"
3662	  ;;
3663      esac
3664    fi
3665  fi
3666  rm -rf conftest*
3667  ;;
3668
3669x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
3670s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
3671  # Find out which ABI we are using.
3672  echo 'int i;' > conftest.$ac_ext
3673  if AC_TRY_EVAL(ac_compile); then
3674    case `/usr/bin/file conftest.o` in
3675      *32-bit*)
3676	case $host in
3677	  x86_64-*kfreebsd*-gnu)
3678	    LD="${LD-ld} -m elf_i386_fbsd"
3679	    ;;
3680	  x86_64-*linux*)
3681	    LD="${LD-ld} -m elf_i386"
3682	    ;;
3683	  ppc64-*linux*|powerpc64-*linux*)
3684	    LD="${LD-ld} -m elf32ppclinux"
3685	    ;;
3686	  s390x-*linux*)
3687	    LD="${LD-ld} -m elf_s390"
3688	    ;;
3689	  sparc64-*linux*)
3690	    LD="${LD-ld} -m elf32_sparc"
3691	    ;;
3692	esac
3693	;;
3694      *64-bit*)
3695	case $host in
3696	  x86_64-*kfreebsd*-gnu)
3697	    LD="${LD-ld} -m elf_x86_64_fbsd"
3698	    ;;
3699	  x86_64-*linux*)
3700	    LD="${LD-ld} -m elf_x86_64"
3701	    ;;
3702	  ppc*-*linux*|powerpc*-*linux*)
3703	    LD="${LD-ld} -m elf64ppc"
3704	    ;;
3705	  s390*-*linux*|s390*-*tpf*)
3706	    LD="${LD-ld} -m elf64_s390"
3707	    ;;
3708	  sparc*-*linux*)
3709	    LD="${LD-ld} -m elf64_sparc"
3710	    ;;
3711	esac
3712	;;
3713    esac
3714  fi
3715  rm -rf conftest*
3716  ;;
3717
3718*-*-sco3.2v5*)
3719  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3720  SAVE_CFLAGS="$CFLAGS"
3721  CFLAGS="$CFLAGS -belf"
3722  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
3723    [AC_LANG_PUSH(C)
3724     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
3725     AC_LANG_POP])
3726  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3727    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3728    CFLAGS="$SAVE_CFLAGS"
3729  fi
3730  ;;
3731sparc*-*solaris*)
3732  # Find out which ABI we are using.
3733  echo 'int i;' > conftest.$ac_ext
3734  if AC_TRY_EVAL(ac_compile); then
3735    case `/usr/bin/file conftest.o` in
3736    *64-bit*)
3737      case $lt_cv_prog_gnu_ld in
3738      yes*) LD="${LD-ld} -m elf64_sparc" ;;
3739      *)
3740	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
3741	  LD="${LD-ld} -64"
3742	fi
3743	;;
3744      esac
3745      ;;
3746    esac
3747  fi
3748  rm -rf conftest*
3749  ;;
3750esac
3751
3752need_locks="$enable_libtool_lock"
3753])# _LT_ENABLE_LOCK
3754
3755
3756# _LT_PROG_AR
3757# -----------
3758m4_defun([_LT_PROG_AR],
3759[AC_CHECK_TOOLS(AR, [ar], false)
3760: ${AR=ar}
3761: ${AR_FLAGS=cru}
3762_LT_DECL([], [AR], [1], [The archiver])
3763_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
3764
3765AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
3766  [lt_cv_ar_at_file=no
3767   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
3768     [echo conftest.$ac_objext > conftest.lst
3769      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
3770      AC_TRY_EVAL([lt_ar_try])
3771      if test "$ac_status" -eq 0; then
3772	# Ensure the archiver fails upon bogus file names.
3773	rm -f conftest.$ac_objext libconftest.a
3774	AC_TRY_EVAL([lt_ar_try])
3775	if test "$ac_status" -ne 0; then
3776          lt_cv_ar_at_file=@
3777        fi
3778      fi
3779      rm -f conftest.* libconftest.a
3780     ])
3781  ])
3782
3783if test "x$lt_cv_ar_at_file" = xno; then
3784  archiver_list_spec=
3785else
3786  archiver_list_spec=$lt_cv_ar_at_file
3787fi
3788_LT_DECL([], [archiver_list_spec], [1],
3789  [How to feed a file listing to the archiver])
3790])# _LT_PROG_AR
3791
3792
3793# _LT_CMD_OLD_ARCHIVE
3794# -------------------
3795m4_defun([_LT_CMD_OLD_ARCHIVE],
3796[_LT_PROG_AR
3797
3798AC_CHECK_TOOL(STRIP, strip, :)
3799test -z "$STRIP" && STRIP=:
3800_LT_DECL([], [STRIP], [1], [A symbol stripping program])
3801
3802AC_CHECK_TOOL(RANLIB, ranlib, :)
3803test -z "$RANLIB" && RANLIB=:
3804_LT_DECL([], [RANLIB], [1],
3805    [Commands used to install an old-style archive])
3806
3807# Determine commands to create old-style static archives.
3808old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
3809old_postinstall_cmds='chmod 644 $oldlib'
3810old_postuninstall_cmds=
3811
3812if test -n "$RANLIB"; then
3813  case $host_os in
3814  openbsd*)
3815    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
3816    ;;
3817  *)
3818    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
3819    ;;
3820  esac
3821  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
3822fi
3823
3824case $host_os in
3825  darwin*)
3826    lock_old_archive_extraction=yes ;;
3827  *)
3828    lock_old_archive_extraction=no ;;
3829esac
3830_LT_DECL([], [old_postinstall_cmds], [2])
3831_LT_DECL([], [old_postuninstall_cmds], [2])
3832_LT_TAGDECL([], [old_archive_cmds], [2],
3833    [Commands used to build an old-style archive])
3834_LT_DECL([], [lock_old_archive_extraction], [0],
3835    [Whether to use a lock for old archive extraction])
3836])# _LT_CMD_OLD_ARCHIVE
3837
3838
3839# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
3840#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
3841# ----------------------------------------------------------------
3842# Check whether the given compiler option works
3843AC_DEFUN([_LT_COMPILER_OPTION],
3844[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3845m4_require([_LT_DECL_SED])dnl
3846AC_CACHE_CHECK([$1], [$2],
3847  [$2=no
3848   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
3849   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
3850   lt_compiler_flag="$3"
3851   # Insert the option either (1) after the last *FLAGS variable, or
3852   # (2) before a word containing "conftest.", or (3) at the end.
3853   # Note that $ac_compile itself does not contain backslashes and begins
3854   # with a dollar sign (not a hyphen), so the echo should work correctly.
3855   # The option is referenced via a variable to avoid confusing sed.
3856   lt_compile=`echo "$ac_compile" | $SED \
3857   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
3858   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
3859   -e 's:$: $lt_compiler_flag:'`
3860   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
3861   (eval "$lt_compile" 2>conftest.err)
3862   ac_status=$?
3863   cat conftest.err >&AS_MESSAGE_LOG_FD
3864   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
3865   if (exit $ac_status) && test -s "$ac_outfile"; then
3866     # The compiler can only warn and ignore the option if not recognized
3867     # So say no if there are warnings other than the usual output.
3868     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
3869     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
3870     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
3871       $2=yes
3872     fi
3873   fi
3874   $RM conftest*
3875])
3876
3877if test x"[$]$2" = xyes; then
3878    m4_if([$5], , :, [$5])
3879else
3880    m4_if([$6], , :, [$6])
3881fi
3882])# _LT_COMPILER_OPTION
3883
3884# Old name:
3885AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
3886dnl aclocal-1.4 backwards compatibility:
3887dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
3888
3889
3890# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
3891#                  [ACTION-SUCCESS], [ACTION-FAILURE])
3892# ----------------------------------------------------
3893# Check whether the given linker option works
3894AC_DEFUN([_LT_LINKER_OPTION],
3895[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3896m4_require([_LT_DECL_SED])dnl
3897AC_CACHE_CHECK([$1], [$2],
3898  [$2=no
3899   save_LDFLAGS="$LDFLAGS"
3900   LDFLAGS="$LDFLAGS $3"
3901   echo "$lt_simple_link_test_code" > conftest.$ac_ext
3902   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
3903     # The linker can only warn and ignore the option if not recognized
3904     # So say no if there are warnings
3905     if test -s conftest.err; then
3906       # Append any errors to the config.log.
3907       cat conftest.err 1>&AS_MESSAGE_LOG_FD
3908       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
3909       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
3910       if diff conftest.exp conftest.er2 >/dev/null; then
3911         $2=yes
3912       fi
3913     else
3914       $2=yes
3915     fi
3916   fi
3917   $RM -r conftest*
3918   LDFLAGS="$save_LDFLAGS"
3919])
3920
3921if test x"[$]$2" = xyes; then
3922    m4_if([$4], , :, [$4])
3923else
3924    m4_if([$5], , :, [$5])
3925fi
3926])# _LT_LINKER_OPTION
3927
3928# Old name:
3929AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
3930dnl aclocal-1.4 backwards compatibility:
3931dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
3932
3933
3934# LT_CMD_MAX_LEN
3935#---------------
3936AC_DEFUN([LT_CMD_MAX_LEN],
3937[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3938# find the maximum length of command line arguments
3939AC_MSG_CHECKING([the maximum length of command line arguments])
3940AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
3941  i=0
3942  teststring="ABCD"
3943
3944  case $build_os in
3945  msdosdjgpp*)
3946    # On DJGPP, this test can blow up pretty badly due to problems in libc
3947    # (any single argument exceeding 2000 bytes causes a buffer overrun
3948    # during glob expansion).  Even if it were fixed, the result of this
3949    # check would be larger than it should be.
3950    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
3951    ;;
3952
3953  gnu*)
3954    # Under GNU Hurd, this test is not required because there is
3955    # no limit to the length of command line arguments.
3956    # Libtool will interpret -1 as no limit whatsoever
3957    lt_cv_sys_max_cmd_len=-1;
3958    ;;
3959
3960  cygwin* | mingw* | cegcc*)
3961    # On Win9x/ME, this test blows up -- it succeeds, but takes
3962    # about 5 minutes as the teststring grows exponentially.
3963    # Worse, since 9x/ME are not pre-emptively multitasking,
3964    # you end up with a "frozen" computer, even though with patience
3965    # the test eventually succeeds (with a max line length of 256k).
3966    # Instead, let's just punt: use the minimum linelength reported by
3967    # all of the supported platforms: 8192 (on NT/2K/XP).
3968    lt_cv_sys_max_cmd_len=8192;
3969    ;;
3970
3971  mint*)
3972    # On MiNT this can take a long time and run out of memory.
3973    lt_cv_sys_max_cmd_len=8192;
3974    ;;
3975
3976  amigaos*)
3977    # On AmigaOS with pdksh, this test takes hours, literally.
3978    # So we just punt and use a minimum line length of 8192.
3979    lt_cv_sys_max_cmd_len=8192;
3980    ;;
3981
3982  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
3983    # This has been around since 386BSD, at least.  Likely further.
3984    if test -x /sbin/sysctl; then
3985      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
3986    elif test -x /usr/sbin/sysctl; then
3987      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
3988    else
3989      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
3990    fi
3991    # And add a safety zone
3992    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
3993    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
3994    ;;
3995
3996  interix*)
3997    # We know the value 262144 and hardcode it with a safety zone (like BSD)
3998    lt_cv_sys_max_cmd_len=196608
3999    ;;
4000
4001  osf*)
4002    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
4003    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
4004    # nice to cause kernel panics so lets avoid the loop below.
4005    # First set a reasonable default.
4006    lt_cv_sys_max_cmd_len=16384
4007    #
4008    if test -x /sbin/sysconfig; then
4009      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
4010        *1*) lt_cv_sys_max_cmd_len=-1 ;;
4011      esac
4012    fi
4013    ;;
4014  sco3.2v5*)
4015    lt_cv_sys_max_cmd_len=102400
4016    ;;
4017  sysv5* | sco5v6* | sysv4.2uw2*)
4018    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
4019    if test -n "$kargmax"; then
4020      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
4021    else
4022      lt_cv_sys_max_cmd_len=32768
4023    fi
4024    ;;
4025  *)
4026    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
4027    if test -n "$lt_cv_sys_max_cmd_len"; then
4028      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
4029      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
4030    else
4031      # Make teststring a little bigger before we do anything with it.
4032      # a 1K string should be a reasonable start.
4033      for i in 1 2 3 4 5 6 7 8 ; do
4034        teststring=$teststring$teststring
4035      done
4036      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
4037      # If test is not a shell built-in, we'll probably end up computing a
4038      # maximum length that is only half of the actual maximum length, but
4039      # we can't tell.
4040      while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
4041	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
4042	      test $i != 17 # 1/2 MB should be enough
4043      do
4044        i=`expr $i + 1`
4045        teststring=$teststring$teststring
4046      done
4047      # Only check the string length outside the loop.
4048      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
4049      teststring=
4050      # Add a significant safety factor because C++ compilers can tack on
4051      # massive amounts of additional arguments before passing them to the
4052      # linker.  It appears as though 1/2 is a usable value.
4053      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
4054    fi
4055    ;;
4056  esac
4057])
4058if test -n $lt_cv_sys_max_cmd_len ; then
4059  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
4060else
4061  AC_MSG_RESULT(none)
4062fi
4063max_cmd_len=$lt_cv_sys_max_cmd_len
4064_LT_DECL([], [max_cmd_len], [0],
4065    [What is the maximum length of a command?])
4066])# LT_CMD_MAX_LEN
4067
4068# Old name:
4069AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
4070dnl aclocal-1.4 backwards compatibility:
4071dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
4072
4073
4074# _LT_HEADER_DLFCN
4075# ----------------
4076m4_defun([_LT_HEADER_DLFCN],
4077[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
4078])# _LT_HEADER_DLFCN
4079
4080
4081# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
4082#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
4083# ----------------------------------------------------------------
4084m4_defun([_LT_TRY_DLOPEN_SELF],
4085[m4_require([_LT_HEADER_DLFCN])dnl
4086if test "$cross_compiling" = yes; then :
4087  [$4]
4088else
4089  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
4090  lt_status=$lt_dlunknown
4091  cat > conftest.$ac_ext <<_LT_EOF
4092[#line $LINENO "configure"
4093#include "confdefs.h"
4094
4095#if HAVE_DLFCN_H
4096#include <dlfcn.h>
4097#endif
4098
4099#include <stdio.h>
4100
4101#ifdef RTLD_GLOBAL
4102#  define LT_DLGLOBAL		RTLD_GLOBAL
4103#else
4104#  ifdef DL_GLOBAL
4105#    define LT_DLGLOBAL		DL_GLOBAL
4106#  else
4107#    define LT_DLGLOBAL		0
4108#  endif
4109#endif
4110
4111/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
4112   find out it does not work in some platform. */
4113#ifndef LT_DLLAZY_OR_NOW
4114#  ifdef RTLD_LAZY
4115#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
4116#  else
4117#    ifdef DL_LAZY
4118#      define LT_DLLAZY_OR_NOW		DL_LAZY
4119#    else
4120#      ifdef RTLD_NOW
4121#        define LT_DLLAZY_OR_NOW	RTLD_NOW
4122#      else
4123#        ifdef DL_NOW
4124#          define LT_DLLAZY_OR_NOW	DL_NOW
4125#        else
4126#          define LT_DLLAZY_OR_NOW	0
4127#        endif
4128#      endif
4129#    endif
4130#  endif
4131#endif
4132
4133/* When -fvisbility=hidden is used, assume the code has been annotated
4134   correspondingly for the symbols needed.  */
4135#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
4136int fnord () __attribute__((visibility("default")));
4137#endif
4138
4139int fnord () { return 42; }
4140int main ()
4141{
4142  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
4143  int status = $lt_dlunknown;
4144
4145  if (self)
4146    {
4147      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
4148      else
4149        {
4150	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
4151          else puts (dlerror ());
4152	}
4153      /* dlclose (self); */
4154    }
4155  else
4156    puts (dlerror ());
4157
4158  return status;
4159}]
4160_LT_EOF
4161  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
4162    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
4163    lt_status=$?
4164    case x$lt_status in
4165      x$lt_dlno_uscore) $1 ;;
4166      x$lt_dlneed_uscore) $2 ;;
4167      x$lt_dlunknown|x*) $3 ;;
4168    esac
4169  else :
4170    # compilation failed
4171    $3
4172  fi
4173fi
4174rm -fr conftest*
4175])# _LT_TRY_DLOPEN_SELF
4176
4177
4178# LT_SYS_DLOPEN_SELF
4179# ------------------
4180AC_DEFUN([LT_SYS_DLOPEN_SELF],
4181[m4_require([_LT_HEADER_DLFCN])dnl
4182if test "x$enable_dlopen" != xyes; then
4183  enable_dlopen=unknown
4184  enable_dlopen_self=unknown
4185  enable_dlopen_self_static=unknown
4186else
4187  lt_cv_dlopen=no
4188  lt_cv_dlopen_libs=
4189
4190  case $host_os in
4191  beos*)
4192    lt_cv_dlopen="load_add_on"
4193    lt_cv_dlopen_libs=
4194    lt_cv_dlopen_self=yes
4195    ;;
4196
4197  mingw* | pw32* | cegcc*)
4198    lt_cv_dlopen="LoadLibrary"
4199    lt_cv_dlopen_libs=
4200    ;;
4201
4202  cygwin*)
4203    lt_cv_dlopen="dlopen"
4204    lt_cv_dlopen_libs=
4205    ;;
4206
4207  darwin*)
4208  # if libdl is installed we need to link against it
4209    AC_CHECK_LIB([dl], [dlopen],
4210		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
4211    lt_cv_dlopen="dyld"
4212    lt_cv_dlopen_libs=
4213    lt_cv_dlopen_self=yes
4214    ])
4215    ;;
4216
4217  *)
4218    AC_CHECK_FUNC([shl_load],
4219	  [lt_cv_dlopen="shl_load"],
4220      [AC_CHECK_LIB([dld], [shl_load],
4221	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
4222	[AC_CHECK_FUNC([dlopen],
4223	      [lt_cv_dlopen="dlopen"],
4224	  [AC_CHECK_LIB([dl], [dlopen],
4225		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
4226	    [AC_CHECK_LIB([svld], [dlopen],
4227		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
4228	      [AC_CHECK_LIB([dld], [dld_link],
4229		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
4230	      ])
4231	    ])
4232	  ])
4233	])
4234      ])
4235    ;;
4236  esac
4237
4238  if test "x$lt_cv_dlopen" != xno; then
4239    enable_dlopen=yes
4240  else
4241    enable_dlopen=no
4242  fi
4243
4244  case $lt_cv_dlopen in
4245  dlopen)
4246    save_CPPFLAGS="$CPPFLAGS"
4247    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
4248
4249    save_LDFLAGS="$LDFLAGS"
4250    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
4251
4252    save_LIBS="$LIBS"
4253    LIBS="$lt_cv_dlopen_libs $LIBS"
4254
4255    AC_CACHE_CHECK([whether a program can dlopen itself],
4256	  lt_cv_dlopen_self, [dnl
4257	  _LT_TRY_DLOPEN_SELF(
4258	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
4259	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
4260    ])
4261
4262    if test "x$lt_cv_dlopen_self" = xyes; then
4263      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
4264      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
4265	  lt_cv_dlopen_self_static, [dnl
4266	  _LT_TRY_DLOPEN_SELF(
4267	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
4268	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
4269      ])
4270    fi
4271
4272    CPPFLAGS="$save_CPPFLAGS"
4273    LDFLAGS="$save_LDFLAGS"
4274    LIBS="$save_LIBS"
4275    ;;
4276  esac
4277
4278  case $lt_cv_dlopen_self in
4279  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
4280  *) enable_dlopen_self=unknown ;;
4281  esac
4282
4283  case $lt_cv_dlopen_self_static in
4284  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
4285  *) enable_dlopen_self_static=unknown ;;
4286  esac
4287fi
4288_LT_DECL([dlopen_support], [enable_dlopen], [0],
4289	 [Whether dlopen is supported])
4290_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
4291	 [Whether dlopen of programs is supported])
4292_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
4293	 [Whether dlopen of statically linked programs is supported])
4294])# LT_SYS_DLOPEN_SELF
4295
4296# Old name:
4297AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
4298dnl aclocal-1.4 backwards compatibility:
4299dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
4300
4301
4302# _LT_COMPILER_C_O([TAGNAME])
4303# ---------------------------
4304# Check to see if options -c and -o are simultaneously supported by compiler.
4305# This macro does not hard code the compiler like AC_PROG_CC_C_O.
4306m4_defun([_LT_COMPILER_C_O],
4307[m4_require([_LT_DECL_SED])dnl
4308m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4309m4_require([_LT_TAG_COMPILER])dnl
4310AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
4311  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
4312  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
4313   $RM -r conftest 2>/dev/null
4314   mkdir conftest
4315   cd conftest
4316   mkdir out
4317   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
4318
4319   lt_compiler_flag="-o out/conftest2.$ac_objext"
4320   # Insert the option either (1) after the last *FLAGS variable, or
4321   # (2) before a word containing "conftest.", or (3) at the end.
4322   # Note that $ac_compile itself does not contain backslashes and begins
4323   # with a dollar sign (not a hyphen), so the echo should work correctly.
4324   lt_compile=`echo "$ac_compile" | $SED \
4325   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
4326   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
4327   -e 's:$: $lt_compiler_flag:'`
4328   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
4329   (eval "$lt_compile" 2>out/conftest.err)
4330   ac_status=$?
4331   cat out/conftest.err >&AS_MESSAGE_LOG_FD
4332   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
4333   if (exit $ac_status) && test -s out/conftest2.$ac_objext
4334   then
4335     # The compiler can only warn and ignore the option if not recognized
4336     # So say no if there are warnings
4337     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
4338     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
4339     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
4340       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
4341     fi
4342   fi
4343   chmod u+w . 2>&AS_MESSAGE_LOG_FD
4344   $RM conftest*
4345   # SGI C++ compiler will create directory out/ii_files/ for
4346   # template instantiation
4347   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
4348   $RM out/* && rmdir out
4349   cd ..
4350   $RM -r conftest
4351   $RM conftest*
4352])
4353_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
4354	[Does compiler simultaneously support -c and -o options?])
4355])# _LT_COMPILER_C_O
4356
4357
4358# _LT_COMPILER_FILE_LOCKS([TAGNAME])
4359# ----------------------------------
4360# Check to see if we can do hard links to lock some files if needed
4361m4_defun([_LT_COMPILER_FILE_LOCKS],
4362[m4_require([_LT_ENABLE_LOCK])dnl
4363m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4364_LT_COMPILER_C_O([$1])
4365
4366hard_links="nottested"
4367if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
4368  # do not overwrite the value of need_locks provided by the user
4369  AC_MSG_CHECKING([if we can lock with hard links])
4370  hard_links=yes
4371  $RM conftest*
4372  ln conftest.a conftest.b 2>/dev/null && hard_links=no
4373  touch conftest.a
4374  ln conftest.a conftest.b 2>&5 || hard_links=no
4375  ln conftest.a conftest.b 2>/dev/null && hard_links=no
4376  AC_MSG_RESULT([$hard_links])
4377  if test "$hard_links" = no; then
4378    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
4379    need_locks=warn
4380  fi
4381else
4382  need_locks=no
4383fi
4384_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
4385])# _LT_COMPILER_FILE_LOCKS
4386
4387
4388# _LT_CHECK_OBJDIR
4389# ----------------
4390m4_defun([_LT_CHECK_OBJDIR],
4391[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
4392[rm -f .libs 2>/dev/null
4393mkdir .libs 2>/dev/null
4394if test -d .libs; then
4395  lt_cv_objdir=.libs
4396else
4397  # MS-DOS does not allow filenames that begin with a dot.
4398  lt_cv_objdir=_libs
4399fi
4400rmdir .libs 2>/dev/null])
4401objdir=$lt_cv_objdir
4402_LT_DECL([], [objdir], [0],
4403         [The name of the directory that contains temporary libtool files])dnl
4404m4_pattern_allow([LT_OBJDIR])dnl
4405AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
4406  [Define to the sub-directory in which libtool stores uninstalled libraries.])
4407])# _LT_CHECK_OBJDIR
4408
4409
4410# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
4411# --------------------------------------
4412# Check hardcoding attributes.
4413m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
4414[AC_MSG_CHECKING([how to hardcode library paths into programs])
4415_LT_TAGVAR(hardcode_action, $1)=
4416if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
4417   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
4418   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
4419
4420  # We can hardcode non-existent directories.
4421  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
4422     # If the only mechanism to avoid hardcoding is shlibpath_var, we
4423     # have to relink, otherwise we might link with an installed library
4424     # when we should be linking with a yet-to-be-installed one
4425     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
4426     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
4427    # Linking always hardcodes the temporary library directory.
4428    _LT_TAGVAR(hardcode_action, $1)=relink
4429  else
4430    # We can link without hardcoding, and we can hardcode nonexisting dirs.
4431    _LT_TAGVAR(hardcode_action, $1)=immediate
4432  fi
4433else
4434  # We cannot hardcode anything, or else we can only hardcode existing
4435  # directories.
4436  _LT_TAGVAR(hardcode_action, $1)=unsupported
4437fi
4438AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
4439
4440if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
4441   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
4442  # Fast installation is not supported
4443  enable_fast_install=no
4444elif test "$shlibpath_overrides_runpath" = yes ||
4445     test "$enable_shared" = no; then
4446  # Fast installation is not necessary
4447  enable_fast_install=needless
4448fi
4449_LT_TAGDECL([], [hardcode_action], [0],
4450    [How to hardcode a shared library path into an executable])
4451])# _LT_LINKER_HARDCODE_LIBPATH
4452
4453
4454# _LT_CMD_STRIPLIB
4455# ----------------
4456m4_defun([_LT_CMD_STRIPLIB],
4457[m4_require([_LT_DECL_EGREP])
4458striplib=
4459old_striplib=
4460AC_MSG_CHECKING([whether stripping libraries is possible])
4461if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
4462  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
4463  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
4464  AC_MSG_RESULT([yes])
4465else
4466# FIXME - insert some real tests, host_os isn't really good enough
4467  case $host_os in
4468  darwin*)
4469    if test -n "$STRIP" ; then
4470      striplib="$STRIP -x"
4471      old_striplib="$STRIP -S"
4472      AC_MSG_RESULT([yes])
4473    else
4474      AC_MSG_RESULT([no])
4475    fi
4476    ;;
4477  *)
4478    AC_MSG_RESULT([no])
4479    ;;
4480  esac
4481fi
4482_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
4483_LT_DECL([], [striplib], [1])
4484])# _LT_CMD_STRIPLIB
4485
4486
4487# _LT_SYS_DYNAMIC_LINKER([TAG])
4488# -----------------------------
4489# PORTME Fill in your ld.so characteristics
4490m4_defun([_LT_SYS_DYNAMIC_LINKER],
4491[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4492m4_require([_LT_DECL_EGREP])dnl
4493m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4494m4_require([_LT_DECL_OBJDUMP])dnl
4495m4_require([_LT_DECL_SED])dnl
4496m4_require([_LT_CHECK_SHELL_FEATURES])dnl
4497AC_MSG_CHECKING([dynamic linker characteristics])
4498m4_if([$1],
4499	[], [
4500if test "$GCC" = yes; then
4501  case $host_os in
4502    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
4503    *) lt_awk_arg="/^libraries:/" ;;
4504  esac
4505  case $host_os in
4506    mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
4507    *) lt_sed_strip_eq="s,=/,/,g" ;;
4508  esac
4509  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
4510  case $lt_search_path_spec in
4511  *\;*)
4512    # if the path contains ";" then we assume it to be the separator
4513    # otherwise default to the standard path separator (i.e. ":") - it is
4514    # assumed that no part of a normal pathname contains ";" but that should
4515    # okay in the real world where ";" in dirpaths is itself problematic.
4516    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
4517    ;;
4518  *)
4519    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
4520    ;;
4521  esac
4522  # Ok, now we have the path, separated by spaces, we can step through it
4523  # and add multilib dir if necessary.
4524  lt_tmp_lt_search_path_spec=
4525  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
4526  for lt_sys_path in $lt_search_path_spec; do
4527    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
4528      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
4529    else
4530      test -d "$lt_sys_path" && \
4531	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
4532    fi
4533  done
4534  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
4535BEGIN {RS=" "; FS="/|\n";} {
4536  lt_foo="";
4537  lt_count=0;
4538  for (lt_i = NF; lt_i > 0; lt_i--) {
4539    if ($lt_i != "" && $lt_i != ".") {
4540      if ($lt_i == "..") {
4541        lt_count++;
4542      } else {
4543        if (lt_count == 0) {
4544          lt_foo="/" $lt_i lt_foo;
4545        } else {
4546          lt_count--;
4547        }
4548      }
4549    }
4550  }
4551  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
4552  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
4553}'`
4554  # AWK program above erroneously prepends '/' to C:/dos/paths
4555  # for these hosts.
4556  case $host_os in
4557    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
4558      $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
4559  esac
4560  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
4561else
4562  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
4563fi])
4564library_names_spec=
4565libname_spec='lib$name'
4566soname_spec=
4567shrext_cmds=".so"
4568postinstall_cmds=
4569postuninstall_cmds=
4570finish_cmds=
4571finish_eval=
4572shlibpath_var=
4573shlibpath_overrides_runpath=unknown
4574version_type=none
4575dynamic_linker="$host_os ld.so"
4576sys_lib_dlsearch_path_spec="/lib /usr/lib"
4577need_lib_prefix=unknown
4578hardcode_into_libs=no
4579
4580# when you set need_version to no, make sure it does not cause -set_version
4581# flags to be left without arguments
4582need_version=unknown
4583
4584case $host_os in
4585aix3*)
4586  version_type=linux
4587  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
4588  shlibpath_var=LIBPATH
4589
4590  # AIX 3 has no versioning support, so we append a major version to the name.
4591  soname_spec='${libname}${release}${shared_ext}$major'
4592  ;;
4593
4594aix[[4-9]]*)
4595  version_type=linux
4596  need_lib_prefix=no
4597  need_version=no
4598  hardcode_into_libs=yes
4599  if test "$host_cpu" = ia64; then
4600    # AIX 5 supports IA64
4601    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
4602    shlibpath_var=LD_LIBRARY_PATH
4603  else
4604    # With GCC up to 2.95.x, collect2 would create an import file
4605    # for dependence libraries.  The import file would start with
4606    # the line `#! .'.  This would cause the generated library to
4607    # depend on `.', always an invalid library.  This was fixed in
4608    # development snapshots of GCC prior to 3.0.
4609    case $host_os in
4610      aix4 | aix4.[[01]] | aix4.[[01]].*)
4611      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
4612	   echo ' yes '
4613	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
4614	:
4615      else
4616	can_build_shared=no
4617      fi
4618      ;;
4619    esac
4620    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
4621    # soname into executable. Probably we can add versioning support to
4622    # collect2, so additional links can be useful in future.
4623    if test "$aix_use_runtimelinking" = yes; then
4624      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
4625      # instead of lib<name>.a to let people know that these are not
4626      # typical AIX shared libraries.
4627      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4628    else
4629      # We preserve .a as extension for shared libraries through AIX4.2
4630      # and later when we are not doing run time linking.
4631      library_names_spec='${libname}${release}.a $libname.a'
4632      soname_spec='${libname}${release}${shared_ext}$major'
4633    fi
4634    shlibpath_var=LIBPATH
4635  fi
4636  ;;
4637
4638amigaos*)
4639  case $host_cpu in
4640  powerpc)
4641    # Since July 2007 AmigaOS4 officially supports .so libraries.
4642    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
4643    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4644    ;;
4645  m68k)
4646    library_names_spec='$libname.ixlibrary $libname.a'
4647    # Create ${libname}_ixlibrary.a entries in /sys/libs.
4648    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'
4649    ;;
4650  esac
4651  ;;
4652
4653beos*)
4654  library_names_spec='${libname}${shared_ext}'
4655  dynamic_linker="$host_os ld.so"
4656  shlibpath_var=LIBRARY_PATH
4657  ;;
4658
4659bsdi[[45]]*)
4660  version_type=linux
4661  need_version=no
4662  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4663  soname_spec='${libname}${release}${shared_ext}$major'
4664  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
4665  shlibpath_var=LD_LIBRARY_PATH
4666  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
4667  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
4668  # the default ld.so.conf also contains /usr/contrib/lib and
4669  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
4670  # libtool to hard-code these into programs
4671  ;;
4672
4673cygwin* | mingw* | pw32* | cegcc*)
4674  version_type=windows
4675  shrext_cmds=".dll"
4676  need_version=no
4677  need_lib_prefix=no
4678
4679  case $GCC,$cc_basename in
4680  yes,*)
4681    # gcc
4682    library_names_spec='$libname.dll.a'
4683    # DLL is installed to $(libdir)/../bin by postinstall_cmds
4684    postinstall_cmds='base_file=`basename \${file}`~
4685      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
4686      dldir=$destdir/`dirname \$dlpath`~
4687      test -d \$dldir || mkdir -p \$dldir~
4688      $install_prog $dir/$dlname \$dldir/$dlname~
4689      chmod a+x \$dldir/$dlname~
4690      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
4691        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
4692      fi'
4693    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
4694      dlpath=$dir/\$dldll~
4695       $RM \$dlpath'
4696    shlibpath_overrides_runpath=yes
4697
4698    case $host_os in
4699    cygwin*)
4700      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
4701      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
4702m4_if([$1], [],[
4703      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
4704      ;;
4705    mingw* | cegcc*)
4706      # MinGW DLLs use traditional 'lib' prefix
4707      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
4708      ;;
4709    pw32*)
4710      # pw32 DLLs use 'pw' prefix rather than 'lib'
4711      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
4712      ;;
4713    esac
4714    dynamic_linker='Win32 ld.exe'
4715    ;;
4716
4717  *,cl*)
4718    # Native MSVC
4719    libname_spec='$name'
4720    soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
4721    library_names_spec='${libname}.dll.lib'
4722
4723    case $build_os in
4724    mingw*)
4725      sys_lib_search_path_spec=
4726      lt_save_ifs=$IFS
4727      IFS=';'
4728      for lt_path in $LIB
4729      do
4730        IFS=$lt_save_ifs
4731        # Let DOS variable expansion print the short 8.3 style file name.
4732        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
4733        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
4734      done
4735      IFS=$lt_save_ifs
4736      # Convert to MSYS style.
4737      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
4738      ;;
4739    cygwin*)
4740      # Convert to unix form, then to dos form, then back to unix form
4741      # but this time dos style (no spaces!) so that the unix form looks
4742      # like /cygdrive/c/PROGRA~1:/cygdr...
4743      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
4744      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
4745      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
4746      ;;
4747    *)
4748      sys_lib_search_path_spec="$LIB"
4749      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
4750        # It is most probably a Windows format PATH.
4751        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
4752      else
4753        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
4754      fi
4755      # FIXME: find the short name or the path components, as spaces are
4756      # common. (e.g. "Program Files" -> "PROGRA~1")
4757      ;;
4758    esac
4759
4760    # DLL is installed to $(libdir)/../bin by postinstall_cmds
4761    postinstall_cmds='base_file=`basename \${file}`~
4762      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
4763      dldir=$destdir/`dirname \$dlpath`~
4764      test -d \$dldir || mkdir -p \$dldir~
4765      $install_prog $dir/$dlname \$dldir/$dlname'
4766    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
4767      dlpath=$dir/\$dldll~
4768       $RM \$dlpath'
4769    shlibpath_overrides_runpath=yes
4770    dynamic_linker='Win32 link.exe'
4771    ;;
4772
4773  *)
4774    # Assume MSVC wrapper
4775    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
4776    dynamic_linker='Win32 ld.exe'
4777    ;;
4778  esac
4779  # FIXME: first we should search . and the directory the executable is in
4780  shlibpath_var=PATH
4781  ;;
4782
4783darwin* | rhapsody*)
4784  dynamic_linker="$host_os dyld"
4785  version_type=darwin
4786  need_lib_prefix=no
4787  need_version=no
4788  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
4789  soname_spec='${libname}${release}${major}$shared_ext'
4790  shlibpath_overrides_runpath=yes
4791  shlibpath_var=DYLD_LIBRARY_PATH
4792  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
4793m4_if([$1], [],[
4794  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
4795  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
4796  ;;
4797
4798dgux*)
4799  version_type=linux
4800  need_lib_prefix=no
4801  need_version=no
4802  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
4803  soname_spec='${libname}${release}${shared_ext}$major'
4804  shlibpath_var=LD_LIBRARY_PATH
4805  ;;
4806
4807freebsd1*)
4808  dynamic_linker=no
4809  ;;
4810
4811freebsd* | dragonfly*)
4812  # DragonFly does not have aout.  When/if they implement a new
4813  # versioning mechanism, adjust this.
4814  if test -x /usr/bin/objformat; then
4815    objformat=`/usr/bin/objformat`
4816  else
4817    case $host_os in
4818    freebsd[[123]]*) objformat=aout ;;
4819    *) objformat=elf ;;
4820    esac
4821  fi
4822  version_type=freebsd-$objformat
4823  case $version_type in
4824    freebsd-elf*)
4825      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
4826      need_version=no
4827      need_lib_prefix=no
4828      ;;
4829    freebsd-*)
4830      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
4831      need_version=yes
4832      ;;
4833  esac
4834  shlibpath_var=LD_LIBRARY_PATH
4835  case $host_os in
4836  freebsd2*)
4837    shlibpath_overrides_runpath=yes
4838    ;;
4839  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
4840    shlibpath_overrides_runpath=yes
4841    hardcode_into_libs=yes
4842    ;;
4843  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
4844  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
4845    shlibpath_overrides_runpath=no
4846    hardcode_into_libs=yes
4847    ;;
4848  *) # from 4.6 on, and DragonFly
4849    shlibpath_overrides_runpath=yes
4850    hardcode_into_libs=yes
4851    ;;
4852  esac
4853  ;;
4854
4855gnu*)
4856  version_type=linux
4857  need_lib_prefix=no
4858  need_version=no
4859  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
4860  soname_spec='${libname}${release}${shared_ext}$major'
4861  shlibpath_var=LD_LIBRARY_PATH
4862  hardcode_into_libs=yes
4863  ;;
4864
4865haiku*)
4866  version_type=linux
4867  need_lib_prefix=no
4868  need_version=no
4869  dynamic_linker="$host_os runtime_loader"
4870  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
4871  soname_spec='${libname}${release}${shared_ext}$major'
4872  shlibpath_var=LIBRARY_PATH
4873  shlibpath_overrides_runpath=yes
4874  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
4875  hardcode_into_libs=yes
4876  ;;
4877
4878hpux9* | hpux10* | hpux11*)
4879  # Give a soname corresponding to the major version so that dld.sl refuses to
4880  # link against other versions.
4881  version_type=sunos
4882  need_lib_prefix=no
4883  need_version=no
4884  case $host_cpu in
4885  ia64*)
4886    shrext_cmds='.so'
4887    hardcode_into_libs=yes
4888    dynamic_linker="$host_os dld.so"
4889    shlibpath_var=LD_LIBRARY_PATH
4890    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
4891    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4892    soname_spec='${libname}${release}${shared_ext}$major'
4893    if test "X$HPUX_IA64_MODE" = X32; then
4894      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
4895    else
4896      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
4897    fi
4898    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
4899    ;;
4900  hppa*64*)
4901    shrext_cmds='.sl'
4902    hardcode_into_libs=yes
4903    dynamic_linker="$host_os dld.sl"
4904    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
4905    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
4906    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4907    soname_spec='${libname}${release}${shared_ext}$major'
4908    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
4909    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
4910    ;;
4911  *)
4912    shrext_cmds='.sl'
4913    dynamic_linker="$host_os dld.sl"
4914    shlibpath_var=SHLIB_PATH
4915    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
4916    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4917    soname_spec='${libname}${release}${shared_ext}$major'
4918    ;;
4919  esac
4920  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
4921  postinstall_cmds='chmod 555 $lib'
4922  # or fails outright, so override atomically:
4923  install_override_mode=555
4924  ;;
4925
4926interix[[3-9]]*)
4927  version_type=linux
4928  need_lib_prefix=no
4929  need_version=no
4930  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
4931  soname_spec='${libname}${release}${shared_ext}$major'
4932  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
4933  shlibpath_var=LD_LIBRARY_PATH
4934  shlibpath_overrides_runpath=no
4935  hardcode_into_libs=yes
4936  ;;
4937
4938irix5* | irix6* | nonstopux*)
4939  case $host_os in
4940    nonstopux*) version_type=nonstopux ;;
4941    *)
4942	if test "$lt_cv_prog_gnu_ld" = yes; then
4943		version_type=linux
4944	else
4945		version_type=irix
4946	fi ;;
4947  esac
4948  need_lib_prefix=no
4949  need_version=no
4950  soname_spec='${libname}${release}${shared_ext}$major'
4951  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
4952  case $host_os in
4953  irix5* | nonstopux*)
4954    libsuff= shlibsuff=
4955    ;;
4956  *)
4957    case $LD in # libtool.m4 will add one of these switches to LD
4958    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
4959      libsuff= shlibsuff= libmagic=32-bit;;
4960    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
4961      libsuff=32 shlibsuff=N32 libmagic=N32;;
4962    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
4963      libsuff=64 shlibsuff=64 libmagic=64-bit;;
4964    *) libsuff= shlibsuff= libmagic=never-match;;
4965    esac
4966    ;;
4967  esac
4968  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
4969  shlibpath_overrides_runpath=no
4970  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
4971  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
4972  hardcode_into_libs=yes
4973  ;;
4974
4975# No shared lib support for Linux oldld, aout, or coff.
4976linux*oldld* | linux*aout* | linux*coff*)
4977  dynamic_linker=no
4978  ;;
4979
4980# This must be Linux ELF.
4981linux* | k*bsd*-gnu | kopensolaris*-gnu)
4982  version_type=linux
4983  need_lib_prefix=no
4984  need_version=no
4985  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4986  soname_spec='${libname}${release}${shared_ext}$major'
4987  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
4988  shlibpath_var=LD_LIBRARY_PATH
4989  shlibpath_overrides_runpath=no
4990
4991  # Some binutils ld are patched to set DT_RUNPATH
4992  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
4993    [lt_cv_shlibpath_overrides_runpath=no
4994    save_LDFLAGS=$LDFLAGS
4995    save_libdir=$libdir
4996    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
4997	 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
4998    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
4999      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
5000	 [lt_cv_shlibpath_overrides_runpath=yes])])
5001    LDFLAGS=$save_LDFLAGS
5002    libdir=$save_libdir
5003    ])
5004  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
5005
5006  # This implies no fast_install, which is unacceptable.
5007  # Some rework will be needed to allow for fast_install
5008  # before this can be enabled.
5009  hardcode_into_libs=yes
5010
5011  # Append ld.so.conf contents to the search path
5012  if test -f /etc/ld.so.conf; then
5013    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' ' '`
5014    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
5015  fi
5016
5017  # We used to test for /lib/ld.so.1 and disable shared libraries on
5018  # powerpc, because MkLinux only supported shared libraries with the
5019  # GNU dynamic linker.  Since this was broken with cross compilers,
5020  # most powerpc-linux boxes support dynamic linking these days and
5021  # people can always --disable-shared, the test was removed, and we
5022  # assume the GNU/Linux dynamic linker is in use.
5023  dynamic_linker='GNU/Linux ld.so'
5024  ;;
5025
5026netbsd*)
5027  version_type=sunos
5028  need_lib_prefix=no
5029  need_version=no
5030  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5031    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
5032    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
5033    dynamic_linker='NetBSD (a.out) ld.so'
5034  else
5035    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
5036    soname_spec='${libname}${release}${shared_ext}$major'
5037    dynamic_linker='NetBSD ld.elf_so'
5038  fi
5039  shlibpath_var=LD_LIBRARY_PATH
5040  shlibpath_overrides_runpath=yes
5041  hardcode_into_libs=yes
5042  ;;
5043
5044newsos6)
5045  version_type=linux
5046  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
5047  shlibpath_var=LD_LIBRARY_PATH
5048  shlibpath_overrides_runpath=yes
5049  ;;
5050
5051*nto* | *qnx*)
5052  version_type=qnx
5053  need_lib_prefix=no
5054  need_version=no
5055  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
5056  soname_spec='${libname}${release}${shared_ext}$major'
5057  shlibpath_var=LD_LIBRARY_PATH
5058  shlibpath_overrides_runpath=no
5059  hardcode_into_libs=yes
5060  dynamic_linker='ldqnx.so'
5061  ;;
5062
5063openbsd*)
5064  version_type=sunos
5065  sys_lib_dlsearch_path_spec="/usr/lib"
5066  need_lib_prefix=no
5067  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
5068  case $host_os in
5069    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
5070    *)				need_version=no  ;;
5071  esac
5072  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
5073  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
5074  shlibpath_var=LD_LIBRARY_PATH
5075  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5076    case $host_os in
5077      openbsd2.[[89]] | openbsd2.[[89]].*)
5078	shlibpath_overrides_runpath=no
5079	;;
5080      *)
5081	shlibpath_overrides_runpath=yes
5082	;;
5083      esac
5084  else
5085    shlibpath_overrides_runpath=yes
5086  fi
5087  ;;
5088
5089os2*)
5090  libname_spec='$name'
5091  shrext_cmds=".dll"
5092  need_lib_prefix=no
5093  library_names_spec='$libname${shared_ext} $libname.a'
5094  dynamic_linker='OS/2 ld.exe'
5095  shlibpath_var=LIBPATH
5096  ;;
5097
5098osf3* | osf4* | osf5*)
5099  version_type=osf
5100  need_lib_prefix=no
5101  need_version=no
5102  soname_spec='${libname}${release}${shared_ext}$major'
5103  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
5104  shlibpath_var=LD_LIBRARY_PATH
5105  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
5106  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
5107  ;;
5108
5109rdos*)
5110  dynamic_linker=no
5111  ;;
5112
5113solaris*)
5114  version_type=linux
5115  need_lib_prefix=no
5116  need_version=no
5117  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
5118  soname_spec='${libname}${release}${shared_ext}$major'
5119  shlibpath_var=LD_LIBRARY_PATH
5120  shlibpath_overrides_runpath=yes
5121  hardcode_into_libs=yes
5122  # ldd complains unless libraries are executable
5123  postinstall_cmds='chmod +x $lib'
5124  ;;
5125
5126sunos4*)
5127  version_type=sunos
5128  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
5129  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
5130  shlibpath_var=LD_LIBRARY_PATH
5131  shlibpath_overrides_runpath=yes
5132  if test "$with_gnu_ld" = yes; then
5133    need_lib_prefix=no
5134  fi
5135  need_version=yes
5136  ;;
5137
5138sysv4 | sysv4.3*)
5139  version_type=linux
5140  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
5141  soname_spec='${libname}${release}${shared_ext}$major'
5142  shlibpath_var=LD_LIBRARY_PATH
5143  case $host_vendor in
5144    sni)
5145      shlibpath_overrides_runpath=no
5146      need_lib_prefix=no
5147      runpath_var=LD_RUN_PATH
5148      ;;
5149    siemens)
5150      need_lib_prefix=no
5151      ;;
5152    motorola)
5153      need_lib_prefix=no
5154      need_version=no
5155      shlibpath_overrides_runpath=no
5156      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
5157      ;;
5158  esac
5159  ;;
5160
5161sysv4*MP*)
5162  if test -d /usr/nec ;then
5163    version_type=linux
5164    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
5165    soname_spec='$libname${shared_ext}.$major'
5166    shlibpath_var=LD_LIBRARY_PATH
5167  fi
5168  ;;
5169
5170sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
5171  version_type=freebsd-elf
5172  need_lib_prefix=no
5173  need_version=no
5174  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
5175  soname_spec='${libname}${release}${shared_ext}$major'
5176  shlibpath_var=LD_LIBRARY_PATH
5177  shlibpath_overrides_runpath=yes
5178  hardcode_into_libs=yes
5179  if test "$with_gnu_ld" = yes; then
5180    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
5181  else
5182    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
5183    case $host_os in
5184      sco3.2v5*)
5185        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
5186	;;
5187    esac
5188  fi
5189  sys_lib_dlsearch_path_spec='/usr/lib'
5190  ;;
5191
5192tpf*)
5193  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
5194  version_type=linux
5195  need_lib_prefix=no
5196  need_version=no
5197  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
5198  shlibpath_var=LD_LIBRARY_PATH
5199  shlibpath_overrides_runpath=no
5200  hardcode_into_libs=yes
5201  ;;
5202
5203uts4*)
5204  version_type=linux
5205  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
5206  soname_spec='${libname}${release}${shared_ext}$major'
5207  shlibpath_var=LD_LIBRARY_PATH
5208  ;;
5209
5210*)
5211  dynamic_linker=no
5212  ;;
5213esac
5214AC_MSG_RESULT([$dynamic_linker])
5215test "$dynamic_linker" = no && can_build_shared=no
5216
5217variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
5218if test "$GCC" = yes; then
5219  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
5220fi
5221
5222if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
5223  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
5224fi
5225if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
5226  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
5227fi
5228
5229_LT_DECL([], [variables_saved_for_relink], [1],
5230    [Variables whose values should be saved in libtool wrapper scripts and
5231    restored at link time])
5232_LT_DECL([], [need_lib_prefix], [0],
5233    [Do we need the "lib" prefix for modules?])
5234_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
5235_LT_DECL([], [version_type], [0], [Library versioning type])
5236_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
5237_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
5238_LT_DECL([], [shlibpath_overrides_runpath], [0],
5239    [Is shlibpath searched before the hard-coded library search path?])
5240_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
5241_LT_DECL([], [library_names_spec], [1],
5242    [[List of archive names.  First name is the real one, the rest are links.
5243    The last name is the one that the linker finds with -lNAME]])
5244_LT_DECL([], [soname_spec], [1],
5245    [[The coded name of the library, if different from the real name]])
5246_LT_DECL([], [install_override_mode], [1],
5247    [Permission mode override for installation of shared libraries])
5248_LT_DECL([], [postinstall_cmds], [2],
5249    [Command to use after installation of a shared archive])
5250_LT_DECL([], [postuninstall_cmds], [2],
5251    [Command to use after uninstallation of a shared archive])
5252_LT_DECL([], [finish_cmds], [2],
5253    [Commands used to finish a libtool library installation in a directory])
5254_LT_DECL([], [finish_eval], [1],
5255    [[As "finish_cmds", except a single script fragment to be evaled but
5256    not shown]])
5257_LT_DECL([], [hardcode_into_libs], [0],
5258    [Whether we should hardcode library paths into libraries])
5259_LT_DECL([], [sys_lib_search_path_spec], [2],
5260    [Compile-time system search path for libraries])
5261_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
5262    [Run-time system search path for libraries])
5263])# _LT_SYS_DYNAMIC_LINKER
5264
5265
5266# _LT_PATH_TOOL_PREFIX(TOOL)
5267# --------------------------
5268# find a file program which can recognize shared library
5269AC_DEFUN([_LT_PATH_TOOL_PREFIX],
5270[m4_require([_LT_DECL_EGREP])dnl
5271AC_MSG_CHECKING([for $1])
5272AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
5273[case $MAGIC_CMD in
5274[[\\/*] |  ?:[\\/]*])
5275  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
5276  ;;
5277*)
5278  lt_save_MAGIC_CMD="$MAGIC_CMD"
5279  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5280dnl $ac_dummy forces splitting on constant user-supplied paths.
5281dnl POSIX.2 word splitting is done only on the output of word expansions,
5282dnl not every word.  This closes a longstanding sh security hole.
5283  ac_dummy="m4_if([$2], , $PATH, [$2])"
5284  for ac_dir in $ac_dummy; do
5285    IFS="$lt_save_ifs"
5286    test -z "$ac_dir" && ac_dir=.
5287    if test -f $ac_dir/$1; then
5288      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
5289      if test -n "$file_magic_test_file"; then
5290	case $deplibs_check_method in
5291	"file_magic "*)
5292	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
5293	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
5294	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
5295	    $EGREP "$file_magic_regex" > /dev/null; then
5296	    :
5297	  else
5298	    cat <<_LT_EOF 1>&2
5299
5300*** Warning: the command libtool uses to detect shared libraries,
5301*** $file_magic_cmd, produces output that libtool cannot recognize.
5302*** The result is that libtool may fail to recognize shared libraries
5303*** as such.  This will affect the creation of libtool libraries that
5304*** depend on shared libraries, but programs linked with such libtool
5305*** libraries will work regardless of this problem.  Nevertheless, you
5306*** may want to report the problem to your system manager and/or to
5307*** bug-libtool@gnu.org
5308
5309_LT_EOF
5310	  fi ;;
5311	esac
5312      fi
5313      break
5314    fi
5315  done
5316  IFS="$lt_save_ifs"
5317  MAGIC_CMD="$lt_save_MAGIC_CMD"
5318  ;;
5319esac])
5320MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
5321if test -n "$MAGIC_CMD"; then
5322  AC_MSG_RESULT($MAGIC_CMD)
5323else
5324  AC_MSG_RESULT(no)
5325fi
5326_LT_DECL([], [MAGIC_CMD], [0],
5327	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
5328])# _LT_PATH_TOOL_PREFIX
5329
5330# Old name:
5331AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
5332dnl aclocal-1.4 backwards compatibility:
5333dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
5334
5335
5336# _LT_PATH_MAGIC
5337# --------------
5338# find a file program which can recognize a shared library
5339m4_defun([_LT_PATH_MAGIC],
5340[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
5341if test -z "$lt_cv_path_MAGIC_CMD"; then
5342  if test -n "$ac_tool_prefix"; then
5343    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
5344  else
5345    MAGIC_CMD=:
5346  fi
5347fi
5348])# _LT_PATH_MAGIC
5349
5350
5351# LT_PATH_LD
5352# ----------
5353# find the pathname to the GNU or non-GNU linker
5354AC_DEFUN([LT_PATH_LD],
5355[AC_REQUIRE([AC_PROG_CC])dnl
5356AC_REQUIRE([AC_CANONICAL_HOST])dnl
5357AC_REQUIRE([AC_CANONICAL_BUILD])dnl
5358m4_require([_LT_DECL_SED])dnl
5359m4_require([_LT_DECL_EGREP])dnl
5360m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
5361
5362AC_ARG_WITH([gnu-ld],
5363    [AS_HELP_STRING([--with-gnu-ld],
5364	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
5365    [test "$withval" = no || with_gnu_ld=yes],
5366    [with_gnu_ld=no])dnl
5367
5368ac_prog=ld
5369if test "$GCC" = yes; then
5370  # Check if gcc -print-prog-name=ld gives a path.
5371  AC_MSG_CHECKING([for ld used by $CC])
5372  case $host in
5373  *-*-mingw*)
5374    # gcc leaves a trailing carriage return which upsets mingw
5375    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
5376  *)
5377    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
5378  esac
5379  case $ac_prog in
5380    # Accept absolute paths.
5381    [[\\/]]* | ?:[[\\/]]*)
5382      re_direlt='/[[^/]][[^/]]*/\.\./'
5383      # Canonicalize the pathname of ld
5384      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
5385      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
5386	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
5387      done
5388      test -z "$LD" && LD="$ac_prog"
5389      ;;
5390  "")
5391    # If it fails, then pretend we aren't using GCC.
5392    ac_prog=ld
5393    ;;
5394  *)
5395    # If it is relative, then search for the first ld in PATH.
5396    with_gnu_ld=unknown
5397    ;;
5398  esac
5399elif test "$with_gnu_ld" = yes; then
5400  AC_MSG_CHECKING([for GNU ld])
5401else
5402  AC_MSG_CHECKING([for non-GNU ld])
5403fi
5404AC_CACHE_VAL(lt_cv_path_LD,
5405[if test -z "$LD"; then
5406  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5407  for ac_dir in $PATH; do
5408    IFS="$lt_save_ifs"
5409    test -z "$ac_dir" && ac_dir=.
5410    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
5411      lt_cv_path_LD="$ac_dir/$ac_prog"
5412      # Check to see if the program is GNU ld.  I'd rather use --version,
5413      # but apparently some variants of GNU ld only accept -v.
5414      # Break only if it was the GNU/non-GNU ld that we prefer.
5415      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
5416      *GNU* | *'with BFD'*)
5417	test "$with_gnu_ld" != no && break
5418	;;
5419      *)
5420	test "$with_gnu_ld" != yes && break
5421	;;
5422      esac
5423    fi
5424  done
5425  IFS="$lt_save_ifs"
5426else
5427  lt_cv_path_LD="$LD" # Let the user override the test with a path.
5428fi])
5429LD="$lt_cv_path_LD"
5430if test -n "$LD"; then
5431  AC_MSG_RESULT($LD)
5432else
5433  AC_MSG_RESULT(no)
5434fi
5435test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
5436_LT_PATH_LD_GNU
5437AC_SUBST([LD])
5438
5439_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
5440])# LT_PATH_LD
5441
5442# Old names:
5443AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
5444AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
5445dnl aclocal-1.4 backwards compatibility:
5446dnl AC_DEFUN([AM_PROG_LD], [])
5447dnl AC_DEFUN([AC_PROG_LD], [])
5448
5449
5450# _LT_PATH_LD_GNU
5451#- --------------
5452m4_defun([_LT_PATH_LD_GNU],
5453[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
5454[# I'd rather use --version here, but apparently some GNU lds only accept -v.
5455case `$LD -v 2>&1 </dev/null` in
5456*GNU* | *'with BFD'*)
5457  lt_cv_prog_gnu_ld=yes
5458  ;;
5459*)
5460  lt_cv_prog_gnu_ld=no
5461  ;;
5462esac])
5463with_gnu_ld=$lt_cv_prog_gnu_ld
5464])# _LT_PATH_LD_GNU
5465
5466
5467# _LT_CMD_RELOAD
5468# --------------
5469# find reload flag for linker
5470#   -- PORTME Some linkers may need a different reload flag.
5471m4_defun([_LT_CMD_RELOAD],
5472[AC_CACHE_CHECK([for $LD option to reload object files],
5473  lt_cv_ld_reload_flag,
5474  [lt_cv_ld_reload_flag='-r'])
5475reload_flag=$lt_cv_ld_reload_flag
5476case $reload_flag in
5477"" | " "*) ;;
5478*) reload_flag=" $reload_flag" ;;
5479esac
5480reload_cmds='$LD$reload_flag -o $output$reload_objs'
5481case $host_os in
5482  cygwin* | mingw* | pw32* | cegcc*)
5483    if test "$GCC" != yes; then
5484      reload_cmds=false
5485    fi
5486    ;;
5487  darwin*)
5488    if test "$GCC" = yes; then
5489      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
5490    else
5491      reload_cmds='$LD$reload_flag -o $output$reload_objs'
5492    fi
5493    ;;
5494esac
5495_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
5496_LT_TAGDECL([], [reload_cmds], [2])dnl
5497])# _LT_CMD_RELOAD
5498
5499
5500# _LT_CHECK_MAGIC_METHOD
5501# ----------------------
5502# how to check for library dependencies
5503#  -- PORTME fill in with the dynamic library characteristics
5504m4_defun([_LT_CHECK_MAGIC_METHOD],
5505[m4_require([_LT_DECL_EGREP])
5506m4_require([_LT_DECL_OBJDUMP])
5507AC_CACHE_CHECK([how to recognize dependent libraries],
5508lt_cv_deplibs_check_method,
5509[lt_cv_file_magic_cmd='$MAGIC_CMD'
5510lt_cv_file_magic_test_file=
5511lt_cv_deplibs_check_method='unknown'
5512# Need to set the preceding variable on all platforms that support
5513# interlibrary dependencies.
5514# 'none' -- dependencies not supported.
5515# `unknown' -- same as none, but documents that we really don't know.
5516# 'pass_all' -- all dependencies passed with no checks.
5517# 'test_compile' -- check by making test program.
5518# 'file_magic [[regex]]' -- check by looking for files in library path
5519# which responds to the $file_magic_cmd with a given extended regex.
5520# If you have `file' or equivalent on your system and you're not sure
5521# whether `pass_all' will *always* work, you probably want this one.
5522
5523case $host_os in
5524aix[[4-9]]*)
5525  lt_cv_deplibs_check_method=pass_all
5526  ;;
5527
5528beos*)
5529  lt_cv_deplibs_check_method=pass_all
5530  ;;
5531
5532bsdi[[45]]*)
5533  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
5534  lt_cv_file_magic_cmd='/usr/bin/file -L'
5535  lt_cv_file_magic_test_file=/shlib/libc.so
5536  ;;
5537
5538cygwin*)
5539  # func_win32_libid is a shell function defined in ltmain.sh
5540  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
5541  lt_cv_file_magic_cmd='func_win32_libid'
5542  ;;
5543
5544mingw* | pw32*)
5545  # Base MSYS/MinGW do not provide the 'file' command needed by
5546  # func_win32_libid shell function, so use a weaker test based on 'objdump',
5547  # unless we find 'file', for example because we are cross-compiling.
5548  # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
5549  if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
5550    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
5551    lt_cv_file_magic_cmd='func_win32_libid'
5552  else
5553    # Keep this pattern in sync with the one in func_win32_libid.
5554    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
5555    lt_cv_file_magic_cmd='$OBJDUMP -f'
5556  fi
5557  ;;
5558
5559cegcc*)
5560  # use the weaker test based on 'objdump'. See mingw*.
5561  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
5562  lt_cv_file_magic_cmd='$OBJDUMP -f'
5563  ;;
5564
5565darwin* | rhapsody*)
5566  lt_cv_deplibs_check_method=pass_all
5567  ;;
5568
5569freebsd* | dragonfly*)
5570  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
5571    case $host_cpu in
5572    i*86 )
5573      # Not sure whether the presence of OpenBSD here was a mistake.
5574      # Let's accept both of them until this is cleared up.
5575      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
5576      lt_cv_file_magic_cmd=/usr/bin/file
5577      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
5578      ;;
5579    esac
5580  else
5581    lt_cv_deplibs_check_method=pass_all
5582  fi
5583  ;;
5584
5585gnu*)
5586  lt_cv_deplibs_check_method=pass_all
5587  ;;
5588
5589haiku*)
5590  lt_cv_deplibs_check_method=pass_all
5591  ;;
5592
5593hpux10.20* | hpux11*)
5594  lt_cv_file_magic_cmd=/usr/bin/file
5595  case $host_cpu in
5596  ia64*)
5597    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
5598    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
5599    ;;
5600  hppa*64*)
5601    [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]']
5602    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
5603    ;;
5604  *)
5605    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
5606    lt_cv_file_magic_test_file=/usr/lib/libc.sl
5607    ;;
5608  esac
5609  ;;
5610
5611interix[[3-9]]*)
5612  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
5613  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
5614  ;;
5615
5616irix5* | irix6* | nonstopux*)
5617  case $LD in
5618  *-32|*"-32 ") libmagic=32-bit;;
5619  *-n32|*"-n32 ") libmagic=N32;;
5620  *-64|*"-64 ") libmagic=64-bit;;
5621  *) libmagic=never-match;;
5622  esac
5623  lt_cv_deplibs_check_method=pass_all
5624  ;;
5625
5626# This must be Linux ELF.
5627linux* | k*bsd*-gnu | kopensolaris*-gnu)
5628  lt_cv_deplibs_check_method=pass_all
5629  ;;
5630
5631netbsd*)
5632  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
5633    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
5634  else
5635    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
5636  fi
5637  ;;
5638
5639newos6*)
5640  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
5641  lt_cv_file_magic_cmd=/usr/bin/file
5642  lt_cv_file_magic_test_file=/usr/lib/libnls.so
5643  ;;
5644
5645*nto* | *qnx*)
5646  lt_cv_deplibs_check_method=pass_all
5647  ;;
5648
5649openbsd*)
5650  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5651    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
5652  else
5653    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
5654  fi
5655  ;;
5656
5657osf3* | osf4* | osf5*)
5658  lt_cv_deplibs_check_method=pass_all
5659  ;;
5660
5661rdos*)
5662  lt_cv_deplibs_check_method=pass_all
5663  ;;
5664
5665solaris*)
5666  lt_cv_deplibs_check_method=pass_all
5667  ;;
5668
5669sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
5670  lt_cv_deplibs_check_method=pass_all
5671  ;;
5672
5673sysv4 | sysv4.3*)
5674  case $host_vendor in
5675  motorola)
5676    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]]'
5677    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
5678    ;;
5679  ncr)
5680    lt_cv_deplibs_check_method=pass_all
5681    ;;
5682  sequent)
5683    lt_cv_file_magic_cmd='/bin/file'
5684    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
5685    ;;
5686  sni)
5687    lt_cv_file_magic_cmd='/bin/file'
5688    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
5689    lt_cv_file_magic_test_file=/lib/libc.so
5690    ;;
5691  siemens)
5692    lt_cv_deplibs_check_method=pass_all
5693    ;;
5694  pc)
5695    lt_cv_deplibs_check_method=pass_all
5696    ;;
5697  esac
5698  ;;
5699
5700tpf*)
5701  lt_cv_deplibs_check_method=pass_all
5702  ;;
5703esac
5704])
5705
5706file_magic_glob=
5707want_nocaseglob=no
5708if test "$build" = "$host"; then
5709  case $host_os in
5710  mingw* | pw32*)
5711    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
5712      want_nocaseglob=yes
5713    else
5714      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
5715    fi
5716    ;;
5717  esac
5718fi
5719
5720file_magic_cmd=$lt_cv_file_magic_cmd
5721deplibs_check_method=$lt_cv_deplibs_check_method
5722test -z "$deplibs_check_method" && deplibs_check_method=unknown
5723
5724_LT_DECL([], [deplibs_check_method], [1],
5725    [Method to check whether dependent libraries are shared objects])
5726_LT_DECL([], [file_magic_cmd], [1],
5727    [Command to use when deplibs_check_method = "file_magic"])
5728_LT_DECL([], [file_magic_glob], [1],
5729    [How to find potential files when deplibs_check_method = "file_magic"])
5730_LT_DECL([], [want_nocaseglob], [1],
5731    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
5732])# _LT_CHECK_MAGIC_METHOD
5733
5734
5735# LT_PATH_NM
5736# ----------
5737# find the pathname to a BSD- or MS-compatible name lister
5738AC_DEFUN([LT_PATH_NM],
5739[AC_REQUIRE([AC_PROG_CC])dnl
5740AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
5741[if test -n "$NM"; then
5742  # Let the user override the test.
5743  lt_cv_path_NM="$NM"
5744else
5745  lt_nm_to_check="${ac_tool_prefix}nm"
5746  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
5747    lt_nm_to_check="$lt_nm_to_check nm"
5748  fi
5749  for lt_tmp_nm in $lt_nm_to_check; do
5750    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5751    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
5752      IFS="$lt_save_ifs"
5753      test -z "$ac_dir" && ac_dir=.
5754      tmp_nm="$ac_dir/$lt_tmp_nm"
5755      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
5756	# Check to see if the nm accepts a BSD-compat flag.
5757	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
5758	#   nm: unknown option "B" ignored
5759	# Tru64's nm complains that /dev/null is an invalid object file
5760	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
5761	*/dev/null* | *'Invalid file or object type'*)
5762	  lt_cv_path_NM="$tmp_nm -B"
5763	  break
5764	  ;;
5765	*)
5766	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
5767	  */dev/null*)
5768	    lt_cv_path_NM="$tmp_nm -p"
5769	    break
5770	    ;;
5771	  *)
5772	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
5773	    continue # so that we can try to find one that supports BSD flags
5774	    ;;
5775	  esac
5776	  ;;
5777	esac
5778      fi
5779    done
5780    IFS="$lt_save_ifs"
5781  done
5782  : ${lt_cv_path_NM=no}
5783fi])
5784if test "$lt_cv_path_NM" != "no"; then
5785  NM="$lt_cv_path_NM"
5786else
5787  # Didn't find any BSD compatible name lister, look for dumpbin.
5788  if test -n "$DUMPBIN"; then :
5789    # Let the user override the test.
5790  else
5791    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
5792    case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
5793    *COFF*)
5794      DUMPBIN="$DUMPBIN -symbols"
5795      ;;
5796    *)
5797      DUMPBIN=:
5798      ;;
5799    esac
5800  fi
5801  AC_SUBST([DUMPBIN])
5802  if test "$DUMPBIN" != ":"; then
5803    NM="$DUMPBIN"
5804  fi
5805fi
5806test -z "$NM" && NM=nm
5807AC_SUBST([NM])
5808_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
5809
5810AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
5811  [lt_cv_nm_interface="BSD nm"
5812  echo "int some_variable = 0;" > conftest.$ac_ext
5813  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
5814  (eval "$ac_compile" 2>conftest.err)
5815  cat conftest.err >&AS_MESSAGE_LOG_FD
5816  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
5817  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
5818  cat conftest.err >&AS_MESSAGE_LOG_FD
5819  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
5820  cat conftest.out >&AS_MESSAGE_LOG_FD
5821  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
5822    lt_cv_nm_interface="MS dumpbin"
5823  fi
5824  rm -f conftest*])
5825])# LT_PATH_NM
5826
5827# Old names:
5828AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
5829AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
5830dnl aclocal-1.4 backwards compatibility:
5831dnl AC_DEFUN([AM_PROG_NM], [])
5832dnl AC_DEFUN([AC_PROG_NM], [])
5833
5834# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
5835# --------------------------------
5836# how to determine the name of the shared library
5837# associated with a specific link library.
5838#  -- PORTME fill in with the dynamic library characteristics
5839m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
5840[m4_require([_LT_DECL_EGREP])
5841m4_require([_LT_DECL_OBJDUMP])
5842m4_require([_LT_DECL_DLLTOOL])
5843AC_CACHE_CHECK([how to associate runtime and link libraries],
5844lt_cv_sharedlib_from_linklib_cmd,
5845[lt_cv_sharedlib_from_linklib_cmd='unknown'
5846
5847case $host_os in
5848cygwin* | mingw* | pw32* | cegcc*)
5849  # two different shell functions defined in ltmain.sh
5850  # decide which to use based on capabilities of $DLLTOOL
5851  case `$DLLTOOL --help 2>&1` in
5852  *--identify-strict*)
5853    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
5854    ;;
5855  *)
5856    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
5857    ;;
5858  esac
5859  ;;
5860*)
5861  # fallback: assume linklib IS sharedlib
5862  lt_cv_sharedlib_from_linklib_cmd="$ECHO"
5863  ;;
5864esac
5865])
5866sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
5867test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
5868
5869_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
5870    [Command to associate shared and link libraries])
5871])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
5872
5873
5874# _LT_PATH_MANIFEST_TOOL
5875# ----------------------
5876# locate the manifest tool
5877m4_defun([_LT_PATH_MANIFEST_TOOL],
5878[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
5879test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
5880AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
5881  [lt_cv_path_mainfest_tool=no
5882  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
5883  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
5884  cat conftest.err >&AS_MESSAGE_LOG_FD
5885  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
5886    lt_cv_path_mainfest_tool=yes
5887  fi
5888  rm -f conftest*])
5889if test "x$lt_cv_path_mainfest_tool" != xyes; then
5890  MANIFEST_TOOL=:
5891fi
5892_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
5893])# _LT_PATH_MANIFEST_TOOL
5894
5895
5896# LT_LIB_M
5897# --------
5898# check for math library
5899AC_DEFUN([LT_LIB_M],
5900[AC_REQUIRE([AC_CANONICAL_HOST])dnl
5901LIBM=
5902case $host in
5903*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
5904  # These system don't have libm, or don't need it
5905  ;;
5906*-ncr-sysv4.3*)
5907  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
5908  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
5909  ;;
5910*)
5911  AC_CHECK_LIB(m, cos, LIBM="-lm")
5912  ;;
5913esac
5914AC_SUBST([LIBM])
5915])# LT_LIB_M
5916
5917# Old name:
5918AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
5919dnl aclocal-1.4 backwards compatibility:
5920dnl AC_DEFUN([AC_CHECK_LIBM], [])
5921
5922
5923# _LT_COMPILER_NO_RTTI([TAGNAME])
5924# -------------------------------
5925m4_defun([_LT_COMPILER_NO_RTTI],
5926[m4_require([_LT_TAG_COMPILER])dnl
5927
5928_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5929
5930if test "$GCC" = yes; then
5931  case $cc_basename in
5932  nvcc*)
5933    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
5934  *)
5935    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
5936  esac
5937
5938  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
5939    lt_cv_prog_compiler_rtti_exceptions,
5940    [-fno-rtti -fno-exceptions], [],
5941    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
5942fi
5943_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
5944	[Compiler flag to turn off builtin functions])
5945])# _LT_COMPILER_NO_RTTI
5946
5947
5948# _LT_CMD_GLOBAL_SYMBOLS
5949# ----------------------
5950m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
5951[AC_REQUIRE([AC_CANONICAL_HOST])dnl
5952AC_REQUIRE([AC_PROG_CC])dnl
5953AC_REQUIRE([AC_PROG_AWK])dnl
5954AC_REQUIRE([LT_PATH_NM])dnl
5955AC_REQUIRE([LT_PATH_LD])dnl
5956m4_require([_LT_DECL_SED])dnl
5957m4_require([_LT_DECL_EGREP])dnl
5958m4_require([_LT_TAG_COMPILER])dnl
5959
5960# Check for command to grab the raw symbol name followed by C symbol from nm.
5961AC_MSG_CHECKING([command to parse $NM output from $compiler object])
5962AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
5963[
5964# These are sane defaults that work on at least a few old systems.
5965# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
5966
5967# Character class describing NM global symbol codes.
5968symcode='[[BCDEGRST]]'
5969
5970# Regexp to match symbols that can be accessed directly from C.
5971sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
5972
5973# Define system-specific variables.
5974case $host_os in
5975aix*)
5976  symcode='[[BCDT]]'
5977  ;;
5978cygwin* | mingw* | pw32* | cegcc*)
5979  symcode='[[ABCDGISTW]]'
5980  ;;
5981hpux*)
5982  if test "$host_cpu" = ia64; then
5983    symcode='[[ABCDEGRST]]'
5984  fi
5985  ;;
5986irix* | nonstopux*)
5987  symcode='[[BCDEGRST]]'
5988  ;;
5989osf*)
5990  symcode='[[BCDEGQRST]]'
5991  ;;
5992solaris*)
5993  symcode='[[BDRT]]'
5994  ;;
5995sco3.2v5*)
5996  symcode='[[DT]]'
5997  ;;
5998sysv4.2uw2*)
5999  symcode='[[DT]]'
6000  ;;
6001sysv5* | sco5v6* | unixware* | OpenUNIX*)
6002  symcode='[[ABDT]]'
6003  ;;
6004sysv4)
6005  symcode='[[DFNSTU]]'
6006  ;;
6007esac
6008
6009# If we're using GNU nm, then use its standard symbol codes.
6010case `$NM -V 2>&1` in
6011*GNU* | *'with BFD'*)
6012  symcode='[[ABCDGIRSTW]]' ;;
6013esac
6014
6015# Transform an extracted symbol line into a proper C declaration.
6016# Some systems (esp. on ia64) link data and code symbols differently,
6017# so use this general approach.
6018lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
6019
6020# Transform an extracted symbol line into symbol name and symbol address
6021lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
6022lt_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'"
6023
6024# Handle CRLF in mingw tool chain
6025opt_cr=
6026case $build_os in
6027mingw*)
6028  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
6029  ;;
6030esac
6031
6032# Try without a prefix underscore, then with it.
6033for ac_symprfx in "" "_"; do
6034
6035  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
6036  symxfrm="\\1 $ac_symprfx\\2 \\2"
6037
6038  # Write the raw and C identifiers.
6039  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
6040    # Fake it for dumpbin and say T for any non-static function
6041    # and D for any global variable.
6042    # Also find C++ and __fastcall symbols from MSVC++,
6043    # which start with @ or ?.
6044    lt_cv_sys_global_symbol_pipe="$AWK ['"\
6045"     {last_section=section; section=\$ 3};"\
6046"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
6047"     \$ 0!~/External *\|/{next};"\
6048"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
6049"     {if(hide[section]) next};"\
6050"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
6051"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
6052"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
6053"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
6054"     ' prfx=^$ac_symprfx]"
6055  else
6056    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
6057  fi
6058  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
6059
6060  # Check to see that the pipe works correctly.
6061  pipe_works=no
6062
6063  rm -f conftest*
6064  cat > conftest.$ac_ext <<_LT_EOF
6065#ifdef __cplusplus
6066extern "C" {
6067#endif
6068char nm_test_var;
6069void nm_test_func(void);
6070void nm_test_func(void){}
6071#ifdef __cplusplus
6072}
6073#endif
6074int main(){nm_test_var='a';nm_test_func();return(0);}
6075_LT_EOF
6076
6077  if AC_TRY_EVAL(ac_compile); then
6078    # Now try to grab the symbols.
6079    nlist=conftest.nm
6080    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
6081      # Try sorting and uniquifying the output.
6082      if sort "$nlist" | uniq > "$nlist"T; then
6083	mv -f "$nlist"T "$nlist"
6084      else
6085	rm -f "$nlist"T
6086      fi
6087
6088      # Make sure that we snagged all the symbols we need.
6089      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
6090	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
6091	  cat <<_LT_EOF > conftest.$ac_ext
6092/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
6093#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
6094/* DATA imports from DLLs on WIN32 con't be const, because runtime
6095   relocations are performed -- see ld's documentation on pseudo-relocs.  */
6096# define LT@&t@_DLSYM_CONST
6097#elif defined(__osf__)
6098/* This system does not cope well with relocations in const data.  */
6099# define LT@&t@_DLSYM_CONST
6100#else
6101# define LT@&t@_DLSYM_CONST const
6102#endif
6103
6104#ifdef __cplusplus
6105extern "C" {
6106#endif
6107
6108_LT_EOF
6109	  # Now generate the symbol file.
6110	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
6111
6112	  cat <<_LT_EOF >> conftest.$ac_ext
6113
6114/* The mapping between symbol names and symbols.  */
6115LT@&t@_DLSYM_CONST struct {
6116  const char *name;
6117  void       *address;
6118}
6119lt__PROGRAM__LTX_preloaded_symbols[[]] =
6120{
6121  { "@PROGRAM@", (void *) 0 },
6122_LT_EOF
6123	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
6124	  cat <<\_LT_EOF >> conftest.$ac_ext
6125  {0, (void *) 0}
6126};
6127
6128/* This works around a problem in FreeBSD linker */
6129#ifdef FREEBSD_WORKAROUND
6130static const void *lt_preloaded_setup() {
6131  return lt__PROGRAM__LTX_preloaded_symbols;
6132}
6133#endif
6134
6135#ifdef __cplusplus
6136}
6137#endif
6138_LT_EOF
6139	  # Now try linking the two files.
6140	  mv conftest.$ac_objext conftstm.$ac_objext
6141	  lt_globsym_save_LIBS=$LIBS
6142	  lt_globsym_save_CFLAGS=$CFLAGS
6143	  LIBS="conftstm.$ac_objext"
6144	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
6145	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
6146	    pipe_works=yes
6147	  fi
6148	  LIBS=$lt_globsym_save_LIBS
6149	  CFLAGS=$lt_globsym_save_CFLAGS
6150	else
6151	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
6152	fi
6153      else
6154	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
6155      fi
6156    else
6157      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
6158    fi
6159  else
6160    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
6161    cat conftest.$ac_ext >&5
6162  fi
6163  rm -rf conftest* conftst*
6164
6165  # Do not use the global_symbol_pipe unless it works.
6166  if test "$pipe_works" = yes; then
6167    break
6168  else
6169    lt_cv_sys_global_symbol_pipe=
6170  fi
6171done
6172])
6173if test -z "$lt_cv_sys_global_symbol_pipe"; then
6174  lt_cv_sys_global_symbol_to_cdecl=
6175fi
6176if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
6177  AC_MSG_RESULT(failed)
6178else
6179  AC_MSG_RESULT(ok)
6180fi
6181
6182# Response file support.
6183if test "$lt_cv_nm_interface" = "MS dumpbin"; then
6184  nm_file_list_spec='@'
6185elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
6186  nm_file_list_spec='@'
6187fi
6188
6189_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
6190    [Take the output of nm and produce a listing of raw symbols and C names])
6191_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
6192    [Transform the output of nm in a proper C declaration])
6193_LT_DECL([global_symbol_to_c_name_address],
6194    [lt_cv_sys_global_symbol_to_c_name_address], [1],
6195    [Transform the output of nm in a C name address pair])
6196_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
6197    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
6198    [Transform the output of nm in a C name address pair when lib prefix is needed])
6199_LT_DECL([], [nm_file_list_spec], [1],
6200    [Specify filename containing input files for $NM])
6201]) # _LT_CMD_GLOBAL_SYMBOLS
6202
6203
6204# _LT_COMPILER_PIC([TAGNAME])
6205# ---------------------------
6206m4_defun([_LT_COMPILER_PIC],
6207[m4_require([_LT_TAG_COMPILER])dnl
6208_LT_TAGVAR(lt_prog_compiler_wl, $1)=
6209_LT_TAGVAR(lt_prog_compiler_pic, $1)=
6210_LT_TAGVAR(lt_prog_compiler_static, $1)=
6211
6212m4_if([$1], [CXX], [
6213  # C++ specific cases for pic, static, wl, etc.
6214  if test "$GXX" = yes; then
6215    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6216    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6217
6218    case $host_os in
6219    aix*)
6220      # All AIX code is PIC.
6221      if test "$host_cpu" = ia64; then
6222	# AIX 5 now supports IA64 processor
6223	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6224      fi
6225      ;;
6226
6227    amigaos*)
6228      case $host_cpu in
6229      powerpc)
6230            # see comment about AmigaOS4 .so support
6231            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6232        ;;
6233      m68k)
6234            # FIXME: we need at least 68020 code to build shared libraries, but
6235            # adding the `-m68020' flag to GCC prevents building anything better,
6236            # like `-m68040'.
6237            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
6238        ;;
6239      esac
6240      ;;
6241
6242    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
6243      # PIC is the default for these OSes.
6244      ;;
6245    mingw* | cygwin* | os2* | pw32* | cegcc*)
6246      # This hack is so that the source file can tell whether it is being
6247      # built for inclusion in a dll (and should export symbols for example).
6248      # Although the cygwin gcc ignores -fPIC, still need this for old-style
6249      # (--disable-auto-import) libraries
6250      m4_if([$1], [GCJ], [],
6251	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
6252      ;;
6253    darwin* | rhapsody*)
6254      # PIC is the default on this platform
6255      # Common symbols not allowed in MH_DYLIB files
6256      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
6257      ;;
6258    *djgpp*)
6259      # DJGPP does not support shared libraries at all
6260      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
6261      ;;
6262    haiku*)
6263      # PIC is the default for Haiku.
6264      # The "-static" flag exists, but is broken.
6265      _LT_TAGVAR(lt_prog_compiler_static, $1)=
6266      ;;
6267    interix[[3-9]]*)
6268      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
6269      # Instead, we relocate shared libraries at runtime.
6270      ;;
6271    sysv4*MP*)
6272      if test -d /usr/nec; then
6273	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
6274      fi
6275      ;;
6276    hpux*)
6277      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
6278      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
6279      # sets the default TLS model and affects inlining.
6280      case $host_cpu in
6281      hppa*64*)
6282	;;
6283      *)
6284	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6285	;;
6286      esac
6287      ;;
6288    *qnx* | *nto*)
6289      # QNX uses GNU C++, but need to define -shared option too, otherwise
6290      # it will coredump.
6291      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
6292      ;;
6293    *)
6294      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6295      ;;
6296    esac
6297  else
6298    case $host_os in
6299      aix[[4-9]]*)
6300	# All AIX code is PIC.
6301	if test "$host_cpu" = ia64; then
6302	  # AIX 5 now supports IA64 processor
6303	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6304	else
6305	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
6306	fi
6307	;;
6308      chorus*)
6309	case $cc_basename in
6310	cxch68*)
6311	  # Green Hills C++ Compiler
6312	  # _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"
6313	  ;;
6314	esac
6315	;;
6316      mingw* | cygwin* | os2* | pw32* | cegcc*)
6317	# This hack is so that the source file can tell whether it is being
6318	# built for inclusion in a dll (and should export symbols for example).
6319	m4_if([$1], [GCJ], [],
6320	  [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
6321	;;
6322      dgux*)
6323	case $cc_basename in
6324	  ec++*)
6325	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6326	    ;;
6327	  ghcx*)
6328	    # Green Hills C++ Compiler
6329	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6330	    ;;
6331	  *)
6332	    ;;
6333	esac
6334	;;
6335      freebsd* | dragonfly*)
6336	# FreeBSD uses GNU C++
6337	;;
6338      hpux9* | hpux10* | hpux11*)
6339	case $cc_basename in
6340	  CC*)
6341	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6342	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6343	    if test "$host_cpu" != ia64; then
6344	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6345	    fi
6346	    ;;
6347	  aCC*)
6348	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6349	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6350	    case $host_cpu in
6351	    hppa*64*|ia64*)
6352	      # +Z the default
6353	      ;;
6354	    *)
6355	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6356	      ;;
6357	    esac
6358	    ;;
6359	  *)
6360	    ;;
6361	esac
6362	;;
6363      interix*)
6364	# This is c89, which is MS Visual C++ (no shared libs)
6365	# Anyone wants to do a port?
6366	;;
6367      irix5* | irix6* | nonstopux*)
6368	case $cc_basename in
6369	  CC*)
6370	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6371	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6372	    # CC pic flag -KPIC is the default.
6373	    ;;
6374	  *)
6375	    ;;
6376	esac
6377	;;
6378      linux* | k*bsd*-gnu | kopensolaris*-gnu)
6379	case $cc_basename in
6380	  KCC*)
6381	    # KAI C++ Compiler
6382	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
6383	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6384	    ;;
6385	  ecpc* )
6386	    # old Intel C++ for x86_64 which still supported -KPIC.
6387	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6388	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6389	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6390	    ;;
6391	  icpc* )
6392	    # Intel C++, used to be incompatible with GCC.
6393	    # ICC 10 doesn't accept -KPIC any more.
6394	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6395	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6396	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6397	    ;;
6398	  pgCC* | pgcpp*)
6399	    # Portland Group C++ compiler
6400	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6401	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6402	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6403	    ;;
6404	  cxx*)
6405	    # Compaq C++
6406	    # Make sure the PIC flag is empty.  It appears that all Alpha
6407	    # Linux and Compaq Tru64 Unix objects are PIC.
6408	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
6409	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6410	    ;;
6411	  xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
6412	    # IBM XL 8.0, 9.0 on PPC and BlueGene
6413	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6414	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
6415	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
6416	    ;;
6417	  *)
6418	    case `$CC -V 2>&1 | sed 5q` in
6419	    *Sun\ C*)
6420	      # Sun C++ 5.9
6421	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6422	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6423	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6424	      ;;
6425	    esac
6426	    ;;
6427	esac
6428	;;
6429      lynxos*)
6430	;;
6431      m88k*)
6432	;;
6433      mvs*)
6434	case $cc_basename in
6435	  cxx*)
6436	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
6437	    ;;
6438	  *)
6439	    ;;
6440	esac
6441	;;
6442      netbsd*)
6443	;;
6444      *qnx* | *nto*)
6445        # QNX uses GNU C++, but need to define -shared option too, otherwise
6446        # it will coredump.
6447        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
6448        ;;
6449      osf3* | osf4* | osf5*)
6450	case $cc_basename in
6451	  KCC*)
6452	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
6453	    ;;
6454	  RCC*)
6455	    # Rational C++ 2.4.1
6456	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6457	    ;;
6458	  cxx*)
6459	    # Digital/Compaq C++
6460	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6461	    # Make sure the PIC flag is empty.  It appears that all Alpha
6462	    # Linux and Compaq Tru64 Unix objects are PIC.
6463	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
6464	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6465	    ;;
6466	  *)
6467	    ;;
6468	esac
6469	;;
6470      psos*)
6471	;;
6472      solaris*)
6473	case $cc_basename in
6474	  CC* | sunCC*)
6475	    # Sun C++ 4.2, 5.x and Centerline C++
6476	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6477	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6478	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6479	    ;;
6480	  gcx*)
6481	    # Green Hills C++ Compiler
6482	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6483	    ;;
6484	  *)
6485	    ;;
6486	esac
6487	;;
6488      sunos4*)
6489	case $cc_basename in
6490	  CC*)
6491	    # Sun C++ 4.x
6492	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6493	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6494	    ;;
6495	  lcc*)
6496	    # Lucid
6497	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6498	    ;;
6499	  *)
6500	    ;;
6501	esac
6502	;;
6503      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
6504	case $cc_basename in
6505	  CC*)
6506	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6507	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6508	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6509	    ;;
6510	esac
6511	;;
6512      tandem*)
6513	case $cc_basename in
6514	  NCC*)
6515	    # NonStop-UX NCC 3.20
6516	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6517	    ;;
6518	  *)
6519	    ;;
6520	esac
6521	;;
6522      vxworks*)
6523	;;
6524      *)
6525	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6526	;;
6527    esac
6528  fi
6529],
6530[
6531  if test "$GCC" = yes; then
6532    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6533    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6534
6535    case $host_os in
6536      aix*)
6537      # All AIX code is PIC.
6538      if test "$host_cpu" = ia64; then
6539	# AIX 5 now supports IA64 processor
6540	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6541      fi
6542      ;;
6543
6544    amigaos*)
6545      case $host_cpu in
6546      powerpc)
6547            # see comment about AmigaOS4 .so support
6548            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6549        ;;
6550      m68k)
6551            # FIXME: we need at least 68020 code to build shared libraries, but
6552            # adding the `-m68020' flag to GCC prevents building anything better,
6553            # like `-m68040'.
6554            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
6555        ;;
6556      esac
6557      ;;
6558
6559    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
6560      # PIC is the default for these OSes.
6561      ;;
6562
6563    mingw* | cygwin* | pw32* | os2* | cegcc*)
6564      # This hack is so that the source file can tell whether it is being
6565      # built for inclusion in a dll (and should export symbols for example).
6566      # Although the cygwin gcc ignores -fPIC, still need this for old-style
6567      # (--disable-auto-import) libraries
6568      m4_if([$1], [GCJ], [],
6569	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
6570      ;;
6571
6572    darwin* | rhapsody*)
6573      # PIC is the default on this platform
6574      # Common symbols not allowed in MH_DYLIB files
6575      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
6576      ;;
6577
6578    haiku*)
6579      # PIC is the default for Haiku.
6580      # The "-static" flag exists, but is broken.
6581      _LT_TAGVAR(lt_prog_compiler_static, $1)=
6582      ;;
6583
6584    hpux*)
6585      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
6586      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
6587      # sets the default TLS model and affects inlining.
6588      case $host_cpu in
6589      hppa*64*)
6590	# +Z the default
6591	;;
6592      *)
6593	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6594	;;
6595      esac
6596      ;;
6597
6598    interix[[3-9]]*)
6599      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
6600      # Instead, we relocate shared libraries at runtime.
6601      ;;
6602
6603    msdosdjgpp*)
6604      # Just because we use GCC doesn't mean we suddenly get shared libraries
6605      # on systems that don't support them.
6606      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6607      enable_shared=no
6608      ;;
6609
6610    *nto* | *qnx*)
6611      # QNX uses GNU C++, but need to define -shared option too, otherwise
6612      # it will coredump.
6613      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
6614      ;;
6615
6616    sysv4*MP*)
6617      if test -d /usr/nec; then
6618	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
6619      fi
6620      ;;
6621
6622    *)
6623      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6624      ;;
6625    esac
6626
6627    case $cc_basename in
6628    nvcc*) # Cuda Compiler Driver 2.2
6629      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
6630      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC'
6631      ;;
6632    esac
6633  else
6634    # PORTME Check for flag to pass linker flags through the system compiler.
6635    case $host_os in
6636    aix*)
6637      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6638      if test "$host_cpu" = ia64; then
6639	# AIX 5 now supports IA64 processor
6640	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6641      else
6642	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
6643      fi
6644      ;;
6645
6646    mingw* | cygwin* | pw32* | os2* | cegcc*)
6647      # This hack is so that the source file can tell whether it is being
6648      # built for inclusion in a dll (and should export symbols for example).
6649      m4_if([$1], [GCJ], [],
6650	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
6651      ;;
6652
6653    hpux9* | hpux10* | hpux11*)
6654      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6655      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6656      # not for PA HP-UX.
6657      case $host_cpu in
6658      hppa*64*|ia64*)
6659	# +Z the default
6660	;;
6661      *)
6662	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6663	;;
6664      esac
6665      # Is there a better lt_prog_compiler_static that works with the bundled CC?
6666      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6667      ;;
6668
6669    irix5* | irix6* | nonstopux*)
6670      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6671      # PIC (with -KPIC) is the default.
6672      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6673      ;;
6674
6675    linux* | k*bsd*-gnu | kopensolaris*-gnu)
6676      case $cc_basename in
6677      # old Intel for x86_64 which still supported -KPIC.
6678      ecc*)
6679	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6680	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6681	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6682        ;;
6683      # icc used to be incompatible with GCC.
6684      # ICC 10 doesn't accept -KPIC any more.
6685      icc* | ifort*)
6686	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6687	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6688	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6689        ;;
6690      # Lahey Fortran 8.1.
6691      lf95*)
6692	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6693	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
6694	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
6695	;;
6696      nagfor*)
6697	# NAG Fortran compiler
6698	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
6699	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6700	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6701	;;
6702      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
6703        # Portland Group compilers (*not* the Pentium gcc compiler,
6704	# which looks to be a dead project)
6705	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6706	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6707	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6708        ;;
6709      ccc*)
6710        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6711        # All Alpha code is PIC.
6712        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6713        ;;
6714      xl* | bgxl* | bgf* | mpixl*)
6715	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
6716	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6717	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
6718	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
6719	;;
6720      *)
6721	case `$CC -V 2>&1 | sed 5q` in
6722	*Sun\ F* | *Sun*Fortran*)
6723	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
6724	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6725	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6726	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
6727	  ;;
6728	*Sun\ C*)
6729	  # Sun C 5.9
6730	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6731	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6732	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6733	  ;;
6734	esac
6735	;;
6736      esac
6737      ;;
6738
6739    newsos6)
6740      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6741      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6742      ;;
6743
6744    *nto* | *qnx*)
6745      # QNX uses GNU C++, but need to define -shared option too, otherwise
6746      # it will coredump.
6747      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
6748      ;;
6749
6750    osf3* | osf4* | osf5*)
6751      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6752      # All OSF/1 code is PIC.
6753      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6754      ;;
6755
6756    rdos*)
6757      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6758      ;;
6759
6760    solaris*)
6761      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6762      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6763      case $cc_basename in
6764      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
6765	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
6766      *)
6767	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
6768      esac
6769      ;;
6770
6771    sunos4*)
6772      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6773      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6774      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6775      ;;
6776
6777    sysv4 | sysv4.2uw2* | sysv4.3*)
6778      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6779      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6780      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6781      ;;
6782
6783    sysv4*MP*)
6784      if test -d /usr/nec ;then
6785	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
6786	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6787      fi
6788      ;;
6789
6790    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
6791      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6792      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6793      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6794      ;;
6795
6796    unicos*)
6797      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6798      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6799      ;;
6800
6801    uts4*)
6802      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6803      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6804      ;;
6805
6806    *)
6807      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6808      ;;
6809    esac
6810  fi
6811])
6812case $host_os in
6813  # For platforms which do not support PIC, -DPIC is meaningless:
6814  *djgpp*)
6815    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
6816    ;;
6817  *)
6818    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
6819    ;;
6820esac
6821
6822AC_CACHE_CHECK([for $compiler option to produce PIC],
6823  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
6824  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
6825_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
6826
6827#
6828# Check to make sure the PIC flag actually works.
6829#
6830if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
6831  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
6832    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
6833    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
6834    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
6835     "" | " "*) ;;
6836     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
6837     esac],
6838    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
6839     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
6840fi
6841_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
6842	[Additional compiler flags for building library objects])
6843
6844_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
6845	[How to pass a linker flag through the compiler])
6846#
6847# Check to make sure the static flag actually works.
6848#
6849wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
6850_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
6851  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
6852  $lt_tmp_static_flag,
6853  [],
6854  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
6855_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
6856	[Compiler flag to prevent dynamic linking])
6857])# _LT_COMPILER_PIC
6858
6859
6860# _LT_LINKER_SHLIBS([TAGNAME])
6861# ----------------------------
6862# See if the linker supports building shared libraries.
6863m4_defun([_LT_LINKER_SHLIBS],
6864[AC_REQUIRE([LT_PATH_LD])dnl
6865AC_REQUIRE([LT_PATH_NM])dnl
6866m4_require([_LT_PATH_MANIFEST_TOOL])dnl
6867m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6868m4_require([_LT_DECL_EGREP])dnl
6869m4_require([_LT_DECL_SED])dnl
6870m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
6871m4_require([_LT_TAG_COMPILER])dnl
6872AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6873m4_if([$1], [CXX], [
6874  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6875  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
6876  case $host_os in
6877  aix[[4-9]]*)
6878    # If we're using GNU nm, then we don't want the "-C" option.
6879    # -C means demangle to AIX nm, but means don't demangle with GNU nm
6880    # Also, AIX nm treats weak defined symbols like other global defined
6881    # symbols, whereas GNU nm marks them as "W".
6882    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
6883      _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'
6884    else
6885      _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'
6886    fi
6887    ;;
6888  pw32*)
6889    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
6890    ;;
6891  cygwin* | mingw* | cegcc*)
6892    case $cc_basename in
6893    cl*) ;;
6894    *)
6895      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
6896      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
6897      ;;
6898    esac
6899    ;;
6900  *)
6901    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6902    ;;
6903  esac
6904], [
6905  runpath_var=
6906  _LT_TAGVAR(allow_undefined_flag, $1)=
6907  _LT_TAGVAR(always_export_symbols, $1)=no
6908  _LT_TAGVAR(archive_cmds, $1)=
6909  _LT_TAGVAR(archive_expsym_cmds, $1)=
6910  _LT_TAGVAR(compiler_needs_object, $1)=no
6911  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6912  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6913  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6914  _LT_TAGVAR(hardcode_automatic, $1)=no
6915  _LT_TAGVAR(hardcode_direct, $1)=no
6916  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6917  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6918  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6919  _LT_TAGVAR(hardcode_libdir_separator, $1)=
6920  _LT_TAGVAR(hardcode_minus_L, $1)=no
6921  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6922  _LT_TAGVAR(inherit_rpath, $1)=no
6923  _LT_TAGVAR(link_all_deplibs, $1)=unknown
6924  _LT_TAGVAR(module_cmds, $1)=
6925  _LT_TAGVAR(module_expsym_cmds, $1)=
6926  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
6927  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
6928  _LT_TAGVAR(thread_safe_flag_spec, $1)=
6929  _LT_TAGVAR(whole_archive_flag_spec, $1)=
6930  # include_expsyms should be a list of space-separated symbols to be *always*
6931  # included in the symbol list
6932  _LT_TAGVAR(include_expsyms, $1)=
6933  # exclude_expsyms can be an extended regexp of symbols to exclude
6934  # it will be wrapped by ` (' and `)$', so one must not match beginning or
6935  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
6936  # as well as any symbol that contains `d'.
6937  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
6938  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
6939  # platforms (ab)use it in PIC code, but their linkers get confused if
6940  # the symbol is explicitly referenced.  Since portable code cannot
6941  # rely on this symbol name, it's probably fine to never include it in
6942  # preloaded symbol tables.
6943  # Exclude shared library initialization/finalization symbols.
6944dnl Note also adjust exclude_expsyms for C++ above.
6945  extract_expsyms_cmds=
6946
6947  case $host_os in
6948  cygwin* | mingw* | pw32* | cegcc*)
6949    # FIXME: the MSVC++ port hasn't been tested in a loooong time
6950    # When not using gcc, we currently assume that we are using
6951    # Microsoft Visual C++.
6952    if test "$GCC" != yes; then
6953      with_gnu_ld=no
6954    fi
6955    ;;
6956  interix*)
6957    # we just hope/assume this is gcc and not c89 (= MSVC++)
6958    with_gnu_ld=yes
6959    ;;
6960  openbsd*)
6961    with_gnu_ld=no
6962    ;;
6963  esac
6964
6965  _LT_TAGVAR(ld_shlibs, $1)=yes
6966
6967  # On some targets, GNU ld is compatible enough with the native linker
6968  # that we're better off using the native interface for both.
6969  lt_use_gnu_ld_interface=no
6970  if test "$with_gnu_ld" = yes; then
6971    case $host_os in
6972      aix*)
6973	# The AIX port of GNU ld has always aspired to compatibility
6974	# with the native linker.  However, as the warning in the GNU ld
6975	# block says, versions before 2.19.5* couldn't really create working
6976	# shared libraries, regardless of the interface used.
6977	case `$LD -v 2>&1` in
6978	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
6979	  *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
6980	  *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
6981	  *)
6982	    lt_use_gnu_ld_interface=yes
6983	    ;;
6984	esac
6985	;;
6986      *)
6987	lt_use_gnu_ld_interface=yes
6988	;;
6989    esac
6990  fi
6991
6992  if test "$lt_use_gnu_ld_interface" = yes; then
6993    # If archive_cmds runs LD, not CC, wlarc should be empty
6994    wlarc='${wl}'
6995
6996    # Set some defaults for GNU ld with shared library support. These
6997    # are reset later if shared libraries are not supported. Putting them
6998    # here allows them to be overridden if necessary.
6999    runpath_var=LD_RUN_PATH
7000    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7001    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7002    # ancient GNU ld didn't support --whole-archive et. al.
7003    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
7004      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7005    else
7006      _LT_TAGVAR(whole_archive_flag_spec, $1)=
7007    fi
7008    supports_anon_versioning=no
7009    case `$LD -v 2>&1` in
7010      *GNU\ gold*) supports_anon_versioning=yes ;;
7011      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
7012      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
7013      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
7014      *\ 2.11.*) ;; # other 2.11 versions
7015      *) supports_anon_versioning=yes ;;
7016    esac
7017
7018    # See if GNU ld supports shared libraries.
7019    case $host_os in
7020    aix[[3-9]]*)
7021      # On AIX/PPC, the GNU linker is very broken
7022      if test "$host_cpu" != ia64; then
7023	_LT_TAGVAR(ld_shlibs, $1)=no
7024	cat <<_LT_EOF 1>&2
7025
7026*** Warning: the GNU linker, at least up to release 2.19, is reported
7027*** to be unable to reliably create shared libraries on AIX.
7028*** Therefore, libtool is disabling shared libraries support.  If you
7029*** really care for shared libraries, you may want to install binutils
7030*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
7031*** You will then need to restart the configuration process.
7032
7033_LT_EOF
7034      fi
7035      ;;
7036
7037    amigaos*)
7038      case $host_cpu in
7039      powerpc)
7040            # see comment about AmigaOS4 .so support
7041            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7042            _LT_TAGVAR(archive_expsym_cmds, $1)=''
7043        ;;
7044      m68k)
7045            _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)'
7046            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7047            _LT_TAGVAR(hardcode_minus_L, $1)=yes
7048        ;;
7049      esac
7050      ;;
7051
7052    beos*)
7053      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
7054	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7055	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
7056	# support --undefined.  This deserves some investigation.  FIXME
7057	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7058      else
7059	_LT_TAGVAR(ld_shlibs, $1)=no
7060      fi
7061      ;;
7062
7063    cygwin* | mingw* | pw32* | cegcc*)
7064      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
7065      # as there is no search path for DLLs.
7066      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7067      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
7068      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7069      _LT_TAGVAR(always_export_symbols, $1)=no
7070      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7071      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
7072      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
7073
7074      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
7075        _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'
7076	# If the export-symbols file already is a .def file (1st line
7077	# is EXPORTS), use it as is; otherwise, prepend...
7078	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7079	  cp $export_symbols $output_objdir/$soname.def;
7080	else
7081	  echo EXPORTS > $output_objdir/$soname.def;
7082	  cat $export_symbols >> $output_objdir/$soname.def;
7083	fi~
7084	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
7085      else
7086	_LT_TAGVAR(ld_shlibs, $1)=no
7087      fi
7088      ;;
7089
7090    haiku*)
7091      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7092      _LT_TAGVAR(link_all_deplibs, $1)=yes
7093      ;;
7094
7095    interix[[3-9]]*)
7096      _LT_TAGVAR(hardcode_direct, $1)=no
7097      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7098      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7099      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7100      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
7101      # Instead, shared libraries are loaded at an image base (0x10000000 by
7102      # default) and relocated if they conflict, which is a slow very memory
7103      # consuming and fragmenting process.  To avoid this, we pick a random,
7104      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
7105      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
7106      _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'
7107      _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'
7108      ;;
7109
7110    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
7111      tmp_diet=no
7112      if test "$host_os" = linux-dietlibc; then
7113	case $cc_basename in
7114	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
7115	esac
7116      fi
7117      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
7118	 && test "$tmp_diet" = no
7119      then
7120	tmp_addflag=' $pic_flag'
7121	tmp_sharedflag='-shared'
7122	case $cc_basename,$host_cpu in
7123        pgcc*)				# Portland Group C compiler
7124	  _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'
7125	  tmp_addflag=' $pic_flag'
7126	  ;;
7127	pgf77* | pgf90* | pgf95* | pgfortran*)
7128					# Portland Group f77 and f90 compilers
7129	  _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'
7130	  tmp_addflag=' $pic_flag -Mnomain' ;;
7131	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
7132	  tmp_addflag=' -i_dynamic' ;;
7133	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
7134	  tmp_addflag=' -i_dynamic -nofor_main' ;;
7135	ifc* | ifort*)			# Intel Fortran compiler
7136	  tmp_addflag=' -nofor_main' ;;
7137	lf95*)				# Lahey Fortran 8.1
7138	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
7139	  tmp_sharedflag='--shared' ;;
7140	xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
7141	  tmp_sharedflag='-qmkshrobj'
7142	  tmp_addflag= ;;
7143	nvcc*)	# Cuda Compiler Driver 2.2
7144	  _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'
7145	  _LT_TAGVAR(compiler_needs_object, $1)=yes
7146	  ;;
7147	esac
7148	case `$CC -V 2>&1 | sed 5q` in
7149	*Sun\ C*)			# Sun C 5.9
7150	  _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'
7151	  _LT_TAGVAR(compiler_needs_object, $1)=yes
7152	  tmp_sharedflag='-G' ;;
7153	*Sun\ F*)			# Sun Fortran 8.3
7154	  tmp_sharedflag='-G' ;;
7155	esac
7156	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7157
7158        if test "x$supports_anon_versioning" = xyes; then
7159          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7160	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7161	    echo "local: *; };" >> $output_objdir/$libname.ver~
7162	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
7163        fi
7164
7165	case $cc_basename in
7166	xlf* | bgf* | bgxlf* | mpixlf*)
7167	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
7168	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
7169	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7170	  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
7171	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
7172	  if test "x$supports_anon_versioning" = xyes; then
7173	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7174	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7175	      echo "local: *; };" >> $output_objdir/$libname.ver~
7176	      $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
7177	  fi
7178	  ;;
7179	esac
7180      else
7181        _LT_TAGVAR(ld_shlibs, $1)=no
7182      fi
7183      ;;
7184
7185    netbsd*)
7186      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7187	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
7188	wlarc=
7189      else
7190	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7191	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7192      fi
7193      ;;
7194
7195    solaris*)
7196      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
7197	_LT_TAGVAR(ld_shlibs, $1)=no
7198	cat <<_LT_EOF 1>&2
7199
7200*** Warning: The releases 2.8.* of the GNU linker cannot reliably
7201*** create shared libraries on Solaris systems.  Therefore, libtool
7202*** is disabling shared libraries support.  We urge you to upgrade GNU
7203*** binutils to release 2.9.1 or newer.  Another option is to modify
7204*** your PATH or compiler configuration so that the native linker is
7205*** used, and then restart.
7206
7207_LT_EOF
7208      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
7209	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7210	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7211      else
7212	_LT_TAGVAR(ld_shlibs, $1)=no
7213      fi
7214      ;;
7215
7216    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
7217      case `$LD -v 2>&1` in
7218        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
7219	_LT_TAGVAR(ld_shlibs, $1)=no
7220	cat <<_LT_EOF 1>&2
7221
7222*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
7223*** reliably create shared libraries on SCO systems.  Therefore, libtool
7224*** is disabling shared libraries support.  We urge you to upgrade GNU
7225*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
7226*** your PATH or compiler configuration so that the native linker is
7227*** used, and then restart.
7228
7229_LT_EOF
7230	;;
7231	*)
7232	  # For security reasons, it is highly recommended that you always
7233	  # use absolute paths for naming shared libraries, and exclude the
7234	  # DT_RUNPATH tag from executables and libraries.  But doing so
7235	  # requires that you compile everything twice, which is a pain.
7236	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
7237	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7238	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7239	    _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'
7240	  else
7241	    _LT_TAGVAR(ld_shlibs, $1)=no
7242	  fi
7243	;;
7244      esac
7245      ;;
7246
7247    sunos4*)
7248      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7249      wlarc=
7250      _LT_TAGVAR(hardcode_direct, $1)=yes
7251      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7252      ;;
7253
7254    *)
7255      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
7256	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7257	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7258      else
7259	_LT_TAGVAR(ld_shlibs, $1)=no
7260      fi
7261      ;;
7262    esac
7263
7264    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
7265      runpath_var=
7266      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7267      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7268      _LT_TAGVAR(whole_archive_flag_spec, $1)=
7269    fi
7270  else
7271    # PORTME fill in a description of your system's linker (not GNU ld)
7272    case $host_os in
7273    aix3*)
7274      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7275      _LT_TAGVAR(always_export_symbols, $1)=yes
7276      _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'
7277      # Note: this linker hardcodes the directories in LIBPATH if there
7278      # are no directories specified by -L.
7279      _LT_TAGVAR(hardcode_minus_L, $1)=yes
7280      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
7281	# Neither direct hardcoding nor static linking is supported with a
7282	# broken collect2.
7283	_LT_TAGVAR(hardcode_direct, $1)=unsupported
7284      fi
7285      ;;
7286
7287    aix[[4-9]]*)
7288      if test "$host_cpu" = ia64; then
7289	# On IA64, the linker does run time linking by default, so we don't
7290	# have to do anything special.
7291	aix_use_runtimelinking=no
7292	exp_sym_flag='-Bexport'
7293	no_entry_flag=""
7294      else
7295	# If we're using GNU nm, then we don't want the "-C" option.
7296	# -C means demangle to AIX nm, but means don't demangle with GNU nm
7297	# Also, AIX nm treats weak defined symbols like other global
7298	# defined symbols, whereas GNU nm marks them as "W".
7299	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
7300	  _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'
7301	else
7302	  _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'
7303	fi
7304	aix_use_runtimelinking=no
7305
7306	# Test if we are trying to use run time linking or normal
7307	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
7308	# need to do runtime linking.
7309	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
7310	  for ld_flag in $LDFLAGS; do
7311	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
7312	    aix_use_runtimelinking=yes
7313	    break
7314	  fi
7315	  done
7316	  ;;
7317	esac
7318
7319	exp_sym_flag='-bexport'
7320	no_entry_flag='-bnoentry'
7321      fi
7322
7323      # When large executables or shared objects are built, AIX ld can
7324      # have problems creating the table of contents.  If linking a library
7325      # or program results in "error TOC overflow" add -mminimal-toc to
7326      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
7327      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7328
7329      _LT_TAGVAR(archive_cmds, $1)=''
7330      _LT_TAGVAR(hardcode_direct, $1)=yes
7331      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7332      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7333      _LT_TAGVAR(link_all_deplibs, $1)=yes
7334      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
7335
7336      if test "$GCC" = yes; then
7337	case $host_os in aix4.[[012]]|aix4.[[012]].*)
7338	# We only want to do this on AIX 4.2 and lower, the check
7339	# below for broken collect2 doesn't work under 4.3+
7340	  collect2name=`${CC} -print-prog-name=collect2`
7341	  if test -f "$collect2name" &&
7342	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
7343	  then
7344	  # We have reworked collect2
7345	  :
7346	  else
7347	  # We have old collect2
7348	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
7349	  # It fails to find uninstalled libraries when the uninstalled
7350	  # path is not listed in the libpath.  Setting hardcode_minus_L
7351	  # to unsupported forces relinking
7352	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
7353	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7354	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
7355	  fi
7356	  ;;
7357	esac
7358	shared_flag='-shared'
7359	if test "$aix_use_runtimelinking" = yes; then
7360	  shared_flag="$shared_flag "'${wl}-G'
7361	fi
7362      else
7363	# not using gcc
7364	if test "$host_cpu" = ia64; then
7365	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
7366	# chokes on -Wl,-G. The following line is correct:
7367	  shared_flag='-G'
7368	else
7369	  if test "$aix_use_runtimelinking" = yes; then
7370	    shared_flag='${wl}-G'
7371	  else
7372	    shared_flag='${wl}-bM:SRE'
7373	  fi
7374	fi
7375      fi
7376
7377      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
7378      # It seems that -bexpall does not export symbols beginning with
7379      # underscore (_), so it is better to generate a list of symbols to export.
7380      _LT_TAGVAR(always_export_symbols, $1)=yes
7381      if test "$aix_use_runtimelinking" = yes; then
7382	# Warning - without using the other runtime loading flags (-brtl),
7383	# -berok will link without error, but may produce a broken library.
7384	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
7385        # Determine the default libpath from the value encoded in an
7386        # empty executable.
7387        _LT_SYS_MODULE_PATH_AIX([$1])
7388        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7389        _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"
7390      else
7391	if test "$host_cpu" = ia64; then
7392	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
7393	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
7394	  _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"
7395	else
7396	 # Determine the default libpath from the value encoded in an
7397	 # empty executable.
7398	 _LT_SYS_MODULE_PATH_AIX([$1])
7399	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7400	  # Warning - without using the other run time loading flags,
7401	  # -berok will link without error, but may produce a broken library.
7402	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
7403	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
7404	  if test "$with_gnu_ld" = yes; then
7405	    # We only use this code for GNU lds that support --whole-archive.
7406	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
7407	  else
7408	    # Exported symbols can be pulled into shared objects from archives
7409	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
7410	  fi
7411	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7412	  # This is similar to how AIX traditionally builds its shared libraries.
7413	  _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'
7414	fi
7415      fi
7416      ;;
7417
7418    amigaos*)
7419      case $host_cpu in
7420      powerpc)
7421            # see comment about AmigaOS4 .so support
7422            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7423            _LT_TAGVAR(archive_expsym_cmds, $1)=''
7424        ;;
7425      m68k)
7426            _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)'
7427            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7428            _LT_TAGVAR(hardcode_minus_L, $1)=yes
7429        ;;
7430      esac
7431      ;;
7432
7433    bsdi[[45]]*)
7434      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
7435      ;;
7436
7437    cygwin* | mingw* | pw32* | cegcc*)
7438      # When not using gcc, we currently assume that we are using
7439      # Microsoft Visual C++.
7440      # hardcode_libdir_flag_spec is actually meaningless, as there is
7441      # no search path for DLLs.
7442      case $cc_basename in
7443      cl*)
7444	# Native MSVC
7445	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
7446	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7447	_LT_TAGVAR(always_export_symbols, $1)=yes
7448	_LT_TAGVAR(file_list_spec, $1)='@'
7449	# Tell ltmain to make .lib files, not .a files.
7450	libext=lib
7451	# Tell ltmain to make .dll files, not .so files.
7452	shrext_cmds=".dll"
7453	# FIXME: Setting linknames here is a bad hack.
7454	_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
7455	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7456	    sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
7457	  else
7458	    sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
7459	  fi~
7460	  $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
7461	  linknames='
7462	# The linker will not automatically build a static lib if we build a DLL.
7463	# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
7464	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7465	_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'
7466	# Don't use ranlib
7467	_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
7468	_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
7469	  lt_tool_outputfile="@TOOL_OUTPUT@"~
7470	  case $lt_outputfile in
7471	    *.exe|*.EXE) ;;
7472	    *)
7473	      lt_outputfile="$lt_outputfile.exe"
7474	      lt_tool_outputfile="$lt_tool_outputfile.exe"
7475	      ;;
7476	  esac~
7477	  if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
7478	    $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
7479	    $RM "$lt_outputfile.manifest";
7480	  fi'
7481	;;
7482      *)
7483	# Assume MSVC wrapper
7484	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
7485	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7486	# Tell ltmain to make .lib files, not .a files.
7487	libext=lib
7488	# Tell ltmain to make .dll files, not .so files.
7489	shrext_cmds=".dll"
7490	# FIXME: Setting linknames here is a bad hack.
7491	_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
7492	# The linker will automatically build a .lib file if we build a DLL.
7493	_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
7494	# FIXME: Should let the user specify the lib program.
7495	_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
7496	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7497	;;
7498      esac
7499      ;;
7500
7501    darwin* | rhapsody*)
7502      _LT_DARWIN_LINKER_FEATURES($1)
7503      ;;
7504
7505    dgux*)
7506      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7507      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7508      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7509      ;;
7510
7511    freebsd1*)
7512      _LT_TAGVAR(ld_shlibs, $1)=no
7513      ;;
7514
7515    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
7516    # support.  Future versions do this automatically, but an explicit c++rt0.o
7517    # does not break anything, and helps significantly (at the cost of a little
7518    # extra space).
7519    freebsd2.2*)
7520      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
7521      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7522      _LT_TAGVAR(hardcode_direct, $1)=yes
7523      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7524      ;;
7525
7526    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
7527    freebsd2*)
7528      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7529      _LT_TAGVAR(hardcode_direct, $1)=yes
7530      _LT_TAGVAR(hardcode_minus_L, $1)=yes
7531      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7532      ;;
7533
7534    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
7535    freebsd* | dragonfly*)
7536      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7537      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7538      _LT_TAGVAR(hardcode_direct, $1)=yes
7539      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7540      ;;
7541
7542    hpux9*)
7543      if test "$GCC" = yes; then
7544	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
7545      else
7546	_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'
7547      fi
7548      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7549      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7550      _LT_TAGVAR(hardcode_direct, $1)=yes
7551
7552      # hardcode_minus_L: Not really in the search PATH,
7553      # but as the default location of the library.
7554      _LT_TAGVAR(hardcode_minus_L, $1)=yes
7555      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7556      ;;
7557
7558    hpux10*)
7559      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
7560	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7561      else
7562	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
7563      fi
7564      if test "$with_gnu_ld" = no; then
7565	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7566	_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
7567	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
7568	_LT_TAGVAR(hardcode_direct, $1)=yes
7569	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7570	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7571	# hardcode_minus_L: Not really in the search PATH,
7572	# but as the default location of the library.
7573	_LT_TAGVAR(hardcode_minus_L, $1)=yes
7574      fi
7575      ;;
7576
7577    hpux11*)
7578      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
7579	case $host_cpu in
7580	hppa*64*)
7581	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7582	  ;;
7583	ia64*)
7584	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
7585	  ;;
7586	*)
7587	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7588	  ;;
7589	esac
7590      else
7591	case $host_cpu in
7592	hppa*64*)
7593	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7594	  ;;
7595	ia64*)
7596	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
7597	  ;;
7598	*)
7599	m4_if($1, [], [
7600	  # Older versions of the 11.00 compiler do not understand -b yet
7601	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
7602	  _LT_LINKER_OPTION([if $CC understands -b],
7603	    _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
7604	    [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
7605	    [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
7606	  [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
7607	  ;;
7608	esac
7609      fi
7610      if test "$with_gnu_ld" = no; then
7611	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7612	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
7613
7614	case $host_cpu in
7615	hppa*64*|ia64*)
7616	  _LT_TAGVAR(hardcode_direct, $1)=no
7617	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7618	  ;;
7619	*)
7620	  _LT_TAGVAR(hardcode_direct, $1)=yes
7621	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7622	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7623
7624	  # hardcode_minus_L: Not really in the search PATH,
7625	  # but as the default location of the library.
7626	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
7627	  ;;
7628	esac
7629      fi
7630      ;;
7631
7632    irix5* | irix6* | nonstopux*)
7633      if test "$GCC" = yes; then
7634	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7635	# Try to use the -exported_symbol ld option, if it does not
7636	# work, assume that -exports_file does not work either and
7637	# implicitly export all symbols.
7638	# This should be the same for all languages, so no per-tag cache variable.
7639	AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
7640	  [lt_cv_irix_exported_symbol],
7641	  [save_LDFLAGS="$LDFLAGS"
7642	   LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
7643	   AC_LINK_IFELSE(
7644	     [AC_LANG_SOURCE(
7645	        [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
7646			      [C++], [[int foo (void) { return 0; }]],
7647			      [Fortran 77], [[
7648      subroutine foo
7649      end]],
7650			      [Fortran], [[
7651      subroutine foo
7652      end]])])],
7653	      [lt_cv_irix_exported_symbol=yes],
7654	      [lt_cv_irix_exported_symbol=no])
7655           LDFLAGS="$save_LDFLAGS"])
7656	if test "$lt_cv_irix_exported_symbol" = yes; then
7657          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
7658	fi
7659      else
7660	_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'
7661	_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'
7662      fi
7663      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
7664      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7665      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7666      _LT_TAGVAR(inherit_rpath, $1)=yes
7667      _LT_TAGVAR(link_all_deplibs, $1)=yes
7668      ;;
7669
7670    netbsd*)
7671      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7672	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
7673      else
7674	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
7675      fi
7676      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7677      _LT_TAGVAR(hardcode_direct, $1)=yes
7678      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7679      ;;
7680
7681    newsos6)
7682      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7683      _LT_TAGVAR(hardcode_direct, $1)=yes
7684      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7685      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7686      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7687      ;;
7688
7689    *nto* | *qnx*)
7690      ;;
7691
7692    openbsd*)
7693      if test -f /usr/libexec/ld.so; then
7694	_LT_TAGVAR(hardcode_direct, $1)=yes
7695	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7696	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7697	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7698	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7699	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
7700	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7701	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7702	else
7703	  case $host_os in
7704	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
7705	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7706	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7707	     ;;
7708	   *)
7709	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7710	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7711	     ;;
7712	  esac
7713	fi
7714      else
7715	_LT_TAGVAR(ld_shlibs, $1)=no
7716      fi
7717      ;;
7718
7719    os2*)
7720      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7721      _LT_TAGVAR(hardcode_minus_L, $1)=yes
7722      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7723      _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'
7724      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
7725      ;;
7726
7727    osf3*)
7728      if test "$GCC" = yes; then
7729	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7730	_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'
7731      else
7732	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7733	_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'
7734      fi
7735      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
7736      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7737      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7738      ;;
7739
7740    osf4* | osf5*)	# as osf3* with the addition of -msym flag
7741      if test "$GCC" = yes; then
7742	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7743	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7744	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7745      else
7746	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7747	_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'
7748	_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~
7749	$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'
7750
7751	# Both c and cxx compiler support -rpath directly
7752	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7753      fi
7754      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
7755      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7756      ;;
7757
7758    solaris*)
7759      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
7760      if test "$GCC" = yes; then
7761	wlarc='${wl}'
7762	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7763	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7764	  $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
7765      else
7766	case `$CC -V 2>&1` in
7767	*"Compilers 5.0"*)
7768	  wlarc=''
7769	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
7770	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7771	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
7772	  ;;
7773	*)
7774	  wlarc='${wl}'
7775	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
7776	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7777	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
7778	  ;;
7779	esac
7780      fi
7781      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7782      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7783      case $host_os in
7784      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7785      *)
7786	# The compiler driver will combine and reorder linker options,
7787	# but understands `-z linker_flag'.  GCC discards it without `$wl',
7788	# but is careful enough not to reorder.
7789	# Supported since Solaris 2.6 (maybe 2.5.1?)
7790	if test "$GCC" = yes; then
7791	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
7792	else
7793	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7794	fi
7795	;;
7796      esac
7797      _LT_TAGVAR(link_all_deplibs, $1)=yes
7798      ;;
7799
7800    sunos4*)
7801      if test "x$host_vendor" = xsequent; then
7802	# Use $CC to link under sequent, because it throws in some extra .o
7803	# files that make .init and .fini sections work.
7804	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
7805      else
7806	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
7807      fi
7808      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7809      _LT_TAGVAR(hardcode_direct, $1)=yes
7810      _LT_TAGVAR(hardcode_minus_L, $1)=yes
7811      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7812      ;;
7813
7814    sysv4)
7815      case $host_vendor in
7816	sni)
7817	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7818	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
7819	;;
7820	siemens)
7821	  ## LD is ld it makes a PLAMLIB
7822	  ## CC just makes a GrossModule.
7823	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
7824	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
7825	  _LT_TAGVAR(hardcode_direct, $1)=no
7826        ;;
7827	motorola)
7828	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7829	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
7830	;;
7831      esac
7832      runpath_var='LD_RUN_PATH'
7833      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7834      ;;
7835
7836    sysv4.3*)
7837      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7838      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7839      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
7840      ;;
7841
7842    sysv4*MP*)
7843      if test -d /usr/nec; then
7844	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7845	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7846	runpath_var=LD_RUN_PATH
7847	hardcode_runpath_var=yes
7848	_LT_TAGVAR(ld_shlibs, $1)=yes
7849      fi
7850      ;;
7851
7852    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7853      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7854      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7855      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7856      runpath_var='LD_RUN_PATH'
7857
7858      if test "$GCC" = yes; then
7859	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7860	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7861      else
7862	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7863	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7864      fi
7865      ;;
7866
7867    sysv5* | sco3.2v5* | sco5v6*)
7868      # Note: We can NOT use -z defs as we might desire, because we do not
7869      # link with -lc, and that would cause any symbols used from libc to
7870      # always be unresolved, which means just about no library would
7871      # ever link correctly.  If we're not using GNU ld we use -z text
7872      # though, which does catch some bad symbols but isn't as heavy-handed
7873      # as -z defs.
7874      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7875      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
7876      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7877      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7878      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
7879      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7880      _LT_TAGVAR(link_all_deplibs, $1)=yes
7881      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
7882      runpath_var='LD_RUN_PATH'
7883
7884      if test "$GCC" = yes; then
7885	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7886	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7887      else
7888	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7889	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7890      fi
7891      ;;
7892
7893    uts4*)
7894      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7895      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7896      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7897      ;;
7898
7899    *)
7900      _LT_TAGVAR(ld_shlibs, $1)=no
7901      ;;
7902    esac
7903
7904    if test x$host_vendor = xsni; then
7905      case $host in
7906      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
7907	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
7908	;;
7909      esac
7910    fi
7911  fi
7912])
7913AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7914test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7915
7916_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
7917
7918_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
7919_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
7920_LT_DECL([], [extract_expsyms_cmds], [2],
7921    [The commands to extract the exported symbol list from a shared archive])
7922
7923#
7924# Do we need to explicitly link libc?
7925#
7926case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
7927x|xyes)
7928  # Assume -lc should be added
7929  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7930
7931  if test "$enable_shared" = yes && test "$GCC" = yes; then
7932    case $_LT_TAGVAR(archive_cmds, $1) in
7933    *'~'*)
7934      # FIXME: we may have to deal with multi-command sequences.
7935      ;;
7936    '$CC '*)
7937      # Test whether the compiler implicitly links with -lc since on some
7938      # systems, -lgcc has to come before -lc. If gcc already passes -lc
7939      # to ld, don't add -lc before -lgcc.
7940      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
7941	[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
7942	[$RM conftest*
7943	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
7944
7945	if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
7946	  soname=conftest
7947	  lib=conftest
7948	  libobjs=conftest.$ac_objext
7949	  deplibs=
7950	  wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
7951	  pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
7952	  compiler_flags=-v
7953	  linker_flags=-v
7954	  verstring=
7955	  output_objdir=.
7956	  libname=conftest
7957	  lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
7958	  _LT_TAGVAR(allow_undefined_flag, $1)=
7959	  if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
7960	  then
7961	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7962	  else
7963	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7964	  fi
7965	  _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
7966	else
7967	  cat conftest.err 1>&5
7968	fi
7969	$RM conftest*
7970	])
7971      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
7972      ;;
7973    esac
7974  fi
7975  ;;
7976esac
7977
7978_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
7979    [Whether or not to add -lc for building shared libraries])
7980_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
7981    [enable_shared_with_static_runtimes], [0],
7982    [Whether or not to disallow shared libs when runtime libs are static])
7983_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
7984    [Compiler flag to allow reflexive dlopens])
7985_LT_TAGDECL([], [whole_archive_flag_spec], [1],
7986    [Compiler flag to generate shared objects directly from archives])
7987_LT_TAGDECL([], [compiler_needs_object], [1],
7988    [Whether the compiler copes with passing no objects directly])
7989_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
7990    [Create an old-style archive from a shared archive])
7991_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
7992    [Create a temporary old-style archive to link instead of a shared archive])
7993_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
7994_LT_TAGDECL([], [archive_expsym_cmds], [2])
7995_LT_TAGDECL([], [module_cmds], [2],
7996    [Commands used to build a loadable module if different from building
7997    a shared archive.])
7998_LT_TAGDECL([], [module_expsym_cmds], [2])
7999_LT_TAGDECL([], [with_gnu_ld], [1],
8000    [Whether we are building with GNU ld or not])
8001_LT_TAGDECL([], [allow_undefined_flag], [1],
8002    [Flag that allows shared libraries with undefined symbols to be built])
8003_LT_TAGDECL([], [no_undefined_flag], [1],
8004    [Flag that enforces no undefined symbols])
8005_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
8006    [Flag to hardcode $libdir into a binary during linking.
8007    This must work even if $libdir does not exist])
8008_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
8009    [[If ld is used when linking, flag to hardcode $libdir into a binary
8010    during linking.  This must work even if $libdir does not exist]])
8011_LT_TAGDECL([], [hardcode_libdir_separator], [1],
8012    [Whether we need a single "-rpath" flag with a separated argument])
8013_LT_TAGDECL([], [hardcode_direct], [0],
8014    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
8015    DIR into the resulting binary])
8016_LT_TAGDECL([], [hardcode_direct_absolute], [0],
8017    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
8018    DIR into the resulting binary and the resulting library dependency is
8019    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
8020    library is relocated])
8021_LT_TAGDECL([], [hardcode_minus_L], [0],
8022    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
8023    into the resulting binary])
8024_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
8025    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
8026    into the resulting binary])
8027_LT_TAGDECL([], [hardcode_automatic], [0],
8028    [Set to "yes" if building a shared library automatically hardcodes DIR
8029    into the library and all subsequent libraries and executables linked
8030    against it])
8031_LT_TAGDECL([], [inherit_rpath], [0],
8032    [Set to yes if linker adds runtime paths of dependent libraries
8033    to runtime path list])
8034_LT_TAGDECL([], [link_all_deplibs], [0],
8035    [Whether libtool must link a program against all its dependency libraries])
8036_LT_TAGDECL([], [always_export_symbols], [0],
8037    [Set to "yes" if exported symbols are required])
8038_LT_TAGDECL([], [export_symbols_cmds], [2],
8039    [The commands to list exported symbols])
8040_LT_TAGDECL([], [exclude_expsyms], [1],
8041    [Symbols that should not be listed in the preloaded symbols])
8042_LT_TAGDECL([], [include_expsyms], [1],
8043    [Symbols that must always be exported])
8044_LT_TAGDECL([], [prelink_cmds], [2],
8045    [Commands necessary for linking programs (against libraries) with templates])
8046_LT_TAGDECL([], [postlink_cmds], [2],
8047    [Commands necessary for finishing linking programs])
8048_LT_TAGDECL([], [file_list_spec], [1],
8049    [Specify filename containing input files])
8050dnl FIXME: Not yet implemented
8051dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
8052dnl    [Compiler flag to generate thread safe objects])
8053])# _LT_LINKER_SHLIBS
8054
8055
8056# _LT_LANG_C_CONFIG([TAG])
8057# ------------------------
8058# Ensure that the configuration variables for a C compiler are suitably
8059# defined.  These variables are subsequently used by _LT_CONFIG to write
8060# the compiler configuration to `libtool'.
8061m4_defun([_LT_LANG_C_CONFIG],
8062[m4_require([_LT_DECL_EGREP])dnl
8063lt_save_CC="$CC"
8064AC_LANG_PUSH(C)
8065
8066# Source file extension for C test sources.
8067ac_ext=c
8068
8069# Object file extension for compiled C test sources.
8070objext=o
8071_LT_TAGVAR(objext, $1)=$objext
8072
8073# Code to be used in simple compile tests
8074lt_simple_compile_test_code="int some_variable = 0;"
8075
8076# Code to be used in simple link tests
8077lt_simple_link_test_code='int main(){return(0);}'
8078
8079_LT_TAG_COMPILER
8080# Save the default compiler, since it gets overwritten when the other
8081# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
8082compiler_DEFAULT=$CC
8083
8084# save warnings/boilerplate of simple test code
8085_LT_COMPILER_BOILERPLATE
8086_LT_LINKER_BOILERPLATE
8087
8088if test -n "$compiler"; then
8089  _LT_COMPILER_NO_RTTI($1)
8090  _LT_COMPILER_PIC($1)
8091  _LT_COMPILER_C_O($1)
8092  _LT_COMPILER_FILE_LOCKS($1)
8093  _LT_LINKER_SHLIBS($1)
8094  _LT_SYS_DYNAMIC_LINKER($1)
8095  _LT_LINKER_HARDCODE_LIBPATH($1)
8096  LT_SYS_DLOPEN_SELF
8097  _LT_CMD_STRIPLIB
8098
8099  # Report which library types will actually be built
8100  AC_MSG_CHECKING([if libtool supports shared libraries])
8101  AC_MSG_RESULT([$can_build_shared])
8102
8103  AC_MSG_CHECKING([whether to build shared libraries])
8104  test "$can_build_shared" = "no" && enable_shared=no
8105
8106  # On AIX, shared libraries and static libraries use the same namespace, and
8107  # are all built from PIC.
8108  case $host_os in
8109  aix3*)
8110    test "$enable_shared" = yes && enable_static=no
8111    if test -n "$RANLIB"; then
8112      archive_cmds="$archive_cmds~\$RANLIB \$lib"
8113      postinstall_cmds='$RANLIB $lib'
8114    fi
8115    ;;
8116
8117  aix[[4-9]]*)
8118    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8119      test "$enable_shared" = yes && enable_static=no
8120    fi
8121    ;;
8122  esac
8123  AC_MSG_RESULT([$enable_shared])
8124
8125  AC_MSG_CHECKING([whether to build static libraries])
8126  # Make sure either enable_shared or enable_static is yes.
8127  test "$enable_shared" = yes || enable_static=yes
8128  AC_MSG_RESULT([$enable_static])
8129
8130  _LT_CONFIG($1)
8131fi
8132AC_LANG_POP
8133CC="$lt_save_CC"
8134])# _LT_LANG_C_CONFIG
8135
8136
8137# _LT_LANG_CXX_CONFIG([TAG])
8138# --------------------------
8139# Ensure that the configuration variables for a C++ compiler are suitably
8140# defined.  These variables are subsequently used by _LT_CONFIG to write
8141# the compiler configuration to `libtool'.
8142m4_defun([_LT_LANG_CXX_CONFIG],
8143[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
8144m4_require([_LT_DECL_EGREP])dnl
8145m4_require([_LT_PATH_MANIFEST_TOOL])dnl
8146if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
8147    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
8148    (test "X$CXX" != "Xg++"))) ; then
8149  AC_PROG_CXXCPP
8150else
8151  _lt_caught_CXX_error=yes
8152fi
8153
8154AC_LANG_PUSH(C++)
8155_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8156_LT_TAGVAR(allow_undefined_flag, $1)=
8157_LT_TAGVAR(always_export_symbols, $1)=no
8158_LT_TAGVAR(archive_expsym_cmds, $1)=
8159_LT_TAGVAR(compiler_needs_object, $1)=no
8160_LT_TAGVAR(export_dynamic_flag_spec, $1)=
8161_LT_TAGVAR(hardcode_direct, $1)=no
8162_LT_TAGVAR(hardcode_direct_absolute, $1)=no
8163_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8164_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
8165_LT_TAGVAR(hardcode_libdir_separator, $1)=
8166_LT_TAGVAR(hardcode_minus_L, $1)=no
8167_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
8168_LT_TAGVAR(hardcode_automatic, $1)=no
8169_LT_TAGVAR(inherit_rpath, $1)=no
8170_LT_TAGVAR(module_cmds, $1)=
8171_LT_TAGVAR(module_expsym_cmds, $1)=
8172_LT_TAGVAR(link_all_deplibs, $1)=unknown
8173_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8174_LT_TAGVAR(reload_flag, $1)=$reload_flag
8175_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8176_LT_TAGVAR(no_undefined_flag, $1)=
8177_LT_TAGVAR(whole_archive_flag_spec, $1)=
8178_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8179
8180# Source file extension for C++ test sources.
8181ac_ext=cpp
8182
8183# Object file extension for compiled C++ test sources.
8184objext=o
8185_LT_TAGVAR(objext, $1)=$objext
8186
8187# No sense in running all these tests if we already determined that
8188# the CXX compiler isn't working.  Some variables (like enable_shared)
8189# are currently assumed to apply to all compilers on this platform,
8190# and will be corrupted by setting them based on a non-working compiler.
8191if test "$_lt_caught_CXX_error" != yes; then
8192  # Code to be used in simple compile tests
8193  lt_simple_compile_test_code="int some_variable = 0;"
8194
8195  # Code to be used in simple link tests
8196  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
8197
8198  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8199  _LT_TAG_COMPILER
8200
8201  # save warnings/boilerplate of simple test code
8202  _LT_COMPILER_BOILERPLATE
8203  _LT_LINKER_BOILERPLATE
8204
8205  # Allow CC to be a program name with arguments.
8206  lt_save_CC=$CC
8207  lt_save_CFLAGS=$CFLAGS
8208  lt_save_LD=$LD
8209  lt_save_GCC=$GCC
8210  GCC=$GXX
8211  lt_save_with_gnu_ld=$with_gnu_ld
8212  lt_save_path_LD=$lt_cv_path_LD
8213  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
8214    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
8215  else
8216    $as_unset lt_cv_prog_gnu_ld
8217  fi
8218  if test -n "${lt_cv_path_LDCXX+set}"; then
8219    lt_cv_path_LD=$lt_cv_path_LDCXX
8220  else
8221    $as_unset lt_cv_path_LD
8222  fi
8223  test -z "${LDCXX+set}" || LD=$LDCXX
8224  CC=${CXX-"c++"}
8225  CFLAGS=$CXXFLAGS
8226  compiler=$CC
8227  _LT_TAGVAR(compiler, $1)=$CC
8228  _LT_CC_BASENAME([$compiler])
8229
8230  if test -n "$compiler"; then
8231    # We don't want -fno-exception when compiling C++ code, so set the
8232    # no_builtin_flag separately
8233    if test "$GXX" = yes; then
8234      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
8235    else
8236      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
8237    fi
8238
8239    if test "$GXX" = yes; then
8240      # Set up default GNU C++ configuration
8241
8242      LT_PATH_LD
8243
8244      # Check if GNU C++ uses GNU ld as the underlying linker, since the
8245      # archiving commands below assume that GNU ld is being used.
8246      if test "$with_gnu_ld" = yes; then
8247        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
8248        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8249
8250        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8251        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8252
8253        # If archive_cmds runs LD, not CC, wlarc should be empty
8254        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
8255        #     investigate it a little bit more. (MM)
8256        wlarc='${wl}'
8257
8258        # ancient GNU ld didn't support --whole-archive et. al.
8259        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
8260	  $GREP 'no-whole-archive' > /dev/null; then
8261          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
8262        else
8263          _LT_TAGVAR(whole_archive_flag_spec, $1)=
8264        fi
8265      else
8266        with_gnu_ld=no
8267        wlarc=
8268
8269        # A generic and very simple default shared library creation
8270        # command for GNU C++ for the case where it uses the native
8271        # linker, instead of GNU ld.  If possible, this setting should
8272        # overridden to take advantage of the native linker features on
8273        # the platform it is being used on.
8274        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
8275      fi
8276
8277      # Commands to make compiler produce verbose output that lists
8278      # what "hidden" libraries, object files and flags are used when
8279      # linking a shared library.
8280      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
8281
8282    else
8283      GXX=no
8284      with_gnu_ld=no
8285      wlarc=
8286    fi
8287
8288    # PORTME: fill in a description of your system's C++ link characteristics
8289    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
8290    _LT_TAGVAR(ld_shlibs, $1)=yes
8291    case $host_os in
8292      aix3*)
8293        # FIXME: insert proper C++ library support
8294        _LT_TAGVAR(ld_shlibs, $1)=no
8295        ;;
8296      aix[[4-9]]*)
8297        if test "$host_cpu" = ia64; then
8298          # On IA64, the linker does run time linking by default, so we don't
8299          # have to do anything special.
8300          aix_use_runtimelinking=no
8301          exp_sym_flag='-Bexport'
8302          no_entry_flag=""
8303        else
8304          aix_use_runtimelinking=no
8305
8306          # Test if we are trying to use run time linking or normal
8307          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
8308          # need to do runtime linking.
8309          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
8310	    for ld_flag in $LDFLAGS; do
8311	      case $ld_flag in
8312	      *-brtl*)
8313	        aix_use_runtimelinking=yes
8314	        break
8315	        ;;
8316	      esac
8317	    done
8318	    ;;
8319          esac
8320
8321          exp_sym_flag='-bexport'
8322          no_entry_flag='-bnoentry'
8323        fi
8324
8325        # When large executables or shared objects are built, AIX ld can
8326        # have problems creating the table of contents.  If linking a library
8327        # or program results in "error TOC overflow" add -mminimal-toc to
8328        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
8329        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
8330
8331        _LT_TAGVAR(archive_cmds, $1)=''
8332        _LT_TAGVAR(hardcode_direct, $1)=yes
8333        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
8334        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
8335        _LT_TAGVAR(link_all_deplibs, $1)=yes
8336        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
8337
8338        if test "$GXX" = yes; then
8339          case $host_os in aix4.[[012]]|aix4.[[012]].*)
8340          # We only want to do this on AIX 4.2 and lower, the check
8341          # below for broken collect2 doesn't work under 4.3+
8342	  collect2name=`${CC} -print-prog-name=collect2`
8343	  if test -f "$collect2name" &&
8344	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
8345	  then
8346	    # We have reworked collect2
8347	    :
8348	  else
8349	    # We have old collect2
8350	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
8351	    # It fails to find uninstalled libraries when the uninstalled
8352	    # path is not listed in the libpath.  Setting hardcode_minus_L
8353	    # to unsupported forces relinking
8354	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
8355	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8356	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
8357	  fi
8358          esac
8359          shared_flag='-shared'
8360	  if test "$aix_use_runtimelinking" = yes; then
8361	    shared_flag="$shared_flag "'${wl}-G'
8362	  fi
8363        else
8364          # not using gcc
8365          if test "$host_cpu" = ia64; then
8366	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
8367	  # chokes on -Wl,-G. The following line is correct:
8368	  shared_flag='-G'
8369          else
8370	    if test "$aix_use_runtimelinking" = yes; then
8371	      shared_flag='${wl}-G'
8372	    else
8373	      shared_flag='${wl}-bM:SRE'
8374	    fi
8375          fi
8376        fi
8377
8378        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
8379        # It seems that -bexpall does not export symbols beginning with
8380        # underscore (_), so it is better to generate a list of symbols to
8381	# export.
8382        _LT_TAGVAR(always_export_symbols, $1)=yes
8383        if test "$aix_use_runtimelinking" = yes; then
8384          # Warning - without using the other runtime loading flags (-brtl),
8385          # -berok will link without error, but may produce a broken library.
8386          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
8387          # Determine the default libpath from the value encoded in an empty
8388          # executable.
8389          _LT_SYS_MODULE_PATH_AIX([$1])
8390          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
8391
8392          _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"
8393        else
8394          if test "$host_cpu" = ia64; then
8395	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
8396	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
8397	    _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"
8398          else
8399	    # Determine the default libpath from the value encoded in an
8400	    # empty executable.
8401	    _LT_SYS_MODULE_PATH_AIX([$1])
8402	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
8403	    # Warning - without using the other run time loading flags,
8404	    # -berok will link without error, but may produce a broken library.
8405	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
8406	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
8407	    if test "$with_gnu_ld" = yes; then
8408	      # We only use this code for GNU lds that support --whole-archive.
8409	      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
8410	    else
8411	      # Exported symbols can be pulled into shared objects from archives
8412	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
8413	    fi
8414	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
8415	    # This is similar to how AIX traditionally builds its shared
8416	    # libraries.
8417	    _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'
8418          fi
8419        fi
8420        ;;
8421
8422      beos*)
8423	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
8424	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
8425	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
8426	  # support --undefined.  This deserves some investigation.  FIXME
8427	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8428	else
8429	  _LT_TAGVAR(ld_shlibs, $1)=no
8430	fi
8431	;;
8432
8433      chorus*)
8434        case $cc_basename in
8435          *)
8436	  # FIXME: insert proper C++ library support
8437	  _LT_TAGVAR(ld_shlibs, $1)=no
8438	  ;;
8439        esac
8440        ;;
8441
8442      cygwin* | mingw* | pw32* | cegcc*)
8443	case $GXX,$cc_basename in
8444	,cl* | no,cl*)
8445	  # Native MSVC
8446	  # hardcode_libdir_flag_spec is actually meaningless, as there is
8447	  # no search path for DLLs.
8448	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
8449	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
8450	  _LT_TAGVAR(always_export_symbols, $1)=yes
8451	  _LT_TAGVAR(file_list_spec, $1)='@'
8452	  # Tell ltmain to make .lib files, not .a files.
8453	  libext=lib
8454	  # Tell ltmain to make .dll files, not .so files.
8455	  shrext_cmds=".dll"
8456	  # FIXME: Setting linknames here is a bad hack.
8457	  _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
8458	  _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
8459	      $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
8460	    else
8461	      $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
8462	    fi~
8463	    $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
8464	    linknames='
8465	  # The linker will not automatically build a static lib if we build a DLL.
8466	  # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
8467	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
8468	  # Don't use ranlib
8469	  _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
8470	  _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
8471	    lt_tool_outputfile="@TOOL_OUTPUT@"~
8472	    case $lt_outputfile in
8473	      *.exe|*.EXE) ;;
8474	      *)
8475		lt_outputfile="$lt_outputfile.exe"
8476		lt_tool_outputfile="$lt_tool_outputfile.exe"
8477		;;
8478	    esac~
8479	    func_to_tool_file "$lt_outputfile"~
8480	    if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
8481	      $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
8482	      $RM "$lt_outputfile.manifest";
8483	    fi'
8484	  ;;
8485	*)
8486	  # g++
8487	  # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
8488	  # as there is no search path for DLLs.
8489	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8490	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
8491	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
8492	  _LT_TAGVAR(always_export_symbols, $1)=no
8493	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
8494
8495	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
8496	    _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'
8497	    # If the export-symbols file already is a .def file (1st line
8498	    # is EXPORTS), use it as is; otherwise, prepend...
8499	    _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
8500	      cp $export_symbols $output_objdir/$soname.def;
8501	    else
8502	      echo EXPORTS > $output_objdir/$soname.def;
8503	      cat $export_symbols >> $output_objdir/$soname.def;
8504	    fi~
8505	    $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'
8506	  else
8507	    _LT_TAGVAR(ld_shlibs, $1)=no
8508	  fi
8509	  ;;
8510	esac
8511	;;
8512      darwin* | rhapsody*)
8513        _LT_DARWIN_LINKER_FEATURES($1)
8514	;;
8515
8516      dgux*)
8517        case $cc_basename in
8518          ec++*)
8519	    # FIXME: insert proper C++ library support
8520	    _LT_TAGVAR(ld_shlibs, $1)=no
8521	    ;;
8522          ghcx*)
8523	    # Green Hills C++ Compiler
8524	    # FIXME: insert proper C++ library support
8525	    _LT_TAGVAR(ld_shlibs, $1)=no
8526	    ;;
8527          *)
8528	    # FIXME: insert proper C++ library support
8529	    _LT_TAGVAR(ld_shlibs, $1)=no
8530	    ;;
8531        esac
8532        ;;
8533
8534      freebsd[[12]]*)
8535        # C++ shared libraries reported to be fairly broken before
8536	# switch to ELF
8537        _LT_TAGVAR(ld_shlibs, $1)=no
8538        ;;
8539
8540      freebsd-elf*)
8541        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8542        ;;
8543
8544      freebsd* | dragonfly*)
8545        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
8546        # conventions
8547        _LT_TAGVAR(ld_shlibs, $1)=yes
8548        ;;
8549
8550      gnu*)
8551        ;;
8552
8553      haiku*)
8554        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8555        _LT_TAGVAR(link_all_deplibs, $1)=yes
8556        ;;
8557
8558      hpux9*)
8559        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8560        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8561        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8562        _LT_TAGVAR(hardcode_direct, $1)=yes
8563        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
8564				             # but as the default
8565				             # location of the library.
8566
8567        case $cc_basename in
8568          CC*)
8569            # FIXME: insert proper C++ library support
8570            _LT_TAGVAR(ld_shlibs, $1)=no
8571            ;;
8572          aCC*)
8573            _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'
8574            # Commands to make compiler produce verbose output that lists
8575            # what "hidden" libraries, object files and flags are used when
8576            # linking a shared library.
8577            #
8578            # There doesn't appear to be a way to prevent this compiler from
8579            # explicitly linking system object files so we need to strip them
8580            # from the output so that they don't get included in the library
8581            # dependencies.
8582            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"'
8583            ;;
8584          *)
8585            if test "$GXX" = yes; then
8586              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
8587            else
8588              # FIXME: insert proper C++ library support
8589              _LT_TAGVAR(ld_shlibs, $1)=no
8590            fi
8591            ;;
8592        esac
8593        ;;
8594
8595      hpux10*|hpux11*)
8596        if test $with_gnu_ld = no; then
8597	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8598	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8599
8600          case $host_cpu in
8601            hppa*64*|ia64*)
8602              ;;
8603            *)
8604	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8605              ;;
8606          esac
8607        fi
8608        case $host_cpu in
8609          hppa*64*|ia64*)
8610            _LT_TAGVAR(hardcode_direct, $1)=no
8611            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8612            ;;
8613          *)
8614            _LT_TAGVAR(hardcode_direct, $1)=yes
8615            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
8616            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
8617					         # but as the default
8618					         # location of the library.
8619            ;;
8620        esac
8621
8622        case $cc_basename in
8623          CC*)
8624	    # FIXME: insert proper C++ library support
8625	    _LT_TAGVAR(ld_shlibs, $1)=no
8626	    ;;
8627          aCC*)
8628	    case $host_cpu in
8629	      hppa*64*)
8630	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8631	        ;;
8632	      ia64*)
8633	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8634	        ;;
8635	      *)
8636	        _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'
8637	        ;;
8638	    esac
8639	    # Commands to make compiler produce verbose output that lists
8640	    # what "hidden" libraries, object files and flags are used when
8641	    # linking a shared library.
8642	    #
8643	    # There doesn't appear to be a way to prevent this compiler from
8644	    # explicitly linking system object files so we need to strip them
8645	    # from the output so that they don't get included in the library
8646	    # dependencies.
8647	    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"'
8648	    ;;
8649          *)
8650	    if test "$GXX" = yes; then
8651	      if test $with_gnu_ld = no; then
8652	        case $host_cpu in
8653	          hppa*64*)
8654	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8655	            ;;
8656	          ia64*)
8657	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8658	            ;;
8659	          *)
8660	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8661	            ;;
8662	        esac
8663	      fi
8664	    else
8665	      # FIXME: insert proper C++ library support
8666	      _LT_TAGVAR(ld_shlibs, $1)=no
8667	    fi
8668	    ;;
8669        esac
8670        ;;
8671
8672      interix[[3-9]]*)
8673	_LT_TAGVAR(hardcode_direct, $1)=no
8674	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8675	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8676	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8677	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
8678	# Instead, shared libraries are loaded at an image base (0x10000000 by
8679	# default) and relocated if they conflict, which is a slow very memory
8680	# consuming and fragmenting process.  To avoid this, we pick a random,
8681	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
8682	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
8683	_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'
8684	_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'
8685	;;
8686      irix5* | irix6*)
8687        case $cc_basename in
8688          CC*)
8689	    # SGI C++
8690	    _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'
8691
8692	    # Archives containing C++ object files must be created using
8693	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
8694	    # necessary to make sure instantiated templates are included
8695	    # in the archive.
8696	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
8697	    ;;
8698          *)
8699	    if test "$GXX" = yes; then
8700	      if test "$with_gnu_ld" = no; then
8701	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
8702	      else
8703	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
8704	      fi
8705	    fi
8706	    _LT_TAGVAR(link_all_deplibs, $1)=yes
8707	    ;;
8708        esac
8709        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8710        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8711        _LT_TAGVAR(inherit_rpath, $1)=yes
8712        ;;
8713
8714      linux* | k*bsd*-gnu | kopensolaris*-gnu)
8715        case $cc_basename in
8716          KCC*)
8717	    # Kuck and Associates, Inc. (KAI) C++ Compiler
8718
8719	    # KCC will only create a shared library if the output file
8720	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
8721	    # to its proper name (with version) after linking.
8722	    _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'
8723	    _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'
8724	    # Commands to make compiler produce verbose output that lists
8725	    # what "hidden" libraries, object files and flags are used when
8726	    # linking a shared library.
8727	    #
8728	    # There doesn't appear to be a way to prevent this compiler from
8729	    # explicitly linking system object files so we need to strip them
8730	    # from the output so that they don't get included in the library
8731	    # dependencies.
8732	    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"'
8733
8734	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8735	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8736
8737	    # Archives containing C++ object files must be created using
8738	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
8739	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
8740	    ;;
8741	  icpc* | ecpc* )
8742	    # Intel C++
8743	    with_gnu_ld=yes
8744	    # version 8.0 and above of icpc choke on multiply defined symbols
8745	    # if we add $predep_objects and $postdep_objects, however 7.1 and
8746	    # earlier do not add the objects themselves.
8747	    case `$CC -V 2>&1` in
8748	      *"Version 7."*)
8749	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
8750		_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'
8751		;;
8752	      *)  # Version 8.0 or newer
8753	        tmp_idyn=
8754	        case $host_cpu in
8755		  ia64*) tmp_idyn=' -i_dynamic';;
8756		esac
8757	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8758		_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'
8759		;;
8760	    esac
8761	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8762	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8763	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8764	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
8765	    ;;
8766          pgCC* | pgcpp*)
8767            # Portland Group C++ compiler
8768	    case `$CC -V` in
8769	    *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
8770	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
8771		rm -rf $tpldir~
8772		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
8773		compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
8774	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
8775		rm -rf $tpldir~
8776		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
8777		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
8778		$RANLIB $oldlib'
8779	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
8780		rm -rf $tpldir~
8781		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
8782		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
8783	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
8784		rm -rf $tpldir~
8785		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
8786		$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'
8787	      ;;
8788	    *) # Version 6 and above use weak symbols
8789	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
8790	      _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'
8791	      ;;
8792	    esac
8793
8794	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
8795	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8796	    _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'
8797            ;;
8798	  cxx*)
8799	    # Compaq C++
8800	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
8801	    _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'
8802
8803	    runpath_var=LD_RUN_PATH
8804	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
8805	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8806
8807	    # Commands to make compiler produce verbose output that lists
8808	    # what "hidden" libraries, object files and flags are used when
8809	    # linking a shared library.
8810	    #
8811	    # There doesn't appear to be a way to prevent this compiler from
8812	    # explicitly linking system object files so we need to strip them
8813	    # from the output so that they don't get included in the library
8814	    # dependencies.
8815	    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'
8816	    ;;
8817	  xl* | mpixl* | bgxl*)
8818	    # IBM XL 8.0 on PPC, with GNU ld
8819	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8820	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8821	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8822	    if test "x$supports_anon_versioning" = xyes; then
8823	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
8824		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
8825		echo "local: *; };" >> $output_objdir/$libname.ver~
8826		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
8827	    fi
8828	    ;;
8829	  *)
8830	    case `$CC -V 2>&1 | sed 5q` in
8831	    *Sun\ C*)
8832	      # Sun C++ 5.9
8833	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
8834	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8835	      _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'
8836	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8837	      _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'
8838	      _LT_TAGVAR(compiler_needs_object, $1)=yes
8839
8840	      # Not sure whether something based on
8841	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
8842	      # would be better.
8843	      output_verbose_link_cmd='func_echo_all'
8844
8845	      # Archives containing C++ object files must be created using
8846	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
8847	      # necessary to make sure instantiated templates are included
8848	      # in the archive.
8849	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
8850	      ;;
8851	    esac
8852	    ;;
8853	esac
8854	;;
8855
8856      lynxos*)
8857        # FIXME: insert proper C++ library support
8858	_LT_TAGVAR(ld_shlibs, $1)=no
8859	;;
8860
8861      m88k*)
8862        # FIXME: insert proper C++ library support
8863        _LT_TAGVAR(ld_shlibs, $1)=no
8864	;;
8865
8866      mvs*)
8867        case $cc_basename in
8868          cxx*)
8869	    # FIXME: insert proper C++ library support
8870	    _LT_TAGVAR(ld_shlibs, $1)=no
8871	    ;;
8872	  *)
8873	    # FIXME: insert proper C++ library support
8874	    _LT_TAGVAR(ld_shlibs, $1)=no
8875	    ;;
8876	esac
8877	;;
8878
8879      netbsd*)
8880        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
8881	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
8882	  wlarc=
8883	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8884	  _LT_TAGVAR(hardcode_direct, $1)=yes
8885	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8886	fi
8887	# Workaround some broken pre-1.5 toolchains
8888	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
8889	;;
8890
8891      *nto* | *qnx*)
8892        _LT_TAGVAR(ld_shlibs, $1)=yes
8893	;;
8894
8895      openbsd2*)
8896        # C++ shared libraries are fairly broken
8897	_LT_TAGVAR(ld_shlibs, $1)=no
8898	;;
8899
8900      openbsd*)
8901	if test -f /usr/libexec/ld.so; then
8902	  _LT_TAGVAR(hardcode_direct, $1)=yes
8903	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8904	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
8905	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
8906	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8907	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
8908	    _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'
8909	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8910	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
8911	  fi
8912	  output_verbose_link_cmd=func_echo_all
8913	else
8914	  _LT_TAGVAR(ld_shlibs, $1)=no
8915	fi
8916	;;
8917
8918      osf3* | osf4* | osf5*)
8919        case $cc_basename in
8920          KCC*)
8921	    # Kuck and Associates, Inc. (KAI) C++ Compiler
8922
8923	    # KCC will only create a shared library if the output file
8924	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
8925	    # to its proper name (with version) after linking.
8926	    _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'
8927
8928	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8929	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8930
8931	    # Archives containing C++ object files must be created using
8932	    # the KAI C++ compiler.
8933	    case $host in
8934	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
8935	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
8936	    esac
8937	    ;;
8938          RCC*)
8939	    # Rational C++ 2.4.1
8940	    # FIXME: insert proper C++ library support
8941	    _LT_TAGVAR(ld_shlibs, $1)=no
8942	    ;;
8943          cxx*)
8944	    case $host in
8945	      osf3*)
8946	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8947	        _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'
8948	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8949		;;
8950	      *)
8951	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
8952	        _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'
8953	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
8954	          echo "-hidden">> $lib.exp~
8955	          $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~
8956	          $RM $lib.exp'
8957	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
8958		;;
8959	    esac
8960
8961	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8962
8963	    # Commands to make compiler produce verbose output that lists
8964	    # what "hidden" libraries, object files and flags are used when
8965	    # linking a shared library.
8966	    #
8967	    # There doesn't appear to be a way to prevent this compiler from
8968	    # explicitly linking system object files so we need to strip them
8969	    # from the output so that they don't get included in the library
8970	    # dependencies.
8971	    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"'
8972	    ;;
8973	  *)
8974	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8975	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8976	      case $host in
8977	        osf3*)
8978	          _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'
8979		  ;;
8980	        *)
8981	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
8982		  ;;
8983	      esac
8984
8985	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8986	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8987
8988	      # Commands to make compiler produce verbose output that lists
8989	      # what "hidden" libraries, object files and flags are used when
8990	      # linking a shared library.
8991	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
8992
8993	    else
8994	      # FIXME: insert proper C++ library support
8995	      _LT_TAGVAR(ld_shlibs, $1)=no
8996	    fi
8997	    ;;
8998        esac
8999        ;;
9000
9001      psos*)
9002        # FIXME: insert proper C++ library support
9003        _LT_TAGVAR(ld_shlibs, $1)=no
9004        ;;
9005
9006      sunos4*)
9007        case $cc_basename in
9008          CC*)
9009	    # Sun C++ 4.x
9010	    # FIXME: insert proper C++ library support
9011	    _LT_TAGVAR(ld_shlibs, $1)=no
9012	    ;;
9013          lcc*)
9014	    # Lucid
9015	    # FIXME: insert proper C++ library support
9016	    _LT_TAGVAR(ld_shlibs, $1)=no
9017	    ;;
9018          *)
9019	    # FIXME: insert proper C++ library support
9020	    _LT_TAGVAR(ld_shlibs, $1)=no
9021	    ;;
9022        esac
9023        ;;
9024
9025      solaris*)
9026        case $cc_basename in
9027          CC* | sunCC*)
9028	    # Sun C++ 4.2, 5.x and Centerline C++
9029            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
9030	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
9031	    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
9032	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
9033	      $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'
9034
9035	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
9036	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9037	    case $host_os in
9038	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
9039	      *)
9040		# The compiler driver will combine and reorder linker options,
9041		# but understands `-z linker_flag'.
9042	        # Supported since Solaris 2.6 (maybe 2.5.1?)
9043		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
9044	        ;;
9045	    esac
9046	    _LT_TAGVAR(link_all_deplibs, $1)=yes
9047
9048	    output_verbose_link_cmd='func_echo_all'
9049
9050	    # Archives containing C++ object files must be created using
9051	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
9052	    # necessary to make sure instantiated templates are included
9053	    # in the archive.
9054	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
9055	    ;;
9056          gcx*)
9057	    # Green Hills C++ Compiler
9058	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
9059
9060	    # The C++ compiler must be used to create the archive.
9061	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
9062	    ;;
9063          *)
9064	    # GNU C++ compiler with Solaris linker
9065	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
9066	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
9067	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
9068	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
9069	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
9070		  $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
9071
9072	        # Commands to make compiler produce verbose output that lists
9073	        # what "hidden" libraries, object files and flags are used when
9074	        # linking a shared library.
9075	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
9076	      else
9077	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
9078	        # platform.
9079	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
9080	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
9081		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
9082
9083	        # Commands to make compiler produce verbose output that lists
9084	        # what "hidden" libraries, object files and flags are used when
9085	        # linking a shared library.
9086	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
9087	      fi
9088
9089	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
9090	      case $host_os in
9091		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
9092		*)
9093		  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
9094		  ;;
9095	      esac
9096	    fi
9097	    ;;
9098        esac
9099        ;;
9100
9101    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
9102      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
9103      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
9104      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9105      runpath_var='LD_RUN_PATH'
9106
9107      case $cc_basename in
9108        CC*)
9109	  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9110	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9111	  ;;
9112	*)
9113	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9114	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9115	  ;;
9116      esac
9117      ;;
9118
9119      sysv5* | sco3.2v5* | sco5v6*)
9120	# Note: We can NOT use -z defs as we might desire, because we do not
9121	# link with -lc, and that would cause any symbols used from libc to
9122	# always be unresolved, which means just about no library would
9123	# ever link correctly.  If we're not using GNU ld we use -z text
9124	# though, which does catch some bad symbols but isn't as heavy-handed
9125	# as -z defs.
9126	_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
9127	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
9128	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
9129	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9130	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
9131	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
9132	_LT_TAGVAR(link_all_deplibs, $1)=yes
9133	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
9134	runpath_var='LD_RUN_PATH'
9135
9136	case $cc_basename in
9137          CC*)
9138	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9139	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9140	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
9141	      '"$_LT_TAGVAR(old_archive_cmds, $1)"
9142	    _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
9143	      '"$_LT_TAGVAR(reload_cmds, $1)"
9144	    ;;
9145	  *)
9146	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9147	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9148	    ;;
9149	esac
9150      ;;
9151
9152      tandem*)
9153        case $cc_basename in
9154          NCC*)
9155	    # NonStop-UX NCC 3.20
9156	    # FIXME: insert proper C++ library support
9157	    _LT_TAGVAR(ld_shlibs, $1)=no
9158	    ;;
9159          *)
9160	    # FIXME: insert proper C++ library support
9161	    _LT_TAGVAR(ld_shlibs, $1)=no
9162	    ;;
9163        esac
9164        ;;
9165
9166      vxworks*)
9167        # FIXME: insert proper C++ library support
9168        _LT_TAGVAR(ld_shlibs, $1)=no
9169        ;;
9170
9171      *)
9172        # FIXME: insert proper C++ library support
9173        _LT_TAGVAR(ld_shlibs, $1)=no
9174        ;;
9175    esac
9176
9177    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
9178    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
9179
9180    _LT_TAGVAR(GCC, $1)="$GXX"
9181    _LT_TAGVAR(LD, $1)="$LD"
9182
9183    ## CAVEAT EMPTOR:
9184    ## There is no encapsulation within the following macros, do not change
9185    ## the running order or otherwise move them around unless you know exactly
9186    ## what you are doing...
9187    _LT_SYS_HIDDEN_LIBDEPS($1)
9188    _LT_COMPILER_PIC($1)
9189    _LT_COMPILER_C_O($1)
9190    _LT_COMPILER_FILE_LOCKS($1)
9191    _LT_LINKER_SHLIBS($1)
9192    _LT_SYS_DYNAMIC_LINKER($1)
9193    _LT_LINKER_HARDCODE_LIBPATH($1)
9194
9195    _LT_CONFIG($1)
9196  fi # test -n "$compiler"
9197
9198  CC=$lt_save_CC
9199  CFLAGS=$lt_save_CFLAGS
9200  LDCXX=$LD
9201  LD=$lt_save_LD
9202  GCC=$lt_save_GCC
9203  with_gnu_ld=$lt_save_with_gnu_ld
9204  lt_cv_path_LDCXX=$lt_cv_path_LD
9205  lt_cv_path_LD=$lt_save_path_LD
9206  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
9207  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
9208fi # test "$_lt_caught_CXX_error" != yes
9209
9210AC_LANG_POP
9211])# _LT_LANG_CXX_CONFIG
9212
9213
9214# _LT_FUNC_STRIPNAME_CNF
9215# ----------------------
9216# func_stripname_cnf prefix suffix name
9217# strip PREFIX and SUFFIX off of NAME.
9218# PREFIX and SUFFIX must not contain globbing or regex special
9219# characters, hashes, percent signs, but SUFFIX may contain a leading
9220# dot (in which case that matches only a dot).
9221#
9222# This function is identical to the (non-XSI) version of func_stripname,
9223# except this one can be used by m4 code that may be executed by configure,
9224# rather than the libtool script.
9225m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
9226AC_REQUIRE([_LT_DECL_SED])
9227AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
9228func_stripname_cnf ()
9229{
9230  case ${2} in
9231  .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
9232  *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
9233  esac
9234} # func_stripname_cnf
9235])# _LT_FUNC_STRIPNAME_CNF
9236
9237# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
9238# ---------------------------------
9239# Figure out "hidden" library dependencies from verbose
9240# compiler output when linking a shared library.
9241# Parse the compiler output and extract the necessary
9242# objects, libraries and library flags.
9243m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
9244[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
9245AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
9246# Dependencies to place before and after the object being linked:
9247_LT_TAGVAR(predep_objects, $1)=
9248_LT_TAGVAR(postdep_objects, $1)=
9249_LT_TAGVAR(predeps, $1)=
9250_LT_TAGVAR(postdeps, $1)=
9251_LT_TAGVAR(compiler_lib_search_path, $1)=
9252
9253dnl we can't use the lt_simple_compile_test_code here,
9254dnl because it contains code intended for an executable,
9255dnl not a library.  It's possible we should let each
9256dnl tag define a new lt_????_link_test_code variable,
9257dnl but it's only used here...
9258m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
9259int a;
9260void foo (void) { a = 0; }
9261_LT_EOF
9262], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
9263class Foo
9264{
9265public:
9266  Foo (void) { a = 0; }
9267private:
9268  int a;
9269};
9270_LT_EOF
9271], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
9272      subroutine foo
9273      implicit none
9274      integer*4 a
9275      a=0
9276      return
9277      end
9278_LT_EOF
9279], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
9280      subroutine foo
9281      implicit none
9282      integer a
9283      a=0
9284      return
9285      end
9286_LT_EOF
9287], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
9288public class foo {
9289  private int a;
9290  public void bar (void) {
9291    a = 0;
9292  }
9293};
9294_LT_EOF
9295])
9296
9297_lt_libdeps_save_CFLAGS=$CFLAGS
9298case "$CC $CFLAGS " in #(
9299*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
9300*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
9301esac
9302
9303dnl Parse the compiler output and extract the necessary
9304dnl objects, libraries and library flags.
9305if AC_TRY_EVAL(ac_compile); then
9306  # Parse the compiler output and extract the necessary
9307  # objects, libraries and library flags.
9308
9309  # Sentinel used to keep track of whether or not we are before
9310  # the conftest object file.
9311  pre_test_object_deps_done=no
9312
9313  for p in `eval "$output_verbose_link_cmd"`; do
9314    case ${prev}${p} in
9315
9316    -L* | -R* | -l*)
9317       # Some compilers place space between "-{L,R}" and the path.
9318       # Remove the space.
9319       if test $p = "-L" ||
9320          test $p = "-R"; then
9321	 prev=$p
9322	 continue
9323       fi
9324
9325       # Expand the sysroot to ease extracting the directories later.
9326       if test -z "$prev"; then
9327         case $p in
9328         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
9329         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
9330         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
9331         esac
9332       fi
9333       case $p in
9334       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
9335       esac
9336       if test "$pre_test_object_deps_done" = no; then
9337	 case ${prev} in
9338	 -L | -R)
9339	   # Internal compiler library paths should come after those
9340	   # provided the user.  The postdeps already come after the
9341	   # user supplied libs so there is no need to process them.
9342	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
9343	     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
9344	   else
9345	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
9346	   fi
9347	   ;;
9348	 # The "-l" case would never come before the object being
9349	 # linked, so don't bother handling this case.
9350	 esac
9351       else
9352	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
9353	   _LT_TAGVAR(postdeps, $1)="${prev}${p}"
9354	 else
9355	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
9356	 fi
9357       fi
9358       prev=
9359       ;;
9360
9361    *.lto.$objext) ;; # Ignore GCC LTO objects
9362    *.$objext)
9363       # This assumes that the test object file only shows up
9364       # once in the compiler output.
9365       if test "$p" = "conftest.$objext"; then
9366	 pre_test_object_deps_done=yes
9367	 continue
9368       fi
9369
9370       if test "$pre_test_object_deps_done" = no; then
9371	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
9372	   _LT_TAGVAR(predep_objects, $1)="$p"
9373	 else
9374	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
9375	 fi
9376       else
9377	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
9378	   _LT_TAGVAR(postdep_objects, $1)="$p"
9379	 else
9380	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
9381	 fi
9382       fi
9383       ;;
9384
9385    *) ;; # Ignore the rest.
9386
9387    esac
9388  done
9389
9390  # Clean up.
9391  rm -f a.out a.exe
9392else
9393  echo "libtool.m4: error: problem compiling $1 test program"
9394fi
9395
9396$RM -f confest.$objext
9397CFLAGS=$_lt_libdeps_save_CFLAGS
9398
9399# PORTME: override above test on systems where it is broken
9400m4_if([$1], [CXX],
9401[case $host_os in
9402interix[[3-9]]*)
9403  # Interix 3.5 installs completely hosed .la files for C++, so rather than
9404  # hack all around it, let's just trust "g++" to DTRT.
9405  _LT_TAGVAR(predep_objects,$1)=
9406  _LT_TAGVAR(postdep_objects,$1)=
9407  _LT_TAGVAR(postdeps,$1)=
9408  ;;
9409
9410linux*)
9411  case `$CC -V 2>&1 | sed 5q` in
9412  *Sun\ C*)
9413    # Sun C++ 5.9
9414
9415    # The more standards-conforming stlport4 library is
9416    # incompatible with the Cstd library. Avoid specifying
9417    # it if it's in CXXFLAGS. Ignore libCrun as
9418    # -library=stlport4 depends on it.
9419    case " $CXX $CXXFLAGS " in
9420    *" -library=stlport4 "*)
9421      solaris_use_stlport4=yes
9422      ;;
9423    esac
9424
9425    if test "$solaris_use_stlport4" != yes; then
9426      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
9427    fi
9428    ;;
9429  esac
9430  ;;
9431
9432solaris*)
9433  case $cc_basename in
9434  CC* | sunCC*)
9435    # The more standards-conforming stlport4 library is
9436    # incompatible with the Cstd library. Avoid specifying
9437    # it if it's in CXXFLAGS. Ignore libCrun as
9438    # -library=stlport4 depends on it.
9439    case " $CXX $CXXFLAGS " in
9440    *" -library=stlport4 "*)
9441      solaris_use_stlport4=yes
9442      ;;
9443    esac
9444
9445    # Adding this requires a known-good setup of shared libraries for
9446    # Sun compiler versions before 5.6, else PIC objects from an old
9447    # archive will be linked into the output, leading to subtle bugs.
9448    if test "$solaris_use_stlport4" != yes; then
9449      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
9450    fi
9451    ;;
9452  esac
9453  ;;
9454esac
9455])
9456
9457case " $_LT_TAGVAR(postdeps, $1) " in
9458*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
9459esac
9460 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
9461if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
9462 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
9463fi
9464_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
9465    [The directories searched by this compiler when creating a shared library])
9466_LT_TAGDECL([], [predep_objects], [1],
9467    [Dependencies to place before and after the objects being linked to
9468    create a shared library])
9469_LT_TAGDECL([], [postdep_objects], [1])
9470_LT_TAGDECL([], [predeps], [1])
9471_LT_TAGDECL([], [postdeps], [1])
9472_LT_TAGDECL([], [compiler_lib_search_path], [1],
9473    [The library search path used internally by the compiler when linking
9474    a shared library])
9475])# _LT_SYS_HIDDEN_LIBDEPS
9476
9477
9478# _LT_LANG_F77_CONFIG([TAG])
9479# --------------------------
9480# Ensure that the configuration variables for a Fortran 77 compiler are
9481# suitably defined.  These variables are subsequently used by _LT_CONFIG
9482# to write the compiler configuration to `libtool'.
9483m4_defun([_LT_LANG_F77_CONFIG],
9484[AC_LANG_PUSH(Fortran 77)
9485if test -z "$F77" || test "X$F77" = "Xno"; then
9486  _lt_disable_F77=yes
9487fi
9488
9489_LT_TAGVAR(archive_cmds_need_lc, $1)=no
9490_LT_TAGVAR(allow_undefined_flag, $1)=
9491_LT_TAGVAR(always_export_symbols, $1)=no
9492_LT_TAGVAR(archive_expsym_cmds, $1)=
9493_LT_TAGVAR(export_dynamic_flag_spec, $1)=
9494_LT_TAGVAR(hardcode_direct, $1)=no
9495_LT_TAGVAR(hardcode_direct_absolute, $1)=no
9496_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
9497_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
9498_LT_TAGVAR(hardcode_libdir_separator, $1)=
9499_LT_TAGVAR(hardcode_minus_L, $1)=no
9500_LT_TAGVAR(hardcode_automatic, $1)=no
9501_LT_TAGVAR(inherit_rpath, $1)=no
9502_LT_TAGVAR(module_cmds, $1)=
9503_LT_TAGVAR(module_expsym_cmds, $1)=
9504_LT_TAGVAR(link_all_deplibs, $1)=unknown
9505_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
9506_LT_TAGVAR(reload_flag, $1)=$reload_flag
9507_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
9508_LT_TAGVAR(no_undefined_flag, $1)=
9509_LT_TAGVAR(whole_archive_flag_spec, $1)=
9510_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
9511
9512# Source file extension for f77 test sources.
9513ac_ext=f
9514
9515# Object file extension for compiled f77 test sources.
9516objext=o
9517_LT_TAGVAR(objext, $1)=$objext
9518
9519# No sense in running all these tests if we already determined that
9520# the F77 compiler isn't working.  Some variables (like enable_shared)
9521# are currently assumed to apply to all compilers on this platform,
9522# and will be corrupted by setting them based on a non-working compiler.
9523if test "$_lt_disable_F77" != yes; then
9524  # Code to be used in simple compile tests
9525  lt_simple_compile_test_code="\
9526      subroutine t
9527      return
9528      end
9529"
9530
9531  # Code to be used in simple link tests
9532  lt_simple_link_test_code="\
9533      program t
9534      end
9535"
9536
9537  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
9538  _LT_TAG_COMPILER
9539
9540  # save warnings/boilerplate of simple test code
9541  _LT_COMPILER_BOILERPLATE
9542  _LT_LINKER_BOILERPLATE
9543
9544  # Allow CC to be a program name with arguments.
9545  lt_save_CC="$CC"
9546  lt_save_GCC=$GCC
9547  lt_save_CFLAGS=$CFLAGS
9548  CC=${F77-"f77"}
9549  CFLAGS=$FFLAGS
9550  compiler=$CC
9551  _LT_TAGVAR(compiler, $1)=$CC
9552  _LT_CC_BASENAME([$compiler])
9553  GCC=$G77
9554  if test -n "$compiler"; then
9555    AC_MSG_CHECKING([if libtool supports shared libraries])
9556    AC_MSG_RESULT([$can_build_shared])
9557
9558    AC_MSG_CHECKING([whether to build shared libraries])
9559    test "$can_build_shared" = "no" && enable_shared=no
9560
9561    # On AIX, shared libraries and static libraries use the same namespace, and
9562    # are all built from PIC.
9563    case $host_os in
9564      aix3*)
9565        test "$enable_shared" = yes && enable_static=no
9566        if test -n "$RANLIB"; then
9567          archive_cmds="$archive_cmds~\$RANLIB \$lib"
9568          postinstall_cmds='$RANLIB $lib'
9569        fi
9570        ;;
9571      aix[[4-9]]*)
9572	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
9573	  test "$enable_shared" = yes && enable_static=no
9574	fi
9575        ;;
9576    esac
9577    AC_MSG_RESULT([$enable_shared])
9578
9579    AC_MSG_CHECKING([whether to build static libraries])
9580    # Make sure either enable_shared or enable_static is yes.
9581    test "$enable_shared" = yes || enable_static=yes
9582    AC_MSG_RESULT([$enable_static])
9583
9584    _LT_TAGVAR(GCC, $1)="$G77"
9585    _LT_TAGVAR(LD, $1)="$LD"
9586
9587    ## CAVEAT EMPTOR:
9588    ## There is no encapsulation within the following macros, do not change
9589    ## the running order or otherwise move them around unless you know exactly
9590    ## what you are doing...
9591    _LT_COMPILER_PIC($1)
9592    _LT_COMPILER_C_O($1)
9593    _LT_COMPILER_FILE_LOCKS($1)
9594    _LT_LINKER_SHLIBS($1)
9595    _LT_SYS_DYNAMIC_LINKER($1)
9596    _LT_LINKER_HARDCODE_LIBPATH($1)
9597
9598    _LT_CONFIG($1)
9599  fi # test -n "$compiler"
9600
9601  GCC=$lt_save_GCC
9602  CC="$lt_save_CC"
9603  CFLAGS="$lt_save_CFLAGS"
9604fi # test "$_lt_disable_F77" != yes
9605
9606AC_LANG_POP
9607])# _LT_LANG_F77_CONFIG
9608
9609
9610# _LT_LANG_FC_CONFIG([TAG])
9611# -------------------------
9612# Ensure that the configuration variables for a Fortran compiler are
9613# suitably defined.  These variables are subsequently used by _LT_CONFIG
9614# to write the compiler configuration to `libtool'.
9615m4_defun([_LT_LANG_FC_CONFIG],
9616[AC_LANG_PUSH(Fortran)
9617
9618if test -z "$FC" || test "X$FC" = "Xno"; then
9619  _lt_disable_FC=yes
9620fi
9621
9622_LT_TAGVAR(archive_cmds_need_lc, $1)=no
9623_LT_TAGVAR(allow_undefined_flag, $1)=
9624_LT_TAGVAR(always_export_symbols, $1)=no
9625_LT_TAGVAR(archive_expsym_cmds, $1)=
9626_LT_TAGVAR(export_dynamic_flag_spec, $1)=
9627_LT_TAGVAR(hardcode_direct, $1)=no
9628_LT_TAGVAR(hardcode_direct_absolute, $1)=no
9629_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
9630_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
9631_LT_TAGVAR(hardcode_libdir_separator, $1)=
9632_LT_TAGVAR(hardcode_minus_L, $1)=no
9633_LT_TAGVAR(hardcode_automatic, $1)=no
9634_LT_TAGVAR(inherit_rpath, $1)=no
9635_LT_TAGVAR(module_cmds, $1)=
9636_LT_TAGVAR(module_expsym_cmds, $1)=
9637_LT_TAGVAR(link_all_deplibs, $1)=unknown
9638_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
9639_LT_TAGVAR(reload_flag, $1)=$reload_flag
9640_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
9641_LT_TAGVAR(no_undefined_flag, $1)=
9642_LT_TAGVAR(whole_archive_flag_spec, $1)=
9643_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
9644
9645# Source file extension for fc test sources.
9646ac_ext=${ac_fc_srcext-f}
9647
9648# Object file extension for compiled fc test sources.
9649objext=o
9650_LT_TAGVAR(objext, $1)=$objext
9651
9652# No sense in running all these tests if we already determined that
9653# the FC compiler isn't working.  Some variables (like enable_shared)
9654# are currently assumed to apply to all compilers on this platform,
9655# and will be corrupted by setting them based on a non-working compiler.
9656if test "$_lt_disable_FC" != yes; then
9657  # Code to be used in simple compile tests
9658  lt_simple_compile_test_code="\
9659      subroutine t
9660      return
9661      end
9662"
9663
9664  # Code to be used in simple link tests
9665  lt_simple_link_test_code="\
9666      program t
9667      end
9668"
9669
9670  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
9671  _LT_TAG_COMPILER
9672
9673  # save warnings/boilerplate of simple test code
9674  _LT_COMPILER_BOILERPLATE
9675  _LT_LINKER_BOILERPLATE
9676
9677  # Allow CC to be a program name with arguments.
9678  lt_save_CC="$CC"
9679  lt_save_GCC=$GCC
9680  lt_save_CFLAGS=$CFLAGS
9681  CC=${FC-"f95"}
9682  CFLAGS=$FCFLAGS
9683  compiler=$CC
9684  GCC=$ac_cv_fc_compiler_gnu
9685
9686  _LT_TAGVAR(compiler, $1)=$CC
9687  _LT_CC_BASENAME([$compiler])
9688
9689  if test -n "$compiler"; then
9690    AC_MSG_CHECKING([if libtool supports shared libraries])
9691    AC_MSG_RESULT([$can_build_shared])
9692
9693    AC_MSG_CHECKING([whether to build shared libraries])
9694    test "$can_build_shared" = "no" && enable_shared=no
9695
9696    # On AIX, shared libraries and static libraries use the same namespace, and
9697    # are all built from PIC.
9698    case $host_os in
9699      aix3*)
9700        test "$enable_shared" = yes && enable_static=no
9701        if test -n "$RANLIB"; then
9702          archive_cmds="$archive_cmds~\$RANLIB \$lib"
9703          postinstall_cmds='$RANLIB $lib'
9704        fi
9705        ;;
9706      aix[[4-9]]*)
9707	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
9708	  test "$enable_shared" = yes && enable_static=no
9709	fi
9710        ;;
9711    esac
9712    AC_MSG_RESULT([$enable_shared])
9713
9714    AC_MSG_CHECKING([whether to build static libraries])
9715    # Make sure either enable_shared or enable_static is yes.
9716    test "$enable_shared" = yes || enable_static=yes
9717    AC_MSG_RESULT([$enable_static])
9718
9719    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
9720    _LT_TAGVAR(LD, $1)="$LD"
9721
9722    ## CAVEAT EMPTOR:
9723    ## There is no encapsulation within the following macros, do not change
9724    ## the running order or otherwise move them around unless you know exactly
9725    ## what you are doing...
9726    _LT_SYS_HIDDEN_LIBDEPS($1)
9727    _LT_COMPILER_PIC($1)
9728    _LT_COMPILER_C_O($1)
9729    _LT_COMPILER_FILE_LOCKS($1)
9730    _LT_LINKER_SHLIBS($1)
9731    _LT_SYS_DYNAMIC_LINKER($1)
9732    _LT_LINKER_HARDCODE_LIBPATH($1)
9733
9734    _LT_CONFIG($1)
9735  fi # test -n "$compiler"
9736
9737  GCC=$lt_save_GCC
9738  CC=$lt_save_CC
9739  CFLAGS=$lt_save_CFLAGS
9740fi # test "$_lt_disable_FC" != yes
9741
9742AC_LANG_POP
9743])# _LT_LANG_FC_CONFIG
9744
9745
9746# _LT_LANG_GCJ_CONFIG([TAG])
9747# --------------------------
9748# Ensure that the configuration variables for the GNU Java Compiler compiler
9749# are suitably defined.  These variables are subsequently used by _LT_CONFIG
9750# to write the compiler configuration to `libtool'.
9751m4_defun([_LT_LANG_GCJ_CONFIG],
9752[AC_REQUIRE([LT_PROG_GCJ])dnl
9753AC_LANG_SAVE
9754
9755# Source file extension for Java test sources.
9756ac_ext=java
9757
9758# Object file extension for compiled Java test sources.
9759objext=o
9760_LT_TAGVAR(objext, $1)=$objext
9761
9762# Code to be used in simple compile tests
9763lt_simple_compile_test_code="class foo {}"
9764
9765# Code to be used in simple link tests
9766lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
9767
9768# ltmain only uses $CC for tagged configurations so make sure $CC is set.
9769_LT_TAG_COMPILER
9770
9771# save warnings/boilerplate of simple test code
9772_LT_COMPILER_BOILERPLATE
9773_LT_LINKER_BOILERPLATE
9774
9775# Allow CC to be a program name with arguments.
9776lt_save_CC=$CC
9777lt_save_CFLAGS=$CFLAGS
9778lt_save_GCC=$GCC
9779GCC=yes
9780CC=${GCJ-"gcj"}
9781CFLAGS=$GCJFLAGS
9782compiler=$CC
9783_LT_TAGVAR(compiler, $1)=$CC
9784_LT_TAGVAR(LD, $1)="$LD"
9785_LT_CC_BASENAME([$compiler])
9786
9787# GCJ did not exist at the time GCC didn't implicitly link libc in.
9788_LT_TAGVAR(archive_cmds_need_lc, $1)=no
9789
9790_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
9791_LT_TAGVAR(reload_flag, $1)=$reload_flag
9792_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
9793
9794if test -n "$compiler"; then
9795  _LT_COMPILER_NO_RTTI($1)
9796  _LT_COMPILER_PIC($1)
9797  _LT_COMPILER_C_O($1)
9798  _LT_COMPILER_FILE_LOCKS($1)
9799  _LT_LINKER_SHLIBS($1)
9800  _LT_LINKER_HARDCODE_LIBPATH($1)
9801
9802  _LT_CONFIG($1)
9803fi
9804
9805AC_LANG_RESTORE
9806
9807GCC=$lt_save_GCC
9808CC=$lt_save_CC
9809CFLAGS=$lt_save_CFLAGS
9810])# _LT_LANG_GCJ_CONFIG
9811
9812
9813# _LT_LANG_RC_CONFIG([TAG])
9814# -------------------------
9815# Ensure that the configuration variables for the Windows resource compiler
9816# are suitably defined.  These variables are subsequently used by _LT_CONFIG
9817# to write the compiler configuration to `libtool'.
9818m4_defun([_LT_LANG_RC_CONFIG],
9819[AC_REQUIRE([LT_PROG_RC])dnl
9820AC_LANG_SAVE
9821
9822# Source file extension for RC test sources.
9823ac_ext=rc
9824
9825# Object file extension for compiled RC test sources.
9826objext=o
9827_LT_TAGVAR(objext, $1)=$objext
9828
9829# Code to be used in simple compile tests
9830lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
9831
9832# Code to be used in simple link tests
9833lt_simple_link_test_code="$lt_simple_compile_test_code"
9834
9835# ltmain only uses $CC for tagged configurations so make sure $CC is set.
9836_LT_TAG_COMPILER
9837
9838# save warnings/boilerplate of simple test code
9839_LT_COMPILER_BOILERPLATE
9840_LT_LINKER_BOILERPLATE
9841
9842# Allow CC to be a program name with arguments.
9843lt_save_CC="$CC"
9844lt_save_CFLAGS=$CFLAGS
9845lt_save_GCC=$GCC
9846GCC=
9847CC=${RC-"windres"}
9848CFLAGS=
9849compiler=$CC
9850_LT_TAGVAR(compiler, $1)=$CC
9851_LT_CC_BASENAME([$compiler])
9852_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
9853
9854if test -n "$compiler"; then
9855  :
9856  _LT_CONFIG($1)
9857fi
9858
9859GCC=$lt_save_GCC
9860AC_LANG_RESTORE
9861CC=$lt_save_CC
9862CFLAGS=$lt_save_CFLAGS
9863])# _LT_LANG_RC_CONFIG
9864
9865
9866# LT_PROG_GCJ
9867# -----------
9868AC_DEFUN([LT_PROG_GCJ],
9869[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
9870  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
9871    [AC_CHECK_TOOL(GCJ, gcj,)
9872      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
9873      AC_SUBST(GCJFLAGS)])])[]dnl
9874])
9875
9876# Old name:
9877AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
9878dnl aclocal-1.4 backwards compatibility:
9879dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
9880
9881
9882# LT_PROG_RC
9883# ----------
9884AC_DEFUN([LT_PROG_RC],
9885[AC_CHECK_TOOL(RC, windres,)
9886])
9887
9888# Old name:
9889AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
9890dnl aclocal-1.4 backwards compatibility:
9891dnl AC_DEFUN([LT_AC_PROG_RC], [])
9892
9893
9894# _LT_DECL_EGREP
9895# --------------
9896# If we don't have a new enough Autoconf to choose the best grep
9897# available, choose the one first in the user's PATH.
9898m4_defun([_LT_DECL_EGREP],
9899[AC_REQUIRE([AC_PROG_EGREP])dnl
9900AC_REQUIRE([AC_PROG_FGREP])dnl
9901test -z "$GREP" && GREP=grep
9902_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
9903_LT_DECL([], [EGREP], [1], [An ERE matcher])
9904_LT_DECL([], [FGREP], [1], [A literal string matcher])
9905dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
9906AC_SUBST([GREP])
9907])
9908
9909
9910# _LT_DECL_OBJDUMP
9911# --------------
9912# If we don't have a new enough Autoconf to choose the best objdump
9913# available, choose the one first in the user's PATH.
9914m4_defun([_LT_DECL_OBJDUMP],
9915[AC_CHECK_TOOL(OBJDUMP, objdump, false)
9916test -z "$OBJDUMP" && OBJDUMP=objdump
9917_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
9918AC_SUBST([OBJDUMP])
9919])
9920
9921# _LT_DECL_DLLTOOL
9922# ----------------
9923# Ensure DLLTOOL variable is set.
9924m4_defun([_LT_DECL_DLLTOOL],
9925[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
9926test -z "$DLLTOOL" && DLLTOOL=dlltool
9927_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
9928AC_SUBST([DLLTOOL])
9929])
9930
9931# _LT_DECL_SED
9932# ------------
9933# Check for a fully-functional sed program, that truncates
9934# as few characters as possible.  Prefer GNU sed if found.
9935m4_defun([_LT_DECL_SED],
9936[AC_PROG_SED
9937test -z "$SED" && SED=sed
9938Xsed="$SED -e 1s/^X//"
9939_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
9940_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
9941    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
9942])# _LT_DECL_SED
9943
9944m4_ifndef([AC_PROG_SED], [
9945# NOTE: This macro has been submitted for inclusion into   #
9946#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
9947#  a released version of Autoconf we should remove this    #
9948#  macro and use it instead.                               #
9949
9950m4_defun([AC_PROG_SED],
9951[AC_MSG_CHECKING([for a sed that does not truncate output])
9952AC_CACHE_VAL(lt_cv_path_SED,
9953[# Loop through the user's path and test for sed and gsed.
9954# Then use that list of sed's as ones to test for truncation.
9955as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9956for as_dir in $PATH
9957do
9958  IFS=$as_save_IFS
9959  test -z "$as_dir" && as_dir=.
9960  for lt_ac_prog in sed gsed; do
9961    for ac_exec_ext in '' $ac_executable_extensions; do
9962      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
9963        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
9964      fi
9965    done
9966  done
9967done
9968IFS=$as_save_IFS
9969lt_ac_max=0
9970lt_ac_count=0
9971# Add /usr/xpg4/bin/sed as it is typically found on Solaris
9972# along with /bin/sed that truncates output.
9973for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
9974  test ! -f $lt_ac_sed && continue
9975  cat /dev/null > conftest.in
9976  lt_ac_count=0
9977  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
9978  # Check for GNU sed and select it if it is found.
9979  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
9980    lt_cv_path_SED=$lt_ac_sed
9981    break
9982  fi
9983  while true; do
9984    cat conftest.in conftest.in >conftest.tmp
9985    mv conftest.tmp conftest.in
9986    cp conftest.in conftest.nl
9987    echo >>conftest.nl
9988    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
9989    cmp -s conftest.out conftest.nl || break
9990    # 10000 chars as input seems more than enough
9991    test $lt_ac_count -gt 10 && break
9992    lt_ac_count=`expr $lt_ac_count + 1`
9993    if test $lt_ac_count -gt $lt_ac_max; then
9994      lt_ac_max=$lt_ac_count
9995      lt_cv_path_SED=$lt_ac_sed
9996    fi
9997  done
9998done
9999])
10000SED=$lt_cv_path_SED
10001AC_SUBST([SED])
10002AC_MSG_RESULT([$SED])
10003])#AC_PROG_SED
10004])#m4_ifndef
10005
10006# Old name:
10007AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
10008dnl aclocal-1.4 backwards compatibility:
10009dnl AC_DEFUN([LT_AC_PROG_SED], [])
10010
10011
10012# _LT_CHECK_SHELL_FEATURES
10013# ------------------------
10014# Find out whether the shell is Bourne or XSI compatible,
10015# or has some other useful features.
10016m4_defun([_LT_CHECK_SHELL_FEATURES],
10017[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
10018# Try some XSI features
10019xsi_shell=no
10020( _lt_dummy="a/b/c"
10021  test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
10022      = c,a/b,b/c, \
10023    && eval 'test $(( 1 + 1 )) -eq 2 \
10024    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
10025  && xsi_shell=yes
10026AC_MSG_RESULT([$xsi_shell])
10027_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
10028
10029AC_MSG_CHECKING([whether the shell understands "+="])
10030lt_shell_append=no
10031( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
10032    >/dev/null 2>&1 \
10033  && lt_shell_append=yes
10034AC_MSG_RESULT([$lt_shell_append])
10035_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
10036
10037if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
10038  lt_unset=unset
10039else
10040  lt_unset=false
10041fi
10042_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
10043
10044# test EBCDIC or ASCII
10045case `echo X|tr X '\101'` in
10046 A) # ASCII based system
10047    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
10048  lt_SP2NL='tr \040 \012'
10049  lt_NL2SP='tr \015\012 \040\040'
10050  ;;
10051 *) # EBCDIC based system
10052  lt_SP2NL='tr \100 \n'
10053  lt_NL2SP='tr \r\n \100\100'
10054  ;;
10055esac
10056_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
10057_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
10058])# _LT_CHECK_SHELL_FEATURES
10059
10060
10061# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
10062# ------------------------------------------------------
10063# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
10064# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
10065m4_defun([_LT_PROG_FUNCTION_REPLACE],
10066[dnl {
10067sed -e '/^$1 ()$/,/^} # $1 /c\
10068$1 ()\
10069{\
10070m4_bpatsubsts([$2], [$], [\\], [^\([	 ]\)], [\\\1])
10071} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
10072  && mv -f "$cfgfile.tmp" "$cfgfile" \
10073    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
10074test 0 -eq $? || _lt_function_replace_fail=:
10075])
10076
10077
10078# _LT_PROG_REPLACE_SHELLFNS
10079# -------------------------
10080# Replace existing portable implementations of several shell functions with
10081# equivalent extended shell implementations where those features are available..
10082m4_defun([_LT_PROG_REPLACE_SHELLFNS],
10083[if test x"$xsi_shell" = xyes; then
10084  _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
10085    case ${1} in
10086      */*) func_dirname_result="${1%/*}${2}" ;;
10087      *  ) func_dirname_result="${3}" ;;
10088    esac])
10089
10090  _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
10091    func_basename_result="${1##*/}"])
10092
10093  _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
10094    case ${1} in
10095      */*) func_dirname_result="${1%/*}${2}" ;;
10096      *  ) func_dirname_result="${3}" ;;
10097    esac
10098    func_basename_result="${1##*/}"])
10099
10100  _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
10101    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
10102    # positional parameters, so assign one to ordinary parameter first.
10103    func_stripname_result=${3}
10104    func_stripname_result=${func_stripname_result#"${1}"}
10105    func_stripname_result=${func_stripname_result%"${2}"}])
10106
10107  _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
10108    func_split_long_opt_name=${1%%=*}
10109    func_split_long_opt_arg=${1#*=}])
10110
10111  _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
10112    func_split_short_opt_arg=${1#??}
10113    func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
10114
10115  _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
10116    case ${1} in
10117      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
10118      *)    func_lo2o_result=${1} ;;
10119    esac])
10120
10121  _LT_PROG_FUNCTION_REPLACE([func_xform], [    func_xform_result=${1%.*}.lo])
10122
10123  _LT_PROG_FUNCTION_REPLACE([func_arith], [    func_arith_result=$(( $[*] ))])
10124
10125  _LT_PROG_FUNCTION_REPLACE([func_len], [    func_len_result=${#1}])
10126fi
10127
10128if test x"$lt_shell_append" = xyes; then
10129  _LT_PROG_FUNCTION_REPLACE([func_append], [    eval "${1}+=\\${2}"])
10130
10131  _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
10132    func_quote_for_eval "${2}"
10133dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
10134    eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
10135
10136  # Save a `func_append' function call where possible by direct use of '+='
10137  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
10138    && mv -f "$cfgfile.tmp" "$cfgfile" \
10139      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
10140  test 0 -eq $? || _lt_function_replace_fail=:
10141else
10142  # Save a `func_append' function call even when '+=' is not available
10143  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
10144    && mv -f "$cfgfile.tmp" "$cfgfile" \
10145      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
10146  test 0 -eq $? || _lt_function_replace_fail=:
10147fi
10148
10149if test x"$_lt_function_replace_fail" = x":"; then
10150  AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
10151fi
10152])
10153
10154# _LT_PATH_CONVERSION_FUNCTIONS
10155# -----------------------------
10156# Determine which file name conversion functions should be used by
10157# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
10158# for certain cross-compile configurations and native mingw.
10159m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
10160[AC_REQUIRE([AC_CANONICAL_HOST])dnl
10161AC_REQUIRE([AC_CANONICAL_BUILD])dnl
10162AC_MSG_CHECKING([how to convert $build file names to $host format])
10163AC_CACHE_VAL(lt_cv_to_host_file_cmd,
10164[case $host in
10165  *-*-mingw* )
10166    case $build in
10167      *-*-mingw* ) # actually msys
10168        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
10169        ;;
10170      *-*-cygwin* )
10171        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
10172        ;;
10173      * ) # otherwise, assume *nix
10174        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
10175        ;;
10176    esac
10177    ;;
10178  *-*-cygwin* )
10179    case $build in
10180      *-*-mingw* ) # actually msys
10181        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
10182        ;;
10183      *-*-cygwin* )
10184        lt_cv_to_host_file_cmd=func_convert_file_noop
10185        ;;
10186      * ) # otherwise, assume *nix
10187        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
10188        ;;
10189    esac
10190    ;;
10191  * ) # unhandled hosts (and "normal" native builds)
10192    lt_cv_to_host_file_cmd=func_convert_file_noop
10193    ;;
10194esac
10195])
10196to_host_file_cmd=$lt_cv_to_host_file_cmd
10197AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
10198_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
10199         [0], [convert $build file names to $host format])dnl
10200
10201AC_MSG_CHECKING([how to convert $build file names to toolchain format])
10202AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
10203[#assume ordinary cross tools, or native build.
10204lt_cv_to_tool_file_cmd=func_convert_file_noop
10205case $host in
10206  *-*-mingw* )
10207    case $build in
10208      *-*-mingw* ) # actually msys
10209        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
10210        ;;
10211    esac
10212    ;;
10213esac
10214])
10215to_tool_file_cmd=$lt_cv_to_tool_file_cmd
10216AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
10217_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
10218         [0], [convert $build files to toolchain format])dnl
10219])# _LT_PATH_CONVERSION_FUNCTIONS
10220
10221# Helper functions for option handling.                    -*- Autoconf -*-
10222#
10223#   Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
10224#   Inc.
10225#   Written by Gary V. Vaughan, 2004
10226#
10227# This file is free software; the Free Software Foundation gives
10228# unlimited permission to copy and/or distribute it, with or without
10229# modifications, as long as this notice is preserved.
10230
10231# serial 7 ltoptions.m4
10232
10233# This is to help aclocal find these macros, as it can't see m4_define.
10234AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
10235
10236
10237# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
10238# ------------------------------------------
10239m4_define([_LT_MANGLE_OPTION],
10240[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
10241
10242
10243# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
10244# ---------------------------------------
10245# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
10246# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
10247# saved as a flag.
10248m4_define([_LT_SET_OPTION],
10249[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
10250m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
10251        _LT_MANGLE_DEFUN([$1], [$2]),
10252    [m4_warning([Unknown $1 option `$2'])])[]dnl
10253])
10254
10255
10256# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
10257# ------------------------------------------------------------
10258# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
10259m4_define([_LT_IF_OPTION],
10260[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
10261
10262
10263# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
10264# -------------------------------------------------------
10265# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
10266# are set.
10267m4_define([_LT_UNLESS_OPTIONS],
10268[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
10269	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
10270		      [m4_define([$0_found])])])[]dnl
10271m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
10272])[]dnl
10273])
10274
10275
10276# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
10277# ----------------------------------------
10278# OPTION-LIST is a space-separated list of Libtool options associated
10279# with MACRO-NAME.  If any OPTION has a matching handler declared with
10280# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
10281# the unknown option and exit.
10282m4_defun([_LT_SET_OPTIONS],
10283[# Set options
10284m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
10285    [_LT_SET_OPTION([$1], _LT_Option)])
10286
10287m4_if([$1],[LT_INIT],[
10288  dnl
10289  dnl Simply set some default values (i.e off) if boolean options were not
10290  dnl specified:
10291  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
10292  ])
10293  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
10294  ])
10295  dnl
10296  dnl If no reference was made to various pairs of opposing options, then
10297  dnl we run the default mode handler for the pair.  For example, if neither
10298  dnl `shared' nor `disable-shared' was passed, we enable building of shared
10299  dnl archives by default:
10300  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
10301  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
10302  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
10303  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
10304  		   [_LT_ENABLE_FAST_INSTALL])
10305  ])
10306])# _LT_SET_OPTIONS
10307
10308
10309
10310# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
10311# -----------------------------------------
10312m4_define([_LT_MANGLE_DEFUN],
10313[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
10314
10315
10316# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
10317# -----------------------------------------------
10318m4_define([LT_OPTION_DEFINE],
10319[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
10320])# LT_OPTION_DEFINE
10321
10322
10323# dlopen
10324# ------
10325LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
10326])
10327
10328AU_DEFUN([AC_LIBTOOL_DLOPEN],
10329[_LT_SET_OPTION([LT_INIT], [dlopen])
10330AC_DIAGNOSE([obsolete],
10331[$0: Remove this warning and the call to _LT_SET_OPTION when you
10332put the `dlopen' option into LT_INIT's first parameter.])
10333])
10334
10335dnl aclocal-1.4 backwards compatibility:
10336dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
10337
10338
10339# win32-dll
10340# ---------
10341# Declare package support for building win32 dll's.
10342LT_OPTION_DEFINE([LT_INIT], [win32-dll],
10343[enable_win32_dll=yes
10344
10345case $host in
10346*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
10347  AC_CHECK_TOOL(AS, as, false)
10348  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
10349  AC_CHECK_TOOL(OBJDUMP, objdump, false)
10350  ;;
10351esac
10352
10353test -z "$AS" && AS=as
10354_LT_DECL([], [AS],      [1], [Assembler program])dnl
10355
10356test -z "$DLLTOOL" && DLLTOOL=dlltool
10357_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
10358
10359test -z "$OBJDUMP" && OBJDUMP=objdump
10360_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
10361])# win32-dll
10362
10363AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
10364[AC_REQUIRE([AC_CANONICAL_HOST])dnl
10365_LT_SET_OPTION([LT_INIT], [win32-dll])
10366AC_DIAGNOSE([obsolete],
10367[$0: Remove this warning and the call to _LT_SET_OPTION when you
10368put the `win32-dll' option into LT_INIT's first parameter.])
10369])
10370
10371dnl aclocal-1.4 backwards compatibility:
10372dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
10373
10374
10375# _LT_ENABLE_SHARED([DEFAULT])
10376# ----------------------------
10377# implement the --enable-shared flag, and supports the `shared' and
10378# `disable-shared' LT_INIT options.
10379# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
10380m4_define([_LT_ENABLE_SHARED],
10381[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
10382AC_ARG_ENABLE([shared],
10383    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
10384	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
10385    [p=${PACKAGE-default}
10386    case $enableval in
10387    yes) enable_shared=yes ;;
10388    no) enable_shared=no ;;
10389    *)
10390      enable_shared=no
10391      # Look at the argument we got.  We use all the common list separators.
10392      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
10393      for pkg in $enableval; do
10394	IFS="$lt_save_ifs"
10395	if test "X$pkg" = "X$p"; then
10396	  enable_shared=yes
10397	fi
10398      done
10399      IFS="$lt_save_ifs"
10400      ;;
10401    esac],
10402    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
10403
10404    _LT_DECL([build_libtool_libs], [enable_shared], [0],
10405	[Whether or not to build shared libraries])
10406])# _LT_ENABLE_SHARED
10407
10408LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
10409LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
10410
10411# Old names:
10412AC_DEFUN([AC_ENABLE_SHARED],
10413[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
10414])
10415
10416AC_DEFUN([AC_DISABLE_SHARED],
10417[_LT_SET_OPTION([LT_INIT], [disable-shared])
10418])
10419
10420AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
10421AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
10422
10423dnl aclocal-1.4 backwards compatibility:
10424dnl AC_DEFUN([AM_ENABLE_SHARED], [])
10425dnl AC_DEFUN([AM_DISABLE_SHARED], [])
10426
10427
10428
10429# _LT_ENABLE_STATIC([DEFAULT])
10430# ----------------------------
10431# implement the --enable-static flag, and support the `static' and
10432# `disable-static' LT_INIT options.
10433# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
10434m4_define([_LT_ENABLE_STATIC],
10435[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
10436AC_ARG_ENABLE([static],
10437    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
10438	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
10439    [p=${PACKAGE-default}
10440    case $enableval in
10441    yes) enable_static=yes ;;
10442    no) enable_static=no ;;
10443    *)
10444     enable_static=no
10445      # Look at the argument we got.  We use all the common list separators.
10446      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
10447      for pkg in $enableval; do
10448	IFS="$lt_save_ifs"
10449	if test "X$pkg" = "X$p"; then
10450	  enable_static=yes
10451	fi
10452      done
10453      IFS="$lt_save_ifs"
10454      ;;
10455    esac],
10456    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
10457
10458    _LT_DECL([build_old_libs], [enable_static], [0],
10459	[Whether or not to build static libraries])
10460])# _LT_ENABLE_STATIC
10461
10462LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
10463LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
10464
10465# Old names:
10466AC_DEFUN([AC_ENABLE_STATIC],
10467[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
10468])
10469
10470AC_DEFUN([AC_DISABLE_STATIC],
10471[_LT_SET_OPTION([LT_INIT], [disable-static])
10472])
10473
10474AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
10475AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
10476
10477dnl aclocal-1.4 backwards compatibility:
10478dnl AC_DEFUN([AM_ENABLE_STATIC], [])
10479dnl AC_DEFUN([AM_DISABLE_STATIC], [])
10480
10481
10482
10483# _LT_ENABLE_FAST_INSTALL([DEFAULT])
10484# ----------------------------------
10485# implement the --enable-fast-install flag, and support the `fast-install'
10486# and `disable-fast-install' LT_INIT options.
10487# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
10488m4_define([_LT_ENABLE_FAST_INSTALL],
10489[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
10490AC_ARG_ENABLE([fast-install],
10491    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
10492    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
10493    [p=${PACKAGE-default}
10494    case $enableval in
10495    yes) enable_fast_install=yes ;;
10496    no) enable_fast_install=no ;;
10497    *)
10498      enable_fast_install=no
10499      # Look at the argument we got.  We use all the common list separators.
10500      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
10501      for pkg in $enableval; do
10502	IFS="$lt_save_ifs"
10503	if test "X$pkg" = "X$p"; then
10504	  enable_fast_install=yes
10505	fi
10506      done
10507      IFS="$lt_save_ifs"
10508      ;;
10509    esac],
10510    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
10511
10512_LT_DECL([fast_install], [enable_fast_install], [0],
10513	 [Whether or not to optimize for fast installation])dnl
10514])# _LT_ENABLE_FAST_INSTALL
10515
10516LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
10517LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
10518
10519# Old names:
10520AU_DEFUN([AC_ENABLE_FAST_INSTALL],
10521[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
10522AC_DIAGNOSE([obsolete],
10523[$0: Remove this warning and the call to _LT_SET_OPTION when you put
10524the `fast-install' option into LT_INIT's first parameter.])
10525])
10526
10527AU_DEFUN([AC_DISABLE_FAST_INSTALL],
10528[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
10529AC_DIAGNOSE([obsolete],
10530[$0: Remove this warning and the call to _LT_SET_OPTION when you put
10531the `disable-fast-install' option into LT_INIT's first parameter.])
10532])
10533
10534dnl aclocal-1.4 backwards compatibility:
10535dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
10536dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
10537
10538
10539# _LT_WITH_PIC([MODE])
10540# --------------------
10541# implement the --with-pic flag, and support the `pic-only' and `no-pic'
10542# LT_INIT options.
10543# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
10544m4_define([_LT_WITH_PIC],
10545[AC_ARG_WITH([pic],
10546    [AS_HELP_STRING([--with-pic],
10547	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
10548    [pic_mode="$withval"],
10549    [pic_mode=default])
10550
10551test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
10552
10553_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
10554])# _LT_WITH_PIC
10555
10556LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
10557LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
10558
10559# Old name:
10560AU_DEFUN([AC_LIBTOOL_PICMODE],
10561[_LT_SET_OPTION([LT_INIT], [pic-only])
10562AC_DIAGNOSE([obsolete],
10563[$0: Remove this warning and the call to _LT_SET_OPTION when you
10564put the `pic-only' option into LT_INIT's first parameter.])
10565])
10566
10567dnl aclocal-1.4 backwards compatibility:
10568dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
10569
10570
10571m4_define([_LTDL_MODE], [])
10572LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
10573		 [m4_define([_LTDL_MODE], [nonrecursive])])
10574LT_OPTION_DEFINE([LTDL_INIT], [recursive],
10575		 [m4_define([_LTDL_MODE], [recursive])])
10576LT_OPTION_DEFINE([LTDL_INIT], [subproject],
10577		 [m4_define([_LTDL_MODE], [subproject])])
10578
10579m4_define([_LTDL_TYPE], [])
10580LT_OPTION_DEFINE([LTDL_INIT], [installable],
10581		 [m4_define([_LTDL_TYPE], [installable])])
10582LT_OPTION_DEFINE([LTDL_INIT], [convenience],
10583		 [m4_define([_LTDL_TYPE], [convenience])])
10584
10585# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
10586#
10587# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
10588# Written by Gary V. Vaughan, 2004
10589#
10590# This file is free software; the Free Software Foundation gives
10591# unlimited permission to copy and/or distribute it, with or without
10592# modifications, as long as this notice is preserved.
10593
10594# serial 6 ltsugar.m4
10595
10596# This is to help aclocal find these macros, as it can't see m4_define.
10597AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
10598
10599
10600# lt_join(SEP, ARG1, [ARG2...])
10601# -----------------------------
10602# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
10603# associated separator.
10604# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
10605# versions in m4sugar had bugs.
10606m4_define([lt_join],
10607[m4_if([$#], [1], [],
10608       [$#], [2], [[$2]],
10609       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
10610m4_define([_lt_join],
10611[m4_if([$#$2], [2], [],
10612       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
10613
10614
10615# lt_car(LIST)
10616# lt_cdr(LIST)
10617# ------------
10618# Manipulate m4 lists.
10619# These macros are necessary as long as will still need to support
10620# Autoconf-2.59 which quotes differently.
10621m4_define([lt_car], [[$1]])
10622m4_define([lt_cdr],
10623[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
10624       [$#], 1, [],
10625       [m4_dquote(m4_shift($@))])])
10626m4_define([lt_unquote], $1)
10627
10628
10629# lt_append(MACRO-NAME, STRING, [SEPARATOR])
10630# ------------------------------------------
10631# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
10632# Note that neither SEPARATOR nor STRING are expanded; they are appended
10633# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
10634# No SEPARATOR is output if MACRO-NAME was previously undefined (different
10635# than defined and empty).
10636#
10637# This macro is needed until we can rely on Autoconf 2.62, since earlier
10638# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
10639m4_define([lt_append],
10640[m4_define([$1],
10641	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
10642
10643
10644
10645# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
10646# ----------------------------------------------------------
10647# Produce a SEP delimited list of all paired combinations of elements of
10648# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
10649# has the form PREFIXmINFIXSUFFIXn.
10650# Needed until we can rely on m4_combine added in Autoconf 2.62.
10651m4_define([lt_combine],
10652[m4_if(m4_eval([$# > 3]), [1],
10653       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
10654[[m4_foreach([_Lt_prefix], [$2],
10655	     [m4_foreach([_Lt_suffix],
10656		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
10657	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
10658
10659
10660# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
10661# -----------------------------------------------------------------------
10662# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
10663# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
10664m4_define([lt_if_append_uniq],
10665[m4_ifdef([$1],
10666	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
10667		 [lt_append([$1], [$2], [$3])$4],
10668		 [$5])],
10669	  [lt_append([$1], [$2], [$3])$4])])
10670
10671
10672# lt_dict_add(DICT, KEY, VALUE)
10673# -----------------------------
10674m4_define([lt_dict_add],
10675[m4_define([$1($2)], [$3])])
10676
10677
10678# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
10679# --------------------------------------------
10680m4_define([lt_dict_add_subkey],
10681[m4_define([$1($2:$3)], [$4])])
10682
10683
10684# lt_dict_fetch(DICT, KEY, [SUBKEY])
10685# ----------------------------------
10686m4_define([lt_dict_fetch],
10687[m4_ifval([$3],
10688	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
10689    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
10690
10691
10692# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
10693# -----------------------------------------------------------------
10694m4_define([lt_if_dict_fetch],
10695[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
10696	[$5],
10697    [$6])])
10698
10699
10700# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
10701# --------------------------------------------------------------
10702m4_define([lt_dict_filter],
10703[m4_if([$5], [], [],
10704  [lt_join(m4_quote(m4_default([$4], [[, ]])),
10705           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
10706		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
10707])
10708
10709# ltversion.m4 -- version numbers			-*- Autoconf -*-
10710#
10711#   Copyright (C) 2004 Free Software Foundation, Inc.
10712#   Written by Scott James Remnant, 2004
10713#
10714# This file is free software; the Free Software Foundation gives
10715# unlimited permission to copy and/or distribute it, with or without
10716# modifications, as long as this notice is preserved.
10717
10718# @configure_input@
10719
10720# serial 3293 ltversion.m4
10721# This file is part of GNU Libtool
10722
10723m4_define([LT_PACKAGE_VERSION], [2.4])
10724m4_define([LT_PACKAGE_REVISION], [1.3293])
10725
10726AC_DEFUN([LTVERSION_VERSION],
10727[macro_version='2.4'
10728macro_revision='1.3293'
10729_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
10730_LT_DECL(, macro_revision, 0)
10731])
10732
10733# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
10734#
10735#   Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
10736#   Written by Scott James Remnant, 2004.
10737#
10738# This file is free software; the Free Software Foundation gives
10739# unlimited permission to copy and/or distribute it, with or without
10740# modifications, as long as this notice is preserved.
10741
10742# serial 5 lt~obsolete.m4
10743
10744# These exist entirely to fool aclocal when bootstrapping libtool.
10745#
10746# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
10747# which have later been changed to m4_define as they aren't part of the
10748# exported API, or moved to Autoconf or Automake where they belong.
10749#
10750# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
10751# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
10752# using a macro with the same name in our local m4/libtool.m4 it'll
10753# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
10754# and doesn't know about Autoconf macros at all.)
10755#
10756# So we provide this file, which has a silly filename so it's always
10757# included after everything else.  This provides aclocal with the
10758# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
10759# because those macros already exist, or will be overwritten later.
10760# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
10761#
10762# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
10763# Yes, that means every name once taken will need to remain here until
10764# we give up compatibility with versions before 1.7, at which point
10765# we need to keep only those names which we still refer to.
10766
10767# This is to help aclocal find these macros, as it can't see m4_define.
10768AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
10769
10770m4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
10771m4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
10772m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
10773m4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
10774m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
10775m4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
10776m4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
10777m4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
10778m4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
10779m4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
10780m4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
10781m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
10782m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
10783m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
10784m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
10785m4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
10786m4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
10787m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
10788m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
10789m4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
10790m4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
10791m4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
10792m4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
10793m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
10794m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
10795m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
10796m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
10797m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
10798m4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
10799m4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
10800m4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
10801m4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
10802m4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
10803m4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
10804m4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
10805m4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
10806m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
10807m4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
10808m4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
10809m4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
10810m4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
10811m4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
10812m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
10813m4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
10814m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
10815m4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
10816m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
10817m4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
10818m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
10819m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
10820m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
10821m4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
10822m4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
10823m4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
10824m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS],	[AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
10825m4_ifndef([_LT_AC_PROG_CXXCPP],		[AC_DEFUN([_LT_AC_PROG_CXXCPP])])
10826m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS],	[AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
10827m4_ifndef([_LT_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
10828m4_ifndef([_LT_PROG_F77],		[AC_DEFUN([_LT_PROG_F77])])
10829m4_ifndef([_LT_PROG_FC],		[AC_DEFUN([_LT_PROG_FC])])
10830m4_ifndef([_LT_PROG_CXX],		[AC_DEFUN([_LT_PROG_CXX])])
10831
10832