aclocal.m4 revision 2a53b785
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# Check to see how 'make' treats includes.	            -*- Autoconf -*-
659
660# Copyright (C) 2001-2021 Free Software Foundation, Inc.
661#
662# This file is free software; the Free Software Foundation
663# gives unlimited permission to copy and/or distribute it,
664# with or without modifications, as long as this notice is preserved.
665
666# AM_MAKE_INCLUDE()
667# -----------------
668# Check whether make has an 'include' directive that can support all
669# the idioms we need for our automatic dependency tracking code.
670AC_DEFUN([AM_MAKE_INCLUDE],
671[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive])
672cat > confinc.mk << 'END'
673am__doit:
674	@echo this is the am__doit target >confinc.out
675.PHONY: am__doit
676END
677am__include="#"
678am__quote=
679# BSD make does it like this.
680echo '.include "confinc.mk" # ignored' > confmf.BSD
681# Other make implementations (GNU, Solaris 10, AIX) do it like this.
682echo 'include confinc.mk # ignored' > confmf.GNU
683_am_result=no
684for s in GNU BSD; do
685  AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out])
686  AS_CASE([$?:`cat confinc.out 2>/dev/null`],
687      ['0:this is the am__doit target'],
688      [AS_CASE([$s],
689          [BSD], [am__include='.include' am__quote='"'],
690          [am__include='include' am__quote=''])])
691  if test "$am__include" != "#"; then
692    _am_result="yes ($s style)"
693    break
694  fi
695done
696rm -f confinc.* confmf.*
697AC_MSG_RESULT([${_am_result}])
698AC_SUBST([am__include])])
699AC_SUBST([am__quote])])
700
701# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
702
703# Copyright (C) 1997-2021 Free Software Foundation, Inc.
704#
705# This file is free software; the Free Software Foundation
706# gives unlimited permission to copy and/or distribute it,
707# with or without modifications, as long as this notice is preserved.
708
709# AM_MISSING_PROG(NAME, PROGRAM)
710# ------------------------------
711AC_DEFUN([AM_MISSING_PROG],
712[AC_REQUIRE([AM_MISSING_HAS_RUN])
713$1=${$1-"${am_missing_run}$2"}
714AC_SUBST($1)])
715
716# AM_MISSING_HAS_RUN
717# ------------------
718# Define MISSING if not defined so far and test if it is modern enough.
719# If it is, set am_missing_run to use it, otherwise, to nothing.
720AC_DEFUN([AM_MISSING_HAS_RUN],
721[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
722AC_REQUIRE_AUX_FILE([missing])dnl
723if test x"${MISSING+set}" != xset; then
724  MISSING="\${SHELL} '$am_aux_dir/missing'"
725fi
726# Use eval to expand $SHELL
727if eval "$MISSING --is-lightweight"; then
728  am_missing_run="$MISSING "
729else
730  am_missing_run=
731  AC_MSG_WARN(['missing' script is too old or missing])
732fi
733])
734
735# Helper functions for option handling.                     -*- Autoconf -*-
736
737# Copyright (C) 2001-2021 Free Software Foundation, Inc.
738#
739# This file is free software; the Free Software Foundation
740# gives unlimited permission to copy and/or distribute it,
741# with or without modifications, as long as this notice is preserved.
742
743# _AM_MANGLE_OPTION(NAME)
744# -----------------------
745AC_DEFUN([_AM_MANGLE_OPTION],
746[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
747
748# _AM_SET_OPTION(NAME)
749# --------------------
750# Set option NAME.  Presently that only means defining a flag for this option.
751AC_DEFUN([_AM_SET_OPTION],
752[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
753
754# _AM_SET_OPTIONS(OPTIONS)
755# ------------------------
756# OPTIONS is a space-separated list of Automake options.
757AC_DEFUN([_AM_SET_OPTIONS],
758[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
759
760# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
761# -------------------------------------------
762# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
763AC_DEFUN([_AM_IF_OPTION],
764[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
765
766# Copyright (C) 1999-2021 Free Software Foundation, Inc.
767#
768# This file is free software; the Free Software Foundation
769# gives unlimited permission to copy and/or distribute it,
770# with or without modifications, as long as this notice is preserved.
771
772# _AM_PROG_CC_C_O
773# ---------------
774# Like AC_PROG_CC_C_O, but changed for automake.  We rewrite AC_PROG_CC
775# to automatically call this.
776AC_DEFUN([_AM_PROG_CC_C_O],
777[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
778AC_REQUIRE_AUX_FILE([compile])dnl
779AC_LANG_PUSH([C])dnl
780AC_CACHE_CHECK(
781  [whether $CC understands -c and -o together],
782  [am_cv_prog_cc_c_o],
783  [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
784  # Make sure it works both with $CC and with simple cc.
785  # Following AC_PROG_CC_C_O, we do the test twice because some
786  # compilers refuse to overwrite an existing .o file with -o,
787  # though they will create one.
788  am_cv_prog_cc_c_o=yes
789  for am_i in 1 2; do
790    if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
791         && test -f conftest2.$ac_objext; then
792      : OK
793    else
794      am_cv_prog_cc_c_o=no
795      break
796    fi
797  done
798  rm -f core conftest*
799  unset am_i])
800if test "$am_cv_prog_cc_c_o" != yes; then
801   # Losing compiler, so override with the script.
802   # FIXME: It is wrong to rewrite CC.
803   # But if we don't then we get into trouble of one sort or another.
804   # A longer-term fix would be to have automake use am__CC in this case,
805   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
806   CC="$am_aux_dir/compile $CC"
807fi
808AC_LANG_POP([C])])
809
810# For backward compatibility.
811AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
812
813# Copyright (C) 2001-2021 Free Software Foundation, Inc.
814#
815# This file is free software; the Free Software Foundation
816# gives unlimited permission to copy and/or distribute it,
817# with or without modifications, as long as this notice is preserved.
818
819# AM_RUN_LOG(COMMAND)
820# -------------------
821# Run COMMAND, save the exit status in ac_status, and log it.
822# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
823AC_DEFUN([AM_RUN_LOG],
824[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
825   ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
826   ac_status=$?
827   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
828   (exit $ac_status); }])
829
830# Check to make sure that the build environment is sane.    -*- Autoconf -*-
831
832# Copyright (C) 1996-2021 Free Software Foundation, Inc.
833#
834# This file is free software; the Free Software Foundation
835# gives unlimited permission to copy and/or distribute it,
836# with or without modifications, as long as this notice is preserved.
837
838# AM_SANITY_CHECK
839# ---------------
840AC_DEFUN([AM_SANITY_CHECK],
841[AC_MSG_CHECKING([whether build environment is sane])
842# Reject unsafe characters in $srcdir or the absolute working directory
843# name.  Accept space and tab only in the latter.
844am_lf='
845'
846case `pwd` in
847  *[[\\\"\#\$\&\'\`$am_lf]]*)
848    AC_MSG_ERROR([unsafe absolute working directory name]);;
849esac
850case $srcdir in
851  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
852    AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
853esac
854
855# Do 'set' in a subshell so we don't clobber the current shell's
856# arguments.  Must try -L first in case configure is actually a
857# symlink; some systems play weird games with the mod time of symlinks
858# (eg FreeBSD returns the mod time of the symlink's containing
859# directory).
860if (
861   am_has_slept=no
862   for am_try in 1 2; do
863     echo "timestamp, slept: $am_has_slept" > conftest.file
864     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
865     if test "$[*]" = "X"; then
866	# -L didn't work.
867	set X `ls -t "$srcdir/configure" conftest.file`
868     fi
869     if test "$[*]" != "X $srcdir/configure conftest.file" \
870	&& test "$[*]" != "X conftest.file $srcdir/configure"; then
871
872	# If neither matched, then we have a broken ls.  This can happen
873	# if, for instance, CONFIG_SHELL is bash and it inherits a
874	# broken ls alias from the environment.  This has actually
875	# happened.  Such a system could not be considered "sane".
876	AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
877  alias in your environment])
878     fi
879     if test "$[2]" = conftest.file || test $am_try -eq 2; then
880       break
881     fi
882     # Just in case.
883     sleep 1
884     am_has_slept=yes
885   done
886   test "$[2]" = conftest.file
887   )
888then
889   # Ok.
890   :
891else
892   AC_MSG_ERROR([newly created file is older than distributed files!
893Check your system clock])
894fi
895AC_MSG_RESULT([yes])
896# If we didn't sleep, we still need to ensure time stamps of config.status and
897# generated files are strictly newer.
898am_sleep_pid=
899if grep 'slept: no' conftest.file >/dev/null 2>&1; then
900  ( sleep 1 ) &
901  am_sleep_pid=$!
902fi
903AC_CONFIG_COMMANDS_PRE(
904  [AC_MSG_CHECKING([that generated files are newer than configure])
905   if test -n "$am_sleep_pid"; then
906     # Hide warnings about reused PIDs.
907     wait $am_sleep_pid 2>/dev/null
908   fi
909   AC_MSG_RESULT([done])])
910rm -f conftest.file
911])
912
913# Copyright (C) 2009-2021 Free Software Foundation, Inc.
914#
915# This file is free software; the Free Software Foundation
916# gives unlimited permission to copy and/or distribute it,
917# with or without modifications, as long as this notice is preserved.
918
919# AM_SILENT_RULES([DEFAULT])
920# --------------------------
921# Enable less verbose build rules; with the default set to DEFAULT
922# ("yes" being less verbose, "no" or empty being verbose).
923AC_DEFUN([AM_SILENT_RULES],
924[AC_ARG_ENABLE([silent-rules], [dnl
925AS_HELP_STRING(
926  [--enable-silent-rules],
927  [less verbose build output (undo: "make V=1")])
928AS_HELP_STRING(
929  [--disable-silent-rules],
930  [verbose build output (undo: "make V=0")])dnl
931])
932case $enable_silent_rules in @%:@ (((
933  yes) AM_DEFAULT_VERBOSITY=0;;
934   no) AM_DEFAULT_VERBOSITY=1;;
935    *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
936esac
937dnl
938dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
939dnl do not support nested variable expansions.
940dnl See automake bug#9928 and bug#10237.
941am_make=${MAKE-make}
942AC_CACHE_CHECK([whether $am_make supports nested variables],
943   [am_cv_make_support_nested_variables],
944   [if AS_ECHO([['TRUE=$(BAR$(V))
945BAR0=false
946BAR1=true
947V=1
948am__doit:
949	@$(TRUE)
950.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
951  am_cv_make_support_nested_variables=yes
952else
953  am_cv_make_support_nested_variables=no
954fi])
955if test $am_cv_make_support_nested_variables = yes; then
956  dnl Using '$V' instead of '$(V)' breaks IRIX make.
957  AM_V='$(V)'
958  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
959else
960  AM_V=$AM_DEFAULT_VERBOSITY
961  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
962fi
963AC_SUBST([AM_V])dnl
964AM_SUBST_NOTMAKE([AM_V])dnl
965AC_SUBST([AM_DEFAULT_V])dnl
966AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
967AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
968AM_BACKSLASH='\'
969AC_SUBST([AM_BACKSLASH])dnl
970_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
971])
972
973# Copyright (C) 2001-2021 Free Software Foundation, Inc.
974#
975# This file is free software; the Free Software Foundation
976# gives unlimited permission to copy and/or distribute it,
977# with or without modifications, as long as this notice is preserved.
978
979# AM_PROG_INSTALL_STRIP
980# ---------------------
981# One issue with vendor 'install' (even GNU) is that you can't
982# specify the program used to strip binaries.  This is especially
983# annoying in cross-compiling environments, where the build's strip
984# is unlikely to handle the host's binaries.
985# Fortunately install-sh will honor a STRIPPROG variable, so we
986# always use install-sh in "make install-strip", and initialize
987# STRIPPROG with the value of the STRIP variable (set by the user).
988AC_DEFUN([AM_PROG_INSTALL_STRIP],
989[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
990# Installed binaries are usually stripped using 'strip' when the user
991# run "make install-strip".  However 'strip' might not be the right
992# tool to use in cross-compilation environments, therefore Automake
993# will honor the 'STRIP' environment variable to overrule this program.
994dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
995if test "$cross_compiling" != no; then
996  AC_CHECK_TOOL([STRIP], [strip], :)
997fi
998INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
999AC_SUBST([INSTALL_STRIP_PROGRAM])])
1000
1001# Copyright (C) 2006-2021 Free Software Foundation, Inc.
1002#
1003# This file is free software; the Free Software Foundation
1004# gives unlimited permission to copy and/or distribute it,
1005# with or without modifications, as long as this notice is preserved.
1006
1007# _AM_SUBST_NOTMAKE(VARIABLE)
1008# ---------------------------
1009# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1010# This macro is traced by Automake.
1011AC_DEFUN([_AM_SUBST_NOTMAKE])
1012
1013# AM_SUBST_NOTMAKE(VARIABLE)
1014# --------------------------
1015# Public sister of _AM_SUBST_NOTMAKE.
1016AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1017
1018# Check how to create a tarball.                            -*- Autoconf -*-
1019
1020# Copyright (C) 2004-2021 Free Software Foundation, Inc.
1021#
1022# This file is free software; the Free Software Foundation
1023# gives unlimited permission to copy and/or distribute it,
1024# with or without modifications, as long as this notice is preserved.
1025
1026# _AM_PROG_TAR(FORMAT)
1027# --------------------
1028# Check how to create a tarball in format FORMAT.
1029# FORMAT should be one of 'v7', 'ustar', or 'pax'.
1030#
1031# Substitute a variable $(am__tar) that is a command
1032# writing to stdout a FORMAT-tarball containing the directory
1033# $tardir.
1034#     tardir=directory && $(am__tar) > result.tar
1035#
1036# Substitute a variable $(am__untar) that extract such
1037# a tarball read from stdin.
1038#     $(am__untar) < result.tar
1039#
1040AC_DEFUN([_AM_PROG_TAR],
1041[# Always define AMTAR for backward compatibility.  Yes, it's still used
1042# in the wild :-(  We should find a proper way to deprecate it ...
1043AC_SUBST([AMTAR], ['$${TAR-tar}'])
1044
1045# We'll loop over all known methods to create a tar archive until one works.
1046_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1047
1048m4_if([$1], [v7],
1049  [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
1050
1051  [m4_case([$1],
1052    [ustar],
1053     [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
1054      # There is notably a 21 bits limit for the UID and the GID.  In fact,
1055      # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
1056      # and bug#13588).
1057      am_max_uid=2097151 # 2^21 - 1
1058      am_max_gid=$am_max_uid
1059      # The $UID and $GID variables are not portable, so we need to resort
1060      # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
1061      # below are definitely unexpected, so allow the users to see them
1062      # (that is, avoid stderr redirection).
1063      am_uid=`id -u || echo unknown`
1064      am_gid=`id -g || echo unknown`
1065      AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
1066      if test $am_uid -le $am_max_uid; then
1067         AC_MSG_RESULT([yes])
1068      else
1069         AC_MSG_RESULT([no])
1070         _am_tools=none
1071      fi
1072      AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
1073      if test $am_gid -le $am_max_gid; then
1074         AC_MSG_RESULT([yes])
1075      else
1076        AC_MSG_RESULT([no])
1077        _am_tools=none
1078      fi],
1079
1080  [pax],
1081    [],
1082
1083  [m4_fatal([Unknown tar format])])
1084
1085  AC_MSG_CHECKING([how to create a $1 tar archive])
1086
1087  # Go ahead even if we have the value already cached.  We do so because we
1088  # need to set the values for the 'am__tar' and 'am__untar' variables.
1089  _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1090
1091  for _am_tool in $_am_tools; do
1092    case $_am_tool in
1093    gnutar)
1094      for _am_tar in tar gnutar gtar; do
1095        AM_RUN_LOG([$_am_tar --version]) && break
1096      done
1097      am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1098      am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1099      am__untar="$_am_tar -xf -"
1100      ;;
1101    plaintar)
1102      # Must skip GNU tar: if it does not support --format= it doesn't create
1103      # ustar tarball either.
1104      (tar --version) >/dev/null 2>&1 && continue
1105      am__tar='tar chf - "$$tardir"'
1106      am__tar_='tar chf - "$tardir"'
1107      am__untar='tar xf -'
1108      ;;
1109    pax)
1110      am__tar='pax -L -x $1 -w "$$tardir"'
1111      am__tar_='pax -L -x $1 -w "$tardir"'
1112      am__untar='pax -r'
1113      ;;
1114    cpio)
1115      am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1116      am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1117      am__untar='cpio -i -H $1 -d'
1118      ;;
1119    none)
1120      am__tar=false
1121      am__tar_=false
1122      am__untar=false
1123      ;;
1124    esac
1125
1126    # If the value was cached, stop now.  We just wanted to have am__tar
1127    # and am__untar set.
1128    test -n "${am_cv_prog_tar_$1}" && break
1129
1130    # tar/untar a dummy directory, and stop if the command works.
1131    rm -rf conftest.dir
1132    mkdir conftest.dir
1133    echo GrepMe > conftest.dir/file
1134    AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1135    rm -rf conftest.dir
1136    if test -s conftest.tar; then
1137      AM_RUN_LOG([$am__untar <conftest.tar])
1138      AM_RUN_LOG([cat conftest.dir/file])
1139      grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1140    fi
1141  done
1142  rm -rf conftest.dir
1143
1144  AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1145  AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1146
1147AC_SUBST([am__tar])
1148AC_SUBST([am__untar])
1149]) # _AM_PROG_TAR
1150
1151dnl pkg.m4 - Macros to locate and utilise pkg-config.   -*- Autoconf -*-
1152dnl serial 11 (pkg-config-0.29)
1153dnl
1154dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
1155dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
1156dnl
1157dnl This program is free software; you can redistribute it and/or modify
1158dnl it under the terms of the GNU General Public License as published by
1159dnl the Free Software Foundation; either version 2 of the License, or
1160dnl (at your option) any later version.
1161dnl
1162dnl This program is distributed in the hope that it will be useful, but
1163dnl WITHOUT ANY WARRANTY; without even the implied warranty of
1164dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1165dnl General Public License for more details.
1166dnl
1167dnl You should have received a copy of the GNU General Public License
1168dnl along with this program; if not, write to the Free Software
1169dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1170dnl 02111-1307, USA.
1171dnl
1172dnl As a special exception to the GNU General Public License, if you
1173dnl distribute this file as part of a program that contains a
1174dnl configuration script generated by Autoconf, you may include it under
1175dnl the same distribution terms that you use for the rest of that
1176dnl program.
1177
1178dnl PKG_PREREQ(MIN-VERSION)
1179dnl -----------------------
1180dnl Since: 0.29
1181dnl
1182dnl Verify that the version of the pkg-config macros are at least
1183dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
1184dnl installed version of pkg-config, this checks the developer's version
1185dnl of pkg.m4 when generating configure.
1186dnl
1187dnl To ensure that this macro is defined, also add:
1188dnl m4_ifndef([PKG_PREREQ],
1189dnl     [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
1190dnl
1191dnl See the "Since" comment for each macro you use to see what version
1192dnl of the macros you require.
1193m4_defun([PKG_PREREQ],
1194[m4_define([PKG_MACROS_VERSION], [0.29])
1195m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
1196    [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
1197])dnl PKG_PREREQ
1198
1199dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
1200dnl ----------------------------------
1201dnl Since: 0.16
1202dnl
1203dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
1204dnl first found in the path. Checks that the version of pkg-config found
1205dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
1206dnl used since that's the first version where most current features of
1207dnl pkg-config existed.
1208AC_DEFUN([PKG_PROG_PKG_CONFIG],
1209[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
1210m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
1211m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
1212AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
1213AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
1214AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
1215
1216if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
1217	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
1218fi
1219if test -n "$PKG_CONFIG"; then
1220	_pkg_min_version=m4_default([$1], [0.9.0])
1221	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
1222	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
1223		AC_MSG_RESULT([yes])
1224	else
1225		AC_MSG_RESULT([no])
1226		PKG_CONFIG=""
1227	fi
1228fi[]dnl
1229])dnl PKG_PROG_PKG_CONFIG
1230
1231dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
1232dnl -------------------------------------------------------------------
1233dnl Since: 0.18
1234dnl
1235dnl Check to see whether a particular set of modules exists. Similar to
1236dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
1237dnl
1238dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1239dnl only at the first occurence in configure.ac, so if the first place
1240dnl it's called might be skipped (such as if it is within an "if", you
1241dnl have to call PKG_CHECK_EXISTS manually
1242AC_DEFUN([PKG_CHECK_EXISTS],
1243[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1244if test -n "$PKG_CONFIG" && \
1245    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
1246  m4_default([$2], [:])
1247m4_ifvaln([$3], [else
1248  $3])dnl
1249fi])
1250
1251dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
1252dnl ---------------------------------------------
1253dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
1254dnl pkg_failed based on the result.
1255m4_define([_PKG_CONFIG],
1256[if test -n "$$1"; then
1257    pkg_cv_[]$1="$$1"
1258 elif test -n "$PKG_CONFIG"; then
1259    PKG_CHECK_EXISTS([$3],
1260                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
1261		      test "x$?" != "x0" && pkg_failed=yes ],
1262		     [pkg_failed=yes])
1263 else
1264    pkg_failed=untried
1265fi[]dnl
1266])dnl _PKG_CONFIG
1267
1268dnl _PKG_SHORT_ERRORS_SUPPORTED
1269dnl ---------------------------
1270dnl Internal check to see if pkg-config supports short errors.
1271AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
1272[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1273if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
1274        _pkg_short_errors_supported=yes
1275else
1276        _pkg_short_errors_supported=no
1277fi[]dnl
1278])dnl _PKG_SHORT_ERRORS_SUPPORTED
1279
1280
1281dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
1282dnl   [ACTION-IF-NOT-FOUND])
1283dnl --------------------------------------------------------------
1284dnl Since: 0.4.0
1285dnl
1286dnl Note that if there is a possibility the first call to
1287dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
1288dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
1289AC_DEFUN([PKG_CHECK_MODULES],
1290[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1291AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
1292AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
1293
1294pkg_failed=no
1295AC_MSG_CHECKING([for $1])
1296
1297_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
1298_PKG_CONFIG([$1][_LIBS], [libs], [$2])
1299
1300m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
1301and $1[]_LIBS to avoid the need to call pkg-config.
1302See the pkg-config man page for more details.])
1303
1304if test $pkg_failed = yes; then
1305   	AC_MSG_RESULT([no])
1306        _PKG_SHORT_ERRORS_SUPPORTED
1307        if test $_pkg_short_errors_supported = yes; then
1308	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
1309        else 
1310	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
1311        fi
1312	# Put the nasty error message in config.log where it belongs
1313	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
1314
1315	m4_default([$4], [AC_MSG_ERROR(
1316[Package requirements ($2) were not met:
1317
1318$$1_PKG_ERRORS
1319
1320Consider adjusting the PKG_CONFIG_PATH environment variable if you
1321installed software in a non-standard prefix.
1322
1323_PKG_TEXT])[]dnl
1324        ])
1325elif test $pkg_failed = untried; then
1326     	AC_MSG_RESULT([no])
1327	m4_default([$4], [AC_MSG_FAILURE(
1328[The pkg-config script could not be found or is too old.  Make sure it
1329is in your PATH or set the PKG_CONFIG environment variable to the full
1330path to pkg-config.
1331
1332_PKG_TEXT
1333
1334To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
1335        ])
1336else
1337	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
1338	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
1339        AC_MSG_RESULT([yes])
1340	$3
1341fi[]dnl
1342])dnl PKG_CHECK_MODULES
1343
1344
1345dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
1346dnl   [ACTION-IF-NOT-FOUND])
1347dnl ---------------------------------------------------------------------
1348dnl Since: 0.29
1349dnl
1350dnl Checks for existence of MODULES and gathers its build flags with
1351dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
1352dnl and VARIABLE-PREFIX_LIBS from --libs.
1353dnl
1354dnl Note that if there is a possibility the first call to
1355dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
1356dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
1357dnl configure.ac.
1358AC_DEFUN([PKG_CHECK_MODULES_STATIC],
1359[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1360_save_PKG_CONFIG=$PKG_CONFIG
1361PKG_CONFIG="$PKG_CONFIG --static"
1362PKG_CHECK_MODULES($@)
1363PKG_CONFIG=$_save_PKG_CONFIG[]dnl
1364])dnl PKG_CHECK_MODULES_STATIC
1365
1366
1367dnl PKG_INSTALLDIR([DIRECTORY])
1368dnl -------------------------
1369dnl Since: 0.27
1370dnl
1371dnl Substitutes the variable pkgconfigdir as the location where a module
1372dnl should install pkg-config .pc files. By default the directory is
1373dnl $libdir/pkgconfig, but the default can be changed by passing
1374dnl DIRECTORY. The user can override through the --with-pkgconfigdir
1375dnl parameter.
1376AC_DEFUN([PKG_INSTALLDIR],
1377[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
1378m4_pushdef([pkg_description],
1379    [pkg-config installation directory @<:@]pkg_default[@:>@])
1380AC_ARG_WITH([pkgconfigdir],
1381    [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
1382    [with_pkgconfigdir=]pkg_default)
1383AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
1384m4_popdef([pkg_default])
1385m4_popdef([pkg_description])
1386])dnl PKG_INSTALLDIR
1387
1388
1389dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
1390dnl --------------------------------
1391dnl Since: 0.27
1392dnl
1393dnl Substitutes the variable noarch_pkgconfigdir as the location where a
1394dnl module should install arch-independent pkg-config .pc files. By
1395dnl default the directory is $datadir/pkgconfig, but the default can be
1396dnl changed by passing DIRECTORY. The user can override through the
1397dnl --with-noarch-pkgconfigdir parameter.
1398AC_DEFUN([PKG_NOARCH_INSTALLDIR],
1399[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
1400m4_pushdef([pkg_description],
1401    [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
1402AC_ARG_WITH([noarch-pkgconfigdir],
1403    [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
1404    [with_noarch_pkgconfigdir=]pkg_default)
1405AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
1406m4_popdef([pkg_default])
1407m4_popdef([pkg_description])
1408])dnl PKG_NOARCH_INSTALLDIR
1409
1410
1411dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
1412dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
1413dnl -------------------------------------------
1414dnl Since: 0.28
1415dnl
1416dnl Retrieves the value of the pkg-config variable for the given module.
1417AC_DEFUN([PKG_CHECK_VAR],
1418[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1419AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
1420
1421_PKG_CONFIG([$1], [variable="][$3]["], [$2])
1422AS_VAR_COPY([$1], [pkg_cv_][$1])
1423
1424AS_VAR_IF([$1], [""], [$5], [$4])dnl
1425])dnl PKG_CHECK_VAR
1426
1427dnl fontutil.m4.  Generated from fontutil.m4.in by configure.
1428dnl
1429dnl This file comes from X.Org's font-util 1.3.2
1430dnl
1431dnl Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
1432dnl
1433dnl Permission is hereby granted, free of charge, to any person obtaining a
1434dnl copy of this software and associated documentation files (the "Software"),
1435dnl to deal in the Software without restriction, including without limitation
1436dnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
1437dnl and/or sell copies of the Software, and to permit persons to whom the
1438dnl Software is furnished to do so, subject to the following conditions:
1439dnl
1440dnl The above copyright notice and this permission notice (including the next
1441dnl paragraph) shall be included in all copies or substantial portions of the
1442dnl Software.
1443dnl
1444dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1445dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1446dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
1447dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1448dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
1449dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
1450dnl DEALINGS IN THE SOFTWARE.
1451dnl
1452dnl --------------------------------------------------------------------
1453dnl
1454dnl Copyright 2005 Red Hat, Inc
1455dnl
1456dnl Permission to use, copy, modify, distribute, and sell this software and its
1457dnl documentation for any purpose is hereby granted without fee, provided that
1458dnl the above copyright notice appear in all copies and that both that
1459dnl copyright notice and this permission notice appear in supporting
1460dnl documentation.
1461dnl
1462dnl The above copyright notice and this permission notice shall be included
1463dnl in all copies or substantial portions of the Software.
1464dnl
1465dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
1466dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1467dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
1468dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
1469dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
1470dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
1471dnl OTHER DEALINGS IN THE SOFTWARE.
1472dnl
1473dnl Except as contained in this notice, the name of the copyright holders shall
1474dnl not be used in advertising or otherwise to promote the sale, use or
1475dnl other dealings in this Software without prior written authorization
1476dnl from the copyright holders.
1477
1478# XORG_FONT_MACROS_VERSION(required-version)
1479# ------------------------------------------
1480# Minimum version: 1.1.0
1481#
1482# If you're using a macro added in Version 1.1 or newer, include this in
1483# your configure.ac with the minimum required version, such as:
1484# XORG_FONT_MACROS_VERSION(1.1)
1485#
1486# To ensure that this macro is defined, also add:
1487# m4_ifndef([XORG_FONT_MACROS_VERSION],
1488#     [m4_fatal([must install X.Org font-util 1.1 or later before running autoconf/autogen])])
1489#
1490#
1491# See the "minimum version" comment for each macro you use to see what
1492# version you require.
1493m4_defun([XORG_FONT_MACROS_VERSION],[
1494m4_define([vers_have], [1.3.2])
1495m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
1496m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
1497m4_if(m4_cmp(maj_have, maj_needed), 0,,
1498    [m4_fatal([font-util major version ]maj_needed[ is required but ]vers_have[ found])])
1499m4_if(m4_version_compare(vers_have, [$1]), -1,
1500    [m4_fatal([font-util version $1 or higher is required but ]vers_have[ found])])
1501m4_undefine([vers_have])
1502m4_undefine([maj_have])
1503m4_undefine([maj_needed])
1504]) # XORG_FONT_MACROS_VERSION
1505
1506# XORG_FONT_CHECK_{maps}()
1507# ------------------------
1508# Minimum version: 1.0.0
1509# These macros add --enable/disable-{maps} where {maps} are ISO8859-*,
1510# JISX0201 or KOI8_R.  By default, they are all enabled.
1511
1512AC_DEFUN([XORG_FONT_CHECK_ISO8859_1], [XORG_FONT_CHECK_ENCODING(ISO8859-1)])
1513AC_DEFUN([XORG_FONT_CHECK_ISO8859_2], [XORG_FONT_CHECK_ENCODING(ISO8859-2)])
1514AC_DEFUN([XORG_FONT_CHECK_ISO8859_3], [XORG_FONT_CHECK_ENCODING(ISO8859-3)])
1515AC_DEFUN([XORG_FONT_CHECK_ISO8859_4], [XORG_FONT_CHECK_ENCODING(ISO8859-4)])
1516AC_DEFUN([XORG_FONT_CHECK_ISO8859_5], [XORG_FONT_CHECK_ENCODING(ISO8859-5)])
1517AC_DEFUN([XORG_FONT_CHECK_ISO8859_6], [XORG_FONT_CHECK_ENCODING(ISO8859-6)])
1518AC_DEFUN([XORG_FONT_CHECK_ISO8859_7], [XORG_FONT_CHECK_ENCODING(ISO8859-7)])
1519AC_DEFUN([XORG_FONT_CHECK_ISO8859_8], [XORG_FONT_CHECK_ENCODING(ISO8859-8)])
1520AC_DEFUN([XORG_FONT_CHECK_ISO8859_9], [XORG_FONT_CHECK_ENCODING(ISO8859-9)])
1521AC_DEFUN([XORG_FONT_CHECK_ISO8859_10],[XORG_FONT_CHECK_ENCODING(ISO8859-10)])
1522AC_DEFUN([XORG_FONT_CHECK_ISO8859_11],[XORG_FONT_CHECK_ENCODING(ISO8859-11)])
1523AC_DEFUN([XORG_FONT_CHECK_ISO8859_12],[XORG_FONT_CHECK_ENCODING(ISO8859-12)])
1524AC_DEFUN([XORG_FONT_CHECK_ISO8859_13],[XORG_FONT_CHECK_ENCODING(ISO8859-13)])
1525AC_DEFUN([XORG_FONT_CHECK_ISO8859_14],[XORG_FONT_CHECK_ENCODING(ISO8859-14)])
1526AC_DEFUN([XORG_FONT_CHECK_ISO8859_15],[XORG_FONT_CHECK_ENCODING(ISO8859-15)])
1527AC_DEFUN([XORG_FONT_CHECK_ISO8859_16],[XORG_FONT_CHECK_ENCODING(ISO8859-16)])
1528AC_DEFUN([XORG_FONT_CHECK_JISX0201],  [XORG_FONT_CHECK_ENCODING(JISX0201)])
1529AC_DEFUN([XORG_FONT_CHECK_KOI8_R],    [XORG_FONT_CHECK_ENCODING(KOI8-R)])
1530
1531# XORG_FONT_CHECK_ENCODING(encoding)
1532# ----------------------------------
1533# Minimum version: 1.1.0
1534# This macro adds --enable/disable-<encoding>, enabled by default.
1535# It replaced individual copies of this code in the above macros in 1.1.
1536# Currently assumes encoding names will be all upper-case - add m4_toupper
1537# calls if this is not true in the future.
1538
1539AC_DEFUN([XORG_FONT_CHECK_ENCODING],[
1540	AC_ARG_ENABLE(m4_tolower($1),
1541		AS_HELP_STRING(m4_join([-], [--disable], m4_tolower($1)),
1542				[Build $1 fonts (default: yes)]),
1543		[AS_TR_SH($1)=$enableval])
1544	AC_MSG_CHECKING([whether to build $1 fonts])
1545	AC_MSG_RESULT($[AS_TR_SH($1)])
1546	AM_CONDITIONAL(AS_TR_SH($1), [test "x$AS_TR_SH($1)" = xyes])
1547]) # XORG_FONT_CHECK_ENCODING
1548
1549# XORG_FONT_CHECK_ENCODING_LIST(encoding1 encoding2....)
1550# -----------------------------------------------------
1551# Minimum version: 1.1.0
1552# Call XORG_FONT_CHECK_ENCODING for multiple encodings at once.
1553# Add a shorthand --enable/disable-all-encodings option.
1554
1555AC_DEFUN([XORG_FONT_CHECK_ENCODING_LIST],[
1556	AC_ARG_ENABLE([all-encodings],
1557		AS_HELP_STRING([--disable-all-encodings],
1558				[Disable building of all font encodings]),
1559		[m4_foreach_w([enc], [$1], [
1560			AS_TR_SH(enc)=$enableval
1561		])],
1562		[m4_foreach_w([enc], [$1], [
1563			AS_TR_SH(enc)=yes
1564		])])
1565	m4_foreach_w([enc], [$1], [XORG_FONT_CHECK_ENCODING(enc)])
1566]) # XORG_FONT_CHECK_ENCODING_LIST
1567
1568# XORG_FONT_REQUIRED_PROG(VARNAME, progname)
1569# ------------------------------------------
1570# Minimum version: 1.1.0
1571#
1572# Simple wrapper around AC_PATH_PROG that errors if not found
1573#
1574
1575AC_DEFUN([XORG_FONT_REQUIRED_PROG],[
1576	AC_PATH_PROG($1, $2)
1577	if test x"$$1" = x; then
1578		AC_MSG_ERROR([$2 is required to build $PACKAGE_NAME.])
1579	fi
1580])
1581
1582
1583# XORG_FONT_FCCACHE()
1584# -------------------
1585# Minimum version: 1.1.0
1586#
1587# Set FCCACHE to path to fc-cache (fontconfig cache builder) if found
1588# Set RUN_FCCACHE to a rule suitable for substituting into a makefile
1589# to run fc-cache if found and not installing to $DESTDIR and not
1590# cross-compiling
1591#
1592# fc-cache is optional, not required, and should be skipped when making
1593# packages (installing to $DESTDIR) or cross-compiling
1594#
1595AC_DEFUN([XORG_FONT_FCCACHE],[
1596	AC_PATH_PROG(FCCACHE, fc-cache)
1597	FCCACHE_WARN='echo "** Warning: fonts.cache not built" ; echo "** Generate this file manually on host system using fc-cache"'
1598	if test x"$FCCACHE" = x || test x"$cross_compiling" != x"no" ; then
1599		RUN_FCCACHE="${FCCACHE_WARN}"
1600	else
1601		RUN_FCCACHE='@(if test -z "$(DESTDIR)"; then echo $(FCCACHE) $(fontdir); $(FCCACHE) $(fontdir); else'
1602		RUN_FCCACHE="${RUN_FCCACHE} ${FCCACHE_WARN} ; fi)"
1603	fi
1604	AC_SUBST([RUN_FCCACHE])
1605])
1606
1607# XORG_FONT_MKFONTDIR()
1608# -------------------
1609# Minimum version: 1.3.0
1610#
1611# Set MKFONTDIR to path to mkfontdir.
1612#
1613# If cross-compiling, and if mkdir is not found, use a shell command
1614# which warns mkfontdir needs to be run on the target
1615#
1616# If not cross-compiling, mkfontdir must be found
1617#
1618AC_DEFUN([XORG_FONT_MKFONTDIR],[
1619	if test x"$cross_compiling" != x"no" ; then
1620		AC_PATH_PROG(MKFONTDIR, mkfontdir, "")
1621		MKFONTDIR_WARN='echo "** Warning: mkfontdir not run" ; echo "** Run mkfontdir manually on host system"'
1622
1623		if test x"$MKFONTDIR" = x; then
1624			MKFONTDIR="${MKFONTDIR_WARN} ; echo '** mkfontdir'"
1625		fi
1626	else
1627		XORG_FONT_REQUIRED_PROG(MKFONTDIR, mkfontdir)
1628	fi
1629
1630	AC_SUBST([MKFONTDIR])
1631])
1632
1633# XORG_FONT_COMMON_UTILS()
1634# ------------------------
1635# Minimum version: 1.1.0
1636#
1637# Call XORG_FONT_REQUIRED_PROG for programs needed for all font types
1638
1639AC_DEFUN([XORG_FONT_COMMON_UTILS],[
1640	XORG_FONT_FCCACHE
1641	XORG_FONT_MKFONTDIR
1642])
1643
1644# XORG_FONT_SCALED_UTILS()
1645# ------------------------
1646# Minimum version: 1.1.0
1647#
1648# Call XORG_FONT_REQUIRED_PROG for programs needed for scalable fonts
1649# (TrueType, OpenType, Type1)
1650
1651AC_DEFUN([XORG_FONT_SCALED_UTILS],[
1652	XORG_FONT_COMMON_UTILS
1653	XORG_FONT_REQUIRED_PROG(MKFONTSCALE, mkfontscale)
1654])
1655
1656# XORG_FONT_BDF_UTILS()
1657# ---------------------
1658# Minimum version: 1.1.0
1659#
1660# Call XORG_FONT_REQUIRED_PROG for programs needed for BDF format bitmap fonts
1661# Also call XORG_FONT_CHECK_COMPRESSION to determine how to compress the
1662# PCF output files created by bdftopcf
1663
1664AC_DEFUN([XORG_FONT_BDF_UTILS],[
1665	XORG_FONT_COMMON_UTILS
1666	XORG_FONT_REQUIRED_PROG(BDFTOPCF, bdftopcf)
1667	XORG_FONT_CHECK_COMPRESSION
1668])
1669
1670# XORG_FONT_CHECK_COMPRESSION()
1671# -----------------------------
1672# Minimum version: 1.1.0
1673#
1674# Offer a --with-compression flag to control what compression method is
1675# used for pcf font files.   Offers all the methods currently supported
1676# by libXfont, including no compression.
1677
1678AC_DEFUN([XORG_FONT_CHECK_COMPRESSION],[
1679	AC_MSG_CHECKING([font compression method])
1680	AC_ARG_WITH(compression,
1681	 [AS_HELP_STRING([--with-compression=<no|compress|gzip|bzip2>],
1682			 [compression method to use on pcf fonts])],
1683         [compression="$withval"], [compression="yes"])
1684	if test x"$compression" = "xyes" ; then
1685		compression="gzip"
1686	fi
1687	AC_MSG_RESULT([${compression}])
1688	case ${compression} in
1689	 *compress)	COMPRESS_SUFFIX=".Z" ;;
1690	 *gzip)		COMPRESS_SUFFIX=".gz" ;;
1691	 *bzip2)	COMPRESS_SUFFIX=".bz2" ;;
1692	 no|none)	COMPRESS_SUFFIX="" ; COMPRESS="cat" ;;
1693	 *) AC_MSG_ERROR([${compression} is not a supported compression method]) ;;
1694	esac
1695	if test x"$COMPRESS_SUFFIX" != "x" ; then
1696	   XORG_FONT_REQUIRED_PROG(COMPRESS, ${compression})
1697	fi
1698	AC_SUBST([COMPRESS_SUFFIX])
1699])
1700
1701# XORG_FONT_UCS2ANY()
1702# -------------------
1703# Minimum version: 1.1.0
1704#
1705# Call XORG_FONT_REQUIRED_PROG for ucs2any program needed for splitting
1706# Unicode-encoded BDF format bitmap fonts into subsets for older encodings.
1707# Also call pkg-config to find the directory with the encoding files needed
1708# by ucs2any, and export it as MAPFILES_PATH to the Makefiles
1709
1710AC_DEFUN([XORG_FONT_UCS2ANY],[
1711	AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1712	XORG_FONT_REQUIRED_PROG(UCS2ANY, ucs2any)
1713	PKG_CHECK_MODULES(MAPS, [fontutil])
1714	AC_MSG_CHECKING([for ucs2any encoding data files])
1715	MAPFILES_PATH=`$PKG_CONFIG --variable=mapdir fontutil`
1716	AC_SUBST(MAPFILES_PATH)
1717	AC_MSG_RESULT([${MAPFILES_PATH}])
1718])
1719
1720
1721
1722# XORG_FONT_FC_CONFDIR()
1723# --------------------
1724# Minimum version: 1.2.0
1725#
1726# Sets FC_CONFDIR to the fontconfig config directory
1727# (which should be --with-confdir=... when building fontconfig)
1728# found from:
1729#	--with-fc-confdir=...
1730#	pkg-config --variable=confdir fontconfig
1731#	${sysconfdir}/fonts
1732
1733AC_DEFUN([XORG_FONT_FC_CONFDIR],[
1734	dnl Ensure $PKG_CONFIG is set first
1735	AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1736
1737	AC_MSG_CHECKING([for fontconfig's configuration directory])
1738	AC_ARG_WITH(fc-confdir,
1739		    AS_HELP_STRING([--with-fc-confdir=DIR],
1740			   [Path to fontconfig's configuration directory]),
1741		    [FC_CONFDIR="$withval"])
1742	# if --with-fc-confdir was not specified
1743	if test "x${FC_CONFDIR}" = "x"; then
1744		FC_CONFDIR=`$PKG_CONFIG --variable=confdir fontconfig`
1745	fi
1746	# ...and if pkg-config didn't find confdir in fontconfig.pc...
1747	if test "x${FC_CONFDIR}" = "x"; then
1748		FC_CONFDIR="${sysconfdir}/fonts"
1749	fi
1750	AC_SUBST(FC_CONFDIR)
1751	AC_MSG_RESULT([${FC_CONFDIR}])
1752])
1753
1754
1755
1756# XORG_FONTROOTDIR()
1757# --------------------
1758# Minimum version: 1.1.0
1759#
1760# Sets FONTROOTDIR to the root directory for font files.  Uses the first
1761# found from:
1762#	--with-fontrootdir
1763#	pkg-config --variable=fontrootdir fontutil
1764#	${datadir}/fonts/X11
1765
1766AC_DEFUN([XORG_FONTROOTDIR],[
1767	dnl Ensure $PKG_CONFIG is set first
1768	AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1769
1770	AC_MSG_CHECKING([for root directory for font files])
1771	AC_ARG_WITH(fontrootdir,
1772		    AS_HELP_STRING([--with-fontrootdir=DIR],
1773			   [Path to root directory for font files]),
1774		    [FONTROOTDIR="$withval"])
1775	# if --with-fontrootdir not specified...
1776	if test "x${FONTROOTDIR}" = "x"; then
1777		FONTROOTDIR=`$PKG_CONFIG --variable=fontrootdir fontutil`
1778	fi
1779	# ...and if pkg-config didn't find fontdir in fontutil.pc...
1780	if test "x${FONTROOTDIR}" = "x"; then
1781		FONTROOTDIR="${datadir}/fonts/X11"
1782	fi
1783	AC_SUBST(FONTROOTDIR)
1784	AC_MSG_RESULT([${FONTROOTDIR}])
1785])
1786
1787# XORG_FONTSUBDIR(variable, flag, subdir)
1788# ---------------------------------------
1789# Minimum version: 1.1.0
1790#
1791# Offer a --with-<flag> flag to control directory for font installation
1792# Default is the specified <subdir> of the font root directory.
1793# Sets <variable> to the selected directory
1794
1795AC_DEFUN([XORG_FONTSUBDIR],[
1796	AC_REQUIRE([XORG_FONTROOTDIR])
1797
1798	AC_MSG_CHECKING([for directory for $3 files])
1799	AC_ARG_WITH($2,
1800		    [AS_HELP_STRING([--with-$2=DIR],
1801				    [Path to $3 files [FONTROOTDIR/$3]])],
1802		    [$1="${withval}"], [$1='${FONTROOTDIR}/$3'])
1803	AC_SUBST($1)
1804	AC_MSG_RESULT([${$1}])
1805]) # XORG_FONTSUBDIR
1806
1807# XORG_FONTDIR(subdir)
1808# --------------------
1809# Minimum version: 1.1.0
1810#
1811# Offer a --with-fontdir flag to control directory for font installation
1812# Default is the specified subdir of the font root directory.
1813# Sets FONTDIR to the selected directory
1814
1815AC_DEFUN([XORG_FONTDIR],[XORG_FONTSUBDIR([FONTDIR], [fontdir], [$1])])
1816
1817dnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
1818dnl
1819dnl Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
1820dnl
1821dnl Permission is hereby granted, free of charge, to any person obtaining a
1822dnl copy of this software and associated documentation files (the "Software"),
1823dnl to deal in the Software without restriction, including without limitation
1824dnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
1825dnl and/or sell copies of the Software, and to permit persons to whom the
1826dnl Software is furnished to do so, subject to the following conditions:
1827dnl
1828dnl The above copyright notice and this permission notice (including the next
1829dnl paragraph) shall be included in all copies or substantial portions of the
1830dnl Software.
1831dnl
1832dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1833dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1834dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
1835dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1836dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
1837dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
1838dnl DEALINGS IN THE SOFTWARE.
1839
1840# XORG_MACROS_VERSION(required-version)
1841# -------------------------------------
1842# Minimum version: 1.1.0
1843#
1844# If you're using a macro added in Version 1.1 or newer, include this in
1845# your configure.ac with the minimum required version, such as:
1846# XORG_MACROS_VERSION(1.1)
1847#
1848# To ensure that this macro is defined, also add:
1849# m4_ifndef([XORG_MACROS_VERSION],
1850#     [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
1851#
1852#
1853# See the "minimum version" comment for each macro you use to see what
1854# version you require.
1855m4_defun([XORG_MACROS_VERSION],[
1856m4_define([vers_have], [1.19.3])
1857m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
1858m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
1859m4_if(m4_cmp(maj_have, maj_needed), 0,,
1860    [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
1861m4_if(m4_version_compare(vers_have, [$1]), -1,
1862    [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
1863m4_undefine([vers_have])
1864m4_undefine([maj_have])
1865m4_undefine([maj_needed])
1866]) # XORG_MACROS_VERSION
1867
1868# XORG_PROG_RAWCPP()
1869# ------------------
1870# Minimum version: 1.0.0
1871#
1872# Find cpp program and necessary flags for use in pre-processing text files
1873# such as man pages and config files
1874AC_DEFUN([XORG_PROG_RAWCPP],[
1875AC_REQUIRE([AC_PROG_CPP])
1876AC_PATH_TOOL(RAWCPP, [cpp], [${CPP}],
1877   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
1878
1879# Check for flag to avoid builtin definitions - assumes unix is predefined,
1880# which is not the best choice for supporting other OS'es, but covers most
1881# of the ones we need for now.
1882AC_MSG_CHECKING([if $RAWCPP requires -undef])
1883AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])])
1884if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
1885	AC_MSG_RESULT([no])
1886else
1887	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
1888		RAWCPPFLAGS=-undef
1889		AC_MSG_RESULT([yes])
1890	# under Cygwin unix is still defined even with -undef
1891	elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
1892		RAWCPPFLAGS="-undef -ansi"
1893		AC_MSG_RESULT([yes, with -ansi])
1894	else
1895		AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
1896	fi
1897fi
1898rm -f conftest.$ac_ext
1899
1900AC_MSG_CHECKING([if $RAWCPP requires -traditional])
1901AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve   "whitespace"?]])])
1902if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
1903	AC_MSG_RESULT([no])
1904else
1905	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
1906		TRADITIONALCPPFLAGS="-traditional"
1907		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
1908		AC_MSG_RESULT([yes])
1909	else
1910		AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
1911	fi
1912fi
1913rm -f conftest.$ac_ext
1914AC_SUBST(RAWCPPFLAGS)
1915AC_SUBST(TRADITIONALCPPFLAGS)
1916]) # XORG_PROG_RAWCPP
1917
1918# XORG_MANPAGE_SECTIONS()
1919# -----------------------
1920# Minimum version: 1.0.0
1921#
1922# Determine which sections man pages go in for the different man page types
1923# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
1924# Not sure if there's any better way than just hardcoding by OS name.
1925# Override default settings by setting environment variables
1926# Added MAN_SUBSTS in version 1.8
1927# Added AC_PROG_SED in version 1.8
1928
1929AC_DEFUN([XORG_MANPAGE_SECTIONS],[
1930AC_REQUIRE([AC_CANONICAL_HOST])
1931AC_REQUIRE([AC_PROG_SED])
1932
1933case $host_os in
1934    solaris*)
1935        # Solaris 2.0 - 11.3 use SysV man page section numbers, so we
1936        # check for a man page file found in later versions that use
1937        # traditional section numbers instead
1938        AC_CHECK_FILE([/usr/share/man/man7/attributes.7],
1939                [SYSV_MAN_SECTIONS=false], [SYSV_MAN_SECTIONS=true])
1940        ;;
1941    *) SYSV_MAN_SECTIONS=false ;;
1942esac
1943
1944if test x$APP_MAN_SUFFIX = x    ; then
1945    APP_MAN_SUFFIX=1
1946fi
1947if test x$APP_MAN_DIR = x    ; then
1948    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
1949fi
1950
1951if test x$LIB_MAN_SUFFIX = x    ; then
1952    LIB_MAN_SUFFIX=3
1953fi
1954if test x$LIB_MAN_DIR = x    ; then
1955    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
1956fi
1957
1958if test x$FILE_MAN_SUFFIX = x    ; then
1959    case $SYSV_MAN_SECTIONS in
1960	true)				FILE_MAN_SUFFIX=4  ;;
1961	*)				FILE_MAN_SUFFIX=5  ;;
1962    esac
1963fi
1964if test x$FILE_MAN_DIR = x    ; then
1965    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
1966fi
1967
1968if test x$MISC_MAN_SUFFIX = x    ; then
1969    case $SYSV_MAN_SECTIONS in
1970	true)				MISC_MAN_SUFFIX=5  ;;
1971	*)				MISC_MAN_SUFFIX=7  ;;
1972    esac
1973fi
1974if test x$MISC_MAN_DIR = x    ; then
1975    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
1976fi
1977
1978if test x$DRIVER_MAN_SUFFIX = x    ; then
1979    case $SYSV_MAN_SECTIONS in
1980	true)				DRIVER_MAN_SUFFIX=7  ;;
1981	*)				DRIVER_MAN_SUFFIX=4  ;;
1982    esac
1983fi
1984if test x$DRIVER_MAN_DIR = x    ; then
1985    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
1986fi
1987
1988if test x$ADMIN_MAN_SUFFIX = x    ; then
1989    case $SYSV_MAN_SECTIONS in
1990	true)				ADMIN_MAN_SUFFIX=1m ;;
1991	*)				ADMIN_MAN_SUFFIX=8  ;;
1992    esac
1993fi
1994if test x$ADMIN_MAN_DIR = x    ; then
1995    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
1996fi
1997
1998
1999AC_SUBST([APP_MAN_SUFFIX])
2000AC_SUBST([LIB_MAN_SUFFIX])
2001AC_SUBST([FILE_MAN_SUFFIX])
2002AC_SUBST([MISC_MAN_SUFFIX])
2003AC_SUBST([DRIVER_MAN_SUFFIX])
2004AC_SUBST([ADMIN_MAN_SUFFIX])
2005AC_SUBST([APP_MAN_DIR])
2006AC_SUBST([LIB_MAN_DIR])
2007AC_SUBST([FILE_MAN_DIR])
2008AC_SUBST([MISC_MAN_DIR])
2009AC_SUBST([DRIVER_MAN_DIR])
2010AC_SUBST([ADMIN_MAN_DIR])
2011
2012XORG_MAN_PAGE="X Version 11"
2013AC_SUBST([XORG_MAN_PAGE])
2014MAN_SUBSTS="\
2015	-e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
2016	-e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
2017	-e 's|__xservername__|Xorg|g' \
2018	-e 's|__xconfigfile__|xorg.conf|g' \
2019	-e 's|__projectroot__|\$(prefix)|g' \
2020	-e 's|__apploaddir__|\$(appdefaultdir)|g' \
2021	-e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
2022	-e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
2023	-e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
2024	-e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
2025	-e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
2026	-e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
2027AC_SUBST([MAN_SUBSTS])
2028
2029]) # XORG_MANPAGE_SECTIONS
2030
2031# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION])
2032# ------------------------
2033# Minimum version: 1.7.0
2034#
2035# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent
2036# provided by xorg-sgml-doctools, if installed.
2037AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[
2038AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])])
2039XORG_SGML_PATH=
2040PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])],
2041    [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`],
2042    [m4_ifval([$1],[:],
2043        [if test x"$cross_compiling" != x"yes" ; then
2044            AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent],
2045                          [XORG_SGML_PATH=$prefix/share/sgml])
2046         fi])
2047    ])
2048
2049# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing
2050# the path and the name of the doc stylesheet
2051if test "x$XORG_SGML_PATH" != "x" ; then
2052   AC_MSG_RESULT([$XORG_SGML_PATH])
2053   STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11
2054   XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl
2055else
2056   AC_MSG_RESULT([no])
2057fi
2058
2059AC_SUBST(XORG_SGML_PATH)
2060AC_SUBST(STYLESHEET_SRCDIR)
2061AC_SUBST(XSL_STYLESHEET)
2062AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"])
2063]) # XORG_CHECK_SGML_DOCTOOLS
2064
2065# XORG_CHECK_LINUXDOC
2066# -------------------
2067# Minimum version: 1.0.0
2068#
2069# Defines the variable MAKE_TEXT if the necessary tools and
2070# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
2071# Whether or not the necessary tools and files are found can be checked
2072# with the AM_CONDITIONAL "BUILD_LINUXDOC"
2073AC_DEFUN([XORG_CHECK_LINUXDOC],[
2074AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
2075AC_REQUIRE([XORG_WITH_PS2PDF])
2076
2077AC_PATH_PROG(LINUXDOC, linuxdoc)
2078
2079AC_MSG_CHECKING([whether to build documentation])
2080
2081if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then
2082   BUILDDOC=yes
2083else
2084   BUILDDOC=no
2085fi
2086
2087AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
2088
2089AC_MSG_RESULT([$BUILDDOC])
2090
2091AC_MSG_CHECKING([whether to build pdf documentation])
2092
2093if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then
2094   BUILDPDFDOC=yes
2095else
2096   BUILDPDFDOC=no
2097fi
2098
2099AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
2100
2101AC_MSG_RESULT([$BUILDPDFDOC])
2102
2103MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f"
2104MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
2105MAKE_PDF="$PS2PDF"
2106MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
2107
2108AC_SUBST(MAKE_TEXT)
2109AC_SUBST(MAKE_PS)
2110AC_SUBST(MAKE_PDF)
2111AC_SUBST(MAKE_HTML)
2112]) # XORG_CHECK_LINUXDOC
2113
2114# XORG_CHECK_DOCBOOK
2115# -------------------
2116# Minimum version: 1.0.0
2117#
2118# Checks for the ability to build output formats from SGML DocBook source.
2119# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
2120# indicates whether the necessary tools and files are found and, if set,
2121# $(MAKE_XXX) blah.sgml will produce blah.xxx.
2122AC_DEFUN([XORG_CHECK_DOCBOOK],[
2123AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
2124
2125BUILDTXTDOC=no
2126BUILDPDFDOC=no
2127BUILDPSDOC=no
2128BUILDHTMLDOC=no
2129
2130AC_PATH_PROG(DOCBOOKPS, docbook2ps)
2131AC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
2132AC_PATH_PROG(DOCBOOKHTML, docbook2html)
2133AC_PATH_PROG(DOCBOOKTXT, docbook2txt)
2134
2135AC_MSG_CHECKING([whether to build text documentation])
2136if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x &&
2137   test x$BUILD_TXTDOC != xno; then
2138	BUILDTXTDOC=yes
2139fi
2140AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
2141AC_MSG_RESULT([$BUILDTXTDOC])
2142
2143AC_MSG_CHECKING([whether to build PDF documentation])
2144if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x &&
2145   test x$BUILD_PDFDOC != xno; then
2146	BUILDPDFDOC=yes
2147fi
2148AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
2149AC_MSG_RESULT([$BUILDPDFDOC])
2150
2151AC_MSG_CHECKING([whether to build PostScript documentation])
2152if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x &&
2153   test x$BUILD_PSDOC != xno; then
2154	BUILDPSDOC=yes
2155fi
2156AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
2157AC_MSG_RESULT([$BUILDPSDOC])
2158
2159AC_MSG_CHECKING([whether to build HTML documentation])
2160if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x &&
2161   test x$BUILD_HTMLDOC != xno; then
2162	BUILDHTMLDOC=yes
2163fi
2164AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
2165AC_MSG_RESULT([$BUILDHTMLDOC])
2166
2167MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
2168MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
2169MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
2170MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
2171
2172AC_SUBST(MAKE_TEXT)
2173AC_SUBST(MAKE_PS)
2174AC_SUBST(MAKE_PDF)
2175AC_SUBST(MAKE_HTML)
2176]) # XORG_CHECK_DOCBOOK
2177
2178# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT])
2179# ----------------
2180# Minimum version: 1.5.0
2181# Minimum version for optional DEFAULT argument: 1.11.0
2182#
2183# Documentation tools are not always available on all platforms and sometimes
2184# not at the appropriate level. This macro enables a module to test for the
2185# presence of the tool and obtain it's path in separate variables. Coupled with
2186# the --with-xmlto option, it allows maximum flexibilty in making decisions
2187# as whether or not to use the xmlto package. When DEFAULT is not specified,
2188# --with-xmlto assumes 'auto'.
2189#
2190# Interface to module:
2191# HAVE_XMLTO: 	used in makefiles to conditionally generate documentation
2192# XMLTO:	returns the path of the xmlto program found
2193#		returns the path set by the user in the environment
2194# --with-xmlto:	'yes' user instructs the module to use xmlto
2195#		'no' user instructs the module not to use xmlto
2196#
2197# Added in version 1.10.0
2198# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation
2199#                  xmlto for text output requires either lynx, links, or w3m browsers
2200#
2201# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path.
2202#
2203AC_DEFUN([XORG_WITH_XMLTO],[
2204AC_ARG_VAR([XMLTO], [Path to xmlto command])
2205m4_define([_defopt], m4_default([$2], [auto]))
2206AC_ARG_WITH(xmlto,
2207	AS_HELP_STRING([--with-xmlto],
2208	   [Use xmlto to regenerate documentation (default: ]_defopt[)]),
2209	   [use_xmlto=$withval], [use_xmlto=]_defopt)
2210m4_undefine([_defopt])
2211
2212if test "x$use_xmlto" = x"auto"; then
2213   AC_PATH_PROG([XMLTO], [xmlto])
2214   if test "x$XMLTO" = "x"; then
2215        AC_MSG_WARN([xmlto not found - documentation targets will be skipped])
2216	have_xmlto=no
2217   else
2218        have_xmlto=yes
2219   fi
2220elif test "x$use_xmlto" = x"yes" ; then
2221   AC_PATH_PROG([XMLTO], [xmlto])
2222   if test "x$XMLTO" = "x"; then
2223        AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH])
2224   fi
2225   have_xmlto=yes
2226elif test "x$use_xmlto" = x"no" ; then
2227   if test "x$XMLTO" != "x"; then
2228      AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified])
2229   fi
2230   have_xmlto=no
2231else
2232   AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no'])
2233fi
2234
2235# Test for a minimum version of xmlto, if provided.
2236m4_ifval([$1],
2237[if test "$have_xmlto" = yes; then
2238    # scrape the xmlto version
2239    AC_MSG_CHECKING([the xmlto version])
2240    xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3`
2241    AC_MSG_RESULT([$xmlto_version])
2242    AS_VERSION_COMPARE([$xmlto_version], [$1],
2243        [if test "x$use_xmlto" = xauto; then
2244            AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed])
2245            have_xmlto=no
2246        else
2247            AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed])
2248        fi])
2249fi])
2250
2251# Test for the ability of xmlto to generate a text target
2252#
2253# NOTE: xmlto 0.0.27 or higher return a non-zero return code in the
2254# following test for empty XML docbook files.
2255# For compatibility reasons use the following empty XML docbook file and if
2256# it fails try it again with a non-empty XML file.
2257have_xmlto_text=no
2258cat > conftest.xml << "EOF"
2259EOF
2260AS_IF([test "$have_xmlto" = yes],
2261      [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
2262             [have_xmlto_text=yes],
2263             [# Try it again with a non-empty XML file.
2264              cat > conftest.xml << "EOF"
2265<x></x>
2266EOF
2267              AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
2268                    [have_xmlto_text=yes],
2269                    [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])])
2270rm -f conftest.xml
2271AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes])
2272AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
2273]) # XORG_WITH_XMLTO
2274
2275# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT])
2276# --------------------------------------------
2277# Minimum version: 1.12.0
2278# Minimum version for optional DEFAULT argument: 1.12.0
2279#
2280# XSLT (Extensible Stylesheet Language Transformations) is a declarative,
2281# XML-based language used for the transformation of XML documents.
2282# The xsltproc command line tool is for applying XSLT stylesheets to XML documents.
2283# It is used under the cover by xmlto to generate html files from DocBook/XML.
2284# The XSLT processor is often used as a standalone tool for transformations.
2285# It should not be assumed that this tool is used only to work with documnetation.
2286# When DEFAULT is not specified, --with-xsltproc assumes 'auto'.
2287#
2288# Interface to module:
2289# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation
2290# XSLTPROC:	 returns the path of the xsltproc program found
2291#		 returns the path set by the user in the environment
2292# --with-xsltproc: 'yes' user instructs the module to use xsltproc
2293#		  'no' user instructs the module not to use xsltproc
2294# have_xsltproc: returns yes if xsltproc found in PATH or no
2295#
2296# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path.
2297#
2298AC_DEFUN([XORG_WITH_XSLTPROC],[
2299AC_ARG_VAR([XSLTPROC], [Path to xsltproc command])
2300# Preserves the interface, should it be implemented later
2301m4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])])
2302m4_define([_defopt], m4_default([$2], [auto]))
2303AC_ARG_WITH(xsltproc,
2304	AS_HELP_STRING([--with-xsltproc],
2305	   [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]),
2306	   [use_xsltproc=$withval], [use_xsltproc=]_defopt)
2307m4_undefine([_defopt])
2308
2309if test "x$use_xsltproc" = x"auto"; then
2310   AC_PATH_PROG([XSLTPROC], [xsltproc])
2311   if test "x$XSLTPROC" = "x"; then
2312        AC_MSG_WARN([xsltproc not found - cannot transform XML documents])
2313	have_xsltproc=no
2314   else
2315        have_xsltproc=yes
2316   fi
2317elif test "x$use_xsltproc" = x"yes" ; then
2318   AC_PATH_PROG([XSLTPROC], [xsltproc])
2319   if test "x$XSLTPROC" = "x"; then
2320        AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH])
2321   fi
2322   have_xsltproc=yes
2323elif test "x$use_xsltproc" = x"no" ; then
2324   if test "x$XSLTPROC" != "x"; then
2325      AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified])
2326   fi
2327   have_xsltproc=no
2328else
2329   AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no'])
2330fi
2331
2332AM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes])
2333]) # XORG_WITH_XSLTPROC
2334
2335# XORG_WITH_PERL([MIN-VERSION], [DEFAULT])
2336# ----------------------------------------
2337# Minimum version: 1.15.0
2338#
2339# PERL (Practical Extraction and Report Language) is a language optimized for
2340# scanning arbitrary text files, extracting information from those text files,
2341# and printing reports based on that information.
2342#
2343# When DEFAULT is not specified, --with-perl assumes 'auto'.
2344#
2345# Interface to module:
2346# HAVE_PERL: used in makefiles to conditionally scan text files
2347# PERL:	     returns the path of the perl program found
2348#	     returns the path set by the user in the environment
2349# --with-perl: 'yes' user instructs the module to use perl
2350#	       'no' user instructs the module not to use perl
2351# have_perl: returns yes if perl found in PATH or no
2352#
2353# If the user sets the value of PERL, AC_PATH_PROG skips testing the path.
2354#
2355AC_DEFUN([XORG_WITH_PERL],[
2356AC_ARG_VAR([PERL], [Path to perl command])
2357# Preserves the interface, should it be implemented later
2358m4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])])
2359m4_define([_defopt], m4_default([$2], [auto]))
2360AC_ARG_WITH(perl,
2361	AS_HELP_STRING([--with-perl],
2362	   [Use perl for extracting information from files (default: ]_defopt[)]),
2363	   [use_perl=$withval], [use_perl=]_defopt)
2364m4_undefine([_defopt])
2365
2366if test "x$use_perl" = x"auto"; then
2367   AC_PATH_PROG([PERL], [perl])
2368   if test "x$PERL" = "x"; then
2369        AC_MSG_WARN([perl not found - cannot extract information and report])
2370	have_perl=no
2371   else
2372        have_perl=yes
2373   fi
2374elif test "x$use_perl" = x"yes" ; then
2375   AC_PATH_PROG([PERL], [perl])
2376   if test "x$PERL" = "x"; then
2377        AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH])
2378   fi
2379   have_perl=yes
2380elif test "x$use_perl" = x"no" ; then
2381   if test "x$PERL" != "x"; then
2382      AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified])
2383   fi
2384   have_perl=no
2385else
2386   AC_MSG_ERROR([--with-perl expects 'yes' or 'no'])
2387fi
2388
2389AM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes])
2390]) # XORG_WITH_PERL
2391
2392# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT])
2393# ----------------
2394# Minimum version: 1.5.0
2395# Minimum version for optional DEFAULT argument: 1.11.0
2396#
2397# Documentation tools are not always available on all platforms and sometimes
2398# not at the appropriate level. This macro enables a module to test for the
2399# presence of the tool and obtain it's path in separate variables. Coupled with
2400# the --with-asciidoc option, it allows maximum flexibilty in making decisions
2401# as whether or not to use the asciidoc package. When DEFAULT is not specified,
2402# --with-asciidoc assumes 'auto'.
2403#
2404# Interface to module:
2405# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation
2406# ASCIIDOC:	 returns the path of the asciidoc program found
2407#		 returns the path set by the user in the environment
2408# --with-asciidoc: 'yes' user instructs the module to use asciidoc
2409#		  'no' user instructs the module not to use asciidoc
2410#
2411# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path.
2412#
2413AC_DEFUN([XORG_WITH_ASCIIDOC],[
2414AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
2415m4_define([_defopt], m4_default([$2], [auto]))
2416AC_ARG_WITH(asciidoc,
2417	AS_HELP_STRING([--with-asciidoc],
2418	   [Use asciidoc to regenerate documentation (default: ]_defopt[)]),
2419	   [use_asciidoc=$withval], [use_asciidoc=]_defopt)
2420m4_undefine([_defopt])
2421
2422if test "x$use_asciidoc" = x"auto"; then
2423   AC_PATH_PROG([ASCIIDOC], [asciidoc])
2424   if test "x$ASCIIDOC" = "x"; then
2425        AC_MSG_WARN([asciidoc not found - documentation targets will be skipped])
2426	have_asciidoc=no
2427   else
2428        have_asciidoc=yes
2429   fi
2430elif test "x$use_asciidoc" = x"yes" ; then
2431   AC_PATH_PROG([ASCIIDOC], [asciidoc])
2432   if test "x$ASCIIDOC" = "x"; then
2433        AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH])
2434   fi
2435   have_asciidoc=yes
2436elif test "x$use_asciidoc" = x"no" ; then
2437   if test "x$ASCIIDOC" != "x"; then
2438      AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified])
2439   fi
2440   have_asciidoc=no
2441else
2442   AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no'])
2443fi
2444m4_ifval([$1],
2445[if test "$have_asciidoc" = yes; then
2446    # scrape the asciidoc version
2447    AC_MSG_CHECKING([the asciidoc version])
2448    asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2`
2449    AC_MSG_RESULT([$asciidoc_version])
2450    AS_VERSION_COMPARE([$asciidoc_version], [$1],
2451        [if test "x$use_asciidoc" = xauto; then
2452            AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed])
2453            have_asciidoc=no
2454        else
2455            AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed])
2456        fi])
2457fi])
2458AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
2459]) # XORG_WITH_ASCIIDOC
2460
2461# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT])
2462# -------------------------------------------
2463# Minimum version: 1.5.0
2464# Minimum version for optional DEFAULT argument: 1.11.0
2465# Minimum version for optional DOT checking: 1.18.0
2466#
2467# Documentation tools are not always available on all platforms and sometimes
2468# not at the appropriate level. This macro enables a module to test for the
2469# presence of the tool and obtain it's path in separate variables. Coupled with
2470# the --with-doxygen option, it allows maximum flexibilty in making decisions
2471# as whether or not to use the doxygen package. When DEFAULT is not specified,
2472# --with-doxygen assumes 'auto'.
2473#
2474# Interface to module:
2475# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation
2476# DOXYGEN:	 returns the path of the doxygen program found
2477#		 returns the path set by the user in the environment
2478# --with-doxygen: 'yes' user instructs the module to use doxygen
2479#		  'no' user instructs the module not to use doxygen
2480#
2481# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path.
2482#
2483AC_DEFUN([XORG_WITH_DOXYGEN],[
2484AC_ARG_VAR([DOXYGEN], [Path to doxygen command])
2485AC_ARG_VAR([DOT], [Path to the dot graphics utility])
2486m4_define([_defopt], m4_default([$2], [auto]))
2487AC_ARG_WITH(doxygen,
2488	AS_HELP_STRING([--with-doxygen],
2489	   [Use doxygen to regenerate documentation (default: ]_defopt[)]),
2490	   [use_doxygen=$withval], [use_doxygen=]_defopt)
2491m4_undefine([_defopt])
2492
2493if test "x$use_doxygen" = x"auto"; then
2494   AC_PATH_PROG([DOXYGEN], [doxygen])
2495   if test "x$DOXYGEN" = "x"; then
2496        AC_MSG_WARN([doxygen not found - documentation targets will be skipped])
2497	have_doxygen=no
2498   else
2499        have_doxygen=yes
2500   fi
2501elif test "x$use_doxygen" = x"yes" ; then
2502   AC_PATH_PROG([DOXYGEN], [doxygen])
2503   if test "x$DOXYGEN" = "x"; then
2504        AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH])
2505   fi
2506   have_doxygen=yes
2507elif test "x$use_doxygen" = x"no" ; then
2508   if test "x$DOXYGEN" != "x"; then
2509      AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified])
2510   fi
2511   have_doxygen=no
2512else
2513   AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no'])
2514fi
2515m4_ifval([$1],
2516[if test "$have_doxygen" = yes; then
2517    # scrape the doxygen version
2518    AC_MSG_CHECKING([the doxygen version])
2519    doxygen_version=`$DOXYGEN --version 2>/dev/null`
2520    AC_MSG_RESULT([$doxygen_version])
2521    AS_VERSION_COMPARE([$doxygen_version], [$1],
2522        [if test "x$use_doxygen" = xauto; then
2523            AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed])
2524            have_doxygen=no
2525        else
2526            AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed])
2527        fi])
2528fi])
2529
2530dnl Check for DOT if we have doxygen. The caller decides if it is mandatory
2531dnl HAVE_DOT is a variable that can be used in your doxygen.in config file:
2532dnl 	HAVE_DOT = @HAVE_DOT@
2533HAVE_DOT=no
2534if test "x$have_doxygen" = "xyes"; then
2535  AC_PATH_PROG([DOT], [dot])
2536    if test "x$DOT" != "x"; then
2537      HAVE_DOT=yes
2538    fi
2539fi
2540
2541AC_SUBST([HAVE_DOT])
2542AM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"])
2543AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
2544]) # XORG_WITH_DOXYGEN
2545
2546# XORG_WITH_GROFF([DEFAULT])
2547# ----------------
2548# Minimum version: 1.6.0
2549# Minimum version for optional DEFAULT argument: 1.11.0
2550#
2551# Documentation tools are not always available on all platforms and sometimes
2552# not at the appropriate level. This macro enables a module to test for the
2553# presence of the tool and obtain it's path in separate variables. Coupled with
2554# the --with-groff option, it allows maximum flexibilty in making decisions
2555# as whether or not to use the groff package. When DEFAULT is not specified,
2556# --with-groff assumes 'auto'.
2557#
2558# Interface to module:
2559# HAVE_GROFF:	 used in makefiles to conditionally generate documentation
2560# HAVE_GROFF_MM: the memorandum macros (-mm) package
2561# HAVE_GROFF_MS: the -ms macros package
2562# GROFF:	 returns the path of the groff program found
2563#		 returns the path set by the user in the environment
2564# --with-groff:	 'yes' user instructs the module to use groff
2565#		 'no' user instructs the module not to use groff
2566#
2567# Added in version 1.9.0:
2568# HAVE_GROFF_HTML: groff has dependencies to output HTML format:
2569#		   pnmcut pnmcrop pnmtopng pnmtops from the netpbm package.
2570#		   psselect from the psutils package.
2571#		   the ghostcript package. Refer to the grohtml man pages
2572#
2573# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path.
2574#
2575# OS and distros often splits groff in a basic and full package, the former
2576# having the groff program and the later having devices, fonts and macros
2577# Checking for the groff executable is not enough.
2578#
2579# If macros are missing, we cannot assume that groff is useless, so we don't
2580# unset HAVE_GROFF or GROFF env variables.
2581# HAVE_GROFF_?? can never be true while HAVE_GROFF is false.
2582#
2583AC_DEFUN([XORG_WITH_GROFF],[
2584AC_ARG_VAR([GROFF], [Path to groff command])
2585m4_define([_defopt], m4_default([$1], [auto]))
2586AC_ARG_WITH(groff,
2587	AS_HELP_STRING([--with-groff],
2588	   [Use groff to regenerate documentation (default: ]_defopt[)]),
2589	   [use_groff=$withval], [use_groff=]_defopt)
2590m4_undefine([_defopt])
2591
2592if test "x$use_groff" = x"auto"; then
2593   AC_PATH_PROG([GROFF], [groff])
2594   if test "x$GROFF" = "x"; then
2595        AC_MSG_WARN([groff not found - documentation targets will be skipped])
2596	have_groff=no
2597   else
2598        have_groff=yes
2599   fi
2600elif test "x$use_groff" = x"yes" ; then
2601   AC_PATH_PROG([GROFF], [groff])
2602   if test "x$GROFF" = "x"; then
2603        AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH])
2604   fi
2605   have_groff=yes
2606elif test "x$use_groff" = x"no" ; then
2607   if test "x$GROFF" != "x"; then
2608      AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified])
2609   fi
2610   have_groff=no
2611else
2612   AC_MSG_ERROR([--with-groff expects 'yes' or 'no'])
2613fi
2614
2615# We have groff, test for the presence of the macro packages
2616if test "x$have_groff" = x"yes"; then
2617    AC_MSG_CHECKING([for ${GROFF} -ms macros])
2618    if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then
2619        groff_ms_works=yes
2620    else
2621        groff_ms_works=no
2622    fi
2623    AC_MSG_RESULT([$groff_ms_works])
2624    AC_MSG_CHECKING([for ${GROFF} -mm macros])
2625    if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then
2626        groff_mm_works=yes
2627    else
2628        groff_mm_works=no
2629    fi
2630    AC_MSG_RESULT([$groff_mm_works])
2631fi
2632
2633# We have groff, test for HTML dependencies, one command per package
2634if test "x$have_groff" = x"yes"; then
2635   AC_PATH_PROGS(GS_PATH, [gs gswin32c])
2636   AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng])
2637   AC_PATH_PROG(PSSELECT_PATH, [psselect])
2638   if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then
2639      have_groff_html=yes
2640   else
2641      have_groff_html=no
2642      AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages])
2643   fi
2644fi
2645
2646# Set Automake conditionals for Makefiles
2647AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes])
2648AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes])
2649AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes])
2650AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
2651]) # XORG_WITH_GROFF
2652
2653# XORG_WITH_FOP([MIN-VERSION], [DEFAULT])
2654# ---------------------------------------
2655# Minimum version: 1.6.0
2656# Minimum version for optional DEFAULT argument: 1.11.0
2657# Minimum version for optional MIN-VERSION argument: 1.15.0
2658#
2659# Documentation tools are not always available on all platforms and sometimes
2660# not at the appropriate level. This macro enables a module to test for the
2661# presence of the tool and obtain it's path in separate variables. Coupled with
2662# the --with-fop option, it allows maximum flexibilty in making decisions
2663# as whether or not to use the fop package. When DEFAULT is not specified,
2664# --with-fop assumes 'auto'.
2665#
2666# Interface to module:
2667# HAVE_FOP: 	used in makefiles to conditionally generate documentation
2668# FOP:	 	returns the path of the fop program found
2669#		returns the path set by the user in the environment
2670# --with-fop: 	'yes' user instructs the module to use fop
2671#		'no' user instructs the module not to use fop
2672#
2673# If the user sets the value of FOP, AC_PATH_PROG skips testing the path.
2674#
2675AC_DEFUN([XORG_WITH_FOP],[
2676AC_ARG_VAR([FOP], [Path to fop command])
2677m4_define([_defopt], m4_default([$2], [auto]))
2678AC_ARG_WITH(fop,
2679	AS_HELP_STRING([--with-fop],
2680	   [Use fop to regenerate documentation (default: ]_defopt[)]),
2681	   [use_fop=$withval], [use_fop=]_defopt)
2682m4_undefine([_defopt])
2683
2684if test "x$use_fop" = x"auto"; then
2685   AC_PATH_PROG([FOP], [fop])
2686   if test "x$FOP" = "x"; then
2687        AC_MSG_WARN([fop not found - documentation targets will be skipped])
2688	have_fop=no
2689   else
2690        have_fop=yes
2691   fi
2692elif test "x$use_fop" = x"yes" ; then
2693   AC_PATH_PROG([FOP], [fop])
2694   if test "x$FOP" = "x"; then
2695        AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH])
2696   fi
2697   have_fop=yes
2698elif test "x$use_fop" = x"no" ; then
2699   if test "x$FOP" != "x"; then
2700      AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified])
2701   fi
2702   have_fop=no
2703else
2704   AC_MSG_ERROR([--with-fop expects 'yes' or 'no'])
2705fi
2706
2707# Test for a minimum version of fop, if provided.
2708m4_ifval([$1],
2709[if test "$have_fop" = yes; then
2710    # scrape the fop version
2711    AC_MSG_CHECKING([for fop minimum version])
2712    fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3`
2713    AC_MSG_RESULT([$fop_version])
2714    AS_VERSION_COMPARE([$fop_version], [$1],
2715        [if test "x$use_fop" = xauto; then
2716            AC_MSG_WARN([fop version $fop_version found, but $1 needed])
2717            have_fop=no
2718        else
2719            AC_MSG_ERROR([fop version $fop_version found, but $1 needed])
2720        fi])
2721fi])
2722AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
2723]) # XORG_WITH_FOP
2724
2725# XORG_WITH_M4([MIN-VERSION])
2726# ---------------------------
2727# Minimum version: 1.19.0
2728#
2729# This macro attempts to locate an m4 macro processor which supports
2730# -I option and is only useful for modules relying on M4 in order to
2731# expand macros in source code files.
2732#
2733# Interface to module:
2734# M4:	 	returns the path of the m4 program found
2735#		returns the path set by the user in the environment
2736#
2737AC_DEFUN([XORG_WITH_M4], [
2738AC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4],
2739   [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4],
2740       [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \
2741         ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]],
2742   [AC_MSG_ERROR([could not find m4 that supports -I option])],
2743   [$PATH:/usr/gnu/bin])])
2744
2745AC_SUBST([M4], [$ac_cv_path_M4])
2746]) # XORG_WITH_M4
2747
2748# XORG_WITH_PS2PDF([DEFAULT])
2749# ----------------
2750# Minimum version: 1.6.0
2751# Minimum version for optional DEFAULT argument: 1.11.0
2752#
2753# Documentation tools are not always available on all platforms and sometimes
2754# not at the appropriate level. This macro enables a module to test for the
2755# presence of the tool and obtain it's path in separate variables. Coupled with
2756# the --with-ps2pdf option, it allows maximum flexibilty in making decisions
2757# as whether or not to use the ps2pdf package. When DEFAULT is not specified,
2758# --with-ps2pdf assumes 'auto'.
2759#
2760# Interface to module:
2761# HAVE_PS2PDF: 	used in makefiles to conditionally generate documentation
2762# PS2PDF:	returns the path of the ps2pdf program found
2763#		returns the path set by the user in the environment
2764# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf
2765#		 'no' user instructs the module not to use ps2pdf
2766#
2767# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path.
2768#
2769AC_DEFUN([XORG_WITH_PS2PDF],[
2770AC_ARG_VAR([PS2PDF], [Path to ps2pdf command])
2771m4_define([_defopt], m4_default([$1], [auto]))
2772AC_ARG_WITH(ps2pdf,
2773	AS_HELP_STRING([--with-ps2pdf],
2774	   [Use ps2pdf to regenerate documentation (default: ]_defopt[)]),
2775	   [use_ps2pdf=$withval], [use_ps2pdf=]_defopt)
2776m4_undefine([_defopt])
2777
2778if test "x$use_ps2pdf" = x"auto"; then
2779   AC_PATH_PROG([PS2PDF], [ps2pdf])
2780   if test "x$PS2PDF" = "x"; then
2781        AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped])
2782	have_ps2pdf=no
2783   else
2784        have_ps2pdf=yes
2785   fi
2786elif test "x$use_ps2pdf" = x"yes" ; then
2787   AC_PATH_PROG([PS2PDF], [ps2pdf])
2788   if test "x$PS2PDF" = "x"; then
2789        AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH])
2790   fi
2791   have_ps2pdf=yes
2792elif test "x$use_ps2pdf" = x"no" ; then
2793   if test "x$PS2PDF" != "x"; then
2794      AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified])
2795   fi
2796   have_ps2pdf=no
2797else
2798   AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no'])
2799fi
2800AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
2801]) # XORG_WITH_PS2PDF
2802
2803# XORG_ENABLE_DOCS (enable_docs=yes)
2804# ----------------
2805# Minimum version: 1.6.0
2806#
2807# Documentation tools are not always available on all platforms and sometimes
2808# not at the appropriate level. This macro enables a builder to skip all
2809# documentation targets except traditional man pages.
2810# Combined with the specific tool checking macros XORG_WITH_*, it provides
2811# maximum flexibilty in controlling documentation building.
2812# Refer to:
2813# XORG_WITH_XMLTO         --with-xmlto
2814# XORG_WITH_ASCIIDOC      --with-asciidoc
2815# XORG_WITH_DOXYGEN       --with-doxygen
2816# XORG_WITH_FOP           --with-fop
2817# XORG_WITH_GROFF         --with-groff
2818# XORG_WITH_PS2PDF        --with-ps2pdf
2819#
2820# Interface to module:
2821# ENABLE_DOCS: 	  used in makefiles to conditionally generate documentation
2822# --enable-docs: 'yes' user instructs the module to generate docs
2823#		 'no' user instructs the module not to generate docs
2824# parm1:	specify the default value, yes or no.
2825#
2826AC_DEFUN([XORG_ENABLE_DOCS],[
2827m4_define([docs_default], m4_default([$1], [yes]))
2828AC_ARG_ENABLE(docs,
2829	AS_HELP_STRING([--enable-docs],
2830	   [Enable building the documentation (default: ]docs_default[)]),
2831	   [build_docs=$enableval], [build_docs=]docs_default)
2832m4_undefine([docs_default])
2833AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes])
2834AC_MSG_CHECKING([whether to build documentation])
2835AC_MSG_RESULT([$build_docs])
2836]) # XORG_ENABLE_DOCS
2837
2838# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes)
2839# ----------------
2840# Minimum version: 1.6.0
2841#
2842# This macro enables a builder to skip all developer documentation.
2843# Combined with the specific tool checking macros XORG_WITH_*, it provides
2844# maximum flexibilty in controlling documentation building.
2845# Refer to:
2846# XORG_WITH_XMLTO         --with-xmlto
2847# XORG_WITH_ASCIIDOC      --with-asciidoc
2848# XORG_WITH_DOXYGEN       --with-doxygen
2849# XORG_WITH_FOP           --with-fop
2850# XORG_WITH_GROFF         --with-groff
2851# XORG_WITH_PS2PDF        --with-ps2pdf
2852#
2853# Interface to module:
2854# ENABLE_DEVEL_DOCS:	used in makefiles to conditionally generate developer docs
2855# --enable-devel-docs:	'yes' user instructs the module to generate developer docs
2856#			'no' user instructs the module not to generate developer docs
2857# parm1:		specify the default value, yes or no.
2858#
2859AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[
2860m4_define([devel_default], m4_default([$1], [yes]))
2861AC_ARG_ENABLE(devel-docs,
2862	AS_HELP_STRING([--enable-devel-docs],
2863	   [Enable building the developer documentation (default: ]devel_default[)]),
2864	   [build_devel_docs=$enableval], [build_devel_docs=]devel_default)
2865m4_undefine([devel_default])
2866AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes])
2867AC_MSG_CHECKING([whether to build developer documentation])
2868AC_MSG_RESULT([$build_devel_docs])
2869]) # XORG_ENABLE_DEVEL_DOCS
2870
2871# XORG_ENABLE_SPECS (enable_specs=yes)
2872# ----------------
2873# Minimum version: 1.6.0
2874#
2875# This macro enables a builder to skip all functional specification targets.
2876# Combined with the specific tool checking macros XORG_WITH_*, it provides
2877# maximum flexibilty in controlling documentation building.
2878# Refer to:
2879# XORG_WITH_XMLTO         --with-xmlto
2880# XORG_WITH_ASCIIDOC      --with-asciidoc
2881# XORG_WITH_DOXYGEN       --with-doxygen
2882# XORG_WITH_FOP           --with-fop
2883# XORG_WITH_GROFF         --with-groff
2884# XORG_WITH_PS2PDF        --with-ps2pdf
2885#
2886# Interface to module:
2887# ENABLE_SPECS:		used in makefiles to conditionally generate specs
2888# --enable-specs:	'yes' user instructs the module to generate specs
2889#			'no' user instructs the module not to generate specs
2890# parm1:		specify the default value, yes or no.
2891#
2892AC_DEFUN([XORG_ENABLE_SPECS],[
2893m4_define([spec_default], m4_default([$1], [yes]))
2894AC_ARG_ENABLE(specs,
2895	AS_HELP_STRING([--enable-specs],
2896	   [Enable building the specs (default: ]spec_default[)]),
2897	   [build_specs=$enableval], [build_specs=]spec_default)
2898m4_undefine([spec_default])
2899AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes])
2900AC_MSG_CHECKING([whether to build functional specifications])
2901AC_MSG_RESULT([$build_specs])
2902]) # XORG_ENABLE_SPECS
2903
2904# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto)
2905# ----------------------------------------------
2906# Minimum version: 1.13.0
2907#
2908# This macro enables a builder to enable/disable unit testing
2909# It makes no assumption about the test cases implementation
2910# Test cases may or may not use Automake "Support for test suites"
2911# They may or may not use the software utility library GLib
2912#
2913# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL
2914# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib.
2915# The variable enable_unit_tests is used by other macros in this file.
2916#
2917# Interface to module:
2918# ENABLE_UNIT_TESTS:	used in makefiles to conditionally build tests
2919# enable_unit_tests:    used in configure.ac for additional configuration
2920# --enable-unit-tests:	'yes' user instructs the module to build tests
2921#			'no' user instructs the module not to build tests
2922# parm1:		specify the default value, yes or no.
2923#
2924AC_DEFUN([XORG_ENABLE_UNIT_TESTS],[
2925AC_BEFORE([$0], [XORG_WITH_GLIB])
2926AC_BEFORE([$0], [XORG_LD_WRAP])
2927AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS])
2928m4_define([_defopt], m4_default([$1], [auto]))
2929AC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests],
2930	[Enable building unit test cases (default: ]_defopt[)]),
2931	[enable_unit_tests=$enableval], [enable_unit_tests=]_defopt)
2932m4_undefine([_defopt])
2933AM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno])
2934AC_MSG_CHECKING([whether to build unit test cases])
2935AC_MSG_RESULT([$enable_unit_tests])
2936]) # XORG_ENABLE_UNIT_TESTS
2937
2938# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto)
2939# ------------------------------------------------------
2940# Minimum version: 1.17.0
2941#
2942# This macro enables a builder to enable/disable integration testing
2943# It makes no assumption about the test cases' implementation
2944# Test cases may or may not use Automake "Support for test suites"
2945#
2946# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support
2947# usually requires less dependencies and may be built and run under less
2948# stringent environments than integration tests.
2949#
2950# Interface to module:
2951# ENABLE_INTEGRATION_TESTS:   used in makefiles to conditionally build tests
2952# enable_integration_tests:   used in configure.ac for additional configuration
2953# --enable-integration-tests: 'yes' user instructs the module to build tests
2954#                             'no' user instructs the module not to build tests
2955# parm1:                      specify the default value, yes or no.
2956#
2957AC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[
2958AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS])
2959m4_define([_defopt], m4_default([$1], [auto]))
2960AC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests],
2961	[Enable building integration test cases (default: ]_defopt[)]),
2962	[enable_integration_tests=$enableval],
2963	[enable_integration_tests=]_defopt)
2964m4_undefine([_defopt])
2965AM_CONDITIONAL([ENABLE_INTEGRATION_TESTS],
2966	[test "x$enable_integration_tests" != xno])
2967AC_MSG_CHECKING([whether to build unit test cases])
2968AC_MSG_RESULT([$enable_integration_tests])
2969]) # XORG_ENABLE_INTEGRATION_TESTS
2970
2971# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT])
2972# ----------------------------------------
2973# Minimum version: 1.13.0
2974#
2975# GLib is a library which provides advanced data structures and functions.
2976# This macro enables a module to test for the presence of Glib.
2977#
2978# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing.
2979# Otherwise the value of $enable_unit_tests is blank.
2980#
2981# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit
2982# test support usually requires less dependencies and may be built and run under
2983# less stringent environments than integration tests.
2984#
2985# Interface to module:
2986# HAVE_GLIB: used in makefiles to conditionally build targets
2987# with_glib: used in configure.ac to know if GLib has been found
2988# --with-glib:	'yes' user instructs the module to use glib
2989#		'no' user instructs the module not to use glib
2990#
2991AC_DEFUN([XORG_WITH_GLIB],[
2992AC_REQUIRE([PKG_PROG_PKG_CONFIG])
2993m4_define([_defopt], m4_default([$2], [auto]))
2994AC_ARG_WITH(glib, AS_HELP_STRING([--with-glib],
2995	[Use GLib library for unit testing (default: ]_defopt[)]),
2996	[with_glib=$withval], [with_glib=]_defopt)
2997m4_undefine([_defopt])
2998
2999have_glib=no
3000# Do not probe GLib if user explicitly disabled unit testing
3001if test "x$enable_unit_tests" != x"no"; then
3002  # Do not probe GLib if user explicitly disabled it
3003  if test "x$with_glib" != x"no"; then
3004    m4_ifval(
3005      [$1],
3006      [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])],
3007      [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])]
3008    )
3009  fi
3010fi
3011
3012# Not having GLib when unit testing has been explicitly requested is an error
3013if test "x$enable_unit_tests" = x"yes"; then
3014  if test "x$have_glib" = x"no"; then
3015    AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found])
3016  fi
3017fi
3018
3019# Having unit testing disabled when GLib has been explicitly requested is an error
3020if test "x$enable_unit_tests" = x"no"; then
3021  if test "x$with_glib" = x"yes"; then
3022    AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found])
3023  fi
3024fi
3025
3026# Not having GLib when it has been explicitly requested is an error
3027if test "x$with_glib" = x"yes"; then
3028  if test "x$have_glib" = x"no"; then
3029    AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found])
3030  fi
3031fi
3032
3033AM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes])
3034]) # XORG_WITH_GLIB
3035
3036# XORG_LD_WRAP([required|optional])
3037# ---------------------------------
3038# Minimum version: 1.13.0
3039#
3040# Check if linker supports -wrap, passed via compiler flags
3041#
3042# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing.
3043# Otherwise the value of $enable_unit_tests is blank.
3044#
3045# Argument added in 1.16.0 - default is "required", to match existing behavior
3046# of returning an error if enable_unit_tests is yes, and ld -wrap is not
3047# available, an argument of "optional" allows use when some unit tests require
3048# ld -wrap and others do not.
3049#
3050AC_DEFUN([XORG_LD_WRAP],[
3051XORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no],
3052    [AC_LANG_PROGRAM([#include <stdlib.h>
3053                      void __wrap_exit(int status) { return; }],
3054                     [exit(0);])])
3055# Not having ld wrap when unit testing has been explicitly requested is an error
3056if test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then
3057  if test "x$have_ld_wrap" = x"no"; then
3058    AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available])
3059  fi
3060fi
3061AM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes])
3062#
3063]) # XORG_LD_WRAP
3064
3065# XORG_CHECK_LINKER_FLAGS
3066# -----------------------
3067# SYNOPSIS
3068#
3069#   XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE])
3070#
3071# DESCRIPTION
3072#
3073#   Check whether the given linker FLAGS work with the current language's
3074#   linker, or whether they give an error.
3075#
3076#   ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
3077#   success/failure.
3078#
3079#   PROGRAM-SOURCE is the program source to link with, if needed
3080#
3081#   NOTE: Based on AX_CHECK_COMPILER_FLAGS.
3082#
3083# LICENSE
3084#
3085#   Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org>
3086#   Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu>
3087#   Copyright (c) 2009 Matteo Frigo
3088#
3089#   This program is free software: you can redistribute it and/or modify it
3090#   under the terms of the GNU General Public License as published by the
3091#   Free Software Foundation, either version 3 of the License, or (at your
3092#   option) any later version.
3093#
3094#   This program is distributed in the hope that it will be useful, but
3095#   WITHOUT ANY WARRANTY; without even the implied warranty of
3096#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
3097#   Public License for more details.
3098#
3099#   You should have received a copy of the GNU General Public License along
3100#   with this program. If not, see <http://www.gnu.org/licenses/>.
3101#
3102#   As a special exception, the respective Autoconf Macro's copyright owner
3103#   gives unlimited permission to copy, distribute and modify the configure
3104#   scripts that are the output of Autoconf when processing the Macro. You
3105#   need not follow the terms of the GNU General Public License when using
3106#   or distributing such scripts, even though portions of the text of the
3107#   Macro appear in them. The GNU General Public License (GPL) does govern
3108#   all other use of the material that constitutes the Autoconf Macro.
3109#
3110#   This special exception to the GPL applies to versions of the Autoconf
3111#   Macro released by the Autoconf Archive. When you make and distribute a
3112#   modified version of the Autoconf Macro, you may extend this special
3113#   exception to the GPL to apply to your modified version as well.#
3114AC_DEFUN([XORG_CHECK_LINKER_FLAGS],
3115[AC_MSG_CHECKING([whether the linker accepts $1])
3116dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname:
3117AS_LITERAL_IF([$1],
3118  [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [
3119      ax_save_FLAGS=$LDFLAGS
3120      LDFLAGS="$1"
3121      AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])],
3122        AS_TR_SH(xorg_cv_linker_flags_[$1])=yes,
3123        AS_TR_SH(xorg_cv_linker_flags_[$1])=no)
3124      LDFLAGS=$ax_save_FLAGS])],
3125  [ax_save_FLAGS=$LDFLAGS
3126   LDFLAGS="$1"
3127   AC_LINK_IFELSE([AC_LANG_PROGRAM()],
3128     eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes,
3129     eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no)
3130   LDFLAGS=$ax_save_FLAGS])
3131eval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1])
3132AC_MSG_RESULT($xorg_check_linker_flags)
3133if test "x$xorg_check_linker_flags" = xyes; then
3134	m4_default([$2], :)
3135else
3136	m4_default([$3], :)
3137fi
3138]) # XORG_CHECK_LINKER_FLAGS
3139
3140# XORG_MEMORY_CHECK_FLAGS
3141# -----------------------
3142# Minimum version: 1.16.0
3143#
3144# This macro attempts to find appropriate memory checking functionality
3145# for various platforms which unit testing code may use to catch various
3146# forms of memory allocation and access errors in testing.
3147#
3148# Interface to module:
3149# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging
3150#                         Usually added to TESTS_ENVIRONMENT in Makefile.am
3151#
3152# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim.
3153#
3154AC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[
3155
3156AC_REQUIRE([AC_CANONICAL_HOST])
3157AC_ARG_VAR([XORG_MALLOC_DEBUG_ENV],
3158           [Environment variables to enable memory checking in tests])
3159
3160# Check for different types of support on different platforms
3161case $host_os in
3162    solaris*)
3163        AC_CHECK_LIB([umem], [umem_alloc],
3164            [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default'])
3165        ;;
3166    *-gnu*) # GNU libc - Value is used as a single byte bit pattern,
3167        # both directly and inverted, so should not be 0 or 255.
3168        malloc_debug_env='MALLOC_PERTURB_=15'
3169        ;;
3170    darwin*)
3171        malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib'
3172        ;;
3173    *bsd*)
3174        malloc_debug_env='MallocPreScribble=1 MallocScribble=1'
3175        ;;
3176esac
3177
3178# User supplied flags override default flags
3179if test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then
3180    malloc_debug_env="$XORG_MALLOC_DEBUG_ENV"
3181fi
3182
3183AC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env])
3184]) # XORG_WITH_LINT
3185
3186# XORG_CHECK_MALLOC_ZERO
3187# ----------------------
3188# Minimum version: 1.0.0
3189#
3190# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
3191# malloc(0) returns NULL.  Packages should add one of these cflags to
3192# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
3193AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
3194AC_ARG_ENABLE(malloc0returnsnull,
3195	AS_HELP_STRING([--enable-malloc0returnsnull],
3196		       [malloc(0) returns NULL (default: auto)]),
3197	[MALLOC_ZERO_RETURNS_NULL=$enableval],
3198	[MALLOC_ZERO_RETURNS_NULL=auto])
3199
3200AC_MSG_CHECKING([whether malloc(0) returns NULL])
3201if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
3202AC_CACHE_VAL([xorg_cv_malloc0_returns_null],
3203	[AC_RUN_IFELSE([AC_LANG_PROGRAM([
3204#include <stdlib.h>
3205],[
3206    char *m0, *r0, *c0, *p;
3207    m0 = malloc(0);
3208    p = malloc(10);
3209    r0 = realloc(p,0);
3210    c0 = calloc(0,10);
3211    exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1);
3212])],
3213		[xorg_cv_malloc0_returns_null=yes],
3214		[xorg_cv_malloc0_returns_null=no])])
3215MALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null
3216fi
3217AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
3218
3219if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
3220	MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
3221	XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
3222	XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
3223else
3224	MALLOC_ZERO_CFLAGS=""
3225	XMALLOC_ZERO_CFLAGS=""
3226	XTMALLOC_ZERO_CFLAGS=""
3227fi
3228
3229AC_SUBST([MALLOC_ZERO_CFLAGS])
3230AC_SUBST([XMALLOC_ZERO_CFLAGS])
3231AC_SUBST([XTMALLOC_ZERO_CFLAGS])
3232]) # XORG_CHECK_MALLOC_ZERO
3233
3234# XORG_WITH_LINT()
3235# ----------------
3236# Minimum version: 1.1.0
3237#
3238# This macro enables the use of a tool that flags some suspicious and
3239# non-portable constructs (likely to be bugs) in C language source code.
3240# It will attempt to locate the tool and use appropriate options.
3241# There are various lint type tools on different platforms.
3242#
3243# Interface to module:
3244# LINT:		returns the path to the tool found on the platform
3245#		or the value set to LINT on the configure cmd line
3246#		also an Automake conditional
3247# LINT_FLAGS:	an Automake variable with appropriate flags
3248#
3249# --with-lint:	'yes' user instructs the module to use lint
3250#		'no' user instructs the module not to use lint (default)
3251#
3252# If the user sets the value of LINT, AC_PATH_PROG skips testing the path.
3253# If the user sets the value of LINT_FLAGS, they are used verbatim.
3254#
3255AC_DEFUN([XORG_WITH_LINT],[
3256
3257AC_ARG_VAR([LINT], [Path to a lint-style command])
3258AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command])
3259AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
3260		[Use a lint-style source code checker (default: disabled)])],
3261		[use_lint=$withval], [use_lint=no])
3262
3263# Obtain platform specific info like program name and options
3264# The lint program on FreeBSD and NetBSD is different from the one on Solaris
3265case $host_os in
3266  *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*)
3267	lint_name=splint
3268	lint_options="-badflag"
3269	;;
3270  *freebsd* | *netbsd*)
3271	lint_name=lint
3272	lint_options="-u -b"
3273	;;
3274  *solaris*)
3275	lint_name=lint
3276	lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
3277	;;
3278esac
3279
3280# Test for the presence of the program (either guessed by the code or spelled out by the user)
3281if test "x$use_lint" = x"yes" ; then
3282   AC_PATH_PROG([LINT], [$lint_name])
3283   if test "x$LINT" = "x"; then
3284        AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH])
3285   fi
3286elif test "x$use_lint" = x"no" ; then
3287   if test "x$LINT" != "x"; then
3288      AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified])
3289   fi
3290else
3291   AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.])
3292fi
3293
3294# User supplied flags override default flags
3295if test "x$LINT_FLAGS" != "x"; then
3296   lint_options=$LINT_FLAGS
3297fi
3298
3299AC_SUBST([LINT_FLAGS],[$lint_options])
3300AM_CONDITIONAL(LINT, [test "x$LINT" != x])
3301
3302]) # XORG_WITH_LINT
3303
3304# XORG_LINT_LIBRARY(LIBNAME)
3305# --------------------------
3306# Minimum version: 1.1.0
3307#
3308# Sets up flags for building lint libraries for checking programs that call
3309# functions in the library.
3310#
3311# Interface to module:
3312# LINTLIB		- Automake variable with the name of lint library file to make
3313# MAKE_LINT_LIB		- Automake conditional
3314#
3315# --enable-lint-library:  - 'yes' user instructs the module to created a lint library
3316#			  - 'no' user instructs the module not to create a lint library (default)
3317
3318AC_DEFUN([XORG_LINT_LIBRARY],[
3319AC_REQUIRE([XORG_WITH_LINT])
3320AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
3321	[Create lint library (default: disabled)])],
3322	[make_lint_lib=$enableval], [make_lint_lib=no])
3323
3324if test "x$make_lint_lib" = x"yes" ; then
3325   LINTLIB=llib-l$1.ln
3326   if test "x$LINT" = "x"; then
3327        AC_MSG_ERROR([Cannot make lint library without --with-lint])
3328   fi
3329elif test "x$make_lint_lib" != x"no" ; then
3330   AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.])
3331fi
3332
3333AC_SUBST(LINTLIB)
3334AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
3335
3336]) # XORG_LINT_LIBRARY
3337
3338# XORG_COMPILER_BRAND
3339# -------------------
3340# Minimum version: 1.14.0
3341#
3342# Checks for various brands of compilers and sets flags as appropriate:
3343#   GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes"
3344#   GNU g++ - relies on AC_PROG_CXX to set GXX to "yes"
3345#   clang compiler - sets CLANGCC to "yes"
3346#   Intel compiler - sets INTELCC to "yes"
3347#   Sun/Oracle Solaris Studio cc - sets SUNCC to "yes"
3348#
3349AC_DEFUN([XORG_COMPILER_BRAND], [
3350AC_LANG_CASE(
3351	[C], [
3352		AC_REQUIRE([AC_PROG_CC_C99])
3353	],
3354	[C++], [
3355		AC_REQUIRE([AC_PROG_CXX])
3356	]
3357)
3358AC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"])
3359AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
3360AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
3361]) # XORG_COMPILER_BRAND
3362
3363# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...])
3364# ---------------
3365# Minimum version: 1.16.0
3366#
3367# Test if the compiler works when passed the given flag as a command line argument.
3368# If it succeeds, the flag is appeneded to the given variable.  If not, it tries the
3369# next flag in the list until there are no more options.
3370#
3371# Note that this does not guarantee that the compiler supports the flag as some
3372# compilers will simply ignore arguments that they do not understand, but we do
3373# attempt to weed out false positives by using -Werror=unknown-warning-option and
3374# -Werror=unused-command-line-argument
3375#
3376AC_DEFUN([XORG_TESTSET_CFLAG], [
3377m4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])])
3378m4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])])
3379
3380AC_LANG_COMPILER_REQUIRE
3381
3382AC_LANG_CASE(
3383	[C], [
3384		AC_REQUIRE([AC_PROG_CC_C99])
3385		define([PREFIX], [C])
3386		define([CACHE_PREFIX], [cc])
3387		define([COMPILER], [$CC])
3388	],
3389	[C++], [
3390		define([PREFIX], [CXX])
3391		define([CACHE_PREFIX], [cxx])
3392		define([COMPILER], [$CXX])
3393	]
3394)
3395
3396[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]"
3397
3398if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then
3399	PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
3400	AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option],
3401			[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option],
3402			AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])],
3403					  [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes],
3404					  [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no]))
3405	[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option]
3406	PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
3407fi
3408
3409if test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then
3410	if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then
3411		PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
3412	fi
3413	PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument"
3414	AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument],
3415			[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument],
3416			AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])],
3417					  [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes],
3418					  [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no]))
3419	[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument]
3420	PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
3421fi
3422
3423found="no"
3424m4_foreach([flag], m4_cdr($@), [
3425	if test $found = "no" ; then
3426		if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then
3427			PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
3428		fi
3429
3430		if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then
3431			PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument"
3432		fi
3433
3434		PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag["
3435
3436dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname
3437		AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[])
3438		cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[])
3439		AC_CACHE_VAL($cacheid,
3440			     [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])],
3441					     [eval $cacheid=yes],
3442					     [eval $cacheid=no])])
3443
3444		PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
3445
3446		eval supported=\$$cacheid
3447		AC_MSG_RESULT([$supported])
3448		if test "$supported" = "yes" ; then
3449			$1="$$1 ]flag["
3450			found="yes"
3451		fi
3452	fi
3453])
3454]) # XORG_TESTSET_CFLAG
3455
3456# XORG_COMPILER_FLAGS
3457# ---------------
3458# Minimum version: 1.16.0
3459#
3460# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line
3461# arguments supported by the selected compiler which do NOT alter the generated
3462# code.  These arguments will cause the compiler to print various warnings
3463# during compilation AND turn a conservative set of warnings into errors.
3464#
3465# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in
3466# future versions of util-macros as options are added to new compilers.
3467#
3468AC_DEFUN([XORG_COMPILER_FLAGS], [
3469AC_REQUIRE([XORG_COMPILER_BRAND])
3470
3471AC_ARG_ENABLE(selective-werror,
3472              AS_HELP_STRING([--disable-selective-werror],
3473                             [Turn off selective compiler errors. (default: enabled)]),
3474              [SELECTIVE_WERROR=$enableval],
3475              [SELECTIVE_WERROR=yes])
3476
3477AC_LANG_CASE(
3478        [C], [
3479                define([PREFIX], [C])
3480        ],
3481        [C++], [
3482                define([PREFIX], [CXX])
3483        ]
3484)
3485# -v is too short to test reliably with XORG_TESTSET_CFLAG
3486if test "x$SUNCC" = "xyes"; then
3487    [BASE_]PREFIX[FLAGS]="-v"
3488else
3489    [BASE_]PREFIX[FLAGS]=""
3490fi
3491
3492# This chunk of warnings were those that existed in the legacy CWARNFLAGS
3493XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall])
3494XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith])
3495XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations])
3496XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat])
3497
3498AC_LANG_CASE(
3499	[C], [
3500		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes])
3501		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes])
3502		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs])
3503		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast])
3504		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd])
3505		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement])
3506	]
3507)
3508
3509# This chunk adds additional warnings that could catch undesired effects.
3510XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused])
3511XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized])
3512XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow])
3513XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn])
3514XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute])
3515XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls])
3516XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op])
3517
3518# These are currently disabled because they are noisy.  They will be enabled
3519# in the future once the codebase is sufficiently modernized to silence
3520# them.  For now, I don't want them to drown out the other warnings.
3521# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses])
3522# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align])
3523# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual])
3524
3525# Turn some warnings into errors, so we don't accidently get successful builds
3526# when there are problems that should be fixed.
3527
3528if test "x$SELECTIVE_WERROR" = "xyes" ; then
3529XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED])
3530XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull])
3531XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self])
3532XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main])
3533XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces])
3534XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point])
3535XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT])
3536XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs])
3537XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds])
3538XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings])
3539XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address])
3540XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION])
3541XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION
3542else
3543AC_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])
3544XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit])
3545XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull])
3546XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self])
3547XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain])
3548XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces])
3549XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point])
3550XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type])
3551XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs])
3552XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds])
3553XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings])
3554XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress])
3555XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast])
3556XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast])
3557fi
3558
3559AC_SUBST([BASE_]PREFIX[FLAGS])
3560]) # XORG_COMPILER_FLAGS
3561
3562# XORG_CWARNFLAGS
3563# ---------------
3564# Minimum version: 1.2.0
3565# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead)
3566#
3567# Defines CWARNFLAGS to enable C compiler warnings.
3568#
3569# This function is deprecated because it defines -fno-strict-aliasing
3570# which alters the code generated by the compiler.  If -fno-strict-aliasing
3571# is needed, then it should be added explicitly in the module when
3572# it is updated to use BASE_CFLAGS.
3573#
3574AC_DEFUN([XORG_CWARNFLAGS], [
3575AC_REQUIRE([XORG_COMPILER_FLAGS])
3576AC_REQUIRE([XORG_COMPILER_BRAND])
3577AC_LANG_CASE(
3578	[C], [
3579		CWARNFLAGS="$BASE_CFLAGS"
3580		if  test "x$GCC" = xyes ; then
3581		    CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing"
3582		fi
3583		AC_SUBST(CWARNFLAGS)
3584	]
3585)
3586]) # XORG_CWARNFLAGS
3587
3588# XORG_STRICT_OPTION
3589# -----------------------
3590# Minimum version: 1.3.0
3591#
3592# Add configure option to enable strict compilation flags, such as treating
3593# warnings as fatal errors.
3594# If --enable-strict-compilation is passed to configure, adds strict flags to
3595# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS.
3596#
3597# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or
3598# when strict compilation is unconditionally desired.
3599AC_DEFUN([XORG_STRICT_OPTION], [
3600AC_REQUIRE([XORG_CWARNFLAGS])
3601AC_REQUIRE([XORG_COMPILER_FLAGS])
3602
3603AC_ARG_ENABLE(strict-compilation,
3604			  AS_HELP_STRING([--enable-strict-compilation],
3605			  [Enable all warnings from compiler and make them errors (default: disabled)]),
3606			  [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
3607
3608AC_LANG_CASE(
3609        [C], [
3610                define([PREFIX], [C])
3611        ],
3612        [C++], [
3613                define([PREFIX], [CXX])
3614        ]
3615)
3616
3617[STRICT_]PREFIX[FLAGS]=""
3618XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic])
3619XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn])
3620
3621# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not
3622# activate it with -Werror, so we add it here explicitly.
3623XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes])
3624
3625if test "x$STRICT_COMPILE" = "xyes"; then
3626    [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]"
3627    AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"])
3628fi
3629AC_SUBST([STRICT_]PREFIX[FLAGS])
3630AC_SUBST([BASE_]PREFIX[FLAGS])
3631AC_LANG_CASE([C], AC_SUBST([CWARNFLAGS]))
3632]) # XORG_STRICT_OPTION
3633
3634# XORG_DEFAULT_OPTIONS
3635# --------------------
3636# Minimum version: 1.3.0
3637#
3638# Defines default options for X.Org modules.
3639#
3640AC_DEFUN([XORG_DEFAULT_OPTIONS], [
3641AC_REQUIRE([AC_PROG_INSTALL])
3642XORG_COMPILER_FLAGS
3643XORG_CWARNFLAGS
3644XORG_STRICT_OPTION
3645XORG_RELEASE_VERSION
3646XORG_CHANGELOG
3647XORG_INSTALL
3648XORG_MANPAGE_SECTIONS
3649m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
3650    [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
3651]) # XORG_DEFAULT_OPTIONS
3652
3653# XORG_INSTALL()
3654# ----------------
3655# Minimum version: 1.4.0
3656#
3657# Defines the variable INSTALL_CMD as the command to copy
3658# INSTALL from $prefix/share/util-macros.
3659#
3660AC_DEFUN([XORG_INSTALL], [
3661AC_REQUIRE([PKG_PROG_PKG_CONFIG])
3662macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
3663INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
3664mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
3665|| (rm -f \$(top_srcdir)/.INSTALL.tmp; test -e \$(top_srcdir)/INSTALL || ( \
3666touch \$(top_srcdir)/INSTALL; \
3667echo 'failed to copy INSTALL from util-macros: installing empty INSTALL.' >&2))"
3668AC_SUBST([INSTALL_CMD])
3669]) # XORG_INSTALL
3670dnl Copyright 2005 Red Hat, Inc
3671dnl
3672dnl Permission to use, copy, modify, distribute, and sell this software and its
3673dnl documentation for any purpose is hereby granted without fee, provided that
3674dnl the above copyright notice appear in all copies and that both that
3675dnl copyright notice and this permission notice appear in supporting
3676dnl documentation.
3677dnl
3678dnl The above copyright notice and this permission notice shall be included
3679dnl in all copies or substantial portions of the Software.
3680dnl
3681dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
3682dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
3683dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
3684dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
3685dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
3686dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
3687dnl OTHER DEALINGS IN THE SOFTWARE.
3688dnl
3689dnl Except as contained in this notice, the name of the copyright holders shall
3690dnl not be used in advertising or otherwise to promote the sale, use or
3691dnl other dealings in this Software without prior written authorization
3692dnl from the copyright holders.
3693dnl
3694
3695# XORG_RELEASE_VERSION
3696# --------------------
3697# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
3698
3699AC_DEFUN([XORG_RELEASE_VERSION],[
3700	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
3701		[`echo $PACKAGE_VERSION | cut -d . -f 1`],
3702		[Major version of this package])
3703	PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
3704	if test "x$PVM" = "x"; then
3705		PVM="0"
3706	fi
3707	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
3708		[$PVM],
3709		[Minor version of this package])
3710	PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
3711	if test "x$PVP" = "x"; then
3712		PVP="0"
3713	fi
3714	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
3715		[$PVP],
3716		[Patch version of this package])
3717])
3718
3719# XORG_CHANGELOG()
3720# ----------------
3721# Minimum version: 1.2.0
3722#
3723# Defines the variable CHANGELOG_CMD as the command to generate
3724# ChangeLog from git.
3725#
3726#
3727AC_DEFUN([XORG_CHANGELOG], [
3728CHANGELOG_CMD="((GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp) 2>/dev/null && \
3729mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
3730|| (rm -f \$(top_srcdir)/.changelog.tmp; test -e \$(top_srcdir)/ChangeLog || ( \
3731touch \$(top_srcdir)/ChangeLog; \
3732echo 'git failed to create ChangeLog: installing empty ChangeLog.' >&2))"
3733AC_SUBST([CHANGELOG_CMD])
3734]) # XORG_CHANGELOG
3735
3736# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
3737#
3738#   Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software
3739#   Foundation, Inc.
3740#   Written by Gordon Matzigkeit, 1996
3741#
3742# This file is free software; the Free Software Foundation gives
3743# unlimited permission to copy and/or distribute it, with or without
3744# modifications, as long as this notice is preserved.
3745
3746m4_define([_LT_COPYING], [dnl
3747# Copyright (C) 2014 Free Software Foundation, Inc.
3748# This is free software; see the source for copying conditions.  There is NO
3749# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
3750
3751# GNU Libtool is free software; you can redistribute it and/or modify
3752# it under the terms of the GNU General Public License as published by
3753# the Free Software Foundation; either version 2 of of the License, or
3754# (at your option) any later version.
3755#
3756# As a special exception to the GNU General Public License, if you
3757# distribute this file as part of a program or library that is built
3758# using GNU Libtool, you may include this file under the  same
3759# distribution terms that you use for the rest of that program.
3760#
3761# GNU Libtool is distributed in the hope that it will be useful, but
3762# WITHOUT ANY WARRANTY; without even the implied warranty of
3763# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
3764# GNU General Public License for more details.
3765#
3766# You should have received a copy of the GNU General Public License
3767# along with this program.  If not, see <http://www.gnu.org/licenses/>.
3768])
3769
3770# serial 59 LT_INIT
3771
3772
3773# LT_PREREQ(VERSION)
3774# ------------------
3775# Complain and exit if this libtool version is less that VERSION.
3776m4_defun([LT_PREREQ],
3777[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
3778       [m4_default([$3],
3779		   [m4_fatal([Libtool version $1 or higher is required],
3780		             63)])],
3781       [$2])])
3782
3783
3784# _LT_CHECK_BUILDDIR
3785# ------------------
3786# Complain if the absolute build directory name contains unusual characters
3787m4_defun([_LT_CHECK_BUILDDIR],
3788[case `pwd` in
3789  *\ * | *\	*)
3790    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
3791esac
3792])
3793
3794
3795# LT_INIT([OPTIONS])
3796# ------------------
3797AC_DEFUN([LT_INIT],
3798[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
3799AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
3800AC_BEFORE([$0], [LT_LANG])dnl
3801AC_BEFORE([$0], [LT_OUTPUT])dnl
3802AC_BEFORE([$0], [LTDL_INIT])dnl
3803m4_require([_LT_CHECK_BUILDDIR])dnl
3804
3805dnl Autoconf doesn't catch unexpanded LT_ macros by default:
3806m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
3807m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
3808dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
3809dnl unless we require an AC_DEFUNed macro:
3810AC_REQUIRE([LTOPTIONS_VERSION])dnl
3811AC_REQUIRE([LTSUGAR_VERSION])dnl
3812AC_REQUIRE([LTVERSION_VERSION])dnl
3813AC_REQUIRE([LTOBSOLETE_VERSION])dnl
3814m4_require([_LT_PROG_LTMAIN])dnl
3815
3816_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
3817
3818dnl Parse OPTIONS
3819_LT_SET_OPTIONS([$0], [$1])
3820
3821# This can be used to rebuild libtool when needed
3822LIBTOOL_DEPS=$ltmain
3823
3824# Always use our own libtool.
3825LIBTOOL='$(SHELL) $(top_builddir)/libtool'
3826AC_SUBST(LIBTOOL)dnl
3827
3828_LT_SETUP
3829
3830# Only expand once:
3831m4_define([LT_INIT])
3832])# LT_INIT
3833
3834# Old names:
3835AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
3836AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
3837dnl aclocal-1.4 backwards compatibility:
3838dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
3839dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
3840
3841
3842# _LT_PREPARE_CC_BASENAME
3843# -----------------------
3844m4_defun([_LT_PREPARE_CC_BASENAME], [
3845# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
3846func_cc_basename ()
3847{
3848    for cc_temp in @S|@*""; do
3849      case $cc_temp in
3850        compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
3851        distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
3852        \-*) ;;
3853        *) break;;
3854      esac
3855    done
3856    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
3857}
3858])# _LT_PREPARE_CC_BASENAME
3859
3860
3861# _LT_CC_BASENAME(CC)
3862# -------------------
3863# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
3864# but that macro is also expanded into generated libtool script, which
3865# arranges for $SED and $ECHO to be set by different means.
3866m4_defun([_LT_CC_BASENAME],
3867[m4_require([_LT_PREPARE_CC_BASENAME])dnl
3868AC_REQUIRE([_LT_DECL_SED])dnl
3869AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
3870func_cc_basename $1
3871cc_basename=$func_cc_basename_result
3872])
3873
3874
3875# _LT_FILEUTILS_DEFAULTS
3876# ----------------------
3877# It is okay to use these file commands and assume they have been set
3878# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
3879m4_defun([_LT_FILEUTILS_DEFAULTS],
3880[: ${CP="cp -f"}
3881: ${MV="mv -f"}
3882: ${RM="rm -f"}
3883])# _LT_FILEUTILS_DEFAULTS
3884
3885
3886# _LT_SETUP
3887# ---------
3888m4_defun([_LT_SETUP],
3889[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3890AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3891AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
3892AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
3893
3894_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
3895dnl
3896_LT_DECL([], [host_alias], [0], [The host system])dnl
3897_LT_DECL([], [host], [0])dnl
3898_LT_DECL([], [host_os], [0])dnl
3899dnl
3900_LT_DECL([], [build_alias], [0], [The build system])dnl
3901_LT_DECL([], [build], [0])dnl
3902_LT_DECL([], [build_os], [0])dnl
3903dnl
3904AC_REQUIRE([AC_PROG_CC])dnl
3905AC_REQUIRE([LT_PATH_LD])dnl
3906AC_REQUIRE([LT_PATH_NM])dnl
3907dnl
3908AC_REQUIRE([AC_PROG_LN_S])dnl
3909test -z "$LN_S" && LN_S="ln -s"
3910_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
3911dnl
3912AC_REQUIRE([LT_CMD_MAX_LEN])dnl
3913_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
3914_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
3915dnl
3916m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3917m4_require([_LT_CHECK_SHELL_FEATURES])dnl
3918m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
3919m4_require([_LT_CMD_RELOAD])dnl
3920m4_require([_LT_DECL_FILECMD])dnl
3921m4_require([_LT_CHECK_MAGIC_METHOD])dnl
3922m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
3923m4_require([_LT_CMD_OLD_ARCHIVE])dnl
3924m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
3925m4_require([_LT_WITH_SYSROOT])dnl
3926m4_require([_LT_CMD_TRUNCATE])dnl
3927
3928_LT_CONFIG_LIBTOOL_INIT([
3929# See if we are running on zsh, and set the options that allow our
3930# commands through without removal of \ escapes INIT.
3931if test -n "\${ZSH_VERSION+set}"; then
3932   setopt NO_GLOB_SUBST
3933fi
3934])
3935if test -n "${ZSH_VERSION+set}"; then
3936   setopt NO_GLOB_SUBST
3937fi
3938
3939_LT_CHECK_OBJDIR
3940
3941m4_require([_LT_TAG_COMPILER])dnl
3942
3943case $host_os in
3944aix3*)
3945  # AIX sometimes has problems with the GCC collect2 program.  For some
3946  # reason, if we set the COLLECT_NAMES environment variable, the problems
3947  # vanish in a puff of smoke.
3948  if test set != "${COLLECT_NAMES+set}"; then
3949    COLLECT_NAMES=
3950    export COLLECT_NAMES
3951  fi
3952  ;;
3953esac
3954
3955# Global variables:
3956ofile=libtool
3957can_build_shared=yes
3958
3959# All known linkers require a '.a' archive for static linking (except MSVC and
3960# ICC, which need '.lib').
3961libext=a
3962
3963with_gnu_ld=$lt_cv_prog_gnu_ld
3964
3965old_CC=$CC
3966old_CFLAGS=$CFLAGS
3967
3968# Set sane defaults for various variables
3969test -z "$CC" && CC=cc
3970test -z "$LTCC" && LTCC=$CC
3971test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
3972test -z "$LD" && LD=ld
3973test -z "$ac_objext" && ac_objext=o
3974
3975_LT_CC_BASENAME([$compiler])
3976
3977# Only perform the check for file, if the check method requires it
3978test -z "$MAGIC_CMD" && MAGIC_CMD=file
3979case $deplibs_check_method in
3980file_magic*)
3981  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
3982    _LT_PATH_MAGIC
3983  fi
3984  ;;
3985esac
3986
3987# Use C for the default configuration in the libtool script
3988LT_SUPPORTED_TAG([CC])
3989_LT_LANG_C_CONFIG
3990_LT_LANG_DEFAULT_CONFIG
3991_LT_CONFIG_COMMANDS
3992])# _LT_SETUP
3993
3994
3995# _LT_PREPARE_SED_QUOTE_VARS
3996# --------------------------
3997# Define a few sed substitution that help us do robust quoting.
3998m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
3999[# Backslashify metacharacters that are still active within
4000# double-quoted strings.
4001sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
4002
4003# Same as above, but do not quote variable references.
4004double_quote_subst='s/\([["`\\]]\)/\\\1/g'
4005
4006# Sed substitution to delay expansion of an escaped shell variable in a
4007# double_quote_subst'ed string.
4008delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4009
4010# Sed substitution to delay expansion of an escaped single quote.
4011delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
4012
4013# Sed substitution to avoid accidental globbing in evaled expressions
4014no_glob_subst='s/\*/\\\*/g'
4015])
4016
4017# _LT_PROG_LTMAIN
4018# ---------------
4019# Note that this code is called both from 'configure', and 'config.status'
4020# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
4021# 'config.status' has no value for ac_aux_dir unless we are using Automake,
4022# so we pass a copy along to make sure it has a sensible value anyway.
4023m4_defun([_LT_PROG_LTMAIN],
4024[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
4025_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
4026ltmain=$ac_aux_dir/ltmain.sh
4027])# _LT_PROG_LTMAIN
4028
4029
4030
4031# So that we can recreate a full libtool script including additional
4032# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
4033# in macros and then make a single call at the end using the 'libtool'
4034# label.
4035
4036
4037# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
4038# ----------------------------------------
4039# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
4040m4_define([_LT_CONFIG_LIBTOOL_INIT],
4041[m4_ifval([$1],
4042          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
4043                     [$1
4044])])])
4045
4046# Initialize.
4047m4_define([_LT_OUTPUT_LIBTOOL_INIT])
4048
4049
4050# _LT_CONFIG_LIBTOOL([COMMANDS])
4051# ------------------------------
4052# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
4053m4_define([_LT_CONFIG_LIBTOOL],
4054[m4_ifval([$1],
4055          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
4056                     [$1
4057])])])
4058
4059# Initialize.
4060m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
4061
4062
4063# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
4064# -----------------------------------------------------
4065m4_defun([_LT_CONFIG_SAVE_COMMANDS],
4066[_LT_CONFIG_LIBTOOL([$1])
4067_LT_CONFIG_LIBTOOL_INIT([$2])
4068])
4069
4070
4071# _LT_FORMAT_COMMENT([COMMENT])
4072# -----------------------------
4073# Add leading comment marks to the start of each line, and a trailing
4074# full-stop to the whole comment if one is not present already.
4075m4_define([_LT_FORMAT_COMMENT],
4076[m4_ifval([$1], [
4077m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
4078              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
4079)])
4080
4081
4082
4083
4084
4085# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
4086# -------------------------------------------------------------------
4087# CONFIGNAME is the name given to the value in the libtool script.
4088# VARNAME is the (base) name used in the configure script.
4089# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
4090# VARNAME.  Any other value will be used directly.
4091m4_define([_LT_DECL],
4092[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
4093    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
4094	[m4_ifval([$1], [$1], [$2])])
4095    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
4096    m4_ifval([$4],
4097	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
4098    lt_dict_add_subkey([lt_decl_dict], [$2],
4099	[tagged?], [m4_ifval([$5], [yes], [no])])])
4100])
4101
4102
4103# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
4104# --------------------------------------------------------
4105m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
4106
4107
4108# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
4109# ------------------------------------------------
4110m4_define([lt_decl_tag_varnames],
4111[_lt_decl_filter([tagged?], [yes], $@)])
4112
4113
4114# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
4115# ---------------------------------------------------------
4116m4_define([_lt_decl_filter],
4117[m4_case([$#],
4118  [0], [m4_fatal([$0: too few arguments: $#])],
4119  [1], [m4_fatal([$0: too few arguments: $#: $1])],
4120  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
4121  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
4122  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
4123])
4124
4125
4126# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
4127# --------------------------------------------------
4128m4_define([lt_decl_quote_varnames],
4129[_lt_decl_filter([value], [1], $@)])
4130
4131
4132# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
4133# ---------------------------------------------------
4134m4_define([lt_decl_dquote_varnames],
4135[_lt_decl_filter([value], [2], $@)])
4136
4137
4138# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
4139# ---------------------------------------------------
4140m4_define([lt_decl_varnames_tagged],
4141[m4_assert([$# <= 2])dnl
4142_$0(m4_quote(m4_default([$1], [[, ]])),
4143    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
4144    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
4145m4_define([_lt_decl_varnames_tagged],
4146[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
4147
4148
4149# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
4150# ------------------------------------------------
4151m4_define([lt_decl_all_varnames],
4152[_$0(m4_quote(m4_default([$1], [[, ]])),
4153     m4_if([$2], [],
4154	   m4_quote(lt_decl_varnames),
4155	m4_quote(m4_shift($@))))[]dnl
4156])
4157m4_define([_lt_decl_all_varnames],
4158[lt_join($@, lt_decl_varnames_tagged([$1],
4159			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
4160])
4161
4162
4163# _LT_CONFIG_STATUS_DECLARE([VARNAME])
4164# ------------------------------------
4165# Quote a variable value, and forward it to 'config.status' so that its
4166# declaration there will have the same value as in 'configure'.  VARNAME
4167# must have a single quote delimited value for this to work.
4168m4_define([_LT_CONFIG_STATUS_DECLARE],
4169[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
4170
4171
4172# _LT_CONFIG_STATUS_DECLARATIONS
4173# ------------------------------
4174# We delimit libtool config variables with single quotes, so when
4175# we write them to config.status, we have to be sure to quote all
4176# embedded single quotes properly.  In configure, this macro expands
4177# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
4178#
4179#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
4180m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
4181[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
4182    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
4183
4184
4185# _LT_LIBTOOL_TAGS
4186# ----------------
4187# Output comment and list of tags supported by the script
4188m4_defun([_LT_LIBTOOL_TAGS],
4189[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
4190available_tags='_LT_TAGS'dnl
4191])
4192
4193
4194# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
4195# -----------------------------------
4196# Extract the dictionary values for VARNAME (optionally with TAG) and
4197# expand to a commented shell variable setting:
4198#
4199#    # Some comment about what VAR is for.
4200#    visible_name=$lt_internal_name
4201m4_define([_LT_LIBTOOL_DECLARE],
4202[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
4203					   [description])))[]dnl
4204m4_pushdef([_libtool_name],
4205    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
4206m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
4207    [0], [_libtool_name=[$]$1],
4208    [1], [_libtool_name=$lt_[]$1],
4209    [2], [_libtool_name=$lt_[]$1],
4210    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
4211m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
4212])
4213
4214
4215# _LT_LIBTOOL_CONFIG_VARS
4216# -----------------------
4217# Produce commented declarations of non-tagged libtool config variables
4218# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
4219# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
4220# section) are produced by _LT_LIBTOOL_TAG_VARS.
4221m4_defun([_LT_LIBTOOL_CONFIG_VARS],
4222[m4_foreach([_lt_var],
4223    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
4224    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
4225
4226
4227# _LT_LIBTOOL_TAG_VARS(TAG)
4228# -------------------------
4229m4_define([_LT_LIBTOOL_TAG_VARS],
4230[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
4231    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
4232
4233
4234# _LT_TAGVAR(VARNAME, [TAGNAME])
4235# ------------------------------
4236m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
4237
4238
4239# _LT_CONFIG_COMMANDS
4240# -------------------
4241# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
4242# variables for single and double quote escaping we saved from calls
4243# to _LT_DECL, we can put quote escaped variables declarations
4244# into 'config.status', and then the shell code to quote escape them in
4245# for loops in 'config.status'.  Finally, any additional code accumulated
4246# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
4247m4_defun([_LT_CONFIG_COMMANDS],
4248[AC_PROVIDE_IFELSE([LT_OUTPUT],
4249	dnl If the libtool generation code has been placed in $CONFIG_LT,
4250	dnl instead of duplicating it all over again into config.status,
4251	dnl then we will have config.status run $CONFIG_LT later, so it
4252	dnl needs to know what name is stored there:
4253        [AC_CONFIG_COMMANDS([libtool],
4254            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
4255    dnl If the libtool generation code is destined for config.status,
4256    dnl expand the accumulated commands and init code now:
4257    [AC_CONFIG_COMMANDS([libtool],
4258        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
4259])#_LT_CONFIG_COMMANDS
4260
4261
4262# Initialize.
4263m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
4264[
4265
4266# The HP-UX ksh and POSIX shell print the target directory to stdout
4267# if CDPATH is set.
4268(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
4269
4270sed_quote_subst='$sed_quote_subst'
4271double_quote_subst='$double_quote_subst'
4272delay_variable_subst='$delay_variable_subst'
4273_LT_CONFIG_STATUS_DECLARATIONS
4274LTCC='$LTCC'
4275LTCFLAGS='$LTCFLAGS'
4276compiler='$compiler_DEFAULT'
4277
4278# A function that is used when there is no print builtin or printf.
4279func_fallback_echo ()
4280{
4281  eval 'cat <<_LTECHO_EOF
4282\$[]1
4283_LTECHO_EOF'
4284}
4285
4286# Quote evaled strings.
4287for var in lt_decl_all_varnames([[ \
4288]], lt_decl_quote_varnames); do
4289    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
4290    *[[\\\\\\\`\\"\\\$]]*)
4291      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
4292      ;;
4293    *)
4294      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
4295      ;;
4296    esac
4297done
4298
4299# Double-quote double-evaled strings.
4300for var in lt_decl_all_varnames([[ \
4301]], lt_decl_dquote_varnames); do
4302    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
4303    *[[\\\\\\\`\\"\\\$]]*)
4304      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
4305      ;;
4306    *)
4307      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
4308      ;;
4309    esac
4310done
4311
4312_LT_OUTPUT_LIBTOOL_INIT
4313])
4314
4315# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
4316# ------------------------------------
4317# Generate a child script FILE with all initialization necessary to
4318# reuse the environment learned by the parent script, and make the
4319# file executable.  If COMMENT is supplied, it is inserted after the
4320# '#!' sequence but before initialization text begins.  After this
4321# macro, additional text can be appended to FILE to form the body of
4322# the child script.  The macro ends with non-zero status if the
4323# file could not be fully written (such as if the disk is full).
4324m4_ifdef([AS_INIT_GENERATED],
4325[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
4326[m4_defun([_LT_GENERATED_FILE_INIT],
4327[m4_require([AS_PREPARE])]dnl
4328[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
4329[lt_write_fail=0
4330cat >$1 <<_ASEOF || lt_write_fail=1
4331#! $SHELL
4332# Generated by $as_me.
4333$2
4334SHELL=\${CONFIG_SHELL-$SHELL}
4335export SHELL
4336_ASEOF
4337cat >>$1 <<\_ASEOF || lt_write_fail=1
4338AS_SHELL_SANITIZE
4339_AS_PREPARE
4340exec AS_MESSAGE_FD>&1
4341_ASEOF
4342test 0 = "$lt_write_fail" && chmod +x $1[]dnl
4343m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
4344
4345# LT_OUTPUT
4346# ---------
4347# This macro allows early generation of the libtool script (before
4348# AC_OUTPUT is called), incase it is used in configure for compilation
4349# tests.
4350AC_DEFUN([LT_OUTPUT],
4351[: ${CONFIG_LT=./config.lt}
4352AC_MSG_NOTICE([creating $CONFIG_LT])
4353_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
4354[# Run this file to recreate a libtool stub with the current configuration.])
4355
4356cat >>"$CONFIG_LT" <<\_LTEOF
4357lt_cl_silent=false
4358exec AS_MESSAGE_LOG_FD>>config.log
4359{
4360  echo
4361  AS_BOX([Running $as_me.])
4362} >&AS_MESSAGE_LOG_FD
4363
4364lt_cl_help="\
4365'$as_me' creates a local libtool stub from the current configuration,
4366for use in further configure time tests before the real libtool is
4367generated.
4368
4369Usage: $[0] [[OPTIONS]]
4370
4371  -h, --help      print this help, then exit
4372  -V, --version   print version number, then exit
4373  -q, --quiet     do not print progress messages
4374  -d, --debug     don't remove temporary files
4375
4376Report bugs to <bug-libtool@gnu.org>."
4377
4378lt_cl_version="\
4379m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
4380m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
4381configured by $[0], generated by m4_PACKAGE_STRING.
4382
4383Copyright (C) 2011 Free Software Foundation, Inc.
4384This config.lt script is free software; the Free Software Foundation
4385gives unlimited permision to copy, distribute and modify it."
4386
4387while test 0 != $[#]
4388do
4389  case $[1] in
4390    --version | --v* | -V )
4391      echo "$lt_cl_version"; exit 0 ;;
4392    --help | --h* | -h )
4393      echo "$lt_cl_help"; exit 0 ;;
4394    --debug | --d* | -d )
4395      debug=: ;;
4396    --quiet | --q* | --silent | --s* | -q )
4397      lt_cl_silent=: ;;
4398
4399    -*) AC_MSG_ERROR([unrecognized option: $[1]
4400Try '$[0] --help' for more information.]) ;;
4401
4402    *) AC_MSG_ERROR([unrecognized argument: $[1]
4403Try '$[0] --help' for more information.]) ;;
4404  esac
4405  shift
4406done
4407
4408if $lt_cl_silent; then
4409  exec AS_MESSAGE_FD>/dev/null
4410fi
4411_LTEOF
4412
4413cat >>"$CONFIG_LT" <<_LTEOF
4414_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
4415_LTEOF
4416
4417cat >>"$CONFIG_LT" <<\_LTEOF
4418AC_MSG_NOTICE([creating $ofile])
4419_LT_OUTPUT_LIBTOOL_COMMANDS
4420AS_EXIT(0)
4421_LTEOF
4422chmod +x "$CONFIG_LT"
4423
4424# configure is writing to config.log, but config.lt does its own redirection,
4425# appending to config.log, which fails on DOS, as config.log is still kept
4426# open by configure.  Here we exec the FD to /dev/null, effectively closing
4427# config.log, so it can be properly (re)opened and appended to by config.lt.
4428lt_cl_success=:
4429test yes = "$silent" &&
4430  lt_config_lt_args="$lt_config_lt_args --quiet"
4431exec AS_MESSAGE_LOG_FD>/dev/null
4432$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
4433exec AS_MESSAGE_LOG_FD>>config.log
4434$lt_cl_success || AS_EXIT(1)
4435])# LT_OUTPUT
4436
4437
4438# _LT_CONFIG(TAG)
4439# ---------------
4440# If TAG is the built-in tag, create an initial libtool script with a
4441# default configuration from the untagged config vars.  Otherwise add code
4442# to config.status for appending the configuration named by TAG from the
4443# matching tagged config vars.
4444m4_defun([_LT_CONFIG],
4445[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4446_LT_CONFIG_SAVE_COMMANDS([
4447  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
4448  m4_if(_LT_TAG, [C], [
4449    # See if we are running on zsh, and set the options that allow our
4450    # commands through without removal of \ escapes.
4451    if test -n "${ZSH_VERSION+set}"; then
4452      setopt NO_GLOB_SUBST
4453    fi
4454
4455    cfgfile=${ofile}T
4456    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
4457    $RM "$cfgfile"
4458
4459    cat <<_LT_EOF >> "$cfgfile"
4460#! $SHELL
4461# Generated automatically by $as_me ($PACKAGE) $VERSION
4462# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4463# NOTE: Changes made to this file will be lost: look at ltmain.sh.
4464
4465# Provide generalized library-building support services.
4466# Written by Gordon Matzigkeit, 1996
4467
4468_LT_COPYING
4469_LT_LIBTOOL_TAGS
4470
4471# Configured defaults for sys_lib_dlsearch_path munging.
4472: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
4473
4474# ### BEGIN LIBTOOL CONFIG
4475_LT_LIBTOOL_CONFIG_VARS
4476_LT_LIBTOOL_TAG_VARS
4477# ### END LIBTOOL CONFIG
4478
4479_LT_EOF
4480
4481    cat <<'_LT_EOF' >> "$cfgfile"
4482
4483# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
4484
4485_LT_PREPARE_MUNGE_PATH_LIST
4486_LT_PREPARE_CC_BASENAME
4487
4488# ### END FUNCTIONS SHARED WITH CONFIGURE
4489
4490_LT_EOF
4491
4492  case $host_os in
4493  aix3*)
4494    cat <<\_LT_EOF >> "$cfgfile"
4495# AIX sometimes has problems with the GCC collect2 program.  For some
4496# reason, if we set the COLLECT_NAMES environment variable, the problems
4497# vanish in a puff of smoke.
4498if test set != "${COLLECT_NAMES+set}"; then
4499  COLLECT_NAMES=
4500  export COLLECT_NAMES
4501fi
4502_LT_EOF
4503    ;;
4504  esac
4505
4506  _LT_PROG_LTMAIN
4507
4508  # We use sed instead of cat because bash on DJGPP gets confused if
4509  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
4510  # text mode, it properly converts lines to CR/LF.  This bash problem
4511  # is reportedly fixed, but why not run on old versions too?
4512  $SED '$q' "$ltmain" >> "$cfgfile" \
4513     || (rm -f "$cfgfile"; exit 1)
4514
4515   mv -f "$cfgfile" "$ofile" ||
4516    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
4517  chmod +x "$ofile"
4518],
4519[cat <<_LT_EOF >> "$ofile"
4520
4521dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
4522dnl in a comment (ie after a #).
4523# ### BEGIN LIBTOOL TAG CONFIG: $1
4524_LT_LIBTOOL_TAG_VARS(_LT_TAG)
4525# ### END LIBTOOL TAG CONFIG: $1
4526_LT_EOF
4527])dnl /m4_if
4528],
4529[m4_if([$1], [], [
4530    PACKAGE='$PACKAGE'
4531    VERSION='$VERSION'
4532    RM='$RM'
4533    ofile='$ofile'], [])
4534])dnl /_LT_CONFIG_SAVE_COMMANDS
4535])# _LT_CONFIG
4536
4537
4538# LT_SUPPORTED_TAG(TAG)
4539# ---------------------
4540# Trace this macro to discover what tags are supported by the libtool
4541# --tag option, using:
4542#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
4543AC_DEFUN([LT_SUPPORTED_TAG], [])
4544
4545
4546# C support is built-in for now
4547m4_define([_LT_LANG_C_enabled], [])
4548m4_define([_LT_TAGS], [])
4549
4550
4551# LT_LANG(LANG)
4552# -------------
4553# Enable libtool support for the given language if not already enabled.
4554AC_DEFUN([LT_LANG],
4555[AC_BEFORE([$0], [LT_OUTPUT])dnl
4556m4_case([$1],
4557  [C],			[_LT_LANG(C)],
4558  [C++],		[_LT_LANG(CXX)],
4559  [Go],			[_LT_LANG(GO)],
4560  [Java],		[_LT_LANG(GCJ)],
4561  [Fortran 77],		[_LT_LANG(F77)],
4562  [Fortran],		[_LT_LANG(FC)],
4563  [Windows Resource],	[_LT_LANG(RC)],
4564  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
4565    [_LT_LANG($1)],
4566    [m4_fatal([$0: unsupported language: "$1"])])])dnl
4567])# LT_LANG
4568
4569
4570# _LT_LANG(LANGNAME)
4571# ------------------
4572m4_defun([_LT_LANG],
4573[m4_ifdef([_LT_LANG_]$1[_enabled], [],
4574  [LT_SUPPORTED_TAG([$1])dnl
4575  m4_append([_LT_TAGS], [$1 ])dnl
4576  m4_define([_LT_LANG_]$1[_enabled], [])dnl
4577  _LT_LANG_$1_CONFIG($1)])dnl
4578])# _LT_LANG
4579
4580
4581m4_ifndef([AC_PROG_GO], [
4582# NOTE: This macro has been submitted for inclusion into   #
4583#  GNU Autoconf as AC_PROG_GO.  When it is available in    #
4584#  a released version of Autoconf we should remove this    #
4585#  macro and use it instead.                               #
4586m4_defun([AC_PROG_GO],
4587[AC_LANG_PUSH(Go)dnl
4588AC_ARG_VAR([GOC],     [Go compiler command])dnl
4589AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
4590_AC_ARG_VAR_LDFLAGS()dnl
4591AC_CHECK_TOOL(GOC, gccgo)
4592if test -z "$GOC"; then
4593  if test -n "$ac_tool_prefix"; then
4594    AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
4595  fi
4596fi
4597if test -z "$GOC"; then
4598  AC_CHECK_PROG(GOC, gccgo, gccgo, false)
4599fi
4600])#m4_defun
4601])#m4_ifndef
4602
4603
4604# _LT_LANG_DEFAULT_CONFIG
4605# -----------------------
4606m4_defun([_LT_LANG_DEFAULT_CONFIG],
4607[AC_PROVIDE_IFELSE([AC_PROG_CXX],
4608  [LT_LANG(CXX)],
4609  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
4610
4611AC_PROVIDE_IFELSE([AC_PROG_F77],
4612  [LT_LANG(F77)],
4613  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
4614
4615AC_PROVIDE_IFELSE([AC_PROG_FC],
4616  [LT_LANG(FC)],
4617  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
4618
4619dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
4620dnl pulling things in needlessly.
4621AC_PROVIDE_IFELSE([AC_PROG_GCJ],
4622  [LT_LANG(GCJ)],
4623  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
4624    [LT_LANG(GCJ)],
4625    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
4626      [LT_LANG(GCJ)],
4627      [m4_ifdef([AC_PROG_GCJ],
4628	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
4629       m4_ifdef([A][M_PROG_GCJ],
4630	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
4631       m4_ifdef([LT_PROG_GCJ],
4632	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
4633
4634AC_PROVIDE_IFELSE([AC_PROG_GO],
4635  [LT_LANG(GO)],
4636  [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
4637
4638AC_PROVIDE_IFELSE([LT_PROG_RC],
4639  [LT_LANG(RC)],
4640  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
4641])# _LT_LANG_DEFAULT_CONFIG
4642
4643# Obsolete macros:
4644AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
4645AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
4646AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
4647AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
4648AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
4649dnl aclocal-1.4 backwards compatibility:
4650dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
4651dnl AC_DEFUN([AC_LIBTOOL_F77], [])
4652dnl AC_DEFUN([AC_LIBTOOL_FC], [])
4653dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
4654dnl AC_DEFUN([AC_LIBTOOL_RC], [])
4655
4656
4657# _LT_TAG_COMPILER
4658# ----------------
4659m4_defun([_LT_TAG_COMPILER],
4660[AC_REQUIRE([AC_PROG_CC])dnl
4661
4662_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
4663_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
4664_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
4665_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
4666
4667# If no C compiler was specified, use CC.
4668LTCC=${LTCC-"$CC"}
4669
4670# If no C compiler flags were specified, use CFLAGS.
4671LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
4672
4673# Allow CC to be a program name with arguments.
4674compiler=$CC
4675])# _LT_TAG_COMPILER
4676
4677
4678# _LT_COMPILER_BOILERPLATE
4679# ------------------------
4680# Check for compiler boilerplate output or warnings with
4681# the simple compiler test code.
4682m4_defun([_LT_COMPILER_BOILERPLATE],
4683[m4_require([_LT_DECL_SED])dnl
4684ac_outfile=conftest.$ac_objext
4685echo "$lt_simple_compile_test_code" >conftest.$ac_ext
4686eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
4687_lt_compiler_boilerplate=`cat conftest.err`
4688$RM conftest*
4689])# _LT_COMPILER_BOILERPLATE
4690
4691
4692# _LT_LINKER_BOILERPLATE
4693# ----------------------
4694# Check for linker boilerplate output or warnings with
4695# the simple link test code.
4696m4_defun([_LT_LINKER_BOILERPLATE],
4697[m4_require([_LT_DECL_SED])dnl
4698ac_outfile=conftest.$ac_objext
4699echo "$lt_simple_link_test_code" >conftest.$ac_ext
4700eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
4701_lt_linker_boilerplate=`cat conftest.err`
4702$RM -r conftest*
4703])# _LT_LINKER_BOILERPLATE
4704
4705# _LT_REQUIRED_DARWIN_CHECKS
4706# -------------------------
4707m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
4708  case $host_os in
4709    rhapsody* | darwin*)
4710    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
4711    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
4712    AC_CHECK_TOOL([LIPO], [lipo], [:])
4713    AC_CHECK_TOOL([OTOOL], [otool], [:])
4714    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
4715    _LT_DECL([], [DSYMUTIL], [1],
4716      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
4717    _LT_DECL([], [NMEDIT], [1],
4718      [Tool to change global to local symbols on Mac OS X])
4719    _LT_DECL([], [LIPO], [1],
4720      [Tool to manipulate fat objects and archives on Mac OS X])
4721    _LT_DECL([], [OTOOL], [1],
4722      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
4723    _LT_DECL([], [OTOOL64], [1],
4724      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
4725
4726    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
4727      [lt_cv_apple_cc_single_mod=no
4728      if test -z "$LT_MULTI_MODULE"; then
4729	# By default we will add the -single_module flag. You can override
4730	# by either setting the environment variable LT_MULTI_MODULE
4731	# non-empty at configure time, or by adding -multi_module to the
4732	# link flags.
4733	rm -rf libconftest.dylib*
4734	echo "int foo(void){return 1;}" > conftest.c
4735	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
4736-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
4737	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
4738	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
4739        _lt_result=$?
4740	# If there is a non-empty error log, and "single_module"
4741	# appears in it, assume the flag caused a linker warning
4742        if test -s conftest.err && $GREP single_module conftest.err; then
4743	  cat conftest.err >&AS_MESSAGE_LOG_FD
4744	# Otherwise, if the output was created with a 0 exit code from
4745	# the compiler, it worked.
4746	elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
4747	  lt_cv_apple_cc_single_mod=yes
4748	else
4749	  cat conftest.err >&AS_MESSAGE_LOG_FD
4750	fi
4751	rm -rf libconftest.dylib*
4752	rm -f conftest.*
4753      fi])
4754
4755    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
4756      [lt_cv_ld_exported_symbols_list],
4757      [lt_cv_ld_exported_symbols_list=no
4758      save_LDFLAGS=$LDFLAGS
4759      echo "_main" > conftest.sym
4760      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
4761      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
4762	[lt_cv_ld_exported_symbols_list=yes],
4763	[lt_cv_ld_exported_symbols_list=no])
4764	LDFLAGS=$save_LDFLAGS
4765    ])
4766
4767    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
4768      [lt_cv_ld_force_load=no
4769      cat > conftest.c << _LT_EOF
4770int forced_loaded() { return 2;}
4771_LT_EOF
4772      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
4773      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
4774      echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
4775      $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
4776      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
4777      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
4778      cat > conftest.c << _LT_EOF
4779int main() { return 0;}
4780_LT_EOF
4781      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
4782      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
4783      _lt_result=$?
4784      if test -s conftest.err && $GREP force_load conftest.err; then
4785	cat conftest.err >&AS_MESSAGE_LOG_FD
4786      elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
4787	lt_cv_ld_force_load=yes
4788      else
4789	cat conftest.err >&AS_MESSAGE_LOG_FD
4790      fi
4791        rm -f conftest.err libconftest.a conftest conftest.c
4792        rm -rf conftest.dSYM
4793    ])
4794    case $host_os in
4795    rhapsody* | darwin1.[[012]])
4796      _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
4797    darwin1.*)
4798      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
4799    darwin*)
4800      case $MACOSX_DEPLOYMENT_TARGET,$host in
4801        10.[[012]],*|,*powerpc*-darwin[[5-8]]*)
4802          _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
4803        *)
4804          _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
4805      esac
4806    ;;
4807  esac
4808    if test yes = "$lt_cv_apple_cc_single_mod"; then
4809      _lt_dar_single_mod='$single_module'
4810    fi
4811    if test yes = "$lt_cv_ld_exported_symbols_list"; then
4812      _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
4813    else
4814      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
4815    fi
4816    if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
4817      _lt_dsymutil='~$DSYMUTIL $lib || :'
4818    else
4819      _lt_dsymutil=
4820    fi
4821    ;;
4822  esac
4823])
4824
4825
4826# _LT_DARWIN_LINKER_FEATURES([TAG])
4827# ---------------------------------
4828# Checks for linker and compiler features on darwin
4829m4_defun([_LT_DARWIN_LINKER_FEATURES],
4830[
4831  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
4832  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
4833  _LT_TAGVAR(hardcode_direct, $1)=no
4834  _LT_TAGVAR(hardcode_automatic, $1)=yes
4835  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4836  if test yes = "$lt_cv_ld_force_load"; then
4837    _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\"`'
4838    m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
4839                  [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
4840  else
4841    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
4842  fi
4843  _LT_TAGVAR(link_all_deplibs, $1)=yes
4844  _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
4845  case $cc_basename in
4846     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
4847     *) _lt_dar_can_shared=$GCC ;;
4848  esac
4849  if test yes = "$_lt_dar_can_shared"; then
4850    output_verbose_link_cmd=func_echo_all
4851    _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"
4852    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
4853    _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"
4854    _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"
4855    m4_if([$1], [CXX],
4856[   if test yes != "$lt_cv_apple_cc_single_mod"; then
4857      _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"
4858      _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"
4859    fi
4860],[])
4861  else
4862  _LT_TAGVAR(ld_shlibs, $1)=no
4863  fi
4864])
4865
4866# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
4867# ----------------------------------
4868# Links a minimal program and checks the executable
4869# for the system default hardcoded library path. In most cases,
4870# this is /usr/lib:/lib, but when the MPI compilers are used
4871# the location of the communication and MPI libs are included too.
4872# If we don't find anything, use the default library path according
4873# to the aix ld manual.
4874# Store the results from the different compilers for each TAGNAME.
4875# Allow to override them for all tags through lt_cv_aix_libpath.
4876m4_defun([_LT_SYS_MODULE_PATH_AIX],
4877[m4_require([_LT_DECL_SED])dnl
4878if test set = "${lt_cv_aix_libpath+set}"; then
4879  aix_libpath=$lt_cv_aix_libpath
4880else
4881  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
4882  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
4883  lt_aix_libpath_sed='[
4884      /Import File Strings/,/^$/ {
4885	  /^0/ {
4886	      s/^0  *\([^ ]*\) *$/\1/
4887	      p
4888	  }
4889      }]'
4890  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
4891  # Check for a 64-bit object if we didn't find anything.
4892  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
4893    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
4894  fi],[])
4895  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
4896    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
4897  fi
4898  ])
4899  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
4900fi
4901])# _LT_SYS_MODULE_PATH_AIX
4902
4903
4904# _LT_SHELL_INIT(ARG)
4905# -------------------
4906m4_define([_LT_SHELL_INIT],
4907[m4_divert_text([M4SH-INIT], [$1
4908])])# _LT_SHELL_INIT
4909
4910
4911
4912# _LT_PROG_ECHO_BACKSLASH
4913# -----------------------
4914# Find how we can fake an echo command that does not interpret backslash.
4915# In particular, with Autoconf 2.60 or later we add some code to the start
4916# of the generated configure script that will find a shell with a builtin
4917# printf (that we can use as an echo command).
4918m4_defun([_LT_PROG_ECHO_BACKSLASH],
4919[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
4920ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
4921ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
4922
4923AC_MSG_CHECKING([how to print strings])
4924# Test print first, because it will be a builtin if present.
4925if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
4926   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
4927  ECHO='print -r --'
4928elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
4929  ECHO='printf %s\n'
4930else
4931  # Use this function as a fallback that always works.
4932  func_fallback_echo ()
4933  {
4934    eval 'cat <<_LTECHO_EOF
4935$[]1
4936_LTECHO_EOF'
4937  }
4938  ECHO='func_fallback_echo'
4939fi
4940
4941# func_echo_all arg...
4942# Invoke $ECHO with all args, space-separated.
4943func_echo_all ()
4944{
4945    $ECHO "$*"
4946}
4947
4948case $ECHO in
4949  printf*) AC_MSG_RESULT([printf]) ;;
4950  print*) AC_MSG_RESULT([print -r]) ;;
4951  *) AC_MSG_RESULT([cat]) ;;
4952esac
4953
4954m4_ifdef([_AS_DETECT_SUGGESTED],
4955[_AS_DETECT_SUGGESTED([
4956  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
4957    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
4958    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
4959    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
4960    PATH=/empty FPATH=/empty; export PATH FPATH
4961    test "X`printf %s $ECHO`" = "X$ECHO" \
4962      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
4963
4964_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
4965_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
4966])# _LT_PROG_ECHO_BACKSLASH
4967
4968
4969# _LT_WITH_SYSROOT
4970# ----------------
4971AC_DEFUN([_LT_WITH_SYSROOT],
4972[m4_require([_LT_DECL_SED])dnl
4973AC_MSG_CHECKING([for sysroot])
4974AC_ARG_WITH([sysroot],
4975[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
4976  [Search for dependent libraries within DIR (or the compiler's sysroot
4977   if not specified).])],
4978[], [with_sysroot=no])
4979
4980dnl lt_sysroot will always be passed unquoted.  We quote it here
4981dnl in case the user passed a directory name.
4982lt_sysroot=
4983case $with_sysroot in #(
4984 yes)
4985   if test yes = "$GCC"; then
4986     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
4987   fi
4988   ;; #(
4989 /*)
4990   lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"`
4991   ;; #(
4992 no|'')
4993   ;; #(
4994 *)
4995   AC_MSG_RESULT([$with_sysroot])
4996   AC_MSG_ERROR([The sysroot must be an absolute path.])
4997   ;;
4998esac
4999
5000 AC_MSG_RESULT([${lt_sysroot:-no}])
5001_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
5002[dependent libraries, and where our libraries should be installed.])])
5003
5004# _LT_ENABLE_LOCK
5005# ---------------
5006m4_defun([_LT_ENABLE_LOCK],
5007[AC_ARG_ENABLE([libtool-lock],
5008  [AS_HELP_STRING([--disable-libtool-lock],
5009    [avoid locking (might break parallel builds)])])
5010test no = "$enable_libtool_lock" || enable_libtool_lock=yes
5011
5012# Some flags need to be propagated to the compiler or linker for good
5013# libtool support.
5014case $host in
5015ia64-*-hpux*)
5016  # Find out what ABI is being produced by ac_compile, and set mode
5017  # options accordingly.
5018  echo 'int i;' > conftest.$ac_ext
5019  if AC_TRY_EVAL(ac_compile); then
5020    case `$FILECMD conftest.$ac_objext` in
5021      *ELF-32*)
5022	HPUX_IA64_MODE=32
5023	;;
5024      *ELF-64*)
5025	HPUX_IA64_MODE=64
5026	;;
5027    esac
5028  fi
5029  rm -rf conftest*
5030  ;;
5031*-*-irix6*)
5032  # Find out what ABI is being produced by ac_compile, and set linker
5033  # options accordingly.
5034  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
5035  if AC_TRY_EVAL(ac_compile); then
5036    if test yes = "$lt_cv_prog_gnu_ld"; then
5037      case `$FILECMD conftest.$ac_objext` in
5038	*32-bit*)
5039	  LD="${LD-ld} -melf32bsmip"
5040	  ;;
5041	*N32*)
5042	  LD="${LD-ld} -melf32bmipn32"
5043	  ;;
5044	*64-bit*)
5045	  LD="${LD-ld} -melf64bmip"
5046	;;
5047      esac
5048    else
5049      case `$FILECMD conftest.$ac_objext` in
5050	*32-bit*)
5051	  LD="${LD-ld} -32"
5052	  ;;
5053	*N32*)
5054	  LD="${LD-ld} -n32"
5055	  ;;
5056	*64-bit*)
5057	  LD="${LD-ld} -64"
5058	  ;;
5059      esac
5060    fi
5061  fi
5062  rm -rf conftest*
5063  ;;
5064
5065mips64*-*linux*)
5066  # Find out what ABI is being produced by ac_compile, and set linker
5067  # options accordingly.
5068  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
5069  if AC_TRY_EVAL(ac_compile); then
5070    emul=elf
5071    case `$FILECMD conftest.$ac_objext` in
5072      *32-bit*)
5073	emul="${emul}32"
5074	;;
5075      *64-bit*)
5076	emul="${emul}64"
5077	;;
5078    esac
5079    case `$FILECMD conftest.$ac_objext` in
5080      *MSB*)
5081	emul="${emul}btsmip"
5082	;;
5083      *LSB*)
5084	emul="${emul}ltsmip"
5085	;;
5086    esac
5087    case `$FILECMD conftest.$ac_objext` in
5088      *N32*)
5089	emul="${emul}n32"
5090	;;
5091    esac
5092    LD="${LD-ld} -m $emul"
5093  fi
5094  rm -rf conftest*
5095  ;;
5096
5097x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
5098s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
5099  # Find out what ABI is being produced by ac_compile, and set linker
5100  # options accordingly.  Note that the listed cases only cover the
5101  # situations where additional linker options are needed (such as when
5102  # doing 32-bit compilation for a host where ld defaults to 64-bit, or
5103  # vice versa); the common cases where no linker options are needed do
5104  # not appear in the list.
5105  echo 'int i;' > conftest.$ac_ext
5106  if AC_TRY_EVAL(ac_compile); then
5107    case `$FILECMD conftest.o` in
5108      *32-bit*)
5109	case $host in
5110	  x86_64-*kfreebsd*-gnu)
5111	    LD="${LD-ld} -m elf_i386_fbsd"
5112	    ;;
5113	  x86_64-*linux*)
5114	    case `$FILECMD conftest.o` in
5115	      *x86-64*)
5116		LD="${LD-ld} -m elf32_x86_64"
5117		;;
5118	      *)
5119		LD="${LD-ld} -m elf_i386"
5120		;;
5121	    esac
5122	    ;;
5123	  powerpc64le-*linux*)
5124	    LD="${LD-ld} -m elf32lppclinux"
5125	    ;;
5126	  powerpc64-*linux*)
5127	    LD="${LD-ld} -m elf32ppclinux"
5128	    ;;
5129	  s390x-*linux*)
5130	    LD="${LD-ld} -m elf_s390"
5131	    ;;
5132	  sparc64-*linux*)
5133	    LD="${LD-ld} -m elf32_sparc"
5134	    ;;
5135	esac
5136	;;
5137      *64-bit*)
5138	case $host in
5139	  x86_64-*kfreebsd*-gnu)
5140	    LD="${LD-ld} -m elf_x86_64_fbsd"
5141	    ;;
5142	  x86_64-*linux*)
5143	    LD="${LD-ld} -m elf_x86_64"
5144	    ;;
5145	  powerpcle-*linux*)
5146	    LD="${LD-ld} -m elf64lppc"
5147	    ;;
5148	  powerpc-*linux*)
5149	    LD="${LD-ld} -m elf64ppc"
5150	    ;;
5151	  s390*-*linux*|s390*-*tpf*)
5152	    LD="${LD-ld} -m elf64_s390"
5153	    ;;
5154	  sparc*-*linux*)
5155	    LD="${LD-ld} -m elf64_sparc"
5156	    ;;
5157	esac
5158	;;
5159    esac
5160  fi
5161  rm -rf conftest*
5162  ;;
5163
5164*-*-sco3.2v5*)
5165  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
5166  SAVE_CFLAGS=$CFLAGS
5167  CFLAGS="$CFLAGS -belf"
5168  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
5169    [AC_LANG_PUSH(C)
5170     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
5171     AC_LANG_POP])
5172  if test yes != "$lt_cv_cc_needs_belf"; then
5173    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
5174    CFLAGS=$SAVE_CFLAGS
5175  fi
5176  ;;
5177*-*solaris*)
5178  # Find out what ABI is being produced by ac_compile, and set linker
5179  # options accordingly.
5180  echo 'int i;' > conftest.$ac_ext
5181  if AC_TRY_EVAL(ac_compile); then
5182    case `$FILECMD conftest.o` in
5183    *64-bit*)
5184      case $lt_cv_prog_gnu_ld in
5185      yes*)
5186        case $host in
5187        i?86-*-solaris*|x86_64-*-solaris*)
5188          LD="${LD-ld} -m elf_x86_64"
5189          ;;
5190        sparc*-*-solaris*)
5191          LD="${LD-ld} -m elf64_sparc"
5192          ;;
5193        esac
5194        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
5195        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
5196          LD=${LD-ld}_sol2
5197        fi
5198        ;;
5199      *)
5200	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
5201	  LD="${LD-ld} -64"
5202	fi
5203	;;
5204      esac
5205      ;;
5206    esac
5207  fi
5208  rm -rf conftest*
5209  ;;
5210esac
5211
5212need_locks=$enable_libtool_lock
5213])# _LT_ENABLE_LOCK
5214
5215
5216# _LT_PROG_AR
5217# -----------
5218m4_defun([_LT_PROG_AR],
5219[AC_CHECK_TOOLS(AR, [ar], false)
5220: ${AR=ar}
5221_LT_DECL([], [AR], [1], [The archiver])
5222
5223# Use ARFLAGS variable as AR's operation code to sync the variable naming with
5224# Automake.  If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have
5225# higher priority because thats what people were doing historically (setting
5226# ARFLAGS for automake and AR_FLAGS for libtool).  FIXME: Make the AR_FLAGS
5227# variable obsoleted/removed.
5228
5229test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr}
5230lt_ar_flags=$AR_FLAGS
5231_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)])
5232
5233# Make AR_FLAGS overridable by 'make ARFLAGS='.  Don't try to run-time override
5234# by AR_FLAGS because that was never working and AR_FLAGS is about to die.
5235_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}],
5236         [Flags to create an archive])
5237
5238AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
5239  [lt_cv_ar_at_file=no
5240   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
5241     [echo conftest.$ac_objext > conftest.lst
5242      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
5243      AC_TRY_EVAL([lt_ar_try])
5244      if test 0 -eq "$ac_status"; then
5245	# Ensure the archiver fails upon bogus file names.
5246	rm -f conftest.$ac_objext libconftest.a
5247	AC_TRY_EVAL([lt_ar_try])
5248	if test 0 -ne "$ac_status"; then
5249          lt_cv_ar_at_file=@
5250        fi
5251      fi
5252      rm -f conftest.* libconftest.a
5253     ])
5254  ])
5255
5256if test no = "$lt_cv_ar_at_file"; then
5257  archiver_list_spec=
5258else
5259  archiver_list_spec=$lt_cv_ar_at_file
5260fi
5261_LT_DECL([], [archiver_list_spec], [1],
5262  [How to feed a file listing to the archiver])
5263])# _LT_PROG_AR
5264
5265
5266# _LT_CMD_OLD_ARCHIVE
5267# -------------------
5268m4_defun([_LT_CMD_OLD_ARCHIVE],
5269[_LT_PROG_AR
5270
5271AC_CHECK_TOOL(STRIP, strip, :)
5272test -z "$STRIP" && STRIP=:
5273_LT_DECL([], [STRIP], [1], [A symbol stripping program])
5274
5275AC_CHECK_TOOL(RANLIB, ranlib, :)
5276test -z "$RANLIB" && RANLIB=:
5277_LT_DECL([], [RANLIB], [1],
5278    [Commands used to install an old-style archive])
5279
5280# Determine commands to create old-style static archives.
5281old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
5282old_postinstall_cmds='chmod 644 $oldlib'
5283old_postuninstall_cmds=
5284
5285if test -n "$RANLIB"; then
5286  case $host_os in
5287  bitrig* | openbsd*)
5288    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
5289    ;;
5290  *)
5291    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
5292    ;;
5293  esac
5294  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
5295fi
5296
5297case $host_os in
5298  darwin*)
5299    lock_old_archive_extraction=yes ;;
5300  *)
5301    lock_old_archive_extraction=no ;;
5302esac
5303_LT_DECL([], [old_postinstall_cmds], [2])
5304_LT_DECL([], [old_postuninstall_cmds], [2])
5305_LT_TAGDECL([], [old_archive_cmds], [2],
5306    [Commands used to build an old-style archive])
5307_LT_DECL([], [lock_old_archive_extraction], [0],
5308    [Whether to use a lock for old archive extraction])
5309])# _LT_CMD_OLD_ARCHIVE
5310
5311
5312# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
5313#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
5314# ----------------------------------------------------------------
5315# Check whether the given compiler option works
5316AC_DEFUN([_LT_COMPILER_OPTION],
5317[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5318m4_require([_LT_DECL_SED])dnl
5319AC_CACHE_CHECK([$1], [$2],
5320  [$2=no
5321   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
5322   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
5323   lt_compiler_flag="$3"  ## exclude from sc_useless_quotes_in_assignment
5324   # Insert the option either (1) after the last *FLAGS variable, or
5325   # (2) before a word containing "conftest.", or (3) at the end.
5326   # Note that $ac_compile itself does not contain backslashes and begins
5327   # with a dollar sign (not a hyphen), so the echo should work correctly.
5328   # The option is referenced via a variable to avoid confusing sed.
5329   lt_compile=`echo "$ac_compile" | $SED \
5330   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
5331   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
5332   -e 's:$: $lt_compiler_flag:'`
5333   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
5334   (eval "$lt_compile" 2>conftest.err)
5335   ac_status=$?
5336   cat conftest.err >&AS_MESSAGE_LOG_FD
5337   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
5338   if (exit $ac_status) && test -s "$ac_outfile"; then
5339     # The compiler can only warn and ignore the option if not recognized
5340     # So say no if there are warnings other than the usual output.
5341     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
5342     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
5343     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
5344       $2=yes
5345     fi
5346   fi
5347   $RM conftest*
5348])
5349
5350if test yes = "[$]$2"; then
5351    m4_if([$5], , :, [$5])
5352else
5353    m4_if([$6], , :, [$6])
5354fi
5355])# _LT_COMPILER_OPTION
5356
5357# Old name:
5358AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
5359dnl aclocal-1.4 backwards compatibility:
5360dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
5361
5362
5363# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
5364#                  [ACTION-SUCCESS], [ACTION-FAILURE])
5365# ----------------------------------------------------
5366# Check whether the given linker option works
5367AC_DEFUN([_LT_LINKER_OPTION],
5368[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5369m4_require([_LT_DECL_SED])dnl
5370AC_CACHE_CHECK([$1], [$2],
5371  [$2=no
5372   save_LDFLAGS=$LDFLAGS
5373   LDFLAGS="$LDFLAGS $3"
5374   echo "$lt_simple_link_test_code" > conftest.$ac_ext
5375   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
5376     # The linker can only warn and ignore the option if not recognized
5377     # So say no if there are warnings
5378     if test -s conftest.err; then
5379       # Append any errors to the config.log.
5380       cat conftest.err 1>&AS_MESSAGE_LOG_FD
5381       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
5382       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
5383       if diff conftest.exp conftest.er2 >/dev/null; then
5384         $2=yes
5385       fi
5386     else
5387       $2=yes
5388     fi
5389   fi
5390   $RM -r conftest*
5391   LDFLAGS=$save_LDFLAGS
5392])
5393
5394if test yes = "[$]$2"; then
5395    m4_if([$4], , :, [$4])
5396else
5397    m4_if([$5], , :, [$5])
5398fi
5399])# _LT_LINKER_OPTION
5400
5401# Old name:
5402AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
5403dnl aclocal-1.4 backwards compatibility:
5404dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
5405
5406
5407# LT_CMD_MAX_LEN
5408#---------------
5409AC_DEFUN([LT_CMD_MAX_LEN],
5410[AC_REQUIRE([AC_CANONICAL_HOST])dnl
5411# find the maximum length of command line arguments
5412AC_MSG_CHECKING([the maximum length of command line arguments])
5413AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
5414  i=0
5415  teststring=ABCD
5416
5417  case $build_os in
5418  msdosdjgpp*)
5419    # On DJGPP, this test can blow up pretty badly due to problems in libc
5420    # (any single argument exceeding 2000 bytes causes a buffer overrun
5421    # during glob expansion).  Even if it were fixed, the result of this
5422    # check would be larger than it should be.
5423    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
5424    ;;
5425
5426  gnu*)
5427    # Under GNU Hurd, this test is not required because there is
5428    # no limit to the length of command line arguments.
5429    # Libtool will interpret -1 as no limit whatsoever
5430    lt_cv_sys_max_cmd_len=-1;
5431    ;;
5432
5433  cygwin* | mingw* | cegcc*)
5434    # On Win9x/ME, this test blows up -- it succeeds, but takes
5435    # about 5 minutes as the teststring grows exponentially.
5436    # Worse, since 9x/ME are not pre-emptively multitasking,
5437    # you end up with a "frozen" computer, even though with patience
5438    # the test eventually succeeds (with a max line length of 256k).
5439    # Instead, let's just punt: use the minimum linelength reported by
5440    # all of the supported platforms: 8192 (on NT/2K/XP).
5441    lt_cv_sys_max_cmd_len=8192;
5442    ;;
5443
5444  mint*)
5445    # On MiNT this can take a long time and run out of memory.
5446    lt_cv_sys_max_cmd_len=8192;
5447    ;;
5448
5449  amigaos*)
5450    # On AmigaOS with pdksh, this test takes hours, literally.
5451    # So we just punt and use a minimum line length of 8192.
5452    lt_cv_sys_max_cmd_len=8192;
5453    ;;
5454
5455  bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*)
5456    # This has been around since 386BSD, at least.  Likely further.
5457    if test -x /sbin/sysctl; then
5458      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
5459    elif test -x /usr/sbin/sysctl; then
5460      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
5461    else
5462      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
5463    fi
5464    # And add a safety zone
5465    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
5466    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
5467    ;;
5468
5469  interix*)
5470    # We know the value 262144 and hardcode it with a safety zone (like BSD)
5471    lt_cv_sys_max_cmd_len=196608
5472    ;;
5473
5474  os2*)
5475    # The test takes a long time on OS/2.
5476    lt_cv_sys_max_cmd_len=8192
5477    ;;
5478
5479  osf*)
5480    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
5481    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
5482    # nice to cause kernel panics so lets avoid the loop below.
5483    # First set a reasonable default.
5484    lt_cv_sys_max_cmd_len=16384
5485    #
5486    if test -x /sbin/sysconfig; then
5487      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
5488        *1*) lt_cv_sys_max_cmd_len=-1 ;;
5489      esac
5490    fi
5491    ;;
5492  sco3.2v5*)
5493    lt_cv_sys_max_cmd_len=102400
5494    ;;
5495  sysv5* | sco5v6* | sysv4.2uw2*)
5496    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
5497    if test -n "$kargmax"; then
5498      lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[	 ]]//'`
5499    else
5500      lt_cv_sys_max_cmd_len=32768
5501    fi
5502    ;;
5503  *)
5504    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
5505    if test -n "$lt_cv_sys_max_cmd_len" && \
5506       test undefined != "$lt_cv_sys_max_cmd_len"; then
5507      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
5508      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
5509    else
5510      # Make teststring a little bigger before we do anything with it.
5511      # a 1K string should be a reasonable start.
5512      for i in 1 2 3 4 5 6 7 8; do
5513        teststring=$teststring$teststring
5514      done
5515      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
5516      # If test is not a shell built-in, we'll probably end up computing a
5517      # maximum length that is only half of the actual maximum length, but
5518      # we can't tell.
5519      while { test X`env echo "$teststring$teststring" 2>/dev/null` \
5520	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
5521	      test 17 != "$i" # 1/2 MB should be enough
5522      do
5523        i=`expr $i + 1`
5524        teststring=$teststring$teststring
5525      done
5526      # Only check the string length outside the loop.
5527      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
5528      teststring=
5529      # Add a significant safety factor because C++ compilers can tack on
5530      # massive amounts of additional arguments before passing them to the
5531      # linker.  It appears as though 1/2 is a usable value.
5532      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
5533    fi
5534    ;;
5535  esac
5536])
5537if test -n "$lt_cv_sys_max_cmd_len"; then
5538  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
5539else
5540  AC_MSG_RESULT(none)
5541fi
5542max_cmd_len=$lt_cv_sys_max_cmd_len
5543_LT_DECL([], [max_cmd_len], [0],
5544    [What is the maximum length of a command?])
5545])# LT_CMD_MAX_LEN
5546
5547# Old name:
5548AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
5549dnl aclocal-1.4 backwards compatibility:
5550dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
5551
5552
5553# _LT_HEADER_DLFCN
5554# ----------------
5555m4_defun([_LT_HEADER_DLFCN],
5556[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
5557])# _LT_HEADER_DLFCN
5558
5559
5560# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
5561#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
5562# ----------------------------------------------------------------
5563m4_defun([_LT_TRY_DLOPEN_SELF],
5564[m4_require([_LT_HEADER_DLFCN])dnl
5565if test yes = "$cross_compiling"; then :
5566  [$4]
5567else
5568  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
5569  lt_status=$lt_dlunknown
5570  cat > conftest.$ac_ext <<_LT_EOF
5571[#line $LINENO "configure"
5572#include "confdefs.h"
5573
5574#if HAVE_DLFCN_H
5575#include <dlfcn.h>
5576#endif
5577
5578#include <stdio.h>
5579
5580#ifdef RTLD_GLOBAL
5581#  define LT_DLGLOBAL		RTLD_GLOBAL
5582#else
5583#  ifdef DL_GLOBAL
5584#    define LT_DLGLOBAL		DL_GLOBAL
5585#  else
5586#    define LT_DLGLOBAL		0
5587#  endif
5588#endif
5589
5590/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
5591   find out it does not work in some platform. */
5592#ifndef LT_DLLAZY_OR_NOW
5593#  ifdef RTLD_LAZY
5594#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
5595#  else
5596#    ifdef DL_LAZY
5597#      define LT_DLLAZY_OR_NOW		DL_LAZY
5598#    else
5599#      ifdef RTLD_NOW
5600#        define LT_DLLAZY_OR_NOW	RTLD_NOW
5601#      else
5602#        ifdef DL_NOW
5603#          define LT_DLLAZY_OR_NOW	DL_NOW
5604#        else
5605#          define LT_DLLAZY_OR_NOW	0
5606#        endif
5607#      endif
5608#    endif
5609#  endif
5610#endif
5611
5612/* When -fvisibility=hidden is used, assume the code has been annotated
5613   correspondingly for the symbols needed.  */
5614#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
5615int fnord () __attribute__((visibility("default")));
5616#endif
5617
5618int fnord () { return 42; }
5619int main ()
5620{
5621  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
5622  int status = $lt_dlunknown;
5623
5624  if (self)
5625    {
5626      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
5627      else
5628        {
5629	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
5630          else puts (dlerror ());
5631	}
5632      /* dlclose (self); */
5633    }
5634  else
5635    puts (dlerror ());
5636
5637  return status;
5638}]
5639_LT_EOF
5640  if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
5641    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
5642    lt_status=$?
5643    case x$lt_status in
5644      x$lt_dlno_uscore) $1 ;;
5645      x$lt_dlneed_uscore) $2 ;;
5646      x$lt_dlunknown|x*) $3 ;;
5647    esac
5648  else :
5649    # compilation failed
5650    $3
5651  fi
5652fi
5653rm -fr conftest*
5654])# _LT_TRY_DLOPEN_SELF
5655
5656
5657# LT_SYS_DLOPEN_SELF
5658# ------------------
5659AC_DEFUN([LT_SYS_DLOPEN_SELF],
5660[m4_require([_LT_HEADER_DLFCN])dnl
5661if test yes != "$enable_dlopen"; then
5662  enable_dlopen=unknown
5663  enable_dlopen_self=unknown
5664  enable_dlopen_self_static=unknown
5665else
5666  lt_cv_dlopen=no
5667  lt_cv_dlopen_libs=
5668
5669  case $host_os in
5670  beos*)
5671    lt_cv_dlopen=load_add_on
5672    lt_cv_dlopen_libs=
5673    lt_cv_dlopen_self=yes
5674    ;;
5675
5676  mingw* | pw32* | cegcc*)
5677    lt_cv_dlopen=LoadLibrary
5678    lt_cv_dlopen_libs=
5679    ;;
5680
5681  cygwin*)
5682    lt_cv_dlopen=dlopen
5683    lt_cv_dlopen_libs=
5684    ;;
5685
5686  darwin*)
5687    # if libdl is installed we need to link against it
5688    AC_CHECK_LIB([dl], [dlopen],
5689		[lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
5690    lt_cv_dlopen=dyld
5691    lt_cv_dlopen_libs=
5692    lt_cv_dlopen_self=yes
5693    ])
5694    ;;
5695
5696  tpf*)
5697    # Don't try to run any link tests for TPF.  We know it's impossible
5698    # because TPF is a cross-compiler, and we know how we open DSOs.
5699    lt_cv_dlopen=dlopen
5700    lt_cv_dlopen_libs=
5701    lt_cv_dlopen_self=no
5702    ;;
5703
5704  *)
5705    AC_CHECK_FUNC([shl_load],
5706	  [lt_cv_dlopen=shl_load],
5707      [AC_CHECK_LIB([dld], [shl_load],
5708	    [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
5709	[AC_CHECK_FUNC([dlopen],
5710	      [lt_cv_dlopen=dlopen],
5711	  [AC_CHECK_LIB([dl], [dlopen],
5712		[lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
5713	    [AC_CHECK_LIB([svld], [dlopen],
5714		  [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
5715	      [AC_CHECK_LIB([dld], [dld_link],
5716		    [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
5717	      ])
5718	    ])
5719	  ])
5720	])
5721      ])
5722    ;;
5723  esac
5724
5725  if test no = "$lt_cv_dlopen"; then
5726    enable_dlopen=no
5727  else
5728    enable_dlopen=yes
5729  fi
5730
5731  case $lt_cv_dlopen in
5732  dlopen)
5733    save_CPPFLAGS=$CPPFLAGS
5734    test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
5735
5736    save_LDFLAGS=$LDFLAGS
5737    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
5738
5739    save_LIBS=$LIBS
5740    LIBS="$lt_cv_dlopen_libs $LIBS"
5741
5742    AC_CACHE_CHECK([whether a program can dlopen itself],
5743	  lt_cv_dlopen_self, [dnl
5744	  _LT_TRY_DLOPEN_SELF(
5745	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
5746	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
5747    ])
5748
5749    if test yes = "$lt_cv_dlopen_self"; then
5750      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
5751      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
5752	  lt_cv_dlopen_self_static, [dnl
5753	  _LT_TRY_DLOPEN_SELF(
5754	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
5755	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
5756      ])
5757    fi
5758
5759    CPPFLAGS=$save_CPPFLAGS
5760    LDFLAGS=$save_LDFLAGS
5761    LIBS=$save_LIBS
5762    ;;
5763  esac
5764
5765  case $lt_cv_dlopen_self in
5766  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
5767  *) enable_dlopen_self=unknown ;;
5768  esac
5769
5770  case $lt_cv_dlopen_self_static in
5771  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
5772  *) enable_dlopen_self_static=unknown ;;
5773  esac
5774fi
5775_LT_DECL([dlopen_support], [enable_dlopen], [0],
5776	 [Whether dlopen is supported])
5777_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
5778	 [Whether dlopen of programs is supported])
5779_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
5780	 [Whether dlopen of statically linked programs is supported])
5781])# LT_SYS_DLOPEN_SELF
5782
5783# Old name:
5784AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
5785dnl aclocal-1.4 backwards compatibility:
5786dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
5787
5788
5789# _LT_COMPILER_C_O([TAGNAME])
5790# ---------------------------
5791# Check to see if options -c and -o are simultaneously supported by compiler.
5792# This macro does not hard code the compiler like AC_PROG_CC_C_O.
5793m4_defun([_LT_COMPILER_C_O],
5794[m4_require([_LT_DECL_SED])dnl
5795m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5796m4_require([_LT_TAG_COMPILER])dnl
5797AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
5798  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
5799  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
5800   $RM -r conftest 2>/dev/null
5801   mkdir conftest
5802   cd conftest
5803   mkdir out
5804   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
5805
5806   lt_compiler_flag="-o out/conftest2.$ac_objext"
5807   # Insert the option either (1) after the last *FLAGS variable, or
5808   # (2) before a word containing "conftest.", or (3) at the end.
5809   # Note that $ac_compile itself does not contain backslashes and begins
5810   # with a dollar sign (not a hyphen), so the echo should work correctly.
5811   lt_compile=`echo "$ac_compile" | $SED \
5812   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
5813   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
5814   -e 's:$: $lt_compiler_flag:'`
5815   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
5816   (eval "$lt_compile" 2>out/conftest.err)
5817   ac_status=$?
5818   cat out/conftest.err >&AS_MESSAGE_LOG_FD
5819   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
5820   if (exit $ac_status) && test -s out/conftest2.$ac_objext
5821   then
5822     # The compiler can only warn and ignore the option if not recognized
5823     # So say no if there are warnings
5824     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
5825     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
5826     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
5827       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
5828     fi
5829   fi
5830   chmod u+w . 2>&AS_MESSAGE_LOG_FD
5831   $RM conftest*
5832   # SGI C++ compiler will create directory out/ii_files/ for
5833   # template instantiation
5834   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
5835   $RM out/* && rmdir out
5836   cd ..
5837   $RM -r conftest
5838   $RM conftest*
5839])
5840_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
5841	[Does compiler simultaneously support -c and -o options?])
5842])# _LT_COMPILER_C_O
5843
5844
5845# _LT_COMPILER_FILE_LOCKS([TAGNAME])
5846# ----------------------------------
5847# Check to see if we can do hard links to lock some files if needed
5848m4_defun([_LT_COMPILER_FILE_LOCKS],
5849[m4_require([_LT_ENABLE_LOCK])dnl
5850m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5851_LT_COMPILER_C_O([$1])
5852
5853hard_links=nottested
5854if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
5855  # do not overwrite the value of need_locks provided by the user
5856  AC_MSG_CHECKING([if we can lock with hard links])
5857  hard_links=yes
5858  $RM conftest*
5859  ln conftest.a conftest.b 2>/dev/null && hard_links=no
5860  touch conftest.a
5861  ln conftest.a conftest.b 2>&5 || hard_links=no
5862  ln conftest.a conftest.b 2>/dev/null && hard_links=no
5863  AC_MSG_RESULT([$hard_links])
5864  if test no = "$hard_links"; then
5865    AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
5866    need_locks=warn
5867  fi
5868else
5869  need_locks=no
5870fi
5871_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
5872])# _LT_COMPILER_FILE_LOCKS
5873
5874
5875# _LT_CHECK_OBJDIR
5876# ----------------
5877m4_defun([_LT_CHECK_OBJDIR],
5878[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
5879[rm -f .libs 2>/dev/null
5880mkdir .libs 2>/dev/null
5881if test -d .libs; then
5882  lt_cv_objdir=.libs
5883else
5884  # MS-DOS does not allow filenames that begin with a dot.
5885  lt_cv_objdir=_libs
5886fi
5887rmdir .libs 2>/dev/null])
5888objdir=$lt_cv_objdir
5889_LT_DECL([], [objdir], [0],
5890         [The name of the directory that contains temporary libtool files])dnl
5891m4_pattern_allow([LT_OBJDIR])dnl
5892AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
5893  [Define to the sub-directory where libtool stores uninstalled libraries.])
5894])# _LT_CHECK_OBJDIR
5895
5896
5897# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
5898# --------------------------------------
5899# Check hardcoding attributes.
5900m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
5901[AC_MSG_CHECKING([how to hardcode library paths into programs])
5902_LT_TAGVAR(hardcode_action, $1)=
5903if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
5904   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
5905   test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
5906
5907  # We can hardcode non-existent directories.
5908  if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
5909     # If the only mechanism to avoid hardcoding is shlibpath_var, we
5910     # have to relink, otherwise we might link with an installed library
5911     # when we should be linking with a yet-to-be-installed one
5912     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
5913     test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
5914    # Linking always hardcodes the temporary library directory.
5915    _LT_TAGVAR(hardcode_action, $1)=relink
5916  else
5917    # We can link without hardcoding, and we can hardcode nonexisting dirs.
5918    _LT_TAGVAR(hardcode_action, $1)=immediate
5919  fi
5920else
5921  # We cannot hardcode anything, or else we can only hardcode existing
5922  # directories.
5923  _LT_TAGVAR(hardcode_action, $1)=unsupported
5924fi
5925AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
5926
5927if test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
5928   test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
5929  # Fast installation is not supported
5930  enable_fast_install=no
5931elif test yes = "$shlibpath_overrides_runpath" ||
5932     test no = "$enable_shared"; then
5933  # Fast installation is not necessary
5934  enable_fast_install=needless
5935fi
5936_LT_TAGDECL([], [hardcode_action], [0],
5937    [How to hardcode a shared library path into an executable])
5938])# _LT_LINKER_HARDCODE_LIBPATH
5939
5940
5941# _LT_CMD_STRIPLIB
5942# ----------------
5943m4_defun([_LT_CMD_STRIPLIB],
5944[m4_require([_LT_DECL_EGREP])
5945striplib=
5946old_striplib=
5947AC_MSG_CHECKING([whether stripping libraries is possible])
5948if test -z "$STRIP"; then
5949  AC_MSG_RESULT([no])
5950else
5951  if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
5952    old_striplib="$STRIP --strip-debug"
5953    striplib="$STRIP --strip-unneeded"
5954    AC_MSG_RESULT([yes])
5955  else
5956    case $host_os in
5957    darwin*)
5958      # FIXME - insert some real tests, host_os isn't really good enough
5959      striplib="$STRIP -x"
5960      old_striplib="$STRIP -S"
5961      AC_MSG_RESULT([yes])
5962      ;;
5963    freebsd*)
5964      if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then
5965        old_striplib="$STRIP --strip-debug"
5966        striplib="$STRIP --strip-unneeded"
5967        AC_MSG_RESULT([yes])
5968      else
5969        AC_MSG_RESULT([no])
5970      fi
5971      ;;
5972    *)
5973      AC_MSG_RESULT([no])
5974      ;;
5975    esac
5976  fi
5977fi
5978_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
5979_LT_DECL([], [striplib], [1])
5980])# _LT_CMD_STRIPLIB
5981
5982
5983# _LT_PREPARE_MUNGE_PATH_LIST
5984# ---------------------------
5985# Make sure func_munge_path_list() is defined correctly.
5986m4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
5987[[# func_munge_path_list VARIABLE PATH
5988# -----------------------------------
5989# VARIABLE is name of variable containing _space_ separated list of
5990# directories to be munged by the contents of PATH, which is string
5991# having a format:
5992# "DIR[:DIR]:"
5993#       string "DIR[ DIR]" will be prepended to VARIABLE
5994# ":DIR[:DIR]"
5995#       string "DIR[ DIR]" will be appended to VARIABLE
5996# "DIRP[:DIRP]::[DIRA:]DIRA"
5997#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
5998#       "DIRA[ DIRA]" will be appended to VARIABLE
5999# "DIR[:DIR]"
6000#       VARIABLE will be replaced by "DIR[ DIR]"
6001func_munge_path_list ()
6002{
6003    case x@S|@2 in
6004    x)
6005        ;;
6006    *:)
6007        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
6008        ;;
6009    x:*)
6010        eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
6011        ;;
6012    *::*)
6013        eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
6014        eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
6015        ;;
6016    *)
6017        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
6018        ;;
6019    esac
6020}
6021]])# _LT_PREPARE_PATH_LIST
6022
6023
6024# _LT_SYS_DYNAMIC_LINKER([TAG])
6025# -----------------------------
6026# PORTME Fill in your ld.so characteristics
6027m4_defun([_LT_SYS_DYNAMIC_LINKER],
6028[AC_REQUIRE([AC_CANONICAL_HOST])dnl
6029m4_require([_LT_DECL_EGREP])dnl
6030m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6031m4_require([_LT_DECL_OBJDUMP])dnl
6032m4_require([_LT_DECL_SED])dnl
6033m4_require([_LT_CHECK_SHELL_FEATURES])dnl
6034m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
6035AC_MSG_CHECKING([dynamic linker characteristics])
6036m4_if([$1],
6037	[], [
6038if test yes = "$GCC"; then
6039  case $host_os in
6040    darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
6041    *) lt_awk_arg='/^libraries:/' ;;
6042  esac
6043  case $host_os in
6044    mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
6045    *) lt_sed_strip_eq='s|=/|/|g' ;;
6046  esac
6047  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
6048  case $lt_search_path_spec in
6049  *\;*)
6050    # if the path contains ";" then we assume it to be the separator
6051    # otherwise default to the standard path separator (i.e. ":") - it is
6052    # assumed that no part of a normal pathname contains ";" but that should
6053    # okay in the real world where ";" in dirpaths is itself problematic.
6054    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
6055    ;;
6056  *)
6057    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
6058    ;;
6059  esac
6060  # Ok, now we have the path, separated by spaces, we can step through it
6061  # and add multilib dir if necessary...
6062  lt_tmp_lt_search_path_spec=
6063  lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
6064  # ...but if some path component already ends with the multilib dir we assume
6065  # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
6066  case "$lt_multi_os_dir; $lt_search_path_spec " in
6067  "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
6068    lt_multi_os_dir=
6069    ;;
6070  esac
6071  for lt_sys_path in $lt_search_path_spec; do
6072    if test -d "$lt_sys_path$lt_multi_os_dir"; then
6073      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
6074    elif test -n "$lt_multi_os_dir"; then
6075      test -d "$lt_sys_path" && \
6076	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
6077    fi
6078  done
6079  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
6080BEGIN {RS = " "; FS = "/|\n";} {
6081  lt_foo = "";
6082  lt_count = 0;
6083  for (lt_i = NF; lt_i > 0; lt_i--) {
6084    if ($lt_i != "" && $lt_i != ".") {
6085      if ($lt_i == "..") {
6086        lt_count++;
6087      } else {
6088        if (lt_count == 0) {
6089          lt_foo = "/" $lt_i lt_foo;
6090        } else {
6091          lt_count--;
6092        }
6093      }
6094    }
6095  }
6096  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
6097  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
6098}'`
6099  # AWK program above erroneously prepends '/' to C:/dos/paths
6100  # for these hosts.
6101  case $host_os in
6102    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
6103      $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
6104  esac
6105  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
6106else
6107  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6108fi])
6109library_names_spec=
6110libname_spec='lib$name'
6111soname_spec=
6112shrext_cmds=.so
6113postinstall_cmds=
6114postuninstall_cmds=
6115finish_cmds=
6116finish_eval=
6117shlibpath_var=
6118shlibpath_overrides_runpath=unknown
6119version_type=none
6120dynamic_linker="$host_os ld.so"
6121sys_lib_dlsearch_path_spec="/lib /usr/lib"
6122need_lib_prefix=unknown
6123hardcode_into_libs=no
6124
6125# when you set need_version to no, make sure it does not cause -set_version
6126# flags to be left without arguments
6127need_version=unknown
6128
6129AC_ARG_VAR([LT_SYS_LIBRARY_PATH],
6130[User-defined run-time library search path.])
6131
6132case $host_os in
6133aix3*)
6134  version_type=linux # correct to gnu/linux during the next big refactor
6135  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
6136  shlibpath_var=LIBPATH
6137
6138  # AIX 3 has no versioning support, so we append a major version to the name.
6139  soname_spec='$libname$release$shared_ext$major'
6140  ;;
6141
6142aix[[4-9]]*)
6143  version_type=linux # correct to gnu/linux during the next big refactor
6144  need_lib_prefix=no
6145  need_version=no
6146  hardcode_into_libs=yes
6147  if test ia64 = "$host_cpu"; then
6148    # AIX 5 supports IA64
6149    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
6150    shlibpath_var=LD_LIBRARY_PATH
6151  else
6152    # With GCC up to 2.95.x, collect2 would create an import file
6153    # for dependence libraries.  The import file would start with
6154    # the line '#! .'.  This would cause the generated library to
6155    # depend on '.', always an invalid library.  This was fixed in
6156    # development snapshots of GCC prior to 3.0.
6157    case $host_os in
6158      aix4 | aix4.[[01]] | aix4.[[01]].*)
6159      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6160	   echo ' yes '
6161	   echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
6162	:
6163      else
6164	can_build_shared=no
6165      fi
6166      ;;
6167    esac
6168    # Using Import Files as archive members, it is possible to support
6169    # filename-based versioning of shared library archives on AIX. While
6170    # this would work for both with and without runtime linking, it will
6171    # prevent static linking of such archives. So we do filename-based
6172    # shared library versioning with .so extension only, which is used
6173    # when both runtime linking and shared linking is enabled.
6174    # Unfortunately, runtime linking may impact performance, so we do
6175    # not want this to be the default eventually. Also, we use the
6176    # versioned .so libs for executables only if there is the -brtl
6177    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
6178    # To allow for filename-based versioning support, we need to create
6179    # libNAME.so.V as an archive file, containing:
6180    # *) an Import File, referring to the versioned filename of the
6181    #    archive as well as the shared archive member, telling the
6182    #    bitwidth (32 or 64) of that shared object, and providing the
6183    #    list of exported symbols of that shared object, eventually
6184    #    decorated with the 'weak' keyword
6185    # *) the shared object with the F_LOADONLY flag set, to really avoid
6186    #    it being seen by the linker.
6187    # At run time we better use the real file rather than another symlink,
6188    # but for link time we create the symlink libNAME.so -> libNAME.so.V
6189
6190    case $with_aix_soname,$aix_use_runtimelinking in
6191    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
6192    # soname into executable. Probably we can add versioning support to
6193    # collect2, so additional links can be useful in future.
6194    aix,yes) # traditional libtool
6195      dynamic_linker='AIX unversionable lib.so'
6196      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6197      # instead of lib<name>.a to let people know that these are not
6198      # typical AIX shared libraries.
6199      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6200      ;;
6201    aix,no) # traditional AIX only
6202      dynamic_linker='AIX lib.a[(]lib.so.V[)]'
6203      # We preserve .a as extension for shared libraries through AIX4.2
6204      # and later when we are not doing run time linking.
6205      library_names_spec='$libname$release.a $libname.a'
6206      soname_spec='$libname$release$shared_ext$major'
6207      ;;
6208    svr4,*) # full svr4 only
6209      dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
6210      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
6211      # We do not specify a path in Import Files, so LIBPATH fires.
6212      shlibpath_overrides_runpath=yes
6213      ;;
6214    *,yes) # both, prefer svr4
6215      dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
6216      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
6217      # unpreferred sharedlib libNAME.a needs extra handling
6218      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"'
6219      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"'
6220      # We do not specify a path in Import Files, so LIBPATH fires.
6221      shlibpath_overrides_runpath=yes
6222      ;;
6223    *,no) # both, prefer aix
6224      dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
6225      library_names_spec='$libname$release.a $libname.a'
6226      soname_spec='$libname$release$shared_ext$major'
6227      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
6228      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)'
6229      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"'
6230      ;;
6231    esac
6232    shlibpath_var=LIBPATH
6233  fi
6234  ;;
6235
6236amigaos*)
6237  case $host_cpu in
6238  powerpc)
6239    # Since July 2007 AmigaOS4 officially supports .so libraries.
6240    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
6241    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6242    ;;
6243  m68k)
6244    library_names_spec='$libname.ixlibrary $libname.a'
6245    # Create ${libname}_ixlibrary.a entries in /sys/libs.
6246    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'
6247    ;;
6248  esac
6249  ;;
6250
6251beos*)
6252  library_names_spec='$libname$shared_ext'
6253  dynamic_linker="$host_os ld.so"
6254  shlibpath_var=LIBRARY_PATH
6255  ;;
6256
6257bsdi[[45]]*)
6258  version_type=linux # correct to gnu/linux during the next big refactor
6259  need_version=no
6260  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6261  soname_spec='$libname$release$shared_ext$major'
6262  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6263  shlibpath_var=LD_LIBRARY_PATH
6264  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6265  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6266  # the default ld.so.conf also contains /usr/contrib/lib and
6267  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6268  # libtool to hard-code these into programs
6269  ;;
6270
6271cygwin* | mingw* | pw32* | cegcc*)
6272  version_type=windows
6273  shrext_cmds=.dll
6274  need_version=no
6275  need_lib_prefix=no
6276
6277  case $GCC,$cc_basename in
6278  yes,*)
6279    # gcc
6280    library_names_spec='$libname.dll.a'
6281    # DLL is installed to $(libdir)/../bin by postinstall_cmds
6282    postinstall_cmds='base_file=`basename \$file`~
6283      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
6284      dldir=$destdir/`dirname \$dlpath`~
6285      test -d \$dldir || mkdir -p \$dldir~
6286      $install_prog $dir/$dlname \$dldir/$dlname~
6287      chmod a+x \$dldir/$dlname~
6288      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
6289        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
6290      fi'
6291    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
6292      dlpath=$dir/\$dldll~
6293       $RM \$dlpath'
6294    shlibpath_overrides_runpath=yes
6295
6296    case $host_os in
6297    cygwin*)
6298      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
6299      soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
6300m4_if([$1], [],[
6301      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
6302      ;;
6303    mingw* | cegcc*)
6304      # MinGW DLLs use traditional 'lib' prefix
6305      soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
6306      ;;
6307    pw32*)
6308      # pw32 DLLs use 'pw' prefix rather than 'lib'
6309      library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
6310      ;;
6311    esac
6312    dynamic_linker='Win32 ld.exe'
6313    ;;
6314
6315  *,cl* | *,icl*)
6316    # Native MSVC or ICC
6317    libname_spec='$name'
6318    soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
6319    library_names_spec='$libname.dll.lib'
6320
6321    case $build_os in
6322    mingw*)
6323      sys_lib_search_path_spec=
6324      lt_save_ifs=$IFS
6325      IFS=';'
6326      for lt_path in $LIB
6327      do
6328        IFS=$lt_save_ifs
6329        # Let DOS variable expansion print the short 8.3 style file name.
6330        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
6331        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
6332      done
6333      IFS=$lt_save_ifs
6334      # Convert to MSYS style.
6335      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
6336      ;;
6337    cygwin*)
6338      # Convert to unix form, then to dos form, then back to unix form
6339      # but this time dos style (no spaces!) so that the unix form looks
6340      # like /cygdrive/c/PROGRA~1:/cygdr...
6341      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
6342      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
6343      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
6344      ;;
6345    *)
6346      sys_lib_search_path_spec=$LIB
6347      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
6348        # It is most probably a Windows format PATH.
6349        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
6350      else
6351        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
6352      fi
6353      # FIXME: find the short name or the path components, as spaces are
6354      # common. (e.g. "Program Files" -> "PROGRA~1")
6355      ;;
6356    esac
6357
6358    # DLL is installed to $(libdir)/../bin by postinstall_cmds
6359    postinstall_cmds='base_file=`basename \$file`~
6360      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
6361      dldir=$destdir/`dirname \$dlpath`~
6362      test -d \$dldir || mkdir -p \$dldir~
6363      $install_prog $dir/$dlname \$dldir/$dlname'
6364    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
6365      dlpath=$dir/\$dldll~
6366       $RM \$dlpath'
6367    shlibpath_overrides_runpath=yes
6368    dynamic_linker='Win32 link.exe'
6369    ;;
6370
6371  *)
6372    # Assume MSVC and ICC wrapper
6373    library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
6374    dynamic_linker='Win32 ld.exe'
6375    ;;
6376  esac
6377  # FIXME: first we should search . and the directory the executable is in
6378  shlibpath_var=PATH
6379  ;;
6380
6381darwin* | rhapsody*)
6382  dynamic_linker="$host_os dyld"
6383  version_type=darwin
6384  need_lib_prefix=no
6385  need_version=no
6386  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
6387  soname_spec='$libname$release$major$shared_ext'
6388  shlibpath_overrides_runpath=yes
6389  shlibpath_var=DYLD_LIBRARY_PATH
6390  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
6391m4_if([$1], [],[
6392  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
6393  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
6394  ;;
6395
6396dgux*)
6397  version_type=linux # correct to gnu/linux during the next big refactor
6398  need_lib_prefix=no
6399  need_version=no
6400  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6401  soname_spec='$libname$release$shared_ext$major'
6402  shlibpath_var=LD_LIBRARY_PATH
6403  ;;
6404
6405freebsd* | dragonfly* | midnightbsd*)
6406  # DragonFly does not have aout.  When/if they implement a new
6407  # versioning mechanism, adjust this.
6408  if test -x /usr/bin/objformat; then
6409    objformat=`/usr/bin/objformat`
6410  else
6411    case $host_os in
6412    freebsd[[23]].*) objformat=aout ;;
6413    *) objformat=elf ;;
6414    esac
6415  fi
6416  version_type=freebsd-$objformat
6417  case $version_type in
6418    freebsd-elf*)
6419      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6420      soname_spec='$libname$release$shared_ext$major'
6421      need_version=no
6422      need_lib_prefix=no
6423      ;;
6424    freebsd-*)
6425      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
6426      need_version=yes
6427      ;;
6428  esac
6429  shlibpath_var=LD_LIBRARY_PATH
6430  case $host_os in
6431  freebsd2.*)
6432    shlibpath_overrides_runpath=yes
6433    ;;
6434  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
6435    shlibpath_overrides_runpath=yes
6436    hardcode_into_libs=yes
6437    ;;
6438  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
6439  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
6440    shlibpath_overrides_runpath=no
6441    hardcode_into_libs=yes
6442    ;;
6443  *) # from 4.6 on, and DragonFly
6444    shlibpath_overrides_runpath=yes
6445    hardcode_into_libs=yes
6446    ;;
6447  esac
6448  ;;
6449
6450haiku*)
6451  version_type=linux # correct to gnu/linux during the next big refactor
6452  need_lib_prefix=no
6453  need_version=no
6454  dynamic_linker="$host_os runtime_loader"
6455  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6456  soname_spec='$libname$release$shared_ext$major'
6457  shlibpath_var=LIBRARY_PATH
6458  shlibpath_overrides_runpath=no
6459  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
6460  hardcode_into_libs=yes
6461  ;;
6462
6463hpux9* | hpux10* | hpux11*)
6464  # Give a soname corresponding to the major version so that dld.sl refuses to
6465  # link against other versions.
6466  version_type=sunos
6467  need_lib_prefix=no
6468  need_version=no
6469  case $host_cpu in
6470  ia64*)
6471    shrext_cmds='.so'
6472    hardcode_into_libs=yes
6473    dynamic_linker="$host_os dld.so"
6474    shlibpath_var=LD_LIBRARY_PATH
6475    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
6476    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6477    soname_spec='$libname$release$shared_ext$major'
6478    if test 32 = "$HPUX_IA64_MODE"; then
6479      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
6480      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
6481    else
6482      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
6483      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
6484    fi
6485    ;;
6486  hppa*64*)
6487    shrext_cmds='.sl'
6488    hardcode_into_libs=yes
6489    dynamic_linker="$host_os dld.sl"
6490    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
6491    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
6492    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6493    soname_spec='$libname$release$shared_ext$major'
6494    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
6495    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
6496    ;;
6497  *)
6498    shrext_cmds='.sl'
6499    dynamic_linker="$host_os dld.sl"
6500    shlibpath_var=SHLIB_PATH
6501    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6502    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6503    soname_spec='$libname$release$shared_ext$major'
6504    ;;
6505  esac
6506  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
6507  postinstall_cmds='chmod 555 $lib'
6508  # or fails outright, so override atomically:
6509  install_override_mode=555
6510  ;;
6511
6512interix[[3-9]]*)
6513  version_type=linux # correct to gnu/linux during the next big refactor
6514  need_lib_prefix=no
6515  need_version=no
6516  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6517  soname_spec='$libname$release$shared_ext$major'
6518  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
6519  shlibpath_var=LD_LIBRARY_PATH
6520  shlibpath_overrides_runpath=no
6521  hardcode_into_libs=yes
6522  ;;
6523
6524irix5* | irix6* | nonstopux*)
6525  case $host_os in
6526    nonstopux*) version_type=nonstopux ;;
6527    *)
6528	if test yes = "$lt_cv_prog_gnu_ld"; then
6529		version_type=linux # correct to gnu/linux during the next big refactor
6530	else
6531		version_type=irix
6532	fi ;;
6533  esac
6534  need_lib_prefix=no
6535  need_version=no
6536  soname_spec='$libname$release$shared_ext$major'
6537  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
6538  case $host_os in
6539  irix5* | nonstopux*)
6540    libsuff= shlibsuff=
6541    ;;
6542  *)
6543    case $LD in # libtool.m4 will add one of these switches to LD
6544    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
6545      libsuff= shlibsuff= libmagic=32-bit;;
6546    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
6547      libsuff=32 shlibsuff=N32 libmagic=N32;;
6548    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
6549      libsuff=64 shlibsuff=64 libmagic=64-bit;;
6550    *) libsuff= shlibsuff= libmagic=never-match;;
6551    esac
6552    ;;
6553  esac
6554  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6555  shlibpath_overrides_runpath=no
6556  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
6557  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
6558  hardcode_into_libs=yes
6559  ;;
6560
6561# No shared lib support for Linux oldld, aout, or coff.
6562linux*oldld* | linux*aout* | linux*coff*)
6563  dynamic_linker=no
6564  ;;
6565
6566linux*android*)
6567  version_type=none # Android doesn't support versioned libraries.
6568  need_lib_prefix=no
6569  need_version=no
6570  library_names_spec='$libname$release$shared_ext'
6571  soname_spec='$libname$release$shared_ext'
6572  finish_cmds=
6573  shlibpath_var=LD_LIBRARY_PATH
6574  shlibpath_overrides_runpath=yes
6575
6576  # This implies no fast_install, which is unacceptable.
6577  # Some rework will be needed to allow for fast_install
6578  # before this can be enabled.
6579  hardcode_into_libs=yes
6580
6581  dynamic_linker='Android linker'
6582  # Don't embed -rpath directories since the linker doesn't support them.
6583  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6584  ;;
6585
6586# This must be glibc/ELF.
6587linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
6588  version_type=linux # correct to gnu/linux during the next big refactor
6589  need_lib_prefix=no
6590  need_version=no
6591  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6592  soname_spec='$libname$release$shared_ext$major'
6593  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6594  shlibpath_var=LD_LIBRARY_PATH
6595  shlibpath_overrides_runpath=no
6596
6597  # Some binutils ld are patched to set DT_RUNPATH
6598  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
6599    [lt_cv_shlibpath_overrides_runpath=no
6600    save_LDFLAGS=$LDFLAGS
6601    save_libdir=$libdir
6602    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
6603	 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
6604    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
6605      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
6606	 [lt_cv_shlibpath_overrides_runpath=yes])])
6607    LDFLAGS=$save_LDFLAGS
6608    libdir=$save_libdir
6609    ])
6610  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
6611
6612  # This implies no fast_install, which is unacceptable.
6613  # Some rework will be needed to allow for fast_install
6614  # before this can be enabled.
6615  hardcode_into_libs=yes
6616
6617  # Ideally, we could use ldconfig to report *all* directores which are
6618  # searched for libraries, however this is still not possible.  Aside from not
6619  # being certain /sbin/ldconfig is available, command
6620  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
6621  # even though it is searched at run-time.  Try to do the best guess by
6622  # appending ld.so.conf contents (and includes) to the search path.
6623  if test -f /etc/ld.so.conf; then
6624    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' ' '`
6625    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
6626  fi
6627
6628  # We used to test for /lib/ld.so.1 and disable shared libraries on
6629  # powerpc, because MkLinux only supported shared libraries with the
6630  # GNU dynamic linker.  Since this was broken with cross compilers,
6631  # most powerpc-linux boxes support dynamic linking these days and
6632  # people can always --disable-shared, the test was removed, and we
6633  # assume the GNU/Linux dynamic linker is in use.
6634  dynamic_linker='GNU/Linux ld.so'
6635  ;;
6636
6637netbsd*)
6638  version_type=sunos
6639  need_lib_prefix=no
6640  need_version=no
6641  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6642    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
6643    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6644    dynamic_linker='NetBSD (a.out) ld.so'
6645  else
6646    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6647    soname_spec='$libname$release$shared_ext$major'
6648    dynamic_linker='NetBSD ld.elf_so'
6649  fi
6650  shlibpath_var=LD_LIBRARY_PATH
6651  shlibpath_overrides_runpath=yes
6652  hardcode_into_libs=yes
6653  ;;
6654
6655newsos6)
6656  version_type=linux # correct to gnu/linux during the next big refactor
6657  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6658  shlibpath_var=LD_LIBRARY_PATH
6659  shlibpath_overrides_runpath=yes
6660  ;;
6661
6662*nto* | *qnx*)
6663  version_type=qnx
6664  need_lib_prefix=no
6665  need_version=no
6666  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6667  soname_spec='$libname$release$shared_ext$major'
6668  shlibpath_var=LD_LIBRARY_PATH
6669  shlibpath_overrides_runpath=no
6670  hardcode_into_libs=yes
6671  dynamic_linker='ldqnx.so'
6672  ;;
6673
6674openbsd* | bitrig*)
6675  version_type=sunos
6676  sys_lib_dlsearch_path_spec=/usr/lib
6677  need_lib_prefix=no
6678  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
6679    need_version=no
6680  else
6681    need_version=yes
6682  fi
6683  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
6684  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6685  shlibpath_var=LD_LIBRARY_PATH
6686  shlibpath_overrides_runpath=yes
6687  ;;
6688
6689os2*)
6690  libname_spec='$name'
6691  version_type=windows
6692  shrext_cmds=.dll
6693  need_version=no
6694  need_lib_prefix=no
6695  # OS/2 can only load a DLL with a base name of 8 characters or less.
6696  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
6697    v=$($ECHO $release$versuffix | tr -d .-);
6698    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
6699    $ECHO $n$v`$shared_ext'
6700  library_names_spec='${libname}_dll.$libext'
6701  dynamic_linker='OS/2 ld.exe'
6702  shlibpath_var=BEGINLIBPATH
6703  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6704  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
6705  postinstall_cmds='base_file=`basename \$file`~
6706    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
6707    dldir=$destdir/`dirname \$dlpath`~
6708    test -d \$dldir || mkdir -p \$dldir~
6709    $install_prog $dir/$dlname \$dldir/$dlname~
6710    chmod a+x \$dldir/$dlname~
6711    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
6712      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
6713    fi'
6714  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
6715    dlpath=$dir/\$dldll~
6716    $RM \$dlpath'
6717  ;;
6718
6719osf3* | osf4* | osf5*)
6720  version_type=osf
6721  need_lib_prefix=no
6722  need_version=no
6723  soname_spec='$libname$release$shared_ext$major'
6724  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6725  shlibpath_var=LD_LIBRARY_PATH
6726  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6727  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
6728  ;;
6729
6730rdos*)
6731  dynamic_linker=no
6732  ;;
6733
6734solaris*)
6735  version_type=linux # correct to gnu/linux during the next big refactor
6736  need_lib_prefix=no
6737  need_version=no
6738  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6739  soname_spec='$libname$release$shared_ext$major'
6740  shlibpath_var=LD_LIBRARY_PATH
6741  shlibpath_overrides_runpath=yes
6742  hardcode_into_libs=yes
6743  # ldd complains unless libraries are executable
6744  postinstall_cmds='chmod +x $lib'
6745  ;;
6746
6747sunos4*)
6748  version_type=sunos
6749  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
6750  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6751  shlibpath_var=LD_LIBRARY_PATH
6752  shlibpath_overrides_runpath=yes
6753  if test yes = "$with_gnu_ld"; then
6754    need_lib_prefix=no
6755  fi
6756  need_version=yes
6757  ;;
6758
6759sysv4 | sysv4.3*)
6760  version_type=linux # correct to gnu/linux during the next big refactor
6761  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6762  soname_spec='$libname$release$shared_ext$major'
6763  shlibpath_var=LD_LIBRARY_PATH
6764  case $host_vendor in
6765    sni)
6766      shlibpath_overrides_runpath=no
6767      need_lib_prefix=no
6768      runpath_var=LD_RUN_PATH
6769      ;;
6770    siemens)
6771      need_lib_prefix=no
6772      ;;
6773    motorola)
6774      need_lib_prefix=no
6775      need_version=no
6776      shlibpath_overrides_runpath=no
6777      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6778      ;;
6779  esac
6780  ;;
6781
6782sysv4*MP*)
6783  if test -d /usr/nec; then
6784    version_type=linux # correct to gnu/linux during the next big refactor
6785    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
6786    soname_spec='$libname$shared_ext.$major'
6787    shlibpath_var=LD_LIBRARY_PATH
6788  fi
6789  ;;
6790
6791sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
6792  version_type=sco
6793  need_lib_prefix=no
6794  need_version=no
6795  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
6796  soname_spec='$libname$release$shared_ext$major'
6797  shlibpath_var=LD_LIBRARY_PATH
6798  shlibpath_overrides_runpath=yes
6799  hardcode_into_libs=yes
6800  if test yes = "$with_gnu_ld"; then
6801    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
6802  else
6803    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
6804    case $host_os in
6805      sco3.2v5*)
6806        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
6807	;;
6808    esac
6809  fi
6810  sys_lib_dlsearch_path_spec='/usr/lib'
6811  ;;
6812
6813tpf*)
6814  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
6815  version_type=linux # correct to gnu/linux during the next big refactor
6816  need_lib_prefix=no
6817  need_version=no
6818  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6819  shlibpath_var=LD_LIBRARY_PATH
6820  shlibpath_overrides_runpath=no
6821  hardcode_into_libs=yes
6822  ;;
6823
6824uts4*)
6825  version_type=linux # correct to gnu/linux during the next big refactor
6826  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
6827  soname_spec='$libname$release$shared_ext$major'
6828  shlibpath_var=LD_LIBRARY_PATH
6829  ;;
6830
6831*)
6832  dynamic_linker=no
6833  ;;
6834esac
6835AC_MSG_RESULT([$dynamic_linker])
6836test no = "$dynamic_linker" && can_build_shared=no
6837
6838variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6839if test yes = "$GCC"; then
6840  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6841fi
6842
6843if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
6844  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
6845fi
6846
6847if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
6848  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
6849fi
6850
6851# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
6852configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
6853
6854# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
6855func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
6856
6857# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
6858configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
6859
6860_LT_DECL([], [variables_saved_for_relink], [1],
6861    [Variables whose values should be saved in libtool wrapper scripts and
6862    restored at link time])
6863_LT_DECL([], [need_lib_prefix], [0],
6864    [Do we need the "lib" prefix for modules?])
6865_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
6866_LT_DECL([], [version_type], [0], [Library versioning type])
6867_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
6868_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
6869_LT_DECL([], [shlibpath_overrides_runpath], [0],
6870    [Is shlibpath searched before the hard-coded library search path?])
6871_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
6872_LT_DECL([], [library_names_spec], [1],
6873    [[List of archive names.  First name is the real one, the rest are links.
6874    The last name is the one that the linker finds with -lNAME]])
6875_LT_DECL([], [soname_spec], [1],
6876    [[The coded name of the library, if different from the real name]])
6877_LT_DECL([], [install_override_mode], [1],
6878    [Permission mode override for installation of shared libraries])
6879_LT_DECL([], [postinstall_cmds], [2],
6880    [Command to use after installation of a shared archive])
6881_LT_DECL([], [postuninstall_cmds], [2],
6882    [Command to use after uninstallation of a shared archive])
6883_LT_DECL([], [finish_cmds], [2],
6884    [Commands used to finish a libtool library installation in a directory])
6885_LT_DECL([], [finish_eval], [1],
6886    [[As "finish_cmds", except a single script fragment to be evaled but
6887    not shown]])
6888_LT_DECL([], [hardcode_into_libs], [0],
6889    [Whether we should hardcode library paths into libraries])
6890_LT_DECL([], [sys_lib_search_path_spec], [2],
6891    [Compile-time system search path for libraries])
6892_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
6893    [Detected run-time system search path for libraries])
6894_LT_DECL([], [configure_time_lt_sys_library_path], [2],
6895    [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
6896])# _LT_SYS_DYNAMIC_LINKER
6897
6898
6899# _LT_PATH_TOOL_PREFIX(TOOL)
6900# --------------------------
6901# find a file program that can recognize shared library
6902AC_DEFUN([_LT_PATH_TOOL_PREFIX],
6903[m4_require([_LT_DECL_EGREP])dnl
6904AC_MSG_CHECKING([for $1])
6905AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
6906[case $MAGIC_CMD in
6907[[\\/*] |  ?:[\\/]*])
6908  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
6909  ;;
6910*)
6911  lt_save_MAGIC_CMD=$MAGIC_CMD
6912  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
6913dnl $ac_dummy forces splitting on constant user-supplied paths.
6914dnl POSIX.2 word splitting is done only on the output of word expansions,
6915dnl not every word.  This closes a longstanding sh security hole.
6916  ac_dummy="m4_if([$2], , $PATH, [$2])"
6917  for ac_dir in $ac_dummy; do
6918    IFS=$lt_save_ifs
6919    test -z "$ac_dir" && ac_dir=.
6920    if test -f "$ac_dir/$1"; then
6921      lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
6922      if test -n "$file_magic_test_file"; then
6923	case $deplibs_check_method in
6924	"file_magic "*)
6925	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
6926	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
6927	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
6928	    $EGREP "$file_magic_regex" > /dev/null; then
6929	    :
6930	  else
6931	    cat <<_LT_EOF 1>&2
6932
6933*** Warning: the command libtool uses to detect shared libraries,
6934*** $file_magic_cmd, produces output that libtool cannot recognize.
6935*** The result is that libtool may fail to recognize shared libraries
6936*** as such.  This will affect the creation of libtool libraries that
6937*** depend on shared libraries, but programs linked with such libtool
6938*** libraries will work regardless of this problem.  Nevertheless, you
6939*** may want to report the problem to your system manager and/or to
6940*** bug-libtool@gnu.org
6941
6942_LT_EOF
6943	  fi ;;
6944	esac
6945      fi
6946      break
6947    fi
6948  done
6949  IFS=$lt_save_ifs
6950  MAGIC_CMD=$lt_save_MAGIC_CMD
6951  ;;
6952esac])
6953MAGIC_CMD=$lt_cv_path_MAGIC_CMD
6954if test -n "$MAGIC_CMD"; then
6955  AC_MSG_RESULT($MAGIC_CMD)
6956else
6957  AC_MSG_RESULT(no)
6958fi
6959_LT_DECL([], [MAGIC_CMD], [0],
6960	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
6961])# _LT_PATH_TOOL_PREFIX
6962
6963# Old name:
6964AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
6965dnl aclocal-1.4 backwards compatibility:
6966dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
6967
6968
6969# _LT_PATH_MAGIC
6970# --------------
6971# find a file program that can recognize a shared library
6972m4_defun([_LT_PATH_MAGIC],
6973[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
6974if test -z "$lt_cv_path_MAGIC_CMD"; then
6975  if test -n "$ac_tool_prefix"; then
6976    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
6977  else
6978    MAGIC_CMD=:
6979  fi
6980fi
6981])# _LT_PATH_MAGIC
6982
6983
6984# LT_PATH_LD
6985# ----------
6986# find the pathname to the GNU or non-GNU linker
6987AC_DEFUN([LT_PATH_LD],
6988[AC_REQUIRE([AC_PROG_CC])dnl
6989AC_REQUIRE([AC_CANONICAL_HOST])dnl
6990AC_REQUIRE([AC_CANONICAL_BUILD])dnl
6991m4_require([_LT_DECL_SED])dnl
6992m4_require([_LT_DECL_EGREP])dnl
6993m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
6994
6995AC_ARG_WITH([gnu-ld],
6996    [AS_HELP_STRING([--with-gnu-ld],
6997	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
6998    [test no = "$withval" || with_gnu_ld=yes],
6999    [with_gnu_ld=no])dnl
7000
7001ac_prog=ld
7002if test yes = "$GCC"; then
7003  # Check if gcc -print-prog-name=ld gives a path.
7004  AC_MSG_CHECKING([for ld used by $CC])
7005  case $host in
7006  *-*-mingw*)
7007    # gcc leaves a trailing carriage return, which upsets mingw
7008    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7009  *)
7010    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7011  esac
7012  case $ac_prog in
7013    # Accept absolute paths.
7014    [[\\/]]* | ?:[[\\/]]*)
7015      re_direlt='/[[^/]][[^/]]*/\.\./'
7016      # Canonicalize the pathname of ld
7017      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
7018      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
7019	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
7020      done
7021      test -z "$LD" && LD=$ac_prog
7022      ;;
7023  "")
7024    # If it fails, then pretend we aren't using GCC.
7025    ac_prog=ld
7026    ;;
7027  *)
7028    # If it is relative, then search for the first ld in PATH.
7029    with_gnu_ld=unknown
7030    ;;
7031  esac
7032elif test yes = "$with_gnu_ld"; then
7033  AC_MSG_CHECKING([for GNU ld])
7034else
7035  AC_MSG_CHECKING([for non-GNU ld])
7036fi
7037AC_CACHE_VAL(lt_cv_path_LD,
7038[if test -z "$LD"; then
7039  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
7040  for ac_dir in $PATH; do
7041    IFS=$lt_save_ifs
7042    test -z "$ac_dir" && ac_dir=.
7043    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7044      lt_cv_path_LD=$ac_dir/$ac_prog
7045      # Check to see if the program is GNU ld.  I'd rather use --version,
7046      # but apparently some variants of GNU ld only accept -v.
7047      # Break only if it was the GNU/non-GNU ld that we prefer.
7048      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
7049      *GNU* | *'with BFD'*)
7050	test no != "$with_gnu_ld" && break
7051	;;
7052      *)
7053	test yes != "$with_gnu_ld" && break
7054	;;
7055      esac
7056    fi
7057  done
7058  IFS=$lt_save_ifs
7059else
7060  lt_cv_path_LD=$LD # Let the user override the test with a path.
7061fi])
7062LD=$lt_cv_path_LD
7063if test -n "$LD"; then
7064  AC_MSG_RESULT($LD)
7065else
7066  AC_MSG_RESULT(no)
7067fi
7068test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
7069_LT_PATH_LD_GNU
7070AC_SUBST([LD])
7071
7072_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
7073])# LT_PATH_LD
7074
7075# Old names:
7076AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
7077AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
7078dnl aclocal-1.4 backwards compatibility:
7079dnl AC_DEFUN([AM_PROG_LD], [])
7080dnl AC_DEFUN([AC_PROG_LD], [])
7081
7082
7083# _LT_PATH_LD_GNU
7084#- --------------
7085m4_defun([_LT_PATH_LD_GNU],
7086[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
7087[# I'd rather use --version here, but apparently some GNU lds only accept -v.
7088case `$LD -v 2>&1 </dev/null` in
7089*GNU* | *'with BFD'*)
7090  lt_cv_prog_gnu_ld=yes
7091  ;;
7092*)
7093  lt_cv_prog_gnu_ld=no
7094  ;;
7095esac])
7096with_gnu_ld=$lt_cv_prog_gnu_ld
7097])# _LT_PATH_LD_GNU
7098
7099
7100# _LT_CMD_RELOAD
7101# --------------
7102# find reload flag for linker
7103#   -- PORTME Some linkers may need a different reload flag.
7104m4_defun([_LT_CMD_RELOAD],
7105[AC_CACHE_CHECK([for $LD option to reload object files],
7106  lt_cv_ld_reload_flag,
7107  [lt_cv_ld_reload_flag='-r'])
7108reload_flag=$lt_cv_ld_reload_flag
7109case $reload_flag in
7110"" | " "*) ;;
7111*) reload_flag=" $reload_flag" ;;
7112esac
7113reload_cmds='$LD$reload_flag -o $output$reload_objs'
7114case $host_os in
7115  cygwin* | mingw* | pw32* | cegcc*)
7116    if test yes != "$GCC"; then
7117      reload_cmds=false
7118    fi
7119    ;;
7120  darwin*)
7121    if test yes = "$GCC"; then
7122      reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
7123    else
7124      reload_cmds='$LD$reload_flag -o $output$reload_objs'
7125    fi
7126    ;;
7127esac
7128_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
7129_LT_TAGDECL([], [reload_cmds], [2])dnl
7130])# _LT_CMD_RELOAD
7131
7132
7133# _LT_PATH_DD
7134# -----------
7135# find a working dd
7136m4_defun([_LT_PATH_DD],
7137[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
7138[printf 0123456789abcdef0123456789abcdef >conftest.i
7139cat conftest.i conftest.i >conftest2.i
7140: ${lt_DD:=$DD}
7141AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
7142[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
7143  cmp -s conftest.i conftest.out \
7144  && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
7145fi])
7146rm -f conftest.i conftest2.i conftest.out])
7147])# _LT_PATH_DD
7148
7149
7150# _LT_CMD_TRUNCATE
7151# ----------------
7152# find command to truncate a binary pipe
7153m4_defun([_LT_CMD_TRUNCATE],
7154[m4_require([_LT_PATH_DD])
7155AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
7156[printf 0123456789abcdef0123456789abcdef >conftest.i
7157cat conftest.i conftest.i >conftest2.i
7158lt_cv_truncate_bin=
7159if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
7160  cmp -s conftest.i conftest.out \
7161  && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
7162fi
7163rm -f conftest.i conftest2.i conftest.out
7164test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
7165_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
7166  [Command to truncate a binary pipe])
7167])# _LT_CMD_TRUNCATE
7168
7169
7170# _LT_CHECK_MAGIC_METHOD
7171# ----------------------
7172# how to check for library dependencies
7173#  -- PORTME fill in with the dynamic library characteristics
7174m4_defun([_LT_CHECK_MAGIC_METHOD],
7175[m4_require([_LT_DECL_EGREP])
7176m4_require([_LT_DECL_OBJDUMP])
7177AC_CACHE_CHECK([how to recognize dependent libraries],
7178lt_cv_deplibs_check_method,
7179[lt_cv_file_magic_cmd='$MAGIC_CMD'
7180lt_cv_file_magic_test_file=
7181lt_cv_deplibs_check_method='unknown'
7182# Need to set the preceding variable on all platforms that support
7183# interlibrary dependencies.
7184# 'none' -- dependencies not supported.
7185# 'unknown' -- same as none, but documents that we really don't know.
7186# 'pass_all' -- all dependencies passed with no checks.
7187# 'test_compile' -- check by making test program.
7188# 'file_magic [[regex]]' -- check by looking for files in library path
7189# that responds to the $file_magic_cmd with a given extended regex.
7190# If you have 'file' or equivalent on your system and you're not sure
7191# whether 'pass_all' will *always* work, you probably want this one.
7192
7193case $host_os in
7194aix[[4-9]]*)
7195  lt_cv_deplibs_check_method=pass_all
7196  ;;
7197
7198beos*)
7199  lt_cv_deplibs_check_method=pass_all
7200  ;;
7201
7202bsdi[[45]]*)
7203  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
7204  lt_cv_file_magic_cmd='$FILECMD -L'
7205  lt_cv_file_magic_test_file=/shlib/libc.so
7206  ;;
7207
7208cygwin*)
7209  # func_win32_libid is a shell function defined in ltmain.sh
7210  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
7211  lt_cv_file_magic_cmd='func_win32_libid'
7212  ;;
7213
7214mingw* | pw32*)
7215  # Base MSYS/MinGW do not provide the 'file' command needed by
7216  # func_win32_libid shell function, so use a weaker test based on 'objdump',
7217  # unless we find 'file', for example because we are cross-compiling.
7218  if ( file / ) >/dev/null 2>&1; then
7219    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
7220    lt_cv_file_magic_cmd='func_win32_libid'
7221  else
7222    # Keep this pattern in sync with the one in func_win32_libid.
7223    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
7224    lt_cv_file_magic_cmd='$OBJDUMP -f'
7225  fi
7226  ;;
7227
7228cegcc*)
7229  # use the weaker test based on 'objdump'. See mingw*.
7230  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
7231  lt_cv_file_magic_cmd='$OBJDUMP -f'
7232  ;;
7233
7234darwin* | rhapsody*)
7235  lt_cv_deplibs_check_method=pass_all
7236  ;;
7237
7238freebsd* | dragonfly* | midnightbsd*)
7239  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
7240    case $host_cpu in
7241    i*86 )
7242      # Not sure whether the presence of OpenBSD here was a mistake.
7243      # Let's accept both of them until this is cleared up.
7244      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
7245      lt_cv_file_magic_cmd=$FILECMD
7246      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
7247      ;;
7248    esac
7249  else
7250    lt_cv_deplibs_check_method=pass_all
7251  fi
7252  ;;
7253
7254haiku*)
7255  lt_cv_deplibs_check_method=pass_all
7256  ;;
7257
7258hpux10.20* | hpux11*)
7259  lt_cv_file_magic_cmd=$FILECMD
7260  case $host_cpu in
7261  ia64*)
7262    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
7263    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
7264    ;;
7265  hppa*64*)
7266    [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]']
7267    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
7268    ;;
7269  *)
7270    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
7271    lt_cv_file_magic_test_file=/usr/lib/libc.sl
7272    ;;
7273  esac
7274  ;;
7275
7276interix[[3-9]]*)
7277  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
7278  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
7279  ;;
7280
7281irix5* | irix6* | nonstopux*)
7282  case $LD in
7283  *-32|*"-32 ") libmagic=32-bit;;
7284  *-n32|*"-n32 ") libmagic=N32;;
7285  *-64|*"-64 ") libmagic=64-bit;;
7286  *) libmagic=never-match;;
7287  esac
7288  lt_cv_deplibs_check_method=pass_all
7289  ;;
7290
7291# This must be glibc/ELF.
7292linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
7293  lt_cv_deplibs_check_method=pass_all
7294  ;;
7295
7296netbsd*)
7297  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
7298    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
7299  else
7300    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
7301  fi
7302  ;;
7303
7304newos6*)
7305  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
7306  lt_cv_file_magic_cmd=$FILECMD
7307  lt_cv_file_magic_test_file=/usr/lib/libnls.so
7308  ;;
7309
7310*nto* | *qnx*)
7311  lt_cv_deplibs_check_method=pass_all
7312  ;;
7313
7314openbsd* | bitrig*)
7315  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
7316    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
7317  else
7318    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
7319  fi
7320  ;;
7321
7322osf3* | osf4* | osf5*)
7323  lt_cv_deplibs_check_method=pass_all
7324  ;;
7325
7326rdos*)
7327  lt_cv_deplibs_check_method=pass_all
7328  ;;
7329
7330solaris*)
7331  lt_cv_deplibs_check_method=pass_all
7332  ;;
7333
7334sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
7335  lt_cv_deplibs_check_method=pass_all
7336  ;;
7337
7338sysv4 | sysv4.3*)
7339  case $host_vendor in
7340  motorola)
7341    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]]'
7342    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
7343    ;;
7344  ncr)
7345    lt_cv_deplibs_check_method=pass_all
7346    ;;
7347  sequent)
7348    lt_cv_file_magic_cmd='/bin/file'
7349    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
7350    ;;
7351  sni)
7352    lt_cv_file_magic_cmd='/bin/file'
7353    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
7354    lt_cv_file_magic_test_file=/lib/libc.so
7355    ;;
7356  siemens)
7357    lt_cv_deplibs_check_method=pass_all
7358    ;;
7359  pc)
7360    lt_cv_deplibs_check_method=pass_all
7361    ;;
7362  esac
7363  ;;
7364
7365tpf*)
7366  lt_cv_deplibs_check_method=pass_all
7367  ;;
7368os2*)
7369  lt_cv_deplibs_check_method=pass_all
7370  ;;
7371esac
7372])
7373
7374file_magic_glob=
7375want_nocaseglob=no
7376if test "$build" = "$host"; then
7377  case $host_os in
7378  mingw* | pw32*)
7379    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
7380      want_nocaseglob=yes
7381    else
7382      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
7383    fi
7384    ;;
7385  esac
7386fi
7387
7388file_magic_cmd=$lt_cv_file_magic_cmd
7389deplibs_check_method=$lt_cv_deplibs_check_method
7390test -z "$deplibs_check_method" && deplibs_check_method=unknown
7391
7392_LT_DECL([], [deplibs_check_method], [1],
7393    [Method to check whether dependent libraries are shared objects])
7394_LT_DECL([], [file_magic_cmd], [1],
7395    [Command to use when deplibs_check_method = "file_magic"])
7396_LT_DECL([], [file_magic_glob], [1],
7397    [How to find potential files when deplibs_check_method = "file_magic"])
7398_LT_DECL([], [want_nocaseglob], [1],
7399    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
7400])# _LT_CHECK_MAGIC_METHOD
7401
7402
7403# LT_PATH_NM
7404# ----------
7405# find the pathname to a BSD- or MS-compatible name lister
7406AC_DEFUN([LT_PATH_NM],
7407[AC_REQUIRE([AC_PROG_CC])dnl
7408AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
7409[if test -n "$NM"; then
7410  # Let the user override the test.
7411  lt_cv_path_NM=$NM
7412else
7413  lt_nm_to_check=${ac_tool_prefix}nm
7414  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
7415    lt_nm_to_check="$lt_nm_to_check nm"
7416  fi
7417  for lt_tmp_nm in $lt_nm_to_check; do
7418    lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
7419    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
7420      IFS=$lt_save_ifs
7421      test -z "$ac_dir" && ac_dir=.
7422      tmp_nm=$ac_dir/$lt_tmp_nm
7423      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
7424	# Check to see if the nm accepts a BSD-compat flag.
7425	# Adding the 'sed 1q' prevents false positives on HP-UX, which says:
7426	#   nm: unknown option "B" ignored
7427	# Tru64's nm complains that /dev/null is an invalid object file
7428	# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
7429	case $build_os in
7430	mingw*) lt_bad_file=conftest.nm/nofile ;;
7431	*) lt_bad_file=/dev/null ;;
7432	esac
7433	case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in
7434	*$lt_bad_file* | *'Invalid file or object type'*)
7435	  lt_cv_path_NM="$tmp_nm -B"
7436	  break 2
7437	  ;;
7438	*)
7439	  case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in
7440	  */dev/null*)
7441	    lt_cv_path_NM="$tmp_nm -p"
7442	    break 2
7443	    ;;
7444	  *)
7445	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
7446	    continue # so that we can try to find one that supports BSD flags
7447	    ;;
7448	  esac
7449	  ;;
7450	esac
7451      fi
7452    done
7453    IFS=$lt_save_ifs
7454  done
7455  : ${lt_cv_path_NM=no}
7456fi])
7457if test no != "$lt_cv_path_NM"; then
7458  NM=$lt_cv_path_NM
7459else
7460  # Didn't find any BSD compatible name lister, look for dumpbin.
7461  if test -n "$DUMPBIN"; then :
7462    # Let the user override the test.
7463  else
7464    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
7465    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in
7466    *COFF*)
7467      DUMPBIN="$DUMPBIN -symbols -headers"
7468      ;;
7469    *)
7470      DUMPBIN=:
7471      ;;
7472    esac
7473  fi
7474  AC_SUBST([DUMPBIN])
7475  if test : != "$DUMPBIN"; then
7476    NM=$DUMPBIN
7477  fi
7478fi
7479test -z "$NM" && NM=nm
7480AC_SUBST([NM])
7481_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
7482
7483AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
7484  [lt_cv_nm_interface="BSD nm"
7485  echo "int some_variable = 0;" > conftest.$ac_ext
7486  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
7487  (eval "$ac_compile" 2>conftest.err)
7488  cat conftest.err >&AS_MESSAGE_LOG_FD
7489  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
7490  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
7491  cat conftest.err >&AS_MESSAGE_LOG_FD
7492  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
7493  cat conftest.out >&AS_MESSAGE_LOG_FD
7494  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
7495    lt_cv_nm_interface="MS dumpbin"
7496  fi
7497  rm -f conftest*])
7498])# LT_PATH_NM
7499
7500# Old names:
7501AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
7502AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
7503dnl aclocal-1.4 backwards compatibility:
7504dnl AC_DEFUN([AM_PROG_NM], [])
7505dnl AC_DEFUN([AC_PROG_NM], [])
7506
7507# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
7508# --------------------------------
7509# how to determine the name of the shared library
7510# associated with a specific link library.
7511#  -- PORTME fill in with the dynamic library characteristics
7512m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
7513[m4_require([_LT_DECL_EGREP])
7514m4_require([_LT_DECL_OBJDUMP])
7515m4_require([_LT_DECL_DLLTOOL])
7516AC_CACHE_CHECK([how to associate runtime and link libraries],
7517lt_cv_sharedlib_from_linklib_cmd,
7518[lt_cv_sharedlib_from_linklib_cmd='unknown'
7519
7520case $host_os in
7521cygwin* | mingw* | pw32* | cegcc*)
7522  # two different shell functions defined in ltmain.sh;
7523  # decide which one to use based on capabilities of $DLLTOOL
7524  case `$DLLTOOL --help 2>&1` in
7525  *--identify-strict*)
7526    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
7527    ;;
7528  *)
7529    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
7530    ;;
7531  esac
7532  ;;
7533*)
7534  # fallback: assume linklib IS sharedlib
7535  lt_cv_sharedlib_from_linklib_cmd=$ECHO
7536  ;;
7537esac
7538])
7539sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
7540test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
7541
7542_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
7543    [Command to associate shared and link libraries])
7544])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
7545
7546
7547# _LT_PATH_MANIFEST_TOOL
7548# ----------------------
7549# locate the manifest tool
7550m4_defun([_LT_PATH_MANIFEST_TOOL],
7551[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
7552test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
7553AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
7554  [lt_cv_path_mainfest_tool=no
7555  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
7556  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
7557  cat conftest.err >&AS_MESSAGE_LOG_FD
7558  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
7559    lt_cv_path_mainfest_tool=yes
7560  fi
7561  rm -f conftest*])
7562if test yes != "$lt_cv_path_mainfest_tool"; then
7563  MANIFEST_TOOL=:
7564fi
7565_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
7566])# _LT_PATH_MANIFEST_TOOL
7567
7568
7569# _LT_DLL_DEF_P([FILE])
7570# ---------------------
7571# True iff FILE is a Windows DLL '.def' file.
7572# Keep in sync with func_dll_def_p in the libtool script
7573AC_DEFUN([_LT_DLL_DEF_P],
7574[dnl
7575  test DEF = "`$SED -n dnl
7576    -e '\''s/^[[	 ]]*//'\'' dnl Strip leading whitespace
7577    -e '\''/^\(;.*\)*$/d'\'' dnl      Delete empty lines and comments
7578    -e '\''s/^\(EXPORTS\|LIBRARY\)\([[	 ]].*\)*$/DEF/p'\'' dnl
7579    -e q dnl                          Only consider the first "real" line
7580    $1`" dnl
7581])# _LT_DLL_DEF_P
7582
7583
7584# LT_LIB_M
7585# --------
7586# check for math library
7587AC_DEFUN([LT_LIB_M],
7588[AC_REQUIRE([AC_CANONICAL_HOST])dnl
7589LIBM=
7590case $host in
7591*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
7592  # These system don't have libm, or don't need it
7593  ;;
7594*-ncr-sysv4.3*)
7595  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
7596  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
7597  ;;
7598*)
7599  AC_CHECK_LIB(m, cos, LIBM=-lm)
7600  ;;
7601esac
7602AC_SUBST([LIBM])
7603])# LT_LIB_M
7604
7605# Old name:
7606AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
7607dnl aclocal-1.4 backwards compatibility:
7608dnl AC_DEFUN([AC_CHECK_LIBM], [])
7609
7610
7611# _LT_COMPILER_NO_RTTI([TAGNAME])
7612# -------------------------------
7613m4_defun([_LT_COMPILER_NO_RTTI],
7614[m4_require([_LT_TAG_COMPILER])dnl
7615
7616_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
7617
7618if test yes = "$GCC"; then
7619  case $cc_basename in
7620  nvcc*)
7621    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
7622  *)
7623    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
7624  esac
7625
7626  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
7627    lt_cv_prog_compiler_rtti_exceptions,
7628    [-fno-rtti -fno-exceptions], [],
7629    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
7630fi
7631_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
7632	[Compiler flag to turn off builtin functions])
7633])# _LT_COMPILER_NO_RTTI
7634
7635
7636# _LT_CMD_GLOBAL_SYMBOLS
7637# ----------------------
7638m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
7639[AC_REQUIRE([AC_CANONICAL_HOST])dnl
7640AC_REQUIRE([AC_PROG_CC])dnl
7641AC_REQUIRE([AC_PROG_AWK])dnl
7642AC_REQUIRE([LT_PATH_NM])dnl
7643AC_REQUIRE([LT_PATH_LD])dnl
7644m4_require([_LT_DECL_SED])dnl
7645m4_require([_LT_DECL_EGREP])dnl
7646m4_require([_LT_TAG_COMPILER])dnl
7647
7648# Check for command to grab the raw symbol name followed by C symbol from nm.
7649AC_MSG_CHECKING([command to parse $NM output from $compiler object])
7650AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
7651[
7652# These are sane defaults that work on at least a few old systems.
7653# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
7654
7655# Character class describing NM global symbol codes.
7656symcode='[[BCDEGRST]]'
7657
7658# Regexp to match symbols that can be accessed directly from C.
7659sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
7660
7661# Define system-specific variables.
7662case $host_os in
7663aix*)
7664  symcode='[[BCDT]]'
7665  ;;
7666cygwin* | mingw* | pw32* | cegcc*)
7667  symcode='[[ABCDGISTW]]'
7668  ;;
7669hpux*)
7670  if test ia64 = "$host_cpu"; then
7671    symcode='[[ABCDEGRST]]'
7672  fi
7673  ;;
7674irix* | nonstopux*)
7675  symcode='[[BCDEGRST]]'
7676  ;;
7677osf*)
7678  symcode='[[BCDEGQRST]]'
7679  ;;
7680solaris*)
7681  symcode='[[BDRT]]'
7682  ;;
7683sco3.2v5*)
7684  symcode='[[DT]]'
7685  ;;
7686sysv4.2uw2*)
7687  symcode='[[DT]]'
7688  ;;
7689sysv5* | sco5v6* | unixware* | OpenUNIX*)
7690  symcode='[[ABDT]]'
7691  ;;
7692sysv4)
7693  symcode='[[DFNSTU]]'
7694  ;;
7695esac
7696
7697# If we're using GNU nm, then use its standard symbol codes.
7698case `$NM -V 2>&1` in
7699*GNU* | *'with BFD'*)
7700  symcode='[[ABCDGIRSTW]]' ;;
7701esac
7702
7703if test "$lt_cv_nm_interface" = "MS dumpbin"; then
7704  # Gets list of data symbols to import.
7705  lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'"
7706  # Adjust the below global symbol transforms to fixup imported variables.
7707  lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
7708  lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
7709  lt_c_name_lib_hook="\
7710  -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
7711  -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
7712else
7713  # Disable hooks by default.
7714  lt_cv_sys_global_symbol_to_import=
7715  lt_cdecl_hook=
7716  lt_c_name_hook=
7717  lt_c_name_lib_hook=
7718fi
7719
7720# Transform an extracted symbol line into a proper C declaration.
7721# Some systems (esp. on ia64) link data and code symbols differently,
7722# so use this general approach.
7723lt_cv_sys_global_symbol_to_cdecl="$SED -n"\
7724$lt_cdecl_hook\
7725" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
7726" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
7727
7728# Transform an extracted symbol line into symbol name and symbol address
7729lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\
7730$lt_c_name_hook\
7731" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
7732" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
7733
7734# Transform an extracted symbol line into symbol name with lib prefix and
7735# symbol address.
7736lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\
7737$lt_c_name_lib_hook\
7738" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
7739" -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
7740" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
7741
7742# Handle CRLF in mingw tool chain
7743opt_cr=
7744case $build_os in
7745mingw*)
7746  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
7747  ;;
7748esac
7749
7750# Try without a prefix underscore, then with it.
7751for ac_symprfx in "" "_"; do
7752
7753  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
7754  symxfrm="\\1 $ac_symprfx\\2 \\2"
7755
7756  # Write the raw and C identifiers.
7757  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
7758    # Fake it for dumpbin and say T for any non-static function,
7759    # D for any global variable and I for any imported variable.
7760    # Also find C++ and __fastcall symbols from MSVC++ or ICC,
7761    # which start with @ or ?.
7762    lt_cv_sys_global_symbol_pipe="$AWK ['"\
7763"     {last_section=section; section=\$ 3};"\
7764"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
7765"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
7766"     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
7767"     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
7768"     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
7769"     \$ 0!~/External *\|/{next};"\
7770"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
7771"     {if(hide[section]) next};"\
7772"     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
7773"     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
7774"     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
7775"     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
7776"     ' prfx=^$ac_symprfx]"
7777  else
7778    lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
7779  fi
7780  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'"
7781
7782  # Check to see that the pipe works correctly.
7783  pipe_works=no
7784
7785  rm -f conftest*
7786  cat > conftest.$ac_ext <<_LT_EOF
7787#ifdef __cplusplus
7788extern "C" {
7789#endif
7790char nm_test_var;
7791void nm_test_func(void);
7792void nm_test_func(void){}
7793#ifdef __cplusplus
7794}
7795#endif
7796int main(){nm_test_var='a';nm_test_func();return(0);}
7797_LT_EOF
7798
7799  if AC_TRY_EVAL(ac_compile); then
7800    # Now try to grab the symbols.
7801    nlist=conftest.nm
7802    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
7803      # Try sorting and uniquifying the output.
7804      if sort "$nlist" | uniq > "$nlist"T; then
7805	mv -f "$nlist"T "$nlist"
7806      else
7807	rm -f "$nlist"T
7808      fi
7809
7810      # Make sure that we snagged all the symbols we need.
7811      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
7812	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
7813	  cat <<_LT_EOF > conftest.$ac_ext
7814/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
7815#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
7816/* DATA imports from DLLs on WIN32 can't be const, because runtime
7817   relocations are performed -- see ld's documentation on pseudo-relocs.  */
7818# define LT@&t@_DLSYM_CONST
7819#elif defined __osf__
7820/* This system does not cope well with relocations in const data.  */
7821# define LT@&t@_DLSYM_CONST
7822#else
7823# define LT@&t@_DLSYM_CONST const
7824#endif
7825
7826#ifdef __cplusplus
7827extern "C" {
7828#endif
7829
7830_LT_EOF
7831	  # Now generate the symbol file.
7832	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
7833
7834	  cat <<_LT_EOF >> conftest.$ac_ext
7835
7836/* The mapping between symbol names and symbols.  */
7837LT@&t@_DLSYM_CONST struct {
7838  const char *name;
7839  void       *address;
7840}
7841lt__PROGRAM__LTX_preloaded_symbols[[]] =
7842{
7843  { "@PROGRAM@", (void *) 0 },
7844_LT_EOF
7845	  $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
7846	  cat <<\_LT_EOF >> conftest.$ac_ext
7847  {0, (void *) 0}
7848};
7849
7850/* This works around a problem in FreeBSD linker */
7851#ifdef FREEBSD_WORKAROUND
7852static const void *lt_preloaded_setup() {
7853  return lt__PROGRAM__LTX_preloaded_symbols;
7854}
7855#endif
7856
7857#ifdef __cplusplus
7858}
7859#endif
7860_LT_EOF
7861	  # Now try linking the two files.
7862	  mv conftest.$ac_objext conftstm.$ac_objext
7863	  lt_globsym_save_LIBS=$LIBS
7864	  lt_globsym_save_CFLAGS=$CFLAGS
7865	  LIBS=conftstm.$ac_objext
7866	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
7867	  if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
7868	    pipe_works=yes
7869	  fi
7870	  LIBS=$lt_globsym_save_LIBS
7871	  CFLAGS=$lt_globsym_save_CFLAGS
7872	else
7873	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
7874	fi
7875      else
7876	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
7877      fi
7878    else
7879      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
7880    fi
7881  else
7882    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
7883    cat conftest.$ac_ext >&5
7884  fi
7885  rm -rf conftest* conftst*
7886
7887  # Do not use the global_symbol_pipe unless it works.
7888  if test yes = "$pipe_works"; then
7889    break
7890  else
7891    lt_cv_sys_global_symbol_pipe=
7892  fi
7893done
7894])
7895if test -z "$lt_cv_sys_global_symbol_pipe"; then
7896  lt_cv_sys_global_symbol_to_cdecl=
7897fi
7898if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
7899  AC_MSG_RESULT(failed)
7900else
7901  AC_MSG_RESULT(ok)
7902fi
7903
7904# Response file support.
7905if test "$lt_cv_nm_interface" = "MS dumpbin"; then
7906  nm_file_list_spec='@'
7907elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
7908  nm_file_list_spec='@'
7909fi
7910
7911_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
7912    [Take the output of nm and produce a listing of raw symbols and C names])
7913_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
7914    [Transform the output of nm in a proper C declaration])
7915_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
7916    [Transform the output of nm into a list of symbols to manually relocate])
7917_LT_DECL([global_symbol_to_c_name_address],
7918    [lt_cv_sys_global_symbol_to_c_name_address], [1],
7919    [Transform the output of nm in a C name address pair])
7920_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
7921    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
7922    [Transform the output of nm in a C name address pair when lib prefix is needed])
7923_LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
7924    [The name lister interface])
7925_LT_DECL([], [nm_file_list_spec], [1],
7926    [Specify filename containing input files for $NM])
7927]) # _LT_CMD_GLOBAL_SYMBOLS
7928
7929
7930# _LT_COMPILER_PIC([TAGNAME])
7931# ---------------------------
7932m4_defun([_LT_COMPILER_PIC],
7933[m4_require([_LT_TAG_COMPILER])dnl
7934_LT_TAGVAR(lt_prog_compiler_wl, $1)=
7935_LT_TAGVAR(lt_prog_compiler_pic, $1)=
7936_LT_TAGVAR(lt_prog_compiler_static, $1)=
7937
7938m4_if([$1], [CXX], [
7939  # C++ specific cases for pic, static, wl, etc.
7940  if test yes = "$GXX"; then
7941    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7942    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
7943
7944    case $host_os in
7945    aix*)
7946      # All AIX code is PIC.
7947      if test ia64 = "$host_cpu"; then
7948	# AIX 5 now supports IA64 processor
7949	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7950      fi
7951      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
7952      ;;
7953
7954    amigaos*)
7955      case $host_cpu in
7956      powerpc)
7957            # see comment about AmigaOS4 .so support
7958            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
7959        ;;
7960      m68k)
7961            # FIXME: we need at least 68020 code to build shared libraries, but
7962            # adding the '-m68020' flag to GCC prevents building anything better,
7963            # like '-m68040'.
7964            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
7965        ;;
7966      esac
7967      ;;
7968
7969    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
7970      # PIC is the default for these OSes.
7971      ;;
7972    mingw* | cygwin* | os2* | pw32* | cegcc*)
7973      # This hack is so that the source file can tell whether it is being
7974      # built for inclusion in a dll (and should export symbols for example).
7975      # Although the cygwin gcc ignores -fPIC, still need this for old-style
7976      # (--disable-auto-import) libraries
7977      m4_if([$1], [GCJ], [],
7978	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
7979      case $host_os in
7980      os2*)
7981	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
7982	;;
7983      esac
7984      ;;
7985    darwin* | rhapsody*)
7986      # PIC is the default on this platform
7987      # Common symbols not allowed in MH_DYLIB files
7988      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
7989      ;;
7990    *djgpp*)
7991      # DJGPP does not support shared libraries at all
7992      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
7993      ;;
7994    haiku*)
7995      # PIC is the default for Haiku.
7996      # The "-static" flag exists, but is broken.
7997      _LT_TAGVAR(lt_prog_compiler_static, $1)=
7998      ;;
7999    interix[[3-9]]*)
8000      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
8001      # Instead, we relocate shared libraries at runtime.
8002      ;;
8003    sysv4*MP*)
8004      if test -d /usr/nec; then
8005	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
8006      fi
8007      ;;
8008    hpux*)
8009      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
8010      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
8011      # sets the default TLS model and affects inlining.
8012      case $host_cpu in
8013      hppa*64*)
8014	;;
8015      *)
8016	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
8017	;;
8018      esac
8019      ;;
8020    *qnx* | *nto*)
8021      # QNX uses GNU C++, but need to define -shared option too, otherwise
8022      # it will coredump.
8023      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
8024      ;;
8025    *)
8026      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
8027      ;;
8028    esac
8029  else
8030    case $host_os in
8031      aix[[4-9]]*)
8032	# All AIX code is PIC.
8033	if test ia64 = "$host_cpu"; then
8034	  # AIX 5 now supports IA64 processor
8035	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8036	else
8037	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
8038	fi
8039	;;
8040      chorus*)
8041	case $cc_basename in
8042	cxch68*)
8043	  # Green Hills C++ Compiler
8044	  # _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"
8045	  ;;
8046	esac
8047	;;
8048      mingw* | cygwin* | os2* | pw32* | cegcc*)
8049	# This hack is so that the source file can tell whether it is being
8050	# built for inclusion in a dll (and should export symbols for example).
8051	m4_if([$1], [GCJ], [],
8052	  [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
8053	;;
8054      dgux*)
8055	case $cc_basename in
8056	  ec++*)
8057	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
8058	    ;;
8059	  ghcx*)
8060	    # Green Hills C++ Compiler
8061	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
8062	    ;;
8063	  *)
8064	    ;;
8065	esac
8066	;;
8067      freebsd* | dragonfly* | midnightbsd*)
8068	# FreeBSD uses GNU C++
8069	;;
8070      hpux9* | hpux10* | hpux11*)
8071	case $cc_basename in
8072	  CC*)
8073	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8074	    _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
8075	    if test ia64 != "$host_cpu"; then
8076	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
8077	    fi
8078	    ;;
8079	  aCC*)
8080	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8081	    _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
8082	    case $host_cpu in
8083	    hppa*64*|ia64*)
8084	      # +Z the default
8085	      ;;
8086	    *)
8087	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
8088	      ;;
8089	    esac
8090	    ;;
8091	  *)
8092	    ;;
8093	esac
8094	;;
8095      interix*)
8096	# This is c89, which is MS Visual C++ (no shared libs)
8097	# Anyone wants to do a port?
8098	;;
8099      irix5* | irix6* | nonstopux*)
8100	case $cc_basename in
8101	  CC*)
8102	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8103	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
8104	    # CC pic flag -KPIC is the default.
8105	    ;;
8106	  *)
8107	    ;;
8108	esac
8109	;;
8110      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
8111	case $cc_basename in
8112	  KCC*)
8113	    # KAI C++ Compiler
8114	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
8115	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
8116	    ;;
8117	  ecpc* )
8118	    # old Intel C++ for x86_64, which still supported -KPIC.
8119	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8120	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
8121	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
8122	    ;;
8123	  icpc* )
8124	    # Intel C++, used to be incompatible with GCC.
8125	    # ICC 10 doesn't accept -KPIC any more.
8126	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8127	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
8128	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
8129	    ;;
8130	  pgCC* | pgcpp*)
8131	    # Portland Group C++ compiler
8132	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8133	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
8134	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8135	    ;;
8136	  cxx*)
8137	    # Compaq C++
8138	    # Make sure the PIC flag is empty.  It appears that all Alpha
8139	    # Linux and Compaq Tru64 Unix objects are PIC.
8140	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
8141	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
8142	    ;;
8143	  xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
8144	    # IBM XL 8.0, 9.0 on PPC and BlueGene
8145	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8146	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
8147	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
8148	    ;;
8149	  *)
8150	    case `$CC -V 2>&1 | $SED 5q` in
8151	    *Sun\ C*)
8152	      # Sun C++ 5.9
8153	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
8154	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8155	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
8156	      ;;
8157	    esac
8158	    ;;
8159	esac
8160	;;
8161      lynxos*)
8162	;;
8163      m88k*)
8164	;;
8165      mvs*)
8166	case $cc_basename in
8167	  cxx*)
8168	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
8169	    ;;
8170	  *)
8171	    ;;
8172	esac
8173	;;
8174      netbsd*)
8175	;;
8176      *qnx* | *nto*)
8177        # QNX uses GNU C++, but need to define -shared option too, otherwise
8178        # it will coredump.
8179        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
8180        ;;
8181      osf3* | osf4* | osf5*)
8182	case $cc_basename in
8183	  KCC*)
8184	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
8185	    ;;
8186	  RCC*)
8187	    # Rational C++ 2.4.1
8188	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
8189	    ;;
8190	  cxx*)
8191	    # Digital/Compaq C++
8192	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8193	    # Make sure the PIC flag is empty.  It appears that all Alpha
8194	    # Linux and Compaq Tru64 Unix objects are PIC.
8195	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
8196	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
8197	    ;;
8198	  *)
8199	    ;;
8200	esac
8201	;;
8202      psos*)
8203	;;
8204      solaris*)
8205	case $cc_basename in
8206	  CC* | sunCC*)
8207	    # Sun C++ 4.2, 5.x and Centerline C++
8208	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
8209	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8210	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
8211	    ;;
8212	  gcx*)
8213	    # Green Hills C++ Compiler
8214	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
8215	    ;;
8216	  *)
8217	    ;;
8218	esac
8219	;;
8220      sunos4*)
8221	case $cc_basename in
8222	  CC*)
8223	    # Sun C++ 4.x
8224	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
8225	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8226	    ;;
8227	  lcc*)
8228	    # Lucid
8229	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
8230	    ;;
8231	  *)
8232	    ;;
8233	esac
8234	;;
8235      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
8236	case $cc_basename in
8237	  CC*)
8238	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8239	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
8240	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8241	    ;;
8242	esac
8243	;;
8244      tandem*)
8245	case $cc_basename in
8246	  NCC*)
8247	    # NonStop-UX NCC 3.20
8248	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
8249	    ;;
8250	  *)
8251	    ;;
8252	esac
8253	;;
8254      vxworks*)
8255	;;
8256      *)
8257	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
8258	;;
8259    esac
8260  fi
8261],
8262[
8263  if test yes = "$GCC"; then
8264    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8265    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
8266
8267    case $host_os in
8268      aix*)
8269      # All AIX code is PIC.
8270      if test ia64 = "$host_cpu"; then
8271	# AIX 5 now supports IA64 processor
8272	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8273      fi
8274      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
8275      ;;
8276
8277    amigaos*)
8278      case $host_cpu in
8279      powerpc)
8280            # see comment about AmigaOS4 .so support
8281            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
8282        ;;
8283      m68k)
8284            # FIXME: we need at least 68020 code to build shared libraries, but
8285            # adding the '-m68020' flag to GCC prevents building anything better,
8286            # like '-m68040'.
8287            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
8288        ;;
8289      esac
8290      ;;
8291
8292    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
8293      # PIC is the default for these OSes.
8294      ;;
8295
8296    mingw* | cygwin* | pw32* | os2* | cegcc*)
8297      # This hack is so that the source file can tell whether it is being
8298      # built for inclusion in a dll (and should export symbols for example).
8299      # Although the cygwin gcc ignores -fPIC, still need this for old-style
8300      # (--disable-auto-import) libraries
8301      m4_if([$1], [GCJ], [],
8302	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
8303      case $host_os in
8304      os2*)
8305	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
8306	;;
8307      esac
8308      ;;
8309
8310    darwin* | rhapsody*)
8311      # PIC is the default on this platform
8312      # Common symbols not allowed in MH_DYLIB files
8313      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
8314      ;;
8315
8316    haiku*)
8317      # PIC is the default for Haiku.
8318      # The "-static" flag exists, but is broken.
8319      _LT_TAGVAR(lt_prog_compiler_static, $1)=
8320      ;;
8321
8322    hpux*)
8323      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
8324      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
8325      # sets the default TLS model and affects inlining.
8326      case $host_cpu in
8327      hppa*64*)
8328	# +Z the default
8329	;;
8330      *)
8331	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
8332	;;
8333      esac
8334      ;;
8335
8336    interix[[3-9]]*)
8337      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
8338      # Instead, we relocate shared libraries at runtime.
8339      ;;
8340
8341    msdosdjgpp*)
8342      # Just because we use GCC doesn't mean we suddenly get shared libraries
8343      # on systems that don't support them.
8344      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
8345      enable_shared=no
8346      ;;
8347
8348    *nto* | *qnx*)
8349      # QNX uses GNU C++, but need to define -shared option too, otherwise
8350      # it will coredump.
8351      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
8352      ;;
8353
8354    sysv4*MP*)
8355      if test -d /usr/nec; then
8356	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
8357      fi
8358      ;;
8359
8360    *)
8361      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
8362      ;;
8363    esac
8364
8365    case $cc_basename in
8366    nvcc*) # Cuda Compiler Driver 2.2
8367      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
8368      if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
8369        _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
8370      fi
8371      ;;
8372    esac
8373  else
8374    # PORTME Check for flag to pass linker flags through the system compiler.
8375    case $host_os in
8376    aix*)
8377      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8378      if test ia64 = "$host_cpu"; then
8379	# AIX 5 now supports IA64 processor
8380	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8381      else
8382	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
8383      fi
8384      ;;
8385
8386    darwin* | rhapsody*)
8387      # PIC is the default on this platform
8388      # Common symbols not allowed in MH_DYLIB files
8389      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
8390      case $cc_basename in
8391      nagfor*)
8392        # NAG Fortran compiler
8393        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
8394        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
8395        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8396        ;;
8397      esac
8398      ;;
8399
8400    mingw* | cygwin* | pw32* | os2* | cegcc*)
8401      # This hack is so that the source file can tell whether it is being
8402      # built for inclusion in a dll (and should export symbols for example).
8403      m4_if([$1], [GCJ], [],
8404	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
8405      case $host_os in
8406      os2*)
8407	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
8408	;;
8409      esac
8410      ;;
8411
8412    hpux9* | hpux10* | hpux11*)
8413      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8414      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
8415      # not for PA HP-UX.
8416      case $host_cpu in
8417      hppa*64*|ia64*)
8418	# +Z the default
8419	;;
8420      *)
8421	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
8422	;;
8423      esac
8424      # Is there a better lt_prog_compiler_static that works with the bundled CC?
8425      _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
8426      ;;
8427
8428    irix5* | irix6* | nonstopux*)
8429      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8430      # PIC (with -KPIC) is the default.
8431      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
8432      ;;
8433
8434    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
8435      case $cc_basename in
8436      # old Intel for x86_64, which still supported -KPIC.
8437      ecc*)
8438	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8439	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
8440	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
8441        ;;
8442      # icc used to be incompatible with GCC.
8443      # ICC 10 doesn't accept -KPIC any more.
8444      icc* | ifort*)
8445	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8446	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
8447	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
8448        ;;
8449      # Lahey Fortran 8.1.
8450      lf95*)
8451	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8452	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
8453	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
8454	;;
8455      nagfor*)
8456	# NAG Fortran compiler
8457	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
8458	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
8459	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8460	;;
8461      tcc*)
8462	# Fabrice Bellard et al's Tiny C Compiler
8463	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8464	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
8465	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
8466	;;
8467      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
8468        # Portland Group compilers (*not* the Pentium gcc compiler,
8469	# which looks to be a dead project)
8470	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8471	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
8472	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8473        ;;
8474      ccc*)
8475        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8476        # All Alpha code is PIC.
8477        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
8478        ;;
8479      xl* | bgxl* | bgf* | mpixl*)
8480	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
8481	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8482	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
8483	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
8484	;;
8485      *)
8486	case `$CC -V 2>&1 | $SED 5q` in
8487	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
8488	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
8489	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
8490	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8491	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
8492	  ;;
8493	*Sun\ F* | *Sun*Fortran*)
8494	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
8495	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8496	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
8497	  ;;
8498	*Sun\ C*)
8499	  # Sun C 5.9
8500	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
8501	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8502	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8503	  ;;
8504        *Intel*\ [[CF]]*Compiler*)
8505	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8506	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
8507	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
8508	  ;;
8509	*Portland\ Group*)
8510	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8511	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
8512	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8513	  ;;
8514	esac
8515	;;
8516      esac
8517      ;;
8518
8519    newsos6)
8520      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
8521      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8522      ;;
8523
8524    *nto* | *qnx*)
8525      # QNX uses GNU C++, but need to define -shared option too, otherwise
8526      # it will coredump.
8527      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
8528      ;;
8529
8530    osf3* | osf4* | osf5*)
8531      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8532      # All OSF/1 code is PIC.
8533      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
8534      ;;
8535
8536    rdos*)
8537      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
8538      ;;
8539
8540    solaris*)
8541      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
8542      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8543      case $cc_basename in
8544      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
8545	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
8546      *)
8547	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
8548      esac
8549      ;;
8550
8551    sunos4*)
8552      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
8553      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
8554      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8555      ;;
8556
8557    sysv4 | sysv4.2uw2* | sysv4.3*)
8558      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8559      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
8560      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8561      ;;
8562
8563    sysv4*MP*)
8564      if test -d /usr/nec; then
8565	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
8566	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8567      fi
8568      ;;
8569
8570    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
8571      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8572      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
8573      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8574      ;;
8575
8576    unicos*)
8577      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8578      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
8579      ;;
8580
8581    uts4*)
8582      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
8583      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8584      ;;
8585
8586    *)
8587      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
8588      ;;
8589    esac
8590  fi
8591])
8592case $host_os in
8593  # For platforms that do not support PIC, -DPIC is meaningless:
8594  *djgpp*)
8595    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
8596    ;;
8597  *)
8598    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
8599    ;;
8600esac
8601
8602AC_CACHE_CHECK([for $compiler option to produce PIC],
8603  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
8604  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
8605_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
8606
8607#
8608# Check to make sure the PIC flag actually works.
8609#
8610if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
8611  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
8612    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
8613    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
8614    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
8615     "" | " "*) ;;
8616     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
8617     esac],
8618    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
8619     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
8620fi
8621_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
8622	[Additional compiler flags for building library objects])
8623
8624_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
8625	[How to pass a linker flag through the compiler])
8626#
8627# Check to make sure the static flag actually works.
8628#
8629wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
8630_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
8631  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
8632  $lt_tmp_static_flag,
8633  [],
8634  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
8635_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
8636	[Compiler flag to prevent dynamic linking])
8637])# _LT_COMPILER_PIC
8638
8639
8640# _LT_LINKER_SHLIBS([TAGNAME])
8641# ----------------------------
8642# See if the linker supports building shared libraries.
8643m4_defun([_LT_LINKER_SHLIBS],
8644[AC_REQUIRE([LT_PATH_LD])dnl
8645AC_REQUIRE([LT_PATH_NM])dnl
8646m4_require([_LT_PATH_MANIFEST_TOOL])dnl
8647m4_require([_LT_FILEUTILS_DEFAULTS])dnl
8648m4_require([_LT_DECL_EGREP])dnl
8649m4_require([_LT_DECL_SED])dnl
8650m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
8651m4_require([_LT_TAG_COMPILER])dnl
8652AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
8653m4_if([$1], [CXX], [
8654  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
8655  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
8656  case $host_os in
8657  aix[[4-9]]*)
8658    # If we're using GNU nm, then we don't want the "-C" option.
8659    # -C means demangle to GNU nm, but means don't demangle to AIX nm.
8660    # Without the "-l" option, or with the "-B" option, AIX nm treats
8661    # weak defined symbols like other global defined symbols, whereas
8662    # GNU nm marks them as "W".
8663    # While the 'weak' keyword is ignored in the Export File, we need
8664    # it in the Import File for the 'aix-soname' feature, so we have
8665    # to replace the "-B" option with "-P" for AIX nm.
8666    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
8667      _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'
8668    else
8669      _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'
8670    fi
8671    ;;
8672  pw32*)
8673    _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
8674    ;;
8675  cygwin* | mingw* | cegcc*)
8676    case $cc_basename in
8677    cl* | icl*)
8678      _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
8679      ;;
8680    *)
8681      _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'
8682      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
8683      ;;
8684    esac
8685    ;;
8686  *)
8687    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
8688    ;;
8689  esac
8690], [
8691  runpath_var=
8692  _LT_TAGVAR(allow_undefined_flag, $1)=
8693  _LT_TAGVAR(always_export_symbols, $1)=no
8694  _LT_TAGVAR(archive_cmds, $1)=
8695  _LT_TAGVAR(archive_expsym_cmds, $1)=
8696  _LT_TAGVAR(compiler_needs_object, $1)=no
8697  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8698  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
8699  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
8700  _LT_TAGVAR(hardcode_automatic, $1)=no
8701  _LT_TAGVAR(hardcode_direct, $1)=no
8702  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
8703  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8704  _LT_TAGVAR(hardcode_libdir_separator, $1)=
8705  _LT_TAGVAR(hardcode_minus_L, $1)=no
8706  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
8707  _LT_TAGVAR(inherit_rpath, $1)=no
8708  _LT_TAGVAR(link_all_deplibs, $1)=unknown
8709  _LT_TAGVAR(module_cmds, $1)=
8710  _LT_TAGVAR(module_expsym_cmds, $1)=
8711  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
8712  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
8713  _LT_TAGVAR(thread_safe_flag_spec, $1)=
8714  _LT_TAGVAR(whole_archive_flag_spec, $1)=
8715  # include_expsyms should be a list of space-separated symbols to be *always*
8716  # included in the symbol list
8717  _LT_TAGVAR(include_expsyms, $1)=
8718  # exclude_expsyms can be an extended regexp of symbols to exclude
8719  # it will be wrapped by ' (' and ')$', so one must not match beginning or
8720  # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
8721  # as well as any symbol that contains 'd'.
8722  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
8723  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
8724  # platforms (ab)use it in PIC code, but their linkers get confused if
8725  # the symbol is explicitly referenced.  Since portable code cannot
8726  # rely on this symbol name, it's probably fine to never include it in
8727  # preloaded symbol tables.
8728  # Exclude shared library initialization/finalization symbols.
8729dnl Note also adjust exclude_expsyms for C++ above.
8730  extract_expsyms_cmds=
8731
8732  case $host_os in
8733  cygwin* | mingw* | pw32* | cegcc*)
8734    # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
8735    # When not using gcc, we currently assume that we are using
8736    # Microsoft Visual C++ or Intel C++ Compiler.
8737    if test yes != "$GCC"; then
8738      with_gnu_ld=no
8739    fi
8740    ;;
8741  interix*)
8742    # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC)
8743    with_gnu_ld=yes
8744    ;;
8745  openbsd* | bitrig*)
8746    with_gnu_ld=no
8747    ;;
8748  esac
8749
8750  _LT_TAGVAR(ld_shlibs, $1)=yes
8751
8752  # On some targets, GNU ld is compatible enough with the native linker
8753  # that we're better off using the native interface for both.
8754  lt_use_gnu_ld_interface=no
8755  if test yes = "$with_gnu_ld"; then
8756    case $host_os in
8757      aix*)
8758	# The AIX port of GNU ld has always aspired to compatibility
8759	# with the native linker.  However, as the warning in the GNU ld
8760	# block says, versions before 2.19.5* couldn't really create working
8761	# shared libraries, regardless of the interface used.
8762	case `$LD -v 2>&1` in
8763	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
8764	  *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
8765	  *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
8766	  *)
8767	    lt_use_gnu_ld_interface=yes
8768	    ;;
8769	esac
8770	;;
8771      *)
8772	lt_use_gnu_ld_interface=yes
8773	;;
8774    esac
8775  fi
8776
8777  if test yes = "$lt_use_gnu_ld_interface"; then
8778    # If archive_cmds runs LD, not CC, wlarc should be empty
8779    wlarc='$wl'
8780
8781    # Set some defaults for GNU ld with shared library support. These
8782    # are reset later if shared libraries are not supported. Putting them
8783    # here allows them to be overridden if necessary.
8784    runpath_var=LD_RUN_PATH
8785    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
8786    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
8787    # ancient GNU ld didn't support --whole-archive et. al.
8788    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
8789      _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
8790    else
8791      _LT_TAGVAR(whole_archive_flag_spec, $1)=
8792    fi
8793    supports_anon_versioning=no
8794    case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in
8795      *GNU\ gold*) supports_anon_versioning=yes ;;
8796      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
8797      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
8798      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
8799      *\ 2.11.*) ;; # other 2.11 versions
8800      *) supports_anon_versioning=yes ;;
8801    esac
8802
8803    # See if GNU ld supports shared libraries.
8804    case $host_os in
8805    aix[[3-9]]*)
8806      # On AIX/PPC, the GNU linker is very broken
8807      if test ia64 != "$host_cpu"; then
8808	_LT_TAGVAR(ld_shlibs, $1)=no
8809	cat <<_LT_EOF 1>&2
8810
8811*** Warning: the GNU linker, at least up to release 2.19, is reported
8812*** to be unable to reliably create shared libraries on AIX.
8813*** Therefore, libtool is disabling shared libraries support.  If you
8814*** really care for shared libraries, you may want to install binutils
8815*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
8816*** You will then need to restart the configuration process.
8817
8818_LT_EOF
8819      fi
8820      ;;
8821
8822    amigaos*)
8823      case $host_cpu in
8824      powerpc)
8825            # see comment about AmigaOS4 .so support
8826            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
8827            _LT_TAGVAR(archive_expsym_cmds, $1)=''
8828        ;;
8829      m68k)
8830            _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)'
8831            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8832            _LT_TAGVAR(hardcode_minus_L, $1)=yes
8833        ;;
8834      esac
8835      ;;
8836
8837    beos*)
8838      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
8839	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
8840	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
8841	# support --undefined.  This deserves some investigation.  FIXME
8842	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
8843      else
8844	_LT_TAGVAR(ld_shlibs, $1)=no
8845      fi
8846      ;;
8847
8848    cygwin* | mingw* | pw32* | cegcc*)
8849      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
8850      # as there is no search path for DLLs.
8851      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8852      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
8853      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
8854      _LT_TAGVAR(always_export_symbols, $1)=no
8855      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
8856      _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'
8857      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
8858
8859      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
8860        _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'
8861	# If the export-symbols file already is a .def file, use it as
8862	# is; otherwise, prepend EXPORTS...
8863	_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
8864          cp $export_symbols $output_objdir/$soname.def;
8865        else
8866          echo EXPORTS > $output_objdir/$soname.def;
8867          cat $export_symbols >> $output_objdir/$soname.def;
8868        fi~
8869        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
8870      else
8871	_LT_TAGVAR(ld_shlibs, $1)=no
8872      fi
8873      ;;
8874
8875    haiku*)
8876      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
8877      _LT_TAGVAR(link_all_deplibs, $1)=yes
8878      ;;
8879
8880    os2*)
8881      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8882      _LT_TAGVAR(hardcode_minus_L, $1)=yes
8883      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
8884      shrext_cmds=.dll
8885      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
8886	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
8887	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
8888	$ECHO EXPORTS >> $output_objdir/$libname.def~
8889	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
8890	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
8891	emximp -o $lib $output_objdir/$libname.def'
8892      _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
8893	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
8894	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
8895	$ECHO EXPORTS >> $output_objdir/$libname.def~
8896	prefix_cmds="$SED"~
8897	if test EXPORTS = "`$SED 1q $export_symbols`"; then
8898	  prefix_cmds="$prefix_cmds -e 1d";
8899	fi~
8900	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
8901	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
8902	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
8903	emximp -o $lib $output_objdir/$libname.def'
8904      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
8905      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
8906      _LT_TAGVAR(file_list_spec, $1)='@'
8907      ;;
8908
8909    interix[[3-9]]*)
8910      _LT_TAGVAR(hardcode_direct, $1)=no
8911      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8912      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
8913      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
8914      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
8915      # Instead, shared libraries are loaded at an image base (0x10000000 by
8916      # default) and relocated if they conflict, which is a slow very memory
8917      # consuming and fragmenting process.  To avoid this, we pick a random,
8918      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
8919      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
8920      _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'
8921      _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'
8922      ;;
8923
8924    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
8925      tmp_diet=no
8926      if test linux-dietlibc = "$host_os"; then
8927	case $cc_basename in
8928	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
8929	esac
8930      fi
8931      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
8932	 && test no = "$tmp_diet"
8933      then
8934	tmp_addflag=' $pic_flag'
8935	tmp_sharedflag='-shared'
8936	case $cc_basename,$host_cpu in
8937        pgcc*)				# Portland Group C compiler
8938	  _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'
8939	  tmp_addflag=' $pic_flag'
8940	  ;;
8941	pgf77* | pgf90* | pgf95* | pgfortran*)
8942					# Portland Group f77 and f90 compilers
8943	  _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'
8944	  tmp_addflag=' $pic_flag -Mnomain' ;;
8945	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
8946	  tmp_addflag=' -i_dynamic' ;;
8947	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
8948	  tmp_addflag=' -i_dynamic -nofor_main' ;;
8949	ifc* | ifort*)			# Intel Fortran compiler
8950	  tmp_addflag=' -nofor_main' ;;
8951	lf95*)				# Lahey Fortran 8.1
8952	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
8953	  tmp_sharedflag='--shared' ;;
8954        nagfor*)                        # NAGFOR 5.3
8955          tmp_sharedflag='-Wl,-shared' ;;
8956	xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
8957	  tmp_sharedflag='-qmkshrobj'
8958	  tmp_addflag= ;;
8959	nvcc*)	# Cuda Compiler Driver 2.2
8960	  _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'
8961	  _LT_TAGVAR(compiler_needs_object, $1)=yes
8962	  ;;
8963	esac
8964	case `$CC -V 2>&1 | $SED 5q` in
8965	*Sun\ C*)			# Sun C 5.9
8966	  _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'
8967	  _LT_TAGVAR(compiler_needs_object, $1)=yes
8968	  tmp_sharedflag='-G' ;;
8969	*Sun\ F*)			# Sun Fortran 8.3
8970	  tmp_sharedflag='-G' ;;
8971	esac
8972	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
8973
8974        if test yes = "$supports_anon_versioning"; then
8975          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
8976            cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
8977            echo "local: *; };" >> $output_objdir/$libname.ver~
8978            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
8979        fi
8980
8981	case $cc_basename in
8982	tcc*)
8983	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
8984	  ;;
8985	xlf* | bgf* | bgxlf* | mpixlf*)
8986	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
8987	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
8988	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
8989	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
8990	  if test yes = "$supports_anon_versioning"; then
8991	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
8992              cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
8993              echo "local: *; };" >> $output_objdir/$libname.ver~
8994              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
8995	  fi
8996	  ;;
8997	esac
8998      else
8999        _LT_TAGVAR(ld_shlibs, $1)=no
9000      fi
9001      ;;
9002
9003    netbsd*)
9004      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
9005	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
9006	wlarc=
9007      else
9008	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
9009	_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'
9010      fi
9011      ;;
9012
9013    solaris*)
9014      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
9015	_LT_TAGVAR(ld_shlibs, $1)=no
9016	cat <<_LT_EOF 1>&2
9017
9018*** Warning: The releases 2.8.* of the GNU linker cannot reliably
9019*** create shared libraries on Solaris systems.  Therefore, libtool
9020*** is disabling shared libraries support.  We urge you to upgrade GNU
9021*** binutils to release 2.9.1 or newer.  Another option is to modify
9022*** your PATH or compiler configuration so that the native linker is
9023*** used, and then restart.
9024
9025_LT_EOF
9026      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
9027	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
9028	_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'
9029      else
9030	_LT_TAGVAR(ld_shlibs, $1)=no
9031      fi
9032      ;;
9033
9034    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
9035      case `$LD -v 2>&1` in
9036        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
9037	_LT_TAGVAR(ld_shlibs, $1)=no
9038	cat <<_LT_EOF 1>&2
9039
9040*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
9041*** reliably create shared libraries on SCO systems.  Therefore, libtool
9042*** is disabling shared libraries support.  We urge you to upgrade GNU
9043*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
9044*** your PATH or compiler configuration so that the native linker is
9045*** used, and then restart.
9046
9047_LT_EOF
9048	;;
9049	*)
9050	  # For security reasons, it is highly recommended that you always
9051	  # use absolute paths for naming shared libraries, and exclude the
9052	  # DT_RUNPATH tag from executables and libraries.  But doing so
9053	  # requires that you compile everything twice, which is a pain.
9054	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
9055	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
9056	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
9057	    _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'
9058	  else
9059	    _LT_TAGVAR(ld_shlibs, $1)=no
9060	  fi
9061	;;
9062      esac
9063      ;;
9064
9065    sunos4*)
9066      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
9067      wlarc=
9068      _LT_TAGVAR(hardcode_direct, $1)=yes
9069      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9070      ;;
9071
9072    *)
9073      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
9074	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
9075	_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'
9076      else
9077	_LT_TAGVAR(ld_shlibs, $1)=no
9078      fi
9079      ;;
9080    esac
9081
9082    if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
9083      runpath_var=
9084      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
9085      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
9086      _LT_TAGVAR(whole_archive_flag_spec, $1)=
9087    fi
9088  else
9089    # PORTME fill in a description of your system's linker (not GNU ld)
9090    case $host_os in
9091    aix3*)
9092      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
9093      _LT_TAGVAR(always_export_symbols, $1)=yes
9094      _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'
9095      # Note: this linker hardcodes the directories in LIBPATH if there
9096      # are no directories specified by -L.
9097      _LT_TAGVAR(hardcode_minus_L, $1)=yes
9098      if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
9099	# Neither direct hardcoding nor static linking is supported with a
9100	# broken collect2.
9101	_LT_TAGVAR(hardcode_direct, $1)=unsupported
9102      fi
9103      ;;
9104
9105    aix[[4-9]]*)
9106      if test ia64 = "$host_cpu"; then
9107	# On IA64, the linker does run time linking by default, so we don't
9108	# have to do anything special.
9109	aix_use_runtimelinking=no
9110	exp_sym_flag='-Bexport'
9111	no_entry_flag=
9112      else
9113	# If we're using GNU nm, then we don't want the "-C" option.
9114	# -C means demangle to GNU nm, but means don't demangle to AIX nm.
9115	# Without the "-l" option, or with the "-B" option, AIX nm treats
9116	# weak defined symbols like other global defined symbols, whereas
9117	# GNU nm marks them as "W".
9118	# While the 'weak' keyword is ignored in the Export File, we need
9119	# it in the Import File for the 'aix-soname' feature, so we have
9120	# to replace the "-B" option with "-P" for AIX nm.
9121	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
9122	  _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'
9123	else
9124	  _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'
9125	fi
9126	aix_use_runtimelinking=no
9127
9128	# Test if we are trying to use run time linking or normal
9129	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
9130	# have runtime linking enabled, and use it for executables.
9131	# For shared libraries, we enable/disable runtime linking
9132	# depending on the kind of the shared library created -
9133	# when "with_aix_soname,aix_use_runtimelinking" is:
9134	# "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
9135	# "aix,yes"  lib.so          shared, rtl:yes, for executables
9136	#            lib.a           static archive
9137	# "both,no"  lib.so.V(shr.o) shared, rtl:yes
9138	#            lib.a(lib.so.V) shared, rtl:no,  for executables
9139	# "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
9140	#            lib.a(lib.so.V) shared, rtl:no
9141	# "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
9142	#            lib.a           static archive
9143	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
9144	  for ld_flag in $LDFLAGS; do
9145	  if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
9146	    aix_use_runtimelinking=yes
9147	    break
9148	  fi
9149	  done
9150	  if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
9151	    # With aix-soname=svr4, we create the lib.so.V shared archives only,
9152	    # so we don't have lib.a shared libs to link our executables.
9153	    # We have to force runtime linking in this case.
9154	    aix_use_runtimelinking=yes
9155	    LDFLAGS="$LDFLAGS -Wl,-brtl"
9156	  fi
9157	  ;;
9158	esac
9159
9160	exp_sym_flag='-bexport'
9161	no_entry_flag='-bnoentry'
9162      fi
9163
9164      # When large executables or shared objects are built, AIX ld can
9165      # have problems creating the table of contents.  If linking a library
9166      # or program results in "error TOC overflow" add -mminimal-toc to
9167      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
9168      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
9169
9170      _LT_TAGVAR(archive_cmds, $1)=''
9171      _LT_TAGVAR(hardcode_direct, $1)=yes
9172      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
9173      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
9174      _LT_TAGVAR(link_all_deplibs, $1)=yes
9175      _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
9176      case $with_aix_soname,$aix_use_runtimelinking in
9177      aix,*) ;; # traditional, no import file
9178      svr4,* | *,yes) # use import file
9179	# The Import File defines what to hardcode.
9180	_LT_TAGVAR(hardcode_direct, $1)=no
9181	_LT_TAGVAR(hardcode_direct_absolute, $1)=no
9182	;;
9183      esac
9184
9185      if test yes = "$GCC"; then
9186	case $host_os in aix4.[[012]]|aix4.[[012]].*)
9187	# We only want to do this on AIX 4.2 and lower, the check
9188	# below for broken collect2 doesn't work under 4.3+
9189	  collect2name=`$CC -print-prog-name=collect2`
9190	  if test -f "$collect2name" &&
9191	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
9192	  then
9193	  # We have reworked collect2
9194	  :
9195	  else
9196	  # We have old collect2
9197	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
9198	  # It fails to find uninstalled libraries when the uninstalled
9199	  # path is not listed in the libpath.  Setting hardcode_minus_L
9200	  # to unsupported forces relinking
9201	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
9202	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
9203	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
9204	  fi
9205	  ;;
9206	esac
9207	shared_flag='-shared'
9208	if test yes = "$aix_use_runtimelinking"; then
9209	  shared_flag="$shared_flag "'$wl-G'
9210	fi
9211	# Need to ensure runtime linking is disabled for the traditional
9212	# shared library, or the linker may eventually find shared libraries
9213	# /with/ Import File - we do not want to mix them.
9214	shared_flag_aix='-shared'
9215	shared_flag_svr4='-shared $wl-G'
9216      else
9217	# not using gcc
9218	if test ia64 = "$host_cpu"; then
9219	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
9220	# chokes on -Wl,-G. The following line is correct:
9221	  shared_flag='-G'
9222	else
9223	  if test yes = "$aix_use_runtimelinking"; then
9224	    shared_flag='$wl-G'
9225	  else
9226	    shared_flag='$wl-bM:SRE'
9227	  fi
9228	  shared_flag_aix='$wl-bM:SRE'
9229	  shared_flag_svr4='$wl-G'
9230	fi
9231      fi
9232
9233      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
9234      # It seems that -bexpall does not export symbols beginning with
9235      # underscore (_), so it is better to generate a list of symbols to export.
9236      _LT_TAGVAR(always_export_symbols, $1)=yes
9237      if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
9238	# Warning - without using the other runtime loading flags (-brtl),
9239	# -berok will link without error, but may produce a broken library.
9240	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
9241        # Determine the default libpath from the value encoded in an
9242        # empty executable.
9243        _LT_SYS_MODULE_PATH_AIX([$1])
9244        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
9245        _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
9246      else
9247	if test ia64 = "$host_cpu"; then
9248	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
9249	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
9250	  _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"
9251	else
9252	 # Determine the default libpath from the value encoded in an
9253	 # empty executable.
9254	 _LT_SYS_MODULE_PATH_AIX([$1])
9255	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
9256	  # Warning - without using the other run time loading flags,
9257	  # -berok will link without error, but may produce a broken library.
9258	  _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
9259	  _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
9260	  if test yes = "$with_gnu_ld"; then
9261	    # We only use this code for GNU lds that support --whole-archive.
9262	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
9263	  else
9264	    # Exported symbols can be pulled into shared objects from archives
9265	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
9266	  fi
9267	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
9268	  _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
9269	  # -brtl affects multiple linker settings, -berok does not and is overridden later
9270	  compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
9271	  if test svr4 != "$with_aix_soname"; then
9272	    # This is similar to how AIX traditionally builds its shared libraries.
9273	    _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'
9274	  fi
9275	  if test aix != "$with_aix_soname"; then
9276	    _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'
9277	  else
9278	    # used by -dlpreopen to get the symbols
9279	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
9280	  fi
9281	  _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
9282	fi
9283      fi
9284      ;;
9285
9286    amigaos*)
9287      case $host_cpu in
9288      powerpc)
9289            # see comment about AmigaOS4 .so support
9290            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
9291            _LT_TAGVAR(archive_expsym_cmds, $1)=''
9292        ;;
9293      m68k)
9294            _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)'
9295            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
9296            _LT_TAGVAR(hardcode_minus_L, $1)=yes
9297        ;;
9298      esac
9299      ;;
9300
9301    bsdi[[45]]*)
9302      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
9303      ;;
9304
9305    cygwin* | mingw* | pw32* | cegcc*)
9306      # When not using gcc, we currently assume that we are using
9307      # Microsoft Visual C++ or Intel C++ Compiler.
9308      # hardcode_libdir_flag_spec is actually meaningless, as there is
9309      # no search path for DLLs.
9310      case $cc_basename in
9311      cl* | icl*)
9312	# Native MSVC or ICC
9313	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
9314	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
9315	_LT_TAGVAR(always_export_symbols, $1)=yes
9316	_LT_TAGVAR(file_list_spec, $1)='@'
9317	# Tell ltmain to make .lib files, not .a files.
9318	libext=lib
9319	# Tell ltmain to make .dll files, not .so files.
9320	shrext_cmds=.dll
9321	# FIXME: Setting linknames here is a bad hack.
9322	_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
9323	_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
9324            cp "$export_symbols" "$output_objdir/$soname.def";
9325            echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
9326          else
9327            $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
9328          fi~
9329          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
9330          linknames='
9331	# The linker will not automatically build a static lib if we build a DLL.
9332	# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
9333	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
9334	_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
9335	_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'
9336	# Don't use ranlib
9337	_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
9338	_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
9339          lt_tool_outputfile="@TOOL_OUTPUT@"~
9340          case $lt_outputfile in
9341            *.exe|*.EXE) ;;
9342            *)
9343              lt_outputfile=$lt_outputfile.exe
9344              lt_tool_outputfile=$lt_tool_outputfile.exe
9345              ;;
9346          esac~
9347          if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
9348            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
9349            $RM "$lt_outputfile.manifest";
9350          fi'
9351	;;
9352      *)
9353	# Assume MSVC and ICC wrapper
9354	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
9355	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
9356	# Tell ltmain to make .lib files, not .a files.
9357	libext=lib
9358	# Tell ltmain to make .dll files, not .so files.
9359	shrext_cmds=.dll
9360	# FIXME: Setting linknames here is a bad hack.
9361	_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
9362	# The linker will automatically build a .lib file if we build a DLL.
9363	_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
9364	# FIXME: Should let the user specify the lib program.
9365	_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
9366	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
9367	;;
9368      esac
9369      ;;
9370
9371    darwin* | rhapsody*)
9372      _LT_DARWIN_LINKER_FEATURES($1)
9373      ;;
9374
9375    dgux*)
9376      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9377      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
9378      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9379      ;;
9380
9381    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
9382    # support.  Future versions do this automatically, but an explicit c++rt0.o
9383    # does not break anything, and helps significantly (at the cost of a little
9384    # extra space).
9385    freebsd2.2*)
9386      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
9387      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
9388      _LT_TAGVAR(hardcode_direct, $1)=yes
9389      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9390      ;;
9391
9392    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
9393    freebsd2.*)
9394      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
9395      _LT_TAGVAR(hardcode_direct, $1)=yes
9396      _LT_TAGVAR(hardcode_minus_L, $1)=yes
9397      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9398      ;;
9399
9400    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
9401    freebsd* | dragonfly* | midnightbsd*)
9402      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
9403      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
9404      _LT_TAGVAR(hardcode_direct, $1)=yes
9405      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9406      ;;
9407
9408    hpux9*)
9409      if test yes = "$GCC"; then
9410	_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'
9411      else
9412	_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'
9413      fi
9414      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
9415      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
9416      _LT_TAGVAR(hardcode_direct, $1)=yes
9417
9418      # hardcode_minus_L: Not really in the search PATH,
9419      # but as the default location of the library.
9420      _LT_TAGVAR(hardcode_minus_L, $1)=yes
9421      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
9422      ;;
9423
9424    hpux10*)
9425      if test yes,no = "$GCC,$with_gnu_ld"; then
9426	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
9427      else
9428	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
9429      fi
9430      if test no = "$with_gnu_ld"; then
9431	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
9432	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
9433	_LT_TAGVAR(hardcode_direct, $1)=yes
9434	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
9435	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
9436	# hardcode_minus_L: Not really in the search PATH,
9437	# but as the default location of the library.
9438	_LT_TAGVAR(hardcode_minus_L, $1)=yes
9439      fi
9440      ;;
9441
9442    hpux11*)
9443      if test yes,no = "$GCC,$with_gnu_ld"; then
9444	case $host_cpu in
9445	hppa*64*)
9446	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
9447	  ;;
9448	ia64*)
9449	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
9450	  ;;
9451	*)
9452	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
9453	  ;;
9454	esac
9455      else
9456	case $host_cpu in
9457	hppa*64*)
9458	  _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
9459	  ;;
9460	ia64*)
9461	  _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
9462	  ;;
9463	*)
9464	m4_if($1, [], [
9465	  # Older versions of the 11.00 compiler do not understand -b yet
9466	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
9467	  _LT_LINKER_OPTION([if $CC understands -b],
9468	    _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
9469	    [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
9470	    [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
9471	  [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
9472	  ;;
9473	esac
9474      fi
9475      if test no = "$with_gnu_ld"; then
9476	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
9477	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
9478
9479	case $host_cpu in
9480	hppa*64*|ia64*)
9481	  _LT_TAGVAR(hardcode_direct, $1)=no
9482	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9483	  ;;
9484	*)
9485	  _LT_TAGVAR(hardcode_direct, $1)=yes
9486	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
9487	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
9488
9489	  # hardcode_minus_L: Not really in the search PATH,
9490	  # but as the default location of the library.
9491	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
9492	  ;;
9493	esac
9494      fi
9495      ;;
9496
9497    irix5* | irix6* | nonstopux*)
9498      if test yes = "$GCC"; then
9499	_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'
9500	# Try to use the -exported_symbol ld option, if it does not
9501	# work, assume that -exports_file does not work either and
9502	# implicitly export all symbols.
9503	# This should be the same for all languages, so no per-tag cache variable.
9504	AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
9505	  [lt_cv_irix_exported_symbol],
9506	  [save_LDFLAGS=$LDFLAGS
9507	   LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
9508	   AC_LINK_IFELSE(
9509	     [AC_LANG_SOURCE(
9510	        [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
9511			      [C++], [[int foo (void) { return 0; }]],
9512			      [Fortran 77], [[
9513      subroutine foo
9514      end]],
9515			      [Fortran], [[
9516      subroutine foo
9517      end]])])],
9518	      [lt_cv_irix_exported_symbol=yes],
9519	      [lt_cv_irix_exported_symbol=no])
9520           LDFLAGS=$save_LDFLAGS])
9521	if test yes = "$lt_cv_irix_exported_symbol"; then
9522          _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'
9523	fi
9524      else
9525	_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'
9526	_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'
9527      fi
9528      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
9529      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
9530      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
9531      _LT_TAGVAR(inherit_rpath, $1)=yes
9532      _LT_TAGVAR(link_all_deplibs, $1)=yes
9533      ;;
9534
9535    linux*)
9536      case $cc_basename in
9537      tcc*)
9538	# Fabrice Bellard et al's Tiny C Compiler
9539	_LT_TAGVAR(ld_shlibs, $1)=yes
9540	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
9541	;;
9542      esac
9543      ;;
9544
9545    netbsd*)
9546      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
9547	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
9548      else
9549	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
9550      fi
9551      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
9552      _LT_TAGVAR(hardcode_direct, $1)=yes
9553      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9554      ;;
9555
9556    newsos6)
9557      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9558      _LT_TAGVAR(hardcode_direct, $1)=yes
9559      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
9560      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
9561      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9562      ;;
9563
9564    *nto* | *qnx*)
9565      ;;
9566
9567    openbsd* | bitrig*)
9568      if test -f /usr/libexec/ld.so; then
9569	_LT_TAGVAR(hardcode_direct, $1)=yes
9570	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9571	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
9572	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
9573	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
9574	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
9575	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
9576	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
9577	else
9578	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
9579	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
9580	fi
9581      else
9582	_LT_TAGVAR(ld_shlibs, $1)=no
9583      fi
9584      ;;
9585
9586    os2*)
9587      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
9588      _LT_TAGVAR(hardcode_minus_L, $1)=yes
9589      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
9590      shrext_cmds=.dll
9591      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
9592	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
9593	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
9594	$ECHO EXPORTS >> $output_objdir/$libname.def~
9595	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
9596	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
9597	emximp -o $lib $output_objdir/$libname.def'
9598      _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
9599	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
9600	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
9601	$ECHO EXPORTS >> $output_objdir/$libname.def~
9602	prefix_cmds="$SED"~
9603	if test EXPORTS = "`$SED 1q $export_symbols`"; then
9604	  prefix_cmds="$prefix_cmds -e 1d";
9605	fi~
9606	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
9607	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
9608	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
9609	emximp -o $lib $output_objdir/$libname.def'
9610      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
9611      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
9612      _LT_TAGVAR(file_list_spec, $1)='@'
9613      ;;
9614
9615    osf3*)
9616      if test yes = "$GCC"; then
9617	_LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
9618	_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'
9619      else
9620	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
9621	_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'
9622      fi
9623      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
9624      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
9625      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
9626      ;;
9627
9628    osf4* | osf5*)	# as osf3* with the addition of -msym flag
9629      if test yes = "$GCC"; then
9630	_LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
9631	_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'
9632	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
9633      else
9634	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
9635	_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'
9636	_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~
9637          $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'
9638
9639	# Both c and cxx compiler support -rpath directly
9640	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
9641      fi
9642      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
9643      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
9644      ;;
9645
9646    solaris*)
9647      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
9648      if test yes = "$GCC"; then
9649	wlarc='$wl'
9650	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
9651	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
9652          $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'
9653      else
9654	case `$CC -V 2>&1` in
9655	*"Compilers 5.0"*)
9656	  wlarc=''
9657	  _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
9658	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
9659            $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
9660	  ;;
9661	*)
9662	  wlarc='$wl'
9663	  _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
9664	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
9665            $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
9666	  ;;
9667	esac
9668      fi
9669      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
9670      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9671      case $host_os in
9672      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
9673      *)
9674	# The compiler driver will combine and reorder linker options,
9675	# but understands '-z linker_flag'.  GCC discards it without '$wl',
9676	# but is careful enough not to reorder.
9677	# Supported since Solaris 2.6 (maybe 2.5.1?)
9678	if test yes = "$GCC"; then
9679	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
9680	else
9681	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
9682	fi
9683	;;
9684      esac
9685      _LT_TAGVAR(link_all_deplibs, $1)=yes
9686      ;;
9687
9688    sunos4*)
9689      if test sequent = "$host_vendor"; then
9690	# Use $CC to link under sequent, because it throws in some extra .o
9691	# files that make .init and .fini sections work.
9692	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
9693      else
9694	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
9695      fi
9696      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
9697      _LT_TAGVAR(hardcode_direct, $1)=yes
9698      _LT_TAGVAR(hardcode_minus_L, $1)=yes
9699      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9700      ;;
9701
9702    sysv4)
9703      case $host_vendor in
9704	sni)
9705	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9706	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
9707	;;
9708	siemens)
9709	  ## LD is ld it makes a PLAMLIB
9710	  ## CC just makes a GrossModule.
9711	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
9712	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
9713	  _LT_TAGVAR(hardcode_direct, $1)=no
9714        ;;
9715	motorola)
9716	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9717	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
9718	;;
9719      esac
9720      runpath_var='LD_RUN_PATH'
9721      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9722      ;;
9723
9724    sysv4.3*)
9725      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9726      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9727      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
9728      ;;
9729
9730    sysv4*MP*)
9731      if test -d /usr/nec; then
9732	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9733	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9734	runpath_var=LD_RUN_PATH
9735	hardcode_runpath_var=yes
9736	_LT_TAGVAR(ld_shlibs, $1)=yes
9737      fi
9738      ;;
9739
9740    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
9741      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
9742      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
9743      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9744      runpath_var='LD_RUN_PATH'
9745
9746      if test yes = "$GCC"; then
9747	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9748	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9749      else
9750	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9751	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9752      fi
9753      ;;
9754
9755    sysv5* | sco3.2v5* | sco5v6*)
9756      # Note: We CANNOT use -z defs as we might desire, because we do not
9757      # link with -lc, and that would cause any symbols used from libc to
9758      # always be unresolved, which means just about no library would
9759      # ever link correctly.  If we're not using GNU ld we use -z text
9760      # though, which does catch some bad symbols but isn't as heavy-handed
9761      # as -z defs.
9762      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
9763      _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
9764      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
9765      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9766      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
9767      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
9768      _LT_TAGVAR(link_all_deplibs, $1)=yes
9769      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
9770      runpath_var='LD_RUN_PATH'
9771
9772      if test yes = "$GCC"; then
9773	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9774	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9775      else
9776	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9777	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9778      fi
9779      ;;
9780
9781    uts4*)
9782      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9783      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
9784      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9785      ;;
9786
9787    *)
9788      _LT_TAGVAR(ld_shlibs, $1)=no
9789      ;;
9790    esac
9791
9792    if test sni = "$host_vendor"; then
9793      case $host in
9794      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
9795	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
9796	;;
9797      esac
9798    fi
9799  fi
9800])
9801AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
9802test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
9803
9804_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
9805
9806_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
9807_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
9808_LT_DECL([], [extract_expsyms_cmds], [2],
9809    [The commands to extract the exported symbol list from a shared archive])
9810
9811#
9812# Do we need to explicitly link libc?
9813#
9814case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
9815x|xyes)
9816  # Assume -lc should be added
9817  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
9818
9819  if test yes,yes = "$GCC,$enable_shared"; then
9820    case $_LT_TAGVAR(archive_cmds, $1) in
9821    *'~'*)
9822      # FIXME: we may have to deal with multi-command sequences.
9823      ;;
9824    '$CC '*)
9825      # Test whether the compiler implicitly links with -lc since on some
9826      # systems, -lgcc has to come before -lc. If gcc already passes -lc
9827      # to ld, don't add -lc before -lgcc.
9828      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
9829	[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
9830	[$RM conftest*
9831	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
9832
9833	if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
9834	  soname=conftest
9835	  lib=conftest
9836	  libobjs=conftest.$ac_objext
9837	  deplibs=
9838	  wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
9839	  pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
9840	  compiler_flags=-v
9841	  linker_flags=-v
9842	  verstring=
9843	  output_objdir=.
9844	  libname=conftest
9845	  lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
9846	  _LT_TAGVAR(allow_undefined_flag, $1)=
9847	  if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
9848	  then
9849	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
9850	  else
9851	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
9852	  fi
9853	  _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
9854	else
9855	  cat conftest.err 1>&5
9856	fi
9857	$RM conftest*
9858	])
9859      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
9860      ;;
9861    esac
9862  fi
9863  ;;
9864esac
9865
9866_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
9867    [Whether or not to add -lc for building shared libraries])
9868_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
9869    [enable_shared_with_static_runtimes], [0],
9870    [Whether or not to disallow shared libs when runtime libs are static])
9871_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
9872    [Compiler flag to allow reflexive dlopens])
9873_LT_TAGDECL([], [whole_archive_flag_spec], [1],
9874    [Compiler flag to generate shared objects directly from archives])
9875_LT_TAGDECL([], [compiler_needs_object], [1],
9876    [Whether the compiler copes with passing no objects directly])
9877_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
9878    [Create an old-style archive from a shared archive])
9879_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
9880    [Create a temporary old-style archive to link instead of a shared archive])
9881_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
9882_LT_TAGDECL([], [archive_expsym_cmds], [2])
9883_LT_TAGDECL([], [module_cmds], [2],
9884    [Commands used to build a loadable module if different from building
9885    a shared archive.])
9886_LT_TAGDECL([], [module_expsym_cmds], [2])
9887_LT_TAGDECL([], [with_gnu_ld], [1],
9888    [Whether we are building with GNU ld or not])
9889_LT_TAGDECL([], [allow_undefined_flag], [1],
9890    [Flag that allows shared libraries with undefined symbols to be built])
9891_LT_TAGDECL([], [no_undefined_flag], [1],
9892    [Flag that enforces no undefined symbols])
9893_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
9894    [Flag to hardcode $libdir into a binary during linking.
9895    This must work even if $libdir does not exist])
9896_LT_TAGDECL([], [hardcode_libdir_separator], [1],
9897    [Whether we need a single "-rpath" flag with a separated argument])
9898_LT_TAGDECL([], [hardcode_direct], [0],
9899    [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
9900    DIR into the resulting binary])
9901_LT_TAGDECL([], [hardcode_direct_absolute], [0],
9902    [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
9903    DIR into the resulting binary and the resulting library dependency is
9904    "absolute", i.e impossible to change by setting $shlibpath_var if the
9905    library is relocated])
9906_LT_TAGDECL([], [hardcode_minus_L], [0],
9907    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
9908    into the resulting binary])
9909_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
9910    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
9911    into the resulting binary])
9912_LT_TAGDECL([], [hardcode_automatic], [0],
9913    [Set to "yes" if building a shared library automatically hardcodes DIR
9914    into the library and all subsequent libraries and executables linked
9915    against it])
9916_LT_TAGDECL([], [inherit_rpath], [0],
9917    [Set to yes if linker adds runtime paths of dependent libraries
9918    to runtime path list])
9919_LT_TAGDECL([], [link_all_deplibs], [0],
9920    [Whether libtool must link a program against all its dependency libraries])
9921_LT_TAGDECL([], [always_export_symbols], [0],
9922    [Set to "yes" if exported symbols are required])
9923_LT_TAGDECL([], [export_symbols_cmds], [2],
9924    [The commands to list exported symbols])
9925_LT_TAGDECL([], [exclude_expsyms], [1],
9926    [Symbols that should not be listed in the preloaded symbols])
9927_LT_TAGDECL([], [include_expsyms], [1],
9928    [Symbols that must always be exported])
9929_LT_TAGDECL([], [prelink_cmds], [2],
9930    [Commands necessary for linking programs (against libraries) with templates])
9931_LT_TAGDECL([], [postlink_cmds], [2],
9932    [Commands necessary for finishing linking programs])
9933_LT_TAGDECL([], [file_list_spec], [1],
9934    [Specify filename containing input files])
9935dnl FIXME: Not yet implemented
9936dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
9937dnl    [Compiler flag to generate thread safe objects])
9938])# _LT_LINKER_SHLIBS
9939
9940
9941# _LT_LANG_C_CONFIG([TAG])
9942# ------------------------
9943# Ensure that the configuration variables for a C compiler are suitably
9944# defined.  These variables are subsequently used by _LT_CONFIG to write
9945# the compiler configuration to 'libtool'.
9946m4_defun([_LT_LANG_C_CONFIG],
9947[m4_require([_LT_DECL_EGREP])dnl
9948lt_save_CC=$CC
9949AC_LANG_PUSH(C)
9950
9951# Source file extension for C test sources.
9952ac_ext=c
9953
9954# Object file extension for compiled C test sources.
9955objext=o
9956_LT_TAGVAR(objext, $1)=$objext
9957
9958# Code to be used in simple compile tests
9959lt_simple_compile_test_code="int some_variable = 0;"
9960
9961# Code to be used in simple link tests
9962lt_simple_link_test_code='int main(){return(0);}'
9963
9964_LT_TAG_COMPILER
9965# Save the default compiler, since it gets overwritten when the other
9966# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
9967compiler_DEFAULT=$CC
9968
9969# save warnings/boilerplate of simple test code
9970_LT_COMPILER_BOILERPLATE
9971_LT_LINKER_BOILERPLATE
9972
9973if test -n "$compiler"; then
9974  _LT_COMPILER_NO_RTTI($1)
9975  _LT_COMPILER_PIC($1)
9976  _LT_COMPILER_C_O($1)
9977  _LT_COMPILER_FILE_LOCKS($1)
9978  _LT_LINKER_SHLIBS($1)
9979  _LT_SYS_DYNAMIC_LINKER($1)
9980  _LT_LINKER_HARDCODE_LIBPATH($1)
9981  LT_SYS_DLOPEN_SELF
9982  _LT_CMD_STRIPLIB
9983
9984  # Report what library types will actually be built
9985  AC_MSG_CHECKING([if libtool supports shared libraries])
9986  AC_MSG_RESULT([$can_build_shared])
9987
9988  AC_MSG_CHECKING([whether to build shared libraries])
9989  test no = "$can_build_shared" && enable_shared=no
9990
9991  # On AIX, shared libraries and static libraries use the same namespace, and
9992  # are all built from PIC.
9993  case $host_os in
9994  aix3*)
9995    test yes = "$enable_shared" && enable_static=no
9996    if test -n "$RANLIB"; then
9997      archive_cmds="$archive_cmds~\$RANLIB \$lib"
9998      postinstall_cmds='$RANLIB $lib'
9999    fi
10000    ;;
10001
10002  aix[[4-9]]*)
10003    if test ia64 != "$host_cpu"; then
10004      case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
10005      yes,aix,yes) ;;			# shared object as lib.so file only
10006      yes,svr4,*) ;;			# shared object as lib.so archive member only
10007      yes,*) enable_static=no ;;	# shared object in lib.a archive as well
10008      esac
10009    fi
10010    ;;
10011  esac
10012  AC_MSG_RESULT([$enable_shared])
10013
10014  AC_MSG_CHECKING([whether to build static libraries])
10015  # Make sure either enable_shared or enable_static is yes.
10016  test yes = "$enable_shared" || enable_static=yes
10017  AC_MSG_RESULT([$enable_static])
10018
10019  _LT_CONFIG($1)
10020fi
10021AC_LANG_POP
10022CC=$lt_save_CC
10023])# _LT_LANG_C_CONFIG
10024
10025
10026# _LT_LANG_CXX_CONFIG([TAG])
10027# --------------------------
10028# Ensure that the configuration variables for a C++ compiler are suitably
10029# defined.  These variables are subsequently used by _LT_CONFIG to write
10030# the compiler configuration to 'libtool'.
10031m4_defun([_LT_LANG_CXX_CONFIG],
10032[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
10033m4_require([_LT_DECL_EGREP])dnl
10034m4_require([_LT_PATH_MANIFEST_TOOL])dnl
10035if test -n "$CXX" && ( test no != "$CXX" &&
10036    ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
10037    (test g++ != "$CXX"))); then
10038  AC_PROG_CXXCPP
10039else
10040  _lt_caught_CXX_error=yes
10041fi
10042
10043AC_LANG_PUSH(C++)
10044_LT_TAGVAR(archive_cmds_need_lc, $1)=no
10045_LT_TAGVAR(allow_undefined_flag, $1)=
10046_LT_TAGVAR(always_export_symbols, $1)=no
10047_LT_TAGVAR(archive_expsym_cmds, $1)=
10048_LT_TAGVAR(compiler_needs_object, $1)=no
10049_LT_TAGVAR(export_dynamic_flag_spec, $1)=
10050_LT_TAGVAR(hardcode_direct, $1)=no
10051_LT_TAGVAR(hardcode_direct_absolute, $1)=no
10052_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
10053_LT_TAGVAR(hardcode_libdir_separator, $1)=
10054_LT_TAGVAR(hardcode_minus_L, $1)=no
10055_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
10056_LT_TAGVAR(hardcode_automatic, $1)=no
10057_LT_TAGVAR(inherit_rpath, $1)=no
10058_LT_TAGVAR(module_cmds, $1)=
10059_LT_TAGVAR(module_expsym_cmds, $1)=
10060_LT_TAGVAR(link_all_deplibs, $1)=unknown
10061_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
10062_LT_TAGVAR(reload_flag, $1)=$reload_flag
10063_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
10064_LT_TAGVAR(no_undefined_flag, $1)=
10065_LT_TAGVAR(whole_archive_flag_spec, $1)=
10066_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
10067
10068# Source file extension for C++ test sources.
10069ac_ext=cpp
10070
10071# Object file extension for compiled C++ test sources.
10072objext=o
10073_LT_TAGVAR(objext, $1)=$objext
10074
10075# No sense in running all these tests if we already determined that
10076# the CXX compiler isn't working.  Some variables (like enable_shared)
10077# are currently assumed to apply to all compilers on this platform,
10078# and will be corrupted by setting them based on a non-working compiler.
10079if test yes != "$_lt_caught_CXX_error"; then
10080  # Code to be used in simple compile tests
10081  lt_simple_compile_test_code="int some_variable = 0;"
10082
10083  # Code to be used in simple link tests
10084  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
10085
10086  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
10087  _LT_TAG_COMPILER
10088
10089  # save warnings/boilerplate of simple test code
10090  _LT_COMPILER_BOILERPLATE
10091  _LT_LINKER_BOILERPLATE
10092
10093  # Allow CC to be a program name with arguments.
10094  lt_save_CC=$CC
10095  lt_save_CFLAGS=$CFLAGS
10096  lt_save_LD=$LD
10097  lt_save_GCC=$GCC
10098  GCC=$GXX
10099  lt_save_with_gnu_ld=$with_gnu_ld
10100  lt_save_path_LD=$lt_cv_path_LD
10101  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
10102    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
10103  else
10104    $as_unset lt_cv_prog_gnu_ld
10105  fi
10106  if test -n "${lt_cv_path_LDCXX+set}"; then
10107    lt_cv_path_LD=$lt_cv_path_LDCXX
10108  else
10109    $as_unset lt_cv_path_LD
10110  fi
10111  test -z "${LDCXX+set}" || LD=$LDCXX
10112  CC=${CXX-"c++"}
10113  CFLAGS=$CXXFLAGS
10114  compiler=$CC
10115  _LT_TAGVAR(compiler, $1)=$CC
10116  _LT_CC_BASENAME([$compiler])
10117
10118  if test -n "$compiler"; then
10119    # We don't want -fno-exception when compiling C++ code, so set the
10120    # no_builtin_flag separately
10121    if test yes = "$GXX"; then
10122      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
10123    else
10124      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
10125    fi
10126
10127    if test yes = "$GXX"; then
10128      # Set up default GNU C++ configuration
10129
10130      LT_PATH_LD
10131
10132      # Check if GNU C++ uses GNU ld as the underlying linker, since the
10133      # archiving commands below assume that GNU ld is being used.
10134      if test yes = "$with_gnu_ld"; then
10135        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
10136        _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'
10137
10138        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
10139        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
10140
10141        # If archive_cmds runs LD, not CC, wlarc should be empty
10142        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
10143        #     investigate it a little bit more. (MM)
10144        wlarc='$wl'
10145
10146        # ancient GNU ld didn't support --whole-archive et. al.
10147        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
10148	  $GREP 'no-whole-archive' > /dev/null; then
10149          _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
10150        else
10151          _LT_TAGVAR(whole_archive_flag_spec, $1)=
10152        fi
10153      else
10154        with_gnu_ld=no
10155        wlarc=
10156
10157        # A generic and very simple default shared library creation
10158        # command for GNU C++ for the case where it uses the native
10159        # linker, instead of GNU ld.  If possible, this setting should
10160        # overridden to take advantage of the native linker features on
10161        # the platform it is being used on.
10162        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
10163      fi
10164
10165      # Commands to make compiler produce verbose output that lists
10166      # what "hidden" libraries, object files and flags are used when
10167      # linking a shared library.
10168      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
10169
10170    else
10171      GXX=no
10172      with_gnu_ld=no
10173      wlarc=
10174    fi
10175
10176    # PORTME: fill in a description of your system's C++ link characteristics
10177    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
10178    _LT_TAGVAR(ld_shlibs, $1)=yes
10179    case $host_os in
10180      aix3*)
10181        # FIXME: insert proper C++ library support
10182        _LT_TAGVAR(ld_shlibs, $1)=no
10183        ;;
10184      aix[[4-9]]*)
10185        if test ia64 = "$host_cpu"; then
10186          # On IA64, the linker does run time linking by default, so we don't
10187          # have to do anything special.
10188          aix_use_runtimelinking=no
10189          exp_sym_flag='-Bexport'
10190          no_entry_flag=
10191        else
10192          aix_use_runtimelinking=no
10193
10194          # Test if we are trying to use run time linking or normal
10195          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
10196          # have runtime linking enabled, and use it for executables.
10197          # For shared libraries, we enable/disable runtime linking
10198          # depending on the kind of the shared library created -
10199          # when "with_aix_soname,aix_use_runtimelinking" is:
10200          # "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
10201          # "aix,yes"  lib.so          shared, rtl:yes, for executables
10202          #            lib.a           static archive
10203          # "both,no"  lib.so.V(shr.o) shared, rtl:yes
10204          #            lib.a(lib.so.V) shared, rtl:no,  for executables
10205          # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
10206          #            lib.a(lib.so.V) shared, rtl:no
10207          # "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
10208          #            lib.a           static archive
10209          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
10210	    for ld_flag in $LDFLAGS; do
10211	      case $ld_flag in
10212	      *-brtl*)
10213	        aix_use_runtimelinking=yes
10214	        break
10215	        ;;
10216	      esac
10217	    done
10218	    if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
10219	      # With aix-soname=svr4, we create the lib.so.V shared archives only,
10220	      # so we don't have lib.a shared libs to link our executables.
10221	      # We have to force runtime linking in this case.
10222	      aix_use_runtimelinking=yes
10223	      LDFLAGS="$LDFLAGS -Wl,-brtl"
10224	    fi
10225	    ;;
10226          esac
10227
10228          exp_sym_flag='-bexport'
10229          no_entry_flag='-bnoentry'
10230        fi
10231
10232        # When large executables or shared objects are built, AIX ld can
10233        # have problems creating the table of contents.  If linking a library
10234        # or program results in "error TOC overflow" add -mminimal-toc to
10235        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
10236        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
10237
10238        _LT_TAGVAR(archive_cmds, $1)=''
10239        _LT_TAGVAR(hardcode_direct, $1)=yes
10240        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
10241        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
10242        _LT_TAGVAR(link_all_deplibs, $1)=yes
10243        _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
10244        case $with_aix_soname,$aix_use_runtimelinking in
10245        aix,*) ;;	# no import file
10246        svr4,* | *,yes) # use import file
10247          # The Import File defines what to hardcode.
10248          _LT_TAGVAR(hardcode_direct, $1)=no
10249          _LT_TAGVAR(hardcode_direct_absolute, $1)=no
10250          ;;
10251        esac
10252
10253        if test yes = "$GXX"; then
10254          case $host_os in aix4.[[012]]|aix4.[[012]].*)
10255          # We only want to do this on AIX 4.2 and lower, the check
10256          # below for broken collect2 doesn't work under 4.3+
10257	  collect2name=`$CC -print-prog-name=collect2`
10258	  if test -f "$collect2name" &&
10259	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
10260	  then
10261	    # We have reworked collect2
10262	    :
10263	  else
10264	    # We have old collect2
10265	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
10266	    # It fails to find uninstalled libraries when the uninstalled
10267	    # path is not listed in the libpath.  Setting hardcode_minus_L
10268	    # to unsupported forces relinking
10269	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
10270	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10271	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
10272	  fi
10273          esac
10274          shared_flag='-shared'
10275	  if test yes = "$aix_use_runtimelinking"; then
10276	    shared_flag=$shared_flag' $wl-G'
10277	  fi
10278	  # Need to ensure runtime linking is disabled for the traditional
10279	  # shared library, or the linker may eventually find shared libraries
10280	  # /with/ Import File - we do not want to mix them.
10281	  shared_flag_aix='-shared'
10282	  shared_flag_svr4='-shared $wl-G'
10283        else
10284          # not using gcc
10285          if test ia64 = "$host_cpu"; then
10286	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
10287	  # chokes on -Wl,-G. The following line is correct:
10288	  shared_flag='-G'
10289          else
10290	    if test yes = "$aix_use_runtimelinking"; then
10291	      shared_flag='$wl-G'
10292	    else
10293	      shared_flag='$wl-bM:SRE'
10294	    fi
10295	    shared_flag_aix='$wl-bM:SRE'
10296	    shared_flag_svr4='$wl-G'
10297          fi
10298        fi
10299
10300        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
10301        # It seems that -bexpall does not export symbols beginning with
10302        # underscore (_), so it is better to generate a list of symbols to
10303	# export.
10304        _LT_TAGVAR(always_export_symbols, $1)=yes
10305	if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
10306          # Warning - without using the other runtime loading flags (-brtl),
10307          # -berok will link without error, but may produce a broken library.
10308          # The "-G" linker flag allows undefined symbols.
10309          _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
10310          # Determine the default libpath from the value encoded in an empty
10311          # executable.
10312          _LT_SYS_MODULE_PATH_AIX([$1])
10313          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
10314
10315          _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
10316        else
10317          if test ia64 = "$host_cpu"; then
10318	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
10319	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
10320	    _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"
10321          else
10322	    # Determine the default libpath from the value encoded in an
10323	    # empty executable.
10324	    _LT_SYS_MODULE_PATH_AIX([$1])
10325	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
10326	    # Warning - without using the other run time loading flags,
10327	    # -berok will link without error, but may produce a broken library.
10328	    _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
10329	    _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
10330	    if test yes = "$with_gnu_ld"; then
10331	      # We only use this code for GNU lds that support --whole-archive.
10332	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
10333	    else
10334	      # Exported symbols can be pulled into shared objects from archives
10335	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
10336	    fi
10337	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
10338	    _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
10339	    # -brtl affects multiple linker settings, -berok does not and is overridden later
10340	    compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
10341	    if test svr4 != "$with_aix_soname"; then
10342	      # This is similar to how AIX traditionally builds its shared
10343	      # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
10344	      _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'
10345	    fi
10346	    if test aix != "$with_aix_soname"; then
10347	      _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'
10348	    else
10349	      # used by -dlpreopen to get the symbols
10350	      _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
10351	    fi
10352	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
10353          fi
10354        fi
10355        ;;
10356
10357      beos*)
10358	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
10359	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
10360	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
10361	  # support --undefined.  This deserves some investigation.  FIXME
10362	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
10363	else
10364	  _LT_TAGVAR(ld_shlibs, $1)=no
10365	fi
10366	;;
10367
10368      chorus*)
10369        case $cc_basename in
10370          *)
10371	  # FIXME: insert proper C++ library support
10372	  _LT_TAGVAR(ld_shlibs, $1)=no
10373	  ;;
10374        esac
10375        ;;
10376
10377      cygwin* | mingw* | pw32* | cegcc*)
10378	case $GXX,$cc_basename in
10379	,cl* | no,cl* | ,icl* | no,icl*)
10380	  # Native MSVC or ICC
10381	  # hardcode_libdir_flag_spec is actually meaningless, as there is
10382	  # no search path for DLLs.
10383	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
10384	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
10385	  _LT_TAGVAR(always_export_symbols, $1)=yes
10386	  _LT_TAGVAR(file_list_spec, $1)='@'
10387	  # Tell ltmain to make .lib files, not .a files.
10388	  libext=lib
10389	  # Tell ltmain to make .dll files, not .so files.
10390	  shrext_cmds=.dll
10391	  # FIXME: Setting linknames here is a bad hack.
10392	  _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
10393	  _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
10394              cp "$export_symbols" "$output_objdir/$soname.def";
10395              echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
10396            else
10397              $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
10398            fi~
10399            $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
10400            linknames='
10401	  # The linker will not automatically build a static lib if we build a DLL.
10402	  # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
10403	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
10404	  # Don't use ranlib
10405	  _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
10406	  _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
10407            lt_tool_outputfile="@TOOL_OUTPUT@"~
10408            case $lt_outputfile in
10409              *.exe|*.EXE) ;;
10410              *)
10411                lt_outputfile=$lt_outputfile.exe
10412                lt_tool_outputfile=$lt_tool_outputfile.exe
10413                ;;
10414            esac~
10415            func_to_tool_file "$lt_outputfile"~
10416            if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
10417              $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
10418              $RM "$lt_outputfile.manifest";
10419            fi'
10420	  ;;
10421	*)
10422	  # g++
10423	  # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
10424	  # as there is no search path for DLLs.
10425	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10426	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
10427	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
10428	  _LT_TAGVAR(always_export_symbols, $1)=no
10429	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
10430
10431	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
10432	    _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'
10433	    # If the export-symbols file already is a .def file, use it as
10434	    # is; otherwise, prepend EXPORTS...
10435	    _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
10436              cp $export_symbols $output_objdir/$soname.def;
10437            else
10438              echo EXPORTS > $output_objdir/$soname.def;
10439              cat $export_symbols >> $output_objdir/$soname.def;
10440            fi~
10441            $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'
10442	  else
10443	    _LT_TAGVAR(ld_shlibs, $1)=no
10444	  fi
10445	  ;;
10446	esac
10447	;;
10448      darwin* | rhapsody*)
10449        _LT_DARWIN_LINKER_FEATURES($1)
10450	;;
10451
10452      os2*)
10453	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10454	_LT_TAGVAR(hardcode_minus_L, $1)=yes
10455	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
10456	shrext_cmds=.dll
10457	_LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
10458	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
10459	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
10460	  $ECHO EXPORTS >> $output_objdir/$libname.def~
10461	  emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
10462	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
10463	  emximp -o $lib $output_objdir/$libname.def'
10464	_LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
10465	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
10466	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
10467	  $ECHO EXPORTS >> $output_objdir/$libname.def~
10468	  prefix_cmds="$SED"~
10469	  if test EXPORTS = "`$SED 1q $export_symbols`"; then
10470	    prefix_cmds="$prefix_cmds -e 1d";
10471	  fi~
10472	  prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
10473	  cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
10474	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
10475	  emximp -o $lib $output_objdir/$libname.def'
10476	_LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
10477	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
10478	_LT_TAGVAR(file_list_spec, $1)='@'
10479	;;
10480
10481      dgux*)
10482        case $cc_basename in
10483          ec++*)
10484	    # FIXME: insert proper C++ library support
10485	    _LT_TAGVAR(ld_shlibs, $1)=no
10486	    ;;
10487          ghcx*)
10488	    # Green Hills C++ Compiler
10489	    # FIXME: insert proper C++ library support
10490	    _LT_TAGVAR(ld_shlibs, $1)=no
10491	    ;;
10492          *)
10493	    # FIXME: insert proper C++ library support
10494	    _LT_TAGVAR(ld_shlibs, $1)=no
10495	    ;;
10496        esac
10497        ;;
10498
10499      freebsd2.*)
10500        # C++ shared libraries reported to be fairly broken before
10501	# switch to ELF
10502        _LT_TAGVAR(ld_shlibs, $1)=no
10503        ;;
10504
10505      freebsd-elf*)
10506        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
10507        ;;
10508
10509      freebsd* | dragonfly* | midnightbsd*)
10510        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
10511        # conventions
10512        _LT_TAGVAR(ld_shlibs, $1)=yes
10513        ;;
10514
10515      haiku*)
10516        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
10517        _LT_TAGVAR(link_all_deplibs, $1)=yes
10518        ;;
10519
10520      hpux9*)
10521        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
10522        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
10523        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
10524        _LT_TAGVAR(hardcode_direct, $1)=yes
10525        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
10526				             # but as the default
10527				             # location of the library.
10528
10529        case $cc_basename in
10530          CC*)
10531            # FIXME: insert proper C++ library support
10532            _LT_TAGVAR(ld_shlibs, $1)=no
10533            ;;
10534          aCC*)
10535            _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'
10536            # Commands to make compiler produce verbose output that lists
10537            # what "hidden" libraries, object files and flags are used when
10538            # linking a shared library.
10539            #
10540            # There doesn't appear to be a way to prevent this compiler from
10541            # explicitly linking system object files so we need to strip them
10542            # from the output so that they don't get included in the library
10543            # dependencies.
10544            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"'
10545            ;;
10546          *)
10547            if test yes = "$GXX"; then
10548              _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'
10549            else
10550              # FIXME: insert proper C++ library support
10551              _LT_TAGVAR(ld_shlibs, $1)=no
10552            fi
10553            ;;
10554        esac
10555        ;;
10556
10557      hpux10*|hpux11*)
10558        if test no = "$with_gnu_ld"; then
10559	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
10560	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
10561
10562          case $host_cpu in
10563            hppa*64*|ia64*)
10564              ;;
10565            *)
10566	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
10567              ;;
10568          esac
10569        fi
10570        case $host_cpu in
10571          hppa*64*|ia64*)
10572            _LT_TAGVAR(hardcode_direct, $1)=no
10573            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
10574            ;;
10575          *)
10576            _LT_TAGVAR(hardcode_direct, $1)=yes
10577            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
10578            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
10579					         # but as the default
10580					         # location of the library.
10581            ;;
10582        esac
10583
10584        case $cc_basename in
10585          CC*)
10586	    # FIXME: insert proper C++ library support
10587	    _LT_TAGVAR(ld_shlibs, $1)=no
10588	    ;;
10589          aCC*)
10590	    case $host_cpu in
10591	      hppa*64*)
10592	        _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
10593	        ;;
10594	      ia64*)
10595	        _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
10596	        ;;
10597	      *)
10598	        _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'
10599	        ;;
10600	    esac
10601	    # Commands to make compiler produce verbose output that lists
10602	    # what "hidden" libraries, object files and flags are used when
10603	    # linking a shared library.
10604	    #
10605	    # There doesn't appear to be a way to prevent this compiler from
10606	    # explicitly linking system object files so we need to strip them
10607	    # from the output so that they don't get included in the library
10608	    # dependencies.
10609	    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"'
10610	    ;;
10611          *)
10612	    if test yes = "$GXX"; then
10613	      if test no = "$with_gnu_ld"; then
10614	        case $host_cpu in
10615	          hppa*64*)
10616	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
10617	            ;;
10618	          ia64*)
10619	            _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'
10620	            ;;
10621	          *)
10622	            _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'
10623	            ;;
10624	        esac
10625	      fi
10626	    else
10627	      # FIXME: insert proper C++ library support
10628	      _LT_TAGVAR(ld_shlibs, $1)=no
10629	    fi
10630	    ;;
10631        esac
10632        ;;
10633
10634      interix[[3-9]]*)
10635	_LT_TAGVAR(hardcode_direct, $1)=no
10636	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
10637	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
10638	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
10639	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
10640	# Instead, shared libraries are loaded at an image base (0x10000000 by
10641	# default) and relocated if they conflict, which is a slow very memory
10642	# consuming and fragmenting process.  To avoid this, we pick a random,
10643	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
10644	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
10645	_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'
10646	_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'
10647	;;
10648      irix5* | irix6*)
10649        case $cc_basename in
10650          CC*)
10651	    # SGI C++
10652	    _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'
10653
10654	    # Archives containing C++ object files must be created using
10655	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
10656	    # necessary to make sure instantiated templates are included
10657	    # in the archive.
10658	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
10659	    ;;
10660          *)
10661	    if test yes = "$GXX"; then
10662	      if test no = "$with_gnu_ld"; then
10663	        _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'
10664	      else
10665	        _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'
10666	      fi
10667	    fi
10668	    _LT_TAGVAR(link_all_deplibs, $1)=yes
10669	    ;;
10670        esac
10671        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
10672        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
10673        _LT_TAGVAR(inherit_rpath, $1)=yes
10674        ;;
10675
10676      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
10677        case $cc_basename in
10678          KCC*)
10679	    # Kuck and Associates, Inc. (KAI) C++ Compiler
10680
10681	    # KCC will only create a shared library if the output file
10682	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
10683	    # to its proper name (with version) after linking.
10684	    _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'
10685	    _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'
10686	    # Commands to make compiler produce verbose output that lists
10687	    # what "hidden" libraries, object files and flags are used when
10688	    # linking a shared library.
10689	    #
10690	    # There doesn't appear to be a way to prevent this compiler from
10691	    # explicitly linking system object files so we need to strip them
10692	    # from the output so that they don't get included in the library
10693	    # dependencies.
10694	    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"'
10695
10696	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
10697	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
10698
10699	    # Archives containing C++ object files must be created using
10700	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
10701	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
10702	    ;;
10703	  icpc* | ecpc* )
10704	    # Intel C++
10705	    with_gnu_ld=yes
10706	    # version 8.0 and above of icpc choke on multiply defined symbols
10707	    # if we add $predep_objects and $postdep_objects, however 7.1 and
10708	    # earlier do not add the objects themselves.
10709	    case `$CC -V 2>&1` in
10710	      *"Version 7."*)
10711	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
10712		_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'
10713		;;
10714	      *)  # Version 8.0 or newer
10715	        tmp_idyn=
10716	        case $host_cpu in
10717		  ia64*) tmp_idyn=' -i_dynamic';;
10718		esac
10719	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
10720		_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'
10721		;;
10722	    esac
10723	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
10724	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
10725	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
10726	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
10727	    ;;
10728          pgCC* | pgcpp*)
10729            # Portland Group C++ compiler
10730	    case `$CC -V` in
10731	    *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
10732	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
10733               rm -rf $tpldir~
10734               $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
10735               compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
10736	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
10737                rm -rf $tpldir~
10738                $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
10739                $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
10740                $RANLIB $oldlib'
10741	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
10742                rm -rf $tpldir~
10743                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
10744                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
10745	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
10746                rm -rf $tpldir~
10747                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
10748                $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'
10749	      ;;
10750	    *) # Version 6 and above use weak symbols
10751	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
10752	      _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'
10753	      ;;
10754	    esac
10755
10756	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
10757	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
10758	    _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'
10759            ;;
10760	  cxx*)
10761	    # Compaq C++
10762	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
10763	    _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'
10764
10765	    runpath_var=LD_RUN_PATH
10766	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
10767	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
10768
10769	    # Commands to make compiler produce verbose output that lists
10770	    # what "hidden" libraries, object files and flags are used when
10771	    # linking a shared library.
10772	    #
10773	    # There doesn't appear to be a way to prevent this compiler from
10774	    # explicitly linking system object files so we need to strip them
10775	    # from the output so that they don't get included in the library
10776	    # dependencies.
10777	    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'
10778	    ;;
10779	  xl* | mpixl* | bgxl*)
10780	    # IBM XL 8.0 on PPC, with GNU ld
10781	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
10782	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
10783	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
10784	    if test yes = "$supports_anon_versioning"; then
10785	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
10786                cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
10787                echo "local: *; };" >> $output_objdir/$libname.ver~
10788                $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
10789	    fi
10790	    ;;
10791	  *)
10792	    case `$CC -V 2>&1 | $SED 5q` in
10793	    *Sun\ C*)
10794	      # Sun C++ 5.9
10795	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
10796	      _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
10797	      _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'
10798	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
10799	      _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'
10800	      _LT_TAGVAR(compiler_needs_object, $1)=yes
10801
10802	      # Not sure whether something based on
10803	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
10804	      # would be better.
10805	      output_verbose_link_cmd='func_echo_all'
10806
10807	      # Archives containing C++ object files must be created using
10808	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
10809	      # necessary to make sure instantiated templates are included
10810	      # in the archive.
10811	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
10812	      ;;
10813	    esac
10814	    ;;
10815	esac
10816	;;
10817
10818      lynxos*)
10819        # FIXME: insert proper C++ library support
10820	_LT_TAGVAR(ld_shlibs, $1)=no
10821	;;
10822
10823      m88k*)
10824        # FIXME: insert proper C++ library support
10825        _LT_TAGVAR(ld_shlibs, $1)=no
10826	;;
10827
10828      mvs*)
10829        case $cc_basename in
10830          cxx*)
10831	    # FIXME: insert proper C++ library support
10832	    _LT_TAGVAR(ld_shlibs, $1)=no
10833	    ;;
10834	  *)
10835	    # FIXME: insert proper C++ library support
10836	    _LT_TAGVAR(ld_shlibs, $1)=no
10837	    ;;
10838	esac
10839	;;
10840
10841      netbsd*)
10842        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
10843	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
10844	  wlarc=
10845	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
10846	  _LT_TAGVAR(hardcode_direct, $1)=yes
10847	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
10848	fi
10849	# Workaround some broken pre-1.5 toolchains
10850	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
10851	;;
10852
10853      *nto* | *qnx*)
10854        _LT_TAGVAR(ld_shlibs, $1)=yes
10855	;;
10856
10857      openbsd* | bitrig*)
10858	if test -f /usr/libexec/ld.so; then
10859	  _LT_TAGVAR(hardcode_direct, $1)=yes
10860	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
10861	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
10862	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
10863	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
10864	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
10865	    _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'
10866	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
10867	    _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
10868	  fi
10869	  output_verbose_link_cmd=func_echo_all
10870	else
10871	  _LT_TAGVAR(ld_shlibs, $1)=no
10872	fi
10873	;;
10874
10875      osf3* | osf4* | osf5*)
10876        case $cc_basename in
10877          KCC*)
10878	    # Kuck and Associates, Inc. (KAI) C++ Compiler
10879
10880	    # KCC will only create a shared library if the output file
10881	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
10882	    # to its proper name (with version) after linking.
10883	    _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'
10884
10885	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
10886	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
10887
10888	    # Archives containing C++ object files must be created using
10889	    # the KAI C++ compiler.
10890	    case $host in
10891	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
10892	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
10893	    esac
10894	    ;;
10895          RCC*)
10896	    # Rational C++ 2.4.1
10897	    # FIXME: insert proper C++ library support
10898	    _LT_TAGVAR(ld_shlibs, $1)=no
10899	    ;;
10900          cxx*)
10901	    case $host in
10902	      osf3*)
10903	        _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
10904	        _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'
10905	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
10906		;;
10907	      *)
10908	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
10909	        _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'
10910	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
10911                  echo "-hidden">> $lib.exp~
10912                  $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~
10913                  $RM $lib.exp'
10914	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
10915		;;
10916	    esac
10917
10918	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
10919
10920	    # Commands to make compiler produce verbose output that lists
10921	    # what "hidden" libraries, object files and flags are used when
10922	    # linking a shared library.
10923	    #
10924	    # There doesn't appear to be a way to prevent this compiler from
10925	    # explicitly linking system object files so we need to strip them
10926	    # from the output so that they don't get included in the library
10927	    # dependencies.
10928	    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"'
10929	    ;;
10930	  *)
10931	    if test yes,no = "$GXX,$with_gnu_ld"; then
10932	      _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
10933	      case $host in
10934	        osf3*)
10935	          _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'
10936		  ;;
10937	        *)
10938	          _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'
10939		  ;;
10940	      esac
10941
10942	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
10943	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
10944
10945	      # Commands to make compiler produce verbose output that lists
10946	      # what "hidden" libraries, object files and flags are used when
10947	      # linking a shared library.
10948	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
10949
10950	    else
10951	      # FIXME: insert proper C++ library support
10952	      _LT_TAGVAR(ld_shlibs, $1)=no
10953	    fi
10954	    ;;
10955        esac
10956        ;;
10957
10958      psos*)
10959        # FIXME: insert proper C++ library support
10960        _LT_TAGVAR(ld_shlibs, $1)=no
10961        ;;
10962
10963      sunos4*)
10964        case $cc_basename in
10965          CC*)
10966	    # Sun C++ 4.x
10967	    # FIXME: insert proper C++ library support
10968	    _LT_TAGVAR(ld_shlibs, $1)=no
10969	    ;;
10970          lcc*)
10971	    # Lucid
10972	    # FIXME: insert proper C++ library support
10973	    _LT_TAGVAR(ld_shlibs, $1)=no
10974	    ;;
10975          *)
10976	    # FIXME: insert proper C++ library support
10977	    _LT_TAGVAR(ld_shlibs, $1)=no
10978	    ;;
10979        esac
10980        ;;
10981
10982      solaris*)
10983        case $cc_basename in
10984          CC* | sunCC*)
10985	    # Sun C++ 4.2, 5.x and Centerline C++
10986            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
10987	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
10988	    _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
10989	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
10990              $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'
10991
10992	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
10993	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
10994	    case $host_os in
10995	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
10996	      *)
10997		# The compiler driver will combine and reorder linker options,
10998		# but understands '-z linker_flag'.
10999	        # Supported since Solaris 2.6 (maybe 2.5.1?)
11000		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
11001	        ;;
11002	    esac
11003	    _LT_TAGVAR(link_all_deplibs, $1)=yes
11004
11005	    output_verbose_link_cmd='func_echo_all'
11006
11007	    # Archives containing C++ object files must be created using
11008	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
11009	    # necessary to make sure instantiated templates are included
11010	    # in the archive.
11011	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
11012	    ;;
11013          gcx*)
11014	    # Green Hills C++ Compiler
11015	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
11016
11017	    # The C++ compiler must be used to create the archive.
11018	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
11019	    ;;
11020          *)
11021	    # GNU C++ compiler with Solaris linker
11022	    if test yes,no = "$GXX,$with_gnu_ld"; then
11023	      _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
11024	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
11025	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
11026	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
11027                  $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'
11028
11029	        # Commands to make compiler produce verbose output that lists
11030	        # what "hidden" libraries, object files and flags are used when
11031	        # linking a shared library.
11032	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
11033	      else
11034	        # g++ 2.7 appears to require '-G' NOT '-shared' on this
11035	        # platform.
11036	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
11037	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
11038                  $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'
11039
11040	        # Commands to make compiler produce verbose output that lists
11041	        # what "hidden" libraries, object files and flags are used when
11042	        # linking a shared library.
11043	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
11044	      fi
11045
11046	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
11047	      case $host_os in
11048		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
11049		*)
11050		  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
11051		  ;;
11052	      esac
11053	    fi
11054	    ;;
11055        esac
11056        ;;
11057
11058    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
11059      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
11060      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
11061      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
11062      runpath_var='LD_RUN_PATH'
11063
11064      case $cc_basename in
11065        CC*)
11066	  _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
11067	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
11068	  ;;
11069	*)
11070	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
11071	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
11072	  ;;
11073      esac
11074      ;;
11075
11076      sysv5* | sco3.2v5* | sco5v6*)
11077	# Note: We CANNOT use -z defs as we might desire, because we do not
11078	# link with -lc, and that would cause any symbols used from libc to
11079	# always be unresolved, which means just about no library would
11080	# ever link correctly.  If we're not using GNU ld we use -z text
11081	# though, which does catch some bad symbols but isn't as heavy-handed
11082	# as -z defs.
11083	_LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
11084	_LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
11085	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
11086	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
11087	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
11088	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
11089	_LT_TAGVAR(link_all_deplibs, $1)=yes
11090	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
11091	runpath_var='LD_RUN_PATH'
11092
11093	case $cc_basename in
11094          CC*)
11095	    _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
11096	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
11097	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
11098              '"$_LT_TAGVAR(old_archive_cmds, $1)"
11099	    _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
11100              '"$_LT_TAGVAR(reload_cmds, $1)"
11101	    ;;
11102	  *)
11103	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
11104	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
11105	    ;;
11106	esac
11107      ;;
11108
11109      tandem*)
11110        case $cc_basename in
11111          NCC*)
11112	    # NonStop-UX NCC 3.20
11113	    # FIXME: insert proper C++ library support
11114	    _LT_TAGVAR(ld_shlibs, $1)=no
11115	    ;;
11116          *)
11117	    # FIXME: insert proper C++ library support
11118	    _LT_TAGVAR(ld_shlibs, $1)=no
11119	    ;;
11120        esac
11121        ;;
11122
11123      vxworks*)
11124        # FIXME: insert proper C++ library support
11125        _LT_TAGVAR(ld_shlibs, $1)=no
11126        ;;
11127
11128      *)
11129        # FIXME: insert proper C++ library support
11130        _LT_TAGVAR(ld_shlibs, $1)=no
11131        ;;
11132    esac
11133
11134    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
11135    test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
11136
11137    _LT_TAGVAR(GCC, $1)=$GXX
11138    _LT_TAGVAR(LD, $1)=$LD
11139
11140    ## CAVEAT EMPTOR:
11141    ## There is no encapsulation within the following macros, do not change
11142    ## the running order or otherwise move them around unless you know exactly
11143    ## what you are doing...
11144    _LT_SYS_HIDDEN_LIBDEPS($1)
11145    _LT_COMPILER_PIC($1)
11146    _LT_COMPILER_C_O($1)
11147    _LT_COMPILER_FILE_LOCKS($1)
11148    _LT_LINKER_SHLIBS($1)
11149    _LT_SYS_DYNAMIC_LINKER($1)
11150    _LT_LINKER_HARDCODE_LIBPATH($1)
11151
11152    _LT_CONFIG($1)
11153  fi # test -n "$compiler"
11154
11155  CC=$lt_save_CC
11156  CFLAGS=$lt_save_CFLAGS
11157  LDCXX=$LD
11158  LD=$lt_save_LD
11159  GCC=$lt_save_GCC
11160  with_gnu_ld=$lt_save_with_gnu_ld
11161  lt_cv_path_LDCXX=$lt_cv_path_LD
11162  lt_cv_path_LD=$lt_save_path_LD
11163  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
11164  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
11165fi # test yes != "$_lt_caught_CXX_error"
11166
11167AC_LANG_POP
11168])# _LT_LANG_CXX_CONFIG
11169
11170
11171# _LT_FUNC_STRIPNAME_CNF
11172# ----------------------
11173# func_stripname_cnf prefix suffix name
11174# strip PREFIX and SUFFIX off of NAME.
11175# PREFIX and SUFFIX must not contain globbing or regex special
11176# characters, hashes, percent signs, but SUFFIX may contain a leading
11177# dot (in which case that matches only a dot).
11178#
11179# This function is identical to the (non-XSI) version of func_stripname,
11180# except this one can be used by m4 code that may be executed by configure,
11181# rather than the libtool script.
11182m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
11183AC_REQUIRE([_LT_DECL_SED])
11184AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
11185func_stripname_cnf ()
11186{
11187  case @S|@2 in
11188  .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
11189  *)  func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
11190  esac
11191} # func_stripname_cnf
11192])# _LT_FUNC_STRIPNAME_CNF
11193
11194
11195# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
11196# ---------------------------------
11197# Figure out "hidden" library dependencies from verbose
11198# compiler output when linking a shared library.
11199# Parse the compiler output and extract the necessary
11200# objects, libraries and library flags.
11201m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
11202[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
11203AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
11204# Dependencies to place before and after the object being linked:
11205_LT_TAGVAR(predep_objects, $1)=
11206_LT_TAGVAR(postdep_objects, $1)=
11207_LT_TAGVAR(predeps, $1)=
11208_LT_TAGVAR(postdeps, $1)=
11209_LT_TAGVAR(compiler_lib_search_path, $1)=
11210
11211dnl we can't use the lt_simple_compile_test_code here,
11212dnl because it contains code intended for an executable,
11213dnl not a library.  It's possible we should let each
11214dnl tag define a new lt_????_link_test_code variable,
11215dnl but it's only used here...
11216m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
11217int a;
11218void foo (void) { a = 0; }
11219_LT_EOF
11220], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
11221class Foo
11222{
11223public:
11224  Foo (void) { a = 0; }
11225private:
11226  int a;
11227};
11228_LT_EOF
11229], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
11230      subroutine foo
11231      implicit none
11232      integer*4 a
11233      a=0
11234      return
11235      end
11236_LT_EOF
11237], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
11238      subroutine foo
11239      implicit none
11240      integer a
11241      a=0
11242      return
11243      end
11244_LT_EOF
11245], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
11246public class foo {
11247  private int a;
11248  public void bar (void) {
11249    a = 0;
11250  }
11251};
11252_LT_EOF
11253], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
11254package foo
11255func foo() {
11256}
11257_LT_EOF
11258])
11259
11260_lt_libdeps_save_CFLAGS=$CFLAGS
11261case "$CC $CFLAGS " in #(
11262*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
11263*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
11264*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
11265esac
11266
11267dnl Parse the compiler output and extract the necessary
11268dnl objects, libraries and library flags.
11269if AC_TRY_EVAL(ac_compile); then
11270  # Parse the compiler output and extract the necessary
11271  # objects, libraries and library flags.
11272
11273  # Sentinel used to keep track of whether or not we are before
11274  # the conftest object file.
11275  pre_test_object_deps_done=no
11276
11277  for p in `eval "$output_verbose_link_cmd"`; do
11278    case $prev$p in
11279
11280    -L* | -R* | -l*)
11281       # Some compilers place space between "-{L,R}" and the path.
11282       # Remove the space.
11283       if test x-L = "$p" ||
11284          test x-R = "$p"; then
11285	 prev=$p
11286	 continue
11287       fi
11288
11289       # Expand the sysroot to ease extracting the directories later.
11290       if test -z "$prev"; then
11291         case $p in
11292         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
11293         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
11294         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
11295         esac
11296       fi
11297       case $p in
11298       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
11299       esac
11300       if test no = "$pre_test_object_deps_done"; then
11301	 case $prev in
11302	 -L | -R)
11303	   # Internal compiler library paths should come after those
11304	   # provided the user.  The postdeps already come after the
11305	   # user supplied libs so there is no need to process them.
11306	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
11307	     _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
11308	   else
11309	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
11310	   fi
11311	   ;;
11312	 # The "-l" case would never come before the object being
11313	 # linked, so don't bother handling this case.
11314	 esac
11315       else
11316	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
11317	   _LT_TAGVAR(postdeps, $1)=$prev$p
11318	 else
11319	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
11320	 fi
11321       fi
11322       prev=
11323       ;;
11324
11325    *.lto.$objext) ;; # Ignore GCC LTO objects
11326    *.$objext)
11327       # This assumes that the test object file only shows up
11328       # once in the compiler output.
11329       if test "$p" = "conftest.$objext"; then
11330	 pre_test_object_deps_done=yes
11331	 continue
11332       fi
11333
11334       if test no = "$pre_test_object_deps_done"; then
11335	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
11336	   _LT_TAGVAR(predep_objects, $1)=$p
11337	 else
11338	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
11339	 fi
11340       else
11341	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
11342	   _LT_TAGVAR(postdep_objects, $1)=$p
11343	 else
11344	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
11345	 fi
11346       fi
11347       ;;
11348
11349    *) ;; # Ignore the rest.
11350
11351    esac
11352  done
11353
11354  # Clean up.
11355  rm -f a.out a.exe
11356else
11357  echo "libtool.m4: error: problem compiling $1 test program"
11358fi
11359
11360$RM -f confest.$objext
11361CFLAGS=$_lt_libdeps_save_CFLAGS
11362
11363# PORTME: override above test on systems where it is broken
11364m4_if([$1], [CXX],
11365[case $host_os in
11366interix[[3-9]]*)
11367  # Interix 3.5 installs completely hosed .la files for C++, so rather than
11368  # hack all around it, let's just trust "g++" to DTRT.
11369  _LT_TAGVAR(predep_objects,$1)=
11370  _LT_TAGVAR(postdep_objects,$1)=
11371  _LT_TAGVAR(postdeps,$1)=
11372  ;;
11373esac
11374])
11375
11376case " $_LT_TAGVAR(postdeps, $1) " in
11377*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
11378esac
11379 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
11380if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
11381 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
11382fi
11383_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
11384    [The directories searched by this compiler when creating a shared library])
11385_LT_TAGDECL([], [predep_objects], [1],
11386    [Dependencies to place before and after the objects being linked to
11387    create a shared library])
11388_LT_TAGDECL([], [postdep_objects], [1])
11389_LT_TAGDECL([], [predeps], [1])
11390_LT_TAGDECL([], [postdeps], [1])
11391_LT_TAGDECL([], [compiler_lib_search_path], [1],
11392    [The library search path used internally by the compiler when linking
11393    a shared library])
11394])# _LT_SYS_HIDDEN_LIBDEPS
11395
11396
11397# _LT_LANG_F77_CONFIG([TAG])
11398# --------------------------
11399# Ensure that the configuration variables for a Fortran 77 compiler are
11400# suitably defined.  These variables are subsequently used by _LT_CONFIG
11401# to write the compiler configuration to 'libtool'.
11402m4_defun([_LT_LANG_F77_CONFIG],
11403[AC_LANG_PUSH(Fortran 77)
11404if test -z "$F77" || test no = "$F77"; then
11405  _lt_disable_F77=yes
11406fi
11407
11408_LT_TAGVAR(archive_cmds_need_lc, $1)=no
11409_LT_TAGVAR(allow_undefined_flag, $1)=
11410_LT_TAGVAR(always_export_symbols, $1)=no
11411_LT_TAGVAR(archive_expsym_cmds, $1)=
11412_LT_TAGVAR(export_dynamic_flag_spec, $1)=
11413_LT_TAGVAR(hardcode_direct, $1)=no
11414_LT_TAGVAR(hardcode_direct_absolute, $1)=no
11415_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
11416_LT_TAGVAR(hardcode_libdir_separator, $1)=
11417_LT_TAGVAR(hardcode_minus_L, $1)=no
11418_LT_TAGVAR(hardcode_automatic, $1)=no
11419_LT_TAGVAR(inherit_rpath, $1)=no
11420_LT_TAGVAR(module_cmds, $1)=
11421_LT_TAGVAR(module_expsym_cmds, $1)=
11422_LT_TAGVAR(link_all_deplibs, $1)=unknown
11423_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
11424_LT_TAGVAR(reload_flag, $1)=$reload_flag
11425_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
11426_LT_TAGVAR(no_undefined_flag, $1)=
11427_LT_TAGVAR(whole_archive_flag_spec, $1)=
11428_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
11429
11430# Source file extension for f77 test sources.
11431ac_ext=f
11432
11433# Object file extension for compiled f77 test sources.
11434objext=o
11435_LT_TAGVAR(objext, $1)=$objext
11436
11437# No sense in running all these tests if we already determined that
11438# the F77 compiler isn't working.  Some variables (like enable_shared)
11439# are currently assumed to apply to all compilers on this platform,
11440# and will be corrupted by setting them based on a non-working compiler.
11441if test yes != "$_lt_disable_F77"; then
11442  # Code to be used in simple compile tests
11443  lt_simple_compile_test_code="\
11444      subroutine t
11445      return
11446      end
11447"
11448
11449  # Code to be used in simple link tests
11450  lt_simple_link_test_code="\
11451      program t
11452      end
11453"
11454
11455  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
11456  _LT_TAG_COMPILER
11457
11458  # save warnings/boilerplate of simple test code
11459  _LT_COMPILER_BOILERPLATE
11460  _LT_LINKER_BOILERPLATE
11461
11462  # Allow CC to be a program name with arguments.
11463  lt_save_CC=$CC
11464  lt_save_GCC=$GCC
11465  lt_save_CFLAGS=$CFLAGS
11466  CC=${F77-"f77"}
11467  CFLAGS=$FFLAGS
11468  compiler=$CC
11469  _LT_TAGVAR(compiler, $1)=$CC
11470  _LT_CC_BASENAME([$compiler])
11471  GCC=$G77
11472  if test -n "$compiler"; then
11473    AC_MSG_CHECKING([if libtool supports shared libraries])
11474    AC_MSG_RESULT([$can_build_shared])
11475
11476    AC_MSG_CHECKING([whether to build shared libraries])
11477    test no = "$can_build_shared" && enable_shared=no
11478
11479    # On AIX, shared libraries and static libraries use the same namespace, and
11480    # are all built from PIC.
11481    case $host_os in
11482      aix3*)
11483        test yes = "$enable_shared" && enable_static=no
11484        if test -n "$RANLIB"; then
11485          archive_cmds="$archive_cmds~\$RANLIB \$lib"
11486          postinstall_cmds='$RANLIB $lib'
11487        fi
11488        ;;
11489      aix[[4-9]]*)
11490	if test ia64 != "$host_cpu"; then
11491	  case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
11492	  yes,aix,yes) ;;		# shared object as lib.so file only
11493	  yes,svr4,*) ;;		# shared object as lib.so archive member only
11494	  yes,*) enable_static=no ;;	# shared object in lib.a archive as well
11495	  esac
11496	fi
11497        ;;
11498    esac
11499    AC_MSG_RESULT([$enable_shared])
11500
11501    AC_MSG_CHECKING([whether to build static libraries])
11502    # Make sure either enable_shared or enable_static is yes.
11503    test yes = "$enable_shared" || enable_static=yes
11504    AC_MSG_RESULT([$enable_static])
11505
11506    _LT_TAGVAR(GCC, $1)=$G77
11507    _LT_TAGVAR(LD, $1)=$LD
11508
11509    ## CAVEAT EMPTOR:
11510    ## There is no encapsulation within the following macros, do not change
11511    ## the running order or otherwise move them around unless you know exactly
11512    ## what you are doing...
11513    _LT_COMPILER_PIC($1)
11514    _LT_COMPILER_C_O($1)
11515    _LT_COMPILER_FILE_LOCKS($1)
11516    _LT_LINKER_SHLIBS($1)
11517    _LT_SYS_DYNAMIC_LINKER($1)
11518    _LT_LINKER_HARDCODE_LIBPATH($1)
11519
11520    _LT_CONFIG($1)
11521  fi # test -n "$compiler"
11522
11523  GCC=$lt_save_GCC
11524  CC=$lt_save_CC
11525  CFLAGS=$lt_save_CFLAGS
11526fi # test yes != "$_lt_disable_F77"
11527
11528AC_LANG_POP
11529])# _LT_LANG_F77_CONFIG
11530
11531
11532# _LT_LANG_FC_CONFIG([TAG])
11533# -------------------------
11534# Ensure that the configuration variables for a Fortran compiler are
11535# suitably defined.  These variables are subsequently used by _LT_CONFIG
11536# to write the compiler configuration to 'libtool'.
11537m4_defun([_LT_LANG_FC_CONFIG],
11538[AC_LANG_PUSH(Fortran)
11539
11540if test -z "$FC" || test no = "$FC"; then
11541  _lt_disable_FC=yes
11542fi
11543
11544_LT_TAGVAR(archive_cmds_need_lc, $1)=no
11545_LT_TAGVAR(allow_undefined_flag, $1)=
11546_LT_TAGVAR(always_export_symbols, $1)=no
11547_LT_TAGVAR(archive_expsym_cmds, $1)=
11548_LT_TAGVAR(export_dynamic_flag_spec, $1)=
11549_LT_TAGVAR(hardcode_direct, $1)=no
11550_LT_TAGVAR(hardcode_direct_absolute, $1)=no
11551_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
11552_LT_TAGVAR(hardcode_libdir_separator, $1)=
11553_LT_TAGVAR(hardcode_minus_L, $1)=no
11554_LT_TAGVAR(hardcode_automatic, $1)=no
11555_LT_TAGVAR(inherit_rpath, $1)=no
11556_LT_TAGVAR(module_cmds, $1)=
11557_LT_TAGVAR(module_expsym_cmds, $1)=
11558_LT_TAGVAR(link_all_deplibs, $1)=unknown
11559_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
11560_LT_TAGVAR(reload_flag, $1)=$reload_flag
11561_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
11562_LT_TAGVAR(no_undefined_flag, $1)=
11563_LT_TAGVAR(whole_archive_flag_spec, $1)=
11564_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
11565
11566# Source file extension for fc test sources.
11567ac_ext=${ac_fc_srcext-f}
11568
11569# Object file extension for compiled fc test sources.
11570objext=o
11571_LT_TAGVAR(objext, $1)=$objext
11572
11573# No sense in running all these tests if we already determined that
11574# the FC compiler isn't working.  Some variables (like enable_shared)
11575# are currently assumed to apply to all compilers on this platform,
11576# and will be corrupted by setting them based on a non-working compiler.
11577if test yes != "$_lt_disable_FC"; then
11578  # Code to be used in simple compile tests
11579  lt_simple_compile_test_code="\
11580      subroutine t
11581      return
11582      end
11583"
11584
11585  # Code to be used in simple link tests
11586  lt_simple_link_test_code="\
11587      program t
11588      end
11589"
11590
11591  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
11592  _LT_TAG_COMPILER
11593
11594  # save warnings/boilerplate of simple test code
11595  _LT_COMPILER_BOILERPLATE
11596  _LT_LINKER_BOILERPLATE
11597
11598  # Allow CC to be a program name with arguments.
11599  lt_save_CC=$CC
11600  lt_save_GCC=$GCC
11601  lt_save_CFLAGS=$CFLAGS
11602  CC=${FC-"f95"}
11603  CFLAGS=$FCFLAGS
11604  compiler=$CC
11605  GCC=$ac_cv_fc_compiler_gnu
11606
11607  _LT_TAGVAR(compiler, $1)=$CC
11608  _LT_CC_BASENAME([$compiler])
11609
11610  if test -n "$compiler"; then
11611    AC_MSG_CHECKING([if libtool supports shared libraries])
11612    AC_MSG_RESULT([$can_build_shared])
11613
11614    AC_MSG_CHECKING([whether to build shared libraries])
11615    test no = "$can_build_shared" && enable_shared=no
11616
11617    # On AIX, shared libraries and static libraries use the same namespace, and
11618    # are all built from PIC.
11619    case $host_os in
11620      aix3*)
11621        test yes = "$enable_shared" && enable_static=no
11622        if test -n "$RANLIB"; then
11623          archive_cmds="$archive_cmds~\$RANLIB \$lib"
11624          postinstall_cmds='$RANLIB $lib'
11625        fi
11626        ;;
11627      aix[[4-9]]*)
11628	if test ia64 != "$host_cpu"; then
11629	  case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
11630	  yes,aix,yes) ;;		# shared object as lib.so file only
11631	  yes,svr4,*) ;;		# shared object as lib.so archive member only
11632	  yes,*) enable_static=no ;;	# shared object in lib.a archive as well
11633	  esac
11634	fi
11635        ;;
11636    esac
11637    AC_MSG_RESULT([$enable_shared])
11638
11639    AC_MSG_CHECKING([whether to build static libraries])
11640    # Make sure either enable_shared or enable_static is yes.
11641    test yes = "$enable_shared" || enable_static=yes
11642    AC_MSG_RESULT([$enable_static])
11643
11644    _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
11645    _LT_TAGVAR(LD, $1)=$LD
11646
11647    ## CAVEAT EMPTOR:
11648    ## There is no encapsulation within the following macros, do not change
11649    ## the running order or otherwise move them around unless you know exactly
11650    ## what you are doing...
11651    _LT_SYS_HIDDEN_LIBDEPS($1)
11652    _LT_COMPILER_PIC($1)
11653    _LT_COMPILER_C_O($1)
11654    _LT_COMPILER_FILE_LOCKS($1)
11655    _LT_LINKER_SHLIBS($1)
11656    _LT_SYS_DYNAMIC_LINKER($1)
11657    _LT_LINKER_HARDCODE_LIBPATH($1)
11658
11659    _LT_CONFIG($1)
11660  fi # test -n "$compiler"
11661
11662  GCC=$lt_save_GCC
11663  CC=$lt_save_CC
11664  CFLAGS=$lt_save_CFLAGS
11665fi # test yes != "$_lt_disable_FC"
11666
11667AC_LANG_POP
11668])# _LT_LANG_FC_CONFIG
11669
11670
11671# _LT_LANG_GCJ_CONFIG([TAG])
11672# --------------------------
11673# Ensure that the configuration variables for the GNU Java Compiler compiler
11674# are suitably defined.  These variables are subsequently used by _LT_CONFIG
11675# to write the compiler configuration to 'libtool'.
11676m4_defun([_LT_LANG_GCJ_CONFIG],
11677[AC_REQUIRE([LT_PROG_GCJ])dnl
11678AC_LANG_SAVE
11679
11680# Source file extension for Java test sources.
11681ac_ext=java
11682
11683# Object file extension for compiled Java test sources.
11684objext=o
11685_LT_TAGVAR(objext, $1)=$objext
11686
11687# Code to be used in simple compile tests
11688lt_simple_compile_test_code="class foo {}"
11689
11690# Code to be used in simple link tests
11691lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
11692
11693# ltmain only uses $CC for tagged configurations so make sure $CC is set.
11694_LT_TAG_COMPILER
11695
11696# save warnings/boilerplate of simple test code
11697_LT_COMPILER_BOILERPLATE
11698_LT_LINKER_BOILERPLATE
11699
11700# Allow CC to be a program name with arguments.
11701lt_save_CC=$CC
11702lt_save_CFLAGS=$CFLAGS
11703lt_save_GCC=$GCC
11704GCC=yes
11705CC=${GCJ-"gcj"}
11706CFLAGS=$GCJFLAGS
11707compiler=$CC
11708_LT_TAGVAR(compiler, $1)=$CC
11709_LT_TAGVAR(LD, $1)=$LD
11710_LT_CC_BASENAME([$compiler])
11711
11712# GCJ did not exist at the time GCC didn't implicitly link libc in.
11713_LT_TAGVAR(archive_cmds_need_lc, $1)=no
11714
11715_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
11716_LT_TAGVAR(reload_flag, $1)=$reload_flag
11717_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
11718
11719if test -n "$compiler"; then
11720  _LT_COMPILER_NO_RTTI($1)
11721  _LT_COMPILER_PIC($1)
11722  _LT_COMPILER_C_O($1)
11723  _LT_COMPILER_FILE_LOCKS($1)
11724  _LT_LINKER_SHLIBS($1)
11725  _LT_LINKER_HARDCODE_LIBPATH($1)
11726
11727  _LT_CONFIG($1)
11728fi
11729
11730AC_LANG_RESTORE
11731
11732GCC=$lt_save_GCC
11733CC=$lt_save_CC
11734CFLAGS=$lt_save_CFLAGS
11735])# _LT_LANG_GCJ_CONFIG
11736
11737
11738# _LT_LANG_GO_CONFIG([TAG])
11739# --------------------------
11740# Ensure that the configuration variables for the GNU Go compiler
11741# are suitably defined.  These variables are subsequently used by _LT_CONFIG
11742# to write the compiler configuration to 'libtool'.
11743m4_defun([_LT_LANG_GO_CONFIG],
11744[AC_REQUIRE([LT_PROG_GO])dnl
11745AC_LANG_SAVE
11746
11747# Source file extension for Go test sources.
11748ac_ext=go
11749
11750# Object file extension for compiled Go test sources.
11751objext=o
11752_LT_TAGVAR(objext, $1)=$objext
11753
11754# Code to be used in simple compile tests
11755lt_simple_compile_test_code="package main; func main() { }"
11756
11757# Code to be used in simple link tests
11758lt_simple_link_test_code='package main; func main() { }'
11759
11760# ltmain only uses $CC for tagged configurations so make sure $CC is set.
11761_LT_TAG_COMPILER
11762
11763# save warnings/boilerplate of simple test code
11764_LT_COMPILER_BOILERPLATE
11765_LT_LINKER_BOILERPLATE
11766
11767# Allow CC to be a program name with arguments.
11768lt_save_CC=$CC
11769lt_save_CFLAGS=$CFLAGS
11770lt_save_GCC=$GCC
11771GCC=yes
11772CC=${GOC-"gccgo"}
11773CFLAGS=$GOFLAGS
11774compiler=$CC
11775_LT_TAGVAR(compiler, $1)=$CC
11776_LT_TAGVAR(LD, $1)=$LD
11777_LT_CC_BASENAME([$compiler])
11778
11779# Go did not exist at the time GCC didn't implicitly link libc in.
11780_LT_TAGVAR(archive_cmds_need_lc, $1)=no
11781
11782_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
11783_LT_TAGVAR(reload_flag, $1)=$reload_flag
11784_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
11785
11786if test -n "$compiler"; then
11787  _LT_COMPILER_NO_RTTI($1)
11788  _LT_COMPILER_PIC($1)
11789  _LT_COMPILER_C_O($1)
11790  _LT_COMPILER_FILE_LOCKS($1)
11791  _LT_LINKER_SHLIBS($1)
11792  _LT_LINKER_HARDCODE_LIBPATH($1)
11793
11794  _LT_CONFIG($1)
11795fi
11796
11797AC_LANG_RESTORE
11798
11799GCC=$lt_save_GCC
11800CC=$lt_save_CC
11801CFLAGS=$lt_save_CFLAGS
11802])# _LT_LANG_GO_CONFIG
11803
11804
11805# _LT_LANG_RC_CONFIG([TAG])
11806# -------------------------
11807# Ensure that the configuration variables for the Windows resource compiler
11808# are suitably defined.  These variables are subsequently used by _LT_CONFIG
11809# to write the compiler configuration to 'libtool'.
11810m4_defun([_LT_LANG_RC_CONFIG],
11811[AC_REQUIRE([LT_PROG_RC])dnl
11812AC_LANG_SAVE
11813
11814# Source file extension for RC test sources.
11815ac_ext=rc
11816
11817# Object file extension for compiled RC test sources.
11818objext=o
11819_LT_TAGVAR(objext, $1)=$objext
11820
11821# Code to be used in simple compile tests
11822lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
11823
11824# Code to be used in simple link tests
11825lt_simple_link_test_code=$lt_simple_compile_test_code
11826
11827# ltmain only uses $CC for tagged configurations so make sure $CC is set.
11828_LT_TAG_COMPILER
11829
11830# save warnings/boilerplate of simple test code
11831_LT_COMPILER_BOILERPLATE
11832_LT_LINKER_BOILERPLATE
11833
11834# Allow CC to be a program name with arguments.
11835lt_save_CC=$CC
11836lt_save_CFLAGS=$CFLAGS
11837lt_save_GCC=$GCC
11838GCC=
11839CC=${RC-"windres"}
11840CFLAGS=
11841compiler=$CC
11842_LT_TAGVAR(compiler, $1)=$CC
11843_LT_CC_BASENAME([$compiler])
11844_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
11845
11846if test -n "$compiler"; then
11847  :
11848  _LT_CONFIG($1)
11849fi
11850
11851GCC=$lt_save_GCC
11852AC_LANG_RESTORE
11853CC=$lt_save_CC
11854CFLAGS=$lt_save_CFLAGS
11855])# _LT_LANG_RC_CONFIG
11856
11857
11858# LT_PROG_GCJ
11859# -----------
11860AC_DEFUN([LT_PROG_GCJ],
11861[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
11862  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
11863    [AC_CHECK_TOOL(GCJ, gcj,)
11864      test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
11865      AC_SUBST(GCJFLAGS)])])[]dnl
11866])
11867
11868# Old name:
11869AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
11870dnl aclocal-1.4 backwards compatibility:
11871dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
11872
11873
11874# LT_PROG_GO
11875# ----------
11876AC_DEFUN([LT_PROG_GO],
11877[AC_CHECK_TOOL(GOC, gccgo,)
11878])
11879
11880
11881# LT_PROG_RC
11882# ----------
11883AC_DEFUN([LT_PROG_RC],
11884[AC_CHECK_TOOL(RC, windres,)
11885])
11886
11887# Old name:
11888AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
11889dnl aclocal-1.4 backwards compatibility:
11890dnl AC_DEFUN([LT_AC_PROG_RC], [])
11891
11892
11893# _LT_DECL_EGREP
11894# --------------
11895# If we don't have a new enough Autoconf to choose the best grep
11896# available, choose the one first in the user's PATH.
11897m4_defun([_LT_DECL_EGREP],
11898[AC_REQUIRE([AC_PROG_EGREP])dnl
11899AC_REQUIRE([AC_PROG_FGREP])dnl
11900test -z "$GREP" && GREP=grep
11901_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
11902_LT_DECL([], [EGREP], [1], [An ERE matcher])
11903_LT_DECL([], [FGREP], [1], [A literal string matcher])
11904dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
11905AC_SUBST([GREP])
11906])
11907
11908
11909# _LT_DECL_OBJDUMP
11910# --------------
11911# If we don't have a new enough Autoconf to choose the best objdump
11912# available, choose the one first in the user's PATH.
11913m4_defun([_LT_DECL_OBJDUMP],
11914[AC_CHECK_TOOL(OBJDUMP, objdump, false)
11915test -z "$OBJDUMP" && OBJDUMP=objdump
11916_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
11917AC_SUBST([OBJDUMP])
11918])
11919
11920# _LT_DECL_DLLTOOL
11921# ----------------
11922# Ensure DLLTOOL variable is set.
11923m4_defun([_LT_DECL_DLLTOOL],
11924[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
11925test -z "$DLLTOOL" && DLLTOOL=dlltool
11926_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
11927AC_SUBST([DLLTOOL])
11928])
11929
11930# _LT_DECL_FILECMD
11931# ----------------
11932# Check for a file(cmd) program that can be used to detect file type and magic
11933m4_defun([_LT_DECL_FILECMD],
11934[AC_CHECK_TOOL([FILECMD], [file], [:])
11935_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types])
11936])# _LD_DECL_FILECMD
11937
11938# _LT_DECL_SED
11939# ------------
11940# Check for a fully-functional sed program, that truncates
11941# as few characters as possible.  Prefer GNU sed if found.
11942m4_defun([_LT_DECL_SED],
11943[AC_PROG_SED
11944test -z "$SED" && SED=sed
11945Xsed="$SED -e 1s/^X//"
11946_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
11947_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
11948    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
11949])# _LT_DECL_SED
11950
11951m4_ifndef([AC_PROG_SED], [
11952# NOTE: This macro has been submitted for inclusion into   #
11953#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
11954#  a released version of Autoconf we should remove this    #
11955#  macro and use it instead.                               #
11956
11957m4_defun([AC_PROG_SED],
11958[AC_MSG_CHECKING([for a sed that does not truncate output])
11959AC_CACHE_VAL(lt_cv_path_SED,
11960[# Loop through the user's path and test for sed and gsed.
11961# Then use that list of sed's as ones to test for truncation.
11962as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11963for as_dir in $PATH
11964do
11965  IFS=$as_save_IFS
11966  test -z "$as_dir" && as_dir=.
11967  for lt_ac_prog in sed gsed; do
11968    for ac_exec_ext in '' $ac_executable_extensions; do
11969      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
11970        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
11971      fi
11972    done
11973  done
11974done
11975IFS=$as_save_IFS
11976lt_ac_max=0
11977lt_ac_count=0
11978# Add /usr/xpg4/bin/sed as it is typically found on Solaris
11979# along with /bin/sed that truncates output.
11980for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
11981  test ! -f "$lt_ac_sed" && continue
11982  cat /dev/null > conftest.in
11983  lt_ac_count=0
11984  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
11985  # Check for GNU sed and select it if it is found.
11986  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
11987    lt_cv_path_SED=$lt_ac_sed
11988    break
11989  fi
11990  while true; do
11991    cat conftest.in conftest.in >conftest.tmp
11992    mv conftest.tmp conftest.in
11993    cp conftest.in conftest.nl
11994    echo >>conftest.nl
11995    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
11996    cmp -s conftest.out conftest.nl || break
11997    # 10000 chars as input seems more than enough
11998    test 10 -lt "$lt_ac_count" && break
11999    lt_ac_count=`expr $lt_ac_count + 1`
12000    if test "$lt_ac_count" -gt "$lt_ac_max"; then
12001      lt_ac_max=$lt_ac_count
12002      lt_cv_path_SED=$lt_ac_sed
12003    fi
12004  done
12005done
12006])
12007SED=$lt_cv_path_SED
12008AC_SUBST([SED])
12009AC_MSG_RESULT([$SED])
12010])#AC_PROG_SED
12011])#m4_ifndef
12012
12013# Old name:
12014AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
12015dnl aclocal-1.4 backwards compatibility:
12016dnl AC_DEFUN([LT_AC_PROG_SED], [])
12017
12018
12019# _LT_CHECK_SHELL_FEATURES
12020# ------------------------
12021# Find out whether the shell is Bourne or XSI compatible,
12022# or has some other useful features.
12023m4_defun([_LT_CHECK_SHELL_FEATURES],
12024[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
12025  lt_unset=unset
12026else
12027  lt_unset=false
12028fi
12029_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
12030
12031# test EBCDIC or ASCII
12032case `echo X|tr X '\101'` in
12033 A) # ASCII based system
12034    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
12035  lt_SP2NL='tr \040 \012'
12036  lt_NL2SP='tr \015\012 \040\040'
12037  ;;
12038 *) # EBCDIC based system
12039  lt_SP2NL='tr \100 \n'
12040  lt_NL2SP='tr \r\n \100\100'
12041  ;;
12042esac
12043_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
12044_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
12045])# _LT_CHECK_SHELL_FEATURES
12046
12047
12048# _LT_PATH_CONVERSION_FUNCTIONS
12049# -----------------------------
12050# Determine what file name conversion functions should be used by
12051# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
12052# for certain cross-compile configurations and native mingw.
12053m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
12054[AC_REQUIRE([AC_CANONICAL_HOST])dnl
12055AC_REQUIRE([AC_CANONICAL_BUILD])dnl
12056AC_MSG_CHECKING([how to convert $build file names to $host format])
12057AC_CACHE_VAL(lt_cv_to_host_file_cmd,
12058[case $host in
12059  *-*-mingw* )
12060    case $build in
12061      *-*-mingw* ) # actually msys
12062        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
12063        ;;
12064      *-*-cygwin* )
12065        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
12066        ;;
12067      * ) # otherwise, assume *nix
12068        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
12069        ;;
12070    esac
12071    ;;
12072  *-*-cygwin* )
12073    case $build in
12074      *-*-mingw* ) # actually msys
12075        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
12076        ;;
12077      *-*-cygwin* )
12078        lt_cv_to_host_file_cmd=func_convert_file_noop
12079        ;;
12080      * ) # otherwise, assume *nix
12081        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
12082        ;;
12083    esac
12084    ;;
12085  * ) # unhandled hosts (and "normal" native builds)
12086    lt_cv_to_host_file_cmd=func_convert_file_noop
12087    ;;
12088esac
12089])
12090to_host_file_cmd=$lt_cv_to_host_file_cmd
12091AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
12092_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
12093         [0], [convert $build file names to $host format])dnl
12094
12095AC_MSG_CHECKING([how to convert $build file names to toolchain format])
12096AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
12097[#assume ordinary cross tools, or native build.
12098lt_cv_to_tool_file_cmd=func_convert_file_noop
12099case $host in
12100  *-*-mingw* )
12101    case $build in
12102      *-*-mingw* ) # actually msys
12103        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
12104        ;;
12105    esac
12106    ;;
12107esac
12108])
12109to_tool_file_cmd=$lt_cv_to_tool_file_cmd
12110AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
12111_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
12112         [0], [convert $build files to toolchain format])dnl
12113])# _LT_PATH_CONVERSION_FUNCTIONS
12114
12115# Helper functions for option handling.                    -*- Autoconf -*-
12116#
12117#   Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 Free
12118#   Software Foundation, Inc.
12119#   Written by Gary V. Vaughan, 2004
12120#
12121# This file is free software; the Free Software Foundation gives
12122# unlimited permission to copy and/or distribute it, with or without
12123# modifications, as long as this notice is preserved.
12124
12125# serial 8 ltoptions.m4
12126
12127# This is to help aclocal find these macros, as it can't see m4_define.
12128AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
12129
12130
12131# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
12132# ------------------------------------------
12133m4_define([_LT_MANGLE_OPTION],
12134[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
12135
12136
12137# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
12138# ---------------------------------------
12139# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
12140# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
12141# saved as a flag.
12142m4_define([_LT_SET_OPTION],
12143[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
12144m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
12145        _LT_MANGLE_DEFUN([$1], [$2]),
12146    [m4_warning([Unknown $1 option '$2'])])[]dnl
12147])
12148
12149
12150# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
12151# ------------------------------------------------------------
12152# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
12153m4_define([_LT_IF_OPTION],
12154[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
12155
12156
12157# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
12158# -------------------------------------------------------
12159# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
12160# are set.
12161m4_define([_LT_UNLESS_OPTIONS],
12162[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
12163	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
12164		      [m4_define([$0_found])])])[]dnl
12165m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
12166])[]dnl
12167])
12168
12169
12170# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
12171# ----------------------------------------
12172# OPTION-LIST is a space-separated list of Libtool options associated
12173# with MACRO-NAME.  If any OPTION has a matching handler declared with
12174# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
12175# the unknown option and exit.
12176m4_defun([_LT_SET_OPTIONS],
12177[# Set options
12178m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
12179    [_LT_SET_OPTION([$1], _LT_Option)])
12180
12181m4_if([$1],[LT_INIT],[
12182  dnl
12183  dnl Simply set some default values (i.e off) if boolean options were not
12184  dnl specified:
12185  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
12186  ])
12187  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
12188  ])
12189  dnl
12190  dnl If no reference was made to various pairs of opposing options, then
12191  dnl we run the default mode handler for the pair.  For example, if neither
12192  dnl 'shared' nor 'disable-shared' was passed, we enable building of shared
12193  dnl archives by default:
12194  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
12195  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
12196  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
12197  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
12198		   [_LT_ENABLE_FAST_INSTALL])
12199  _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4],
12200		   [_LT_WITH_AIX_SONAME([aix])])
12201  ])
12202])# _LT_SET_OPTIONS
12203
12204
12205
12206# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
12207# -----------------------------------------
12208m4_define([_LT_MANGLE_DEFUN],
12209[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
12210
12211
12212# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
12213# -----------------------------------------------
12214m4_define([LT_OPTION_DEFINE],
12215[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
12216])# LT_OPTION_DEFINE
12217
12218
12219# dlopen
12220# ------
12221LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
12222])
12223
12224AU_DEFUN([AC_LIBTOOL_DLOPEN],
12225[_LT_SET_OPTION([LT_INIT], [dlopen])
12226AC_DIAGNOSE([obsolete],
12227[$0: Remove this warning and the call to _LT_SET_OPTION when you
12228put the 'dlopen' option into LT_INIT's first parameter.])
12229])
12230
12231dnl aclocal-1.4 backwards compatibility:
12232dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
12233
12234
12235# win32-dll
12236# ---------
12237# Declare package support for building win32 dll's.
12238LT_OPTION_DEFINE([LT_INIT], [win32-dll],
12239[enable_win32_dll=yes
12240
12241case $host in
12242*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
12243  AC_CHECK_TOOL(AS, as, false)
12244  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
12245  AC_CHECK_TOOL(OBJDUMP, objdump, false)
12246  ;;
12247esac
12248
12249test -z "$AS" && AS=as
12250_LT_DECL([], [AS],      [1], [Assembler program])dnl
12251
12252test -z "$DLLTOOL" && DLLTOOL=dlltool
12253_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
12254
12255test -z "$OBJDUMP" && OBJDUMP=objdump
12256_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
12257])# win32-dll
12258
12259AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
12260[AC_REQUIRE([AC_CANONICAL_HOST])dnl
12261_LT_SET_OPTION([LT_INIT], [win32-dll])
12262AC_DIAGNOSE([obsolete],
12263[$0: Remove this warning and the call to _LT_SET_OPTION when you
12264put the 'win32-dll' option into LT_INIT's first parameter.])
12265])
12266
12267dnl aclocal-1.4 backwards compatibility:
12268dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
12269
12270
12271# _LT_ENABLE_SHARED([DEFAULT])
12272# ----------------------------
12273# implement the --enable-shared flag, and supports the 'shared' and
12274# 'disable-shared' LT_INIT options.
12275# DEFAULT is either 'yes' or 'no'.  If omitted, it defaults to 'yes'.
12276m4_define([_LT_ENABLE_SHARED],
12277[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
12278AC_ARG_ENABLE([shared],
12279    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
12280	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
12281    [p=${PACKAGE-default}
12282    case $enableval in
12283    yes) enable_shared=yes ;;
12284    no) enable_shared=no ;;
12285    *)
12286      enable_shared=no
12287      # Look at the argument we got.  We use all the common list separators.
12288      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
12289      for pkg in $enableval; do
12290	IFS=$lt_save_ifs
12291	if test "X$pkg" = "X$p"; then
12292	  enable_shared=yes
12293	fi
12294      done
12295      IFS=$lt_save_ifs
12296      ;;
12297    esac],
12298    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
12299
12300    _LT_DECL([build_libtool_libs], [enable_shared], [0],
12301	[Whether or not to build shared libraries])
12302])# _LT_ENABLE_SHARED
12303
12304LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
12305LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
12306
12307# Old names:
12308AC_DEFUN([AC_ENABLE_SHARED],
12309[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
12310])
12311
12312AC_DEFUN([AC_DISABLE_SHARED],
12313[_LT_SET_OPTION([LT_INIT], [disable-shared])
12314])
12315
12316AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
12317AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
12318
12319dnl aclocal-1.4 backwards compatibility:
12320dnl AC_DEFUN([AM_ENABLE_SHARED], [])
12321dnl AC_DEFUN([AM_DISABLE_SHARED], [])
12322
12323
12324
12325# _LT_ENABLE_STATIC([DEFAULT])
12326# ----------------------------
12327# implement the --enable-static flag, and support the 'static' and
12328# 'disable-static' LT_INIT options.
12329# DEFAULT is either 'yes' or 'no'.  If omitted, it defaults to 'yes'.
12330m4_define([_LT_ENABLE_STATIC],
12331[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
12332AC_ARG_ENABLE([static],
12333    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
12334	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
12335    [p=${PACKAGE-default}
12336    case $enableval in
12337    yes) enable_static=yes ;;
12338    no) enable_static=no ;;
12339    *)
12340     enable_static=no
12341      # Look at the argument we got.  We use all the common list separators.
12342      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
12343      for pkg in $enableval; do
12344	IFS=$lt_save_ifs
12345	if test "X$pkg" = "X$p"; then
12346	  enable_static=yes
12347	fi
12348      done
12349      IFS=$lt_save_ifs
12350      ;;
12351    esac],
12352    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
12353
12354    _LT_DECL([build_old_libs], [enable_static], [0],
12355	[Whether or not to build static libraries])
12356])# _LT_ENABLE_STATIC
12357
12358LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
12359LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
12360
12361# Old names:
12362AC_DEFUN([AC_ENABLE_STATIC],
12363[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
12364])
12365
12366AC_DEFUN([AC_DISABLE_STATIC],
12367[_LT_SET_OPTION([LT_INIT], [disable-static])
12368])
12369
12370AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
12371AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
12372
12373dnl aclocal-1.4 backwards compatibility:
12374dnl AC_DEFUN([AM_ENABLE_STATIC], [])
12375dnl AC_DEFUN([AM_DISABLE_STATIC], [])
12376
12377
12378
12379# _LT_ENABLE_FAST_INSTALL([DEFAULT])
12380# ----------------------------------
12381# implement the --enable-fast-install flag, and support the 'fast-install'
12382# and 'disable-fast-install' LT_INIT options.
12383# DEFAULT is either 'yes' or 'no'.  If omitted, it defaults to 'yes'.
12384m4_define([_LT_ENABLE_FAST_INSTALL],
12385[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
12386AC_ARG_ENABLE([fast-install],
12387    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
12388    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
12389    [p=${PACKAGE-default}
12390    case $enableval in
12391    yes) enable_fast_install=yes ;;
12392    no) enable_fast_install=no ;;
12393    *)
12394      enable_fast_install=no
12395      # Look at the argument we got.  We use all the common list separators.
12396      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
12397      for pkg in $enableval; do
12398	IFS=$lt_save_ifs
12399	if test "X$pkg" = "X$p"; then
12400	  enable_fast_install=yes
12401	fi
12402      done
12403      IFS=$lt_save_ifs
12404      ;;
12405    esac],
12406    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
12407
12408_LT_DECL([fast_install], [enable_fast_install], [0],
12409	 [Whether or not to optimize for fast installation])dnl
12410])# _LT_ENABLE_FAST_INSTALL
12411
12412LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
12413LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
12414
12415# Old names:
12416AU_DEFUN([AC_ENABLE_FAST_INSTALL],
12417[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
12418AC_DIAGNOSE([obsolete],
12419[$0: Remove this warning and the call to _LT_SET_OPTION when you put
12420the 'fast-install' option into LT_INIT's first parameter.])
12421])
12422
12423AU_DEFUN([AC_DISABLE_FAST_INSTALL],
12424[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
12425AC_DIAGNOSE([obsolete],
12426[$0: Remove this warning and the call to _LT_SET_OPTION when you put
12427the 'disable-fast-install' option into LT_INIT's first parameter.])
12428])
12429
12430dnl aclocal-1.4 backwards compatibility:
12431dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
12432dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
12433
12434
12435# _LT_WITH_AIX_SONAME([DEFAULT])
12436# ----------------------------------
12437# implement the --with-aix-soname flag, and support the `aix-soname=aix'
12438# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT
12439# is either `aix', `both' or `svr4'.  If omitted, it defaults to `aix'.
12440m4_define([_LT_WITH_AIX_SONAME],
12441[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl
12442shared_archive_member_spec=
12443case $host,$enable_shared in
12444power*-*-aix[[5-9]]*,yes)
12445  AC_MSG_CHECKING([which variant of shared library versioning to provide])
12446  AC_ARG_WITH([aix-soname],
12447    [AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
12448      [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])],
12449    [case $withval in
12450    aix|svr4|both)
12451      ;;
12452    *)
12453      AC_MSG_ERROR([Unknown argument to --with-aix-soname])
12454      ;;
12455    esac
12456    lt_cv_with_aix_soname=$with_aix_soname],
12457    [AC_CACHE_VAL([lt_cv_with_aix_soname],
12458      [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)
12459    with_aix_soname=$lt_cv_with_aix_soname])
12460  AC_MSG_RESULT([$with_aix_soname])
12461  if test aix != "$with_aix_soname"; then
12462    # For the AIX way of multilib, we name the shared archive member
12463    # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
12464    # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
12465    # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
12466    # the AIX toolchain works better with OBJECT_MODE set (default 32).
12467    if test 64 = "${OBJECT_MODE-32}"; then
12468      shared_archive_member_spec=shr_64
12469    else
12470      shared_archive_member_spec=shr
12471    fi
12472  fi
12473  ;;
12474*)
12475  with_aix_soname=aix
12476  ;;
12477esac
12478
12479_LT_DECL([], [shared_archive_member_spec], [0],
12480    [Shared archive member basename, for filename based shared library versioning on AIX])dnl
12481])# _LT_WITH_AIX_SONAME
12482
12483LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])])
12484LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])])
12485LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])])
12486
12487
12488# _LT_WITH_PIC([MODE])
12489# --------------------
12490# implement the --with-pic flag, and support the 'pic-only' and 'no-pic'
12491# LT_INIT options.
12492# MODE is either 'yes' or 'no'.  If omitted, it defaults to 'both'.
12493m4_define([_LT_WITH_PIC],
12494[AC_ARG_WITH([pic],
12495    [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
12496	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
12497    [lt_p=${PACKAGE-default}
12498    case $withval in
12499    yes|no) pic_mode=$withval ;;
12500    *)
12501      pic_mode=default
12502      # Look at the argument we got.  We use all the common list separators.
12503      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
12504      for lt_pkg in $withval; do
12505	IFS=$lt_save_ifs
12506	if test "X$lt_pkg" = "X$lt_p"; then
12507	  pic_mode=yes
12508	fi
12509      done
12510      IFS=$lt_save_ifs
12511      ;;
12512    esac],
12513    [pic_mode=m4_default([$1], [default])])
12514
12515_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
12516])# _LT_WITH_PIC
12517
12518LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
12519LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
12520
12521# Old name:
12522AU_DEFUN([AC_LIBTOOL_PICMODE],
12523[_LT_SET_OPTION([LT_INIT], [pic-only])
12524AC_DIAGNOSE([obsolete],
12525[$0: Remove this warning and the call to _LT_SET_OPTION when you
12526put the 'pic-only' option into LT_INIT's first parameter.])
12527])
12528
12529dnl aclocal-1.4 backwards compatibility:
12530dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
12531
12532
12533m4_define([_LTDL_MODE], [])
12534LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
12535		 [m4_define([_LTDL_MODE], [nonrecursive])])
12536LT_OPTION_DEFINE([LTDL_INIT], [recursive],
12537		 [m4_define([_LTDL_MODE], [recursive])])
12538LT_OPTION_DEFINE([LTDL_INIT], [subproject],
12539		 [m4_define([_LTDL_MODE], [subproject])])
12540
12541m4_define([_LTDL_TYPE], [])
12542LT_OPTION_DEFINE([LTDL_INIT], [installable],
12543		 [m4_define([_LTDL_TYPE], [installable])])
12544LT_OPTION_DEFINE([LTDL_INIT], [convenience],
12545		 [m4_define([_LTDL_TYPE], [convenience])])
12546
12547# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
12548#
12549# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 Free Software
12550# Foundation, Inc.
12551# Written by Gary V. Vaughan, 2004
12552#
12553# This file is free software; the Free Software Foundation gives
12554# unlimited permission to copy and/or distribute it, with or without
12555# modifications, as long as this notice is preserved.
12556
12557# serial 6 ltsugar.m4
12558
12559# This is to help aclocal find these macros, as it can't see m4_define.
12560AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
12561
12562
12563# lt_join(SEP, ARG1, [ARG2...])
12564# -----------------------------
12565# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
12566# associated separator.
12567# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
12568# versions in m4sugar had bugs.
12569m4_define([lt_join],
12570[m4_if([$#], [1], [],
12571       [$#], [2], [[$2]],
12572       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
12573m4_define([_lt_join],
12574[m4_if([$#$2], [2], [],
12575       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
12576
12577
12578# lt_car(LIST)
12579# lt_cdr(LIST)
12580# ------------
12581# Manipulate m4 lists.
12582# These macros are necessary as long as will still need to support
12583# Autoconf-2.59, which quotes differently.
12584m4_define([lt_car], [[$1]])
12585m4_define([lt_cdr],
12586[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
12587       [$#], 1, [],
12588       [m4_dquote(m4_shift($@))])])
12589m4_define([lt_unquote], $1)
12590
12591
12592# lt_append(MACRO-NAME, STRING, [SEPARATOR])
12593# ------------------------------------------
12594# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'.
12595# Note that neither SEPARATOR nor STRING are expanded; they are appended
12596# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
12597# No SEPARATOR is output if MACRO-NAME was previously undefined (different
12598# than defined and empty).
12599#
12600# This macro is needed until we can rely on Autoconf 2.62, since earlier
12601# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
12602m4_define([lt_append],
12603[m4_define([$1],
12604	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
12605
12606
12607
12608# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
12609# ----------------------------------------------------------
12610# Produce a SEP delimited list of all paired combinations of elements of
12611# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
12612# has the form PREFIXmINFIXSUFFIXn.
12613# Needed until we can rely on m4_combine added in Autoconf 2.62.
12614m4_define([lt_combine],
12615[m4_if(m4_eval([$# > 3]), [1],
12616       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
12617[[m4_foreach([_Lt_prefix], [$2],
12618	     [m4_foreach([_Lt_suffix],
12619		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
12620	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
12621
12622
12623# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
12624# -----------------------------------------------------------------------
12625# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
12626# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
12627m4_define([lt_if_append_uniq],
12628[m4_ifdef([$1],
12629	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
12630		 [lt_append([$1], [$2], [$3])$4],
12631		 [$5])],
12632	  [lt_append([$1], [$2], [$3])$4])])
12633
12634
12635# lt_dict_add(DICT, KEY, VALUE)
12636# -----------------------------
12637m4_define([lt_dict_add],
12638[m4_define([$1($2)], [$3])])
12639
12640
12641# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
12642# --------------------------------------------
12643m4_define([lt_dict_add_subkey],
12644[m4_define([$1($2:$3)], [$4])])
12645
12646
12647# lt_dict_fetch(DICT, KEY, [SUBKEY])
12648# ----------------------------------
12649m4_define([lt_dict_fetch],
12650[m4_ifval([$3],
12651	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
12652    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
12653
12654
12655# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
12656# -----------------------------------------------------------------
12657m4_define([lt_if_dict_fetch],
12658[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
12659	[$5],
12660    [$6])])
12661
12662
12663# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
12664# --------------------------------------------------------------
12665m4_define([lt_dict_filter],
12666[m4_if([$5], [], [],
12667  [lt_join(m4_quote(m4_default([$4], [[, ]])),
12668           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
12669		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
12670])
12671
12672# ltversion.m4 -- version numbers			-*- Autoconf -*-
12673#
12674#   Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation,
12675#   Inc.
12676#   Written by Scott James Remnant, 2004
12677#
12678# This file is free software; the Free Software Foundation gives
12679# unlimited permission to copy and/or distribute it, with or without
12680# modifications, as long as this notice is preserved.
12681
12682# @configure_input@
12683
12684# serial 4245 ltversion.m4
12685# This file is part of GNU Libtool
12686
12687m4_define([LT_PACKAGE_VERSION], [2.4.7])
12688m4_define([LT_PACKAGE_REVISION], [2.4.7])
12689
12690AC_DEFUN([LTVERSION_VERSION],
12691[macro_version='2.4.7'
12692macro_revision='2.4.7'
12693_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
12694_LT_DECL(, macro_revision, 0)
12695])
12696
12697# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
12698#
12699#   Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2022 Free
12700#   Software Foundation, Inc.
12701#   Written by Scott James Remnant, 2004.
12702#
12703# This file is free software; the Free Software Foundation gives
12704# unlimited permission to copy and/or distribute it, with or without
12705# modifications, as long as this notice is preserved.
12706
12707# serial 5 lt~obsolete.m4
12708
12709# These exist entirely to fool aclocal when bootstrapping libtool.
12710#
12711# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN),
12712# which have later been changed to m4_define as they aren't part of the
12713# exported API, or moved to Autoconf or Automake where they belong.
12714#
12715# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
12716# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
12717# using a macro with the same name in our local m4/libtool.m4 it'll
12718# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
12719# and doesn't know about Autoconf macros at all.)
12720#
12721# So we provide this file, which has a silly filename so it's always
12722# included after everything else.  This provides aclocal with the
12723# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
12724# because those macros already exist, or will be overwritten later.
12725# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
12726#
12727# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
12728# Yes, that means every name once taken will need to remain here until
12729# we give up compatibility with versions before 1.7, at which point
12730# we need to keep only those names which we still refer to.
12731
12732# This is to help aclocal find these macros, as it can't see m4_define.
12733AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
12734
12735m4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
12736m4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
12737m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
12738m4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
12739m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
12740m4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
12741m4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
12742m4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
12743m4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
12744m4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
12745m4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
12746m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
12747m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
12748m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
12749m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
12750m4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
12751m4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
12752m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
12753m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
12754m4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
12755m4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
12756m4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
12757m4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
12758m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
12759m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
12760m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
12761m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
12762m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
12763m4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
12764m4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
12765m4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
12766m4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
12767m4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
12768m4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
12769m4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
12770m4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
12771m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
12772m4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
12773m4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
12774m4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
12775m4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
12776m4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
12777m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
12778m4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
12779m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
12780m4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
12781m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
12782m4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
12783m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
12784m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
12785m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
12786m4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
12787m4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
12788m4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
12789m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS],	[AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
12790m4_ifndef([_LT_AC_PROG_CXXCPP],		[AC_DEFUN([_LT_AC_PROG_CXXCPP])])
12791m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS],	[AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
12792m4_ifndef([_LT_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
12793m4_ifndef([_LT_PROG_F77],		[AC_DEFUN([_LT_PROG_F77])])
12794m4_ifndef([_LT_PROG_FC],		[AC_DEFUN([_LT_PROG_FC])])
12795m4_ifndef([_LT_PROG_CXX],		[AC_DEFUN([_LT_PROG_CXX])])
12796
12797