aclocal.m4 revision 66ab3337
1# generated automatically by aclocal 1.16.5 -*- Autoconf -*-
2
3# Copyright (C) 1996-2021 Free Software Foundation, Inc.
4
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_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
15m4_ifndef([AC_AUTOCONF_VERSION],
16  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
17m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],,
18[m4_warning([this file was generated for autoconf 2.71.
19You have another version of autoconf.  It may work, but is not guaranteed to.
20If you have problems, you may need to regenerate the build system entirely.
21To do so, use the procedure documented by the package, typically 'autoreconf'.])])
22
23# Copyright (C) 2002-2021 Free Software Foundation, Inc.
24#
25# This file is free software; the Free Software Foundation
26# gives unlimited permission to copy and/or distribute it,
27# with or without modifications, as long as this notice is preserved.
28
29# AM_AUTOMAKE_VERSION(VERSION)
30# ----------------------------
31# Automake X.Y traces this macro to ensure aclocal.m4 has been
32# generated from the m4 files accompanying Automake X.Y.
33# (This private macro should not be called outside this file.)
34AC_DEFUN([AM_AUTOMAKE_VERSION],
35[am__api_version='1.16'
36dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
37dnl require some minimum version.  Point them to the right macro.
38m4_if([$1], [1.16.5], [],
39      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
40])
41
42# _AM_AUTOCONF_VERSION(VERSION)
43# -----------------------------
44# aclocal traces this macro to find the Autoconf version.
45# This is a private macro too.  Using m4_define simplifies
46# the logic in aclocal, which can simply ignore this definition.
47m4_define([_AM_AUTOCONF_VERSION], [])
48
49# AM_SET_CURRENT_AUTOMAKE_VERSION
50# -------------------------------
51# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
52# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
53AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
54[AM_AUTOMAKE_VERSION([1.16.5])dnl
55m4_ifndef([AC_AUTOCONF_VERSION],
56  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
57_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
58
59# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
60
61# Copyright (C) 2001-2021 Free Software Foundation, Inc.
62#
63# This file is free software; the Free Software Foundation
64# gives unlimited permission to copy and/or distribute it,
65# with or without modifications, as long as this notice is preserved.
66
67# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
68# $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
69# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
70#
71# Of course, Automake must honor this variable whenever it calls a
72# tool from the auxiliary directory.  The problem is that $srcdir (and
73# therefore $ac_aux_dir as well) can be either absolute or relative,
74# depending on how configure is run.  This is pretty annoying, since
75# it makes $ac_aux_dir quite unusable in subdirectories: in the top
76# source directory, any form will work fine, but in subdirectories a
77# relative path needs to be adjusted first.
78#
79# $ac_aux_dir/missing
80#    fails when called from a subdirectory if $ac_aux_dir is relative
81# $top_srcdir/$ac_aux_dir/missing
82#    fails if $ac_aux_dir is absolute,
83#    fails when called from a subdirectory in a VPATH build with
84#          a relative $ac_aux_dir
85#
86# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
87# are both prefixed by $srcdir.  In an in-source build this is usually
88# harmless because $srcdir is '.', but things will broke when you
89# start a VPATH build or use an absolute $srcdir.
90#
91# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
92# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
93#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
94# and then we would define $MISSING as
95#   MISSING="\${SHELL} $am_aux_dir/missing"
96# This will work as long as MISSING is not called from configure, because
97# unfortunately $(top_srcdir) has no meaning in configure.
98# However there are other variables, like CC, which are often used in
99# configure, and could therefore not use this "fixed" $ac_aux_dir.
100#
101# Another solution, used here, is to always expand $ac_aux_dir to an
102# absolute PATH.  The drawback is that using absolute paths prevent a
103# configured tree to be moved without reconfiguration.
104
105AC_DEFUN([AM_AUX_DIR_EXPAND],
106[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])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-2021 Free Software Foundation, Inc.
114#
115# This file is free software; the Free Software Foundation
116# gives unlimited permission to copy and/or distribute it,
117# with or without modifications, as long as this notice is preserved.
118
119# AM_CONDITIONAL(NAME, SHELL-CONDITION)
120# -------------------------------------
121# Define a conditional.
122AC_DEFUN([AM_CONDITIONAL],
123[AC_PREREQ([2.52])dnl
124 m4_if([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
125       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
126AC_SUBST([$1_TRUE])dnl
127AC_SUBST([$1_FALSE])dnl
128_AM_SUBST_NOTMAKE([$1_TRUE])dnl
129_AM_SUBST_NOTMAKE([$1_FALSE])dnl
130m4_define([_AM_COND_VALUE_$1], [$2])dnl
131if $2; then
132  $1_TRUE=
133  $1_FALSE='#'
134else
135  $1_TRUE='#'
136  $1_FALSE=
137fi
138AC_CONFIG_COMMANDS_PRE(
139[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
140  AC_MSG_ERROR([[conditional "$1" was never defined.
141Usually this means the macro was only invoked conditionally.]])
142fi])])
143
144# Copyright (C) 1999-2021 Free Software Foundation, Inc.
145#
146# This file is free software; the Free Software Foundation
147# gives unlimited permission to copy and/or distribute it,
148# with or without modifications, as long as this notice is preserved.
149
150
151# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
152# written in clear, in which case automake, when reading aclocal.m4,
153# will think it sees a *use*, and therefore will trigger all it's
154# C support machinery.  Also note that it means that autoscan, seeing
155# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
156
157
158# _AM_DEPENDENCIES(NAME)
159# ----------------------
160# See how the compiler implements dependency checking.
161# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
162# We try a few techniques and use that to set a single cache variable.
163#
164# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
165# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
166# dependency, and given that the user is not expected to run this macro,
167# just rely on AC_PROG_CC.
168AC_DEFUN([_AM_DEPENDENCIES],
169[AC_REQUIRE([AM_SET_DEPDIR])dnl
170AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
171AC_REQUIRE([AM_MAKE_INCLUDE])dnl
172AC_REQUIRE([AM_DEP_TRACK])dnl
173
174m4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
175      [$1], [CXX],  [depcc="$CXX"  am_compiler_list=],
176      [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
177      [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
178      [$1], [UPC],  [depcc="$UPC"  am_compiler_list=],
179      [$1], [GCJ],  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
180                    [depcc="$$1"   am_compiler_list=])
181
182AC_CACHE_CHECK([dependency style of $depcc],
183               [am_cv_$1_dependencies_compiler_type],
184[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
185  # We make a subdir and do the tests there.  Otherwise we can end up
186  # making bogus files that we don't know about and never remove.  For
187  # instance it was reported that on HP-UX the gcc test will end up
188  # making a dummy file named 'D' -- because '-MD' means "put the output
189  # in D".
190  rm -rf conftest.dir
191  mkdir conftest.dir
192  # Copy depcomp to subdir because otherwise we won't find it if we're
193  # using a relative directory.
194  cp "$am_depcomp" conftest.dir
195  cd conftest.dir
196  # We will build objects and dependencies in a subdirectory because
197  # it helps to detect inapplicable dependency modes.  For instance
198  # both Tru64's cc and ICC support -MD to output dependencies as a
199  # side effect of compilation, but ICC will put the dependencies in
200  # the current directory while Tru64 will put them in the object
201  # directory.
202  mkdir sub
203
204  am_cv_$1_dependencies_compiler_type=none
205  if test "$am_compiler_list" = ""; then
206     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
207  fi
208  am__universal=false
209  m4_case([$1], [CC],
210    [case " $depcc " in #(
211     *\ -arch\ *\ -arch\ *) am__universal=true ;;
212     esac],
213    [CXX],
214    [case " $depcc " in #(
215     *\ -arch\ *\ -arch\ *) am__universal=true ;;
216     esac])
217
218  for depmode in $am_compiler_list; do
219    # Setup a source with many dependencies, because some compilers
220    # like to wrap large dependency lists on column 80 (with \), and
221    # we should not choose a depcomp mode which is confused by this.
222    #
223    # We need to recreate these files for each test, as the compiler may
224    # overwrite some of them when testing with obscure command lines.
225    # This happens at least with the AIX C compiler.
226    : > sub/conftest.c
227    for i in 1 2 3 4 5 6; do
228      echo '#include "conftst'$i'.h"' >> sub/conftest.c
229      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
230      # Solaris 10 /bin/sh.
231      echo '/* dummy */' > sub/conftst$i.h
232    done
233    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
234
235    # We check with '-c' and '-o' for the sake of the "dashmstdout"
236    # mode.  It turns out that the SunPro C++ compiler does not properly
237    # handle '-M -o', and we need to detect this.  Also, some Intel
238    # versions had trouble with output in subdirs.
239    am__obj=sub/conftest.${OBJEXT-o}
240    am__minus_obj="-o $am__obj"
241    case $depmode in
242    gcc)
243      # This depmode causes a compiler race in universal mode.
244      test "$am__universal" = false || continue
245      ;;
246    nosideeffect)
247      # After this tag, mechanisms are not by side-effect, so they'll
248      # only be used when explicitly requested.
249      if test "x$enable_dependency_tracking" = xyes; then
250	continue
251      else
252	break
253      fi
254      ;;
255    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
256      # This compiler won't grok '-c -o', but also, the minuso test has
257      # not run yet.  These depmodes are late enough in the game, and
258      # so weak that their functioning should not be impacted.
259      am__obj=conftest.${OBJEXT-o}
260      am__minus_obj=
261      ;;
262    none) break ;;
263    esac
264    if depmode=$depmode \
265       source=sub/conftest.c object=$am__obj \
266       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
267       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
268         >/dev/null 2>conftest.err &&
269       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
270       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
271       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
272       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
273      # icc doesn't choke on unknown options, it will just issue warnings
274      # or remarks (even with -Werror).  So we grep stderr for any message
275      # that says an option was ignored or not supported.
276      # When given -MP, icc 7.0 and 7.1 complain thusly:
277      #   icc: Command line warning: ignoring option '-M'; no argument required
278      # The diagnosis changed in icc 8.0:
279      #   icc: Command line remark: option '-MP' not supported
280      if (grep 'ignoring option' conftest.err ||
281          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
282        am_cv_$1_dependencies_compiler_type=$depmode
283        break
284      fi
285    fi
286  done
287
288  cd ..
289  rm -rf conftest.dir
290else
291  am_cv_$1_dependencies_compiler_type=none
292fi
293])
294AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
295AM_CONDITIONAL([am__fastdep$1], [
296  test "x$enable_dependency_tracking" != xno \
297  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
298])
299
300
301# AM_SET_DEPDIR
302# -------------
303# Choose a directory name for dependency files.
304# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
305AC_DEFUN([AM_SET_DEPDIR],
306[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
307AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
308])
309
310
311# AM_DEP_TRACK
312# ------------
313AC_DEFUN([AM_DEP_TRACK],
314[AC_ARG_ENABLE([dependency-tracking], [dnl
315AS_HELP_STRING(
316  [--enable-dependency-tracking],
317  [do not reject slow dependency extractors])
318AS_HELP_STRING(
319  [--disable-dependency-tracking],
320  [speeds up one-time build])])
321if test "x$enable_dependency_tracking" != xno; then
322  am_depcomp="$ac_aux_dir/depcomp"
323  AMDEPBACKSLASH='\'
324  am__nodep='_no'
325fi
326AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
327AC_SUBST([AMDEPBACKSLASH])dnl
328_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
329AC_SUBST([am__nodep])dnl
330_AM_SUBST_NOTMAKE([am__nodep])dnl
331])
332
333# Generate code to set up dependency tracking.              -*- Autoconf -*-
334
335# Copyright (C) 1999-2021 Free Software Foundation, Inc.
336#
337# This file is free software; the Free Software Foundation
338# gives unlimited permission to copy and/or distribute it,
339# with or without modifications, as long as this notice is preserved.
340
341# _AM_OUTPUT_DEPENDENCY_COMMANDS
342# ------------------------------
343AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
344[{
345  # Older Autoconf quotes --file arguments for eval, but not when files
346  # are listed without --file.  Let's play safe and only enable the eval
347  # if we detect the quoting.
348  # TODO: see whether this extra hack can be removed once we start
349  # requiring Autoconf 2.70 or later.
350  AS_CASE([$CONFIG_FILES],
351          [*\'*], [eval set x "$CONFIG_FILES"],
352          [*], [set x $CONFIG_FILES])
353  shift
354  # Used to flag and report bootstrapping failures.
355  am_rc=0
356  for am_mf
357  do
358    # Strip MF so we end up with the name of the file.
359    am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'`
360    # Check whether this is an Automake generated Makefile which includes
361    # dependency-tracking related rules and includes.
362    # Grep'ing the whole file directly is not great: AIX grep has a line
363    # limit of 2048, but all sed's we know have understand at least 4000.
364    sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
365      || continue
366    am_dirpart=`AS_DIRNAME(["$am_mf"])`
367    am_filepart=`AS_BASENAME(["$am_mf"])`
368    AM_RUN_LOG([cd "$am_dirpart" \
369      && sed -e '/# am--include-marker/d' "$am_filepart" \
370        | $MAKE -f - am--depfiles]) || am_rc=$?
371  done
372  if test $am_rc -ne 0; then
373    AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
374    for automatic dependency tracking.  If GNU make was not used, consider
375    re-running the configure script with MAKE="gmake" (or whatever is
376    necessary).  You can also try re-running configure with the
377    '--disable-dependency-tracking' option to at least be able to build
378    the package (albeit without support for automatic dependency tracking).])
379  fi
380  AS_UNSET([am_dirpart])
381  AS_UNSET([am_filepart])
382  AS_UNSET([am_mf])
383  AS_UNSET([am_rc])
384  rm -f conftest-deps.mk
385}
386])# _AM_OUTPUT_DEPENDENCY_COMMANDS
387
388
389# AM_OUTPUT_DEPENDENCY_COMMANDS
390# -----------------------------
391# This macro should only be invoked once -- use via AC_REQUIRE.
392#
393# This code is only required when automatic dependency tracking is enabled.
394# This creates each '.Po' and '.Plo' makefile fragment that we'll need in
395# order to bootstrap the dependency handling code.
396AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
397[AC_CONFIG_COMMANDS([depfiles],
398     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
399     [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])])
400
401# Do all the work for Automake.                             -*- Autoconf -*-
402
403# Copyright (C) 1996-2021 Free Software Foundation, Inc.
404#
405# This file is free software; the Free Software Foundation
406# gives unlimited permission to copy and/or distribute it,
407# with or without modifications, as long as this notice is preserved.
408
409# This macro actually does too much.  Some checks are only needed if
410# your package does certain things.  But this isn't really a big deal.
411
412dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
413m4_define([AC_PROG_CC],
414m4_defn([AC_PROG_CC])
415[_AM_PROG_CC_C_O
416])
417
418# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
419# AM_INIT_AUTOMAKE([OPTIONS])
420# -----------------------------------------------
421# The call with PACKAGE and VERSION arguments is the old style
422# call (pre autoconf-2.50), which is being phased out.  PACKAGE
423# and VERSION should now be passed to AC_INIT and removed from
424# the call to AM_INIT_AUTOMAKE.
425# We support both call styles for the transition.  After
426# the next Automake release, Autoconf can make the AC_INIT
427# arguments mandatory, and then we can depend on a new Autoconf
428# release and drop the old call support.
429AC_DEFUN([AM_INIT_AUTOMAKE],
430[AC_PREREQ([2.65])dnl
431m4_ifdef([_$0_ALREADY_INIT],
432  [m4_fatal([$0 expanded multiple times
433]m4_defn([_$0_ALREADY_INIT]))],
434  [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl
435dnl Autoconf wants to disallow AM_ names.  We explicitly allow
436dnl the ones we care about.
437m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
438AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
439AC_REQUIRE([AC_PROG_INSTALL])dnl
440if test "`cd $srcdir && pwd`" != "`pwd`"; then
441  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
442  # is not polluted with repeated "-I."
443  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
444  # test to see if srcdir already configured
445  if test -f $srcdir/config.status; then
446    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
447  fi
448fi
449
450# test whether we have cygpath
451if test -z "$CYGPATH_W"; then
452  if (cygpath --version) >/dev/null 2>/dev/null; then
453    CYGPATH_W='cygpath -w'
454  else
455    CYGPATH_W=echo
456  fi
457fi
458AC_SUBST([CYGPATH_W])
459
460# Define the identity of the package.
461dnl Distinguish between old-style and new-style calls.
462m4_ifval([$2],
463[AC_DIAGNOSE([obsolete],
464             [$0: two- and three-arguments forms are deprecated.])
465m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
466 AC_SUBST([PACKAGE], [$1])dnl
467 AC_SUBST([VERSION], [$2])],
468[_AM_SET_OPTIONS([$1])dnl
469dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
470m4_if(
471  m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]),
472  [ok:ok],,
473  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
474 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
475 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
476
477_AM_IF_OPTION([no-define],,
478[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
479 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
480
481# Some tools Automake needs.
482AC_REQUIRE([AM_SANITY_CHECK])dnl
483AC_REQUIRE([AC_ARG_PROGRAM])dnl
484AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
485AM_MISSING_PROG([AUTOCONF], [autoconf])
486AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
487AM_MISSING_PROG([AUTOHEADER], [autoheader])
488AM_MISSING_PROG([MAKEINFO], [makeinfo])
489AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
490AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
491AC_REQUIRE([AC_PROG_MKDIR_P])dnl
492# For better backward compatibility.  To be removed once Automake 1.9.x
493# dies out for good.  For more background, see:
494# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
495# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
496AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
497# We need awk for the "check" target (and possibly the TAP driver).  The
498# system "awk" is bad on some platforms.
499AC_REQUIRE([AC_PROG_AWK])dnl
500AC_REQUIRE([AC_PROG_MAKE_SET])dnl
501AC_REQUIRE([AM_SET_LEADING_DOT])dnl
502_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
503	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
504			     [_AM_PROG_TAR([v7])])])
505_AM_IF_OPTION([no-dependencies],,
506[AC_PROVIDE_IFELSE([AC_PROG_CC],
507		  [_AM_DEPENDENCIES([CC])],
508		  [m4_define([AC_PROG_CC],
509			     m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
510AC_PROVIDE_IFELSE([AC_PROG_CXX],
511		  [_AM_DEPENDENCIES([CXX])],
512		  [m4_define([AC_PROG_CXX],
513			     m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
514AC_PROVIDE_IFELSE([AC_PROG_OBJC],
515		  [_AM_DEPENDENCIES([OBJC])],
516		  [m4_define([AC_PROG_OBJC],
517			     m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
518AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
519		  [_AM_DEPENDENCIES([OBJCXX])],
520		  [m4_define([AC_PROG_OBJCXX],
521			     m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
522])
523# Variables for tags utilities; see am/tags.am
524if test -z "$CTAGS"; then
525  CTAGS=ctags
526fi
527AC_SUBST([CTAGS])
528if test -z "$ETAGS"; then
529  ETAGS=etags
530fi
531AC_SUBST([ETAGS])
532if test -z "$CSCOPE"; then
533  CSCOPE=cscope
534fi
535AC_SUBST([CSCOPE])
536
537AC_REQUIRE([AM_SILENT_RULES])dnl
538dnl The testsuite driver may need to know about EXEEXT, so add the
539dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
540dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
541AC_CONFIG_COMMANDS_PRE(dnl
542[m4_provide_if([_AM_COMPILER_EXEEXT],
543  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
544
545# POSIX will say in a future version that running "rm -f" with no argument
546# is OK; and we want to be able to make that assumption in our Makefile
547# recipes.  So use an aggressive probe to check that the usage we want is
548# actually supported "in the wild" to an acceptable degree.
549# See automake bug#10828.
550# To make any issue more visible, cause the running configure to be aborted
551# by default if the 'rm' program in use doesn't match our expectations; the
552# user can still override this though.
553if rm -f && rm -fr && rm -rf; then : OK; else
554  cat >&2 <<'END'
555Oops!
556
557Your 'rm' program seems unable to run without file operands specified
558on the command line, even when the '-f' option is present.  This is contrary
559to the behaviour of most rm programs out there, and not conforming with
560the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
561
562Please tell bug-automake@gnu.org about your system, including the value
563of your $PATH and any error possibly output before this message.  This
564can help us improve future automake versions.
565
566END
567  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
568    echo 'Configuration will proceed anyway, since you have set the' >&2
569    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
570    echo >&2
571  else
572    cat >&2 <<'END'
573Aborting the configuration process, to ensure you take notice of the issue.
574
575You can download and install GNU coreutils to get an 'rm' implementation
576that behaves properly: <https://www.gnu.org/software/coreutils/>.
577
578If you want to complete the configuration process using your problematic
579'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
580to "yes", and re-run configure.
581
582END
583    AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
584  fi
585fi
586dnl The trailing newline in this macro's definition is deliberate, for
587dnl backward compatibility and to allow trailing 'dnl'-style comments
588dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
589])
590
591dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
592dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
593dnl mangled by Autoconf and run in a shell conditional statement.
594m4_define([_AC_COMPILER_EXEEXT],
595m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
596
597# When config.status generates a header, we must update the stamp-h file.
598# This file resides in the same directory as the config header
599# that is generated.  The stamp files are numbered to have different names.
600
601# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
602# loop where config.status creates the headers, so we can generate
603# our stamp files there.
604AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
605[# Compute $1's index in $config_headers.
606_am_arg=$1
607_am_stamp_count=1
608for _am_header in $config_headers :; do
609  case $_am_header in
610    $_am_arg | $_am_arg:* )
611      break ;;
612    * )
613      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
614  esac
615done
616echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
617
618# Copyright (C) 2001-2021 Free Software Foundation, Inc.
619#
620# This file is free software; the Free Software Foundation
621# gives unlimited permission to copy and/or distribute it,
622# with or without modifications, as long as this notice is preserved.
623
624# AM_PROG_INSTALL_SH
625# ------------------
626# Define $install_sh.
627AC_DEFUN([AM_PROG_INSTALL_SH],
628[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
629if test x"${install_sh+set}" != xset; then
630  case $am_aux_dir in
631  *\ * | *\	*)
632    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
633  *)
634    install_sh="\${SHELL} $am_aux_dir/install-sh"
635  esac
636fi
637AC_SUBST([install_sh])])
638
639# Copyright (C) 2003-2021 Free Software Foundation, Inc.
640#
641# This file is free software; the Free Software Foundation
642# gives unlimited permission to copy and/or distribute it,
643# with or without modifications, as long as this notice is preserved.
644
645# Check whether the underlying file-system supports filenames
646# with a leading dot.  For instance MS-DOS doesn't.
647AC_DEFUN([AM_SET_LEADING_DOT],
648[rm -rf .tst 2>/dev/null
649mkdir .tst 2>/dev/null
650if test -d .tst; then
651  am__leading_dot=.
652else
653  am__leading_dot=_
654fi
655rmdir .tst 2>/dev/null
656AC_SUBST([am__leading_dot])])
657
658# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
659# From Jim Meyering
660
661# Copyright (C) 1996-2021 Free Software Foundation, Inc.
662#
663# This file is free software; the Free Software Foundation
664# gives unlimited permission to copy and/or distribute it,
665# with or without modifications, as long as this notice is preserved.
666
667# AM_MAINTAINER_MODE([DEFAULT-MODE])
668# ----------------------------------
669# Control maintainer-specific portions of Makefiles.
670# Default is to disable them, unless 'enable' is passed literally.
671# For symmetry, 'disable' may be passed as well.  Anyway, the user
672# can override the default with the --enable/--disable switch.
673AC_DEFUN([AM_MAINTAINER_MODE],
674[m4_case(m4_default([$1], [disable]),
675       [enable], [m4_define([am_maintainer_other], [disable])],
676       [disable], [m4_define([am_maintainer_other], [enable])],
677       [m4_define([am_maintainer_other], [enable])
678        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
679AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
680  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
681  AC_ARG_ENABLE([maintainer-mode],
682    [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
683      am_maintainer_other[ make rules and dependencies not useful
684      (and sometimes confusing) to the casual installer])],
685    [USE_MAINTAINER_MODE=$enableval],
686    [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
687  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
688  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
689  MAINT=$MAINTAINER_MODE_TRUE
690  AC_SUBST([MAINT])dnl
691]
692)
693
694# Check to see how 'make' treats includes.	            -*- Autoconf -*-
695
696# Copyright (C) 2001-2021 Free Software Foundation, Inc.
697#
698# This file is free software; the Free Software Foundation
699# gives unlimited permission to copy and/or distribute it,
700# with or without modifications, as long as this notice is preserved.
701
702# AM_MAKE_INCLUDE()
703# -----------------
704# Check whether make has an 'include' directive that can support all
705# the idioms we need for our automatic dependency tracking code.
706AC_DEFUN([AM_MAKE_INCLUDE],
707[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive])
708cat > confinc.mk << 'END'
709am__doit:
710	@echo this is the am__doit target >confinc.out
711.PHONY: am__doit
712END
713am__include="#"
714am__quote=
715# BSD make does it like this.
716echo '.include "confinc.mk" # ignored' > confmf.BSD
717# Other make implementations (GNU, Solaris 10, AIX) do it like this.
718echo 'include confinc.mk # ignored' > confmf.GNU
719_am_result=no
720for s in GNU BSD; do
721  AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out])
722  AS_CASE([$?:`cat confinc.out 2>/dev/null`],
723      ['0:this is the am__doit target'],
724      [AS_CASE([$s],
725          [BSD], [am__include='.include' am__quote='"'],
726          [am__include='include' am__quote=''])])
727  if test "$am__include" != "#"; then
728    _am_result="yes ($s style)"
729    break
730  fi
731done
732rm -f confinc.* confmf.*
733AC_MSG_RESULT([${_am_result}])
734AC_SUBST([am__include])])
735AC_SUBST([am__quote])])
736
737# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
738
739# Copyright (C) 1997-2021 Free Software Foundation, Inc.
740#
741# This file is free software; the Free Software Foundation
742# gives unlimited permission to copy and/or distribute it,
743# with or without modifications, as long as this notice is preserved.
744
745# AM_MISSING_PROG(NAME, PROGRAM)
746# ------------------------------
747AC_DEFUN([AM_MISSING_PROG],
748[AC_REQUIRE([AM_MISSING_HAS_RUN])
749$1=${$1-"${am_missing_run}$2"}
750AC_SUBST($1)])
751
752# AM_MISSING_HAS_RUN
753# ------------------
754# Define MISSING if not defined so far and test if it is modern enough.
755# If it is, set am_missing_run to use it, otherwise, to nothing.
756AC_DEFUN([AM_MISSING_HAS_RUN],
757[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
758AC_REQUIRE_AUX_FILE([missing])dnl
759if test x"${MISSING+set}" != xset; then
760  MISSING="\${SHELL} '$am_aux_dir/missing'"
761fi
762# Use eval to expand $SHELL
763if eval "$MISSING --is-lightweight"; then
764  am_missing_run="$MISSING "
765else
766  am_missing_run=
767  AC_MSG_WARN(['missing' script is too old or missing])
768fi
769])
770
771# Helper functions for option handling.                     -*- Autoconf -*-
772
773# Copyright (C) 2001-2021 Free Software Foundation, Inc.
774#
775# This file is free software; the Free Software Foundation
776# gives unlimited permission to copy and/or distribute it,
777# with or without modifications, as long as this notice is preserved.
778
779# _AM_MANGLE_OPTION(NAME)
780# -----------------------
781AC_DEFUN([_AM_MANGLE_OPTION],
782[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
783
784# _AM_SET_OPTION(NAME)
785# --------------------
786# Set option NAME.  Presently that only means defining a flag for this option.
787AC_DEFUN([_AM_SET_OPTION],
788[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
789
790# _AM_SET_OPTIONS(OPTIONS)
791# ------------------------
792# OPTIONS is a space-separated list of Automake options.
793AC_DEFUN([_AM_SET_OPTIONS],
794[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
795
796# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
797# -------------------------------------------
798# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
799AC_DEFUN([_AM_IF_OPTION],
800[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
801
802# Copyright (C) 1999-2021 Free Software Foundation, Inc.
803#
804# This file is free software; the Free Software Foundation
805# gives unlimited permission to copy and/or distribute it,
806# with or without modifications, as long as this notice is preserved.
807
808# _AM_PROG_CC_C_O
809# ---------------
810# Like AC_PROG_CC_C_O, but changed for automake.  We rewrite AC_PROG_CC
811# to automatically call this.
812AC_DEFUN([_AM_PROG_CC_C_O],
813[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
814AC_REQUIRE_AUX_FILE([compile])dnl
815AC_LANG_PUSH([C])dnl
816AC_CACHE_CHECK(
817  [whether $CC understands -c and -o together],
818  [am_cv_prog_cc_c_o],
819  [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
820  # Make sure it works both with $CC and with simple cc.
821  # Following AC_PROG_CC_C_O, we do the test twice because some
822  # compilers refuse to overwrite an existing .o file with -o,
823  # though they will create one.
824  am_cv_prog_cc_c_o=yes
825  for am_i in 1 2; do
826    if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
827         && test -f conftest2.$ac_objext; then
828      : OK
829    else
830      am_cv_prog_cc_c_o=no
831      break
832    fi
833  done
834  rm -f core conftest*
835  unset am_i])
836if test "$am_cv_prog_cc_c_o" != yes; then
837   # Losing compiler, so override with the script.
838   # FIXME: It is wrong to rewrite CC.
839   # But if we don't then we get into trouble of one sort or another.
840   # A longer-term fix would be to have automake use am__CC in this case,
841   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
842   CC="$am_aux_dir/compile $CC"
843fi
844AC_LANG_POP([C])])
845
846# For backward compatibility.
847AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
848
849# Copyright (C) 2001-2021 Free Software Foundation, Inc.
850#
851# This file is free software; the Free Software Foundation
852# gives unlimited permission to copy and/or distribute it,
853# with or without modifications, as long as this notice is preserved.
854
855# AM_RUN_LOG(COMMAND)
856# -------------------
857# Run COMMAND, save the exit status in ac_status, and log it.
858# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
859AC_DEFUN([AM_RUN_LOG],
860[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
861   ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
862   ac_status=$?
863   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
864   (exit $ac_status); }])
865
866# Check to make sure that the build environment is sane.    -*- Autoconf -*-
867
868# Copyright (C) 1996-2021 Free Software Foundation, Inc.
869#
870# This file is free software; the Free Software Foundation
871# gives unlimited permission to copy and/or distribute it,
872# with or without modifications, as long as this notice is preserved.
873
874# AM_SANITY_CHECK
875# ---------------
876AC_DEFUN([AM_SANITY_CHECK],
877[AC_MSG_CHECKING([whether build environment is sane])
878# Reject unsafe characters in $srcdir or the absolute working directory
879# name.  Accept space and tab only in the latter.
880am_lf='
881'
882case `pwd` in
883  *[[\\\"\#\$\&\'\`$am_lf]]*)
884    AC_MSG_ERROR([unsafe absolute working directory name]);;
885esac
886case $srcdir in
887  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
888    AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
889esac
890
891# Do 'set' in a subshell so we don't clobber the current shell's
892# arguments.  Must try -L first in case configure is actually a
893# symlink; some systems play weird games with the mod time of symlinks
894# (eg FreeBSD returns the mod time of the symlink's containing
895# directory).
896if (
897   am_has_slept=no
898   for am_try in 1 2; do
899     echo "timestamp, slept: $am_has_slept" > conftest.file
900     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
901     if test "$[*]" = "X"; then
902	# -L didn't work.
903	set X `ls -t "$srcdir/configure" conftest.file`
904     fi
905     if test "$[*]" != "X $srcdir/configure conftest.file" \
906	&& test "$[*]" != "X conftest.file $srcdir/configure"; then
907
908	# If neither matched, then we have a broken ls.  This can happen
909	# if, for instance, CONFIG_SHELL is bash and it inherits a
910	# broken ls alias from the environment.  This has actually
911	# happened.  Such a system could not be considered "sane".
912	AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
913  alias in your environment])
914     fi
915     if test "$[2]" = conftest.file || test $am_try -eq 2; then
916       break
917     fi
918     # Just in case.
919     sleep 1
920     am_has_slept=yes
921   done
922   test "$[2]" = conftest.file
923   )
924then
925   # Ok.
926   :
927else
928   AC_MSG_ERROR([newly created file is older than distributed files!
929Check your system clock])
930fi
931AC_MSG_RESULT([yes])
932# If we didn't sleep, we still need to ensure time stamps of config.status and
933# generated files are strictly newer.
934am_sleep_pid=
935if grep 'slept: no' conftest.file >/dev/null 2>&1; then
936  ( sleep 1 ) &
937  am_sleep_pid=$!
938fi
939AC_CONFIG_COMMANDS_PRE(
940  [AC_MSG_CHECKING([that generated files are newer than configure])
941   if test -n "$am_sleep_pid"; then
942     # Hide warnings about reused PIDs.
943     wait $am_sleep_pid 2>/dev/null
944   fi
945   AC_MSG_RESULT([done])])
946rm -f conftest.file
947])
948
949# Copyright (C) 2009-2021 Free Software Foundation, Inc.
950#
951# This file is free software; the Free Software Foundation
952# gives unlimited permission to copy and/or distribute it,
953# with or without modifications, as long as this notice is preserved.
954
955# AM_SILENT_RULES([DEFAULT])
956# --------------------------
957# Enable less verbose build rules; with the default set to DEFAULT
958# ("yes" being less verbose, "no" or empty being verbose).
959AC_DEFUN([AM_SILENT_RULES],
960[AC_ARG_ENABLE([silent-rules], [dnl
961AS_HELP_STRING(
962  [--enable-silent-rules],
963  [less verbose build output (undo: "make V=1")])
964AS_HELP_STRING(
965  [--disable-silent-rules],
966  [verbose build output (undo: "make V=0")])dnl
967])
968case $enable_silent_rules in @%:@ (((
969  yes) AM_DEFAULT_VERBOSITY=0;;
970   no) AM_DEFAULT_VERBOSITY=1;;
971    *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
972esac
973dnl
974dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
975dnl do not support nested variable expansions.
976dnl See automake bug#9928 and bug#10237.
977am_make=${MAKE-make}
978AC_CACHE_CHECK([whether $am_make supports nested variables],
979   [am_cv_make_support_nested_variables],
980   [if AS_ECHO([['TRUE=$(BAR$(V))
981BAR0=false
982BAR1=true
983V=1
984am__doit:
985	@$(TRUE)
986.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
987  am_cv_make_support_nested_variables=yes
988else
989  am_cv_make_support_nested_variables=no
990fi])
991if test $am_cv_make_support_nested_variables = yes; then
992  dnl Using '$V' instead of '$(V)' breaks IRIX make.
993  AM_V='$(V)'
994  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
995else
996  AM_V=$AM_DEFAULT_VERBOSITY
997  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
998fi
999AC_SUBST([AM_V])dnl
1000AM_SUBST_NOTMAKE([AM_V])dnl
1001AC_SUBST([AM_DEFAULT_V])dnl
1002AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
1003AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
1004AM_BACKSLASH='\'
1005AC_SUBST([AM_BACKSLASH])dnl
1006_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
1007])
1008
1009# Copyright (C) 2001-2021 Free Software Foundation, Inc.
1010#
1011# This file is free software; the Free Software Foundation
1012# gives unlimited permission to copy and/or distribute it,
1013# with or without modifications, as long as this notice is preserved.
1014
1015# AM_PROG_INSTALL_STRIP
1016# ---------------------
1017# One issue with vendor 'install' (even GNU) is that you can't
1018# specify the program used to strip binaries.  This is especially
1019# annoying in cross-compiling environments, where the build's strip
1020# is unlikely to handle the host's binaries.
1021# Fortunately install-sh will honor a STRIPPROG variable, so we
1022# always use install-sh in "make install-strip", and initialize
1023# STRIPPROG with the value of the STRIP variable (set by the user).
1024AC_DEFUN([AM_PROG_INSTALL_STRIP],
1025[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1026# Installed binaries are usually stripped using 'strip' when the user
1027# run "make install-strip".  However 'strip' might not be the right
1028# tool to use in cross-compilation environments, therefore Automake
1029# will honor the 'STRIP' environment variable to overrule this program.
1030dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
1031if test "$cross_compiling" != no; then
1032  AC_CHECK_TOOL([STRIP], [strip], :)
1033fi
1034INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1035AC_SUBST([INSTALL_STRIP_PROGRAM])])
1036
1037# Copyright (C) 2006-2021 Free Software Foundation, Inc.
1038#
1039# This file is free software; the Free Software Foundation
1040# gives unlimited permission to copy and/or distribute it,
1041# with or without modifications, as long as this notice is preserved.
1042
1043# _AM_SUBST_NOTMAKE(VARIABLE)
1044# ---------------------------
1045# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1046# This macro is traced by Automake.
1047AC_DEFUN([_AM_SUBST_NOTMAKE])
1048
1049# AM_SUBST_NOTMAKE(VARIABLE)
1050# --------------------------
1051# Public sister of _AM_SUBST_NOTMAKE.
1052AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1053
1054# Check how to create a tarball.                            -*- Autoconf -*-
1055
1056# Copyright (C) 2004-2021 Free Software Foundation, Inc.
1057#
1058# This file is free software; the Free Software Foundation
1059# gives unlimited permission to copy and/or distribute it,
1060# with or without modifications, as long as this notice is preserved.
1061
1062# _AM_PROG_TAR(FORMAT)
1063# --------------------
1064# Check how to create a tarball in format FORMAT.
1065# FORMAT should be one of 'v7', 'ustar', or 'pax'.
1066#
1067# Substitute a variable $(am__tar) that is a command
1068# writing to stdout a FORMAT-tarball containing the directory
1069# $tardir.
1070#     tardir=directory && $(am__tar) > result.tar
1071#
1072# Substitute a variable $(am__untar) that extract such
1073# a tarball read from stdin.
1074#     $(am__untar) < result.tar
1075#
1076AC_DEFUN([_AM_PROG_TAR],
1077[# Always define AMTAR for backward compatibility.  Yes, it's still used
1078# in the wild :-(  We should find a proper way to deprecate it ...
1079AC_SUBST([AMTAR], ['$${TAR-tar}'])
1080
1081# We'll loop over all known methods to create a tar archive until one works.
1082_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1083
1084m4_if([$1], [v7],
1085  [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
1086
1087  [m4_case([$1],
1088    [ustar],
1089     [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
1090      # There is notably a 21 bits limit for the UID and the GID.  In fact,
1091      # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
1092      # and bug#13588).
1093      am_max_uid=2097151 # 2^21 - 1
1094      am_max_gid=$am_max_uid
1095      # The $UID and $GID variables are not portable, so we need to resort
1096      # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
1097      # below are definitely unexpected, so allow the users to see them
1098      # (that is, avoid stderr redirection).
1099      am_uid=`id -u || echo unknown`
1100      am_gid=`id -g || echo unknown`
1101      AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
1102      if test $am_uid -le $am_max_uid; then
1103         AC_MSG_RESULT([yes])
1104      else
1105         AC_MSG_RESULT([no])
1106         _am_tools=none
1107      fi
1108      AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
1109      if test $am_gid -le $am_max_gid; then
1110         AC_MSG_RESULT([yes])
1111      else
1112        AC_MSG_RESULT([no])
1113        _am_tools=none
1114      fi],
1115
1116  [pax],
1117    [],
1118
1119  [m4_fatal([Unknown tar format])])
1120
1121  AC_MSG_CHECKING([how to create a $1 tar archive])
1122
1123  # Go ahead even if we have the value already cached.  We do so because we
1124  # need to set the values for the 'am__tar' and 'am__untar' variables.
1125  _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1126
1127  for _am_tool in $_am_tools; do
1128    case $_am_tool in
1129    gnutar)
1130      for _am_tar in tar gnutar gtar; do
1131        AM_RUN_LOG([$_am_tar --version]) && break
1132      done
1133      am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1134      am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1135      am__untar="$_am_tar -xf -"
1136      ;;
1137    plaintar)
1138      # Must skip GNU tar: if it does not support --format= it doesn't create
1139      # ustar tarball either.
1140      (tar --version) >/dev/null 2>&1 && continue
1141      am__tar='tar chf - "$$tardir"'
1142      am__tar_='tar chf - "$tardir"'
1143      am__untar='tar xf -'
1144      ;;
1145    pax)
1146      am__tar='pax -L -x $1 -w "$$tardir"'
1147      am__tar_='pax -L -x $1 -w "$tardir"'
1148      am__untar='pax -r'
1149      ;;
1150    cpio)
1151      am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1152      am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1153      am__untar='cpio -i -H $1 -d'
1154      ;;
1155    none)
1156      am__tar=false
1157      am__tar_=false
1158      am__untar=false
1159      ;;
1160    esac
1161
1162    # If the value was cached, stop now.  We just wanted to have am__tar
1163    # and am__untar set.
1164    test -n "${am_cv_prog_tar_$1}" && break
1165
1166    # tar/untar a dummy directory, and stop if the command works.
1167    rm -rf conftest.dir
1168    mkdir conftest.dir
1169    echo GrepMe > conftest.dir/file
1170    AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1171    rm -rf conftest.dir
1172    if test -s conftest.tar; then
1173      AM_RUN_LOG([$am__untar <conftest.tar])
1174      AM_RUN_LOG([cat conftest.dir/file])
1175      grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1176    fi
1177  done
1178  rm -rf conftest.dir
1179
1180  AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1181  AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1182
1183AC_SUBST([am__tar])
1184AC_SUBST([am__untar])
1185]) # _AM_PROG_TAR
1186
1187dnl Copyright 2005 Red Hat, Inc
1188dnl 
1189dnl Permission to use, copy, modify, distribute, and sell this software and its
1190dnl documentation for any purpose is hereby granted without fee, provided that
1191dnl the above copyright notice appear in all copies and that both that
1192dnl copyright notice and this permission notice appear in supporting
1193dnl documentation.
1194dnl 
1195dnl The above copyright notice and this permission notice shall be included
1196dnl in all copies or substantial portions of the Software.
1197dnl 
1198dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
1199dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1200dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
1201dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
1202dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
1203dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
1204dnl OTHER DEALINGS IN THE SOFTWARE.
1205dnl 
1206dnl Except as contained in this notice, the name of the copyright holders shall
1207dnl not be used in advertising or otherwise to promote the sale, use or
1208dnl other dealings in this Software without prior written authorization
1209dnl from the copyright holders.
1210dnl 
1211
1212# XORG_DRIVER_CHECK_EXT(MACRO, PROTO)
1213# --------------------------
1214# Checks for the MACRO define in xorg-server.h (from the sdk).  If it
1215# is defined, then add the given PROTO to $REQUIRED_MODULES.
1216
1217AC_DEFUN([XORG_DRIVER_CHECK_EXT],[
1218	AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1219	SAVE_CFLAGS="$CFLAGS"
1220	CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`"
1221	AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1222#include "xorg-server.h"
1223#if !defined $1
1224#error $1 not defined
1225#endif
1226		]])],
1227		[_EXT_CHECK=yes],
1228		[_EXT_CHECK=no])
1229	CFLAGS="$SAVE_CFLAGS"
1230	AC_MSG_CHECKING([if $1 is defined])
1231	AC_MSG_RESULT([$_EXT_CHECK])
1232	if test "$_EXT_CHECK" != no; then
1233		REQUIRED_MODULES="$REQUIRED_MODULES $2"
1234	fi
1235])
1236
1237dnl pkg.m4 - Macros to locate and utilise pkg-config.   -*- Autoconf -*-
1238dnl serial 11 (pkg-config-0.29)
1239dnl
1240dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
1241dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
1242dnl
1243dnl This program is free software; you can redistribute it and/or modify
1244dnl it under the terms of the GNU General Public License as published by
1245dnl the Free Software Foundation; either version 2 of the License, or
1246dnl (at your option) any later version.
1247dnl
1248dnl This program is distributed in the hope that it will be useful, but
1249dnl WITHOUT ANY WARRANTY; without even the implied warranty of
1250dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1251dnl General Public License for more details.
1252dnl
1253dnl You should have received a copy of the GNU General Public License
1254dnl along with this program; if not, write to the Free Software
1255dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1256dnl 02111-1307, USA.
1257dnl
1258dnl As a special exception to the GNU General Public License, if you
1259dnl distribute this file as part of a program that contains a
1260dnl configuration script generated by Autoconf, you may include it under
1261dnl the same distribution terms that you use for the rest of that
1262dnl program.
1263
1264dnl PKG_PREREQ(MIN-VERSION)
1265dnl -----------------------
1266dnl Since: 0.29
1267dnl
1268dnl Verify that the version of the pkg-config macros are at least
1269dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
1270dnl installed version of pkg-config, this checks the developer's version
1271dnl of pkg.m4 when generating configure.
1272dnl
1273dnl To ensure that this macro is defined, also add:
1274dnl m4_ifndef([PKG_PREREQ],
1275dnl     [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
1276dnl
1277dnl See the "Since" comment for each macro you use to see what version
1278dnl of the macros you require.
1279m4_defun([PKG_PREREQ],
1280[m4_define([PKG_MACROS_VERSION], [0.29])
1281m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
1282    [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
1283])dnl PKG_PREREQ
1284
1285dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
1286dnl ----------------------------------
1287dnl Since: 0.16
1288dnl
1289dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
1290dnl first found in the path. Checks that the version of pkg-config found
1291dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
1292dnl used since that's the first version where most current features of
1293dnl pkg-config existed.
1294AC_DEFUN([PKG_PROG_PKG_CONFIG],
1295[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
1296m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
1297m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
1298AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
1299AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
1300AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
1301
1302if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
1303	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
1304fi
1305if test -n "$PKG_CONFIG"; then
1306	_pkg_min_version=m4_default([$1], [0.9.0])
1307	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
1308	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
1309		AC_MSG_RESULT([yes])
1310	else
1311		AC_MSG_RESULT([no])
1312		PKG_CONFIG=""
1313	fi
1314fi[]dnl
1315])dnl PKG_PROG_PKG_CONFIG
1316
1317dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
1318dnl -------------------------------------------------------------------
1319dnl Since: 0.18
1320dnl
1321dnl Check to see whether a particular set of modules exists. Similar to
1322dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
1323dnl
1324dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1325dnl only at the first occurence in configure.ac, so if the first place
1326dnl it's called might be skipped (such as if it is within an "if", you
1327dnl have to call PKG_CHECK_EXISTS manually
1328AC_DEFUN([PKG_CHECK_EXISTS],
1329[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1330if test -n "$PKG_CONFIG" && \
1331    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
1332  m4_default([$2], [:])
1333m4_ifvaln([$3], [else
1334  $3])dnl
1335fi])
1336
1337dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
1338dnl ---------------------------------------------
1339dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
1340dnl pkg_failed based on the result.
1341m4_define([_PKG_CONFIG],
1342[if test -n "$$1"; then
1343    pkg_cv_[]$1="$$1"
1344 elif test -n "$PKG_CONFIG"; then
1345    PKG_CHECK_EXISTS([$3],
1346                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
1347		      test "x$?" != "x0" && pkg_failed=yes ],
1348		     [pkg_failed=yes])
1349 else
1350    pkg_failed=untried
1351fi[]dnl
1352])dnl _PKG_CONFIG
1353
1354dnl _PKG_SHORT_ERRORS_SUPPORTED
1355dnl ---------------------------
1356dnl Internal check to see if pkg-config supports short errors.
1357AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
1358[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1359if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
1360        _pkg_short_errors_supported=yes
1361else
1362        _pkg_short_errors_supported=no
1363fi[]dnl
1364])dnl _PKG_SHORT_ERRORS_SUPPORTED
1365
1366
1367dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
1368dnl   [ACTION-IF-NOT-FOUND])
1369dnl --------------------------------------------------------------
1370dnl Since: 0.4.0
1371dnl
1372dnl Note that if there is a possibility the first call to
1373dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
1374dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
1375AC_DEFUN([PKG_CHECK_MODULES],
1376[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1377AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
1378AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
1379
1380pkg_failed=no
1381AC_MSG_CHECKING([for $1])
1382
1383_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
1384_PKG_CONFIG([$1][_LIBS], [libs], [$2])
1385
1386m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
1387and $1[]_LIBS to avoid the need to call pkg-config.
1388See the pkg-config man page for more details.])
1389
1390if test $pkg_failed = yes; then
1391   	AC_MSG_RESULT([no])
1392        _PKG_SHORT_ERRORS_SUPPORTED
1393        if test $_pkg_short_errors_supported = yes; then
1394	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
1395        else 
1396	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
1397        fi
1398	# Put the nasty error message in config.log where it belongs
1399	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
1400
1401	m4_default([$4], [AC_MSG_ERROR(
1402[Package requirements ($2) were not met:
1403
1404$$1_PKG_ERRORS
1405
1406Consider adjusting the PKG_CONFIG_PATH environment variable if you
1407installed software in a non-standard prefix.
1408
1409_PKG_TEXT])[]dnl
1410        ])
1411elif test $pkg_failed = untried; then
1412     	AC_MSG_RESULT([no])
1413	m4_default([$4], [AC_MSG_FAILURE(
1414[The pkg-config script could not be found or is too old.  Make sure it
1415is in your PATH or set the PKG_CONFIG environment variable to the full
1416path to pkg-config.
1417
1418_PKG_TEXT
1419
1420To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
1421        ])
1422else
1423	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
1424	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
1425        AC_MSG_RESULT([yes])
1426	$3
1427fi[]dnl
1428])dnl PKG_CHECK_MODULES
1429
1430
1431dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
1432dnl   [ACTION-IF-NOT-FOUND])
1433dnl ---------------------------------------------------------------------
1434dnl Since: 0.29
1435dnl
1436dnl Checks for existence of MODULES and gathers its build flags with
1437dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
1438dnl and VARIABLE-PREFIX_LIBS from --libs.
1439dnl
1440dnl Note that if there is a possibility the first call to
1441dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
1442dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
1443dnl configure.ac.
1444AC_DEFUN([PKG_CHECK_MODULES_STATIC],
1445[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1446_save_PKG_CONFIG=$PKG_CONFIG
1447PKG_CONFIG="$PKG_CONFIG --static"
1448PKG_CHECK_MODULES($@)
1449PKG_CONFIG=$_save_PKG_CONFIG[]dnl
1450])dnl PKG_CHECK_MODULES_STATIC
1451
1452
1453dnl PKG_INSTALLDIR([DIRECTORY])
1454dnl -------------------------
1455dnl Since: 0.27
1456dnl
1457dnl Substitutes the variable pkgconfigdir as the location where a module
1458dnl should install pkg-config .pc files. By default the directory is
1459dnl $libdir/pkgconfig, but the default can be changed by passing
1460dnl DIRECTORY. The user can override through the --with-pkgconfigdir
1461dnl parameter.
1462AC_DEFUN([PKG_INSTALLDIR],
1463[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
1464m4_pushdef([pkg_description],
1465    [pkg-config installation directory @<:@]pkg_default[@:>@])
1466AC_ARG_WITH([pkgconfigdir],
1467    [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
1468    [with_pkgconfigdir=]pkg_default)
1469AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
1470m4_popdef([pkg_default])
1471m4_popdef([pkg_description])
1472])dnl PKG_INSTALLDIR
1473
1474
1475dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
1476dnl --------------------------------
1477dnl Since: 0.27
1478dnl
1479dnl Substitutes the variable noarch_pkgconfigdir as the location where a
1480dnl module should install arch-independent pkg-config .pc files. By
1481dnl default the directory is $datadir/pkgconfig, but the default can be
1482dnl changed by passing DIRECTORY. The user can override through the
1483dnl --with-noarch-pkgconfigdir parameter.
1484AC_DEFUN([PKG_NOARCH_INSTALLDIR],
1485[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
1486m4_pushdef([pkg_description],
1487    [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
1488AC_ARG_WITH([noarch-pkgconfigdir],
1489    [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
1490    [with_noarch_pkgconfigdir=]pkg_default)
1491AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
1492m4_popdef([pkg_default])
1493m4_popdef([pkg_description])
1494])dnl PKG_NOARCH_INSTALLDIR
1495
1496
1497dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
1498dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
1499dnl -------------------------------------------
1500dnl Since: 0.28
1501dnl
1502dnl Retrieves the value of the pkg-config variable for the given module.
1503AC_DEFUN([PKG_CHECK_VAR],
1504[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1505AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
1506
1507_PKG_CONFIG([$1], [variable="][$3]["], [$2])
1508AS_VAR_COPY([$1], [pkg_cv_][$1])
1509
1510AS_VAR_IF([$1], [""], [$5], [$4])dnl
1511])dnl PKG_CHECK_VAR
1512
1513dnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
1514dnl
1515dnl Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
1516dnl
1517dnl Permission is hereby granted, free of charge, to any person obtaining a
1518dnl copy of this software and associated documentation files (the "Software"),
1519dnl to deal in the Software without restriction, including without limitation
1520dnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
1521dnl and/or sell copies of the Software, and to permit persons to whom the
1522dnl Software is furnished to do so, subject to the following conditions:
1523dnl
1524dnl The above copyright notice and this permission notice (including the next
1525dnl paragraph) shall be included in all copies or substantial portions of the
1526dnl Software.
1527dnl
1528dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1529dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1530dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
1531dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1532dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
1533dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
1534dnl DEALINGS IN THE SOFTWARE.
1535
1536# XORG_MACROS_VERSION(required-version)
1537# -------------------------------------
1538# Minimum version: 1.1.0
1539#
1540# If you're using a macro added in Version 1.1 or newer, include this in
1541# your configure.ac with the minimum required version, such as:
1542# XORG_MACROS_VERSION(1.1)
1543#
1544# To ensure that this macro is defined, also add:
1545# m4_ifndef([XORG_MACROS_VERSION],
1546#     [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
1547#
1548#
1549# See the "minimum version" comment for each macro you use to see what
1550# version you require.
1551m4_defun([XORG_MACROS_VERSION],[
1552m4_define([vers_have], [1.19.3])
1553m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
1554m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
1555m4_if(m4_cmp(maj_have, maj_needed), 0,,
1556    [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
1557m4_if(m4_version_compare(vers_have, [$1]), -1,
1558    [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
1559m4_undefine([vers_have])
1560m4_undefine([maj_have])
1561m4_undefine([maj_needed])
1562]) # XORG_MACROS_VERSION
1563
1564# XORG_PROG_RAWCPP()
1565# ------------------
1566# Minimum version: 1.0.0
1567#
1568# Find cpp program and necessary flags for use in pre-processing text files
1569# such as man pages and config files
1570AC_DEFUN([XORG_PROG_RAWCPP],[
1571AC_REQUIRE([AC_PROG_CPP])
1572AC_PATH_TOOL(RAWCPP, [cpp], [${CPP}],
1573   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
1574
1575# Check for flag to avoid builtin definitions - assumes unix is predefined,
1576# which is not the best choice for supporting other OS'es, but covers most
1577# of the ones we need for now.
1578AC_MSG_CHECKING([if $RAWCPP requires -undef])
1579AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])])
1580if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
1581	AC_MSG_RESULT([no])
1582else
1583	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
1584		RAWCPPFLAGS=-undef
1585		AC_MSG_RESULT([yes])
1586	# under Cygwin unix is still defined even with -undef
1587	elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
1588		RAWCPPFLAGS="-undef -ansi"
1589		AC_MSG_RESULT([yes, with -ansi])
1590	else
1591		AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
1592	fi
1593fi
1594rm -f conftest.$ac_ext
1595
1596AC_MSG_CHECKING([if $RAWCPP requires -traditional])
1597AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve   "whitespace"?]])])
1598if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
1599	AC_MSG_RESULT([no])
1600else
1601	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
1602		TRADITIONALCPPFLAGS="-traditional"
1603		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
1604		AC_MSG_RESULT([yes])
1605	else
1606		AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
1607	fi
1608fi
1609rm -f conftest.$ac_ext
1610AC_SUBST(RAWCPPFLAGS)
1611AC_SUBST(TRADITIONALCPPFLAGS)
1612]) # XORG_PROG_RAWCPP
1613
1614# XORG_MANPAGE_SECTIONS()
1615# -----------------------
1616# Minimum version: 1.0.0
1617#
1618# Determine which sections man pages go in for the different man page types
1619# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
1620# Not sure if there's any better way than just hardcoding by OS name.
1621# Override default settings by setting environment variables
1622# Added MAN_SUBSTS in version 1.8
1623# Added AC_PROG_SED in version 1.8
1624
1625AC_DEFUN([XORG_MANPAGE_SECTIONS],[
1626AC_REQUIRE([AC_CANONICAL_HOST])
1627AC_REQUIRE([AC_PROG_SED])
1628
1629case $host_os in
1630    solaris*)
1631        # Solaris 2.0 - 11.3 use SysV man page section numbers, so we
1632        # check for a man page file found in later versions that use
1633        # traditional section numbers instead
1634        AC_CHECK_FILE([/usr/share/man/man7/attributes.7],
1635                [SYSV_MAN_SECTIONS=false], [SYSV_MAN_SECTIONS=true])
1636        ;;
1637    *) SYSV_MAN_SECTIONS=false ;;
1638esac
1639
1640if test x$APP_MAN_SUFFIX = x    ; then
1641    APP_MAN_SUFFIX=1
1642fi
1643if test x$APP_MAN_DIR = x    ; then
1644    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
1645fi
1646
1647if test x$LIB_MAN_SUFFIX = x    ; then
1648    LIB_MAN_SUFFIX=3
1649fi
1650if test x$LIB_MAN_DIR = x    ; then
1651    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
1652fi
1653
1654if test x$FILE_MAN_SUFFIX = x    ; then
1655    case $SYSV_MAN_SECTIONS in
1656	true)				FILE_MAN_SUFFIX=4  ;;
1657	*)				FILE_MAN_SUFFIX=5  ;;
1658    esac
1659fi
1660if test x$FILE_MAN_DIR = x    ; then
1661    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
1662fi
1663
1664if test x$MISC_MAN_SUFFIX = x    ; then
1665    case $SYSV_MAN_SECTIONS in
1666	true)				MISC_MAN_SUFFIX=5  ;;
1667	*)				MISC_MAN_SUFFIX=7  ;;
1668    esac
1669fi
1670if test x$MISC_MAN_DIR = x    ; then
1671    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
1672fi
1673
1674if test x$DRIVER_MAN_SUFFIX = x    ; then
1675    case $SYSV_MAN_SECTIONS in
1676	true)				DRIVER_MAN_SUFFIX=7  ;;
1677	*)				DRIVER_MAN_SUFFIX=4  ;;
1678    esac
1679fi
1680if test x$DRIVER_MAN_DIR = x    ; then
1681    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
1682fi
1683
1684if test x$ADMIN_MAN_SUFFIX = x    ; then
1685    case $SYSV_MAN_SECTIONS in
1686	true)				ADMIN_MAN_SUFFIX=1m ;;
1687	*)				ADMIN_MAN_SUFFIX=8  ;;
1688    esac
1689fi
1690if test x$ADMIN_MAN_DIR = x    ; then
1691    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
1692fi
1693
1694
1695AC_SUBST([APP_MAN_SUFFIX])
1696AC_SUBST([LIB_MAN_SUFFIX])
1697AC_SUBST([FILE_MAN_SUFFIX])
1698AC_SUBST([MISC_MAN_SUFFIX])
1699AC_SUBST([DRIVER_MAN_SUFFIX])
1700AC_SUBST([ADMIN_MAN_SUFFIX])
1701AC_SUBST([APP_MAN_DIR])
1702AC_SUBST([LIB_MAN_DIR])
1703AC_SUBST([FILE_MAN_DIR])
1704AC_SUBST([MISC_MAN_DIR])
1705AC_SUBST([DRIVER_MAN_DIR])
1706AC_SUBST([ADMIN_MAN_DIR])
1707
1708XORG_MAN_PAGE="X Version 11"
1709AC_SUBST([XORG_MAN_PAGE])
1710MAN_SUBSTS="\
1711	-e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
1712	-e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
1713	-e 's|__xservername__|Xorg|g' \
1714	-e 's|__xconfigfile__|xorg.conf|g' \
1715	-e 's|__projectroot__|\$(prefix)|g' \
1716	-e 's|__apploaddir__|\$(appdefaultdir)|g' \
1717	-e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
1718	-e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
1719	-e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
1720	-e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
1721	-e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
1722	-e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
1723AC_SUBST([MAN_SUBSTS])
1724
1725]) # XORG_MANPAGE_SECTIONS
1726
1727# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION])
1728# ------------------------
1729# Minimum version: 1.7.0
1730#
1731# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent
1732# provided by xorg-sgml-doctools, if installed.
1733AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[
1734AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])])
1735XORG_SGML_PATH=
1736PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])],
1737    [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`],
1738    [m4_ifval([$1],[:],
1739        [if test x"$cross_compiling" != x"yes" ; then
1740            AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent],
1741                          [XORG_SGML_PATH=$prefix/share/sgml])
1742         fi])
1743    ])
1744
1745# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing
1746# the path and the name of the doc stylesheet
1747if test "x$XORG_SGML_PATH" != "x" ; then
1748   AC_MSG_RESULT([$XORG_SGML_PATH])
1749   STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11
1750   XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl
1751else
1752   AC_MSG_RESULT([no])
1753fi
1754
1755AC_SUBST(XORG_SGML_PATH)
1756AC_SUBST(STYLESHEET_SRCDIR)
1757AC_SUBST(XSL_STYLESHEET)
1758AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"])
1759]) # XORG_CHECK_SGML_DOCTOOLS
1760
1761# XORG_CHECK_LINUXDOC
1762# -------------------
1763# Minimum version: 1.0.0
1764#
1765# Defines the variable MAKE_TEXT if the necessary tools and
1766# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
1767# Whether or not the necessary tools and files are found can be checked
1768# with the AM_CONDITIONAL "BUILD_LINUXDOC"
1769AC_DEFUN([XORG_CHECK_LINUXDOC],[
1770AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
1771AC_REQUIRE([XORG_WITH_PS2PDF])
1772
1773AC_PATH_PROG(LINUXDOC, linuxdoc)
1774
1775AC_MSG_CHECKING([whether to build documentation])
1776
1777if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then
1778   BUILDDOC=yes
1779else
1780   BUILDDOC=no
1781fi
1782
1783AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
1784
1785AC_MSG_RESULT([$BUILDDOC])
1786
1787AC_MSG_CHECKING([whether to build pdf documentation])
1788
1789if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then
1790   BUILDPDFDOC=yes
1791else
1792   BUILDPDFDOC=no
1793fi
1794
1795AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
1796
1797AC_MSG_RESULT([$BUILDPDFDOC])
1798
1799MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f"
1800MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
1801MAKE_PDF="$PS2PDF"
1802MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
1803
1804AC_SUBST(MAKE_TEXT)
1805AC_SUBST(MAKE_PS)
1806AC_SUBST(MAKE_PDF)
1807AC_SUBST(MAKE_HTML)
1808]) # XORG_CHECK_LINUXDOC
1809
1810# XORG_CHECK_DOCBOOK
1811# -------------------
1812# Minimum version: 1.0.0
1813#
1814# Checks for the ability to build output formats from SGML DocBook source.
1815# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
1816# indicates whether the necessary tools and files are found and, if set,
1817# $(MAKE_XXX) blah.sgml will produce blah.xxx.
1818AC_DEFUN([XORG_CHECK_DOCBOOK],[
1819AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
1820
1821BUILDTXTDOC=no
1822BUILDPDFDOC=no
1823BUILDPSDOC=no
1824BUILDHTMLDOC=no
1825
1826AC_PATH_PROG(DOCBOOKPS, docbook2ps)
1827AC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
1828AC_PATH_PROG(DOCBOOKHTML, docbook2html)
1829AC_PATH_PROG(DOCBOOKTXT, docbook2txt)
1830
1831AC_MSG_CHECKING([whether to build text documentation])
1832if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x &&
1833   test x$BUILD_TXTDOC != xno; then
1834	BUILDTXTDOC=yes
1835fi
1836AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
1837AC_MSG_RESULT([$BUILDTXTDOC])
1838
1839AC_MSG_CHECKING([whether to build PDF documentation])
1840if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x &&
1841   test x$BUILD_PDFDOC != xno; then
1842	BUILDPDFDOC=yes
1843fi
1844AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
1845AC_MSG_RESULT([$BUILDPDFDOC])
1846
1847AC_MSG_CHECKING([whether to build PostScript documentation])
1848if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x &&
1849   test x$BUILD_PSDOC != xno; then
1850	BUILDPSDOC=yes
1851fi
1852AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
1853AC_MSG_RESULT([$BUILDPSDOC])
1854
1855AC_MSG_CHECKING([whether to build HTML documentation])
1856if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x &&
1857   test x$BUILD_HTMLDOC != xno; then
1858	BUILDHTMLDOC=yes
1859fi
1860AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
1861AC_MSG_RESULT([$BUILDHTMLDOC])
1862
1863MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
1864MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
1865MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
1866MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
1867
1868AC_SUBST(MAKE_TEXT)
1869AC_SUBST(MAKE_PS)
1870AC_SUBST(MAKE_PDF)
1871AC_SUBST(MAKE_HTML)
1872]) # XORG_CHECK_DOCBOOK
1873
1874# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT])
1875# ----------------
1876# Minimum version: 1.5.0
1877# Minimum version for optional DEFAULT argument: 1.11.0
1878#
1879# Documentation tools are not always available on all platforms and sometimes
1880# not at the appropriate level. This macro enables a module to test for the
1881# presence of the tool and obtain it's path in separate variables. Coupled with
1882# the --with-xmlto option, it allows maximum flexibilty in making decisions
1883# as whether or not to use the xmlto package. When DEFAULT is not specified,
1884# --with-xmlto assumes 'auto'.
1885#
1886# Interface to module:
1887# HAVE_XMLTO: 	used in makefiles to conditionally generate documentation
1888# XMLTO:	returns the path of the xmlto program found
1889#		returns the path set by the user in the environment
1890# --with-xmlto:	'yes' user instructs the module to use xmlto
1891#		'no' user instructs the module not to use xmlto
1892#
1893# Added in version 1.10.0
1894# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation
1895#                  xmlto for text output requires either lynx, links, or w3m browsers
1896#
1897# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path.
1898#
1899AC_DEFUN([XORG_WITH_XMLTO],[
1900AC_ARG_VAR([XMLTO], [Path to xmlto command])
1901m4_define([_defopt], m4_default([$2], [auto]))
1902AC_ARG_WITH(xmlto,
1903	AS_HELP_STRING([--with-xmlto],
1904	   [Use xmlto to regenerate documentation (default: ]_defopt[)]),
1905	   [use_xmlto=$withval], [use_xmlto=]_defopt)
1906m4_undefine([_defopt])
1907
1908if test "x$use_xmlto" = x"auto"; then
1909   AC_PATH_PROG([XMLTO], [xmlto])
1910   if test "x$XMLTO" = "x"; then
1911        AC_MSG_WARN([xmlto not found - documentation targets will be skipped])
1912	have_xmlto=no
1913   else
1914        have_xmlto=yes
1915   fi
1916elif test "x$use_xmlto" = x"yes" ; then
1917   AC_PATH_PROG([XMLTO], [xmlto])
1918   if test "x$XMLTO" = "x"; then
1919        AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH])
1920   fi
1921   have_xmlto=yes
1922elif test "x$use_xmlto" = x"no" ; then
1923   if test "x$XMLTO" != "x"; then
1924      AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified])
1925   fi
1926   have_xmlto=no
1927else
1928   AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no'])
1929fi
1930
1931# Test for a minimum version of xmlto, if provided.
1932m4_ifval([$1],
1933[if test "$have_xmlto" = yes; then
1934    # scrape the xmlto version
1935    AC_MSG_CHECKING([the xmlto version])
1936    xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3`
1937    AC_MSG_RESULT([$xmlto_version])
1938    AS_VERSION_COMPARE([$xmlto_version], [$1],
1939        [if test "x$use_xmlto" = xauto; then
1940            AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed])
1941            have_xmlto=no
1942        else
1943            AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed])
1944        fi])
1945fi])
1946
1947# Test for the ability of xmlto to generate a text target
1948#
1949# NOTE: xmlto 0.0.27 or higher return a non-zero return code in the
1950# following test for empty XML docbook files.
1951# For compatibility reasons use the following empty XML docbook file and if
1952# it fails try it again with a non-empty XML file.
1953have_xmlto_text=no
1954cat > conftest.xml << "EOF"
1955EOF
1956AS_IF([test "$have_xmlto" = yes],
1957      [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
1958             [have_xmlto_text=yes],
1959             [# Try it again with a non-empty XML file.
1960              cat > conftest.xml << "EOF"
1961<x></x>
1962EOF
1963              AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
1964                    [have_xmlto_text=yes],
1965                    [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])])
1966rm -f conftest.xml
1967AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes])
1968AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
1969]) # XORG_WITH_XMLTO
1970
1971# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT])
1972# --------------------------------------------
1973# Minimum version: 1.12.0
1974# Minimum version for optional DEFAULT argument: 1.12.0
1975#
1976# XSLT (Extensible Stylesheet Language Transformations) is a declarative,
1977# XML-based language used for the transformation of XML documents.
1978# The xsltproc command line tool is for applying XSLT stylesheets to XML documents.
1979# It is used under the cover by xmlto to generate html files from DocBook/XML.
1980# The XSLT processor is often used as a standalone tool for transformations.
1981# It should not be assumed that this tool is used only to work with documnetation.
1982# When DEFAULT is not specified, --with-xsltproc assumes 'auto'.
1983#
1984# Interface to module:
1985# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation
1986# XSLTPROC:	 returns the path of the xsltproc program found
1987#		 returns the path set by the user in the environment
1988# --with-xsltproc: 'yes' user instructs the module to use xsltproc
1989#		  'no' user instructs the module not to use xsltproc
1990# have_xsltproc: returns yes if xsltproc found in PATH or no
1991#
1992# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path.
1993#
1994AC_DEFUN([XORG_WITH_XSLTPROC],[
1995AC_ARG_VAR([XSLTPROC], [Path to xsltproc command])
1996# Preserves the interface, should it be implemented later
1997m4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])])
1998m4_define([_defopt], m4_default([$2], [auto]))
1999AC_ARG_WITH(xsltproc,
2000	AS_HELP_STRING([--with-xsltproc],
2001	   [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]),
2002	   [use_xsltproc=$withval], [use_xsltproc=]_defopt)
2003m4_undefine([_defopt])
2004
2005if test "x$use_xsltproc" = x"auto"; then
2006   AC_PATH_PROG([XSLTPROC], [xsltproc])
2007   if test "x$XSLTPROC" = "x"; then
2008        AC_MSG_WARN([xsltproc not found - cannot transform XML documents])
2009	have_xsltproc=no
2010   else
2011        have_xsltproc=yes
2012   fi
2013elif test "x$use_xsltproc" = x"yes" ; then
2014   AC_PATH_PROG([XSLTPROC], [xsltproc])
2015   if test "x$XSLTPROC" = "x"; then
2016        AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH])
2017   fi
2018   have_xsltproc=yes
2019elif test "x$use_xsltproc" = x"no" ; then
2020   if test "x$XSLTPROC" != "x"; then
2021      AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified])
2022   fi
2023   have_xsltproc=no
2024else
2025   AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no'])
2026fi
2027
2028AM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes])
2029]) # XORG_WITH_XSLTPROC
2030
2031# XORG_WITH_PERL([MIN-VERSION], [DEFAULT])
2032# ----------------------------------------
2033# Minimum version: 1.15.0
2034#
2035# PERL (Practical Extraction and Report Language) is a language optimized for
2036# scanning arbitrary text files, extracting information from those text files,
2037# and printing reports based on that information.
2038#
2039# When DEFAULT is not specified, --with-perl assumes 'auto'.
2040#
2041# Interface to module:
2042# HAVE_PERL: used in makefiles to conditionally scan text files
2043# PERL:	     returns the path of the perl program found
2044#	     returns the path set by the user in the environment
2045# --with-perl: 'yes' user instructs the module to use perl
2046#	       'no' user instructs the module not to use perl
2047# have_perl: returns yes if perl found in PATH or no
2048#
2049# If the user sets the value of PERL, AC_PATH_PROG skips testing the path.
2050#
2051AC_DEFUN([XORG_WITH_PERL],[
2052AC_ARG_VAR([PERL], [Path to perl command])
2053# Preserves the interface, should it be implemented later
2054m4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])])
2055m4_define([_defopt], m4_default([$2], [auto]))
2056AC_ARG_WITH(perl,
2057	AS_HELP_STRING([--with-perl],
2058	   [Use perl for extracting information from files (default: ]_defopt[)]),
2059	   [use_perl=$withval], [use_perl=]_defopt)
2060m4_undefine([_defopt])
2061
2062if test "x$use_perl" = x"auto"; then
2063   AC_PATH_PROG([PERL], [perl])
2064   if test "x$PERL" = "x"; then
2065        AC_MSG_WARN([perl not found - cannot extract information and report])
2066	have_perl=no
2067   else
2068        have_perl=yes
2069   fi
2070elif test "x$use_perl" = x"yes" ; then
2071   AC_PATH_PROG([PERL], [perl])
2072   if test "x$PERL" = "x"; then
2073        AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH])
2074   fi
2075   have_perl=yes
2076elif test "x$use_perl" = x"no" ; then
2077   if test "x$PERL" != "x"; then
2078      AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified])
2079   fi
2080   have_perl=no
2081else
2082   AC_MSG_ERROR([--with-perl expects 'yes' or 'no'])
2083fi
2084
2085AM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes])
2086]) # XORG_WITH_PERL
2087
2088# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT])
2089# ----------------
2090# Minimum version: 1.5.0
2091# Minimum version for optional DEFAULT argument: 1.11.0
2092#
2093# Documentation tools are not always available on all platforms and sometimes
2094# not at the appropriate level. This macro enables a module to test for the
2095# presence of the tool and obtain it's path in separate variables. Coupled with
2096# the --with-asciidoc option, it allows maximum flexibilty in making decisions
2097# as whether or not to use the asciidoc package. When DEFAULT is not specified,
2098# --with-asciidoc assumes 'auto'.
2099#
2100# Interface to module:
2101# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation
2102# ASCIIDOC:	 returns the path of the asciidoc program found
2103#		 returns the path set by the user in the environment
2104# --with-asciidoc: 'yes' user instructs the module to use asciidoc
2105#		  'no' user instructs the module not to use asciidoc
2106#
2107# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path.
2108#
2109AC_DEFUN([XORG_WITH_ASCIIDOC],[
2110AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
2111m4_define([_defopt], m4_default([$2], [auto]))
2112AC_ARG_WITH(asciidoc,
2113	AS_HELP_STRING([--with-asciidoc],
2114	   [Use asciidoc to regenerate documentation (default: ]_defopt[)]),
2115	   [use_asciidoc=$withval], [use_asciidoc=]_defopt)
2116m4_undefine([_defopt])
2117
2118if test "x$use_asciidoc" = x"auto"; then
2119   AC_PATH_PROG([ASCIIDOC], [asciidoc])
2120   if test "x$ASCIIDOC" = "x"; then
2121        AC_MSG_WARN([asciidoc not found - documentation targets will be skipped])
2122	have_asciidoc=no
2123   else
2124        have_asciidoc=yes
2125   fi
2126elif test "x$use_asciidoc" = x"yes" ; then
2127   AC_PATH_PROG([ASCIIDOC], [asciidoc])
2128   if test "x$ASCIIDOC" = "x"; then
2129        AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH])
2130   fi
2131   have_asciidoc=yes
2132elif test "x$use_asciidoc" = x"no" ; then
2133   if test "x$ASCIIDOC" != "x"; then
2134      AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified])
2135   fi
2136   have_asciidoc=no
2137else
2138   AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no'])
2139fi
2140m4_ifval([$1],
2141[if test "$have_asciidoc" = yes; then
2142    # scrape the asciidoc version
2143    AC_MSG_CHECKING([the asciidoc version])
2144    asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2`
2145    AC_MSG_RESULT([$asciidoc_version])
2146    AS_VERSION_COMPARE([$asciidoc_version], [$1],
2147        [if test "x$use_asciidoc" = xauto; then
2148            AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed])
2149            have_asciidoc=no
2150        else
2151            AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed])
2152        fi])
2153fi])
2154AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
2155]) # XORG_WITH_ASCIIDOC
2156
2157# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT])
2158# -------------------------------------------
2159# Minimum version: 1.5.0
2160# Minimum version for optional DEFAULT argument: 1.11.0
2161# Minimum version for optional DOT checking: 1.18.0
2162#
2163# Documentation tools are not always available on all platforms and sometimes
2164# not at the appropriate level. This macro enables a module to test for the
2165# presence of the tool and obtain it's path in separate variables. Coupled with
2166# the --with-doxygen option, it allows maximum flexibilty in making decisions
2167# as whether or not to use the doxygen package. When DEFAULT is not specified,
2168# --with-doxygen assumes 'auto'.
2169#
2170# Interface to module:
2171# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation
2172# DOXYGEN:	 returns the path of the doxygen program found
2173#		 returns the path set by the user in the environment
2174# --with-doxygen: 'yes' user instructs the module to use doxygen
2175#		  'no' user instructs the module not to use doxygen
2176#
2177# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path.
2178#
2179AC_DEFUN([XORG_WITH_DOXYGEN],[
2180AC_ARG_VAR([DOXYGEN], [Path to doxygen command])
2181AC_ARG_VAR([DOT], [Path to the dot graphics utility])
2182m4_define([_defopt], m4_default([$2], [auto]))
2183AC_ARG_WITH(doxygen,
2184	AS_HELP_STRING([--with-doxygen],
2185	   [Use doxygen to regenerate documentation (default: ]_defopt[)]),
2186	   [use_doxygen=$withval], [use_doxygen=]_defopt)
2187m4_undefine([_defopt])
2188
2189if test "x$use_doxygen" = x"auto"; then
2190   AC_PATH_PROG([DOXYGEN], [doxygen])
2191   if test "x$DOXYGEN" = "x"; then
2192        AC_MSG_WARN([doxygen not found - documentation targets will be skipped])
2193	have_doxygen=no
2194   else
2195        have_doxygen=yes
2196   fi
2197elif test "x$use_doxygen" = x"yes" ; then
2198   AC_PATH_PROG([DOXYGEN], [doxygen])
2199   if test "x$DOXYGEN" = "x"; then
2200        AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH])
2201   fi
2202   have_doxygen=yes
2203elif test "x$use_doxygen" = x"no" ; then
2204   if test "x$DOXYGEN" != "x"; then
2205      AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified])
2206   fi
2207   have_doxygen=no
2208else
2209   AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no'])
2210fi
2211m4_ifval([$1],
2212[if test "$have_doxygen" = yes; then
2213    # scrape the doxygen version
2214    AC_MSG_CHECKING([the doxygen version])
2215    doxygen_version=`$DOXYGEN --version 2>/dev/null`
2216    AC_MSG_RESULT([$doxygen_version])
2217    AS_VERSION_COMPARE([$doxygen_version], [$1],
2218        [if test "x$use_doxygen" = xauto; then
2219            AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed])
2220            have_doxygen=no
2221        else
2222            AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed])
2223        fi])
2224fi])
2225
2226dnl Check for DOT if we have doxygen. The caller decides if it is mandatory
2227dnl HAVE_DOT is a variable that can be used in your doxygen.in config file:
2228dnl 	HAVE_DOT = @HAVE_DOT@
2229HAVE_DOT=no
2230if test "x$have_doxygen" = "xyes"; then
2231  AC_PATH_PROG([DOT], [dot])
2232    if test "x$DOT" != "x"; then
2233      HAVE_DOT=yes
2234    fi
2235fi
2236
2237AC_SUBST([HAVE_DOT])
2238AM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"])
2239AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
2240]) # XORG_WITH_DOXYGEN
2241
2242# XORG_WITH_GROFF([DEFAULT])
2243# ----------------
2244# Minimum version: 1.6.0
2245# Minimum version for optional DEFAULT argument: 1.11.0
2246#
2247# Documentation tools are not always available on all platforms and sometimes
2248# not at the appropriate level. This macro enables a module to test for the
2249# presence of the tool and obtain it's path in separate variables. Coupled with
2250# the --with-groff option, it allows maximum flexibilty in making decisions
2251# as whether or not to use the groff package. When DEFAULT is not specified,
2252# --with-groff assumes 'auto'.
2253#
2254# Interface to module:
2255# HAVE_GROFF:	 used in makefiles to conditionally generate documentation
2256# HAVE_GROFF_MM: the memorandum macros (-mm) package
2257# HAVE_GROFF_MS: the -ms macros package
2258# GROFF:	 returns the path of the groff program found
2259#		 returns the path set by the user in the environment
2260# --with-groff:	 'yes' user instructs the module to use groff
2261#		 'no' user instructs the module not to use groff
2262#
2263# Added in version 1.9.0:
2264# HAVE_GROFF_HTML: groff has dependencies to output HTML format:
2265#		   pnmcut pnmcrop pnmtopng pnmtops from the netpbm package.
2266#		   psselect from the psutils package.
2267#		   the ghostcript package. Refer to the grohtml man pages
2268#
2269# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path.
2270#
2271# OS and distros often splits groff in a basic and full package, the former
2272# having the groff program and the later having devices, fonts and macros
2273# Checking for the groff executable is not enough.
2274#
2275# If macros are missing, we cannot assume that groff is useless, so we don't
2276# unset HAVE_GROFF or GROFF env variables.
2277# HAVE_GROFF_?? can never be true while HAVE_GROFF is false.
2278#
2279AC_DEFUN([XORG_WITH_GROFF],[
2280AC_ARG_VAR([GROFF], [Path to groff command])
2281m4_define([_defopt], m4_default([$1], [auto]))
2282AC_ARG_WITH(groff,
2283	AS_HELP_STRING([--with-groff],
2284	   [Use groff to regenerate documentation (default: ]_defopt[)]),
2285	   [use_groff=$withval], [use_groff=]_defopt)
2286m4_undefine([_defopt])
2287
2288if test "x$use_groff" = x"auto"; then
2289   AC_PATH_PROG([GROFF], [groff])
2290   if test "x$GROFF" = "x"; then
2291        AC_MSG_WARN([groff not found - documentation targets will be skipped])
2292	have_groff=no
2293   else
2294        have_groff=yes
2295   fi
2296elif test "x$use_groff" = x"yes" ; then
2297   AC_PATH_PROG([GROFF], [groff])
2298   if test "x$GROFF" = "x"; then
2299        AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH])
2300   fi
2301   have_groff=yes
2302elif test "x$use_groff" = x"no" ; then
2303   if test "x$GROFF" != "x"; then
2304      AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified])
2305   fi
2306   have_groff=no
2307else
2308   AC_MSG_ERROR([--with-groff expects 'yes' or 'no'])
2309fi
2310
2311# We have groff, test for the presence of the macro packages
2312if test "x$have_groff" = x"yes"; then
2313    AC_MSG_CHECKING([for ${GROFF} -ms macros])
2314    if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then
2315        groff_ms_works=yes
2316    else
2317        groff_ms_works=no
2318    fi
2319    AC_MSG_RESULT([$groff_ms_works])
2320    AC_MSG_CHECKING([for ${GROFF} -mm macros])
2321    if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then
2322        groff_mm_works=yes
2323    else
2324        groff_mm_works=no
2325    fi
2326    AC_MSG_RESULT([$groff_mm_works])
2327fi
2328
2329# We have groff, test for HTML dependencies, one command per package
2330if test "x$have_groff" = x"yes"; then
2331   AC_PATH_PROGS(GS_PATH, [gs gswin32c])
2332   AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng])
2333   AC_PATH_PROG(PSSELECT_PATH, [psselect])
2334   if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then
2335      have_groff_html=yes
2336   else
2337      have_groff_html=no
2338      AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages])
2339   fi
2340fi
2341
2342# Set Automake conditionals for Makefiles
2343AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes])
2344AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes])
2345AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes])
2346AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
2347]) # XORG_WITH_GROFF
2348
2349# XORG_WITH_FOP([MIN-VERSION], [DEFAULT])
2350# ---------------------------------------
2351# Minimum version: 1.6.0
2352# Minimum version for optional DEFAULT argument: 1.11.0
2353# Minimum version for optional MIN-VERSION argument: 1.15.0
2354#
2355# Documentation tools are not always available on all platforms and sometimes
2356# not at the appropriate level. This macro enables a module to test for the
2357# presence of the tool and obtain it's path in separate variables. Coupled with
2358# the --with-fop option, it allows maximum flexibilty in making decisions
2359# as whether or not to use the fop package. When DEFAULT is not specified,
2360# --with-fop assumes 'auto'.
2361#
2362# Interface to module:
2363# HAVE_FOP: 	used in makefiles to conditionally generate documentation
2364# FOP:	 	returns the path of the fop program found
2365#		returns the path set by the user in the environment
2366# --with-fop: 	'yes' user instructs the module to use fop
2367#		'no' user instructs the module not to use fop
2368#
2369# If the user sets the value of FOP, AC_PATH_PROG skips testing the path.
2370#
2371AC_DEFUN([XORG_WITH_FOP],[
2372AC_ARG_VAR([FOP], [Path to fop command])
2373m4_define([_defopt], m4_default([$2], [auto]))
2374AC_ARG_WITH(fop,
2375	AS_HELP_STRING([--with-fop],
2376	   [Use fop to regenerate documentation (default: ]_defopt[)]),
2377	   [use_fop=$withval], [use_fop=]_defopt)
2378m4_undefine([_defopt])
2379
2380if test "x$use_fop" = x"auto"; then
2381   AC_PATH_PROG([FOP], [fop])
2382   if test "x$FOP" = "x"; then
2383        AC_MSG_WARN([fop not found - documentation targets will be skipped])
2384	have_fop=no
2385   else
2386        have_fop=yes
2387   fi
2388elif test "x$use_fop" = x"yes" ; then
2389   AC_PATH_PROG([FOP], [fop])
2390   if test "x$FOP" = "x"; then
2391        AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH])
2392   fi
2393   have_fop=yes
2394elif test "x$use_fop" = x"no" ; then
2395   if test "x$FOP" != "x"; then
2396      AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified])
2397   fi
2398   have_fop=no
2399else
2400   AC_MSG_ERROR([--with-fop expects 'yes' or 'no'])
2401fi
2402
2403# Test for a minimum version of fop, if provided.
2404m4_ifval([$1],
2405[if test "$have_fop" = yes; then
2406    # scrape the fop version
2407    AC_MSG_CHECKING([for fop minimum version])
2408    fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3`
2409    AC_MSG_RESULT([$fop_version])
2410    AS_VERSION_COMPARE([$fop_version], [$1],
2411        [if test "x$use_fop" = xauto; then
2412            AC_MSG_WARN([fop version $fop_version found, but $1 needed])
2413            have_fop=no
2414        else
2415            AC_MSG_ERROR([fop version $fop_version found, but $1 needed])
2416        fi])
2417fi])
2418AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
2419]) # XORG_WITH_FOP
2420
2421# XORG_WITH_M4([MIN-VERSION])
2422# ---------------------------
2423# Minimum version: 1.19.0
2424#
2425# This macro attempts to locate an m4 macro processor which supports
2426# -I option and is only useful for modules relying on M4 in order to
2427# expand macros in source code files.
2428#
2429# Interface to module:
2430# M4:	 	returns the path of the m4 program found
2431#		returns the path set by the user in the environment
2432#
2433AC_DEFUN([XORG_WITH_M4], [
2434AC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4],
2435   [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4],
2436       [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \
2437         ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]],
2438   [AC_MSG_ERROR([could not find m4 that supports -I option])],
2439   [$PATH:/usr/gnu/bin])])
2440
2441AC_SUBST([M4], [$ac_cv_path_M4])
2442]) # XORG_WITH_M4
2443
2444# XORG_WITH_PS2PDF([DEFAULT])
2445# ----------------
2446# Minimum version: 1.6.0
2447# Minimum version for optional DEFAULT argument: 1.11.0
2448#
2449# Documentation tools are not always available on all platforms and sometimes
2450# not at the appropriate level. This macro enables a module to test for the
2451# presence of the tool and obtain it's path in separate variables. Coupled with
2452# the --with-ps2pdf option, it allows maximum flexibilty in making decisions
2453# as whether or not to use the ps2pdf package. When DEFAULT is not specified,
2454# --with-ps2pdf assumes 'auto'.
2455#
2456# Interface to module:
2457# HAVE_PS2PDF: 	used in makefiles to conditionally generate documentation
2458# PS2PDF:	returns the path of the ps2pdf program found
2459#		returns the path set by the user in the environment
2460# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf
2461#		 'no' user instructs the module not to use ps2pdf
2462#
2463# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path.
2464#
2465AC_DEFUN([XORG_WITH_PS2PDF],[
2466AC_ARG_VAR([PS2PDF], [Path to ps2pdf command])
2467m4_define([_defopt], m4_default([$1], [auto]))
2468AC_ARG_WITH(ps2pdf,
2469	AS_HELP_STRING([--with-ps2pdf],
2470	   [Use ps2pdf to regenerate documentation (default: ]_defopt[)]),
2471	   [use_ps2pdf=$withval], [use_ps2pdf=]_defopt)
2472m4_undefine([_defopt])
2473
2474if test "x$use_ps2pdf" = x"auto"; then
2475   AC_PATH_PROG([PS2PDF], [ps2pdf])
2476   if test "x$PS2PDF" = "x"; then
2477        AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped])
2478	have_ps2pdf=no
2479   else
2480        have_ps2pdf=yes
2481   fi
2482elif test "x$use_ps2pdf" = x"yes" ; then
2483   AC_PATH_PROG([PS2PDF], [ps2pdf])
2484   if test "x$PS2PDF" = "x"; then
2485        AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH])
2486   fi
2487   have_ps2pdf=yes
2488elif test "x$use_ps2pdf" = x"no" ; then
2489   if test "x$PS2PDF" != "x"; then
2490      AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified])
2491   fi
2492   have_ps2pdf=no
2493else
2494   AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no'])
2495fi
2496AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
2497]) # XORG_WITH_PS2PDF
2498
2499# XORG_ENABLE_DOCS (enable_docs=yes)
2500# ----------------
2501# Minimum version: 1.6.0
2502#
2503# Documentation tools are not always available on all platforms and sometimes
2504# not at the appropriate level. This macro enables a builder to skip all
2505# documentation targets except traditional man pages.
2506# Combined with the specific tool checking macros XORG_WITH_*, it provides
2507# maximum flexibilty in controlling documentation building.
2508# Refer to:
2509# XORG_WITH_XMLTO         --with-xmlto
2510# XORG_WITH_ASCIIDOC      --with-asciidoc
2511# XORG_WITH_DOXYGEN       --with-doxygen
2512# XORG_WITH_FOP           --with-fop
2513# XORG_WITH_GROFF         --with-groff
2514# XORG_WITH_PS2PDF        --with-ps2pdf
2515#
2516# Interface to module:
2517# ENABLE_DOCS: 	  used in makefiles to conditionally generate documentation
2518# --enable-docs: 'yes' user instructs the module to generate docs
2519#		 'no' user instructs the module not to generate docs
2520# parm1:	specify the default value, yes or no.
2521#
2522AC_DEFUN([XORG_ENABLE_DOCS],[
2523m4_define([docs_default], m4_default([$1], [yes]))
2524AC_ARG_ENABLE(docs,
2525	AS_HELP_STRING([--enable-docs],
2526	   [Enable building the documentation (default: ]docs_default[)]),
2527	   [build_docs=$enableval], [build_docs=]docs_default)
2528m4_undefine([docs_default])
2529AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes])
2530AC_MSG_CHECKING([whether to build documentation])
2531AC_MSG_RESULT([$build_docs])
2532]) # XORG_ENABLE_DOCS
2533
2534# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes)
2535# ----------------
2536# Minimum version: 1.6.0
2537#
2538# This macro enables a builder to skip all developer documentation.
2539# Combined with the specific tool checking macros XORG_WITH_*, it provides
2540# maximum flexibilty in controlling documentation building.
2541# Refer to:
2542# XORG_WITH_XMLTO         --with-xmlto
2543# XORG_WITH_ASCIIDOC      --with-asciidoc
2544# XORG_WITH_DOXYGEN       --with-doxygen
2545# XORG_WITH_FOP           --with-fop
2546# XORG_WITH_GROFF         --with-groff
2547# XORG_WITH_PS2PDF        --with-ps2pdf
2548#
2549# Interface to module:
2550# ENABLE_DEVEL_DOCS:	used in makefiles to conditionally generate developer docs
2551# --enable-devel-docs:	'yes' user instructs the module to generate developer docs
2552#			'no' user instructs the module not to generate developer docs
2553# parm1:		specify the default value, yes or no.
2554#
2555AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[
2556m4_define([devel_default], m4_default([$1], [yes]))
2557AC_ARG_ENABLE(devel-docs,
2558	AS_HELP_STRING([--enable-devel-docs],
2559	   [Enable building the developer documentation (default: ]devel_default[)]),
2560	   [build_devel_docs=$enableval], [build_devel_docs=]devel_default)
2561m4_undefine([devel_default])
2562AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes])
2563AC_MSG_CHECKING([whether to build developer documentation])
2564AC_MSG_RESULT([$build_devel_docs])
2565]) # XORG_ENABLE_DEVEL_DOCS
2566
2567# XORG_ENABLE_SPECS (enable_specs=yes)
2568# ----------------
2569# Minimum version: 1.6.0
2570#
2571# This macro enables a builder to skip all functional specification targets.
2572# Combined with the specific tool checking macros XORG_WITH_*, it provides
2573# maximum flexibilty in controlling documentation building.
2574# Refer to:
2575# XORG_WITH_XMLTO         --with-xmlto
2576# XORG_WITH_ASCIIDOC      --with-asciidoc
2577# XORG_WITH_DOXYGEN       --with-doxygen
2578# XORG_WITH_FOP           --with-fop
2579# XORG_WITH_GROFF         --with-groff
2580# XORG_WITH_PS2PDF        --with-ps2pdf
2581#
2582# Interface to module:
2583# ENABLE_SPECS:		used in makefiles to conditionally generate specs
2584# --enable-specs:	'yes' user instructs the module to generate specs
2585#			'no' user instructs the module not to generate specs
2586# parm1:		specify the default value, yes or no.
2587#
2588AC_DEFUN([XORG_ENABLE_SPECS],[
2589m4_define([spec_default], m4_default([$1], [yes]))
2590AC_ARG_ENABLE(specs,
2591	AS_HELP_STRING([--enable-specs],
2592	   [Enable building the specs (default: ]spec_default[)]),
2593	   [build_specs=$enableval], [build_specs=]spec_default)
2594m4_undefine([spec_default])
2595AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes])
2596AC_MSG_CHECKING([whether to build functional specifications])
2597AC_MSG_RESULT([$build_specs])
2598]) # XORG_ENABLE_SPECS
2599
2600# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto)
2601# ----------------------------------------------
2602# Minimum version: 1.13.0
2603#
2604# This macro enables a builder to enable/disable unit testing
2605# It makes no assumption about the test cases implementation
2606# Test cases may or may not use Automake "Support for test suites"
2607# They may or may not use the software utility library GLib
2608#
2609# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL
2610# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib.
2611# The variable enable_unit_tests is used by other macros in this file.
2612#
2613# Interface to module:
2614# ENABLE_UNIT_TESTS:	used in makefiles to conditionally build tests
2615# enable_unit_tests:    used in configure.ac for additional configuration
2616# --enable-unit-tests:	'yes' user instructs the module to build tests
2617#			'no' user instructs the module not to build tests
2618# parm1:		specify the default value, yes or no.
2619#
2620AC_DEFUN([XORG_ENABLE_UNIT_TESTS],[
2621AC_BEFORE([$0], [XORG_WITH_GLIB])
2622AC_BEFORE([$0], [XORG_LD_WRAP])
2623AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS])
2624m4_define([_defopt], m4_default([$1], [auto]))
2625AC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests],
2626	[Enable building unit test cases (default: ]_defopt[)]),
2627	[enable_unit_tests=$enableval], [enable_unit_tests=]_defopt)
2628m4_undefine([_defopt])
2629AM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno])
2630AC_MSG_CHECKING([whether to build unit test cases])
2631AC_MSG_RESULT([$enable_unit_tests])
2632]) # XORG_ENABLE_UNIT_TESTS
2633
2634# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto)
2635# ------------------------------------------------------
2636# Minimum version: 1.17.0
2637#
2638# This macro enables a builder to enable/disable integration testing
2639# It makes no assumption about the test cases' implementation
2640# Test cases may or may not use Automake "Support for test suites"
2641#
2642# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support
2643# usually requires less dependencies and may be built and run under less
2644# stringent environments than integration tests.
2645#
2646# Interface to module:
2647# ENABLE_INTEGRATION_TESTS:   used in makefiles to conditionally build tests
2648# enable_integration_tests:   used in configure.ac for additional configuration
2649# --enable-integration-tests: 'yes' user instructs the module to build tests
2650#                             'no' user instructs the module not to build tests
2651# parm1:                      specify the default value, yes or no.
2652#
2653AC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[
2654AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS])
2655m4_define([_defopt], m4_default([$1], [auto]))
2656AC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests],
2657	[Enable building integration test cases (default: ]_defopt[)]),
2658	[enable_integration_tests=$enableval],
2659	[enable_integration_tests=]_defopt)
2660m4_undefine([_defopt])
2661AM_CONDITIONAL([ENABLE_INTEGRATION_TESTS],
2662	[test "x$enable_integration_tests" != xno])
2663AC_MSG_CHECKING([whether to build unit test cases])
2664AC_MSG_RESULT([$enable_integration_tests])
2665]) # XORG_ENABLE_INTEGRATION_TESTS
2666
2667# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT])
2668# ----------------------------------------
2669# Minimum version: 1.13.0
2670#
2671# GLib is a library which provides advanced data structures and functions.
2672# This macro enables a module to test for the presence of Glib.
2673#
2674# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing.
2675# Otherwise the value of $enable_unit_tests is blank.
2676#
2677# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit
2678# test support usually requires less dependencies and may be built and run under
2679# less stringent environments than integration tests.
2680#
2681# Interface to module:
2682# HAVE_GLIB: used in makefiles to conditionally build targets
2683# with_glib: used in configure.ac to know if GLib has been found
2684# --with-glib:	'yes' user instructs the module to use glib
2685#		'no' user instructs the module not to use glib
2686#
2687AC_DEFUN([XORG_WITH_GLIB],[
2688AC_REQUIRE([PKG_PROG_PKG_CONFIG])
2689m4_define([_defopt], m4_default([$2], [auto]))
2690AC_ARG_WITH(glib, AS_HELP_STRING([--with-glib],
2691	[Use GLib library for unit testing (default: ]_defopt[)]),
2692	[with_glib=$withval], [with_glib=]_defopt)
2693m4_undefine([_defopt])
2694
2695have_glib=no
2696# Do not probe GLib if user explicitly disabled unit testing
2697if test "x$enable_unit_tests" != x"no"; then
2698  # Do not probe GLib if user explicitly disabled it
2699  if test "x$with_glib" != x"no"; then
2700    m4_ifval(
2701      [$1],
2702      [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])],
2703      [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])]
2704    )
2705  fi
2706fi
2707
2708# Not having GLib when unit testing has been explicitly requested is an error
2709if test "x$enable_unit_tests" = x"yes"; then
2710  if test "x$have_glib" = x"no"; then
2711    AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found])
2712  fi
2713fi
2714
2715# Having unit testing disabled when GLib has been explicitly requested is an error
2716if test "x$enable_unit_tests" = x"no"; then
2717  if test "x$with_glib" = x"yes"; then
2718    AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found])
2719  fi
2720fi
2721
2722# Not having GLib when it has been explicitly requested is an error
2723if test "x$with_glib" = x"yes"; then
2724  if test "x$have_glib" = x"no"; then
2725    AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found])
2726  fi
2727fi
2728
2729AM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes])
2730]) # XORG_WITH_GLIB
2731
2732# XORG_LD_WRAP([required|optional])
2733# ---------------------------------
2734# Minimum version: 1.13.0
2735#
2736# Check if linker supports -wrap, passed via compiler flags
2737#
2738# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing.
2739# Otherwise the value of $enable_unit_tests is blank.
2740#
2741# Argument added in 1.16.0 - default is "required", to match existing behavior
2742# of returning an error if enable_unit_tests is yes, and ld -wrap is not
2743# available, an argument of "optional" allows use when some unit tests require
2744# ld -wrap and others do not.
2745#
2746AC_DEFUN([XORG_LD_WRAP],[
2747XORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no],
2748    [AC_LANG_PROGRAM([#include <stdlib.h>
2749                      void __wrap_exit(int status) { return; }],
2750                     [exit(0);])])
2751# Not having ld wrap when unit testing has been explicitly requested is an error
2752if test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then
2753  if test "x$have_ld_wrap" = x"no"; then
2754    AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available])
2755  fi
2756fi
2757AM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes])
2758#
2759]) # XORG_LD_WRAP
2760
2761# XORG_CHECK_LINKER_FLAGS
2762# -----------------------
2763# SYNOPSIS
2764#
2765#   XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE])
2766#
2767# DESCRIPTION
2768#
2769#   Check whether the given linker FLAGS work with the current language's
2770#   linker, or whether they give an error.
2771#
2772#   ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
2773#   success/failure.
2774#
2775#   PROGRAM-SOURCE is the program source to link with, if needed
2776#
2777#   NOTE: Based on AX_CHECK_COMPILER_FLAGS.
2778#
2779# LICENSE
2780#
2781#   Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org>
2782#   Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu>
2783#   Copyright (c) 2009 Matteo Frigo
2784#
2785#   This program is free software: you can redistribute it and/or modify it
2786#   under the terms of the GNU General Public License as published by the
2787#   Free Software Foundation, either version 3 of the License, or (at your
2788#   option) any later version.
2789#
2790#   This program is distributed in the hope that it will be useful, but
2791#   WITHOUT ANY WARRANTY; without even the implied warranty of
2792#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
2793#   Public License for more details.
2794#
2795#   You should have received a copy of the GNU General Public License along
2796#   with this program. If not, see <http://www.gnu.org/licenses/>.
2797#
2798#   As a special exception, the respective Autoconf Macro's copyright owner
2799#   gives unlimited permission to copy, distribute and modify the configure
2800#   scripts that are the output of Autoconf when processing the Macro. You
2801#   need not follow the terms of the GNU General Public License when using
2802#   or distributing such scripts, even though portions of the text of the
2803#   Macro appear in them. The GNU General Public License (GPL) does govern
2804#   all other use of the material that constitutes the Autoconf Macro.
2805#
2806#   This special exception to the GPL applies to versions of the Autoconf
2807#   Macro released by the Autoconf Archive. When you make and distribute a
2808#   modified version of the Autoconf Macro, you may extend this special
2809#   exception to the GPL to apply to your modified version as well.#
2810AC_DEFUN([XORG_CHECK_LINKER_FLAGS],
2811[AC_MSG_CHECKING([whether the linker accepts $1])
2812dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname:
2813AS_LITERAL_IF([$1],
2814  [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [
2815      ax_save_FLAGS=$LDFLAGS
2816      LDFLAGS="$1"
2817      AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])],
2818        AS_TR_SH(xorg_cv_linker_flags_[$1])=yes,
2819        AS_TR_SH(xorg_cv_linker_flags_[$1])=no)
2820      LDFLAGS=$ax_save_FLAGS])],
2821  [ax_save_FLAGS=$LDFLAGS
2822   LDFLAGS="$1"
2823   AC_LINK_IFELSE([AC_LANG_PROGRAM()],
2824     eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes,
2825     eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no)
2826   LDFLAGS=$ax_save_FLAGS])
2827eval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1])
2828AC_MSG_RESULT($xorg_check_linker_flags)
2829if test "x$xorg_check_linker_flags" = xyes; then
2830	m4_default([$2], :)
2831else
2832	m4_default([$3], :)
2833fi
2834]) # XORG_CHECK_LINKER_FLAGS
2835
2836# XORG_MEMORY_CHECK_FLAGS
2837# -----------------------
2838# Minimum version: 1.16.0
2839#
2840# This macro attempts to find appropriate memory checking functionality
2841# for various platforms which unit testing code may use to catch various
2842# forms of memory allocation and access errors in testing.
2843#
2844# Interface to module:
2845# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging
2846#                         Usually added to TESTS_ENVIRONMENT in Makefile.am
2847#
2848# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim.
2849#
2850AC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[
2851
2852AC_REQUIRE([AC_CANONICAL_HOST])
2853AC_ARG_VAR([XORG_MALLOC_DEBUG_ENV],
2854           [Environment variables to enable memory checking in tests])
2855
2856# Check for different types of support on different platforms
2857case $host_os in
2858    solaris*)
2859        AC_CHECK_LIB([umem], [umem_alloc],
2860            [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default'])
2861        ;;
2862    *-gnu*) # GNU libc - Value is used as a single byte bit pattern,
2863        # both directly and inverted, so should not be 0 or 255.
2864        malloc_debug_env='MALLOC_PERTURB_=15'
2865        ;;
2866    darwin*)
2867        malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib'
2868        ;;
2869    *bsd*)
2870        malloc_debug_env='MallocPreScribble=1 MallocScribble=1'
2871        ;;
2872esac
2873
2874# User supplied flags override default flags
2875if test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then
2876    malloc_debug_env="$XORG_MALLOC_DEBUG_ENV"
2877fi
2878
2879AC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env])
2880]) # XORG_WITH_LINT
2881
2882# XORG_CHECK_MALLOC_ZERO
2883# ----------------------
2884# Minimum version: 1.0.0
2885#
2886# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
2887# malloc(0) returns NULL.  Packages should add one of these cflags to
2888# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
2889AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
2890AC_ARG_ENABLE(malloc0returnsnull,
2891	AS_HELP_STRING([--enable-malloc0returnsnull],
2892		       [malloc(0) returns NULL (default: auto)]),
2893	[MALLOC_ZERO_RETURNS_NULL=$enableval],
2894	[MALLOC_ZERO_RETURNS_NULL=auto])
2895
2896AC_MSG_CHECKING([whether malloc(0) returns NULL])
2897if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
2898AC_CACHE_VAL([xorg_cv_malloc0_returns_null],
2899	[AC_RUN_IFELSE([AC_LANG_PROGRAM([
2900#include <stdlib.h>
2901],[
2902    char *m0, *r0, *c0, *p;
2903    m0 = malloc(0);
2904    p = malloc(10);
2905    r0 = realloc(p,0);
2906    c0 = calloc(0,10);
2907    exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1);
2908])],
2909		[xorg_cv_malloc0_returns_null=yes],
2910		[xorg_cv_malloc0_returns_null=no])])
2911MALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null
2912fi
2913AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
2914
2915if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
2916	MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
2917	XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
2918	XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
2919else
2920	MALLOC_ZERO_CFLAGS=""
2921	XMALLOC_ZERO_CFLAGS=""
2922	XTMALLOC_ZERO_CFLAGS=""
2923fi
2924
2925AC_SUBST([MALLOC_ZERO_CFLAGS])
2926AC_SUBST([XMALLOC_ZERO_CFLAGS])
2927AC_SUBST([XTMALLOC_ZERO_CFLAGS])
2928]) # XORG_CHECK_MALLOC_ZERO
2929
2930# XORG_WITH_LINT()
2931# ----------------
2932# Minimum version: 1.1.0
2933#
2934# This macro enables the use of a tool that flags some suspicious and
2935# non-portable constructs (likely to be bugs) in C language source code.
2936# It will attempt to locate the tool and use appropriate options.
2937# There are various lint type tools on different platforms.
2938#
2939# Interface to module:
2940# LINT:		returns the path to the tool found on the platform
2941#		or the value set to LINT on the configure cmd line
2942#		also an Automake conditional
2943# LINT_FLAGS:	an Automake variable with appropriate flags
2944#
2945# --with-lint:	'yes' user instructs the module to use lint
2946#		'no' user instructs the module not to use lint (default)
2947#
2948# If the user sets the value of LINT, AC_PATH_PROG skips testing the path.
2949# If the user sets the value of LINT_FLAGS, they are used verbatim.
2950#
2951AC_DEFUN([XORG_WITH_LINT],[
2952
2953AC_ARG_VAR([LINT], [Path to a lint-style command])
2954AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command])
2955AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
2956		[Use a lint-style source code checker (default: disabled)])],
2957		[use_lint=$withval], [use_lint=no])
2958
2959# Obtain platform specific info like program name and options
2960# The lint program on FreeBSD and NetBSD is different from the one on Solaris
2961case $host_os in
2962  *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*)
2963	lint_name=splint
2964	lint_options="-badflag"
2965	;;
2966  *freebsd* | *netbsd*)
2967	lint_name=lint
2968	lint_options="-u -b"
2969	;;
2970  *solaris*)
2971	lint_name=lint
2972	lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
2973	;;
2974esac
2975
2976# Test for the presence of the program (either guessed by the code or spelled out by the user)
2977if test "x$use_lint" = x"yes" ; then
2978   AC_PATH_PROG([LINT], [$lint_name])
2979   if test "x$LINT" = "x"; then
2980        AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH])
2981   fi
2982elif test "x$use_lint" = x"no" ; then
2983   if test "x$LINT" != "x"; then
2984      AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified])
2985   fi
2986else
2987   AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.])
2988fi
2989
2990# User supplied flags override default flags
2991if test "x$LINT_FLAGS" != "x"; then
2992   lint_options=$LINT_FLAGS
2993fi
2994
2995AC_SUBST([LINT_FLAGS],[$lint_options])
2996AM_CONDITIONAL(LINT, [test "x$LINT" != x])
2997
2998]) # XORG_WITH_LINT
2999
3000# XORG_LINT_LIBRARY(LIBNAME)
3001# --------------------------
3002# Minimum version: 1.1.0
3003#
3004# Sets up flags for building lint libraries for checking programs that call
3005# functions in the library.
3006#
3007# Interface to module:
3008# LINTLIB		- Automake variable with the name of lint library file to make
3009# MAKE_LINT_LIB		- Automake conditional
3010#
3011# --enable-lint-library:  - 'yes' user instructs the module to created a lint library
3012#			  - 'no' user instructs the module not to create a lint library (default)
3013
3014AC_DEFUN([XORG_LINT_LIBRARY],[
3015AC_REQUIRE([XORG_WITH_LINT])
3016AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
3017	[Create lint library (default: disabled)])],
3018	[make_lint_lib=$enableval], [make_lint_lib=no])
3019
3020if test "x$make_lint_lib" = x"yes" ; then
3021   LINTLIB=llib-l$1.ln
3022   if test "x$LINT" = "x"; then
3023        AC_MSG_ERROR([Cannot make lint library without --with-lint])
3024   fi
3025elif test "x$make_lint_lib" != x"no" ; then
3026   AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.])
3027fi
3028
3029AC_SUBST(LINTLIB)
3030AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
3031
3032]) # XORG_LINT_LIBRARY
3033
3034# XORG_COMPILER_BRAND
3035# -------------------
3036# Minimum version: 1.14.0
3037#
3038# Checks for various brands of compilers and sets flags as appropriate:
3039#   GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes"
3040#   GNU g++ - relies on AC_PROG_CXX to set GXX to "yes"
3041#   clang compiler - sets CLANGCC to "yes"
3042#   Intel compiler - sets INTELCC to "yes"
3043#   Sun/Oracle Solaris Studio cc - sets SUNCC to "yes"
3044#
3045AC_DEFUN([XORG_COMPILER_BRAND], [
3046AC_LANG_CASE(
3047	[C], [
3048		AC_REQUIRE([AC_PROG_CC_C99])
3049	],
3050	[C++], [
3051		AC_REQUIRE([AC_PROG_CXX])
3052	]
3053)
3054AC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"])
3055AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
3056AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
3057]) # XORG_COMPILER_BRAND
3058
3059# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...])
3060# ---------------
3061# Minimum version: 1.16.0
3062#
3063# Test if the compiler works when passed the given flag as a command line argument.
3064# If it succeeds, the flag is appeneded to the given variable.  If not, it tries the
3065# next flag in the list until there are no more options.
3066#
3067# Note that this does not guarantee that the compiler supports the flag as some
3068# compilers will simply ignore arguments that they do not understand, but we do
3069# attempt to weed out false positives by using -Werror=unknown-warning-option and
3070# -Werror=unused-command-line-argument
3071#
3072AC_DEFUN([XORG_TESTSET_CFLAG], [
3073m4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])])
3074m4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])])
3075
3076AC_LANG_COMPILER_REQUIRE
3077
3078AC_LANG_CASE(
3079	[C], [
3080		AC_REQUIRE([AC_PROG_CC_C99])
3081		define([PREFIX], [C])
3082		define([CACHE_PREFIX], [cc])
3083		define([COMPILER], [$CC])
3084	],
3085	[C++], [
3086		define([PREFIX], [CXX])
3087		define([CACHE_PREFIX], [cxx])
3088		define([COMPILER], [$CXX])
3089	]
3090)
3091
3092[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]"
3093
3094if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then
3095	PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
3096	AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option],
3097			[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option],
3098			AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])],
3099					  [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes],
3100					  [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no]))
3101	[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option]
3102	PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
3103fi
3104
3105if test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then
3106	if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then
3107		PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
3108	fi
3109	PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument"
3110	AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument],
3111			[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument],
3112			AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])],
3113					  [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes],
3114					  [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no]))
3115	[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument]
3116	PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
3117fi
3118
3119found="no"
3120m4_foreach([flag], m4_cdr($@), [
3121	if test $found = "no" ; then
3122		if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then
3123			PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
3124		fi
3125
3126		if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then
3127			PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument"
3128		fi
3129
3130		PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag["
3131
3132dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname
3133		AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[])
3134		cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[])
3135		AC_CACHE_VAL($cacheid,
3136			     [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])],
3137					     [eval $cacheid=yes],
3138					     [eval $cacheid=no])])
3139
3140		PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
3141
3142		eval supported=\$$cacheid
3143		AC_MSG_RESULT([$supported])
3144		if test "$supported" = "yes" ; then
3145			$1="$$1 ]flag["
3146			found="yes"
3147		fi
3148	fi
3149])
3150]) # XORG_TESTSET_CFLAG
3151
3152# XORG_COMPILER_FLAGS
3153# ---------------
3154# Minimum version: 1.16.0
3155#
3156# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line
3157# arguments supported by the selected compiler which do NOT alter the generated
3158# code.  These arguments will cause the compiler to print various warnings
3159# during compilation AND turn a conservative set of warnings into errors.
3160#
3161# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in
3162# future versions of util-macros as options are added to new compilers.
3163#
3164AC_DEFUN([XORG_COMPILER_FLAGS], [
3165AC_REQUIRE([XORG_COMPILER_BRAND])
3166
3167AC_ARG_ENABLE(selective-werror,
3168              AS_HELP_STRING([--disable-selective-werror],
3169                             [Turn off selective compiler errors. (default: enabled)]),
3170              [SELECTIVE_WERROR=$enableval],
3171              [SELECTIVE_WERROR=yes])
3172
3173AC_LANG_CASE(
3174        [C], [
3175                define([PREFIX], [C])
3176        ],
3177        [C++], [
3178                define([PREFIX], [CXX])
3179        ]
3180)
3181# -v is too short to test reliably with XORG_TESTSET_CFLAG
3182if test "x$SUNCC" = "xyes"; then
3183    [BASE_]PREFIX[FLAGS]="-v"
3184else
3185    [BASE_]PREFIX[FLAGS]=""
3186fi
3187
3188# This chunk of warnings were those that existed in the legacy CWARNFLAGS
3189XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall])
3190XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith])
3191XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations])
3192XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat])
3193
3194AC_LANG_CASE(
3195	[C], [
3196		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes])
3197		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes])
3198		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs])
3199		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast])
3200		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd])
3201		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement])
3202	]
3203)
3204
3205# This chunk adds additional warnings that could catch undesired effects.
3206XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused])
3207XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized])
3208XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow])
3209XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn])
3210XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute])
3211XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls])
3212XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op])
3213
3214# These are currently disabled because they are noisy.  They will be enabled
3215# in the future once the codebase is sufficiently modernized to silence
3216# them.  For now, I don't want them to drown out the other warnings.
3217# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses])
3218# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align])
3219# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual])
3220
3221# Turn some warnings into errors, so we don't accidently get successful builds
3222# when there are problems that should be fixed.
3223
3224if test "x$SELECTIVE_WERROR" = "xyes" ; then
3225XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED])
3226XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull])
3227XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self])
3228XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main])
3229XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces])
3230XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point])
3231XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT])
3232XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs])
3233XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds])
3234XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings])
3235XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address])
3236XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION])
3237XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION
3238else
3239AC_MSG_WARN([You have chosen not to turn some select compiler warnings into errors.  This should not be necessary.  Please report why you needed to do so in a bug report at $PACKAGE_BUGREPORT])
3240XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit])
3241XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull])
3242XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self])
3243XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain])
3244XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces])
3245XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point])
3246XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type])
3247XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs])
3248XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds])
3249XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings])
3250XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress])
3251XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast])
3252XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast])
3253fi
3254
3255AC_SUBST([BASE_]PREFIX[FLAGS])
3256]) # XORG_COMPILER_FLAGS
3257
3258# XORG_CWARNFLAGS
3259# ---------------
3260# Minimum version: 1.2.0
3261# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead)
3262#
3263# Defines CWARNFLAGS to enable C compiler warnings.
3264#
3265# This function is deprecated because it defines -fno-strict-aliasing
3266# which alters the code generated by the compiler.  If -fno-strict-aliasing
3267# is needed, then it should be added explicitly in the module when
3268# it is updated to use BASE_CFLAGS.
3269#
3270AC_DEFUN([XORG_CWARNFLAGS], [
3271AC_REQUIRE([XORG_COMPILER_FLAGS])
3272AC_REQUIRE([XORG_COMPILER_BRAND])
3273AC_LANG_CASE(
3274	[C], [
3275		CWARNFLAGS="$BASE_CFLAGS"
3276		if  test "x$GCC" = xyes ; then
3277		    CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing"
3278		fi
3279		AC_SUBST(CWARNFLAGS)
3280	]
3281)
3282]) # XORG_CWARNFLAGS
3283
3284# XORG_STRICT_OPTION
3285# -----------------------
3286# Minimum version: 1.3.0
3287#
3288# Add configure option to enable strict compilation flags, such as treating
3289# warnings as fatal errors.
3290# If --enable-strict-compilation is passed to configure, adds strict flags to
3291# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS.
3292#
3293# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or
3294# when strict compilation is unconditionally desired.
3295AC_DEFUN([XORG_STRICT_OPTION], [
3296AC_REQUIRE([XORG_CWARNFLAGS])
3297AC_REQUIRE([XORG_COMPILER_FLAGS])
3298
3299AC_ARG_ENABLE(strict-compilation,
3300			  AS_HELP_STRING([--enable-strict-compilation],
3301			  [Enable all warnings from compiler and make them errors (default: disabled)]),
3302			  [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
3303
3304AC_LANG_CASE(
3305        [C], [
3306                define([PREFIX], [C])
3307        ],
3308        [C++], [
3309                define([PREFIX], [CXX])
3310        ]
3311)
3312
3313[STRICT_]PREFIX[FLAGS]=""
3314XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic])
3315XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn])
3316
3317# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not
3318# activate it with -Werror, so we add it here explicitly.
3319XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes])
3320
3321if test "x$STRICT_COMPILE" = "xyes"; then
3322    [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]"
3323    AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"])
3324fi
3325AC_SUBST([STRICT_]PREFIX[FLAGS])
3326AC_SUBST([BASE_]PREFIX[FLAGS])
3327AC_LANG_CASE([C], AC_SUBST([CWARNFLAGS]))
3328]) # XORG_STRICT_OPTION
3329
3330# XORG_DEFAULT_OPTIONS
3331# --------------------
3332# Minimum version: 1.3.0
3333#
3334# Defines default options for X.Org modules.
3335#
3336AC_DEFUN([XORG_DEFAULT_OPTIONS], [
3337AC_REQUIRE([AC_PROG_INSTALL])
3338XORG_COMPILER_FLAGS
3339XORG_CWARNFLAGS
3340XORG_STRICT_OPTION
3341XORG_RELEASE_VERSION
3342XORG_CHANGELOG
3343XORG_INSTALL
3344XORG_MANPAGE_SECTIONS
3345m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
3346    [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
3347]) # XORG_DEFAULT_OPTIONS
3348
3349# XORG_INSTALL()
3350# ----------------
3351# Minimum version: 1.4.0
3352#
3353# Defines the variable INSTALL_CMD as the command to copy
3354# INSTALL from $prefix/share/util-macros.
3355#
3356AC_DEFUN([XORG_INSTALL], [
3357AC_REQUIRE([PKG_PROG_PKG_CONFIG])
3358macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
3359INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
3360mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
3361|| (rm -f \$(top_srcdir)/.INSTALL.tmp; test -e \$(top_srcdir)/INSTALL || ( \
3362touch \$(top_srcdir)/INSTALL; \
3363echo 'failed to copy INSTALL from util-macros: installing empty INSTALL.' >&2))"
3364AC_SUBST([INSTALL_CMD])
3365]) # XORG_INSTALL
3366dnl Copyright 2005 Red Hat, Inc
3367dnl
3368dnl Permission to use, copy, modify, distribute, and sell this software and its
3369dnl documentation for any purpose is hereby granted without fee, provided that
3370dnl the above copyright notice appear in all copies and that both that
3371dnl copyright notice and this permission notice appear in supporting
3372dnl documentation.
3373dnl
3374dnl The above copyright notice and this permission notice shall be included
3375dnl in all copies or substantial portions of the Software.
3376dnl
3377dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
3378dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
3379dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
3380dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
3381dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
3382dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
3383dnl OTHER DEALINGS IN THE SOFTWARE.
3384dnl
3385dnl Except as contained in this notice, the name of the copyright holders shall
3386dnl not be used in advertising or otherwise to promote the sale, use or
3387dnl other dealings in this Software without prior written authorization
3388dnl from the copyright holders.
3389dnl
3390
3391# XORG_RELEASE_VERSION
3392# --------------------
3393# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
3394
3395AC_DEFUN([XORG_RELEASE_VERSION],[
3396	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
3397		[`echo $PACKAGE_VERSION | cut -d . -f 1`],
3398		[Major version of this package])
3399	PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
3400	if test "x$PVM" = "x"; then
3401		PVM="0"
3402	fi
3403	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
3404		[$PVM],
3405		[Minor version of this package])
3406	PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
3407	if test "x$PVP" = "x"; then
3408		PVP="0"
3409	fi
3410	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
3411		[$PVP],
3412		[Patch version of this package])
3413])
3414
3415# XORG_CHANGELOG()
3416# ----------------
3417# Minimum version: 1.2.0
3418#
3419# Defines the variable CHANGELOG_CMD as the command to generate
3420# ChangeLog from git.
3421#
3422#
3423AC_DEFUN([XORG_CHANGELOG], [
3424CHANGELOG_CMD="((GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp) 2>/dev/null && \
3425mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
3426|| (rm -f \$(top_srcdir)/.changelog.tmp; test -e \$(top_srcdir)/ChangeLog || ( \
3427touch \$(top_srcdir)/ChangeLog; \
3428echo 'git failed to create ChangeLog: installing empty ChangeLog.' >&2))"
3429AC_SUBST([CHANGELOG_CMD])
3430]) # XORG_CHANGELOG
3431
3432# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
3433#
3434#   Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software
3435#   Foundation, Inc.
3436#   Written by Gordon Matzigkeit, 1996
3437#
3438# This file is free software; the Free Software Foundation gives
3439# unlimited permission to copy and/or distribute it, with or without
3440# modifications, as long as this notice is preserved.
3441
3442m4_define([_LT_COPYING], [dnl
3443# Copyright (C) 2014 Free Software Foundation, Inc.
3444# This is free software; see the source for copying conditions.  There is NO
3445# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
3446
3447# GNU Libtool is free software; you can redistribute it and/or modify
3448# it under the terms of the GNU General Public License as published by
3449# the Free Software Foundation; either version 2 of of the License, or
3450# (at your option) any later version.
3451#
3452# As a special exception to the GNU General Public License, if you
3453# distribute this file as part of a program or library that is built
3454# using GNU Libtool, you may include this file under the  same
3455# distribution terms that you use for the rest of that program.
3456#
3457# GNU Libtool is distributed in the hope that it will be useful, but
3458# WITHOUT ANY WARRANTY; without even the implied warranty of
3459# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
3460# GNU General Public License for more details.
3461#
3462# You should have received a copy of the GNU General Public License
3463# along with this program.  If not, see <http://www.gnu.org/licenses/>.
3464])
3465
3466# serial 59 LT_INIT
3467
3468
3469# LT_PREREQ(VERSION)
3470# ------------------
3471# Complain and exit if this libtool version is less that VERSION.
3472m4_defun([LT_PREREQ],
3473[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
3474       [m4_default([$3],
3475		   [m4_fatal([Libtool version $1 or higher is required],
3476		             63)])],
3477       [$2])])
3478
3479
3480# _LT_CHECK_BUILDDIR
3481# ------------------
3482# Complain if the absolute build directory name contains unusual characters
3483m4_defun([_LT_CHECK_BUILDDIR],
3484[case `pwd` in
3485  *\ * | *\	*)
3486    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
3487esac
3488])
3489
3490
3491# LT_INIT([OPTIONS])
3492# ------------------
3493AC_DEFUN([LT_INIT],
3494[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
3495AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
3496AC_BEFORE([$0], [LT_LANG])dnl
3497AC_BEFORE([$0], [LT_OUTPUT])dnl
3498AC_BEFORE([$0], [LTDL_INIT])dnl
3499m4_require([_LT_CHECK_BUILDDIR])dnl
3500
3501dnl Autoconf doesn't catch unexpanded LT_ macros by default:
3502m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
3503m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
3504dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
3505dnl unless we require an AC_DEFUNed macro:
3506AC_REQUIRE([LTOPTIONS_VERSION])dnl
3507AC_REQUIRE([LTSUGAR_VERSION])dnl
3508AC_REQUIRE([LTVERSION_VERSION])dnl
3509AC_REQUIRE([LTOBSOLETE_VERSION])dnl
3510m4_require([_LT_PROG_LTMAIN])dnl
3511
3512_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
3513
3514dnl Parse OPTIONS
3515_LT_SET_OPTIONS([$0], [$1])
3516
3517# This can be used to rebuild libtool when needed
3518LIBTOOL_DEPS=$ltmain
3519
3520# Always use our own libtool.
3521LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3522AC_SUBST(LIBTOOL)dnl
3523
3524_LT_SETUP
3525
3526# Only expand once:
3527m4_define([LT_INIT])
3528])# LT_INIT
3529
3530# Old names:
3531AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
3532AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
3533dnl aclocal-1.4 backwards compatibility:
3534dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
3535dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
3536
3537
3538# _LT_PREPARE_CC_BASENAME
3539# -----------------------
3540m4_defun([_LT_PREPARE_CC_BASENAME], [
3541# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
3542func_cc_basename ()
3543{
3544    for cc_temp in @S|@*""; do
3545      case $cc_temp in
3546        compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
3547        distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
3548        \-*) ;;
3549        *) break;;
3550      esac
3551    done
3552    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
3553}
3554])# _LT_PREPARE_CC_BASENAME
3555
3556
3557# _LT_CC_BASENAME(CC)
3558# -------------------
3559# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
3560# but that macro is also expanded into generated libtool script, which
3561# arranges for $SED and $ECHO to be set by different means.
3562m4_defun([_LT_CC_BASENAME],
3563[m4_require([_LT_PREPARE_CC_BASENAME])dnl
3564AC_REQUIRE([_LT_DECL_SED])dnl
3565AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
3566func_cc_basename $1
3567cc_basename=$func_cc_basename_result
3568])
3569
3570
3571# _LT_FILEUTILS_DEFAULTS
3572# ----------------------
3573# It is okay to use these file commands and assume they have been set
3574# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
3575m4_defun([_LT_FILEUTILS_DEFAULTS],
3576[: ${CP="cp -f"}
3577: ${MV="mv -f"}
3578: ${RM="rm -f"}
3579])# _LT_FILEUTILS_DEFAULTS
3580
3581
3582# _LT_SETUP
3583# ---------
3584m4_defun([_LT_SETUP],
3585[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3586AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3587AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
3588AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
3589
3590_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
3591dnl
3592_LT_DECL([], [host_alias], [0], [The host system])dnl
3593_LT_DECL([], [host], [0])dnl
3594_LT_DECL([], [host_os], [0])dnl
3595dnl
3596_LT_DECL([], [build_alias], [0], [The build system])dnl
3597_LT_DECL([], [build], [0])dnl
3598_LT_DECL([], [build_os], [0])dnl
3599dnl
3600AC_REQUIRE([AC_PROG_CC])dnl
3601AC_REQUIRE([LT_PATH_LD])dnl
3602AC_REQUIRE([LT_PATH_NM])dnl
3603dnl
3604AC_REQUIRE([AC_PROG_LN_S])dnl
3605test -z "$LN_S" && LN_S="ln -s"
3606_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
3607dnl
3608AC_REQUIRE([LT_CMD_MAX_LEN])dnl
3609_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
3610_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
3611dnl
3612m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3613m4_require([_LT_CHECK_SHELL_FEATURES])dnl
3614m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
3615m4_require([_LT_CMD_RELOAD])dnl
3616m4_require([_LT_DECL_FILECMD])dnl
3617m4_require([_LT_CHECK_MAGIC_METHOD])dnl
3618m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
3619m4_require([_LT_CMD_OLD_ARCHIVE])dnl
3620m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
3621m4_require([_LT_WITH_SYSROOT])dnl
3622m4_require([_LT_CMD_TRUNCATE])dnl
3623
3624_LT_CONFIG_LIBTOOL_INIT([
3625# See if we are running on zsh, and set the options that allow our
3626# commands through without removal of \ escapes INIT.
3627if test -n "\${ZSH_VERSION+set}"; then
3628   setopt NO_GLOB_SUBST
3629fi
3630])
3631if test -n "${ZSH_VERSION+set}"; then
3632   setopt NO_GLOB_SUBST
3633fi
3634
3635_LT_CHECK_OBJDIR
3636
3637m4_require([_LT_TAG_COMPILER])dnl
3638
3639case $host_os in
3640aix3*)
3641  # AIX sometimes has problems with the GCC collect2 program.  For some
3642  # reason, if we set the COLLECT_NAMES environment variable, the problems
3643  # vanish in a puff of smoke.
3644  if test set != "${COLLECT_NAMES+set}"; then
3645    COLLECT_NAMES=
3646    export COLLECT_NAMES
3647  fi
3648  ;;
3649esac
3650
3651# Global variables:
3652ofile=libtool
3653can_build_shared=yes
3654
3655# All known linkers require a '.a' archive for static linking (except MSVC and
3656# ICC, which need '.lib').
3657libext=a
3658
3659with_gnu_ld=$lt_cv_prog_gnu_ld
3660
3661old_CC=$CC
3662old_CFLAGS=$CFLAGS
3663
3664# Set sane defaults for various variables
3665test -z "$CC" && CC=cc
3666test -z "$LTCC" && LTCC=$CC
3667test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
3668test -z "$LD" && LD=ld
3669test -z "$ac_objext" && ac_objext=o
3670
3671_LT_CC_BASENAME([$compiler])
3672
3673# Only perform the check for file, if the check method requires it
3674test -z "$MAGIC_CMD" && MAGIC_CMD=file
3675case $deplibs_check_method in
3676file_magic*)
3677  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
3678    _LT_PATH_MAGIC
3679  fi
3680  ;;
3681esac
3682
3683# Use C for the default configuration in the libtool script
3684LT_SUPPORTED_TAG([CC])
3685_LT_LANG_C_CONFIG
3686_LT_LANG_DEFAULT_CONFIG
3687_LT_CONFIG_COMMANDS
3688])# _LT_SETUP
3689
3690
3691# _LT_PREPARE_SED_QUOTE_VARS
3692# --------------------------
3693# Define a few sed substitution that help us do robust quoting.
3694m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
3695[# Backslashify metacharacters that are still active within
3696# double-quoted strings.
3697sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
3698
3699# Same as above, but do not quote variable references.
3700double_quote_subst='s/\([["`\\]]\)/\\\1/g'
3701
3702# Sed substitution to delay expansion of an escaped shell variable in a
3703# double_quote_subst'ed string.
3704delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
3705
3706# Sed substitution to delay expansion of an escaped single quote.
3707delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
3708
3709# Sed substitution to avoid accidental globbing in evaled expressions
3710no_glob_subst='s/\*/\\\*/g'
3711])
3712
3713# _LT_PROG_LTMAIN
3714# ---------------
3715# Note that this code is called both from 'configure', and 'config.status'
3716# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
3717# 'config.status' has no value for ac_aux_dir unless we are using Automake,
3718# so we pass a copy along to make sure it has a sensible value anyway.
3719m4_defun([_LT_PROG_LTMAIN],
3720[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
3721_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
3722ltmain=$ac_aux_dir/ltmain.sh
3723])# _LT_PROG_LTMAIN
3724
3725
3726
3727# So that we can recreate a full libtool script including additional
3728# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
3729# in macros and then make a single call at the end using the 'libtool'
3730# label.
3731
3732
3733# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
3734# ----------------------------------------
3735# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
3736m4_define([_LT_CONFIG_LIBTOOL_INIT],
3737[m4_ifval([$1],
3738          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
3739                     [$1
3740])])])
3741
3742# Initialize.
3743m4_define([_LT_OUTPUT_LIBTOOL_INIT])
3744
3745
3746# _LT_CONFIG_LIBTOOL([COMMANDS])
3747# ------------------------------
3748# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
3749m4_define([_LT_CONFIG_LIBTOOL],
3750[m4_ifval([$1],
3751          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
3752                     [$1
3753])])])
3754
3755# Initialize.
3756m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
3757
3758
3759# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
3760# -----------------------------------------------------
3761m4_defun([_LT_CONFIG_SAVE_COMMANDS],
3762[_LT_CONFIG_LIBTOOL([$1])
3763_LT_CONFIG_LIBTOOL_INIT([$2])
3764])
3765
3766
3767# _LT_FORMAT_COMMENT([COMMENT])
3768# -----------------------------
3769# Add leading comment marks to the start of each line, and a trailing
3770# full-stop to the whole comment if one is not present already.
3771m4_define([_LT_FORMAT_COMMENT],
3772[m4_ifval([$1], [
3773m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
3774              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
3775)])
3776
3777
3778
3779
3780
3781# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
3782# -------------------------------------------------------------------
3783# CONFIGNAME is the name given to the value in the libtool script.
3784# VARNAME is the (base) name used in the configure script.
3785# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
3786# VARNAME.  Any other value will be used directly.
3787m4_define([_LT_DECL],
3788[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
3789    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
3790	[m4_ifval([$1], [$1], [$2])])
3791    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
3792    m4_ifval([$4],
3793	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
3794    lt_dict_add_subkey([lt_decl_dict], [$2],
3795	[tagged?], [m4_ifval([$5], [yes], [no])])])
3796])
3797
3798
3799# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
3800# --------------------------------------------------------
3801m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
3802
3803
3804# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
3805# ------------------------------------------------
3806m4_define([lt_decl_tag_varnames],
3807[_lt_decl_filter([tagged?], [yes], $@)])
3808
3809
3810# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
3811# ---------------------------------------------------------
3812m4_define([_lt_decl_filter],
3813[m4_case([$#],
3814  [0], [m4_fatal([$0: too few arguments: $#])],
3815  [1], [m4_fatal([$0: too few arguments: $#: $1])],
3816  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
3817  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
3818  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
3819])
3820
3821
3822# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
3823# --------------------------------------------------
3824m4_define([lt_decl_quote_varnames],
3825[_lt_decl_filter([value], [1], $@)])
3826
3827
3828# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
3829# ---------------------------------------------------
3830m4_define([lt_decl_dquote_varnames],
3831[_lt_decl_filter([value], [2], $@)])
3832
3833
3834# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
3835# ---------------------------------------------------
3836m4_define([lt_decl_varnames_tagged],
3837[m4_assert([$# <= 2])dnl
3838_$0(m4_quote(m4_default([$1], [[, ]])),
3839    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
3840    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
3841m4_define([_lt_decl_varnames_tagged],
3842[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
3843
3844
3845# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
3846# ------------------------------------------------
3847m4_define([lt_decl_all_varnames],
3848[_$0(m4_quote(m4_default([$1], [[, ]])),
3849     m4_if([$2], [],
3850	   m4_quote(lt_decl_varnames),
3851	m4_quote(m4_shift($@))))[]dnl
3852])
3853m4_define([_lt_decl_all_varnames],
3854[lt_join($@, lt_decl_varnames_tagged([$1],
3855			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
3856])
3857
3858
3859# _LT_CONFIG_STATUS_DECLARE([VARNAME])
3860# ------------------------------------
3861# Quote a variable value, and forward it to 'config.status' so that its
3862# declaration there will have the same value as in 'configure'.  VARNAME
3863# must have a single quote delimited value for this to work.
3864m4_define([_LT_CONFIG_STATUS_DECLARE],
3865[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
3866
3867
3868# _LT_CONFIG_STATUS_DECLARATIONS
3869# ------------------------------
3870# We delimit libtool config variables with single quotes, so when
3871# we write them to config.status, we have to be sure to quote all
3872# embedded single quotes properly.  In configure, this macro expands
3873# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
3874#
3875#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
3876m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
3877[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
3878    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
3879
3880
3881# _LT_LIBTOOL_TAGS
3882# ----------------
3883# Output comment and list of tags supported by the script
3884m4_defun([_LT_LIBTOOL_TAGS],
3885[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
3886available_tags='_LT_TAGS'dnl
3887])
3888
3889
3890# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
3891# -----------------------------------
3892# Extract the dictionary values for VARNAME (optionally with TAG) and
3893# expand to a commented shell variable setting:
3894#
3895#    # Some comment about what VAR is for.
3896#    visible_name=$lt_internal_name
3897m4_define([_LT_LIBTOOL_DECLARE],
3898[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
3899					   [description])))[]dnl
3900m4_pushdef([_libtool_name],
3901    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
3902m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
3903    [0], [_libtool_name=[$]$1],
3904    [1], [_libtool_name=$lt_[]$1],
3905    [2], [_libtool_name=$lt_[]$1],
3906    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
3907m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
3908])
3909
3910
3911# _LT_LIBTOOL_CONFIG_VARS
3912# -----------------------
3913# Produce commented declarations of non-tagged libtool config variables
3914# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
3915# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
3916# section) are produced by _LT_LIBTOOL_TAG_VARS.
3917m4_defun([_LT_LIBTOOL_CONFIG_VARS],
3918[m4_foreach([_lt_var],
3919    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
3920    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
3921
3922
3923# _LT_LIBTOOL_TAG_VARS(TAG)
3924# -------------------------
3925m4_define([_LT_LIBTOOL_TAG_VARS],
3926[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
3927    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
3928
3929
3930# _LT_TAGVAR(VARNAME, [TAGNAME])
3931# ------------------------------
3932m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
3933
3934
3935# _LT_CONFIG_COMMANDS
3936# -------------------
3937# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
3938# variables for single and double quote escaping we saved from calls
3939# to _LT_DECL, we can put quote escaped variables declarations
3940# into 'config.status', and then the shell code to quote escape them in
3941# for loops in 'config.status'.  Finally, any additional code accumulated
3942# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
3943m4_defun([_LT_CONFIG_COMMANDS],
3944[AC_PROVIDE_IFELSE([LT_OUTPUT],
3945	dnl If the libtool generation code has been placed in $CONFIG_LT,
3946	dnl instead of duplicating it all over again into config.status,
3947	dnl then we will have config.status run $CONFIG_LT later, so it
3948	dnl needs to know what name is stored there:
3949        [AC_CONFIG_COMMANDS([libtool],
3950            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
3951    dnl If the libtool generation code is destined for config.status,
3952    dnl expand the accumulated commands and init code now:
3953    [AC_CONFIG_COMMANDS([libtool],
3954        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
3955])#_LT_CONFIG_COMMANDS
3956
3957
3958# Initialize.
3959m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
3960[
3961
3962# The HP-UX ksh and POSIX shell print the target directory to stdout
3963# if CDPATH is set.
3964(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
3965
3966sed_quote_subst='$sed_quote_subst'
3967double_quote_subst='$double_quote_subst'
3968delay_variable_subst='$delay_variable_subst'
3969_LT_CONFIG_STATUS_DECLARATIONS
3970LTCC='$LTCC'
3971LTCFLAGS='$LTCFLAGS'
3972compiler='$compiler_DEFAULT'
3973
3974# A function that is used when there is no print builtin or printf.
3975func_fallback_echo ()
3976{
3977  eval 'cat <<_LTECHO_EOF
3978\$[]1
3979_LTECHO_EOF'
3980}
3981
3982# Quote evaled strings.
3983for var in lt_decl_all_varnames([[ \
3984]], lt_decl_quote_varnames); do
3985    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
3986    *[[\\\\\\\`\\"\\\$]]*)
3987      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
3988      ;;
3989    *)
3990      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
3991      ;;
3992    esac
3993done
3994
3995# Double-quote double-evaled strings.
3996for var in lt_decl_all_varnames([[ \
3997]], lt_decl_dquote_varnames); do
3998    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
3999    *[[\\\\\\\`\\"\\\$]]*)
4000      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
4001      ;;
4002    *)
4003      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
4004      ;;
4005    esac
4006done
4007
4008_LT_OUTPUT_LIBTOOL_INIT
4009])
4010
4011# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
4012# ------------------------------------
4013# Generate a child script FILE with all initialization necessary to
4014# reuse the environment learned by the parent script, and make the
4015# file executable.  If COMMENT is supplied, it is inserted after the
4016# '#!' sequence but before initialization text begins.  After this
4017# macro, additional text can be appended to FILE to form the body of
4018# the child script.  The macro ends with non-zero status if the
4019# file could not be fully written (such as if the disk is full).
4020m4_ifdef([AS_INIT_GENERATED],
4021[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
4022[m4_defun([_LT_GENERATED_FILE_INIT],
4023[m4_require([AS_PREPARE])]dnl
4024[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
4025[lt_write_fail=0
4026cat >$1 <<_ASEOF || lt_write_fail=1
4027#! $SHELL
4028# Generated by $as_me.
4029$2
4030SHELL=\${CONFIG_SHELL-$SHELL}
4031export SHELL
4032_ASEOF
4033cat >>$1 <<\_ASEOF || lt_write_fail=1
4034AS_SHELL_SANITIZE
4035_AS_PREPARE
4036exec AS_MESSAGE_FD>&1
4037_ASEOF
4038test 0 = "$lt_write_fail" && chmod +x $1[]dnl
4039m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
4040
4041# LT_OUTPUT
4042# ---------
4043# This macro allows early generation of the libtool script (before
4044# AC_OUTPUT is called), incase it is used in configure for compilation
4045# tests.
4046AC_DEFUN([LT_OUTPUT],
4047[: ${CONFIG_LT=./config.lt}
4048AC_MSG_NOTICE([creating $CONFIG_LT])
4049_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
4050[# Run this file to recreate a libtool stub with the current configuration.])
4051
4052cat >>"$CONFIG_LT" <<\_LTEOF
4053lt_cl_silent=false
4054exec AS_MESSAGE_LOG_FD>>config.log
4055{
4056  echo
4057  AS_BOX([Running $as_me.])
4058} >&AS_MESSAGE_LOG_FD
4059
4060lt_cl_help="\
4061'$as_me' creates a local libtool stub from the current configuration,
4062for use in further configure time tests before the real libtool is
4063generated.
4064
4065Usage: $[0] [[OPTIONS]]
4066
4067  -h, --help      print this help, then exit
4068  -V, --version   print version number, then exit
4069  -q, --quiet     do not print progress messages
4070  -d, --debug     don't remove temporary files
4071
4072Report bugs to <bug-libtool@gnu.org>."
4073
4074lt_cl_version="\
4075m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
4076m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
4077configured by $[0], generated by m4_PACKAGE_STRING.
4078
4079Copyright (C) 2011 Free Software Foundation, Inc.
4080This config.lt script is free software; the Free Software Foundation
4081gives unlimited permision to copy, distribute and modify it."
4082
4083while test 0 != $[#]
4084do
4085  case $[1] in
4086    --version | --v* | -V )
4087      echo "$lt_cl_version"; exit 0 ;;
4088    --help | --h* | -h )
4089      echo "$lt_cl_help"; exit 0 ;;
4090    --debug | --d* | -d )
4091      debug=: ;;
4092    --quiet | --q* | --silent | --s* | -q )
4093      lt_cl_silent=: ;;
4094
4095    -*) AC_MSG_ERROR([unrecognized option: $[1]
4096Try '$[0] --help' for more information.]) ;;
4097
4098    *) AC_MSG_ERROR([unrecognized argument: $[1]
4099Try '$[0] --help' for more information.]) ;;
4100  esac
4101  shift
4102done
4103
4104if $lt_cl_silent; then
4105  exec AS_MESSAGE_FD>/dev/null
4106fi
4107_LTEOF
4108
4109cat >>"$CONFIG_LT" <<_LTEOF
4110_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
4111_LTEOF
4112
4113cat >>"$CONFIG_LT" <<\_LTEOF
4114AC_MSG_NOTICE([creating $ofile])
4115_LT_OUTPUT_LIBTOOL_COMMANDS
4116AS_EXIT(0)
4117_LTEOF
4118chmod +x "$CONFIG_LT"
4119
4120# configure is writing to config.log, but config.lt does its own redirection,
4121# appending to config.log, which fails on DOS, as config.log is still kept
4122# open by configure.  Here we exec the FD to /dev/null, effectively closing
4123# config.log, so it can be properly (re)opened and appended to by config.lt.
4124lt_cl_success=:
4125test yes = "$silent" &&
4126  lt_config_lt_args="$lt_config_lt_args --quiet"
4127exec AS_MESSAGE_LOG_FD>/dev/null
4128$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
4129exec AS_MESSAGE_LOG_FD>>config.log
4130$lt_cl_success || AS_EXIT(1)
4131])# LT_OUTPUT
4132
4133
4134# _LT_CONFIG(TAG)
4135# ---------------
4136# If TAG is the built-in tag, create an initial libtool script with a
4137# default configuration from the untagged config vars.  Otherwise add code
4138# to config.status for appending the configuration named by TAG from the
4139# matching tagged config vars.
4140m4_defun([_LT_CONFIG],
4141[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4142_LT_CONFIG_SAVE_COMMANDS([
4143  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
4144  m4_if(_LT_TAG, [C], [
4145    # See if we are running on zsh, and set the options that allow our
4146    # commands through without removal of \ escapes.
4147    if test -n "${ZSH_VERSION+set}"; then
4148      setopt NO_GLOB_SUBST
4149    fi
4150
4151    cfgfile=${ofile}T
4152    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
4153    $RM "$cfgfile"
4154
4155    cat <<_LT_EOF >> "$cfgfile"
4156#! $SHELL
4157# Generated automatically by $as_me ($PACKAGE) $VERSION
4158# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4159# NOTE: Changes made to this file will be lost: look at ltmain.sh.
4160
4161# Provide generalized library-building support services.
4162# Written by Gordon Matzigkeit, 1996
4163
4164_LT_COPYING
4165_LT_LIBTOOL_TAGS
4166
4167# Configured defaults for sys_lib_dlsearch_path munging.
4168: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
4169
4170# ### BEGIN LIBTOOL CONFIG
4171_LT_LIBTOOL_CONFIG_VARS
4172_LT_LIBTOOL_TAG_VARS
4173# ### END LIBTOOL CONFIG
4174
4175_LT_EOF
4176
4177    cat <<'_LT_EOF' >> "$cfgfile"
4178
4179# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
4180
4181_LT_PREPARE_MUNGE_PATH_LIST
4182_LT_PREPARE_CC_BASENAME
4183
4184# ### END FUNCTIONS SHARED WITH CONFIGURE
4185
4186_LT_EOF
4187
4188  case $host_os in
4189  aix3*)
4190    cat <<\_LT_EOF >> "$cfgfile"
4191# AIX sometimes has problems with the GCC collect2 program.  For some
4192# reason, if we set the COLLECT_NAMES environment variable, the problems
4193# vanish in a puff of smoke.
4194if test set != "${COLLECT_NAMES+set}"; then
4195  COLLECT_NAMES=
4196  export COLLECT_NAMES
4197fi
4198_LT_EOF
4199    ;;
4200  esac
4201
4202  _LT_PROG_LTMAIN
4203
4204  # We use sed instead of cat because bash on DJGPP gets confused if
4205  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
4206  # text mode, it properly converts lines to CR/LF.  This bash problem
4207  # is reportedly fixed, but why not run on old versions too?
4208  $SED '$q' "$ltmain" >> "$cfgfile" \
4209     || (rm -f "$cfgfile"; exit 1)
4210
4211   mv -f "$cfgfile" "$ofile" ||
4212    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
4213  chmod +x "$ofile"
4214],
4215[cat <<_LT_EOF >> "$ofile"
4216
4217dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
4218dnl in a comment (ie after a #).
4219# ### BEGIN LIBTOOL TAG CONFIG: $1
4220_LT_LIBTOOL_TAG_VARS(_LT_TAG)
4221# ### END LIBTOOL TAG CONFIG: $1
4222_LT_EOF
4223])dnl /m4_if
4224],
4225[m4_if([$1], [], [
4226    PACKAGE='$PACKAGE'
4227    VERSION='$VERSION'
4228    RM='$RM'
4229    ofile='$ofile'], [])
4230])dnl /_LT_CONFIG_SAVE_COMMANDS
4231])# _LT_CONFIG
4232
4233
4234# LT_SUPPORTED_TAG(TAG)
4235# ---------------------
4236# Trace this macro to discover what tags are supported by the libtool
4237# --tag option, using:
4238#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
4239AC_DEFUN([LT_SUPPORTED_TAG], [])
4240
4241
4242# C support is built-in for now
4243m4_define([_LT_LANG_C_enabled], [])
4244m4_define([_LT_TAGS], [])
4245
4246
4247# LT_LANG(LANG)
4248# -------------
4249# Enable libtool support for the given language if not already enabled.
4250AC_DEFUN([LT_LANG],
4251[AC_BEFORE([$0], [LT_OUTPUT])dnl
4252m4_case([$1],
4253  [C],			[_LT_LANG(C)],
4254  [C++],		[_LT_LANG(CXX)],
4255  [Go],			[_LT_LANG(GO)],
4256  [Java],		[_LT_LANG(GCJ)],
4257  [Fortran 77],		[_LT_LANG(F77)],
4258  [Fortran],		[_LT_LANG(FC)],
4259  [Windows Resource],	[_LT_LANG(RC)],
4260  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
4261    [_LT_LANG($1)],
4262    [m4_fatal([$0: unsupported language: "$1"])])])dnl
4263])# LT_LANG
4264
4265
4266# _LT_LANG(LANGNAME)
4267# ------------------
4268m4_defun([_LT_LANG],
4269[m4_ifdef([_LT_LANG_]$1[_enabled], [],
4270  [LT_SUPPORTED_TAG([$1])dnl
4271  m4_append([_LT_TAGS], [$1 ])dnl
4272  m4_define([_LT_LANG_]$1[_enabled], [])dnl
4273  _LT_LANG_$1_CONFIG($1)])dnl
4274])# _LT_LANG
4275
4276
4277m4_ifndef([AC_PROG_GO], [
4278# NOTE: This macro has been submitted for inclusion into   #
4279#  GNU Autoconf as AC_PROG_GO.  When it is available in    #
4280#  a released version of Autoconf we should remove this    #
4281#  macro and use it instead.                               #
4282m4_defun([AC_PROG_GO],
4283[AC_LANG_PUSH(Go)dnl
4284AC_ARG_VAR([GOC],     [Go compiler command])dnl
4285AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
4286_AC_ARG_VAR_LDFLAGS()dnl
4287AC_CHECK_TOOL(GOC, gccgo)
4288if test -z "$GOC"; then
4289  if test -n "$ac_tool_prefix"; then
4290    AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
4291  fi
4292fi
4293if test -z "$GOC"; then
4294  AC_CHECK_PROG(GOC, gccgo, gccgo, false)
4295fi
4296])#m4_defun
4297])#m4_ifndef
4298
4299
4300# _LT_LANG_DEFAULT_CONFIG
4301# -----------------------
4302m4_defun([_LT_LANG_DEFAULT_CONFIG],
4303[AC_PROVIDE_IFELSE([AC_PROG_CXX],
4304  [LT_LANG(CXX)],
4305  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
4306
4307AC_PROVIDE_IFELSE([AC_PROG_F77],
4308  [LT_LANG(F77)],
4309  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
4310
4311AC_PROVIDE_IFELSE([AC_PROG_FC],
4312  [LT_LANG(FC)],
4313  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
4314
4315dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
4316dnl pulling things in needlessly.
4317AC_PROVIDE_IFELSE([AC_PROG_GCJ],
4318  [LT_LANG(GCJ)],
4319  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
4320    [LT_LANG(GCJ)],
4321    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
4322      [LT_LANG(GCJ)],
4323      [m4_ifdef([AC_PROG_GCJ],
4324	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
4325       m4_ifdef([A][M_PROG_GCJ],
4326	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
4327       m4_ifdef([LT_PROG_GCJ],
4328	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
4329
4330AC_PROVIDE_IFELSE([AC_PROG_GO],
4331  [LT_LANG(GO)],
4332  [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
4333
4334AC_PROVIDE_IFELSE([LT_PROG_RC],
4335  [LT_LANG(RC)],
4336  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
4337])# _LT_LANG_DEFAULT_CONFIG
4338
4339# Obsolete macros:
4340AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
4341AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
4342AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
4343AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
4344AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
4345dnl aclocal-1.4 backwards compatibility:
4346dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
4347dnl AC_DEFUN([AC_LIBTOOL_F77], [])
4348dnl AC_DEFUN([AC_LIBTOOL_FC], [])
4349dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
4350dnl AC_DEFUN([AC_LIBTOOL_RC], [])
4351
4352
4353# _LT_TAG_COMPILER
4354# ----------------
4355m4_defun([_LT_TAG_COMPILER],
4356[AC_REQUIRE([AC_PROG_CC])dnl
4357
4358_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
4359_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
4360_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
4361_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
4362
4363# If no C compiler was specified, use CC.
4364LTCC=${LTCC-"$CC"}
4365
4366# If no C compiler flags were specified, use CFLAGS.
4367LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
4368
4369# Allow CC to be a program name with arguments.
4370compiler=$CC
4371])# _LT_TAG_COMPILER
4372
4373
4374# _LT_COMPILER_BOILERPLATE
4375# ------------------------
4376# Check for compiler boilerplate output or warnings with
4377# the simple compiler test code.
4378m4_defun([_LT_COMPILER_BOILERPLATE],
4379[m4_require([_LT_DECL_SED])dnl
4380ac_outfile=conftest.$ac_objext
4381echo "$lt_simple_compile_test_code" >conftest.$ac_ext
4382eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
4383_lt_compiler_boilerplate=`cat conftest.err`
4384$RM conftest*
4385])# _LT_COMPILER_BOILERPLATE
4386
4387
4388# _LT_LINKER_BOILERPLATE
4389# ----------------------
4390# Check for linker boilerplate output or warnings with
4391# the simple link test code.
4392m4_defun([_LT_LINKER_BOILERPLATE],
4393[m4_require([_LT_DECL_SED])dnl
4394ac_outfile=conftest.$ac_objext
4395echo "$lt_simple_link_test_code" >conftest.$ac_ext
4396eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
4397_lt_linker_boilerplate=`cat conftest.err`
4398$RM -r conftest*
4399])# _LT_LINKER_BOILERPLATE
4400
4401# _LT_REQUIRED_DARWIN_CHECKS
4402# -------------------------
4403m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
4404  case $host_os in
4405    rhapsody* | darwin*)
4406    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
4407    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
4408    AC_CHECK_TOOL([LIPO], [lipo], [:])
4409    AC_CHECK_TOOL([OTOOL], [otool], [:])
4410    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
4411    _LT_DECL([], [DSYMUTIL], [1],
4412      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
4413    _LT_DECL([], [NMEDIT], [1],
4414      [Tool to change global to local symbols on Mac OS X])
4415    _LT_DECL([], [LIPO], [1],
4416      [Tool to manipulate fat objects and archives on Mac OS X])
4417    _LT_DECL([], [OTOOL], [1],
4418      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
4419    _LT_DECL([], [OTOOL64], [1],
4420      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
4421
4422    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
4423      [lt_cv_apple_cc_single_mod=no
4424      if test -z "$LT_MULTI_MODULE"; then
4425	# By default we will add the -single_module flag. You can override
4426	# by either setting the environment variable LT_MULTI_MODULE
4427	# non-empty at configure time, or by adding -multi_module to the
4428	# link flags.
4429	rm -rf libconftest.dylib*
4430	echo "int foo(void){return 1;}" > conftest.c
4431	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
4432-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
4433	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
4434	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
4435        _lt_result=$?
4436	# If there is a non-empty error log, and "single_module"
4437	# appears in it, assume the flag caused a linker warning
4438        if test -s conftest.err && $GREP single_module conftest.err; then
4439	  cat conftest.err >&AS_MESSAGE_LOG_FD
4440	# Otherwise, if the output was created with a 0 exit code from
4441	# the compiler, it worked.
4442	elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
4443	  lt_cv_apple_cc_single_mod=yes
4444	else
4445	  cat conftest.err >&AS_MESSAGE_LOG_FD
4446	fi
4447	rm -rf libconftest.dylib*
4448	rm -f conftest.*
4449      fi])
4450
4451    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
4452      [lt_cv_ld_exported_symbols_list],
4453      [lt_cv_ld_exported_symbols_list=no
4454      save_LDFLAGS=$LDFLAGS
4455      echo "_main" > conftest.sym
4456      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
4457      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
4458	[lt_cv_ld_exported_symbols_list=yes],
4459	[lt_cv_ld_exported_symbols_list=no])
4460	LDFLAGS=$save_LDFLAGS
4461    ])
4462
4463    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
4464      [lt_cv_ld_force_load=no
4465      cat > conftest.c << _LT_EOF
4466int forced_loaded() { return 2;}
4467_LT_EOF
4468      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
4469      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
4470      echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
4471      $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
4472      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
4473      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
4474      cat > conftest.c << _LT_EOF
4475int main() { return 0;}
4476_LT_EOF
4477      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
4478      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
4479      _lt_result=$?
4480      if test -s conftest.err && $GREP force_load conftest.err; then
4481	cat conftest.err >&AS_MESSAGE_LOG_FD
4482      elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
4483	lt_cv_ld_force_load=yes
4484      else
4485	cat conftest.err >&AS_MESSAGE_LOG_FD
4486      fi
4487        rm -f conftest.err libconftest.a conftest conftest.c
4488        rm -rf conftest.dSYM
4489    ])
4490    case $host_os in
4491    rhapsody* | darwin1.[[012]])
4492      _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
4493    darwin1.*)
4494      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
4495    darwin*)
4496      case $MACOSX_DEPLOYMENT_TARGET,$host in
4497        10.[[012]],*|,*powerpc*-darwin[[5-8]]*)
4498          _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
4499        *)
4500          _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
4501      esac
4502    ;;
4503  esac
4504    if test yes = "$lt_cv_apple_cc_single_mod"; then
4505      _lt_dar_single_mod='$single_module'
4506    fi
4507    if test yes = "$lt_cv_ld_exported_symbols_list"; then
4508      _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
4509    else
4510      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
4511    fi
4512    if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
4513      _lt_dsymutil='~$DSYMUTIL $lib || :'
4514    else
4515      _lt_dsymutil=
4516    fi
4517    ;;
4518  esac
4519])
4520
4521
4522# _LT_DARWIN_LINKER_FEATURES([TAG])
4523# ---------------------------------
4524# Checks for linker and compiler features on darwin
4525m4_defun([_LT_DARWIN_LINKER_FEATURES],
4526[
4527  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
4528  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
4529  _LT_TAGVAR(hardcode_direct, $1)=no
4530  _LT_TAGVAR(hardcode_automatic, $1)=yes
4531  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4532  if test yes = "$lt_cv_ld_force_load"; then
4533    _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\"`'
4534    m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
4535                  [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
4536  else
4537    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
4538  fi
4539  _LT_TAGVAR(link_all_deplibs, $1)=yes
4540  _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
4541  case $cc_basename in
4542     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
4543     *) _lt_dar_can_shared=$GCC ;;
4544  esac
4545  if test yes = "$_lt_dar_can_shared"; then
4546    output_verbose_link_cmd=func_echo_all
4547    _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"
4548    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
4549    _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"
4550    _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"
4551    m4_if([$1], [CXX],
4552[   if test yes != "$lt_cv_apple_cc_single_mod"; then
4553      _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"
4554      _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"
4555    fi
4556],[])
4557  else
4558  _LT_TAGVAR(ld_shlibs, $1)=no
4559  fi
4560])
4561
4562# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
4563# ----------------------------------
4564# Links a minimal program and checks the executable
4565# for the system default hardcoded library path. In most cases,
4566# this is /usr/lib:/lib, but when the MPI compilers are used
4567# the location of the communication and MPI libs are included too.
4568# If we don't find anything, use the default library path according
4569# to the aix ld manual.
4570# Store the results from the different compilers for each TAGNAME.
4571# Allow to override them for all tags through lt_cv_aix_libpath.
4572m4_defun([_LT_SYS_MODULE_PATH_AIX],
4573[m4_require([_LT_DECL_SED])dnl
4574if test set = "${lt_cv_aix_libpath+set}"; then
4575  aix_libpath=$lt_cv_aix_libpath
4576else
4577  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
4578  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
4579  lt_aix_libpath_sed='[
4580      /Import File Strings/,/^$/ {
4581	  /^0/ {
4582	      s/^0  *\([^ ]*\) *$/\1/
4583	      p
4584	  }
4585      }]'
4586  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
4587  # Check for a 64-bit object if we didn't find anything.
4588  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
4589    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
4590  fi],[])
4591  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
4592    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
4593  fi
4594  ])
4595  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
4596fi
4597])# _LT_SYS_MODULE_PATH_AIX
4598
4599
4600# _LT_SHELL_INIT(ARG)
4601# -------------------
4602m4_define([_LT_SHELL_INIT],
4603[m4_divert_text([M4SH-INIT], [$1
4604])])# _LT_SHELL_INIT
4605
4606
4607
4608# _LT_PROG_ECHO_BACKSLASH
4609# -----------------------
4610# Find how we can fake an echo command that does not interpret backslash.
4611# In particular, with Autoconf 2.60 or later we add some code to the start
4612# of the generated configure script that will find a shell with a builtin
4613# printf (that we can use as an echo command).
4614m4_defun([_LT_PROG_ECHO_BACKSLASH],
4615[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
4616ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
4617ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
4618
4619AC_MSG_CHECKING([how to print strings])
4620# Test print first, because it will be a builtin if present.
4621if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
4622   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
4623  ECHO='print -r --'
4624elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
4625  ECHO='printf %s\n'
4626else
4627  # Use this function as a fallback that always works.
4628  func_fallback_echo ()
4629  {
4630    eval 'cat <<_LTECHO_EOF
4631$[]1
4632_LTECHO_EOF'
4633  }
4634  ECHO='func_fallback_echo'
4635fi
4636
4637# func_echo_all arg...
4638# Invoke $ECHO with all args, space-separated.
4639func_echo_all ()
4640{
4641    $ECHO "$*"
4642}
4643
4644case $ECHO in
4645  printf*) AC_MSG_RESULT([printf]) ;;
4646  print*) AC_MSG_RESULT([print -r]) ;;
4647  *) AC_MSG_RESULT([cat]) ;;
4648esac
4649
4650m4_ifdef([_AS_DETECT_SUGGESTED],
4651[_AS_DETECT_SUGGESTED([
4652  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
4653    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
4654    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
4655    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
4656    PATH=/empty FPATH=/empty; export PATH FPATH
4657    test "X`printf %s $ECHO`" = "X$ECHO" \
4658      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
4659
4660_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
4661_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
4662])# _LT_PROG_ECHO_BACKSLASH
4663
4664
4665# _LT_WITH_SYSROOT
4666# ----------------
4667AC_DEFUN([_LT_WITH_SYSROOT],
4668[m4_require([_LT_DECL_SED])dnl
4669AC_MSG_CHECKING([for sysroot])
4670AC_ARG_WITH([sysroot],
4671[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
4672  [Search for dependent libraries within DIR (or the compiler's sysroot
4673   if not specified).])],
4674[], [with_sysroot=no])
4675
4676dnl lt_sysroot will always be passed unquoted.  We quote it here
4677dnl in case the user passed a directory name.
4678lt_sysroot=
4679case $with_sysroot in #(
4680 yes)
4681   if test yes = "$GCC"; then
4682     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
4683   fi
4684   ;; #(
4685 /*)
4686   lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"`
4687   ;; #(
4688 no|'')
4689   ;; #(
4690 *)
4691   AC_MSG_RESULT([$with_sysroot])
4692   AC_MSG_ERROR([The sysroot must be an absolute path.])
4693   ;;
4694esac
4695
4696 AC_MSG_RESULT([${lt_sysroot:-no}])
4697_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
4698[dependent libraries, and where our libraries should be installed.])])
4699
4700# _LT_ENABLE_LOCK
4701# ---------------
4702m4_defun([_LT_ENABLE_LOCK],
4703[AC_ARG_ENABLE([libtool-lock],
4704  [AS_HELP_STRING([--disable-libtool-lock],
4705    [avoid locking (might break parallel builds)])])
4706test no = "$enable_libtool_lock" || enable_libtool_lock=yes
4707
4708# Some flags need to be propagated to the compiler or linker for good
4709# libtool support.
4710case $host in
4711ia64-*-hpux*)
4712  # Find out what ABI is being produced by ac_compile, and set mode
4713  # options accordingly.
4714  echo 'int i;' > conftest.$ac_ext
4715  if AC_TRY_EVAL(ac_compile); then
4716    case `$FILECMD conftest.$ac_objext` in
4717      *ELF-32*)
4718	HPUX_IA64_MODE=32
4719	;;
4720      *ELF-64*)
4721	HPUX_IA64_MODE=64
4722	;;
4723    esac
4724  fi
4725  rm -rf conftest*
4726  ;;
4727*-*-irix6*)
4728  # Find out what ABI is being produced by ac_compile, and set linker
4729  # options accordingly.
4730  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
4731  if AC_TRY_EVAL(ac_compile); then
4732    if test yes = "$lt_cv_prog_gnu_ld"; then
4733      case `$FILECMD conftest.$ac_objext` in
4734	*32-bit*)
4735	  LD="${LD-ld} -melf32bsmip"
4736	  ;;
4737	*N32*)
4738	  LD="${LD-ld} -melf32bmipn32"
4739	  ;;
4740	*64-bit*)
4741	  LD="${LD-ld} -melf64bmip"
4742	;;
4743      esac
4744    else
4745      case `$FILECMD conftest.$ac_objext` in
4746	*32-bit*)
4747	  LD="${LD-ld} -32"
4748	  ;;
4749	*N32*)
4750	  LD="${LD-ld} -n32"
4751	  ;;
4752	*64-bit*)
4753	  LD="${LD-ld} -64"
4754	  ;;
4755      esac
4756    fi
4757  fi
4758  rm -rf conftest*
4759  ;;
4760
4761mips64*-*linux*)
4762  # Find out what ABI is being produced by ac_compile, and set linker
4763  # options accordingly.
4764  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
4765  if AC_TRY_EVAL(ac_compile); then
4766    emul=elf
4767    case `$FILECMD conftest.$ac_objext` in
4768      *32-bit*)
4769	emul="${emul}32"
4770	;;
4771      *64-bit*)
4772	emul="${emul}64"
4773	;;
4774    esac
4775    case `$FILECMD conftest.$ac_objext` in
4776      *MSB*)
4777	emul="${emul}btsmip"
4778	;;
4779      *LSB*)
4780	emul="${emul}ltsmip"
4781	;;
4782    esac
4783    case `$FILECMD conftest.$ac_objext` in
4784      *N32*)
4785	emul="${emul}n32"
4786	;;
4787    esac
4788    LD="${LD-ld} -m $emul"
4789  fi
4790  rm -rf conftest*
4791  ;;
4792
4793x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
4794s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
4795  # Find out what ABI is being produced by ac_compile, and set linker
4796  # options accordingly.  Note that the listed cases only cover the
4797  # situations where additional linker options are needed (such as when
4798  # doing 32-bit compilation for a host where ld defaults to 64-bit, or
4799  # vice versa); the common cases where no linker options are needed do
4800  # not appear in the list.
4801  echo 'int i;' > conftest.$ac_ext
4802  if AC_TRY_EVAL(ac_compile); then
4803    case `$FILECMD conftest.o` in
4804      *32-bit*)
4805	case $host in
4806	  x86_64-*kfreebsd*-gnu)
4807	    LD="${LD-ld} -m elf_i386_fbsd"
4808	    ;;
4809	  x86_64-*linux*)
4810	    case `$FILECMD conftest.o` in
4811	      *x86-64*)
4812		LD="${LD-ld} -m elf32_x86_64"
4813		;;
4814	      *)
4815		LD="${LD-ld} -m elf_i386"
4816		;;
4817	    esac
4818	    ;;
4819	  powerpc64le-*linux*)
4820	    LD="${LD-ld} -m elf32lppclinux"
4821	    ;;
4822	  powerpc64-*linux*)
4823	    LD="${LD-ld} -m elf32ppclinux"
4824	    ;;
4825	  s390x-*linux*)
4826	    LD="${LD-ld} -m elf_s390"
4827	    ;;
4828	  sparc64-*linux*)
4829	    LD="${LD-ld} -m elf32_sparc"
4830	    ;;
4831	esac
4832	;;
4833      *64-bit*)
4834	case $host in
4835	  x86_64-*kfreebsd*-gnu)
4836	    LD="${LD-ld} -m elf_x86_64_fbsd"
4837	    ;;
4838	  x86_64-*linux*)
4839	    LD="${LD-ld} -m elf_x86_64"
4840	    ;;
4841	  powerpcle-*linux*)
4842	    LD="${LD-ld} -m elf64lppc"
4843	    ;;
4844	  powerpc-*linux*)
4845	    LD="${LD-ld} -m elf64ppc"
4846	    ;;
4847	  s390*-*linux*|s390*-*tpf*)
4848	    LD="${LD-ld} -m elf64_s390"
4849	    ;;
4850	  sparc*-*linux*)
4851	    LD="${LD-ld} -m elf64_sparc"
4852	    ;;
4853	esac
4854	;;
4855    esac
4856  fi
4857  rm -rf conftest*
4858  ;;
4859
4860*-*-sco3.2v5*)
4861  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4862  SAVE_CFLAGS=$CFLAGS
4863  CFLAGS="$CFLAGS -belf"
4864  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
4865    [AC_LANG_PUSH(C)
4866     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
4867     AC_LANG_POP])
4868  if test yes != "$lt_cv_cc_needs_belf"; then
4869    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4870    CFLAGS=$SAVE_CFLAGS
4871  fi
4872  ;;
4873*-*solaris*)
4874  # Find out what ABI is being produced by ac_compile, and set linker
4875  # options accordingly.
4876  echo 'int i;' > conftest.$ac_ext
4877  if AC_TRY_EVAL(ac_compile); then
4878    case `$FILECMD conftest.o` in
4879    *64-bit*)
4880      case $lt_cv_prog_gnu_ld in
4881      yes*)
4882        case $host in
4883        i?86-*-solaris*|x86_64-*-solaris*)
4884          LD="${LD-ld} -m elf_x86_64"
4885          ;;
4886        sparc*-*-solaris*)
4887          LD="${LD-ld} -m elf64_sparc"
4888          ;;
4889        esac
4890        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
4891        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
4892          LD=${LD-ld}_sol2
4893        fi
4894        ;;
4895      *)
4896	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
4897	  LD="${LD-ld} -64"
4898	fi
4899	;;
4900      esac
4901      ;;
4902    esac
4903  fi
4904  rm -rf conftest*
4905  ;;
4906esac
4907
4908need_locks=$enable_libtool_lock
4909])# _LT_ENABLE_LOCK
4910
4911
4912# _LT_PROG_AR
4913# -----------
4914m4_defun([_LT_PROG_AR],
4915[AC_CHECK_TOOLS(AR, [ar], false)
4916: ${AR=ar}
4917_LT_DECL([], [AR], [1], [The archiver])
4918
4919# Use ARFLAGS variable as AR's operation code to sync the variable naming with
4920# Automake.  If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have
4921# higher priority because thats what people were doing historically (setting
4922# ARFLAGS for automake and AR_FLAGS for libtool).  FIXME: Make the AR_FLAGS
4923# variable obsoleted/removed.
4924
4925test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr}
4926lt_ar_flags=$AR_FLAGS
4927_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)])
4928
4929# Make AR_FLAGS overridable by 'make ARFLAGS='.  Don't try to run-time override
4930# by AR_FLAGS because that was never working and AR_FLAGS is about to die.
4931_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}],
4932         [Flags to create an archive])
4933
4934AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
4935  [lt_cv_ar_at_file=no
4936   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
4937     [echo conftest.$ac_objext > conftest.lst
4938      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
4939      AC_TRY_EVAL([lt_ar_try])
4940      if test 0 -eq "$ac_status"; then
4941	# Ensure the archiver fails upon bogus file names.
4942	rm -f conftest.$ac_objext libconftest.a
4943	AC_TRY_EVAL([lt_ar_try])
4944	if test 0 -ne "$ac_status"; then
4945          lt_cv_ar_at_file=@
4946        fi
4947      fi
4948      rm -f conftest.* libconftest.a
4949     ])
4950  ])
4951
4952if test no = "$lt_cv_ar_at_file"; then
4953  archiver_list_spec=
4954else
4955  archiver_list_spec=$lt_cv_ar_at_file
4956fi
4957_LT_DECL([], [archiver_list_spec], [1],
4958  [How to feed a file listing to the archiver])
4959])# _LT_PROG_AR
4960
4961
4962# _LT_CMD_OLD_ARCHIVE
4963# -------------------
4964m4_defun([_LT_CMD_OLD_ARCHIVE],
4965[_LT_PROG_AR
4966
4967AC_CHECK_TOOL(STRIP, strip, :)
4968test -z "$STRIP" && STRIP=:
4969_LT_DECL([], [STRIP], [1], [A symbol stripping program])
4970
4971AC_CHECK_TOOL(RANLIB, ranlib, :)
4972test -z "$RANLIB" && RANLIB=:
4973_LT_DECL([], [RANLIB], [1],
4974    [Commands used to install an old-style archive])
4975
4976# Determine commands to create old-style static archives.
4977old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
4978old_postinstall_cmds='chmod 644 $oldlib'
4979old_postuninstall_cmds=
4980
4981if test -n "$RANLIB"; then
4982  case $host_os in
4983  bitrig* | openbsd*)
4984    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
4985    ;;
4986  *)
4987    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
4988    ;;
4989  esac
4990  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
4991fi
4992
4993case $host_os in
4994  darwin*)
4995    lock_old_archive_extraction=yes ;;
4996  *)
4997    lock_old_archive_extraction=no ;;
4998esac
4999_LT_DECL([], [old_postinstall_cmds], [2])
5000_LT_DECL([], [old_postuninstall_cmds], [2])
5001_LT_TAGDECL([], [old_archive_cmds], [2],
5002    [Commands used to build an old-style archive])
5003_LT_DECL([], [lock_old_archive_extraction], [0],
5004    [Whether to use a lock for old archive extraction])
5005])# _LT_CMD_OLD_ARCHIVE
5006
5007
5008# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
5009#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
5010# ----------------------------------------------------------------
5011# Check whether the given compiler option works
5012AC_DEFUN([_LT_COMPILER_OPTION],
5013[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5014m4_require([_LT_DECL_SED])dnl
5015AC_CACHE_CHECK([$1], [$2],
5016  [$2=no
5017   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
5018   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
5019   lt_compiler_flag="$3"  ## exclude from sc_useless_quotes_in_assignment
5020   # Insert the option either (1) after the last *FLAGS variable, or
5021   # (2) before a word containing "conftest.", or (3) at the end.
5022   # Note that $ac_compile itself does not contain backslashes and begins
5023   # with a dollar sign (not a hyphen), so the echo should work correctly.
5024   # The option is referenced via a variable to avoid confusing sed.
5025   lt_compile=`echo "$ac_compile" | $SED \
5026   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
5027   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
5028   -e 's:$: $lt_compiler_flag:'`
5029   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
5030   (eval "$lt_compile" 2>conftest.err)
5031   ac_status=$?
5032   cat conftest.err >&AS_MESSAGE_LOG_FD
5033   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
5034   if (exit $ac_status) && test -s "$ac_outfile"; then
5035     # The compiler can only warn and ignore the option if not recognized
5036     # So say no if there are warnings other than the usual output.
5037     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
5038     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
5039     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
5040       $2=yes
5041     fi
5042   fi
5043   $RM conftest*
5044])
5045
5046if test yes = "[$]$2"; then
5047    m4_if([$5], , :, [$5])
5048else
5049    m4_if([$6], , :, [$6])
5050fi
5051])# _LT_COMPILER_OPTION
5052
5053# Old name:
5054AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
5055dnl aclocal-1.4 backwards compatibility:
5056dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
5057
5058
5059# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
5060#                  [ACTION-SUCCESS], [ACTION-FAILURE])
5061# ----------------------------------------------------
5062# Check whether the given linker option works
5063AC_DEFUN([_LT_LINKER_OPTION],
5064[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5065m4_require([_LT_DECL_SED])dnl
5066AC_CACHE_CHECK([$1], [$2],
5067  [$2=no
5068   save_LDFLAGS=$LDFLAGS
5069   LDFLAGS="$LDFLAGS $3"
5070   echo "$lt_simple_link_test_code" > conftest.$ac_ext
5071   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
5072     # The linker can only warn and ignore the option if not recognized
5073     # So say no if there are warnings
5074     if test -s conftest.err; then
5075       # Append any errors to the config.log.
5076       cat conftest.err 1>&AS_MESSAGE_LOG_FD
5077       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
5078       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
5079       if diff conftest.exp conftest.er2 >/dev/null; then
5080         $2=yes
5081       fi
5082     else
5083       $2=yes
5084     fi
5085   fi
5086   $RM -r conftest*
5087   LDFLAGS=$save_LDFLAGS
5088])
5089
5090if test yes = "[$]$2"; then
5091    m4_if([$4], , :, [$4])
5092else
5093    m4_if([$5], , :, [$5])
5094fi
5095])# _LT_LINKER_OPTION
5096
5097# Old name:
5098AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
5099dnl aclocal-1.4 backwards compatibility:
5100dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
5101
5102
5103# LT_CMD_MAX_LEN
5104#---------------
5105AC_DEFUN([LT_CMD_MAX_LEN],
5106[AC_REQUIRE([AC_CANONICAL_HOST])dnl
5107# find the maximum length of command line arguments
5108AC_MSG_CHECKING([the maximum length of command line arguments])
5109AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
5110  i=0
5111  teststring=ABCD
5112
5113  case $build_os in
5114  msdosdjgpp*)
5115    # On DJGPP, this test can blow up pretty badly due to problems in libc
5116    # (any single argument exceeding 2000 bytes causes a buffer overrun
5117    # during glob expansion).  Even if it were fixed, the result of this
5118    # check would be larger than it should be.
5119    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
5120    ;;
5121
5122  gnu*)
5123    # Under GNU Hurd, this test is not required because there is
5124    # no limit to the length of command line arguments.
5125    # Libtool will interpret -1 as no limit whatsoever
5126    lt_cv_sys_max_cmd_len=-1;
5127    ;;
5128
5129  cygwin* | mingw* | cegcc*)
5130    # On Win9x/ME, this test blows up -- it succeeds, but takes
5131    # about 5 minutes as the teststring grows exponentially.
5132    # Worse, since 9x/ME are not pre-emptively multitasking,
5133    # you end up with a "frozen" computer, even though with patience
5134    # the test eventually succeeds (with a max line length of 256k).
5135    # Instead, let's just punt: use the minimum linelength reported by
5136    # all of the supported platforms: 8192 (on NT/2K/XP).
5137    lt_cv_sys_max_cmd_len=8192;
5138    ;;
5139
5140  mint*)
5141    # On MiNT this can take a long time and run out of memory.
5142    lt_cv_sys_max_cmd_len=8192;
5143    ;;
5144
5145  amigaos*)
5146    # On AmigaOS with pdksh, this test takes hours, literally.
5147    # So we just punt and use a minimum line length of 8192.
5148    lt_cv_sys_max_cmd_len=8192;
5149    ;;
5150
5151  bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*)
5152    # This has been around since 386BSD, at least.  Likely further.
5153    if test -x /sbin/sysctl; then
5154      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
5155    elif test -x /usr/sbin/sysctl; then
5156      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
5157    else
5158      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
5159    fi
5160    # And add a safety zone
5161    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
5162    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
5163    ;;
5164
5165  interix*)
5166    # We know the value 262144 and hardcode it with a safety zone (like BSD)
5167    lt_cv_sys_max_cmd_len=196608
5168    ;;
5169
5170  os2*)
5171    # The test takes a long time on OS/2.
5172    lt_cv_sys_max_cmd_len=8192
5173    ;;
5174
5175  osf*)
5176    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
5177    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
5178    # nice to cause kernel panics so lets avoid the loop below.
5179    # First set a reasonable default.
5180    lt_cv_sys_max_cmd_len=16384
5181    #
5182    if test -x /sbin/sysconfig; then
5183      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
5184        *1*) lt_cv_sys_max_cmd_len=-1 ;;
5185      esac
5186    fi
5187    ;;
5188  sco3.2v5*)
5189    lt_cv_sys_max_cmd_len=102400
5190    ;;
5191  sysv5* | sco5v6* | sysv4.2uw2*)
5192    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
5193    if test -n "$kargmax"; then
5194      lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[	 ]]//'`
5195    else
5196      lt_cv_sys_max_cmd_len=32768
5197    fi
5198    ;;
5199  *)
5200    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
5201    if test -n "$lt_cv_sys_max_cmd_len" && \
5202       test undefined != "$lt_cv_sys_max_cmd_len"; then
5203      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
5204      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
5205    else
5206      # Make teststring a little bigger before we do anything with it.
5207      # a 1K string should be a reasonable start.
5208      for i in 1 2 3 4 5 6 7 8; do
5209        teststring=$teststring$teststring
5210      done
5211      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
5212      # If test is not a shell built-in, we'll probably end up computing a
5213      # maximum length that is only half of the actual maximum length, but
5214      # we can't tell.
5215      while { test X`env echo "$teststring$teststring" 2>/dev/null` \
5216	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
5217	      test 17 != "$i" # 1/2 MB should be enough
5218      do
5219        i=`expr $i + 1`
5220        teststring=$teststring$teststring
5221      done
5222      # Only check the string length outside the loop.
5223      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
5224      teststring=
5225      # Add a significant safety factor because C++ compilers can tack on
5226      # massive amounts of additional arguments before passing them to the
5227      # linker.  It appears as though 1/2 is a usable value.
5228      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
5229    fi
5230    ;;
5231  esac
5232])
5233if test -n "$lt_cv_sys_max_cmd_len"; then
5234  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
5235else
5236  AC_MSG_RESULT(none)
5237fi
5238max_cmd_len=$lt_cv_sys_max_cmd_len
5239_LT_DECL([], [max_cmd_len], [0],
5240    [What is the maximum length of a command?])
5241])# LT_CMD_MAX_LEN
5242
5243# Old name:
5244AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
5245dnl aclocal-1.4 backwards compatibility:
5246dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
5247
5248
5249# _LT_HEADER_DLFCN
5250# ----------------
5251m4_defun([_LT_HEADER_DLFCN],
5252[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
5253])# _LT_HEADER_DLFCN
5254
5255
5256# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
5257#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
5258# ----------------------------------------------------------------
5259m4_defun([_LT_TRY_DLOPEN_SELF],
5260[m4_require([_LT_HEADER_DLFCN])dnl
5261if test yes = "$cross_compiling"; then :
5262  [$4]
5263else
5264  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
5265  lt_status=$lt_dlunknown
5266  cat > conftest.$ac_ext <<_LT_EOF
5267[#line $LINENO "configure"
5268#include "confdefs.h"
5269
5270#if HAVE_DLFCN_H
5271#include <dlfcn.h>
5272#endif
5273
5274#include <stdio.h>
5275
5276#ifdef RTLD_GLOBAL
5277#  define LT_DLGLOBAL		RTLD_GLOBAL
5278#else
5279#  ifdef DL_GLOBAL
5280#    define LT_DLGLOBAL		DL_GLOBAL
5281#  else
5282#    define LT_DLGLOBAL		0
5283#  endif
5284#endif
5285
5286/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
5287   find out it does not work in some platform. */
5288#ifndef LT_DLLAZY_OR_NOW
5289#  ifdef RTLD_LAZY
5290#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
5291#  else
5292#    ifdef DL_LAZY
5293#      define LT_DLLAZY_OR_NOW		DL_LAZY
5294#    else
5295#      ifdef RTLD_NOW
5296#        define LT_DLLAZY_OR_NOW	RTLD_NOW
5297#      else
5298#        ifdef DL_NOW
5299#          define LT_DLLAZY_OR_NOW	DL_NOW
5300#        else
5301#          define LT_DLLAZY_OR_NOW	0
5302#        endif
5303#      endif
5304#    endif
5305#  endif
5306#endif
5307
5308/* When -fvisibility=hidden is used, assume the code has been annotated
5309   correspondingly for the symbols needed.  */
5310#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
5311int fnord () __attribute__((visibility("default")));
5312#endif
5313
5314int fnord () { return 42; }
5315int main ()
5316{
5317  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
5318  int status = $lt_dlunknown;
5319
5320  if (self)
5321    {
5322      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
5323      else
5324        {
5325	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
5326          else puts (dlerror ());
5327	}
5328      /* dlclose (self); */
5329    }
5330  else
5331    puts (dlerror ());
5332
5333  return status;
5334}]
5335_LT_EOF
5336  if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
5337    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
5338    lt_status=$?
5339    case x$lt_status in
5340      x$lt_dlno_uscore) $1 ;;
5341      x$lt_dlneed_uscore) $2 ;;
5342      x$lt_dlunknown|x*) $3 ;;
5343    esac
5344  else :
5345    # compilation failed
5346    $3
5347  fi
5348fi
5349rm -fr conftest*
5350])# _LT_TRY_DLOPEN_SELF
5351
5352
5353# LT_SYS_DLOPEN_SELF
5354# ------------------
5355AC_DEFUN([LT_SYS_DLOPEN_SELF],
5356[m4_require([_LT_HEADER_DLFCN])dnl
5357if test yes != "$enable_dlopen"; then
5358  enable_dlopen=unknown
5359  enable_dlopen_self=unknown
5360  enable_dlopen_self_static=unknown
5361else
5362  lt_cv_dlopen=no
5363  lt_cv_dlopen_libs=
5364
5365  case $host_os in
5366  beos*)
5367    lt_cv_dlopen=load_add_on
5368    lt_cv_dlopen_libs=
5369    lt_cv_dlopen_self=yes
5370    ;;
5371
5372  mingw* | pw32* | cegcc*)
5373    lt_cv_dlopen=LoadLibrary
5374    lt_cv_dlopen_libs=
5375    ;;
5376
5377  cygwin*)
5378    lt_cv_dlopen=dlopen
5379    lt_cv_dlopen_libs=
5380    ;;
5381
5382  darwin*)
5383    # if libdl is installed we need to link against it
5384    AC_CHECK_LIB([dl], [dlopen],
5385		[lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
5386    lt_cv_dlopen=dyld
5387    lt_cv_dlopen_libs=
5388    lt_cv_dlopen_self=yes
5389    ])
5390    ;;
5391
5392  tpf*)
5393    # Don't try to run any link tests for TPF.  We know it's impossible
5394    # because TPF is a cross-compiler, and we know how we open DSOs.
5395    lt_cv_dlopen=dlopen
5396    lt_cv_dlopen_libs=
5397    lt_cv_dlopen_self=no
5398    ;;
5399
5400  *)
5401    AC_CHECK_FUNC([shl_load],
5402	  [lt_cv_dlopen=shl_load],
5403      [AC_CHECK_LIB([dld], [shl_load],
5404	    [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
5405	[AC_CHECK_FUNC([dlopen],
5406	      [lt_cv_dlopen=dlopen],
5407	  [AC_CHECK_LIB([dl], [dlopen],
5408		[lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
5409	    [AC_CHECK_LIB([svld], [dlopen],
5410		  [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
5411	      [AC_CHECK_LIB([dld], [dld_link],
5412		    [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
5413	      ])
5414	    ])
5415	  ])
5416	])
5417      ])
5418    ;;
5419  esac
5420
5421  if test no = "$lt_cv_dlopen"; then
5422    enable_dlopen=no
5423  else
5424    enable_dlopen=yes
5425  fi
5426
5427  case $lt_cv_dlopen in
5428  dlopen)
5429    save_CPPFLAGS=$CPPFLAGS
5430    test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
5431
5432    save_LDFLAGS=$LDFLAGS
5433    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
5434
5435    save_LIBS=$LIBS
5436    LIBS="$lt_cv_dlopen_libs $LIBS"
5437
5438    AC_CACHE_CHECK([whether a program can dlopen itself],
5439	  lt_cv_dlopen_self, [dnl
5440	  _LT_TRY_DLOPEN_SELF(
5441	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
5442	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
5443    ])
5444
5445    if test yes = "$lt_cv_dlopen_self"; then
5446      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
5447      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
5448	  lt_cv_dlopen_self_static, [dnl
5449	  _LT_TRY_DLOPEN_SELF(
5450	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
5451	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
5452      ])
5453    fi
5454
5455    CPPFLAGS=$save_CPPFLAGS
5456    LDFLAGS=$save_LDFLAGS
5457    LIBS=$save_LIBS
5458    ;;
5459  esac
5460
5461  case $lt_cv_dlopen_self in
5462  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
5463  *) enable_dlopen_self=unknown ;;
5464  esac
5465
5466  case $lt_cv_dlopen_self_static in
5467  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
5468  *) enable_dlopen_self_static=unknown ;;
5469  esac
5470fi
5471_LT_DECL([dlopen_support], [enable_dlopen], [0],
5472	 [Whether dlopen is supported])
5473_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
5474	 [Whether dlopen of programs is supported])
5475_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
5476	 [Whether dlopen of statically linked programs is supported])
5477])# LT_SYS_DLOPEN_SELF
5478
5479# Old name:
5480AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
5481dnl aclocal-1.4 backwards compatibility:
5482dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
5483
5484
5485# _LT_COMPILER_C_O([TAGNAME])
5486# ---------------------------
5487# Check to see if options -c and -o are simultaneously supported by compiler.
5488# This macro does not hard code the compiler like AC_PROG_CC_C_O.
5489m4_defun([_LT_COMPILER_C_O],
5490[m4_require([_LT_DECL_SED])dnl
5491m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5492m4_require([_LT_TAG_COMPILER])dnl
5493AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
5494  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
5495  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
5496   $RM -r conftest 2>/dev/null
5497   mkdir conftest
5498   cd conftest
5499   mkdir out
5500   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
5501
5502   lt_compiler_flag="-o out/conftest2.$ac_objext"
5503   # Insert the option either (1) after the last *FLAGS variable, or
5504   # (2) before a word containing "conftest.", or (3) at the end.
5505   # Note that $ac_compile itself does not contain backslashes and begins
5506   # with a dollar sign (not a hyphen), so the echo should work correctly.
5507   lt_compile=`echo "$ac_compile" | $SED \
5508   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
5509   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
5510   -e 's:$: $lt_compiler_flag:'`
5511   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
5512   (eval "$lt_compile" 2>out/conftest.err)
5513   ac_status=$?
5514   cat out/conftest.err >&AS_MESSAGE_LOG_FD
5515   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
5516   if (exit $ac_status) && test -s out/conftest2.$ac_objext
5517   then
5518     # The compiler can only warn and ignore the option if not recognized
5519     # So say no if there are warnings
5520     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
5521     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
5522     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
5523       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
5524     fi
5525   fi
5526   chmod u+w . 2>&AS_MESSAGE_LOG_FD
5527   $RM conftest*
5528   # SGI C++ compiler will create directory out/ii_files/ for
5529   # template instantiation
5530   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
5531   $RM out/* && rmdir out
5532   cd ..
5533   $RM -r conftest
5534   $RM conftest*
5535])
5536_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
5537	[Does compiler simultaneously support -c and -o options?])
5538])# _LT_COMPILER_C_O
5539
5540
5541# _LT_COMPILER_FILE_LOCKS([TAGNAME])
5542# ----------------------------------
5543# Check to see if we can do hard links to lock some files if needed
5544m4_defun([_LT_COMPILER_FILE_LOCKS],
5545[m4_require([_LT_ENABLE_LOCK])dnl
5546m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5547_LT_COMPILER_C_O([$1])
5548
5549hard_links=nottested
5550if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
5551  # do not overwrite the value of need_locks provided by the user
5552  AC_MSG_CHECKING([if we can lock with hard links])
5553  hard_links=yes
5554  $RM conftest*
5555  ln conftest.a conftest.b 2>/dev/null && hard_links=no
5556  touch conftest.a
5557  ln conftest.a conftest.b 2>&5 || hard_links=no
5558  ln conftest.a conftest.b 2>/dev/null && hard_links=no
5559  AC_MSG_RESULT([$hard_links])
5560  if test no = "$hard_links"; then
5561    AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
5562    need_locks=warn
5563  fi
5564else
5565  need_locks=no
5566fi
5567_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
5568])# _LT_COMPILER_FILE_LOCKS
5569
5570
5571# _LT_CHECK_OBJDIR
5572# ----------------
5573m4_defun([_LT_CHECK_OBJDIR],
5574[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
5575[rm -f .libs 2>/dev/null
5576mkdir .libs 2>/dev/null
5577if test -d .libs; then
5578  lt_cv_objdir=.libs
5579else
5580  # MS-DOS does not allow filenames that begin with a dot.
5581  lt_cv_objdir=_libs
5582fi
5583rmdir .libs 2>/dev/null])
5584objdir=$lt_cv_objdir
5585_LT_DECL([], [objdir], [0],
5586         [The name of the directory that contains temporary libtool files])dnl
5587m4_pattern_allow([LT_OBJDIR])dnl
5588AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
5589  [Define to the sub-directory where libtool stores uninstalled libraries.])
5590])# _LT_CHECK_OBJDIR
5591
5592
5593# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
5594# --------------------------------------
5595# Check hardcoding attributes.
5596m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
5597[AC_MSG_CHECKING([how to hardcode library paths into programs])
5598_LT_TAGVAR(hardcode_action, $1)=
5599if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
5600   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
5601   test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
5602
5603  # We can hardcode non-existent directories.
5604  if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
5605     # If the only mechanism to avoid hardcoding is shlibpath_var, we
5606     # have to relink, otherwise we might link with an installed library
5607     # when we should be linking with a yet-to-be-installed one
5608     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
5609     test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
5610    # Linking always hardcodes the temporary library directory.
5611    _LT_TAGVAR(hardcode_action, $1)=relink
5612  else
5613    # We can link without hardcoding, and we can hardcode nonexisting dirs.
5614    _LT_TAGVAR(hardcode_action, $1)=immediate
5615  fi
5616else
5617  # We cannot hardcode anything, or else we can only hardcode existing
5618  # directories.
5619  _LT_TAGVAR(hardcode_action, $1)=unsupported
5620fi
5621AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
5622
5623if test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
5624   test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
5625  # Fast installation is not supported
5626  enable_fast_install=no
5627elif test yes = "$shlibpath_overrides_runpath" ||
5628     test no = "$enable_shared"; then
5629  # Fast installation is not necessary
5630  enable_fast_install=needless
5631fi
5632_LT_TAGDECL([], [hardcode_action], [0],
5633    [How to hardcode a shared library path into an executable])
5634])# _LT_LINKER_HARDCODE_LIBPATH
5635
5636
5637# _LT_CMD_STRIPLIB
5638# ----------------
5639m4_defun([_LT_CMD_STRIPLIB],
5640[m4_require([_LT_DECL_EGREP])
5641striplib=
5642old_striplib=
5643AC_MSG_CHECKING([whether stripping libraries is possible])
5644if test -z "$STRIP"; then
5645  AC_MSG_RESULT([no])
5646else
5647  if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
5648    old_striplib="$STRIP --strip-debug"
5649    striplib="$STRIP --strip-unneeded"
5650    AC_MSG_RESULT([yes])
5651  else
5652    case $host_os in
5653    darwin*)
5654      # FIXME - insert some real tests, host_os isn't really good enough
5655      striplib="$STRIP -x"
5656      old_striplib="$STRIP -S"
5657      AC_MSG_RESULT([yes])
5658      ;;
5659    freebsd*)
5660      if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then
5661        old_striplib="$STRIP --strip-debug"
5662        striplib="$STRIP --strip-unneeded"
5663        AC_MSG_RESULT([yes])
5664      else
5665        AC_MSG_RESULT([no])
5666      fi
5667      ;;
5668    *)
5669      AC_MSG_RESULT([no])
5670      ;;
5671    esac
5672  fi
5673fi
5674_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
5675_LT_DECL([], [striplib], [1])
5676])# _LT_CMD_STRIPLIB
5677
5678
5679# _LT_PREPARE_MUNGE_PATH_LIST
5680# ---------------------------
5681# Make sure func_munge_path_list() is defined correctly.
5682m4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
5683[[# func_munge_path_list VARIABLE PATH
5684# -----------------------------------
5685# VARIABLE is name of variable containing _space_ separated list of
5686# directories to be munged by the contents of PATH, which is string
5687# having a format:
5688# "DIR[:DIR]:"
5689#       string "DIR[ DIR]" will be prepended to VARIABLE
5690# ":DIR[:DIR]"
5691#       string "DIR[ DIR]" will be appended to VARIABLE
5692# "DIRP[:DIRP]::[DIRA:]DIRA"
5693#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
5694#       "DIRA[ DIRA]" will be appended to VARIABLE
5695# "DIR[:DIR]"
5696#       VARIABLE will be replaced by "DIR[ DIR]"
5697func_munge_path_list ()
5698{
5699    case x@S|@2 in
5700    x)
5701        ;;
5702    *:)
5703        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
5704        ;;
5705    x:*)
5706        eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
5707        ;;
5708    *::*)
5709        eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
5710        eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
5711        ;;
5712    *)
5713        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
5714        ;;
5715    esac
5716}
5717]])# _LT_PREPARE_PATH_LIST
5718
5719
5720# _LT_SYS_DYNAMIC_LINKER([TAG])
5721# -----------------------------
5722# PORTME Fill in your ld.so characteristics
5723m4_defun([_LT_SYS_DYNAMIC_LINKER],
5724[AC_REQUIRE([AC_CANONICAL_HOST])dnl
5725m4_require([_LT_DECL_EGREP])dnl
5726m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5727m4_require([_LT_DECL_OBJDUMP])dnl
5728m4_require([_LT_DECL_SED])dnl
5729m4_require([_LT_CHECK_SHELL_FEATURES])dnl
5730m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
5731AC_MSG_CHECKING([dynamic linker characteristics])
5732m4_if([$1],
5733	[], [
5734if test yes = "$GCC"; then
5735  case $host_os in
5736    darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
5737    *) lt_awk_arg='/^libraries:/' ;;
5738  esac
5739  case $host_os in
5740    mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
5741    *) lt_sed_strip_eq='s|=/|/|g' ;;
5742  esac
5743  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
5744  case $lt_search_path_spec in
5745  *\;*)
5746    # if the path contains ";" then we assume it to be the separator
5747    # otherwise default to the standard path separator (i.e. ":") - it is
5748    # assumed that no part of a normal pathname contains ";" but that should
5749    # okay in the real world where ";" in dirpaths is itself problematic.
5750    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
5751    ;;
5752  *)
5753    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
5754    ;;
5755  esac
5756  # Ok, now we have the path, separated by spaces, we can step through it
5757  # and add multilib dir if necessary...
5758  lt_tmp_lt_search_path_spec=
5759  lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
5760  # ...but if some path component already ends with the multilib dir we assume
5761  # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
5762  case "$lt_multi_os_dir; $lt_search_path_spec " in
5763  "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
5764    lt_multi_os_dir=
5765    ;;
5766  esac
5767  for lt_sys_path in $lt_search_path_spec; do
5768    if test -d "$lt_sys_path$lt_multi_os_dir"; then
5769      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
5770    elif test -n "$lt_multi_os_dir"; then
5771      test -d "$lt_sys_path" && \
5772	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
5773    fi
5774  done
5775  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
5776BEGIN {RS = " "; FS = "/|\n";} {
5777  lt_foo = "";
5778  lt_count = 0;
5779  for (lt_i = NF; lt_i > 0; lt_i--) {
5780    if ($lt_i != "" && $lt_i != ".") {
5781      if ($lt_i == "..") {
5782        lt_count++;
5783      } else {
5784        if (lt_count == 0) {
5785          lt_foo = "/" $lt_i lt_foo;
5786        } else {
5787          lt_count--;
5788        }
5789      }
5790    }
5791  }
5792  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
5793  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
5794}'`
5795  # AWK program above erroneously prepends '/' to C:/dos/paths
5796  # for these hosts.
5797  case $host_os in
5798    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
5799      $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
5800  esac
5801  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
5802else
5803  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
5804fi])
5805library_names_spec=
5806libname_spec='lib$name'
5807soname_spec=
5808shrext_cmds=.so
5809postinstall_cmds=
5810postuninstall_cmds=
5811finish_cmds=
5812finish_eval=
5813shlibpath_var=
5814shlibpath_overrides_runpath=unknown
5815version_type=none
5816dynamic_linker="$host_os ld.so"
5817sys_lib_dlsearch_path_spec="/lib /usr/lib"
5818need_lib_prefix=unknown
5819hardcode_into_libs=no
5820
5821# when you set need_version to no, make sure it does not cause -set_version
5822# flags to be left without arguments
5823need_version=unknown
5824
5825AC_ARG_VAR([LT_SYS_LIBRARY_PATH],
5826[User-defined run-time library search path.])
5827
5828case $host_os in
5829aix3*)
5830  version_type=linux # correct to gnu/linux during the next big refactor
5831  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
5832  shlibpath_var=LIBPATH
5833
5834  # AIX 3 has no versioning support, so we append a major version to the name.
5835  soname_spec='$libname$release$shared_ext$major'
5836  ;;
5837
5838aix[[4-9]]*)
5839  version_type=linux # correct to gnu/linux during the next big refactor
5840  need_lib_prefix=no
5841  need_version=no
5842  hardcode_into_libs=yes
5843  if test ia64 = "$host_cpu"; then
5844    # AIX 5 supports IA64
5845    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
5846    shlibpath_var=LD_LIBRARY_PATH
5847  else
5848    # With GCC up to 2.95.x, collect2 would create an import file
5849    # for dependence libraries.  The import file would start with
5850    # the line '#! .'.  This would cause the generated library to
5851    # depend on '.', always an invalid library.  This was fixed in
5852    # development snapshots of GCC prior to 3.0.
5853    case $host_os in
5854      aix4 | aix4.[[01]] | aix4.[[01]].*)
5855      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
5856	   echo ' yes '
5857	   echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
5858	:
5859      else
5860	can_build_shared=no
5861      fi
5862      ;;
5863    esac
5864    # Using Import Files as archive members, it is possible to support
5865    # filename-based versioning of shared library archives on AIX. While
5866    # this would work for both with and without runtime linking, it will
5867    # prevent static linking of such archives. So we do filename-based
5868    # shared library versioning with .so extension only, which is used
5869    # when both runtime linking and shared linking is enabled.
5870    # Unfortunately, runtime linking may impact performance, so we do
5871    # not want this to be the default eventually. Also, we use the
5872    # versioned .so libs for executables only if there is the -brtl
5873    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
5874    # To allow for filename-based versioning support, we need to create
5875    # libNAME.so.V as an archive file, containing:
5876    # *) an Import File, referring to the versioned filename of the
5877    #    archive as well as the shared archive member, telling the
5878    #    bitwidth (32 or 64) of that shared object, and providing the
5879    #    list of exported symbols of that shared object, eventually
5880    #    decorated with the 'weak' keyword
5881    # *) the shared object with the F_LOADONLY flag set, to really avoid
5882    #    it being seen by the linker.
5883    # At run time we better use the real file rather than another symlink,
5884    # but for link time we create the symlink libNAME.so -> libNAME.so.V
5885
5886    case $with_aix_soname,$aix_use_runtimelinking in
5887    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
5888    # soname into executable. Probably we can add versioning support to
5889    # collect2, so additional links can be useful in future.
5890    aix,yes) # traditional libtool
5891      dynamic_linker='AIX unversionable lib.so'
5892      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
5893      # instead of lib<name>.a to let people know that these are not
5894      # typical AIX shared libraries.
5895      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
5896      ;;
5897    aix,no) # traditional AIX only
5898      dynamic_linker='AIX lib.a[(]lib.so.V[)]'
5899      # We preserve .a as extension for shared libraries through AIX4.2
5900      # and later when we are not doing run time linking.
5901      library_names_spec='$libname$release.a $libname.a'
5902      soname_spec='$libname$release$shared_ext$major'
5903      ;;
5904    svr4,*) # full svr4 only
5905      dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
5906      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
5907      # We do not specify a path in Import Files, so LIBPATH fires.
5908      shlibpath_overrides_runpath=yes
5909      ;;
5910    *,yes) # both, prefer svr4
5911      dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
5912      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
5913      # unpreferred sharedlib libNAME.a needs extra handling
5914      postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
5915      postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
5916      # We do not specify a path in Import Files, so LIBPATH fires.
5917      shlibpath_overrides_runpath=yes
5918      ;;
5919    *,no) # both, prefer aix
5920      dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
5921      library_names_spec='$libname$release.a $libname.a'
5922      soname_spec='$libname$release$shared_ext$major'
5923      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
5924      postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
5925      postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
5926      ;;
5927    esac
5928    shlibpath_var=LIBPATH
5929  fi
5930  ;;
5931
5932amigaos*)
5933  case $host_cpu in
5934  powerpc)
5935    # Since July 2007 AmigaOS4 officially supports .so libraries.
5936    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
5937    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
5938    ;;
5939  m68k)
5940    library_names_spec='$libname.ixlibrary $libname.a'
5941    # Create ${libname}_ixlibrary.a entries in /sys/libs.
5942    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $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'
5943    ;;
5944  esac
5945  ;;
5946
5947beos*)
5948  library_names_spec='$libname$shared_ext'
5949  dynamic_linker="$host_os ld.so"
5950  shlibpath_var=LIBRARY_PATH
5951  ;;
5952
5953bsdi[[45]]*)
5954  version_type=linux # correct to gnu/linux during the next big refactor
5955  need_version=no
5956  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
5957  soname_spec='$libname$release$shared_ext$major'
5958  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
5959  shlibpath_var=LD_LIBRARY_PATH
5960  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
5961  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
5962  # the default ld.so.conf also contains /usr/contrib/lib and
5963  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
5964  # libtool to hard-code these into programs
5965  ;;
5966
5967cygwin* | mingw* | pw32* | cegcc*)
5968  version_type=windows
5969  shrext_cmds=.dll
5970  need_version=no
5971  need_lib_prefix=no
5972
5973  case $GCC,$cc_basename in
5974  yes,*)
5975    # gcc
5976    library_names_spec='$libname.dll.a'
5977    # DLL is installed to $(libdir)/../bin by postinstall_cmds
5978    postinstall_cmds='base_file=`basename \$file`~
5979      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
5980      dldir=$destdir/`dirname \$dlpath`~
5981      test -d \$dldir || mkdir -p \$dldir~
5982      $install_prog $dir/$dlname \$dldir/$dlname~
5983      chmod a+x \$dldir/$dlname~
5984      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
5985        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
5986      fi'
5987    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
5988      dlpath=$dir/\$dldll~
5989       $RM \$dlpath'
5990    shlibpath_overrides_runpath=yes
5991
5992    case $host_os in
5993    cygwin*)
5994      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
5995      soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
5996m4_if([$1], [],[
5997      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
5998      ;;
5999    mingw* | cegcc*)
6000      # MinGW DLLs use traditional 'lib' prefix
6001      soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
6002      ;;
6003    pw32*)
6004      # pw32 DLLs use 'pw' prefix rather than 'lib'
6005      library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
6006      ;;
6007    esac
6008    dynamic_linker='Win32 ld.exe'
6009    ;;
6010
6011  *,cl* | *,icl*)
6012    # Native MSVC or ICC
6013    libname_spec='$name'
6014    soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
6015    library_names_spec='$libname.dll.lib'
6016
6017    case $build_os in
6018    mingw*)
6019      sys_lib_search_path_spec=
6020      lt_save_ifs=$IFS
6021      IFS=';'
6022      for lt_path in $LIB
6023      do
6024        IFS=$lt_save_ifs
6025        # Let DOS variable expansion print the short 8.3 style file name.
6026        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
6027        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
6028      done
6029      IFS=$lt_save_ifs
6030      # Convert to MSYS style.
6031      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
6032      ;;
6033    cygwin*)
6034      # Convert to unix form, then to dos form, then back to unix form
6035      # but this time dos style (no spaces!) so that the unix form looks
6036      # like /cygdrive/c/PROGRA~1:/cygdr...
6037      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
6038      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
6039      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
6040      ;;
6041    *)
6042      sys_lib_search_path_spec=$LIB
6043      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
6044        # It is most probably a Windows format PATH.
6045        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
6046      else
6047        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
6048      fi
6049      # FIXME: find the short name or the path components, as spaces are
6050      # common. (e.g. "Program Files" -> "PROGRA~1")
6051      ;;
6052    esac
6053
6054    # DLL is installed to $(libdir)/../bin by postinstall_cmds
6055    postinstall_cmds='base_file=`basename \$file`~
6056      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
6057      dldir=$destdir/`dirname \$dlpath`~
6058      test -d \$dldir || mkdir -p \$dldir~
6059      $install_prog $dir/$dlname \$dldir/$dlname'
6060    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
6061      dlpath=$dir/\$dldll~
6062       $RM \$dlpath'
6063    shlibpath_overrides_runpath=yes
6064    dynamic_linker='Win32 link.exe'
6065    ;;
6066
6067  *)
6068    # Assume MSVC and ICC wrapper
6069    library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
6070    dynamic_linker='Win32 ld.exe'
6071    ;;
6072  esac
6073  # FIXME: first we should search . and the directory the executable is in
6074  shlibpath_var=PATH
6075  ;;
6076
6077darwin* | rhapsody*)
6078  dynamic_linker="$host_os dyld"
6079  version_type=darwin
6080  need_lib_prefix=no
6081  need_version=no
6082  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
6083  soname_spec='$libname$release$major$shared_ext'
6084  shlibpath_overrides_runpath=yes
6085  shlibpath_var=DYLD_LIBRARY_PATH
6086  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
6087m4_if([$1], [],[
6088  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
6089  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
6090  ;;
6091
6092dgux*)
6093  version_type=linux # correct to gnu/linux during the next big refactor
6094  need_lib_prefix=no
6095  need_version=no
6096  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6097  soname_spec='$libname$release$shared_ext$major'
6098  shlibpath_var=LD_LIBRARY_PATH
6099  ;;
6100
6101freebsd* | dragonfly* | midnightbsd*)
6102  # DragonFly does not have aout.  When/if they implement a new
6103  # versioning mechanism, adjust this.
6104  if test -x /usr/bin/objformat; then
6105    objformat=`/usr/bin/objformat`
6106  else
6107    case $host_os in
6108    freebsd[[23]].*) objformat=aout ;;
6109    *) objformat=elf ;;
6110    esac
6111  fi
6112  version_type=freebsd-$objformat
6113  case $version_type in
6114    freebsd-elf*)
6115      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6116      soname_spec='$libname$release$shared_ext$major'
6117      need_version=no
6118      need_lib_prefix=no
6119      ;;
6120    freebsd-*)
6121      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
6122      need_version=yes
6123      ;;
6124  esac
6125  shlibpath_var=LD_LIBRARY_PATH
6126  case $host_os in
6127  freebsd2.*)
6128    shlibpath_overrides_runpath=yes
6129    ;;
6130  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
6131    shlibpath_overrides_runpath=yes
6132    hardcode_into_libs=yes
6133    ;;
6134  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
6135  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
6136    shlibpath_overrides_runpath=no
6137    hardcode_into_libs=yes
6138    ;;
6139  *) # from 4.6 on, and DragonFly
6140    shlibpath_overrides_runpath=yes
6141    hardcode_into_libs=yes
6142    ;;
6143  esac
6144  ;;
6145
6146haiku*)
6147  version_type=linux # correct to gnu/linux during the next big refactor
6148  need_lib_prefix=no
6149  need_version=no
6150  dynamic_linker="$host_os runtime_loader"
6151  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6152  soname_spec='$libname$release$shared_ext$major'
6153  shlibpath_var=LIBRARY_PATH
6154  shlibpath_overrides_runpath=no
6155  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
6156  hardcode_into_libs=yes
6157  ;;
6158
6159hpux9* | hpux10* | hpux11*)
6160  # Give a soname corresponding to the major version so that dld.sl refuses to
6161  # link against other versions.
6162  version_type=sunos
6163  need_lib_prefix=no
6164  need_version=no
6165  case $host_cpu in
6166  ia64*)
6167    shrext_cmds='.so'
6168    hardcode_into_libs=yes
6169    dynamic_linker="$host_os dld.so"
6170    shlibpath_var=LD_LIBRARY_PATH
6171    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
6172    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6173    soname_spec='$libname$release$shared_ext$major'
6174    if test 32 = "$HPUX_IA64_MODE"; then
6175      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
6176      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
6177    else
6178      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
6179      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
6180    fi
6181    ;;
6182  hppa*64*)
6183    shrext_cmds='.sl'
6184    hardcode_into_libs=yes
6185    dynamic_linker="$host_os dld.sl"
6186    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
6187    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
6188    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6189    soname_spec='$libname$release$shared_ext$major'
6190    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
6191    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
6192    ;;
6193  *)
6194    shrext_cmds='.sl'
6195    dynamic_linker="$host_os dld.sl"
6196    shlibpath_var=SHLIB_PATH
6197    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6198    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6199    soname_spec='$libname$release$shared_ext$major'
6200    ;;
6201  esac
6202  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
6203  postinstall_cmds='chmod 555 $lib'
6204  # or fails outright, so override atomically:
6205  install_override_mode=555
6206  ;;
6207
6208interix[[3-9]]*)
6209  version_type=linux # correct to gnu/linux during the next big refactor
6210  need_lib_prefix=no
6211  need_version=no
6212  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6213  soname_spec='$libname$release$shared_ext$major'
6214  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
6215  shlibpath_var=LD_LIBRARY_PATH
6216  shlibpath_overrides_runpath=no
6217  hardcode_into_libs=yes
6218  ;;
6219
6220irix5* | irix6* | nonstopux*)
6221  case $host_os in
6222    nonstopux*) version_type=nonstopux ;;
6223    *)
6224	if test yes = "$lt_cv_prog_gnu_ld"; then
6225		version_type=linux # correct to gnu/linux during the next big refactor
6226	else
6227		version_type=irix
6228	fi ;;
6229  esac
6230  need_lib_prefix=no
6231  need_version=no
6232  soname_spec='$libname$release$shared_ext$major'
6233  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
6234  case $host_os in
6235  irix5* | nonstopux*)
6236    libsuff= shlibsuff=
6237    ;;
6238  *)
6239    case $LD in # libtool.m4 will add one of these switches to LD
6240    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
6241      libsuff= shlibsuff= libmagic=32-bit;;
6242    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
6243      libsuff=32 shlibsuff=N32 libmagic=N32;;
6244    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
6245      libsuff=64 shlibsuff=64 libmagic=64-bit;;
6246    *) libsuff= shlibsuff= libmagic=never-match;;
6247    esac
6248    ;;
6249  esac
6250  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6251  shlibpath_overrides_runpath=no
6252  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
6253  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
6254  hardcode_into_libs=yes
6255  ;;
6256
6257# No shared lib support for Linux oldld, aout, or coff.
6258linux*oldld* | linux*aout* | linux*coff*)
6259  dynamic_linker=no
6260  ;;
6261
6262linux*android*)
6263  version_type=none # Android doesn't support versioned libraries.
6264  need_lib_prefix=no
6265  need_version=no
6266  library_names_spec='$libname$release$shared_ext'
6267  soname_spec='$libname$release$shared_ext'
6268  finish_cmds=
6269  shlibpath_var=LD_LIBRARY_PATH
6270  shlibpath_overrides_runpath=yes
6271
6272  # This implies no fast_install, which is unacceptable.
6273  # Some rework will be needed to allow for fast_install
6274  # before this can be enabled.
6275  hardcode_into_libs=yes
6276
6277  dynamic_linker='Android linker'
6278  # Don't embed -rpath directories since the linker doesn't support them.
6279  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6280  ;;
6281
6282# This must be glibc/ELF.
6283linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
6284  version_type=linux # correct to gnu/linux during the next big refactor
6285  need_lib_prefix=no
6286  need_version=no
6287  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6288  soname_spec='$libname$release$shared_ext$major'
6289  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6290  shlibpath_var=LD_LIBRARY_PATH
6291  shlibpath_overrides_runpath=no
6292
6293  # Some binutils ld are patched to set DT_RUNPATH
6294  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
6295    [lt_cv_shlibpath_overrides_runpath=no
6296    save_LDFLAGS=$LDFLAGS
6297    save_libdir=$libdir
6298    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
6299	 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
6300    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
6301      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
6302	 [lt_cv_shlibpath_overrides_runpath=yes])])
6303    LDFLAGS=$save_LDFLAGS
6304    libdir=$save_libdir
6305    ])
6306  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
6307
6308  # This implies no fast_install, which is unacceptable.
6309  # Some rework will be needed to allow for fast_install
6310  # before this can be enabled.
6311  hardcode_into_libs=yes
6312
6313  # Ideally, we could use ldconfig to report *all* directores which are
6314  # searched for libraries, however this is still not possible.  Aside from not
6315  # being certain /sbin/ldconfig is available, command
6316  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
6317  # even though it is searched at run-time.  Try to do the best guess by
6318  # appending ld.so.conf contents (and includes) to the search path.
6319  if test -f /etc/ld.so.conf; then
6320    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' ' '`
6321    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
6322  fi
6323
6324  # We used to test for /lib/ld.so.1 and disable shared libraries on
6325  # powerpc, because MkLinux only supported shared libraries with the
6326  # GNU dynamic linker.  Since this was broken with cross compilers,
6327  # most powerpc-linux boxes support dynamic linking these days and
6328  # people can always --disable-shared, the test was removed, and we
6329  # assume the GNU/Linux dynamic linker is in use.
6330  dynamic_linker='GNU/Linux ld.so'
6331  ;;
6332
6333netbsd*)
6334  version_type=sunos
6335  need_lib_prefix=no
6336  need_version=no
6337  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6338    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
6339    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6340    dynamic_linker='NetBSD (a.out) ld.so'
6341  else
6342    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6343    soname_spec='$libname$release$shared_ext$major'
6344    dynamic_linker='NetBSD ld.elf_so'
6345  fi
6346  shlibpath_var=LD_LIBRARY_PATH
6347  shlibpath_overrides_runpath=yes
6348  hardcode_into_libs=yes
6349  ;;
6350
6351newsos6)
6352  version_type=linux # correct to gnu/linux during the next big refactor
6353  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6354  shlibpath_var=LD_LIBRARY_PATH
6355  shlibpath_overrides_runpath=yes
6356  ;;
6357
6358*nto* | *qnx*)
6359  version_type=qnx
6360  need_lib_prefix=no
6361  need_version=no
6362  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6363  soname_spec='$libname$release$shared_ext$major'
6364  shlibpath_var=LD_LIBRARY_PATH
6365  shlibpath_overrides_runpath=no
6366  hardcode_into_libs=yes
6367  dynamic_linker='ldqnx.so'
6368  ;;
6369
6370openbsd* | bitrig*)
6371  version_type=sunos
6372  sys_lib_dlsearch_path_spec=/usr/lib
6373  need_lib_prefix=no
6374  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
6375    need_version=no
6376  else
6377    need_version=yes
6378  fi
6379  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
6380  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6381  shlibpath_var=LD_LIBRARY_PATH
6382  shlibpath_overrides_runpath=yes
6383  ;;
6384
6385os2*)
6386  libname_spec='$name'
6387  version_type=windows
6388  shrext_cmds=.dll
6389  need_version=no
6390  need_lib_prefix=no
6391  # OS/2 can only load a DLL with a base name of 8 characters or less.
6392  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
6393    v=$($ECHO $release$versuffix | tr -d .-);
6394    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
6395    $ECHO $n$v`$shared_ext'
6396  library_names_spec='${libname}_dll.$libext'
6397  dynamic_linker='OS/2 ld.exe'
6398  shlibpath_var=BEGINLIBPATH
6399  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6400  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
6401  postinstall_cmds='base_file=`basename \$file`~
6402    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
6403    dldir=$destdir/`dirname \$dlpath`~
6404    test -d \$dldir || mkdir -p \$dldir~
6405    $install_prog $dir/$dlname \$dldir/$dlname~
6406    chmod a+x \$dldir/$dlname~
6407    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
6408      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
6409    fi'
6410  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
6411    dlpath=$dir/\$dldll~
6412    $RM \$dlpath'
6413  ;;
6414
6415osf3* | osf4* | osf5*)
6416  version_type=osf
6417  need_lib_prefix=no
6418  need_version=no
6419  soname_spec='$libname$release$shared_ext$major'
6420  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6421  shlibpath_var=LD_LIBRARY_PATH
6422  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6423  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
6424  ;;
6425
6426rdos*)
6427  dynamic_linker=no
6428  ;;
6429
6430solaris*)
6431  version_type=linux # correct to gnu/linux during the next big refactor
6432  need_lib_prefix=no
6433  need_version=no
6434  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6435  soname_spec='$libname$release$shared_ext$major'
6436  shlibpath_var=LD_LIBRARY_PATH
6437  shlibpath_overrides_runpath=yes
6438  hardcode_into_libs=yes
6439  # ldd complains unless libraries are executable
6440  postinstall_cmds='chmod +x $lib'
6441  ;;
6442
6443sunos4*)
6444  version_type=sunos
6445  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
6446  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6447  shlibpath_var=LD_LIBRARY_PATH
6448  shlibpath_overrides_runpath=yes
6449  if test yes = "$with_gnu_ld"; then
6450    need_lib_prefix=no
6451  fi
6452  need_version=yes
6453  ;;
6454
6455sysv4 | sysv4.3*)
6456  version_type=linux # correct to gnu/linux during the next big refactor
6457  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6458  soname_spec='$libname$release$shared_ext$major'
6459  shlibpath_var=LD_LIBRARY_PATH
6460  case $host_vendor in
6461    sni)
6462      shlibpath_overrides_runpath=no
6463      need_lib_prefix=no
6464      runpath_var=LD_RUN_PATH
6465      ;;
6466    siemens)
6467      need_lib_prefix=no
6468      ;;
6469    motorola)
6470      need_lib_prefix=no
6471      need_version=no
6472      shlibpath_overrides_runpath=no
6473      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6474      ;;
6475  esac
6476  ;;
6477
6478sysv4*MP*)
6479  if test -d /usr/nec; then
6480    version_type=linux # correct to gnu/linux during the next big refactor
6481    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
6482    soname_spec='$libname$shared_ext.$major'
6483    shlibpath_var=LD_LIBRARY_PATH
6484  fi
6485  ;;
6486
6487sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
6488  version_type=sco
6489  need_lib_prefix=no
6490  need_version=no
6491  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
6492  soname_spec='$libname$release$shared_ext$major'
6493  shlibpath_var=LD_LIBRARY_PATH
6494  shlibpath_overrides_runpath=yes
6495  hardcode_into_libs=yes
6496  if test yes = "$with_gnu_ld"; then
6497    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
6498  else
6499    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
6500    case $host_os in
6501      sco3.2v5*)
6502        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
6503	;;
6504    esac
6505  fi
6506  sys_lib_dlsearch_path_spec='/usr/lib'
6507  ;;
6508
6509tpf*)
6510  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
6511  version_type=linux # correct to gnu/linux during the next big refactor
6512  need_lib_prefix=no
6513  need_version=no
6514  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6515  shlibpath_var=LD_LIBRARY_PATH
6516  shlibpath_overrides_runpath=no
6517  hardcode_into_libs=yes
6518  ;;
6519
6520uts4*)
6521  version_type=linux # correct to gnu/linux during the next big refactor
6522  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6523  soname_spec='$libname$release$shared_ext$major'
6524  shlibpath_var=LD_LIBRARY_PATH
6525  ;;
6526
6527*)
6528  dynamic_linker=no
6529  ;;
6530esac
6531AC_MSG_RESULT([$dynamic_linker])
6532test no = "$dynamic_linker" && can_build_shared=no
6533
6534variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6535if test yes = "$GCC"; then
6536  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6537fi
6538
6539if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
6540  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
6541fi
6542
6543if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
6544  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
6545fi
6546
6547# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
6548configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
6549
6550# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
6551func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
6552
6553# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
6554configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
6555
6556_LT_DECL([], [variables_saved_for_relink], [1],
6557    [Variables whose values should be saved in libtool wrapper scripts and
6558    restored at link time])
6559_LT_DECL([], [need_lib_prefix], [0],
6560    [Do we need the "lib" prefix for modules?])
6561_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
6562_LT_DECL([], [version_type], [0], [Library versioning type])
6563_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
6564_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
6565_LT_DECL([], [shlibpath_overrides_runpath], [0],
6566    [Is shlibpath searched before the hard-coded library search path?])
6567_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
6568_LT_DECL([], [library_names_spec], [1],
6569    [[List of archive names.  First name is the real one, the rest are links.
6570    The last name is the one that the linker finds with -lNAME]])
6571_LT_DECL([], [soname_spec], [1],
6572    [[The coded name of the library, if different from the real name]])
6573_LT_DECL([], [install_override_mode], [1],
6574    [Permission mode override for installation of shared libraries])
6575_LT_DECL([], [postinstall_cmds], [2],
6576    [Command to use after installation of a shared archive])
6577_LT_DECL([], [postuninstall_cmds], [2],
6578    [Command to use after uninstallation of a shared archive])
6579_LT_DECL([], [finish_cmds], [2],
6580    [Commands used to finish a libtool library installation in a directory])
6581_LT_DECL([], [finish_eval], [1],
6582    [[As "finish_cmds", except a single script fragment to be evaled but
6583    not shown]])
6584_LT_DECL([], [hardcode_into_libs], [0],
6585    [Whether we should hardcode library paths into libraries])
6586_LT_DECL([], [sys_lib_search_path_spec], [2],
6587    [Compile-time system search path for libraries])
6588_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
6589    [Detected run-time system search path for libraries])
6590_LT_DECL([], [configure_time_lt_sys_library_path], [2],
6591    [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
6592])# _LT_SYS_DYNAMIC_LINKER
6593
6594
6595# _LT_PATH_TOOL_PREFIX(TOOL)
6596# --------------------------
6597# find a file program that can recognize shared library
6598AC_DEFUN([_LT_PATH_TOOL_PREFIX],
6599[m4_require([_LT_DECL_EGREP])dnl
6600AC_MSG_CHECKING([for $1])
6601AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
6602[case $MAGIC_CMD in
6603[[\\/*] |  ?:[\\/]*])
6604  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
6605  ;;
6606*)
6607  lt_save_MAGIC_CMD=$MAGIC_CMD
6608  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
6609dnl $ac_dummy forces splitting on constant user-supplied paths.
6610dnl POSIX.2 word splitting is done only on the output of word expansions,
6611dnl not every word.  This closes a longstanding sh security hole.
6612  ac_dummy="m4_if([$2], , $PATH, [$2])"
6613  for ac_dir in $ac_dummy; do
6614    IFS=$lt_save_ifs
6615    test -z "$ac_dir" && ac_dir=.
6616    if test -f "$ac_dir/$1"; then
6617      lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
6618      if test -n "$file_magic_test_file"; then
6619	case $deplibs_check_method in
6620	"file_magic "*)
6621	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
6622	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
6623	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
6624	    $EGREP "$file_magic_regex" > /dev/null; then
6625	    :
6626	  else
6627	    cat <<_LT_EOF 1>&2
6628
6629*** Warning: the command libtool uses to detect shared libraries,
6630*** $file_magic_cmd, produces output that libtool cannot recognize.
6631*** The result is that libtool may fail to recognize shared libraries
6632*** as such.  This will affect the creation of libtool libraries that
6633*** depend on shared libraries, but programs linked with such libtool
6634*** libraries will work regardless of this problem.  Nevertheless, you
6635*** may want to report the problem to your system manager and/or to
6636*** bug-libtool@gnu.org
6637
6638_LT_EOF
6639	  fi ;;
6640	esac
6641      fi
6642      break
6643    fi
6644  done
6645  IFS=$lt_save_ifs
6646  MAGIC_CMD=$lt_save_MAGIC_CMD
6647  ;;
6648esac])
6649MAGIC_CMD=$lt_cv_path_MAGIC_CMD
6650if test -n "$MAGIC_CMD"; then
6651  AC_MSG_RESULT($MAGIC_CMD)
6652else
6653  AC_MSG_RESULT(no)
6654fi
6655_LT_DECL([], [MAGIC_CMD], [0],
6656	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
6657])# _LT_PATH_TOOL_PREFIX
6658
6659# Old name:
6660AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
6661dnl aclocal-1.4 backwards compatibility:
6662dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
6663
6664
6665# _LT_PATH_MAGIC
6666# --------------
6667# find a file program that can recognize a shared library
6668m4_defun([_LT_PATH_MAGIC],
6669[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
6670if test -z "$lt_cv_path_MAGIC_CMD"; then
6671  if test -n "$ac_tool_prefix"; then
6672    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
6673  else
6674    MAGIC_CMD=:
6675  fi
6676fi
6677])# _LT_PATH_MAGIC
6678
6679
6680# LT_PATH_LD
6681# ----------
6682# find the pathname to the GNU or non-GNU linker
6683AC_DEFUN([LT_PATH_LD],
6684[AC_REQUIRE([AC_PROG_CC])dnl
6685AC_REQUIRE([AC_CANONICAL_HOST])dnl
6686AC_REQUIRE([AC_CANONICAL_BUILD])dnl
6687m4_require([_LT_DECL_SED])dnl
6688m4_require([_LT_DECL_EGREP])dnl
6689m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
6690
6691AC_ARG_WITH([gnu-ld],
6692    [AS_HELP_STRING([--with-gnu-ld],
6693	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
6694    [test no = "$withval" || with_gnu_ld=yes],
6695    [with_gnu_ld=no])dnl
6696
6697ac_prog=ld
6698if test yes = "$GCC"; then
6699  # Check if gcc -print-prog-name=ld gives a path.
6700  AC_MSG_CHECKING([for ld used by $CC])
6701  case $host in
6702  *-*-mingw*)
6703    # gcc leaves a trailing carriage return, which upsets mingw
6704    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
6705  *)
6706    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
6707  esac
6708  case $ac_prog in
6709    # Accept absolute paths.
6710    [[\\/]]* | ?:[[\\/]]*)
6711      re_direlt='/[[^/]][[^/]]*/\.\./'
6712      # Canonicalize the pathname of ld
6713      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
6714      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
6715	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
6716      done
6717      test -z "$LD" && LD=$ac_prog
6718      ;;
6719  "")
6720    # If it fails, then pretend we aren't using GCC.
6721    ac_prog=ld
6722    ;;
6723  *)
6724    # If it is relative, then search for the first ld in PATH.
6725    with_gnu_ld=unknown
6726    ;;
6727  esac
6728elif test yes = "$with_gnu_ld"; then
6729  AC_MSG_CHECKING([for GNU ld])
6730else
6731  AC_MSG_CHECKING([for non-GNU ld])
6732fi
6733AC_CACHE_VAL(lt_cv_path_LD,
6734[if test -z "$LD"; then
6735  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
6736  for ac_dir in $PATH; do
6737    IFS=$lt_save_ifs
6738    test -z "$ac_dir" && ac_dir=.
6739    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
6740      lt_cv_path_LD=$ac_dir/$ac_prog
6741      # Check to see if the program is GNU ld.  I'd rather use --version,
6742      # but apparently some variants of GNU ld only accept -v.
6743      # Break only if it was the GNU/non-GNU ld that we prefer.
6744      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
6745      *GNU* | *'with BFD'*)
6746	test no != "$with_gnu_ld" && break
6747	;;
6748      *)
6749	test yes != "$with_gnu_ld" && break
6750	;;
6751      esac
6752    fi
6753  done
6754  IFS=$lt_save_ifs
6755else
6756  lt_cv_path_LD=$LD # Let the user override the test with a path.
6757fi])
6758LD=$lt_cv_path_LD
6759if test -n "$LD"; then
6760  AC_MSG_RESULT($LD)
6761else
6762  AC_MSG_RESULT(no)
6763fi
6764test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
6765_LT_PATH_LD_GNU
6766AC_SUBST([LD])
6767
6768_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
6769])# LT_PATH_LD
6770
6771# Old names:
6772AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
6773AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
6774dnl aclocal-1.4 backwards compatibility:
6775dnl AC_DEFUN([AM_PROG_LD], [])
6776dnl AC_DEFUN([AC_PROG_LD], [])
6777
6778
6779# _LT_PATH_LD_GNU
6780#- --------------
6781m4_defun([_LT_PATH_LD_GNU],
6782[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
6783[# I'd rather use --version here, but apparently some GNU lds only accept -v.
6784case `$LD -v 2>&1 </dev/null` in
6785*GNU* | *'with BFD'*)
6786  lt_cv_prog_gnu_ld=yes
6787  ;;
6788*)
6789  lt_cv_prog_gnu_ld=no
6790  ;;
6791esac])
6792with_gnu_ld=$lt_cv_prog_gnu_ld
6793])# _LT_PATH_LD_GNU
6794
6795
6796# _LT_CMD_RELOAD
6797# --------------
6798# find reload flag for linker
6799#   -- PORTME Some linkers may need a different reload flag.
6800m4_defun([_LT_CMD_RELOAD],
6801[AC_CACHE_CHECK([for $LD option to reload object files],
6802  lt_cv_ld_reload_flag,
6803  [lt_cv_ld_reload_flag='-r'])
6804reload_flag=$lt_cv_ld_reload_flag
6805case $reload_flag in
6806"" | " "*) ;;
6807*) reload_flag=" $reload_flag" ;;
6808esac
6809reload_cmds='$LD$reload_flag -o $output$reload_objs'
6810case $host_os in
6811  cygwin* | mingw* | pw32* | cegcc*)
6812    if test yes != "$GCC"; then
6813      reload_cmds=false
6814    fi
6815    ;;
6816  darwin*)
6817    if test yes = "$GCC"; then
6818      reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
6819    else
6820      reload_cmds='$LD$reload_flag -o $output$reload_objs'
6821    fi
6822    ;;
6823esac
6824_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
6825_LT_TAGDECL([], [reload_cmds], [2])dnl
6826])# _LT_CMD_RELOAD
6827
6828
6829# _LT_PATH_DD
6830# -----------
6831# find a working dd
6832m4_defun([_LT_PATH_DD],
6833[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
6834[printf 0123456789abcdef0123456789abcdef >conftest.i
6835cat conftest.i conftest.i >conftest2.i
6836: ${lt_DD:=$DD}
6837AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
6838[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
6839  cmp -s conftest.i conftest.out \
6840  && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
6841fi])
6842rm -f conftest.i conftest2.i conftest.out])
6843])# _LT_PATH_DD
6844
6845
6846# _LT_CMD_TRUNCATE
6847# ----------------
6848# find command to truncate a binary pipe
6849m4_defun([_LT_CMD_TRUNCATE],
6850[m4_require([_LT_PATH_DD])
6851AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
6852[printf 0123456789abcdef0123456789abcdef >conftest.i
6853cat conftest.i conftest.i >conftest2.i
6854lt_cv_truncate_bin=
6855if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
6856  cmp -s conftest.i conftest.out \
6857  && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
6858fi
6859rm -f conftest.i conftest2.i conftest.out
6860test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
6861_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
6862  [Command to truncate a binary pipe])
6863])# _LT_CMD_TRUNCATE
6864
6865
6866# _LT_CHECK_MAGIC_METHOD
6867# ----------------------
6868# how to check for library dependencies
6869#  -- PORTME fill in with the dynamic library characteristics
6870m4_defun([_LT_CHECK_MAGIC_METHOD],
6871[m4_require([_LT_DECL_EGREP])
6872m4_require([_LT_DECL_OBJDUMP])
6873AC_CACHE_CHECK([how to recognize dependent libraries],
6874lt_cv_deplibs_check_method,
6875[lt_cv_file_magic_cmd='$MAGIC_CMD'
6876lt_cv_file_magic_test_file=
6877lt_cv_deplibs_check_method='unknown'
6878# Need to set the preceding variable on all platforms that support
6879# interlibrary dependencies.
6880# 'none' -- dependencies not supported.
6881# 'unknown' -- same as none, but documents that we really don't know.
6882# 'pass_all' -- all dependencies passed with no checks.
6883# 'test_compile' -- check by making test program.
6884# 'file_magic [[regex]]' -- check by looking for files in library path
6885# that responds to the $file_magic_cmd with a given extended regex.
6886# If you have 'file' or equivalent on your system and you're not sure
6887# whether 'pass_all' will *always* work, you probably want this one.
6888
6889case $host_os in
6890aix[[4-9]]*)
6891  lt_cv_deplibs_check_method=pass_all
6892  ;;
6893
6894beos*)
6895  lt_cv_deplibs_check_method=pass_all
6896  ;;
6897
6898bsdi[[45]]*)
6899  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
6900  lt_cv_file_magic_cmd='$FILECMD -L'
6901  lt_cv_file_magic_test_file=/shlib/libc.so
6902  ;;
6903
6904cygwin*)
6905  # func_win32_libid is a shell function defined in ltmain.sh
6906  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
6907  lt_cv_file_magic_cmd='func_win32_libid'
6908  ;;
6909
6910mingw* | pw32*)
6911  # Base MSYS/MinGW do not provide the 'file' command needed by
6912  # func_win32_libid shell function, so use a weaker test based on 'objdump',
6913  # unless we find 'file', for example because we are cross-compiling.
6914  if ( file / ) >/dev/null 2>&1; then
6915    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
6916    lt_cv_file_magic_cmd='func_win32_libid'
6917  else
6918    # Keep this pattern in sync with the one in func_win32_libid.
6919    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
6920    lt_cv_file_magic_cmd='$OBJDUMP -f'
6921  fi
6922  ;;
6923
6924cegcc*)
6925  # use the weaker test based on 'objdump'. See mingw*.
6926  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
6927  lt_cv_file_magic_cmd='$OBJDUMP -f'
6928  ;;
6929
6930darwin* | rhapsody*)
6931  lt_cv_deplibs_check_method=pass_all
6932  ;;
6933
6934freebsd* | dragonfly* | midnightbsd*)
6935  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
6936    case $host_cpu in
6937    i*86 )
6938      # Not sure whether the presence of OpenBSD here was a mistake.
6939      # Let's accept both of them until this is cleared up.
6940      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
6941      lt_cv_file_magic_cmd=$FILECMD
6942      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
6943      ;;
6944    esac
6945  else
6946    lt_cv_deplibs_check_method=pass_all
6947  fi
6948  ;;
6949
6950haiku*)
6951  lt_cv_deplibs_check_method=pass_all
6952  ;;
6953
6954hpux10.20* | hpux11*)
6955  lt_cv_file_magic_cmd=$FILECMD
6956  case $host_cpu in
6957  ia64*)
6958    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
6959    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
6960    ;;
6961  hppa*64*)
6962    [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]']
6963    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
6964    ;;
6965  *)
6966    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
6967    lt_cv_file_magic_test_file=/usr/lib/libc.sl
6968    ;;
6969  esac
6970  ;;
6971
6972interix[[3-9]]*)
6973  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
6974  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
6975  ;;
6976
6977irix5* | irix6* | nonstopux*)
6978  case $LD in
6979  *-32|*"-32 ") libmagic=32-bit;;
6980  *-n32|*"-n32 ") libmagic=N32;;
6981  *-64|*"-64 ") libmagic=64-bit;;
6982  *) libmagic=never-match;;
6983  esac
6984  lt_cv_deplibs_check_method=pass_all
6985  ;;
6986
6987# This must be glibc/ELF.
6988linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
6989  lt_cv_deplibs_check_method=pass_all
6990  ;;
6991
6992netbsd*)
6993  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
6994    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
6995  else
6996    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
6997  fi
6998  ;;
6999
7000newos6*)
7001  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
7002  lt_cv_file_magic_cmd=$FILECMD
7003  lt_cv_file_magic_test_file=/usr/lib/libnls.so
7004  ;;
7005
7006*nto* | *qnx*)
7007  lt_cv_deplibs_check_method=pass_all
7008  ;;
7009
7010openbsd* | bitrig*)
7011  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
7012    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
7013  else
7014    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
7015  fi
7016  ;;
7017
7018osf3* | osf4* | osf5*)
7019  lt_cv_deplibs_check_method=pass_all
7020  ;;
7021
7022rdos*)
7023  lt_cv_deplibs_check_method=pass_all
7024  ;;
7025
7026solaris*)
7027  lt_cv_deplibs_check_method=pass_all
7028  ;;
7029
7030sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
7031  lt_cv_deplibs_check_method=pass_all
7032  ;;
7033
7034sysv4 | sysv4.3*)
7035  case $host_vendor in
7036  motorola)
7037    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]]'
7038    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
7039    ;;
7040  ncr)
7041    lt_cv_deplibs_check_method=pass_all
7042    ;;
7043  sequent)
7044    lt_cv_file_magic_cmd='/bin/file'
7045    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
7046    ;;
7047  sni)
7048    lt_cv_file_magic_cmd='/bin/file'
7049    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
7050    lt_cv_file_magic_test_file=/lib/libc.so
7051    ;;
7052  siemens)
7053    lt_cv_deplibs_check_method=pass_all
7054    ;;
7055  pc)
7056    lt_cv_deplibs_check_method=pass_all
7057    ;;
7058  esac
7059  ;;
7060
7061tpf*)
7062  lt_cv_deplibs_check_method=pass_all
7063  ;;
7064os2*)
7065  lt_cv_deplibs_check_method=pass_all
7066  ;;
7067esac
7068])
7069
7070file_magic_glob=
7071want_nocaseglob=no
7072if test "$build" = "$host"; then
7073  case $host_os in
7074  mingw* | pw32*)
7075    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
7076      want_nocaseglob=yes
7077    else
7078      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
7079    fi
7080    ;;
7081  esac
7082fi
7083
7084file_magic_cmd=$lt_cv_file_magic_cmd
7085deplibs_check_method=$lt_cv_deplibs_check_method
7086test -z "$deplibs_check_method" && deplibs_check_method=unknown
7087
7088_LT_DECL([], [deplibs_check_method], [1],
7089    [Method to check whether dependent libraries are shared objects])
7090_LT_DECL([], [file_magic_cmd], [1],
7091    [Command to use when deplibs_check_method = "file_magic"])
7092_LT_DECL([], [file_magic_glob], [1],
7093    [How to find potential files when deplibs_check_method = "file_magic"])
7094_LT_DECL([], [want_nocaseglob], [1],
7095    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
7096])# _LT_CHECK_MAGIC_METHOD
7097
7098
7099# LT_PATH_NM
7100# ----------
7101# find the pathname to a BSD- or MS-compatible name lister
7102AC_DEFUN([LT_PATH_NM],
7103[AC_REQUIRE([AC_PROG_CC])dnl
7104AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
7105[if test -n "$NM"; then
7106  # Let the user override the test.
7107  lt_cv_path_NM=$NM
7108else
7109  lt_nm_to_check=${ac_tool_prefix}nm
7110  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
7111    lt_nm_to_check="$lt_nm_to_check nm"
7112  fi
7113  for lt_tmp_nm in $lt_nm_to_check; do
7114    lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
7115    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
7116      IFS=$lt_save_ifs
7117      test -z "$ac_dir" && ac_dir=.
7118      tmp_nm=$ac_dir/$lt_tmp_nm
7119      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
7120	# Check to see if the nm accepts a BSD-compat flag.
7121	# Adding the 'sed 1q' prevents false positives on HP-UX, which says:
7122	#   nm: unknown option "B" ignored
7123	# Tru64's nm complains that /dev/null is an invalid object file
7124	# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
7125	case $build_os in
7126	mingw*) lt_bad_file=conftest.nm/nofile ;;
7127	*) lt_bad_file=/dev/null ;;
7128	esac
7129	case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in
7130	*$lt_bad_file* | *'Invalid file or object type'*)
7131	  lt_cv_path_NM="$tmp_nm -B"
7132	  break 2
7133	  ;;
7134	*)
7135	  case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in
7136	  */dev/null*)
7137	    lt_cv_path_NM="$tmp_nm -p"
7138	    break 2
7139	    ;;
7140	  *)
7141	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
7142	    continue # so that we can try to find one that supports BSD flags
7143	    ;;
7144	  esac
7145	  ;;
7146	esac
7147      fi
7148    done
7149    IFS=$lt_save_ifs
7150  done
7151  : ${lt_cv_path_NM=no}
7152fi])
7153if test no != "$lt_cv_path_NM"; then
7154  NM=$lt_cv_path_NM
7155else
7156  # Didn't find any BSD compatible name lister, look for dumpbin.
7157  if test -n "$DUMPBIN"; then :
7158    # Let the user override the test.
7159  else
7160    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
7161    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in
7162    *COFF*)
7163      DUMPBIN="$DUMPBIN -symbols -headers"
7164      ;;
7165    *)
7166      DUMPBIN=:
7167      ;;
7168    esac
7169  fi
7170  AC_SUBST([DUMPBIN])
7171  if test : != "$DUMPBIN"; then
7172    NM=$DUMPBIN
7173  fi
7174fi
7175test -z "$NM" && NM=nm
7176AC_SUBST([NM])
7177_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
7178
7179AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
7180  [lt_cv_nm_interface="BSD nm"
7181  echo "int some_variable = 0;" > conftest.$ac_ext
7182  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
7183  (eval "$ac_compile" 2>conftest.err)
7184  cat conftest.err >&AS_MESSAGE_LOG_FD
7185  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
7186  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
7187  cat conftest.err >&AS_MESSAGE_LOG_FD
7188  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
7189  cat conftest.out >&AS_MESSAGE_LOG_FD
7190  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
7191    lt_cv_nm_interface="MS dumpbin"
7192  fi
7193  rm -f conftest*])
7194])# LT_PATH_NM
7195
7196# Old names:
7197AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
7198AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
7199dnl aclocal-1.4 backwards compatibility:
7200dnl AC_DEFUN([AM_PROG_NM], [])
7201dnl AC_DEFUN([AC_PROG_NM], [])
7202
7203# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
7204# --------------------------------
7205# how to determine the name of the shared library
7206# associated with a specific link library.
7207#  -- PORTME fill in with the dynamic library characteristics
7208m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
7209[m4_require([_LT_DECL_EGREP])
7210m4_require([_LT_DECL_OBJDUMP])
7211m4_require([_LT_DECL_DLLTOOL])
7212AC_CACHE_CHECK([how to associate runtime and link libraries],
7213lt_cv_sharedlib_from_linklib_cmd,
7214[lt_cv_sharedlib_from_linklib_cmd='unknown'
7215
7216case $host_os in
7217cygwin* | mingw* | pw32* | cegcc*)
7218  # two different shell functions defined in ltmain.sh;
7219  # decide which one to use based on capabilities of $DLLTOOL
7220  case `$DLLTOOL --help 2>&1` in
7221  *--identify-strict*)
7222    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
7223    ;;
7224  *)
7225    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
7226    ;;
7227  esac
7228  ;;
7229*)
7230  # fallback: assume linklib IS sharedlib
7231  lt_cv_sharedlib_from_linklib_cmd=$ECHO
7232  ;;
7233esac
7234])
7235sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
7236test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
7237
7238_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
7239    [Command to associate shared and link libraries])
7240])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
7241
7242
7243# _LT_PATH_MANIFEST_TOOL
7244# ----------------------
7245# locate the manifest tool
7246m4_defun([_LT_PATH_MANIFEST_TOOL],
7247[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
7248test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
7249AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
7250  [lt_cv_path_mainfest_tool=no
7251  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
7252  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
7253  cat conftest.err >&AS_MESSAGE_LOG_FD
7254  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
7255    lt_cv_path_mainfest_tool=yes
7256  fi
7257  rm -f conftest*])
7258if test yes != "$lt_cv_path_mainfest_tool"; then
7259  MANIFEST_TOOL=:
7260fi
7261_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
7262])# _LT_PATH_MANIFEST_TOOL
7263
7264
7265# _LT_DLL_DEF_P([FILE])
7266# ---------------------
7267# True iff FILE is a Windows DLL '.def' file.
7268# Keep in sync with func_dll_def_p in the libtool script
7269AC_DEFUN([_LT_DLL_DEF_P],
7270[dnl
7271  test DEF = "`$SED -n dnl
7272    -e '\''s/^[[	 ]]*//'\'' dnl Strip leading whitespace
7273    -e '\''/^\(;.*\)*$/d'\'' dnl      Delete empty lines and comments
7274    -e '\''s/^\(EXPORTS\|LIBRARY\)\([[	 ]].*\)*$/DEF/p'\'' dnl
7275    -e q dnl                          Only consider the first "real" line
7276    $1`" dnl
7277])# _LT_DLL_DEF_P
7278
7279
7280# LT_LIB_M
7281# --------
7282# check for math library
7283AC_DEFUN([LT_LIB_M],
7284[AC_REQUIRE([AC_CANONICAL_HOST])dnl
7285LIBM=
7286case $host in
7287*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
7288  # These system don't have libm, or don't need it
7289  ;;
7290*-ncr-sysv4.3*)
7291  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
7292  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
7293  ;;
7294*)
7295  AC_CHECK_LIB(m, cos, LIBM=-lm)
7296  ;;
7297esac
7298AC_SUBST([LIBM])
7299])# LT_LIB_M
7300
7301# Old name:
7302AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
7303dnl aclocal-1.4 backwards compatibility:
7304dnl AC_DEFUN([AC_CHECK_LIBM], [])
7305
7306
7307# _LT_COMPILER_NO_RTTI([TAGNAME])
7308# -------------------------------
7309m4_defun([_LT_COMPILER_NO_RTTI],
7310[m4_require([_LT_TAG_COMPILER])dnl
7311
7312_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
7313
7314if test yes = "$GCC"; then
7315  case $cc_basename in
7316  nvcc*)
7317    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
7318  *)
7319    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
7320  esac
7321
7322  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
7323    lt_cv_prog_compiler_rtti_exceptions,
7324    [-fno-rtti -fno-exceptions], [],
7325    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
7326fi
7327_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
7328	[Compiler flag to turn off builtin functions])
7329])# _LT_COMPILER_NO_RTTI
7330
7331
7332# _LT_CMD_GLOBAL_SYMBOLS
7333# ----------------------
7334m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
7335[AC_REQUIRE([AC_CANONICAL_HOST])dnl
7336AC_REQUIRE([AC_PROG_CC])dnl
7337AC_REQUIRE([AC_PROG_AWK])dnl
7338AC_REQUIRE([LT_PATH_NM])dnl
7339AC_REQUIRE([LT_PATH_LD])dnl
7340m4_require([_LT_DECL_SED])dnl
7341m4_require([_LT_DECL_EGREP])dnl
7342m4_require([_LT_TAG_COMPILER])dnl
7343
7344# Check for command to grab the raw symbol name followed by C symbol from nm.
7345AC_MSG_CHECKING([command to parse $NM output from $compiler object])
7346AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
7347[
7348# These are sane defaults that work on at least a few old systems.
7349# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
7350
7351# Character class describing NM global symbol codes.
7352symcode='[[BCDEGRST]]'
7353
7354# Regexp to match symbols that can be accessed directly from C.
7355sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
7356
7357# Define system-specific variables.
7358case $host_os in
7359aix*)
7360  symcode='[[BCDT]]'
7361  ;;
7362cygwin* | mingw* | pw32* | cegcc*)
7363  symcode='[[ABCDGISTW]]'
7364  ;;
7365hpux*)
7366  if test ia64 = "$host_cpu"; then
7367    symcode='[[ABCDEGRST]]'
7368  fi
7369  ;;
7370irix* | nonstopux*)
7371  symcode='[[BCDEGRST]]'
7372  ;;
7373osf*)
7374  symcode='[[BCDEGQRST]]'
7375  ;;
7376solaris*)
7377  symcode='[[BDRT]]'
7378  ;;
7379sco3.2v5*)
7380  symcode='[[DT]]'
7381  ;;
7382sysv4.2uw2*)
7383  symcode='[[DT]]'
7384  ;;
7385sysv5* | sco5v6* | unixware* | OpenUNIX*)
7386  symcode='[[ABDT]]'
7387  ;;
7388sysv4)
7389  symcode='[[DFNSTU]]'
7390  ;;
7391esac
7392
7393# If we're using GNU nm, then use its standard symbol codes.
7394case `$NM -V 2>&1` in
7395*GNU* | *'with BFD'*)
7396  symcode='[[ABCDGIRSTW]]' ;;
7397esac
7398
7399if test "$lt_cv_nm_interface" = "MS dumpbin"; then
7400  # Gets list of data symbols to import.
7401  lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'"
7402  # Adjust the below global symbol transforms to fixup imported variables.
7403  lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
7404  lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
7405  lt_c_name_lib_hook="\
7406  -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
7407  -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
7408else
7409  # Disable hooks by default.
7410  lt_cv_sys_global_symbol_to_import=
7411  lt_cdecl_hook=
7412  lt_c_name_hook=
7413  lt_c_name_lib_hook=
7414fi
7415
7416# Transform an extracted symbol line into a proper C declaration.
7417# Some systems (esp. on ia64) link data and code symbols differently,
7418# so use this general approach.
7419lt_cv_sys_global_symbol_to_cdecl="$SED -n"\
7420$lt_cdecl_hook\
7421" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
7422" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
7423
7424# Transform an extracted symbol line into symbol name and symbol address
7425lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\
7426$lt_c_name_hook\
7427" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
7428" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
7429
7430# Transform an extracted symbol line into symbol name with lib prefix and
7431# symbol address.
7432lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\
7433$lt_c_name_lib_hook\
7434" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
7435" -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
7436" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
7437
7438# Handle CRLF in mingw tool chain
7439opt_cr=
7440case $build_os in
7441mingw*)
7442  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
7443  ;;
7444esac
7445
7446# Try without a prefix underscore, then with it.
7447for ac_symprfx in "" "_"; do
7448
7449  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
7450  symxfrm="\\1 $ac_symprfx\\2 \\2"
7451
7452  # Write the raw and C identifiers.
7453  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
7454    # Fake it for dumpbin and say T for any non-static function,
7455    # D for any global variable and I for any imported variable.
7456    # Also find C++ and __fastcall symbols from MSVC++ or ICC,
7457    # which start with @ or ?.
7458    lt_cv_sys_global_symbol_pipe="$AWK ['"\
7459"     {last_section=section; section=\$ 3};"\
7460"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
7461"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
7462"     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
7463"     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
7464"     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
7465"     \$ 0!~/External *\|/{next};"\
7466"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
7467"     {if(hide[section]) next};"\
7468"     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
7469"     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
7470"     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
7471"     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
7472"     ' prfx=^$ac_symprfx]"
7473  else
7474    lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
7475  fi
7476  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'"
7477
7478  # Check to see that the pipe works correctly.
7479  pipe_works=no
7480
7481  rm -f conftest*
7482  cat > conftest.$ac_ext <<_LT_EOF
7483#ifdef __cplusplus
7484extern "C" {
7485#endif
7486char nm_test_var;
7487void nm_test_func(void);
7488void nm_test_func(void){}
7489#ifdef __cplusplus
7490}
7491#endif
7492int main(){nm_test_var='a';nm_test_func();return(0);}
7493_LT_EOF
7494
7495  if AC_TRY_EVAL(ac_compile); then
7496    # Now try to grab the symbols.
7497    nlist=conftest.nm
7498    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
7499      # Try sorting and uniquifying the output.
7500      if sort "$nlist" | uniq > "$nlist"T; then
7501	mv -f "$nlist"T "$nlist"
7502      else
7503	rm -f "$nlist"T
7504      fi
7505
7506      # Make sure that we snagged all the symbols we need.
7507      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
7508	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
7509	  cat <<_LT_EOF > conftest.$ac_ext
7510/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
7511#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
7512/* DATA imports from DLLs on WIN32 can't be const, because runtime
7513   relocations are performed -- see ld's documentation on pseudo-relocs.  */
7514# define LT@&t@_DLSYM_CONST
7515#elif defined __osf__
7516/* This system does not cope well with relocations in const data.  */
7517# define LT@&t@_DLSYM_CONST
7518#else
7519# define LT@&t@_DLSYM_CONST const
7520#endif
7521
7522#ifdef __cplusplus
7523extern "C" {
7524#endif
7525
7526_LT_EOF
7527	  # Now generate the symbol file.
7528	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
7529
7530	  cat <<_LT_EOF >> conftest.$ac_ext
7531
7532/* The mapping between symbol names and symbols.  */
7533LT@&t@_DLSYM_CONST struct {
7534  const char *name;
7535  void       *address;
7536}
7537lt__PROGRAM__LTX_preloaded_symbols[[]] =
7538{
7539  { "@PROGRAM@", (void *) 0 },
7540_LT_EOF
7541	  $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
7542	  cat <<\_LT_EOF >> conftest.$ac_ext
7543  {0, (void *) 0}
7544};
7545
7546/* This works around a problem in FreeBSD linker */
7547#ifdef FREEBSD_WORKAROUND
7548static const void *lt_preloaded_setup() {
7549  return lt__PROGRAM__LTX_preloaded_symbols;
7550}
7551#endif
7552
7553#ifdef __cplusplus
7554}
7555#endif
7556_LT_EOF
7557	  # Now try linking the two files.
7558	  mv conftest.$ac_objext conftstm.$ac_objext
7559	  lt_globsym_save_LIBS=$LIBS
7560	  lt_globsym_save_CFLAGS=$CFLAGS
7561	  LIBS=conftstm.$ac_objext
7562	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
7563	  if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
7564	    pipe_works=yes
7565	  fi
7566	  LIBS=$lt_globsym_save_LIBS
7567	  CFLAGS=$lt_globsym_save_CFLAGS
7568	else
7569	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
7570	fi
7571      else
7572	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
7573      fi
7574    else
7575      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
7576    fi
7577  else
7578    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
7579    cat conftest.$ac_ext >&5
7580  fi
7581  rm -rf conftest* conftst*
7582
7583  # Do not use the global_symbol_pipe unless it works.
7584  if test yes = "$pipe_works"; then
7585    break
7586  else
7587    lt_cv_sys_global_symbol_pipe=
7588  fi
7589done
7590])
7591if test -z "$lt_cv_sys_global_symbol_pipe"; then
7592  lt_cv_sys_global_symbol_to_cdecl=
7593fi
7594if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
7595  AC_MSG_RESULT(failed)
7596else
7597  AC_MSG_RESULT(ok)
7598fi
7599
7600# Response file support.
7601if test "$lt_cv_nm_interface" = "MS dumpbin"; then
7602  nm_file_list_spec='@'
7603elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
7604  nm_file_list_spec='@'
7605fi
7606
7607_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
7608    [Take the output of nm and produce a listing of raw symbols and C names])
7609_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
7610    [Transform the output of nm in a proper C declaration])
7611_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
7612    [Transform the output of nm into a list of symbols to manually relocate])
7613_LT_DECL([global_symbol_to_c_name_address],
7614    [lt_cv_sys_global_symbol_to_c_name_address], [1],
7615    [Transform the output of nm in a C name address pair])
7616_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
7617    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
7618    [Transform the output of nm in a C name address pair when lib prefix is needed])
7619_LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
7620    [The name lister interface])
7621_LT_DECL([], [nm_file_list_spec], [1],
7622    [Specify filename containing input files for $NM])
7623]) # _LT_CMD_GLOBAL_SYMBOLS
7624
7625
7626# _LT_COMPILER_PIC([TAGNAME])
7627# ---------------------------
7628m4_defun([_LT_COMPILER_PIC],
7629[m4_require([_LT_TAG_COMPILER])dnl
7630_LT_TAGVAR(lt_prog_compiler_wl, $1)=
7631_LT_TAGVAR(lt_prog_compiler_pic, $1)=
7632_LT_TAGVAR(lt_prog_compiler_static, $1)=
7633
7634m4_if([$1], [CXX], [
7635  # C++ specific cases for pic, static, wl, etc.
7636  if test yes = "$GXX"; then
7637    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7638    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
7639
7640    case $host_os in
7641    aix*)
7642      # All AIX code is PIC.
7643      if test ia64 = "$host_cpu"; then
7644	# AIX 5 now supports IA64 processor
7645	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7646      fi
7647      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
7648      ;;
7649
7650    amigaos*)
7651      case $host_cpu in
7652      powerpc)
7653            # see comment about AmigaOS4 .so support
7654            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
7655        ;;
7656      m68k)
7657            # FIXME: we need at least 68020 code to build shared libraries, but
7658            # adding the '-m68020' flag to GCC prevents building anything better,
7659            # like '-m68040'.
7660            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
7661        ;;
7662      esac
7663      ;;
7664
7665    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
7666      # PIC is the default for these OSes.
7667      ;;
7668    mingw* | cygwin* | os2* | pw32* | cegcc*)
7669      # This hack is so that the source file can tell whether it is being
7670      # built for inclusion in a dll (and should export symbols for example).
7671      # Although the cygwin gcc ignores -fPIC, still need this for old-style
7672      # (--disable-auto-import) libraries
7673      m4_if([$1], [GCJ], [],
7674	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
7675      case $host_os in
7676      os2*)
7677	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
7678	;;
7679      esac
7680      ;;
7681    darwin* | rhapsody*)
7682      # PIC is the default on this platform
7683      # Common symbols not allowed in MH_DYLIB files
7684      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
7685      ;;
7686    *djgpp*)
7687      # DJGPP does not support shared libraries at all
7688      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
7689      ;;
7690    haiku*)
7691      # PIC is the default for Haiku.
7692      # The "-static" flag exists, but is broken.
7693      _LT_TAGVAR(lt_prog_compiler_static, $1)=
7694      ;;
7695    interix[[3-9]]*)
7696      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
7697      # Instead, we relocate shared libraries at runtime.
7698      ;;
7699    sysv4*MP*)
7700      if test -d /usr/nec; then
7701	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
7702      fi
7703      ;;
7704    hpux*)
7705      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
7706      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
7707      # sets the default TLS model and affects inlining.
7708      case $host_cpu in
7709      hppa*64*)
7710	;;
7711      *)
7712	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
7713	;;
7714      esac
7715      ;;
7716    *qnx* | *nto*)
7717      # QNX uses GNU C++, but need to define -shared option too, otherwise
7718      # it will coredump.
7719      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
7720      ;;
7721    *)
7722      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
7723      ;;
7724    esac
7725  else
7726    case $host_os in
7727      aix[[4-9]]*)
7728	# All AIX code is PIC.
7729	if test ia64 = "$host_cpu"; then
7730	  # AIX 5 now supports IA64 processor
7731	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7732	else
7733	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
7734	fi
7735	;;
7736      chorus*)
7737	case $cc_basename in
7738	cxch68*)
7739	  # Green Hills C++ Compiler
7740	  # _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"
7741	  ;;
7742	esac
7743	;;
7744      mingw* | cygwin* | os2* | pw32* | cegcc*)
7745	# This hack is so that the source file can tell whether it is being
7746	# built for inclusion in a dll (and should export symbols for example).
7747	m4_if([$1], [GCJ], [],
7748	  [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
7749	;;
7750      dgux*)
7751	case $cc_basename in
7752	  ec++*)
7753	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7754	    ;;
7755	  ghcx*)
7756	    # Green Hills C++ Compiler
7757	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
7758	    ;;
7759	  *)
7760	    ;;
7761	esac
7762	;;
7763      freebsd* | dragonfly* | midnightbsd*)
7764	# FreeBSD uses GNU C++
7765	;;
7766      hpux9* | hpux10* | hpux11*)
7767	case $cc_basename in
7768	  CC*)
7769	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7770	    _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
7771	    if test ia64 != "$host_cpu"; then
7772	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
7773	    fi
7774	    ;;
7775	  aCC*)
7776	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7777	    _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
7778	    case $host_cpu in
7779	    hppa*64*|ia64*)
7780	      # +Z the default
7781	      ;;
7782	    *)
7783	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
7784	      ;;
7785	    esac
7786	    ;;
7787	  *)
7788	    ;;
7789	esac
7790	;;
7791      interix*)
7792	# This is c89, which is MS Visual C++ (no shared libs)
7793	# Anyone wants to do a port?
7794	;;
7795      irix5* | irix6* | nonstopux*)
7796	case $cc_basename in
7797	  CC*)
7798	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7799	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
7800	    # CC pic flag -KPIC is the default.
7801	    ;;
7802	  *)
7803	    ;;
7804	esac
7805	;;
7806      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
7807	case $cc_basename in
7808	  KCC*)
7809	    # KAI C++ Compiler
7810	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
7811	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
7812	    ;;
7813	  ecpc* )
7814	    # old Intel C++ for x86_64, which still supported -KPIC.
7815	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7816	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7817	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
7818	    ;;
7819	  icpc* )
7820	    # Intel C++, used to be incompatible with GCC.
7821	    # ICC 10 doesn't accept -KPIC any more.
7822	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7823	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
7824	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
7825	    ;;
7826	  pgCC* | pgcpp*)
7827	    # Portland Group C++ compiler
7828	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7829	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
7830	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7831	    ;;
7832	  cxx*)
7833	    # Compaq C++
7834	    # Make sure the PIC flag is empty.  It appears that all Alpha
7835	    # Linux and Compaq Tru64 Unix objects are PIC.
7836	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
7837	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
7838	    ;;
7839	  xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
7840	    # IBM XL 8.0, 9.0 on PPC and BlueGene
7841	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7842	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
7843	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
7844	    ;;
7845	  *)
7846	    case `$CC -V 2>&1 | $SED 5q` in
7847	    *Sun\ C*)
7848	      # Sun C++ 5.9
7849	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7850	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7851	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
7852	      ;;
7853	    esac
7854	    ;;
7855	esac
7856	;;
7857      lynxos*)
7858	;;
7859      m88k*)
7860	;;
7861      mvs*)
7862	case $cc_basename in
7863	  cxx*)
7864	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
7865	    ;;
7866	  *)
7867	    ;;
7868	esac
7869	;;
7870      netbsd*)
7871	;;
7872      *qnx* | *nto*)
7873        # QNX uses GNU C++, but need to define -shared option too, otherwise
7874        # it will coredump.
7875        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
7876        ;;
7877      osf3* | osf4* | osf5*)
7878	case $cc_basename in
7879	  KCC*)
7880	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
7881	    ;;
7882	  RCC*)
7883	    # Rational C++ 2.4.1
7884	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
7885	    ;;
7886	  cxx*)
7887	    # Digital/Compaq C++
7888	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7889	    # Make sure the PIC flag is empty.  It appears that all Alpha
7890	    # Linux and Compaq Tru64 Unix objects are PIC.
7891	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
7892	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
7893	    ;;
7894	  *)
7895	    ;;
7896	esac
7897	;;
7898      psos*)
7899	;;
7900      solaris*)
7901	case $cc_basename in
7902	  CC* | sunCC*)
7903	    # Sun C++ 4.2, 5.x and Centerline C++
7904	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7905	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7906	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
7907	    ;;
7908	  gcx*)
7909	    # Green Hills C++ Compiler
7910	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
7911	    ;;
7912	  *)
7913	    ;;
7914	esac
7915	;;
7916      sunos4*)
7917	case $cc_basename in
7918	  CC*)
7919	    # Sun C++ 4.x
7920	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
7921	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7922	    ;;
7923	  lcc*)
7924	    # Lucid
7925	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
7926	    ;;
7927	  *)
7928	    ;;
7929	esac
7930	;;
7931      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
7932	case $cc_basename in
7933	  CC*)
7934	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7935	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7936	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7937	    ;;
7938	esac
7939	;;
7940      tandem*)
7941	case $cc_basename in
7942	  NCC*)
7943	    # NonStop-UX NCC 3.20
7944	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7945	    ;;
7946	  *)
7947	    ;;
7948	esac
7949	;;
7950      vxworks*)
7951	;;
7952      *)
7953	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
7954	;;
7955    esac
7956  fi
7957],
7958[
7959  if test yes = "$GCC"; then
7960    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7961    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
7962
7963    case $host_os in
7964      aix*)
7965      # All AIX code is PIC.
7966      if test ia64 = "$host_cpu"; then
7967	# AIX 5 now supports IA64 processor
7968	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7969      fi
7970      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
7971      ;;
7972
7973    amigaos*)
7974      case $host_cpu in
7975      powerpc)
7976            # see comment about AmigaOS4 .so support
7977            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
7978        ;;
7979      m68k)
7980            # FIXME: we need at least 68020 code to build shared libraries, but
7981            # adding the '-m68020' flag to GCC prevents building anything better,
7982            # like '-m68040'.
7983            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
7984        ;;
7985      esac
7986      ;;
7987
7988    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
7989      # PIC is the default for these OSes.
7990      ;;
7991
7992    mingw* | cygwin* | pw32* | os2* | cegcc*)
7993      # This hack is so that the source file can tell whether it is being
7994      # built for inclusion in a dll (and should export symbols for example).
7995      # Although the cygwin gcc ignores -fPIC, still need this for old-style
7996      # (--disable-auto-import) libraries
7997      m4_if([$1], [GCJ], [],
7998	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
7999      case $host_os in
8000      os2*)
8001	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
8002	;;
8003      esac
8004      ;;
8005
8006    darwin* | rhapsody*)
8007      # PIC is the default on this platform
8008      # Common symbols not allowed in MH_DYLIB files
8009      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
8010      ;;
8011
8012    haiku*)
8013      # PIC is the default for Haiku.
8014      # The "-static" flag exists, but is broken.
8015      _LT_TAGVAR(lt_prog_compiler_static, $1)=
8016      ;;
8017
8018    hpux*)
8019      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
8020      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
8021      # sets the default TLS model and affects inlining.
8022      case $host_cpu in
8023      hppa*64*)
8024	# +Z the default
8025	;;
8026      *)
8027	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
8028	;;
8029      esac
8030      ;;
8031
8032    interix[[3-9]]*)
8033      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
8034      # Instead, we relocate shared libraries at runtime.
8035      ;;
8036
8037    msdosdjgpp*)
8038      # Just because we use GCC doesn't mean we suddenly get shared libraries
8039      # on systems that don't support them.
8040      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
8041      enable_shared=no
8042      ;;
8043
8044    *nto* | *qnx*)
8045      # QNX uses GNU C++, but need to define -shared option too, otherwise
8046      # it will coredump.
8047      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
8048      ;;
8049
8050    sysv4*MP*)
8051      if test -d /usr/nec; then
8052	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
8053      fi
8054      ;;
8055
8056    *)
8057      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
8058      ;;
8059    esac
8060
8061    case $cc_basename in
8062    nvcc*) # Cuda Compiler Driver 2.2
8063      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
8064      if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
8065        _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
8066      fi
8067      ;;
8068    esac
8069  else
8070    # PORTME Check for flag to pass linker flags through the system compiler.
8071    case $host_os in
8072    aix*)
8073      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8074      if test ia64 = "$host_cpu"; then
8075	# AIX 5 now supports IA64 processor
8076	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8077      else
8078	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
8079      fi
8080      ;;
8081
8082    darwin* | rhapsody*)
8083      # PIC is the default on this platform
8084      # Common symbols not allowed in MH_DYLIB files
8085      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
8086      case $cc_basename in
8087      nagfor*)
8088        # NAG Fortran compiler
8089        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
8090        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
8091        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8092        ;;
8093      esac
8094      ;;
8095
8096    mingw* | cygwin* | pw32* | os2* | cegcc*)
8097      # This hack is so that the source file can tell whether it is being
8098      # built for inclusion in a dll (and should export symbols for example).
8099      m4_if([$1], [GCJ], [],
8100	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
8101      case $host_os in
8102      os2*)
8103	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
8104	;;
8105      esac
8106      ;;
8107
8108    hpux9* | hpux10* | hpux11*)
8109      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8110      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
8111      # not for PA HP-UX.
8112      case $host_cpu in
8113      hppa*64*|ia64*)
8114	# +Z the default
8115	;;
8116      *)
8117	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
8118	;;
8119      esac
8120      # Is there a better lt_prog_compiler_static that works with the bundled CC?
8121      _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
8122      ;;
8123
8124    irix5* | irix6* | nonstopux*)
8125      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8126      # PIC (with -KPIC) is the default.
8127      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
8128      ;;
8129
8130    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
8131      case $cc_basename in
8132      # old Intel for x86_64, which still supported -KPIC.
8133      ecc*)
8134	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8135	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
8136	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
8137        ;;
8138      # icc used to be incompatible with GCC.
8139      # ICC 10 doesn't accept -KPIC any more.
8140      icc* | ifort*)
8141	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8142	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
8143	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
8144        ;;
8145      # Lahey Fortran 8.1.
8146      lf95*)
8147	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8148	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
8149	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
8150	;;
8151      nagfor*)
8152	# NAG Fortran compiler
8153	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
8154	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
8155	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8156	;;
8157      tcc*)
8158	# Fabrice Bellard et al's Tiny C Compiler
8159	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8160	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
8161	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
8162	;;
8163      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
8164        # Portland Group compilers (*not* the Pentium gcc compiler,
8165	# which looks to be a dead project)
8166	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8167	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
8168	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8169        ;;
8170      ccc*)
8171        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8172        # All Alpha code is PIC.
8173        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
8174        ;;
8175      xl* | bgxl* | bgf* | mpixl*)
8176	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
8177	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8178	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
8179	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
8180	;;
8181      *)
8182	case `$CC -V 2>&1 | $SED 5q` in
8183	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
8184	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
8185	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
8186	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8187	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
8188	  ;;
8189	*Sun\ F* | *Sun*Fortran*)
8190	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
8191	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8192	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
8193	  ;;
8194	*Sun\ C*)
8195	  # Sun C 5.9
8196	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
8197	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8198	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8199	  ;;
8200        *Intel*\ [[CF]]*Compiler*)
8201	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8202	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
8203	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
8204	  ;;
8205	*Portland\ Group*)
8206	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8207	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
8208	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8209	  ;;
8210	esac
8211	;;
8212      esac
8213      ;;
8214
8215    newsos6)
8216      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
8217      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8218      ;;
8219
8220    *nto* | *qnx*)
8221      # QNX uses GNU C++, but need to define -shared option too, otherwise
8222      # it will coredump.
8223      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
8224      ;;
8225
8226    osf3* | osf4* | osf5*)
8227      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8228      # All OSF/1 code is PIC.
8229      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
8230      ;;
8231
8232    rdos*)
8233      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
8234      ;;
8235
8236    solaris*)
8237      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
8238      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8239      case $cc_basename in
8240      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
8241	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
8242      *)
8243	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
8244      esac
8245      ;;
8246
8247    sunos4*)
8248      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
8249      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
8250      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8251      ;;
8252
8253    sysv4 | sysv4.2uw2* | sysv4.3*)
8254      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8255      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
8256      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8257      ;;
8258
8259    sysv4*MP*)
8260      if test -d /usr/nec; then
8261	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
8262	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8263      fi
8264      ;;
8265
8266    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
8267      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8268      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
8269      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8270      ;;
8271
8272    unicos*)
8273      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8274      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
8275      ;;
8276
8277    uts4*)
8278      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
8279      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8280      ;;
8281
8282    *)
8283      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
8284      ;;
8285    esac
8286  fi
8287])
8288case $host_os in
8289  # For platforms that do not support PIC, -DPIC is meaningless:
8290  *djgpp*)
8291    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
8292    ;;
8293  *)
8294    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
8295    ;;
8296esac
8297
8298AC_CACHE_CHECK([for $compiler option to produce PIC],
8299  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
8300  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
8301_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
8302
8303#
8304# Check to make sure the PIC flag actually works.
8305#
8306if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
8307  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
8308    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
8309    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
8310    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
8311     "" | " "*) ;;
8312     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
8313     esac],
8314    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
8315     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
8316fi
8317_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
8318	[Additional compiler flags for building library objects])
8319
8320_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
8321	[How to pass a linker flag through the compiler])
8322#
8323# Check to make sure the static flag actually works.
8324#
8325wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
8326_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
8327  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
8328  $lt_tmp_static_flag,
8329  [],
8330  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
8331_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
8332	[Compiler flag to prevent dynamic linking])
8333])# _LT_COMPILER_PIC
8334
8335
8336# _LT_LINKER_SHLIBS([TAGNAME])
8337# ----------------------------
8338# See if the linker supports building shared libraries.
8339m4_defun([_LT_LINKER_SHLIBS],
8340[AC_REQUIRE([LT_PATH_LD])dnl
8341AC_REQUIRE([LT_PATH_NM])dnl
8342m4_require([_LT_PATH_MANIFEST_TOOL])dnl
8343m4_require([_LT_FILEUTILS_DEFAULTS])dnl
8344m4_require([_LT_DECL_EGREP])dnl
8345m4_require([_LT_DECL_SED])dnl
8346m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
8347m4_require([_LT_TAG_COMPILER])dnl
8348AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
8349m4_if([$1], [CXX], [
8350  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
8351  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
8352  case $host_os in
8353  aix[[4-9]]*)
8354    # If we're using GNU nm, then we don't want the "-C" option.
8355    # -C means demangle to GNU nm, but means don't demangle to AIX nm.
8356    # Without the "-l" option, or with the "-B" option, AIX nm treats
8357    # weak defined symbols like other global defined symbols, whereas
8358    # GNU nm marks them as "W".
8359    # While the 'weak' keyword is ignored in the Export File, we need
8360    # it in the Import File for the 'aix-soname' feature, so we have
8361    # to replace the "-B" option with "-P" for AIX nm.
8362    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
8363      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
8364    else
8365      _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
8366    fi
8367    ;;
8368  pw32*)
8369    _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
8370    ;;
8371  cygwin* | mingw* | cegcc*)
8372    case $cc_basename in
8373    cl* | icl*)
8374      _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
8375      ;;
8376    *)
8377      _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'
8378      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
8379      ;;
8380    esac
8381    ;;
8382  *)
8383    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
8384    ;;
8385  esac
8386], [
8387  runpath_var=
8388  _LT_TAGVAR(allow_undefined_flag, $1)=
8389  _LT_TAGVAR(always_export_symbols, $1)=no
8390  _LT_TAGVAR(archive_cmds, $1)=
8391  _LT_TAGVAR(archive_expsym_cmds, $1)=
8392  _LT_TAGVAR(compiler_needs_object, $1)=no
8393  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8394  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
8395  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
8396  _LT_TAGVAR(hardcode_automatic, $1)=no
8397  _LT_TAGVAR(hardcode_direct, $1)=no
8398  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
8399  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8400  _LT_TAGVAR(hardcode_libdir_separator, $1)=
8401  _LT_TAGVAR(hardcode_minus_L, $1)=no
8402  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
8403  _LT_TAGVAR(inherit_rpath, $1)=no
8404  _LT_TAGVAR(link_all_deplibs, $1)=unknown
8405  _LT_TAGVAR(module_cmds, $1)=
8406  _LT_TAGVAR(module_expsym_cmds, $1)=
8407  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
8408  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
8409  _LT_TAGVAR(thread_safe_flag_spec, $1)=
8410  _LT_TAGVAR(whole_archive_flag_spec, $1)=
8411  # include_expsyms should be a list of space-separated symbols to be *always*
8412  # included in the symbol list
8413  _LT_TAGVAR(include_expsyms, $1)=
8414  # exclude_expsyms can be an extended regexp of symbols to exclude
8415  # it will be wrapped by ' (' and ')$', so one must not match beginning or
8416  # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
8417  # as well as any symbol that contains 'd'.
8418  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
8419  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
8420  # platforms (ab)use it in PIC code, but their linkers get confused if
8421  # the symbol is explicitly referenced.  Since portable code cannot
8422  # rely on this symbol name, it's probably fine to never include it in
8423  # preloaded symbol tables.
8424  # Exclude shared library initialization/finalization symbols.
8425dnl Note also adjust exclude_expsyms for C++ above.
8426  extract_expsyms_cmds=
8427
8428  case $host_os in
8429  cygwin* | mingw* | pw32* | cegcc*)
8430    # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
8431    # When not using gcc, we currently assume that we are using
8432    # Microsoft Visual C++ or Intel C++ Compiler.
8433    if test yes != "$GCC"; then
8434      with_gnu_ld=no
8435    fi
8436    ;;
8437  interix*)
8438    # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC)
8439    with_gnu_ld=yes
8440    ;;
8441  openbsd* | bitrig*)
8442    with_gnu_ld=no
8443    ;;
8444  esac
8445
8446  _LT_TAGVAR(ld_shlibs, $1)=yes
8447
8448  # On some targets, GNU ld is compatible enough with the native linker
8449  # that we're better off using the native interface for both.
8450  lt_use_gnu_ld_interface=no
8451  if test yes = "$with_gnu_ld"; then
8452    case $host_os in
8453      aix*)
8454	# The AIX port of GNU ld has always aspired to compatibility
8455	# with the native linker.  However, as the warning in the GNU ld
8456	# block says, versions before 2.19.5* couldn't really create working
8457	# shared libraries, regardless of the interface used.
8458	case `$LD -v 2>&1` in
8459	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
8460	  *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
8461	  *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
8462	  *)
8463	    lt_use_gnu_ld_interface=yes
8464	    ;;
8465	esac
8466	;;
8467      *)
8468	lt_use_gnu_ld_interface=yes
8469	;;
8470    esac
8471  fi
8472
8473  if test yes = "$lt_use_gnu_ld_interface"; then
8474    # If archive_cmds runs LD, not CC, wlarc should be empty
8475    wlarc='$wl'
8476
8477    # Set some defaults for GNU ld with shared library support. These
8478    # are reset later if shared libraries are not supported. Putting them
8479    # here allows them to be overridden if necessary.
8480    runpath_var=LD_RUN_PATH
8481    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
8482    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
8483    # ancient GNU ld didn't support --whole-archive et. al.
8484    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
8485      _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
8486    else
8487      _LT_TAGVAR(whole_archive_flag_spec, $1)=
8488    fi
8489    supports_anon_versioning=no
8490    case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in
8491      *GNU\ gold*) supports_anon_versioning=yes ;;
8492      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
8493      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
8494      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
8495      *\ 2.11.*) ;; # other 2.11 versions
8496      *) supports_anon_versioning=yes ;;
8497    esac
8498
8499    # See if GNU ld supports shared libraries.
8500    case $host_os in
8501    aix[[3-9]]*)
8502      # On AIX/PPC, the GNU linker is very broken
8503      if test ia64 != "$host_cpu"; then
8504	_LT_TAGVAR(ld_shlibs, $1)=no
8505	cat <<_LT_EOF 1>&2
8506
8507*** Warning: the GNU linker, at least up to release 2.19, is reported
8508*** to be unable to reliably create shared libraries on AIX.
8509*** Therefore, libtool is disabling shared libraries support.  If you
8510*** really care for shared libraries, you may want to install binutils
8511*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
8512*** You will then need to restart the configuration process.
8513
8514_LT_EOF
8515      fi
8516      ;;
8517
8518    amigaos*)
8519      case $host_cpu in
8520      powerpc)
8521            # see comment about AmigaOS4 .so support
8522            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
8523            _LT_TAGVAR(archive_expsym_cmds, $1)=''
8524        ;;
8525      m68k)
8526            _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)'
8527            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8528            _LT_TAGVAR(hardcode_minus_L, $1)=yes
8529        ;;
8530      esac
8531      ;;
8532
8533    beos*)
8534      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
8535	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
8536	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
8537	# support --undefined.  This deserves some investigation.  FIXME
8538	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
8539      else
8540	_LT_TAGVAR(ld_shlibs, $1)=no
8541      fi
8542      ;;
8543
8544    cygwin* | mingw* | pw32* | cegcc*)
8545      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
8546      # as there is no search path for DLLs.
8547      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8548      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
8549      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
8550      _LT_TAGVAR(always_export_symbols, $1)=no
8551      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
8552      _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'
8553      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
8554
8555      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
8556        _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'
8557	# If the export-symbols file already is a .def file, use it as
8558	# is; otherwise, prepend EXPORTS...
8559	_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
8560          cp $export_symbols $output_objdir/$soname.def;
8561        else
8562          echo EXPORTS > $output_objdir/$soname.def;
8563          cat $export_symbols >> $output_objdir/$soname.def;
8564        fi~
8565        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
8566      else
8567	_LT_TAGVAR(ld_shlibs, $1)=no
8568      fi
8569      ;;
8570
8571    haiku*)
8572      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
8573      _LT_TAGVAR(link_all_deplibs, $1)=yes
8574      ;;
8575
8576    os2*)
8577      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8578      _LT_TAGVAR(hardcode_minus_L, $1)=yes
8579      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
8580      shrext_cmds=.dll
8581      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
8582	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
8583	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
8584	$ECHO EXPORTS >> $output_objdir/$libname.def~
8585	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
8586	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
8587	emximp -o $lib $output_objdir/$libname.def'
8588      _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
8589	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
8590	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
8591	$ECHO EXPORTS >> $output_objdir/$libname.def~
8592	prefix_cmds="$SED"~
8593	if test EXPORTS = "`$SED 1q $export_symbols`"; then
8594	  prefix_cmds="$prefix_cmds -e 1d";
8595	fi~
8596	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
8597	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
8598	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
8599	emximp -o $lib $output_objdir/$libname.def'
8600      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
8601      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
8602      _LT_TAGVAR(file_list_spec, $1)='@'
8603      ;;
8604
8605    interix[[3-9]]*)
8606      _LT_TAGVAR(hardcode_direct, $1)=no
8607      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8608      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
8609      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
8610      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
8611      # Instead, shared libraries are loaded at an image base (0x10000000 by
8612      # default) and relocated if they conflict, which is a slow very memory
8613      # consuming and fragmenting process.  To avoid this, we pick a random,
8614      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
8615      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
8616      _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'
8617      _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'
8618      ;;
8619
8620    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
8621      tmp_diet=no
8622      if test linux-dietlibc = "$host_os"; then
8623	case $cc_basename in
8624	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
8625	esac
8626      fi
8627      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
8628	 && test no = "$tmp_diet"
8629      then
8630	tmp_addflag=' $pic_flag'
8631	tmp_sharedflag='-shared'
8632	case $cc_basename,$host_cpu in
8633        pgcc*)				# Portland Group C compiler
8634	  _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'
8635	  tmp_addflag=' $pic_flag'
8636	  ;;
8637	pgf77* | pgf90* | pgf95* | pgfortran*)
8638					# Portland Group f77 and f90 compilers
8639	  _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'
8640	  tmp_addflag=' $pic_flag -Mnomain' ;;
8641	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
8642	  tmp_addflag=' -i_dynamic' ;;
8643	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
8644	  tmp_addflag=' -i_dynamic -nofor_main' ;;
8645	ifc* | ifort*)			# Intel Fortran compiler
8646	  tmp_addflag=' -nofor_main' ;;
8647	lf95*)				# Lahey Fortran 8.1
8648	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
8649	  tmp_sharedflag='--shared' ;;
8650        nagfor*)                        # NAGFOR 5.3
8651          tmp_sharedflag='-Wl,-shared' ;;
8652	xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
8653	  tmp_sharedflag='-qmkshrobj'
8654	  tmp_addflag= ;;
8655	nvcc*)	# Cuda Compiler Driver 2.2
8656	  _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'
8657	  _LT_TAGVAR(compiler_needs_object, $1)=yes
8658	  ;;
8659	esac
8660	case `$CC -V 2>&1 | $SED 5q` in
8661	*Sun\ C*)			# Sun C 5.9
8662	  _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'
8663	  _LT_TAGVAR(compiler_needs_object, $1)=yes
8664	  tmp_sharedflag='-G' ;;
8665	*Sun\ F*)			# Sun Fortran 8.3
8666	  tmp_sharedflag='-G' ;;
8667	esac
8668	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
8669
8670        if test yes = "$supports_anon_versioning"; then
8671          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
8672            cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
8673            echo "local: *; };" >> $output_objdir/$libname.ver~
8674            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
8675        fi
8676
8677	case $cc_basename in
8678	tcc*)
8679	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
8680	  ;;
8681	xlf* | bgf* | bgxlf* | mpixlf*)
8682	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
8683	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
8684	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
8685	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
8686	  if test yes = "$supports_anon_versioning"; then
8687	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
8688              cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
8689              echo "local: *; };" >> $output_objdir/$libname.ver~
8690              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
8691	  fi
8692	  ;;
8693	esac
8694      else
8695        _LT_TAGVAR(ld_shlibs, $1)=no
8696      fi
8697      ;;
8698
8699    netbsd*)
8700      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
8701	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
8702	wlarc=
8703      else
8704	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
8705	_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'
8706      fi
8707      ;;
8708
8709    solaris*)
8710      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
8711	_LT_TAGVAR(ld_shlibs, $1)=no
8712	cat <<_LT_EOF 1>&2
8713
8714*** Warning: The releases 2.8.* of the GNU linker cannot reliably
8715*** create shared libraries on Solaris systems.  Therefore, libtool
8716*** is disabling shared libraries support.  We urge you to upgrade GNU
8717*** binutils to release 2.9.1 or newer.  Another option is to modify
8718*** your PATH or compiler configuration so that the native linker is
8719*** used, and then restart.
8720
8721_LT_EOF
8722      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
8723	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
8724	_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'
8725      else
8726	_LT_TAGVAR(ld_shlibs, $1)=no
8727      fi
8728      ;;
8729
8730    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
8731      case `$LD -v 2>&1` in
8732        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
8733	_LT_TAGVAR(ld_shlibs, $1)=no
8734	cat <<_LT_EOF 1>&2
8735
8736*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
8737*** reliably create shared libraries on SCO systems.  Therefore, libtool
8738*** is disabling shared libraries support.  We urge you to upgrade GNU
8739*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
8740*** your PATH or compiler configuration so that the native linker is
8741*** used, and then restart.
8742
8743_LT_EOF
8744	;;
8745	*)
8746	  # For security reasons, it is highly recommended that you always
8747	  # use absolute paths for naming shared libraries, and exclude the
8748	  # DT_RUNPATH tag from executables and libraries.  But doing so
8749	  # requires that you compile everything twice, which is a pain.
8750	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
8751	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
8752	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
8753	    _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'
8754	  else
8755	    _LT_TAGVAR(ld_shlibs, $1)=no
8756	  fi
8757	;;
8758      esac
8759      ;;
8760
8761    sunos4*)
8762      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
8763      wlarc=
8764      _LT_TAGVAR(hardcode_direct, $1)=yes
8765      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8766      ;;
8767
8768    *)
8769      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
8770	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
8771	_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'
8772      else
8773	_LT_TAGVAR(ld_shlibs, $1)=no
8774      fi
8775      ;;
8776    esac
8777
8778    if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
8779      runpath_var=
8780      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8781      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
8782      _LT_TAGVAR(whole_archive_flag_spec, $1)=
8783    fi
8784  else
8785    # PORTME fill in a description of your system's linker (not GNU ld)
8786    case $host_os in
8787    aix3*)
8788      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
8789      _LT_TAGVAR(always_export_symbols, $1)=yes
8790      _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'
8791      # Note: this linker hardcodes the directories in LIBPATH if there
8792      # are no directories specified by -L.
8793      _LT_TAGVAR(hardcode_minus_L, $1)=yes
8794      if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
8795	# Neither direct hardcoding nor static linking is supported with a
8796	# broken collect2.
8797	_LT_TAGVAR(hardcode_direct, $1)=unsupported
8798      fi
8799      ;;
8800
8801    aix[[4-9]]*)
8802      if test ia64 = "$host_cpu"; then
8803	# On IA64, the linker does run time linking by default, so we don't
8804	# have to do anything special.
8805	aix_use_runtimelinking=no
8806	exp_sym_flag='-Bexport'
8807	no_entry_flag=
8808      else
8809	# If we're using GNU nm, then we don't want the "-C" option.
8810	# -C means demangle to GNU nm, but means don't demangle to AIX nm.
8811	# Without the "-l" option, or with the "-B" option, AIX nm treats
8812	# weak defined symbols like other global defined symbols, whereas
8813	# GNU nm marks them as "W".
8814	# While the 'weak' keyword is ignored in the Export File, we need
8815	# it in the Import File for the 'aix-soname' feature, so we have
8816	# to replace the "-B" option with "-P" for AIX nm.
8817	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
8818	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
8819	else
8820	  _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
8821	fi
8822	aix_use_runtimelinking=no
8823
8824	# Test if we are trying to use run time linking or normal
8825	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
8826	# have runtime linking enabled, and use it for executables.
8827	# For shared libraries, we enable/disable runtime linking
8828	# depending on the kind of the shared library created -
8829	# when "with_aix_soname,aix_use_runtimelinking" is:
8830	# "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
8831	# "aix,yes"  lib.so          shared, rtl:yes, for executables
8832	#            lib.a           static archive
8833	# "both,no"  lib.so.V(shr.o) shared, rtl:yes
8834	#            lib.a(lib.so.V) shared, rtl:no,  for executables
8835	# "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
8836	#            lib.a(lib.so.V) shared, rtl:no
8837	# "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
8838	#            lib.a           static archive
8839	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
8840	  for ld_flag in $LDFLAGS; do
8841	  if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
8842	    aix_use_runtimelinking=yes
8843	    break
8844	  fi
8845	  done
8846	  if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
8847	    # With aix-soname=svr4, we create the lib.so.V shared archives only,
8848	    # so we don't have lib.a shared libs to link our executables.
8849	    # We have to force runtime linking in this case.
8850	    aix_use_runtimelinking=yes
8851	    LDFLAGS="$LDFLAGS -Wl,-brtl"
8852	  fi
8853	  ;;
8854	esac
8855
8856	exp_sym_flag='-bexport'
8857	no_entry_flag='-bnoentry'
8858      fi
8859
8860      # When large executables or shared objects are built, AIX ld can
8861      # have problems creating the table of contents.  If linking a library
8862      # or program results in "error TOC overflow" add -mminimal-toc to
8863      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
8864      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
8865
8866      _LT_TAGVAR(archive_cmds, $1)=''
8867      _LT_TAGVAR(hardcode_direct, $1)=yes
8868      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
8869      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
8870      _LT_TAGVAR(link_all_deplibs, $1)=yes
8871      _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
8872      case $with_aix_soname,$aix_use_runtimelinking in
8873      aix,*) ;; # traditional, no import file
8874      svr4,* | *,yes) # use import file
8875	# The Import File defines what to hardcode.
8876	_LT_TAGVAR(hardcode_direct, $1)=no
8877	_LT_TAGVAR(hardcode_direct_absolute, $1)=no
8878	;;
8879      esac
8880
8881      if test yes = "$GCC"; then
8882	case $host_os in aix4.[[012]]|aix4.[[012]].*)
8883	# We only want to do this on AIX 4.2 and lower, the check
8884	# below for broken collect2 doesn't work under 4.3+
8885	  collect2name=`$CC -print-prog-name=collect2`
8886	  if test -f "$collect2name" &&
8887	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
8888	  then
8889	  # We have reworked collect2
8890	  :
8891	  else
8892	  # We have old collect2
8893	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
8894	  # It fails to find uninstalled libraries when the uninstalled
8895	  # path is not listed in the libpath.  Setting hardcode_minus_L
8896	  # to unsupported forces relinking
8897	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
8898	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8899	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
8900	  fi
8901	  ;;
8902	esac
8903	shared_flag='-shared'
8904	if test yes = "$aix_use_runtimelinking"; then
8905	  shared_flag="$shared_flag "'$wl-G'
8906	fi
8907	# Need to ensure runtime linking is disabled for the traditional
8908	# shared library, or the linker may eventually find shared libraries
8909	# /with/ Import File - we do not want to mix them.
8910	shared_flag_aix='-shared'
8911	shared_flag_svr4='-shared $wl-G'
8912      else
8913	# not using gcc
8914	if test ia64 = "$host_cpu"; then
8915	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
8916	# chokes on -Wl,-G. The following line is correct:
8917	  shared_flag='-G'
8918	else
8919	  if test yes = "$aix_use_runtimelinking"; then
8920	    shared_flag='$wl-G'
8921	  else
8922	    shared_flag='$wl-bM:SRE'
8923	  fi
8924	  shared_flag_aix='$wl-bM:SRE'
8925	  shared_flag_svr4='$wl-G'
8926	fi
8927      fi
8928
8929      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
8930      # It seems that -bexpall does not export symbols beginning with
8931      # underscore (_), so it is better to generate a list of symbols to export.
8932      _LT_TAGVAR(always_export_symbols, $1)=yes
8933      if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
8934	# Warning - without using the other runtime loading flags (-brtl),
8935	# -berok will link without error, but may produce a broken library.
8936	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
8937        # Determine the default libpath from the value encoded in an
8938        # empty executable.
8939        _LT_SYS_MODULE_PATH_AIX([$1])
8940        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
8941        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
8942      else
8943	if test ia64 = "$host_cpu"; then
8944	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
8945	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
8946	  _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"
8947	else
8948	 # Determine the default libpath from the value encoded in an
8949	 # empty executable.
8950	 _LT_SYS_MODULE_PATH_AIX([$1])
8951	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
8952	  # Warning - without using the other run time loading flags,
8953	  # -berok will link without error, but may produce a broken library.
8954	  _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
8955	  _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
8956	  if test yes = "$with_gnu_ld"; then
8957	    # We only use this code for GNU lds that support --whole-archive.
8958	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
8959	  else
8960	    # Exported symbols can be pulled into shared objects from archives
8961	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
8962	  fi
8963	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
8964	  _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
8965	  # -brtl affects multiple linker settings, -berok does not and is overridden later
8966	  compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
8967	  if test svr4 != "$with_aix_soname"; then
8968	    # This is similar to how AIX traditionally builds its shared libraries.
8969	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
8970	  fi
8971	  if test aix != "$with_aix_soname"; then
8972	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
8973	  else
8974	    # used by -dlpreopen to get the symbols
8975	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
8976	  fi
8977	  _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
8978	fi
8979      fi
8980      ;;
8981
8982    amigaos*)
8983      case $host_cpu in
8984      powerpc)
8985            # see comment about AmigaOS4 .so support
8986            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
8987            _LT_TAGVAR(archive_expsym_cmds, $1)=''
8988        ;;
8989      m68k)
8990            _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)'
8991            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8992            _LT_TAGVAR(hardcode_minus_L, $1)=yes
8993        ;;
8994      esac
8995      ;;
8996
8997    bsdi[[45]]*)
8998      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
8999      ;;
9000
9001    cygwin* | mingw* | pw32* | cegcc*)
9002      # When not using gcc, we currently assume that we are using
9003      # Microsoft Visual C++ or Intel C++ Compiler.
9004      # hardcode_libdir_flag_spec is actually meaningless, as there is
9005      # no search path for DLLs.
9006      case $cc_basename in
9007      cl* | icl*)
9008	# Native MSVC or ICC
9009	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
9010	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
9011	_LT_TAGVAR(always_export_symbols, $1)=yes
9012	_LT_TAGVAR(file_list_spec, $1)='@'
9013	# Tell ltmain to make .lib files, not .a files.
9014	libext=lib
9015	# Tell ltmain to make .dll files, not .so files.
9016	shrext_cmds=.dll
9017	# FIXME: Setting linknames here is a bad hack.
9018	_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
9019	_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
9020            cp "$export_symbols" "$output_objdir/$soname.def";
9021            echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
9022          else
9023            $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
9024          fi~
9025          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
9026          linknames='
9027	# The linker will not automatically build a static lib if we build a DLL.
9028	# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
9029	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
9030	_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
9031	_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'
9032	# Don't use ranlib
9033	_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
9034	_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
9035          lt_tool_outputfile="@TOOL_OUTPUT@"~
9036          case $lt_outputfile in
9037            *.exe|*.EXE) ;;
9038            *)
9039              lt_outputfile=$lt_outputfile.exe
9040              lt_tool_outputfile=$lt_tool_outputfile.exe
9041              ;;
9042          esac~
9043          if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
9044            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
9045            $RM "$lt_outputfile.manifest";
9046          fi'
9047	;;
9048      *)
9049	# Assume MSVC and ICC wrapper
9050	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
9051	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
9052	# Tell ltmain to make .lib files, not .a files.
9053	libext=lib
9054	# Tell ltmain to make .dll files, not .so files.
9055	shrext_cmds=.dll
9056	# FIXME: Setting linknames here is a bad hack.
9057	_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
9058	# The linker will automatically build a .lib file if we build a DLL.
9059	_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
9060	# FIXME: Should let the user specify the lib program.
9061	_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
9062	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
9063	;;
9064      esac
9065      ;;
9066
9067    darwin* | rhapsody*)
9068      _LT_DARWIN_LINKER_FEATURES($1)
9069      ;;
9070
9071    dgux*)
9072      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9073      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
9074      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9075      ;;
9076
9077    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
9078    # support.  Future versions do this automatically, but an explicit c++rt0.o
9079    # does not break anything, and helps significantly (at the cost of a little
9080    # extra space).
9081    freebsd2.2*)
9082      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
9083      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
9084      _LT_TAGVAR(hardcode_direct, $1)=yes
9085      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9086      ;;
9087
9088    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
9089    freebsd2.*)
9090      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
9091      _LT_TAGVAR(hardcode_direct, $1)=yes
9092      _LT_TAGVAR(hardcode_minus_L, $1)=yes
9093      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9094      ;;
9095
9096    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
9097    freebsd* | dragonfly* | midnightbsd*)
9098      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
9099      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
9100      _LT_TAGVAR(hardcode_direct, $1)=yes
9101      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9102      ;;
9103
9104    hpux9*)
9105      if test yes = "$GCC"; then
9106	_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 "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
9107      else
9108	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
9109      fi
9110      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
9111      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
9112      _LT_TAGVAR(hardcode_direct, $1)=yes
9113
9114      # hardcode_minus_L: Not really in the search PATH,
9115      # but as the default location of the library.
9116      _LT_TAGVAR(hardcode_minus_L, $1)=yes
9117      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
9118      ;;
9119
9120    hpux10*)
9121      if test yes,no = "$GCC,$with_gnu_ld"; then
9122	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
9123      else
9124	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
9125      fi
9126      if test no = "$with_gnu_ld"; then
9127	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
9128	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
9129	_LT_TAGVAR(hardcode_direct, $1)=yes
9130	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
9131	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
9132	# hardcode_minus_L: Not really in the search PATH,
9133	# but as the default location of the library.
9134	_LT_TAGVAR(hardcode_minus_L, $1)=yes
9135      fi
9136      ;;
9137
9138    hpux11*)
9139      if test yes,no = "$GCC,$with_gnu_ld"; then
9140	case $host_cpu in
9141	hppa*64*)
9142	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
9143	  ;;
9144	ia64*)
9145	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
9146	  ;;
9147	*)
9148	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
9149	  ;;
9150	esac
9151      else
9152	case $host_cpu in
9153	hppa*64*)
9154	  _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
9155	  ;;
9156	ia64*)
9157	  _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
9158	  ;;
9159	*)
9160	m4_if($1, [], [
9161	  # Older versions of the 11.00 compiler do not understand -b yet
9162	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
9163	  _LT_LINKER_OPTION([if $CC understands -b],
9164	    _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
9165	    [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
9166	    [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
9167	  [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
9168	  ;;
9169	esac
9170      fi
9171      if test no = "$with_gnu_ld"; then
9172	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
9173	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
9174
9175	case $host_cpu in
9176	hppa*64*|ia64*)
9177	  _LT_TAGVAR(hardcode_direct, $1)=no
9178	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9179	  ;;
9180	*)
9181	  _LT_TAGVAR(hardcode_direct, $1)=yes
9182	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
9183	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
9184
9185	  # hardcode_minus_L: Not really in the search PATH,
9186	  # but as the default location of the library.
9187	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
9188	  ;;
9189	esac
9190      fi
9191      ;;
9192
9193    irix5* | irix6* | nonstopux*)
9194      if test yes = "$GCC"; then
9195	_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'
9196	# Try to use the -exported_symbol ld option, if it does not
9197	# work, assume that -exports_file does not work either and
9198	# implicitly export all symbols.
9199	# This should be the same for all languages, so no per-tag cache variable.
9200	AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
9201	  [lt_cv_irix_exported_symbol],
9202	  [save_LDFLAGS=$LDFLAGS
9203	   LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
9204	   AC_LINK_IFELSE(
9205	     [AC_LANG_SOURCE(
9206	        [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
9207			      [C++], [[int foo (void) { return 0; }]],
9208			      [Fortran 77], [[
9209      subroutine foo
9210      end]],
9211			      [Fortran], [[
9212      subroutine foo
9213      end]])])],
9214	      [lt_cv_irix_exported_symbol=yes],
9215	      [lt_cv_irix_exported_symbol=no])
9216           LDFLAGS=$save_LDFLAGS])
9217	if test yes = "$lt_cv_irix_exported_symbol"; then
9218          _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'
9219	fi
9220      else
9221	_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'
9222	_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'
9223      fi
9224      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
9225      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
9226      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
9227      _LT_TAGVAR(inherit_rpath, $1)=yes
9228      _LT_TAGVAR(link_all_deplibs, $1)=yes
9229      ;;
9230
9231    linux*)
9232      case $cc_basename in
9233      tcc*)
9234	# Fabrice Bellard et al's Tiny C Compiler
9235	_LT_TAGVAR(ld_shlibs, $1)=yes
9236	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
9237	;;
9238      esac
9239      ;;
9240
9241    netbsd*)
9242      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
9243	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
9244      else
9245	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
9246      fi
9247      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
9248      _LT_TAGVAR(hardcode_direct, $1)=yes
9249      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9250      ;;
9251
9252    newsos6)
9253      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9254      _LT_TAGVAR(hardcode_direct, $1)=yes
9255      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
9256      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
9257      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9258      ;;
9259
9260    *nto* | *qnx*)
9261      ;;
9262
9263    openbsd* | bitrig*)
9264      if test -f /usr/libexec/ld.so; then
9265	_LT_TAGVAR(hardcode_direct, $1)=yes
9266	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9267	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
9268	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
9269	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
9270	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
9271	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
9272	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
9273	else
9274	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
9275	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
9276	fi
9277      else
9278	_LT_TAGVAR(ld_shlibs, $1)=no
9279      fi
9280      ;;
9281
9282    os2*)
9283      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
9284      _LT_TAGVAR(hardcode_minus_L, $1)=yes
9285      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
9286      shrext_cmds=.dll
9287      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
9288	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
9289	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
9290	$ECHO EXPORTS >> $output_objdir/$libname.def~
9291	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
9292	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
9293	emximp -o $lib $output_objdir/$libname.def'
9294      _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
9295	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
9296	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
9297	$ECHO EXPORTS >> $output_objdir/$libname.def~
9298	prefix_cmds="$SED"~
9299	if test EXPORTS = "`$SED 1q $export_symbols`"; then
9300	  prefix_cmds="$prefix_cmds -e 1d";
9301	fi~
9302	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
9303	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
9304	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
9305	emximp -o $lib $output_objdir/$libname.def'
9306      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
9307      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
9308      _LT_TAGVAR(file_list_spec, $1)='@'
9309      ;;
9310
9311    osf3*)
9312      if test yes = "$GCC"; then
9313	_LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
9314	_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'
9315      else
9316	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
9317	_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'
9318      fi
9319      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
9320      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
9321      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
9322      ;;
9323
9324    osf4* | osf5*)	# as osf3* with the addition of -msym flag
9325      if test yes = "$GCC"; then
9326	_LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
9327	_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'
9328	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
9329      else
9330	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
9331	_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'
9332	_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~
9333          $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'
9334
9335	# Both c and cxx compiler support -rpath directly
9336	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
9337      fi
9338      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
9339      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
9340      ;;
9341
9342    solaris*)
9343      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
9344      if test yes = "$GCC"; then
9345	wlarc='$wl'
9346	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
9347	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
9348          $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'
9349      else
9350	case `$CC -V 2>&1` in
9351	*"Compilers 5.0"*)
9352	  wlarc=''
9353	  _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
9354	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
9355            $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
9356	  ;;
9357	*)
9358	  wlarc='$wl'
9359	  _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
9360	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
9361            $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
9362	  ;;
9363	esac
9364      fi
9365      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
9366      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9367      case $host_os in
9368      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
9369      *)
9370	# The compiler driver will combine and reorder linker options,
9371	# but understands '-z linker_flag'.  GCC discards it without '$wl',
9372	# but is careful enough not to reorder.
9373	# Supported since Solaris 2.6 (maybe 2.5.1?)
9374	if test yes = "$GCC"; then
9375	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
9376	else
9377	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
9378	fi
9379	;;
9380      esac
9381      _LT_TAGVAR(link_all_deplibs, $1)=yes
9382      ;;
9383
9384    sunos4*)
9385      if test sequent = "$host_vendor"; then
9386	# Use $CC to link under sequent, because it throws in some extra .o
9387	# files that make .init and .fini sections work.
9388	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
9389      else
9390	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
9391      fi
9392      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
9393      _LT_TAGVAR(hardcode_direct, $1)=yes
9394      _LT_TAGVAR(hardcode_minus_L, $1)=yes
9395      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9396      ;;
9397
9398    sysv4)
9399      case $host_vendor in
9400	sni)
9401	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9402	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
9403	;;
9404	siemens)
9405	  ## LD is ld it makes a PLAMLIB
9406	  ## CC just makes a GrossModule.
9407	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
9408	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
9409	  _LT_TAGVAR(hardcode_direct, $1)=no
9410        ;;
9411	motorola)
9412	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9413	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
9414	;;
9415      esac
9416      runpath_var='LD_RUN_PATH'
9417      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9418      ;;
9419
9420    sysv4.3*)
9421      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9422      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9423      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
9424      ;;
9425
9426    sysv4*MP*)
9427      if test -d /usr/nec; then
9428	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9429	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9430	runpath_var=LD_RUN_PATH
9431	hardcode_runpath_var=yes
9432	_LT_TAGVAR(ld_shlibs, $1)=yes
9433      fi
9434      ;;
9435
9436    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
9437      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
9438      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
9439      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9440      runpath_var='LD_RUN_PATH'
9441
9442      if test yes = "$GCC"; then
9443	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9444	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9445      else
9446	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9447	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9448      fi
9449      ;;
9450
9451    sysv5* | sco3.2v5* | sco5v6*)
9452      # Note: We CANNOT use -z defs as we might desire, because we do not
9453      # link with -lc, and that would cause any symbols used from libc to
9454      # always be unresolved, which means just about no library would
9455      # ever link correctly.  If we're not using GNU ld we use -z text
9456      # though, which does catch some bad symbols but isn't as heavy-handed
9457      # as -z defs.
9458      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
9459      _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
9460      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
9461      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9462      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
9463      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
9464      _LT_TAGVAR(link_all_deplibs, $1)=yes
9465      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
9466      runpath_var='LD_RUN_PATH'
9467
9468      if test yes = "$GCC"; then
9469	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9470	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9471      else
9472	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9473	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9474      fi
9475      ;;
9476
9477    uts4*)
9478      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9479      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
9480      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9481      ;;
9482
9483    *)
9484      _LT_TAGVAR(ld_shlibs, $1)=no
9485      ;;
9486    esac
9487
9488    if test sni = "$host_vendor"; then
9489      case $host in
9490      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
9491	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
9492	;;
9493      esac
9494    fi
9495  fi
9496])
9497AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
9498test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
9499
9500_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
9501
9502_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
9503_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
9504_LT_DECL([], [extract_expsyms_cmds], [2],
9505    [The commands to extract the exported symbol list from a shared archive])
9506
9507#
9508# Do we need to explicitly link libc?
9509#
9510case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
9511x|xyes)
9512  # Assume -lc should be added
9513  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
9514
9515  if test yes,yes = "$GCC,$enable_shared"; then
9516    case $_LT_TAGVAR(archive_cmds, $1) in
9517    *'~'*)
9518      # FIXME: we may have to deal with multi-command sequences.
9519      ;;
9520    '$CC '*)
9521      # Test whether the compiler implicitly links with -lc since on some
9522      # systems, -lgcc has to come before -lc. If gcc already passes -lc
9523      # to ld, don't add -lc before -lgcc.
9524      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
9525	[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
9526	[$RM conftest*
9527	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
9528
9529	if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
9530	  soname=conftest
9531	  lib=conftest
9532	  libobjs=conftest.$ac_objext
9533	  deplibs=
9534	  wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
9535	  pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
9536	  compiler_flags=-v
9537	  linker_flags=-v
9538	  verstring=
9539	  output_objdir=.
9540	  libname=conftest
9541	  lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
9542	  _LT_TAGVAR(allow_undefined_flag, $1)=
9543	  if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
9544	  then
9545	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
9546	  else
9547	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
9548	  fi
9549	  _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
9550	else
9551	  cat conftest.err 1>&5
9552	fi
9553	$RM conftest*
9554	])
9555      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
9556      ;;
9557    esac
9558  fi
9559  ;;
9560esac
9561
9562_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
9563    [Whether or not to add -lc for building shared libraries])
9564_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
9565    [enable_shared_with_static_runtimes], [0],
9566    [Whether or not to disallow shared libs when runtime libs are static])
9567_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
9568    [Compiler flag to allow reflexive dlopens])
9569_LT_TAGDECL([], [whole_archive_flag_spec], [1],
9570    [Compiler flag to generate shared objects directly from archives])
9571_LT_TAGDECL([], [compiler_needs_object], [1],
9572    [Whether the compiler copes with passing no objects directly])
9573_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
9574    [Create an old-style archive from a shared archive])
9575_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
9576    [Create a temporary old-style archive to link instead of a shared archive])
9577_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
9578_LT_TAGDECL([], [archive_expsym_cmds], [2])
9579_LT_TAGDECL([], [module_cmds], [2],
9580    [Commands used to build a loadable module if different from building
9581    a shared archive.])
9582_LT_TAGDECL([], [module_expsym_cmds], [2])
9583_LT_TAGDECL([], [with_gnu_ld], [1],
9584    [Whether we are building with GNU ld or not])
9585_LT_TAGDECL([], [allow_undefined_flag], [1],
9586    [Flag that allows shared libraries with undefined symbols to be built])
9587_LT_TAGDECL([], [no_undefined_flag], [1],
9588    [Flag that enforces no undefined symbols])
9589_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
9590    [Flag to hardcode $libdir into a binary during linking.
9591    This must work even if $libdir does not exist])
9592_LT_TAGDECL([], [hardcode_libdir_separator], [1],
9593    [Whether we need a single "-rpath" flag with a separated argument])
9594_LT_TAGDECL([], [hardcode_direct], [0],
9595    [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
9596    DIR into the resulting binary])
9597_LT_TAGDECL([], [hardcode_direct_absolute], [0],
9598    [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
9599    DIR into the resulting binary and the resulting library dependency is
9600    "absolute", i.e impossible to change by setting $shlibpath_var if the
9601    library is relocated])
9602_LT_TAGDECL([], [hardcode_minus_L], [0],
9603    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
9604    into the resulting binary])
9605_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
9606    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
9607    into the resulting binary])
9608_LT_TAGDECL([], [hardcode_automatic], [0],
9609    [Set to "yes" if building a shared library automatically hardcodes DIR
9610    into the library and all subsequent libraries and executables linked
9611    against it])
9612_LT_TAGDECL([], [inherit_rpath], [0],
9613    [Set to yes if linker adds runtime paths of dependent libraries
9614    to runtime path list])
9615_LT_TAGDECL([], [link_all_deplibs], [0],
9616    [Whether libtool must link a program against all its dependency libraries])
9617_LT_TAGDECL([], [always_export_symbols], [0],
9618    [Set to "yes" if exported symbols are required])
9619_LT_TAGDECL([], [export_symbols_cmds], [2],
9620    [The commands to list exported symbols])
9621_LT_TAGDECL([], [exclude_expsyms], [1],
9622    [Symbols that should not be listed in the preloaded symbols])
9623_LT_TAGDECL([], [include_expsyms], [1],
9624    [Symbols that must always be exported])
9625_LT_TAGDECL([], [prelink_cmds], [2],
9626    [Commands necessary for linking programs (against libraries) with templates])
9627_LT_TAGDECL([], [postlink_cmds], [2],
9628    [Commands necessary for finishing linking programs])
9629_LT_TAGDECL([], [file_list_spec], [1],
9630    [Specify filename containing input files])
9631dnl FIXME: Not yet implemented
9632dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
9633dnl    [Compiler flag to generate thread safe objects])
9634])# _LT_LINKER_SHLIBS
9635
9636
9637# _LT_LANG_C_CONFIG([TAG])
9638# ------------------------
9639# Ensure that the configuration variables for a C compiler are suitably
9640# defined.  These variables are subsequently used by _LT_CONFIG to write
9641# the compiler configuration to 'libtool'.
9642m4_defun([_LT_LANG_C_CONFIG],
9643[m4_require([_LT_DECL_EGREP])dnl
9644lt_save_CC=$CC
9645AC_LANG_PUSH(C)
9646
9647# Source file extension for C test sources.
9648ac_ext=c
9649
9650# Object file extension for compiled C test sources.
9651objext=o
9652_LT_TAGVAR(objext, $1)=$objext
9653
9654# Code to be used in simple compile tests
9655lt_simple_compile_test_code="int some_variable = 0;"
9656
9657# Code to be used in simple link tests
9658lt_simple_link_test_code='int main(){return(0);}'
9659
9660_LT_TAG_COMPILER
9661# Save the default compiler, since it gets overwritten when the other
9662# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
9663compiler_DEFAULT=$CC
9664
9665# save warnings/boilerplate of simple test code
9666_LT_COMPILER_BOILERPLATE
9667_LT_LINKER_BOILERPLATE
9668
9669if test -n "$compiler"; then
9670  _LT_COMPILER_NO_RTTI($1)
9671  _LT_COMPILER_PIC($1)
9672  _LT_COMPILER_C_O($1)
9673  _LT_COMPILER_FILE_LOCKS($1)
9674  _LT_LINKER_SHLIBS($1)
9675  _LT_SYS_DYNAMIC_LINKER($1)
9676  _LT_LINKER_HARDCODE_LIBPATH($1)
9677  LT_SYS_DLOPEN_SELF
9678  _LT_CMD_STRIPLIB
9679
9680  # Report what library types will actually be built
9681  AC_MSG_CHECKING([if libtool supports shared libraries])
9682  AC_MSG_RESULT([$can_build_shared])
9683
9684  AC_MSG_CHECKING([whether to build shared libraries])
9685  test no = "$can_build_shared" && enable_shared=no
9686
9687  # On AIX, shared libraries and static libraries use the same namespace, and
9688  # are all built from PIC.
9689  case $host_os in
9690  aix3*)
9691    test yes = "$enable_shared" && enable_static=no
9692    if test -n "$RANLIB"; then
9693      archive_cmds="$archive_cmds~\$RANLIB \$lib"
9694      postinstall_cmds='$RANLIB $lib'
9695    fi
9696    ;;
9697
9698  aix[[4-9]]*)
9699    if test ia64 != "$host_cpu"; then
9700      case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
9701      yes,aix,yes) ;;			# shared object as lib.so file only
9702      yes,svr4,*) ;;			# shared object as lib.so archive member only
9703      yes,*) enable_static=no ;;	# shared object in lib.a archive as well
9704      esac
9705    fi
9706    ;;
9707  esac
9708  AC_MSG_RESULT([$enable_shared])
9709
9710  AC_MSG_CHECKING([whether to build static libraries])
9711  # Make sure either enable_shared or enable_static is yes.
9712  test yes = "$enable_shared" || enable_static=yes
9713  AC_MSG_RESULT([$enable_static])
9714
9715  _LT_CONFIG($1)
9716fi
9717AC_LANG_POP
9718CC=$lt_save_CC
9719])# _LT_LANG_C_CONFIG
9720
9721
9722# _LT_LANG_CXX_CONFIG([TAG])
9723# --------------------------
9724# Ensure that the configuration variables for a C++ compiler are suitably
9725# defined.  These variables are subsequently used by _LT_CONFIG to write
9726# the compiler configuration to 'libtool'.
9727m4_defun([_LT_LANG_CXX_CONFIG],
9728[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
9729m4_require([_LT_DECL_EGREP])dnl
9730m4_require([_LT_PATH_MANIFEST_TOOL])dnl
9731if test -n "$CXX" && ( test no != "$CXX" &&
9732    ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
9733    (test g++ != "$CXX"))); then
9734  AC_PROG_CXXCPP
9735else
9736  _lt_caught_CXX_error=yes
9737fi
9738
9739AC_LANG_PUSH(C++)
9740_LT_TAGVAR(archive_cmds_need_lc, $1)=no
9741_LT_TAGVAR(allow_undefined_flag, $1)=
9742_LT_TAGVAR(always_export_symbols, $1)=no
9743_LT_TAGVAR(archive_expsym_cmds, $1)=
9744_LT_TAGVAR(compiler_needs_object, $1)=no
9745_LT_TAGVAR(export_dynamic_flag_spec, $1)=
9746_LT_TAGVAR(hardcode_direct, $1)=no
9747_LT_TAGVAR(hardcode_direct_absolute, $1)=no
9748_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
9749_LT_TAGVAR(hardcode_libdir_separator, $1)=
9750_LT_TAGVAR(hardcode_minus_L, $1)=no
9751_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
9752_LT_TAGVAR(hardcode_automatic, $1)=no
9753_LT_TAGVAR(inherit_rpath, $1)=no
9754_LT_TAGVAR(module_cmds, $1)=
9755_LT_TAGVAR(module_expsym_cmds, $1)=
9756_LT_TAGVAR(link_all_deplibs, $1)=unknown
9757_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
9758_LT_TAGVAR(reload_flag, $1)=$reload_flag
9759_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
9760_LT_TAGVAR(no_undefined_flag, $1)=
9761_LT_TAGVAR(whole_archive_flag_spec, $1)=
9762_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
9763
9764# Source file extension for C++ test sources.
9765ac_ext=cpp
9766
9767# Object file extension for compiled C++ test sources.
9768objext=o
9769_LT_TAGVAR(objext, $1)=$objext
9770
9771# No sense in running all these tests if we already determined that
9772# the CXX compiler isn't working.  Some variables (like enable_shared)
9773# are currently assumed to apply to all compilers on this platform,
9774# and will be corrupted by setting them based on a non-working compiler.
9775if test yes != "$_lt_caught_CXX_error"; then
9776  # Code to be used in simple compile tests
9777  lt_simple_compile_test_code="int some_variable = 0;"
9778
9779  # Code to be used in simple link tests
9780  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
9781
9782  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
9783  _LT_TAG_COMPILER
9784
9785  # save warnings/boilerplate of simple test code
9786  _LT_COMPILER_BOILERPLATE
9787  _LT_LINKER_BOILERPLATE
9788
9789  # Allow CC to be a program name with arguments.
9790  lt_save_CC=$CC
9791  lt_save_CFLAGS=$CFLAGS
9792  lt_save_LD=$LD
9793  lt_save_GCC=$GCC
9794  GCC=$GXX
9795  lt_save_with_gnu_ld=$with_gnu_ld
9796  lt_save_path_LD=$lt_cv_path_LD
9797  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
9798    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
9799  else
9800    $as_unset lt_cv_prog_gnu_ld
9801  fi
9802  if test -n "${lt_cv_path_LDCXX+set}"; then
9803    lt_cv_path_LD=$lt_cv_path_LDCXX
9804  else
9805    $as_unset lt_cv_path_LD
9806  fi
9807  test -z "${LDCXX+set}" || LD=$LDCXX
9808  CC=${CXX-"c++"}
9809  CFLAGS=$CXXFLAGS
9810  compiler=$CC
9811  _LT_TAGVAR(compiler, $1)=$CC
9812  _LT_CC_BASENAME([$compiler])
9813
9814  if test -n "$compiler"; then
9815    # We don't want -fno-exception when compiling C++ code, so set the
9816    # no_builtin_flag separately
9817    if test yes = "$GXX"; then
9818      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
9819    else
9820      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
9821    fi
9822
9823    if test yes = "$GXX"; then
9824      # Set up default GNU C++ configuration
9825
9826      LT_PATH_LD
9827
9828      # Check if GNU C++ uses GNU ld as the underlying linker, since the
9829      # archiving commands below assume that GNU ld is being used.
9830      if test yes = "$with_gnu_ld"; then
9831        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
9832        _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'
9833
9834        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
9835        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
9836
9837        # If archive_cmds runs LD, not CC, wlarc should be empty
9838        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
9839        #     investigate it a little bit more. (MM)
9840        wlarc='$wl'
9841
9842        # ancient GNU ld didn't support --whole-archive et. al.
9843        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
9844	  $GREP 'no-whole-archive' > /dev/null; then
9845          _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
9846        else
9847          _LT_TAGVAR(whole_archive_flag_spec, $1)=
9848        fi
9849      else
9850        with_gnu_ld=no
9851        wlarc=
9852
9853        # A generic and very simple default shared library creation
9854        # command for GNU C++ for the case where it uses the native
9855        # linker, instead of GNU ld.  If possible, this setting should
9856        # overridden to take advantage of the native linker features on
9857        # the platform it is being used on.
9858        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
9859      fi
9860
9861      # Commands to make compiler produce verbose output that lists
9862      # what "hidden" libraries, object files and flags are used when
9863      # linking a shared library.
9864      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
9865
9866    else
9867      GXX=no
9868      with_gnu_ld=no
9869      wlarc=
9870    fi
9871
9872    # PORTME: fill in a description of your system's C++ link characteristics
9873    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
9874    _LT_TAGVAR(ld_shlibs, $1)=yes
9875    case $host_os in
9876      aix3*)
9877        # FIXME: insert proper C++ library support
9878        _LT_TAGVAR(ld_shlibs, $1)=no
9879        ;;
9880      aix[[4-9]]*)
9881        if test ia64 = "$host_cpu"; then
9882          # On IA64, the linker does run time linking by default, so we don't
9883          # have to do anything special.
9884          aix_use_runtimelinking=no
9885          exp_sym_flag='-Bexport'
9886          no_entry_flag=
9887        else
9888          aix_use_runtimelinking=no
9889
9890          # Test if we are trying to use run time linking or normal
9891          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
9892          # have runtime linking enabled, and use it for executables.
9893          # For shared libraries, we enable/disable runtime linking
9894          # depending on the kind of the shared library created -
9895          # when "with_aix_soname,aix_use_runtimelinking" is:
9896          # "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
9897          # "aix,yes"  lib.so          shared, rtl:yes, for executables
9898          #            lib.a           static archive
9899          # "both,no"  lib.so.V(shr.o) shared, rtl:yes
9900          #            lib.a(lib.so.V) shared, rtl:no,  for executables
9901          # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
9902          #            lib.a(lib.so.V) shared, rtl:no
9903          # "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
9904          #            lib.a           static archive
9905          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
9906	    for ld_flag in $LDFLAGS; do
9907	      case $ld_flag in
9908	      *-brtl*)
9909	        aix_use_runtimelinking=yes
9910	        break
9911	        ;;
9912	      esac
9913	    done
9914	    if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
9915	      # With aix-soname=svr4, we create the lib.so.V shared archives only,
9916	      # so we don't have lib.a shared libs to link our executables.
9917	      # We have to force runtime linking in this case.
9918	      aix_use_runtimelinking=yes
9919	      LDFLAGS="$LDFLAGS -Wl,-brtl"
9920	    fi
9921	    ;;
9922          esac
9923
9924          exp_sym_flag='-bexport'
9925          no_entry_flag='-bnoentry'
9926        fi
9927
9928        # When large executables or shared objects are built, AIX ld can
9929        # have problems creating the table of contents.  If linking a library
9930        # or program results in "error TOC overflow" add -mminimal-toc to
9931        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
9932        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
9933
9934        _LT_TAGVAR(archive_cmds, $1)=''
9935        _LT_TAGVAR(hardcode_direct, $1)=yes
9936        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
9937        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
9938        _LT_TAGVAR(link_all_deplibs, $1)=yes
9939        _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
9940        case $with_aix_soname,$aix_use_runtimelinking in
9941        aix,*) ;;	# no import file
9942        svr4,* | *,yes) # use import file
9943          # The Import File defines what to hardcode.
9944          _LT_TAGVAR(hardcode_direct, $1)=no
9945          _LT_TAGVAR(hardcode_direct_absolute, $1)=no
9946          ;;
9947        esac
9948
9949        if test yes = "$GXX"; then
9950          case $host_os in aix4.[[012]]|aix4.[[012]].*)
9951          # We only want to do this on AIX 4.2 and lower, the check
9952          # below for broken collect2 doesn't work under 4.3+
9953	  collect2name=`$CC -print-prog-name=collect2`
9954	  if test -f "$collect2name" &&
9955	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
9956	  then
9957	    # We have reworked collect2
9958	    :
9959	  else
9960	    # We have old collect2
9961	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
9962	    # It fails to find uninstalled libraries when the uninstalled
9963	    # path is not listed in the libpath.  Setting hardcode_minus_L
9964	    # to unsupported forces relinking
9965	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
9966	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
9967	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
9968	  fi
9969          esac
9970          shared_flag='-shared'
9971	  if test yes = "$aix_use_runtimelinking"; then
9972	    shared_flag=$shared_flag' $wl-G'
9973	  fi
9974	  # Need to ensure runtime linking is disabled for the traditional
9975	  # shared library, or the linker may eventually find shared libraries
9976	  # /with/ Import File - we do not want to mix them.
9977	  shared_flag_aix='-shared'
9978	  shared_flag_svr4='-shared $wl-G'
9979        else
9980          # not using gcc
9981          if test ia64 = "$host_cpu"; then
9982	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
9983	  # chokes on -Wl,-G. The following line is correct:
9984	  shared_flag='-G'
9985          else
9986	    if test yes = "$aix_use_runtimelinking"; then
9987	      shared_flag='$wl-G'
9988	    else
9989	      shared_flag='$wl-bM:SRE'
9990	    fi
9991	    shared_flag_aix='$wl-bM:SRE'
9992	    shared_flag_svr4='$wl-G'
9993          fi
9994        fi
9995
9996        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
9997        # It seems that -bexpall does not export symbols beginning with
9998        # underscore (_), so it is better to generate a list of symbols to
9999	# export.
10000        _LT_TAGVAR(always_export_symbols, $1)=yes
10001	if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
10002          # Warning - without using the other runtime loading flags (-brtl),
10003          # -berok will link without error, but may produce a broken library.
10004          # The "-G" linker flag allows undefined symbols.
10005          _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
10006          # Determine the default libpath from the value encoded in an empty
10007          # executable.
10008          _LT_SYS_MODULE_PATH_AIX([$1])
10009          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
10010
10011          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
10012        else
10013          if test ia64 = "$host_cpu"; then
10014	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
10015	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
10016	    _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"
10017          else
10018	    # Determine the default libpath from the value encoded in an
10019	    # empty executable.
10020	    _LT_SYS_MODULE_PATH_AIX([$1])
10021	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
10022	    # Warning - without using the other run time loading flags,
10023	    # -berok will link without error, but may produce a broken library.
10024	    _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
10025	    _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
10026	    if test yes = "$with_gnu_ld"; then
10027	      # We only use this code for GNU lds that support --whole-archive.
10028	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
10029	    else
10030	      # Exported symbols can be pulled into shared objects from archives
10031	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
10032	    fi
10033	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
10034	    _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
10035	    # -brtl affects multiple linker settings, -berok does not and is overridden later
10036	    compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
10037	    if test svr4 != "$with_aix_soname"; then
10038	      # This is similar to how AIX traditionally builds its shared
10039	      # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
10040	      _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
10041	    fi
10042	    if test aix != "$with_aix_soname"; then
10043	      _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
10044	    else
10045	      # used by -dlpreopen to get the symbols
10046	      _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
10047	    fi
10048	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
10049          fi
10050        fi
10051        ;;
10052
10053      beos*)
10054	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
10055	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
10056	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
10057	  # support --undefined.  This deserves some investigation.  FIXME
10058	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
10059	else
10060	  _LT_TAGVAR(ld_shlibs, $1)=no
10061	fi
10062	;;
10063
10064      chorus*)
10065        case $cc_basename in
10066          *)
10067	  # FIXME: insert proper C++ library support
10068	  _LT_TAGVAR(ld_shlibs, $1)=no
10069	  ;;
10070        esac
10071        ;;
10072
10073      cygwin* | mingw* | pw32* | cegcc*)
10074	case $GXX,$cc_basename in
10075	,cl* | no,cl* | ,icl* | no,icl*)
10076	  # Native MSVC or ICC
10077	  # hardcode_libdir_flag_spec is actually meaningless, as there is
10078	  # no search path for DLLs.
10079	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
10080	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
10081	  _LT_TAGVAR(always_export_symbols, $1)=yes
10082	  _LT_TAGVAR(file_list_spec, $1)='@'
10083	  # Tell ltmain to make .lib files, not .a files.
10084	  libext=lib
10085	  # Tell ltmain to make .dll files, not .so files.
10086	  shrext_cmds=.dll
10087	  # FIXME: Setting linknames here is a bad hack.
10088	  _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
10089	  _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
10090              cp "$export_symbols" "$output_objdir/$soname.def";
10091              echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
10092            else
10093              $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
10094            fi~
10095            $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
10096            linknames='
10097	  # The linker will not automatically build a static lib if we build a DLL.
10098	  # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
10099	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
10100	  # Don't use ranlib
10101	  _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
10102	  _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
10103            lt_tool_outputfile="@TOOL_OUTPUT@"~
10104            case $lt_outputfile in
10105              *.exe|*.EXE) ;;
10106              *)
10107                lt_outputfile=$lt_outputfile.exe
10108                lt_tool_outputfile=$lt_tool_outputfile.exe
10109                ;;
10110            esac~
10111            func_to_tool_file "$lt_outputfile"~
10112            if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
10113              $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
10114              $RM "$lt_outputfile.manifest";
10115            fi'
10116	  ;;
10117	*)
10118	  # g++
10119	  # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
10120	  # as there is no search path for DLLs.
10121	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10122	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
10123	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
10124	  _LT_TAGVAR(always_export_symbols, $1)=no
10125	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
10126
10127	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
10128	    _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'
10129	    # If the export-symbols file already is a .def file, use it as
10130	    # is; otherwise, prepend EXPORTS...
10131	    _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
10132              cp $export_symbols $output_objdir/$soname.def;
10133            else
10134              echo EXPORTS > $output_objdir/$soname.def;
10135              cat $export_symbols >> $output_objdir/$soname.def;
10136            fi~
10137            $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'
10138	  else
10139	    _LT_TAGVAR(ld_shlibs, $1)=no
10140	  fi
10141	  ;;
10142	esac
10143	;;
10144      darwin* | rhapsody*)
10145        _LT_DARWIN_LINKER_FEATURES($1)
10146	;;
10147
10148      os2*)
10149	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10150	_LT_TAGVAR(hardcode_minus_L, $1)=yes
10151	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
10152	shrext_cmds=.dll
10153	_LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
10154	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
10155	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
10156	  $ECHO EXPORTS >> $output_objdir/$libname.def~
10157	  emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
10158	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
10159	  emximp -o $lib $output_objdir/$libname.def'
10160	_LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
10161	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
10162	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
10163	  $ECHO EXPORTS >> $output_objdir/$libname.def~
10164	  prefix_cmds="$SED"~
10165	  if test EXPORTS = "`$SED 1q $export_symbols`"; then
10166	    prefix_cmds="$prefix_cmds -e 1d";
10167	  fi~
10168	  prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
10169	  cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
10170	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
10171	  emximp -o $lib $output_objdir/$libname.def'
10172	_LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
10173	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
10174	_LT_TAGVAR(file_list_spec, $1)='@'
10175	;;
10176
10177      dgux*)
10178        case $cc_basename in
10179          ec++*)
10180	    # FIXME: insert proper C++ library support
10181	    _LT_TAGVAR(ld_shlibs, $1)=no
10182	    ;;
10183          ghcx*)
10184	    # Green Hills C++ Compiler
10185	    # FIXME: insert proper C++ library support
10186	    _LT_TAGVAR(ld_shlibs, $1)=no
10187	    ;;
10188          *)
10189	    # FIXME: insert proper C++ library support
10190	    _LT_TAGVAR(ld_shlibs, $1)=no
10191	    ;;
10192        esac
10193        ;;
10194
10195      freebsd2.*)
10196        # C++ shared libraries reported to be fairly broken before
10197	# switch to ELF
10198        _LT_TAGVAR(ld_shlibs, $1)=no
10199        ;;
10200
10201      freebsd-elf*)
10202        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
10203        ;;
10204
10205      freebsd* | dragonfly* | midnightbsd*)
10206        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
10207        # conventions
10208        _LT_TAGVAR(ld_shlibs, $1)=yes
10209        ;;
10210
10211      haiku*)
10212        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
10213        _LT_TAGVAR(link_all_deplibs, $1)=yes
10214        ;;
10215
10216      hpux9*)
10217        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
10218        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
10219        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
10220        _LT_TAGVAR(hardcode_direct, $1)=yes
10221        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
10222				             # but as the default
10223				             # location of the library.
10224
10225        case $cc_basename in
10226          CC*)
10227            # FIXME: insert proper C++ library support
10228            _LT_TAGVAR(ld_shlibs, $1)=no
10229            ;;
10230          aCC*)
10231            _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 "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
10232            # Commands to make compiler produce verbose output that lists
10233            # what "hidden" libraries, object files and flags are used when
10234            # linking a shared library.
10235            #
10236            # There doesn't appear to be a way to prevent this compiler from
10237            # explicitly linking system object files so we need to strip them
10238            # from the output so that they don't get included in the library
10239            # dependencies.
10240            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"'
10241            ;;
10242          *)
10243            if test yes = "$GXX"; then
10244              _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 "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
10245            else
10246              # FIXME: insert proper C++ library support
10247              _LT_TAGVAR(ld_shlibs, $1)=no
10248            fi
10249            ;;
10250        esac
10251        ;;
10252
10253      hpux10*|hpux11*)
10254        if test no = "$with_gnu_ld"; then
10255	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
10256	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
10257
10258          case $host_cpu in
10259            hppa*64*|ia64*)
10260              ;;
10261            *)
10262	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
10263              ;;
10264          esac
10265        fi
10266        case $host_cpu in
10267          hppa*64*|ia64*)
10268            _LT_TAGVAR(hardcode_direct, $1)=no
10269            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
10270            ;;
10271          *)
10272            _LT_TAGVAR(hardcode_direct, $1)=yes
10273            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
10274            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
10275					         # but as the default
10276					         # location of the library.
10277            ;;
10278        esac
10279
10280        case $cc_basename in
10281          CC*)
10282	    # FIXME: insert proper C++ library support
10283	    _LT_TAGVAR(ld_shlibs, $1)=no
10284	    ;;
10285          aCC*)
10286	    case $host_cpu in
10287	      hppa*64*)
10288	        _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
10289	        ;;
10290	      ia64*)
10291	        _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
10292	        ;;
10293	      *)
10294	        _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'
10295	        ;;
10296	    esac
10297	    # Commands to make compiler produce verbose output that lists
10298	    # what "hidden" libraries, object files and flags are used when
10299	    # linking a shared library.
10300	    #
10301	    # There doesn't appear to be a way to prevent this compiler from
10302	    # explicitly linking system object files so we need to strip them
10303	    # from the output so that they don't get included in the library
10304	    # dependencies.
10305	    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"'
10306	    ;;
10307          *)
10308	    if test yes = "$GXX"; then
10309	      if test no = "$with_gnu_ld"; then
10310	        case $host_cpu in
10311	          hppa*64*)
10312	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
10313	            ;;
10314	          ia64*)
10315	            _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'
10316	            ;;
10317	          *)
10318	            _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'
10319	            ;;
10320	        esac
10321	      fi
10322	    else
10323	      # FIXME: insert proper C++ library support
10324	      _LT_TAGVAR(ld_shlibs, $1)=no
10325	    fi
10326	    ;;
10327        esac
10328        ;;
10329
10330      interix[[3-9]]*)
10331	_LT_TAGVAR(hardcode_direct, $1)=no
10332	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
10333	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
10334	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
10335	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
10336	# Instead, shared libraries are loaded at an image base (0x10000000 by
10337	# default) and relocated if they conflict, which is a slow very memory
10338	# consuming and fragmenting process.  To avoid this, we pick a random,
10339	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
10340	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
10341	_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'
10342	_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'
10343	;;
10344      irix5* | irix6*)
10345        case $cc_basename in
10346          CC*)
10347	    # SGI C++
10348	    _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'
10349
10350	    # Archives containing C++ object files must be created using
10351	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
10352	    # necessary to make sure instantiated templates are included
10353	    # in the archive.
10354	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
10355	    ;;
10356          *)
10357	    if test yes = "$GXX"; then
10358	      if test no = "$with_gnu_ld"; then
10359	        _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'
10360	      else
10361	        _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'
10362	      fi
10363	    fi
10364	    _LT_TAGVAR(link_all_deplibs, $1)=yes
10365	    ;;
10366        esac
10367        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
10368        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
10369        _LT_TAGVAR(inherit_rpath, $1)=yes
10370        ;;
10371
10372      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
10373        case $cc_basename in
10374          KCC*)
10375	    # Kuck and Associates, Inc. (KAI) C++ Compiler
10376
10377	    # KCC will only create a shared library if the output file
10378	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
10379	    # to its proper name (with version) after linking.
10380	    _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'
10381	    _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'
10382	    # Commands to make compiler produce verbose output that lists
10383	    # what "hidden" libraries, object files and flags are used when
10384	    # linking a shared library.
10385	    #
10386	    # There doesn't appear to be a way to prevent this compiler from
10387	    # explicitly linking system object files so we need to strip them
10388	    # from the output so that they don't get included in the library
10389	    # dependencies.
10390	    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"'
10391
10392	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
10393	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
10394
10395	    # Archives containing C++ object files must be created using
10396	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
10397	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
10398	    ;;
10399	  icpc* | ecpc* )
10400	    # Intel C++
10401	    with_gnu_ld=yes
10402	    # version 8.0 and above of icpc choke on multiply defined symbols
10403	    # if we add $predep_objects and $postdep_objects, however 7.1 and
10404	    # earlier do not add the objects themselves.
10405	    case `$CC -V 2>&1` in
10406	      *"Version 7."*)
10407	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
10408		_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'
10409		;;
10410	      *)  # Version 8.0 or newer
10411	        tmp_idyn=
10412	        case $host_cpu in
10413		  ia64*) tmp_idyn=' -i_dynamic';;
10414		esac
10415	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
10416		_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'
10417		;;
10418	    esac
10419	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
10420	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
10421	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
10422	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
10423	    ;;
10424          pgCC* | pgcpp*)
10425            # Portland Group C++ compiler
10426	    case `$CC -V` in
10427	    *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
10428	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
10429               rm -rf $tpldir~
10430               $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
10431               compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
10432	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
10433                rm -rf $tpldir~
10434                $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
10435                $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
10436                $RANLIB $oldlib'
10437	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
10438                rm -rf $tpldir~
10439                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
10440                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
10441	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
10442                rm -rf $tpldir~
10443                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
10444                $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'
10445	      ;;
10446	    *) # Version 6 and above use weak symbols
10447	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
10448	      _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'
10449	      ;;
10450	    esac
10451
10452	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
10453	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
10454	    _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'
10455            ;;
10456	  cxx*)
10457	    # Compaq C++
10458	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
10459	    _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'
10460
10461	    runpath_var=LD_RUN_PATH
10462	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
10463	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
10464
10465	    # Commands to make compiler produce verbose output that lists
10466	    # what "hidden" libraries, object files and flags are used when
10467	    # linking a shared library.
10468	    #
10469	    # There doesn't appear to be a way to prevent this compiler from
10470	    # explicitly linking system object files so we need to strip them
10471	    # from the output so that they don't get included in the library
10472	    # dependencies.
10473	    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'
10474	    ;;
10475	  xl* | mpixl* | bgxl*)
10476	    # IBM XL 8.0 on PPC, with GNU ld
10477	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
10478	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
10479	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
10480	    if test yes = "$supports_anon_versioning"; then
10481	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
10482                cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
10483                echo "local: *; };" >> $output_objdir/$libname.ver~
10484                $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
10485	    fi
10486	    ;;
10487	  *)
10488	    case `$CC -V 2>&1 | $SED 5q` in
10489	    *Sun\ C*)
10490	      # Sun C++ 5.9
10491	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
10492	      _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
10493	      _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'
10494	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
10495	      _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'
10496	      _LT_TAGVAR(compiler_needs_object, $1)=yes
10497
10498	      # Not sure whether something based on
10499	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
10500	      # would be better.
10501	      output_verbose_link_cmd='func_echo_all'
10502
10503	      # Archives containing C++ object files must be created using
10504	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
10505	      # necessary to make sure instantiated templates are included
10506	      # in the archive.
10507	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
10508	      ;;
10509	    esac
10510	    ;;
10511	esac
10512	;;
10513
10514      lynxos*)
10515        # FIXME: insert proper C++ library support
10516	_LT_TAGVAR(ld_shlibs, $1)=no
10517	;;
10518
10519      m88k*)
10520        # FIXME: insert proper C++ library support
10521        _LT_TAGVAR(ld_shlibs, $1)=no
10522	;;
10523
10524      mvs*)
10525        case $cc_basename in
10526          cxx*)
10527	    # FIXME: insert proper C++ library support
10528	    _LT_TAGVAR(ld_shlibs, $1)=no
10529	    ;;
10530	  *)
10531	    # FIXME: insert proper C++ library support
10532	    _LT_TAGVAR(ld_shlibs, $1)=no
10533	    ;;
10534	esac
10535	;;
10536
10537      netbsd*)
10538        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
10539	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
10540	  wlarc=
10541	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
10542	  _LT_TAGVAR(hardcode_direct, $1)=yes
10543	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
10544	fi
10545	# Workaround some broken pre-1.5 toolchains
10546	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
10547	;;
10548
10549      *nto* | *qnx*)
10550        _LT_TAGVAR(ld_shlibs, $1)=yes
10551	;;
10552
10553      openbsd* | bitrig*)
10554	if test -f /usr/libexec/ld.so; then
10555	  _LT_TAGVAR(hardcode_direct, $1)=yes
10556	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
10557	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
10558	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
10559	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
10560	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
10561	    _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'
10562	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
10563	    _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
10564	  fi
10565	  output_verbose_link_cmd=func_echo_all
10566	else
10567	  _LT_TAGVAR(ld_shlibs, $1)=no
10568	fi
10569	;;
10570
10571      osf3* | osf4* | osf5*)
10572        case $cc_basename in
10573          KCC*)
10574	    # Kuck and Associates, Inc. (KAI) C++ Compiler
10575
10576	    # KCC will only create a shared library if the output file
10577	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
10578	    # to its proper name (with version) after linking.
10579	    _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'
10580
10581	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
10582	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
10583
10584	    # Archives containing C++ object files must be created using
10585	    # the KAI C++ compiler.
10586	    case $host in
10587	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
10588	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
10589	    esac
10590	    ;;
10591          RCC*)
10592	    # Rational C++ 2.4.1
10593	    # FIXME: insert proper C++ library support
10594	    _LT_TAGVAR(ld_shlibs, $1)=no
10595	    ;;
10596          cxx*)
10597	    case $host in
10598	      osf3*)
10599	        _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
10600	        _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'
10601	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
10602		;;
10603	      *)
10604	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
10605	        _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'
10606	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
10607                  echo "-hidden">> $lib.exp~
10608                  $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~
10609                  $RM $lib.exp'
10610	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
10611		;;
10612	    esac
10613
10614	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
10615
10616	    # Commands to make compiler produce verbose output that lists
10617	    # what "hidden" libraries, object files and flags are used when
10618	    # linking a shared library.
10619	    #
10620	    # There doesn't appear to be a way to prevent this compiler from
10621	    # explicitly linking system object files so we need to strip them
10622	    # from the output so that they don't get included in the library
10623	    # dependencies.
10624	    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"'
10625	    ;;
10626	  *)
10627	    if test yes,no = "$GXX,$with_gnu_ld"; then
10628	      _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
10629	      case $host in
10630	        osf3*)
10631	          _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'
10632		  ;;
10633	        *)
10634	          _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'
10635		  ;;
10636	      esac
10637
10638	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
10639	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
10640
10641	      # Commands to make compiler produce verbose output that lists
10642	      # what "hidden" libraries, object files and flags are used when
10643	      # linking a shared library.
10644	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
10645
10646	    else
10647	      # FIXME: insert proper C++ library support
10648	      _LT_TAGVAR(ld_shlibs, $1)=no
10649	    fi
10650	    ;;
10651        esac
10652        ;;
10653
10654      psos*)
10655        # FIXME: insert proper C++ library support
10656        _LT_TAGVAR(ld_shlibs, $1)=no
10657        ;;
10658
10659      sunos4*)
10660        case $cc_basename in
10661          CC*)
10662	    # Sun C++ 4.x
10663	    # FIXME: insert proper C++ library support
10664	    _LT_TAGVAR(ld_shlibs, $1)=no
10665	    ;;
10666          lcc*)
10667	    # Lucid
10668	    # FIXME: insert proper C++ library support
10669	    _LT_TAGVAR(ld_shlibs, $1)=no
10670	    ;;
10671          *)
10672	    # FIXME: insert proper C++ library support
10673	    _LT_TAGVAR(ld_shlibs, $1)=no
10674	    ;;
10675        esac
10676        ;;
10677
10678      solaris*)
10679        case $cc_basename in
10680          CC* | sunCC*)
10681	    # Sun C++ 4.2, 5.x and Centerline C++
10682            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
10683	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
10684	    _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
10685	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
10686              $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'
10687
10688	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
10689	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
10690	    case $host_os in
10691	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
10692	      *)
10693		# The compiler driver will combine and reorder linker options,
10694		# but understands '-z linker_flag'.
10695	        # Supported since Solaris 2.6 (maybe 2.5.1?)
10696		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
10697	        ;;
10698	    esac
10699	    _LT_TAGVAR(link_all_deplibs, $1)=yes
10700
10701	    output_verbose_link_cmd='func_echo_all'
10702
10703	    # Archives containing C++ object files must be created using
10704	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
10705	    # necessary to make sure instantiated templates are included
10706	    # in the archive.
10707	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
10708	    ;;
10709          gcx*)
10710	    # Green Hills C++ Compiler
10711	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
10712
10713	    # The C++ compiler must be used to create the archive.
10714	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
10715	    ;;
10716          *)
10717	    # GNU C++ compiler with Solaris linker
10718	    if test yes,no = "$GXX,$with_gnu_ld"; then
10719	      _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
10720	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
10721	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
10722	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
10723                  $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
10724
10725	        # Commands to make compiler produce verbose output that lists
10726	        # what "hidden" libraries, object files and flags are used when
10727	        # linking a shared library.
10728	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
10729	      else
10730	        # g++ 2.7 appears to require '-G' NOT '-shared' on this
10731	        # platform.
10732	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
10733	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
10734                  $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
10735
10736	        # Commands to make compiler produce verbose output that lists
10737	        # what "hidden" libraries, object files and flags are used when
10738	        # linking a shared library.
10739	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
10740	      fi
10741
10742	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
10743	      case $host_os in
10744		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
10745		*)
10746		  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
10747		  ;;
10748	      esac
10749	    fi
10750	    ;;
10751        esac
10752        ;;
10753
10754    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
10755      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
10756      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
10757      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
10758      runpath_var='LD_RUN_PATH'
10759
10760      case $cc_basename in
10761        CC*)
10762	  _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10763	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10764	  ;;
10765	*)
10766	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10767	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10768	  ;;
10769      esac
10770      ;;
10771
10772      sysv5* | sco3.2v5* | sco5v6*)
10773	# Note: We CANNOT use -z defs as we might desire, because we do not
10774	# link with -lc, and that would cause any symbols used from libc to
10775	# always be unresolved, which means just about no library would
10776	# ever link correctly.  If we're not using GNU ld we use -z text
10777	# though, which does catch some bad symbols but isn't as heavy-handed
10778	# as -z defs.
10779	_LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
10780	_LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
10781	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
10782	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
10783	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
10784	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
10785	_LT_TAGVAR(link_all_deplibs, $1)=yes
10786	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
10787	runpath_var='LD_RUN_PATH'
10788
10789	case $cc_basename in
10790          CC*)
10791	    _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10792	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10793	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
10794              '"$_LT_TAGVAR(old_archive_cmds, $1)"
10795	    _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
10796              '"$_LT_TAGVAR(reload_cmds, $1)"
10797	    ;;
10798	  *)
10799	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10800	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
10801	    ;;
10802	esac
10803      ;;
10804
10805      tandem*)
10806        case $cc_basename in
10807          NCC*)
10808	    # NonStop-UX NCC 3.20
10809	    # FIXME: insert proper C++ library support
10810	    _LT_TAGVAR(ld_shlibs, $1)=no
10811	    ;;
10812          *)
10813	    # FIXME: insert proper C++ library support
10814	    _LT_TAGVAR(ld_shlibs, $1)=no
10815	    ;;
10816        esac
10817        ;;
10818
10819      vxworks*)
10820        # FIXME: insert proper C++ library support
10821        _LT_TAGVAR(ld_shlibs, $1)=no
10822        ;;
10823
10824      *)
10825        # FIXME: insert proper C++ library support
10826        _LT_TAGVAR(ld_shlibs, $1)=no
10827        ;;
10828    esac
10829
10830    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
10831    test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
10832
10833    _LT_TAGVAR(GCC, $1)=$GXX
10834    _LT_TAGVAR(LD, $1)=$LD
10835
10836    ## CAVEAT EMPTOR:
10837    ## There is no encapsulation within the following macros, do not change
10838    ## the running order or otherwise move them around unless you know exactly
10839    ## what you are doing...
10840    _LT_SYS_HIDDEN_LIBDEPS($1)
10841    _LT_COMPILER_PIC($1)
10842    _LT_COMPILER_C_O($1)
10843    _LT_COMPILER_FILE_LOCKS($1)
10844    _LT_LINKER_SHLIBS($1)
10845    _LT_SYS_DYNAMIC_LINKER($1)
10846    _LT_LINKER_HARDCODE_LIBPATH($1)
10847
10848    _LT_CONFIG($1)
10849  fi # test -n "$compiler"
10850
10851  CC=$lt_save_CC
10852  CFLAGS=$lt_save_CFLAGS
10853  LDCXX=$LD
10854  LD=$lt_save_LD
10855  GCC=$lt_save_GCC
10856  with_gnu_ld=$lt_save_with_gnu_ld
10857  lt_cv_path_LDCXX=$lt_cv_path_LD
10858  lt_cv_path_LD=$lt_save_path_LD
10859  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
10860  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
10861fi # test yes != "$_lt_caught_CXX_error"
10862
10863AC_LANG_POP
10864])# _LT_LANG_CXX_CONFIG
10865
10866
10867# _LT_FUNC_STRIPNAME_CNF
10868# ----------------------
10869# func_stripname_cnf prefix suffix name
10870# strip PREFIX and SUFFIX off of NAME.
10871# PREFIX and SUFFIX must not contain globbing or regex special
10872# characters, hashes, percent signs, but SUFFIX may contain a leading
10873# dot (in which case that matches only a dot).
10874#
10875# This function is identical to the (non-XSI) version of func_stripname,
10876# except this one can be used by m4 code that may be executed by configure,
10877# rather than the libtool script.
10878m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
10879AC_REQUIRE([_LT_DECL_SED])
10880AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
10881func_stripname_cnf ()
10882{
10883  case @S|@2 in
10884  .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
10885  *)  func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
10886  esac
10887} # func_stripname_cnf
10888])# _LT_FUNC_STRIPNAME_CNF
10889
10890
10891# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
10892# ---------------------------------
10893# Figure out "hidden" library dependencies from verbose
10894# compiler output when linking a shared library.
10895# Parse the compiler output and extract the necessary
10896# objects, libraries and library flags.
10897m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
10898[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
10899AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
10900# Dependencies to place before and after the object being linked:
10901_LT_TAGVAR(predep_objects, $1)=
10902_LT_TAGVAR(postdep_objects, $1)=
10903_LT_TAGVAR(predeps, $1)=
10904_LT_TAGVAR(postdeps, $1)=
10905_LT_TAGVAR(compiler_lib_search_path, $1)=
10906
10907dnl we can't use the lt_simple_compile_test_code here,
10908dnl because it contains code intended for an executable,
10909dnl not a library.  It's possible we should let each
10910dnl tag define a new lt_????_link_test_code variable,
10911dnl but it's only used here...
10912m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
10913int a;
10914void foo (void) { a = 0; }
10915_LT_EOF
10916], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
10917class Foo
10918{
10919public:
10920  Foo (void) { a = 0; }
10921private:
10922  int a;
10923};
10924_LT_EOF
10925], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
10926      subroutine foo
10927      implicit none
10928      integer*4 a
10929      a=0
10930      return
10931      end
10932_LT_EOF
10933], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
10934      subroutine foo
10935      implicit none
10936      integer a
10937      a=0
10938      return
10939      end
10940_LT_EOF
10941], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
10942public class foo {
10943  private int a;
10944  public void bar (void) {
10945    a = 0;
10946  }
10947};
10948_LT_EOF
10949], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
10950package foo
10951func foo() {
10952}
10953_LT_EOF
10954])
10955
10956_lt_libdeps_save_CFLAGS=$CFLAGS
10957case "$CC $CFLAGS " in #(
10958*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
10959*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
10960*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
10961esac
10962
10963dnl Parse the compiler output and extract the necessary
10964dnl objects, libraries and library flags.
10965if AC_TRY_EVAL(ac_compile); then
10966  # Parse the compiler output and extract the necessary
10967  # objects, libraries and library flags.
10968
10969  # Sentinel used to keep track of whether or not we are before
10970  # the conftest object file.
10971  pre_test_object_deps_done=no
10972
10973  for p in `eval "$output_verbose_link_cmd"`; do
10974    case $prev$p in
10975
10976    -L* | -R* | -l*)
10977       # Some compilers place space between "-{L,R}" and the path.
10978       # Remove the space.
10979       if test x-L = "$p" ||
10980          test x-R = "$p"; then
10981	 prev=$p
10982	 continue
10983       fi
10984
10985       # Expand the sysroot to ease extracting the directories later.
10986       if test -z "$prev"; then
10987         case $p in
10988         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
10989         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
10990         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
10991         esac
10992       fi
10993       case $p in
10994       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
10995       esac
10996       if test no = "$pre_test_object_deps_done"; then
10997	 case $prev in
10998	 -L | -R)
10999	   # Internal compiler library paths should come after those
11000	   # provided the user.  The postdeps already come after the
11001	   # user supplied libs so there is no need to process them.
11002	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
11003	     _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
11004	   else
11005	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
11006	   fi
11007	   ;;
11008	 # The "-l" case would never come before the object being
11009	 # linked, so don't bother handling this case.
11010	 esac
11011       else
11012	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
11013	   _LT_TAGVAR(postdeps, $1)=$prev$p
11014	 else
11015	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
11016	 fi
11017       fi
11018       prev=
11019       ;;
11020
11021    *.lto.$objext) ;; # Ignore GCC LTO objects
11022    *.$objext)
11023       # This assumes that the test object file only shows up
11024       # once in the compiler output.
11025       if test "$p" = "conftest.$objext"; then
11026	 pre_test_object_deps_done=yes
11027	 continue
11028       fi
11029
11030       if test no = "$pre_test_object_deps_done"; then
11031	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
11032	   _LT_TAGVAR(predep_objects, $1)=$p
11033	 else
11034	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
11035	 fi
11036       else
11037	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
11038	   _LT_TAGVAR(postdep_objects, $1)=$p
11039	 else
11040	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
11041	 fi
11042       fi
11043       ;;
11044
11045    *) ;; # Ignore the rest.
11046
11047    esac
11048  done
11049
11050  # Clean up.
11051  rm -f a.out a.exe
11052else
11053  echo "libtool.m4: error: problem compiling $1 test program"
11054fi
11055
11056$RM -f confest.$objext
11057CFLAGS=$_lt_libdeps_save_CFLAGS
11058
11059# PORTME: override above test on systems where it is broken
11060m4_if([$1], [CXX],
11061[case $host_os in
11062interix[[3-9]]*)
11063  # Interix 3.5 installs completely hosed .la files for C++, so rather than
11064  # hack all around it, let's just trust "g++" to DTRT.
11065  _LT_TAGVAR(predep_objects,$1)=
11066  _LT_TAGVAR(postdep_objects,$1)=
11067  _LT_TAGVAR(postdeps,$1)=
11068  ;;
11069esac
11070])
11071
11072case " $_LT_TAGVAR(postdeps, $1) " in
11073*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
11074esac
11075 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
11076if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
11077 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
11078fi
11079_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
11080    [The directories searched by this compiler when creating a shared library])
11081_LT_TAGDECL([], [predep_objects], [1],
11082    [Dependencies to place before and after the objects being linked to
11083    create a shared library])
11084_LT_TAGDECL([], [postdep_objects], [1])
11085_LT_TAGDECL([], [predeps], [1])
11086_LT_TAGDECL([], [postdeps], [1])
11087_LT_TAGDECL([], [compiler_lib_search_path], [1],
11088    [The library search path used internally by the compiler when linking
11089    a shared library])
11090])# _LT_SYS_HIDDEN_LIBDEPS
11091
11092
11093# _LT_LANG_F77_CONFIG([TAG])
11094# --------------------------
11095# Ensure that the configuration variables for a Fortran 77 compiler are
11096# suitably defined.  These variables are subsequently used by _LT_CONFIG
11097# to write the compiler configuration to 'libtool'.
11098m4_defun([_LT_LANG_F77_CONFIG],
11099[AC_LANG_PUSH(Fortran 77)
11100if test -z "$F77" || test no = "$F77"; then
11101  _lt_disable_F77=yes
11102fi
11103
11104_LT_TAGVAR(archive_cmds_need_lc, $1)=no
11105_LT_TAGVAR(allow_undefined_flag, $1)=
11106_LT_TAGVAR(always_export_symbols, $1)=no
11107_LT_TAGVAR(archive_expsym_cmds, $1)=
11108_LT_TAGVAR(export_dynamic_flag_spec, $1)=
11109_LT_TAGVAR(hardcode_direct, $1)=no
11110_LT_TAGVAR(hardcode_direct_absolute, $1)=no
11111_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
11112_LT_TAGVAR(hardcode_libdir_separator, $1)=
11113_LT_TAGVAR(hardcode_minus_L, $1)=no
11114_LT_TAGVAR(hardcode_automatic, $1)=no
11115_LT_TAGVAR(inherit_rpath, $1)=no
11116_LT_TAGVAR(module_cmds, $1)=
11117_LT_TAGVAR(module_expsym_cmds, $1)=
11118_LT_TAGVAR(link_all_deplibs, $1)=unknown
11119_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
11120_LT_TAGVAR(reload_flag, $1)=$reload_flag
11121_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
11122_LT_TAGVAR(no_undefined_flag, $1)=
11123_LT_TAGVAR(whole_archive_flag_spec, $1)=
11124_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
11125
11126# Source file extension for f77 test sources.
11127ac_ext=f
11128
11129# Object file extension for compiled f77 test sources.
11130objext=o
11131_LT_TAGVAR(objext, $1)=$objext
11132
11133# No sense in running all these tests if we already determined that
11134# the F77 compiler isn't working.  Some variables (like enable_shared)
11135# are currently assumed to apply to all compilers on this platform,
11136# and will be corrupted by setting them based on a non-working compiler.
11137if test yes != "$_lt_disable_F77"; then
11138  # Code to be used in simple compile tests
11139  lt_simple_compile_test_code="\
11140      subroutine t
11141      return
11142      end
11143"
11144
11145  # Code to be used in simple link tests
11146  lt_simple_link_test_code="\
11147      program t
11148      end
11149"
11150
11151  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
11152  _LT_TAG_COMPILER
11153
11154  # save warnings/boilerplate of simple test code
11155  _LT_COMPILER_BOILERPLATE
11156  _LT_LINKER_BOILERPLATE
11157
11158  # Allow CC to be a program name with arguments.
11159  lt_save_CC=$CC
11160  lt_save_GCC=$GCC
11161  lt_save_CFLAGS=$CFLAGS
11162  CC=${F77-"f77"}
11163  CFLAGS=$FFLAGS
11164  compiler=$CC
11165  _LT_TAGVAR(compiler, $1)=$CC
11166  _LT_CC_BASENAME([$compiler])
11167  GCC=$G77
11168  if test -n "$compiler"; then
11169    AC_MSG_CHECKING([if libtool supports shared libraries])
11170    AC_MSG_RESULT([$can_build_shared])
11171
11172    AC_MSG_CHECKING([whether to build shared libraries])
11173    test no = "$can_build_shared" && enable_shared=no
11174
11175    # On AIX, shared libraries and static libraries use the same namespace, and
11176    # are all built from PIC.
11177    case $host_os in
11178      aix3*)
11179        test yes = "$enable_shared" && enable_static=no
11180        if test -n "$RANLIB"; then
11181          archive_cmds="$archive_cmds~\$RANLIB \$lib"
11182          postinstall_cmds='$RANLIB $lib'
11183        fi
11184        ;;
11185      aix[[4-9]]*)
11186	if test ia64 != "$host_cpu"; then
11187	  case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
11188	  yes,aix,yes) ;;		# shared object as lib.so file only
11189	  yes,svr4,*) ;;		# shared object as lib.so archive member only
11190	  yes,*) enable_static=no ;;	# shared object in lib.a archive as well
11191	  esac
11192	fi
11193        ;;
11194    esac
11195    AC_MSG_RESULT([$enable_shared])
11196
11197    AC_MSG_CHECKING([whether to build static libraries])
11198    # Make sure either enable_shared or enable_static is yes.
11199    test yes = "$enable_shared" || enable_static=yes
11200    AC_MSG_RESULT([$enable_static])
11201
11202    _LT_TAGVAR(GCC, $1)=$G77
11203    _LT_TAGVAR(LD, $1)=$LD
11204
11205    ## CAVEAT EMPTOR:
11206    ## There is no encapsulation within the following macros, do not change
11207    ## the running order or otherwise move them around unless you know exactly
11208    ## what you are doing...
11209    _LT_COMPILER_PIC($1)
11210    _LT_COMPILER_C_O($1)
11211    _LT_COMPILER_FILE_LOCKS($1)
11212    _LT_LINKER_SHLIBS($1)
11213    _LT_SYS_DYNAMIC_LINKER($1)
11214    _LT_LINKER_HARDCODE_LIBPATH($1)
11215
11216    _LT_CONFIG($1)
11217  fi # test -n "$compiler"
11218
11219  GCC=$lt_save_GCC
11220  CC=$lt_save_CC
11221  CFLAGS=$lt_save_CFLAGS
11222fi # test yes != "$_lt_disable_F77"
11223
11224AC_LANG_POP
11225])# _LT_LANG_F77_CONFIG
11226
11227
11228# _LT_LANG_FC_CONFIG([TAG])
11229# -------------------------
11230# Ensure that the configuration variables for a Fortran compiler are
11231# suitably defined.  These variables are subsequently used by _LT_CONFIG
11232# to write the compiler configuration to 'libtool'.
11233m4_defun([_LT_LANG_FC_CONFIG],
11234[AC_LANG_PUSH(Fortran)
11235
11236if test -z "$FC" || test no = "$FC"; then
11237  _lt_disable_FC=yes
11238fi
11239
11240_LT_TAGVAR(archive_cmds_need_lc, $1)=no
11241_LT_TAGVAR(allow_undefined_flag, $1)=
11242_LT_TAGVAR(always_export_symbols, $1)=no
11243_LT_TAGVAR(archive_expsym_cmds, $1)=
11244_LT_TAGVAR(export_dynamic_flag_spec, $1)=
11245_LT_TAGVAR(hardcode_direct, $1)=no
11246_LT_TAGVAR(hardcode_direct_absolute, $1)=no
11247_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
11248_LT_TAGVAR(hardcode_libdir_separator, $1)=
11249_LT_TAGVAR(hardcode_minus_L, $1)=no
11250_LT_TAGVAR(hardcode_automatic, $1)=no
11251_LT_TAGVAR(inherit_rpath, $1)=no
11252_LT_TAGVAR(module_cmds, $1)=
11253_LT_TAGVAR(module_expsym_cmds, $1)=
11254_LT_TAGVAR(link_all_deplibs, $1)=unknown
11255_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
11256_LT_TAGVAR(reload_flag, $1)=$reload_flag
11257_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
11258_LT_TAGVAR(no_undefined_flag, $1)=
11259_LT_TAGVAR(whole_archive_flag_spec, $1)=
11260_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
11261
11262# Source file extension for fc test sources.
11263ac_ext=${ac_fc_srcext-f}
11264
11265# Object file extension for compiled fc test sources.
11266objext=o
11267_LT_TAGVAR(objext, $1)=$objext
11268
11269# No sense in running all these tests if we already determined that
11270# the FC compiler isn't working.  Some variables (like enable_shared)
11271# are currently assumed to apply to all compilers on this platform,
11272# and will be corrupted by setting them based on a non-working compiler.
11273if test yes != "$_lt_disable_FC"; then
11274  # Code to be used in simple compile tests
11275  lt_simple_compile_test_code="\
11276      subroutine t
11277      return
11278      end
11279"
11280
11281  # Code to be used in simple link tests
11282  lt_simple_link_test_code="\
11283      program t
11284      end
11285"
11286
11287  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
11288  _LT_TAG_COMPILER
11289
11290  # save warnings/boilerplate of simple test code
11291  _LT_COMPILER_BOILERPLATE
11292  _LT_LINKER_BOILERPLATE
11293
11294  # Allow CC to be a program name with arguments.
11295  lt_save_CC=$CC
11296  lt_save_GCC=$GCC
11297  lt_save_CFLAGS=$CFLAGS
11298  CC=${FC-"f95"}
11299  CFLAGS=$FCFLAGS
11300  compiler=$CC
11301  GCC=$ac_cv_fc_compiler_gnu
11302
11303  _LT_TAGVAR(compiler, $1)=$CC
11304  _LT_CC_BASENAME([$compiler])
11305
11306  if test -n "$compiler"; then
11307    AC_MSG_CHECKING([if libtool supports shared libraries])
11308    AC_MSG_RESULT([$can_build_shared])
11309
11310    AC_MSG_CHECKING([whether to build shared libraries])
11311    test no = "$can_build_shared" && enable_shared=no
11312
11313    # On AIX, shared libraries and static libraries use the same namespace, and
11314    # are all built from PIC.
11315    case $host_os in
11316      aix3*)
11317        test yes = "$enable_shared" && enable_static=no
11318        if test -n "$RANLIB"; then
11319          archive_cmds="$archive_cmds~\$RANLIB \$lib"
11320          postinstall_cmds='$RANLIB $lib'
11321        fi
11322        ;;
11323      aix[[4-9]]*)
11324	if test ia64 != "$host_cpu"; then
11325	  case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
11326	  yes,aix,yes) ;;		# shared object as lib.so file only
11327	  yes,svr4,*) ;;		# shared object as lib.so archive member only
11328	  yes,*) enable_static=no ;;	# shared object in lib.a archive as well
11329	  esac
11330	fi
11331        ;;
11332    esac
11333    AC_MSG_RESULT([$enable_shared])
11334
11335    AC_MSG_CHECKING([whether to build static libraries])
11336    # Make sure either enable_shared or enable_static is yes.
11337    test yes = "$enable_shared" || enable_static=yes
11338    AC_MSG_RESULT([$enable_static])
11339
11340    _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
11341    _LT_TAGVAR(LD, $1)=$LD
11342
11343    ## CAVEAT EMPTOR:
11344    ## There is no encapsulation within the following macros, do not change
11345    ## the running order or otherwise move them around unless you know exactly
11346    ## what you are doing...
11347    _LT_SYS_HIDDEN_LIBDEPS($1)
11348    _LT_COMPILER_PIC($1)
11349    _LT_COMPILER_C_O($1)
11350    _LT_COMPILER_FILE_LOCKS($1)
11351    _LT_LINKER_SHLIBS($1)
11352    _LT_SYS_DYNAMIC_LINKER($1)
11353    _LT_LINKER_HARDCODE_LIBPATH($1)
11354
11355    _LT_CONFIG($1)
11356  fi # test -n "$compiler"
11357
11358  GCC=$lt_save_GCC
11359  CC=$lt_save_CC
11360  CFLAGS=$lt_save_CFLAGS
11361fi # test yes != "$_lt_disable_FC"
11362
11363AC_LANG_POP
11364])# _LT_LANG_FC_CONFIG
11365
11366
11367# _LT_LANG_GCJ_CONFIG([TAG])
11368# --------------------------
11369# Ensure that the configuration variables for the GNU Java Compiler compiler
11370# are suitably defined.  These variables are subsequently used by _LT_CONFIG
11371# to write the compiler configuration to 'libtool'.
11372m4_defun([_LT_LANG_GCJ_CONFIG],
11373[AC_REQUIRE([LT_PROG_GCJ])dnl
11374AC_LANG_SAVE
11375
11376# Source file extension for Java test sources.
11377ac_ext=java
11378
11379# Object file extension for compiled Java test sources.
11380objext=o
11381_LT_TAGVAR(objext, $1)=$objext
11382
11383# Code to be used in simple compile tests
11384lt_simple_compile_test_code="class foo {}"
11385
11386# Code to be used in simple link tests
11387lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
11388
11389# ltmain only uses $CC for tagged configurations so make sure $CC is set.
11390_LT_TAG_COMPILER
11391
11392# save warnings/boilerplate of simple test code
11393_LT_COMPILER_BOILERPLATE
11394_LT_LINKER_BOILERPLATE
11395
11396# Allow CC to be a program name with arguments.
11397lt_save_CC=$CC
11398lt_save_CFLAGS=$CFLAGS
11399lt_save_GCC=$GCC
11400GCC=yes
11401CC=${GCJ-"gcj"}
11402CFLAGS=$GCJFLAGS
11403compiler=$CC
11404_LT_TAGVAR(compiler, $1)=$CC
11405_LT_TAGVAR(LD, $1)=$LD
11406_LT_CC_BASENAME([$compiler])
11407
11408# GCJ did not exist at the time GCC didn't implicitly link libc in.
11409_LT_TAGVAR(archive_cmds_need_lc, $1)=no
11410
11411_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
11412_LT_TAGVAR(reload_flag, $1)=$reload_flag
11413_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
11414
11415if test -n "$compiler"; then
11416  _LT_COMPILER_NO_RTTI($1)
11417  _LT_COMPILER_PIC($1)
11418  _LT_COMPILER_C_O($1)
11419  _LT_COMPILER_FILE_LOCKS($1)
11420  _LT_LINKER_SHLIBS($1)
11421  _LT_LINKER_HARDCODE_LIBPATH($1)
11422
11423  _LT_CONFIG($1)
11424fi
11425
11426AC_LANG_RESTORE
11427
11428GCC=$lt_save_GCC
11429CC=$lt_save_CC
11430CFLAGS=$lt_save_CFLAGS
11431])# _LT_LANG_GCJ_CONFIG
11432
11433
11434# _LT_LANG_GO_CONFIG([TAG])
11435# --------------------------
11436# Ensure that the configuration variables for the GNU Go compiler
11437# are suitably defined.  These variables are subsequently used by _LT_CONFIG
11438# to write the compiler configuration to 'libtool'.
11439m4_defun([_LT_LANG_GO_CONFIG],
11440[AC_REQUIRE([LT_PROG_GO])dnl
11441AC_LANG_SAVE
11442
11443# Source file extension for Go test sources.
11444ac_ext=go
11445
11446# Object file extension for compiled Go test sources.
11447objext=o
11448_LT_TAGVAR(objext, $1)=$objext
11449
11450# Code to be used in simple compile tests
11451lt_simple_compile_test_code="package main; func main() { }"
11452
11453# Code to be used in simple link tests
11454lt_simple_link_test_code='package main; func main() { }'
11455
11456# ltmain only uses $CC for tagged configurations so make sure $CC is set.
11457_LT_TAG_COMPILER
11458
11459# save warnings/boilerplate of simple test code
11460_LT_COMPILER_BOILERPLATE
11461_LT_LINKER_BOILERPLATE
11462
11463# Allow CC to be a program name with arguments.
11464lt_save_CC=$CC
11465lt_save_CFLAGS=$CFLAGS
11466lt_save_GCC=$GCC
11467GCC=yes
11468CC=${GOC-"gccgo"}
11469CFLAGS=$GOFLAGS
11470compiler=$CC
11471_LT_TAGVAR(compiler, $1)=$CC
11472_LT_TAGVAR(LD, $1)=$LD
11473_LT_CC_BASENAME([$compiler])
11474
11475# Go did not exist at the time GCC didn't implicitly link libc in.
11476_LT_TAGVAR(archive_cmds_need_lc, $1)=no
11477
11478_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
11479_LT_TAGVAR(reload_flag, $1)=$reload_flag
11480_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
11481
11482if test -n "$compiler"; then
11483  _LT_COMPILER_NO_RTTI($1)
11484  _LT_COMPILER_PIC($1)
11485  _LT_COMPILER_C_O($1)
11486  _LT_COMPILER_FILE_LOCKS($1)
11487  _LT_LINKER_SHLIBS($1)
11488  _LT_LINKER_HARDCODE_LIBPATH($1)
11489
11490  _LT_CONFIG($1)
11491fi
11492
11493AC_LANG_RESTORE
11494
11495GCC=$lt_save_GCC
11496CC=$lt_save_CC
11497CFLAGS=$lt_save_CFLAGS
11498])# _LT_LANG_GO_CONFIG
11499
11500
11501# _LT_LANG_RC_CONFIG([TAG])
11502# -------------------------
11503# Ensure that the configuration variables for the Windows resource compiler
11504# are suitably defined.  These variables are subsequently used by _LT_CONFIG
11505# to write the compiler configuration to 'libtool'.
11506m4_defun([_LT_LANG_RC_CONFIG],
11507[AC_REQUIRE([LT_PROG_RC])dnl
11508AC_LANG_SAVE
11509
11510# Source file extension for RC test sources.
11511ac_ext=rc
11512
11513# Object file extension for compiled RC test sources.
11514objext=o
11515_LT_TAGVAR(objext, $1)=$objext
11516
11517# Code to be used in simple compile tests
11518lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
11519
11520# Code to be used in simple link tests
11521lt_simple_link_test_code=$lt_simple_compile_test_code
11522
11523# ltmain only uses $CC for tagged configurations so make sure $CC is set.
11524_LT_TAG_COMPILER
11525
11526# save warnings/boilerplate of simple test code
11527_LT_COMPILER_BOILERPLATE
11528_LT_LINKER_BOILERPLATE
11529
11530# Allow CC to be a program name with arguments.
11531lt_save_CC=$CC
11532lt_save_CFLAGS=$CFLAGS
11533lt_save_GCC=$GCC
11534GCC=
11535CC=${RC-"windres"}
11536CFLAGS=
11537compiler=$CC
11538_LT_TAGVAR(compiler, $1)=$CC
11539_LT_CC_BASENAME([$compiler])
11540_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
11541
11542if test -n "$compiler"; then
11543  :
11544  _LT_CONFIG($1)
11545fi
11546
11547GCC=$lt_save_GCC
11548AC_LANG_RESTORE
11549CC=$lt_save_CC
11550CFLAGS=$lt_save_CFLAGS
11551])# _LT_LANG_RC_CONFIG
11552
11553
11554# LT_PROG_GCJ
11555# -----------
11556AC_DEFUN([LT_PROG_GCJ],
11557[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
11558  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
11559    [AC_CHECK_TOOL(GCJ, gcj,)
11560      test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
11561      AC_SUBST(GCJFLAGS)])])[]dnl
11562])
11563
11564# Old name:
11565AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
11566dnl aclocal-1.4 backwards compatibility:
11567dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
11568
11569
11570# LT_PROG_GO
11571# ----------
11572AC_DEFUN([LT_PROG_GO],
11573[AC_CHECK_TOOL(GOC, gccgo,)
11574])
11575
11576
11577# LT_PROG_RC
11578# ----------
11579AC_DEFUN([LT_PROG_RC],
11580[AC_CHECK_TOOL(RC, windres,)
11581])
11582
11583# Old name:
11584AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
11585dnl aclocal-1.4 backwards compatibility:
11586dnl AC_DEFUN([LT_AC_PROG_RC], [])
11587
11588
11589# _LT_DECL_EGREP
11590# --------------
11591# If we don't have a new enough Autoconf to choose the best grep
11592# available, choose the one first in the user's PATH.
11593m4_defun([_LT_DECL_EGREP],
11594[AC_REQUIRE([AC_PROG_EGREP])dnl
11595AC_REQUIRE([AC_PROG_FGREP])dnl
11596test -z "$GREP" && GREP=grep
11597_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
11598_LT_DECL([], [EGREP], [1], [An ERE matcher])
11599_LT_DECL([], [FGREP], [1], [A literal string matcher])
11600dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
11601AC_SUBST([GREP])
11602])
11603
11604
11605# _LT_DECL_OBJDUMP
11606# --------------
11607# If we don't have a new enough Autoconf to choose the best objdump
11608# available, choose the one first in the user's PATH.
11609m4_defun([_LT_DECL_OBJDUMP],
11610[AC_CHECK_TOOL(OBJDUMP, objdump, false)
11611test -z "$OBJDUMP" && OBJDUMP=objdump
11612_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
11613AC_SUBST([OBJDUMP])
11614])
11615
11616# _LT_DECL_DLLTOOL
11617# ----------------
11618# Ensure DLLTOOL variable is set.
11619m4_defun([_LT_DECL_DLLTOOL],
11620[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
11621test -z "$DLLTOOL" && DLLTOOL=dlltool
11622_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
11623AC_SUBST([DLLTOOL])
11624])
11625
11626# _LT_DECL_FILECMD
11627# ----------------
11628# Check for a file(cmd) program that can be used to detect file type and magic
11629m4_defun([_LT_DECL_FILECMD],
11630[AC_CHECK_TOOL([FILECMD], [file], [:])
11631_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types])
11632])# _LD_DECL_FILECMD
11633
11634# _LT_DECL_SED
11635# ------------
11636# Check for a fully-functional sed program, that truncates
11637# as few characters as possible.  Prefer GNU sed if found.
11638m4_defun([_LT_DECL_SED],
11639[AC_PROG_SED
11640test -z "$SED" && SED=sed
11641Xsed="$SED -e 1s/^X//"
11642_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
11643_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
11644    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
11645])# _LT_DECL_SED
11646
11647m4_ifndef([AC_PROG_SED], [
11648# NOTE: This macro has been submitted for inclusion into   #
11649#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
11650#  a released version of Autoconf we should remove this    #
11651#  macro and use it instead.                               #
11652
11653m4_defun([AC_PROG_SED],
11654[AC_MSG_CHECKING([for a sed that does not truncate output])
11655AC_CACHE_VAL(lt_cv_path_SED,
11656[# Loop through the user's path and test for sed and gsed.
11657# Then use that list of sed's as ones to test for truncation.
11658as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11659for as_dir in $PATH
11660do
11661  IFS=$as_save_IFS
11662  test -z "$as_dir" && as_dir=.
11663  for lt_ac_prog in sed gsed; do
11664    for ac_exec_ext in '' $ac_executable_extensions; do
11665      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
11666        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
11667      fi
11668    done
11669  done
11670done
11671IFS=$as_save_IFS
11672lt_ac_max=0
11673lt_ac_count=0
11674# Add /usr/xpg4/bin/sed as it is typically found on Solaris
11675# along with /bin/sed that truncates output.
11676for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
11677  test ! -f "$lt_ac_sed" && continue
11678  cat /dev/null > conftest.in
11679  lt_ac_count=0
11680  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
11681  # Check for GNU sed and select it if it is found.
11682  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
11683    lt_cv_path_SED=$lt_ac_sed
11684    break
11685  fi
11686  while true; do
11687    cat conftest.in conftest.in >conftest.tmp
11688    mv conftest.tmp conftest.in
11689    cp conftest.in conftest.nl
11690    echo >>conftest.nl
11691    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
11692    cmp -s conftest.out conftest.nl || break
11693    # 10000 chars as input seems more than enough
11694    test 10 -lt "$lt_ac_count" && break
11695    lt_ac_count=`expr $lt_ac_count + 1`
11696    if test "$lt_ac_count" -gt "$lt_ac_max"; then
11697      lt_ac_max=$lt_ac_count
11698      lt_cv_path_SED=$lt_ac_sed
11699    fi
11700  done
11701done
11702])
11703SED=$lt_cv_path_SED
11704AC_SUBST([SED])
11705AC_MSG_RESULT([$SED])
11706])#AC_PROG_SED
11707])#m4_ifndef
11708
11709# Old name:
11710AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
11711dnl aclocal-1.4 backwards compatibility:
11712dnl AC_DEFUN([LT_AC_PROG_SED], [])
11713
11714
11715# _LT_CHECK_SHELL_FEATURES
11716# ------------------------
11717# Find out whether the shell is Bourne or XSI compatible,
11718# or has some other useful features.
11719m4_defun([_LT_CHECK_SHELL_FEATURES],
11720[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
11721  lt_unset=unset
11722else
11723  lt_unset=false
11724fi
11725_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
11726
11727# test EBCDIC or ASCII
11728case `echo X|tr X '\101'` in
11729 A) # ASCII based system
11730    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
11731  lt_SP2NL='tr \040 \012'
11732  lt_NL2SP='tr \015\012 \040\040'
11733  ;;
11734 *) # EBCDIC based system
11735  lt_SP2NL='tr \100 \n'
11736  lt_NL2SP='tr \r\n \100\100'
11737  ;;
11738esac
11739_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
11740_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
11741])# _LT_CHECK_SHELL_FEATURES
11742
11743
11744# _LT_PATH_CONVERSION_FUNCTIONS
11745# -----------------------------
11746# Determine what file name conversion functions should be used by
11747# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
11748# for certain cross-compile configurations and native mingw.
11749m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
11750[AC_REQUIRE([AC_CANONICAL_HOST])dnl
11751AC_REQUIRE([AC_CANONICAL_BUILD])dnl
11752AC_MSG_CHECKING([how to convert $build file names to $host format])
11753AC_CACHE_VAL(lt_cv_to_host_file_cmd,
11754[case $host in
11755  *-*-mingw* )
11756    case $build in
11757      *-*-mingw* ) # actually msys
11758        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
11759        ;;
11760      *-*-cygwin* )
11761        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
11762        ;;
11763      * ) # otherwise, assume *nix
11764        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
11765        ;;
11766    esac
11767    ;;
11768  *-*-cygwin* )
11769    case $build in
11770      *-*-mingw* ) # actually msys
11771        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
11772        ;;
11773      *-*-cygwin* )
11774        lt_cv_to_host_file_cmd=func_convert_file_noop
11775        ;;
11776      * ) # otherwise, assume *nix
11777        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
11778        ;;
11779    esac
11780    ;;
11781  * ) # unhandled hosts (and "normal" native builds)
11782    lt_cv_to_host_file_cmd=func_convert_file_noop
11783    ;;
11784esac
11785])
11786to_host_file_cmd=$lt_cv_to_host_file_cmd
11787AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
11788_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
11789         [0], [convert $build file names to $host format])dnl
11790
11791AC_MSG_CHECKING([how to convert $build file names to toolchain format])
11792AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
11793[#assume ordinary cross tools, or native build.
11794lt_cv_to_tool_file_cmd=func_convert_file_noop
11795case $host in
11796  *-*-mingw* )
11797    case $build in
11798      *-*-mingw* ) # actually msys
11799        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
11800        ;;
11801    esac
11802    ;;
11803esac
11804])
11805to_tool_file_cmd=$lt_cv_to_tool_file_cmd
11806AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
11807_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
11808         [0], [convert $build files to toolchain format])dnl
11809])# _LT_PATH_CONVERSION_FUNCTIONS
11810
11811# Helper functions for option handling.                    -*- Autoconf -*-
11812#
11813#   Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 Free
11814#   Software Foundation, Inc.
11815#   Written by Gary V. Vaughan, 2004
11816#
11817# This file is free software; the Free Software Foundation gives
11818# unlimited permission to copy and/or distribute it, with or without
11819# modifications, as long as this notice is preserved.
11820
11821# serial 8 ltoptions.m4
11822
11823# This is to help aclocal find these macros, as it can't see m4_define.
11824AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
11825
11826
11827# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
11828# ------------------------------------------
11829m4_define([_LT_MANGLE_OPTION],
11830[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
11831
11832
11833# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
11834# ---------------------------------------
11835# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
11836# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
11837# saved as a flag.
11838m4_define([_LT_SET_OPTION],
11839[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
11840m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
11841        _LT_MANGLE_DEFUN([$1], [$2]),
11842    [m4_warning([Unknown $1 option '$2'])])[]dnl
11843])
11844
11845
11846# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
11847# ------------------------------------------------------------
11848# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
11849m4_define([_LT_IF_OPTION],
11850[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
11851
11852
11853# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
11854# -------------------------------------------------------
11855# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
11856# are set.
11857m4_define([_LT_UNLESS_OPTIONS],
11858[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
11859	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
11860		      [m4_define([$0_found])])])[]dnl
11861m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
11862])[]dnl
11863])
11864
11865
11866# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
11867# ----------------------------------------
11868# OPTION-LIST is a space-separated list of Libtool options associated
11869# with MACRO-NAME.  If any OPTION has a matching handler declared with
11870# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
11871# the unknown option and exit.
11872m4_defun([_LT_SET_OPTIONS],
11873[# Set options
11874m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
11875    [_LT_SET_OPTION([$1], _LT_Option)])
11876
11877m4_if([$1],[LT_INIT],[
11878  dnl
11879  dnl Simply set some default values (i.e off) if boolean options were not
11880  dnl specified:
11881  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
11882  ])
11883  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
11884  ])
11885  dnl
11886  dnl If no reference was made to various pairs of opposing options, then
11887  dnl we run the default mode handler for the pair.  For example, if neither
11888  dnl 'shared' nor 'disable-shared' was passed, we enable building of shared
11889  dnl archives by default:
11890  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
11891  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
11892  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
11893  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
11894		   [_LT_ENABLE_FAST_INSTALL])
11895  _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4],
11896		   [_LT_WITH_AIX_SONAME([aix])])
11897  ])
11898])# _LT_SET_OPTIONS
11899
11900
11901
11902# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
11903# -----------------------------------------
11904m4_define([_LT_MANGLE_DEFUN],
11905[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
11906
11907
11908# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
11909# -----------------------------------------------
11910m4_define([LT_OPTION_DEFINE],
11911[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
11912])# LT_OPTION_DEFINE
11913
11914
11915# dlopen
11916# ------
11917LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
11918])
11919
11920AU_DEFUN([AC_LIBTOOL_DLOPEN],
11921[_LT_SET_OPTION([LT_INIT], [dlopen])
11922AC_DIAGNOSE([obsolete],
11923[$0: Remove this warning and the call to _LT_SET_OPTION when you
11924put the 'dlopen' option into LT_INIT's first parameter.])
11925])
11926
11927dnl aclocal-1.4 backwards compatibility:
11928dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
11929
11930
11931# win32-dll
11932# ---------
11933# Declare package support for building win32 dll's.
11934LT_OPTION_DEFINE([LT_INIT], [win32-dll],
11935[enable_win32_dll=yes
11936
11937case $host in
11938*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
11939  AC_CHECK_TOOL(AS, as, false)
11940  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
11941  AC_CHECK_TOOL(OBJDUMP, objdump, false)
11942  ;;
11943esac
11944
11945test -z "$AS" && AS=as
11946_LT_DECL([], [AS],      [1], [Assembler program])dnl
11947
11948test -z "$DLLTOOL" && DLLTOOL=dlltool
11949_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
11950
11951test -z "$OBJDUMP" && OBJDUMP=objdump
11952_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
11953])# win32-dll
11954
11955AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
11956[AC_REQUIRE([AC_CANONICAL_HOST])dnl
11957_LT_SET_OPTION([LT_INIT], [win32-dll])
11958AC_DIAGNOSE([obsolete],
11959[$0: Remove this warning and the call to _LT_SET_OPTION when you
11960put the 'win32-dll' option into LT_INIT's first parameter.])
11961])
11962
11963dnl aclocal-1.4 backwards compatibility:
11964dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
11965
11966
11967# _LT_ENABLE_SHARED([DEFAULT])
11968# ----------------------------
11969# implement the --enable-shared flag, and supports the 'shared' and
11970# 'disable-shared' LT_INIT options.
11971# DEFAULT is either 'yes' or 'no'.  If omitted, it defaults to 'yes'.
11972m4_define([_LT_ENABLE_SHARED],
11973[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
11974AC_ARG_ENABLE([shared],
11975    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
11976	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
11977    [p=${PACKAGE-default}
11978    case $enableval in
11979    yes) enable_shared=yes ;;
11980    no) enable_shared=no ;;
11981    *)
11982      enable_shared=no
11983      # Look at the argument we got.  We use all the common list separators.
11984      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
11985      for pkg in $enableval; do
11986	IFS=$lt_save_ifs
11987	if test "X$pkg" = "X$p"; then
11988	  enable_shared=yes
11989	fi
11990      done
11991      IFS=$lt_save_ifs
11992      ;;
11993    esac],
11994    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
11995
11996    _LT_DECL([build_libtool_libs], [enable_shared], [0],
11997	[Whether or not to build shared libraries])
11998])# _LT_ENABLE_SHARED
11999
12000LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
12001LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
12002
12003# Old names:
12004AC_DEFUN([AC_ENABLE_SHARED],
12005[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
12006])
12007
12008AC_DEFUN([AC_DISABLE_SHARED],
12009[_LT_SET_OPTION([LT_INIT], [disable-shared])
12010])
12011
12012AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
12013AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
12014
12015dnl aclocal-1.4 backwards compatibility:
12016dnl AC_DEFUN([AM_ENABLE_SHARED], [])
12017dnl AC_DEFUN([AM_DISABLE_SHARED], [])
12018
12019
12020
12021# _LT_ENABLE_STATIC([DEFAULT])
12022# ----------------------------
12023# implement the --enable-static flag, and support the 'static' and
12024# 'disable-static' LT_INIT options.
12025# DEFAULT is either 'yes' or 'no'.  If omitted, it defaults to 'yes'.
12026m4_define([_LT_ENABLE_STATIC],
12027[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
12028AC_ARG_ENABLE([static],
12029    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
12030	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
12031    [p=${PACKAGE-default}
12032    case $enableval in
12033    yes) enable_static=yes ;;
12034    no) enable_static=no ;;
12035    *)
12036     enable_static=no
12037      # Look at the argument we got.  We use all the common list separators.
12038      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
12039      for pkg in $enableval; do
12040	IFS=$lt_save_ifs
12041	if test "X$pkg" = "X$p"; then
12042	  enable_static=yes
12043	fi
12044      done
12045      IFS=$lt_save_ifs
12046      ;;
12047    esac],
12048    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
12049
12050    _LT_DECL([build_old_libs], [enable_static], [0],
12051	[Whether or not to build static libraries])
12052])# _LT_ENABLE_STATIC
12053
12054LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
12055LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
12056
12057# Old names:
12058AC_DEFUN([AC_ENABLE_STATIC],
12059[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
12060])
12061
12062AC_DEFUN([AC_DISABLE_STATIC],
12063[_LT_SET_OPTION([LT_INIT], [disable-static])
12064])
12065
12066AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
12067AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
12068
12069dnl aclocal-1.4 backwards compatibility:
12070dnl AC_DEFUN([AM_ENABLE_STATIC], [])
12071dnl AC_DEFUN([AM_DISABLE_STATIC], [])
12072
12073
12074
12075# _LT_ENABLE_FAST_INSTALL([DEFAULT])
12076# ----------------------------------
12077# implement the --enable-fast-install flag, and support the 'fast-install'
12078# and 'disable-fast-install' LT_INIT options.
12079# DEFAULT is either 'yes' or 'no'.  If omitted, it defaults to 'yes'.
12080m4_define([_LT_ENABLE_FAST_INSTALL],
12081[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
12082AC_ARG_ENABLE([fast-install],
12083    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
12084    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
12085    [p=${PACKAGE-default}
12086    case $enableval in
12087    yes) enable_fast_install=yes ;;
12088    no) enable_fast_install=no ;;
12089    *)
12090      enable_fast_install=no
12091      # Look at the argument we got.  We use all the common list separators.
12092      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
12093      for pkg in $enableval; do
12094	IFS=$lt_save_ifs
12095	if test "X$pkg" = "X$p"; then
12096	  enable_fast_install=yes
12097	fi
12098      done
12099      IFS=$lt_save_ifs
12100      ;;
12101    esac],
12102    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
12103
12104_LT_DECL([fast_install], [enable_fast_install], [0],
12105	 [Whether or not to optimize for fast installation])dnl
12106])# _LT_ENABLE_FAST_INSTALL
12107
12108LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
12109LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
12110
12111# Old names:
12112AU_DEFUN([AC_ENABLE_FAST_INSTALL],
12113[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
12114AC_DIAGNOSE([obsolete],
12115[$0: Remove this warning and the call to _LT_SET_OPTION when you put
12116the 'fast-install' option into LT_INIT's first parameter.])
12117])
12118
12119AU_DEFUN([AC_DISABLE_FAST_INSTALL],
12120[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
12121AC_DIAGNOSE([obsolete],
12122[$0: Remove this warning and the call to _LT_SET_OPTION when you put
12123the 'disable-fast-install' option into LT_INIT's first parameter.])
12124])
12125
12126dnl aclocal-1.4 backwards compatibility:
12127dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
12128dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
12129
12130
12131# _LT_WITH_AIX_SONAME([DEFAULT])
12132# ----------------------------------
12133# implement the --with-aix-soname flag, and support the `aix-soname=aix'
12134# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT
12135# is either `aix', `both' or `svr4'.  If omitted, it defaults to `aix'.
12136m4_define([_LT_WITH_AIX_SONAME],
12137[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl
12138shared_archive_member_spec=
12139case $host,$enable_shared in
12140power*-*-aix[[5-9]]*,yes)
12141  AC_MSG_CHECKING([which variant of shared library versioning to provide])
12142  AC_ARG_WITH([aix-soname],
12143    [AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
12144      [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])],
12145    [case $withval in
12146    aix|svr4|both)
12147      ;;
12148    *)
12149      AC_MSG_ERROR([Unknown argument to --with-aix-soname])
12150      ;;
12151    esac
12152    lt_cv_with_aix_soname=$with_aix_soname],
12153    [AC_CACHE_VAL([lt_cv_with_aix_soname],
12154      [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)
12155    with_aix_soname=$lt_cv_with_aix_soname])
12156  AC_MSG_RESULT([$with_aix_soname])
12157  if test aix != "$with_aix_soname"; then
12158    # For the AIX way of multilib, we name the shared archive member
12159    # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
12160    # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
12161    # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
12162    # the AIX toolchain works better with OBJECT_MODE set (default 32).
12163    if test 64 = "${OBJECT_MODE-32}"; then
12164      shared_archive_member_spec=shr_64
12165    else
12166      shared_archive_member_spec=shr
12167    fi
12168  fi
12169  ;;
12170*)
12171  with_aix_soname=aix
12172  ;;
12173esac
12174
12175_LT_DECL([], [shared_archive_member_spec], [0],
12176    [Shared archive member basename, for filename based shared library versioning on AIX])dnl
12177])# _LT_WITH_AIX_SONAME
12178
12179LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])])
12180LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])])
12181LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])])
12182
12183
12184# _LT_WITH_PIC([MODE])
12185# --------------------
12186# implement the --with-pic flag, and support the 'pic-only' and 'no-pic'
12187# LT_INIT options.
12188# MODE is either 'yes' or 'no'.  If omitted, it defaults to 'both'.
12189m4_define([_LT_WITH_PIC],
12190[AC_ARG_WITH([pic],
12191    [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
12192	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
12193    [lt_p=${PACKAGE-default}
12194    case $withval in
12195    yes|no) pic_mode=$withval ;;
12196    *)
12197      pic_mode=default
12198      # Look at the argument we got.  We use all the common list separators.
12199      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
12200      for lt_pkg in $withval; do
12201	IFS=$lt_save_ifs
12202	if test "X$lt_pkg" = "X$lt_p"; then
12203	  pic_mode=yes
12204	fi
12205      done
12206      IFS=$lt_save_ifs
12207      ;;
12208    esac],
12209    [pic_mode=m4_default([$1], [default])])
12210
12211_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
12212])# _LT_WITH_PIC
12213
12214LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
12215LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
12216
12217# Old name:
12218AU_DEFUN([AC_LIBTOOL_PICMODE],
12219[_LT_SET_OPTION([LT_INIT], [pic-only])
12220AC_DIAGNOSE([obsolete],
12221[$0: Remove this warning and the call to _LT_SET_OPTION when you
12222put the 'pic-only' option into LT_INIT's first parameter.])
12223])
12224
12225dnl aclocal-1.4 backwards compatibility:
12226dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
12227
12228
12229m4_define([_LTDL_MODE], [])
12230LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
12231		 [m4_define([_LTDL_MODE], [nonrecursive])])
12232LT_OPTION_DEFINE([LTDL_INIT], [recursive],
12233		 [m4_define([_LTDL_MODE], [recursive])])
12234LT_OPTION_DEFINE([LTDL_INIT], [subproject],
12235		 [m4_define([_LTDL_MODE], [subproject])])
12236
12237m4_define([_LTDL_TYPE], [])
12238LT_OPTION_DEFINE([LTDL_INIT], [installable],
12239		 [m4_define([_LTDL_TYPE], [installable])])
12240LT_OPTION_DEFINE([LTDL_INIT], [convenience],
12241		 [m4_define([_LTDL_TYPE], [convenience])])
12242
12243# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
12244#
12245# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 Free Software
12246# Foundation, Inc.
12247# Written by Gary V. Vaughan, 2004
12248#
12249# This file is free software; the Free Software Foundation gives
12250# unlimited permission to copy and/or distribute it, with or without
12251# modifications, as long as this notice is preserved.
12252
12253# serial 6 ltsugar.m4
12254
12255# This is to help aclocal find these macros, as it can't see m4_define.
12256AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
12257
12258
12259# lt_join(SEP, ARG1, [ARG2...])
12260# -----------------------------
12261# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
12262# associated separator.
12263# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
12264# versions in m4sugar had bugs.
12265m4_define([lt_join],
12266[m4_if([$#], [1], [],
12267       [$#], [2], [[$2]],
12268       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
12269m4_define([_lt_join],
12270[m4_if([$#$2], [2], [],
12271       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
12272
12273
12274# lt_car(LIST)
12275# lt_cdr(LIST)
12276# ------------
12277# Manipulate m4 lists.
12278# These macros are necessary as long as will still need to support
12279# Autoconf-2.59, which quotes differently.
12280m4_define([lt_car], [[$1]])
12281m4_define([lt_cdr],
12282[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
12283       [$#], 1, [],
12284       [m4_dquote(m4_shift($@))])])
12285m4_define([lt_unquote], $1)
12286
12287
12288# lt_append(MACRO-NAME, STRING, [SEPARATOR])
12289# ------------------------------------------
12290# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'.
12291# Note that neither SEPARATOR nor STRING are expanded; they are appended
12292# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
12293# No SEPARATOR is output if MACRO-NAME was previously undefined (different
12294# than defined and empty).
12295#
12296# This macro is needed until we can rely on Autoconf 2.62, since earlier
12297# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
12298m4_define([lt_append],
12299[m4_define([$1],
12300	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
12301
12302
12303
12304# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
12305# ----------------------------------------------------------
12306# Produce a SEP delimited list of all paired combinations of elements of
12307# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
12308# has the form PREFIXmINFIXSUFFIXn.
12309# Needed until we can rely on m4_combine added in Autoconf 2.62.
12310m4_define([lt_combine],
12311[m4_if(m4_eval([$# > 3]), [1],
12312       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
12313[[m4_foreach([_Lt_prefix], [$2],
12314	     [m4_foreach([_Lt_suffix],
12315		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
12316	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
12317
12318
12319# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
12320# -----------------------------------------------------------------------
12321# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
12322# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
12323m4_define([lt_if_append_uniq],
12324[m4_ifdef([$1],
12325	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
12326		 [lt_append([$1], [$2], [$3])$4],
12327		 [$5])],
12328	  [lt_append([$1], [$2], [$3])$4])])
12329
12330
12331# lt_dict_add(DICT, KEY, VALUE)
12332# -----------------------------
12333m4_define([lt_dict_add],
12334[m4_define([$1($2)], [$3])])
12335
12336
12337# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
12338# --------------------------------------------
12339m4_define([lt_dict_add_subkey],
12340[m4_define([$1($2:$3)], [$4])])
12341
12342
12343# lt_dict_fetch(DICT, KEY, [SUBKEY])
12344# ----------------------------------
12345m4_define([lt_dict_fetch],
12346[m4_ifval([$3],
12347	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
12348    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
12349
12350
12351# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
12352# -----------------------------------------------------------------
12353m4_define([lt_if_dict_fetch],
12354[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
12355	[$5],
12356    [$6])])
12357
12358
12359# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
12360# --------------------------------------------------------------
12361m4_define([lt_dict_filter],
12362[m4_if([$5], [], [],
12363  [lt_join(m4_quote(m4_default([$4], [[, ]])),
12364           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
12365		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
12366])
12367
12368# ltversion.m4 -- version numbers			-*- Autoconf -*-
12369#
12370#   Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation,
12371#   Inc.
12372#   Written by Scott James Remnant, 2004
12373#
12374# This file is free software; the Free Software Foundation gives
12375# unlimited permission to copy and/or distribute it, with or without
12376# modifications, as long as this notice is preserved.
12377
12378# @configure_input@
12379
12380# serial 4245 ltversion.m4
12381# This file is part of GNU Libtool
12382
12383m4_define([LT_PACKAGE_VERSION], [2.4.7])
12384m4_define([LT_PACKAGE_REVISION], [2.4.7])
12385
12386AC_DEFUN([LTVERSION_VERSION],
12387[macro_version='2.4.7'
12388macro_revision='2.4.7'
12389_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
12390_LT_DECL(, macro_revision, 0)
12391])
12392
12393# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
12394#
12395#   Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2022 Free
12396#   Software Foundation, Inc.
12397#   Written by Scott James Remnant, 2004.
12398#
12399# This file is free software; the Free Software Foundation gives
12400# unlimited permission to copy and/or distribute it, with or without
12401# modifications, as long as this notice is preserved.
12402
12403# serial 5 lt~obsolete.m4
12404
12405# These exist entirely to fool aclocal when bootstrapping libtool.
12406#
12407# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN),
12408# which have later been changed to m4_define as they aren't part of the
12409# exported API, or moved to Autoconf or Automake where they belong.
12410#
12411# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
12412# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
12413# using a macro with the same name in our local m4/libtool.m4 it'll
12414# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
12415# and doesn't know about Autoconf macros at all.)
12416#
12417# So we provide this file, which has a silly filename so it's always
12418# included after everything else.  This provides aclocal with the
12419# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
12420# because those macros already exist, or will be overwritten later.
12421# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
12422#
12423# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
12424# Yes, that means every name once taken will need to remain here until
12425# we give up compatibility with versions before 1.7, at which point
12426# we need to keep only those names which we still refer to.
12427
12428# This is to help aclocal find these macros, as it can't see m4_define.
12429AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
12430
12431m4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
12432m4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
12433m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
12434m4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
12435m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
12436m4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
12437m4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
12438m4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
12439m4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
12440m4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
12441m4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
12442m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
12443m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
12444m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
12445m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
12446m4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
12447m4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
12448m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
12449m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
12450m4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
12451m4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
12452m4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
12453m4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
12454m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
12455m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
12456m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
12457m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
12458m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
12459m4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
12460m4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
12461m4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
12462m4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
12463m4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
12464m4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
12465m4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
12466m4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
12467m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
12468m4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
12469m4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
12470m4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
12471m4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
12472m4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
12473m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
12474m4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
12475m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
12476m4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
12477m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
12478m4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
12479m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
12480m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
12481m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
12482m4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
12483m4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
12484m4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
12485m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS],	[AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
12486m4_ifndef([_LT_AC_PROG_CXXCPP],		[AC_DEFUN([_LT_AC_PROG_CXXCPP])])
12487m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS],	[AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
12488m4_ifndef([_LT_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
12489m4_ifndef([_LT_PROG_F77],		[AC_DEFUN([_LT_PROG_F77])])
12490m4_ifndef([_LT_PROG_FC],		[AC_DEFUN([_LT_PROG_FC])])
12491m4_ifndef([_LT_PROG_CXX],		[AC_DEFUN([_LT_PROG_CXX])])
12492
12493