1# generated automatically by aclocal 1.16.2 -*- Autoconf -*-
2
3# Copyright (C) 1996-2020 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.69],,
18[m4_warning([this file was generated for autoconf 2.69.
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-2020 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.2], [],
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.2])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-2020 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-2020 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-2020 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-2020 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-2020 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
431dnl Autoconf wants to disallow AM_ names.  We explicitly allow
432dnl the ones we care about.
433m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
434AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
435AC_REQUIRE([AC_PROG_INSTALL])dnl
436if test "`cd $srcdir && pwd`" != "`pwd`"; then
437  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
438  # is not polluted with repeated "-I."
439  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
440  # test to see if srcdir already configured
441  if test -f $srcdir/config.status; then
442    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
443  fi
444fi
445
446# test whether we have cygpath
447if test -z "$CYGPATH_W"; then
448  if (cygpath --version) >/dev/null 2>/dev/null; then
449    CYGPATH_W='cygpath -w'
450  else
451    CYGPATH_W=echo
452  fi
453fi
454AC_SUBST([CYGPATH_W])
455
456# Define the identity of the package.
457dnl Distinguish between old-style and new-style calls.
458m4_ifval([$2],
459[AC_DIAGNOSE([obsolete],
460             [$0: two- and three-arguments forms are deprecated.])
461m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
462 AC_SUBST([PACKAGE], [$1])dnl
463 AC_SUBST([VERSION], [$2])],
464[_AM_SET_OPTIONS([$1])dnl
465dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
466m4_if(
467  m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
468  [ok:ok],,
469  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
470 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
471 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
472
473_AM_IF_OPTION([no-define],,
474[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
475 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
476
477# Some tools Automake needs.
478AC_REQUIRE([AM_SANITY_CHECK])dnl
479AC_REQUIRE([AC_ARG_PROGRAM])dnl
480AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
481AM_MISSING_PROG([AUTOCONF], [autoconf])
482AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
483AM_MISSING_PROG([AUTOHEADER], [autoheader])
484AM_MISSING_PROG([MAKEINFO], [makeinfo])
485AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
486AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
487AC_REQUIRE([AC_PROG_MKDIR_P])dnl
488# For better backward compatibility.  To be removed once Automake 1.9.x
489# dies out for good.  For more background, see:
490# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
491# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
492AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
493# We need awk for the "check" target (and possibly the TAP driver).  The
494# system "awk" is bad on some platforms.
495AC_REQUIRE([AC_PROG_AWK])dnl
496AC_REQUIRE([AC_PROG_MAKE_SET])dnl
497AC_REQUIRE([AM_SET_LEADING_DOT])dnl
498_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
499	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
500			     [_AM_PROG_TAR([v7])])])
501_AM_IF_OPTION([no-dependencies],,
502[AC_PROVIDE_IFELSE([AC_PROG_CC],
503		  [_AM_DEPENDENCIES([CC])],
504		  [m4_define([AC_PROG_CC],
505			     m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
506AC_PROVIDE_IFELSE([AC_PROG_CXX],
507		  [_AM_DEPENDENCIES([CXX])],
508		  [m4_define([AC_PROG_CXX],
509			     m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
510AC_PROVIDE_IFELSE([AC_PROG_OBJC],
511		  [_AM_DEPENDENCIES([OBJC])],
512		  [m4_define([AC_PROG_OBJC],
513			     m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
514AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
515		  [_AM_DEPENDENCIES([OBJCXX])],
516		  [m4_define([AC_PROG_OBJCXX],
517			     m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
518])
519AC_REQUIRE([AM_SILENT_RULES])dnl
520dnl The testsuite driver may need to know about EXEEXT, so add the
521dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
522dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
523AC_CONFIG_COMMANDS_PRE(dnl
524[m4_provide_if([_AM_COMPILER_EXEEXT],
525  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
526
527# POSIX will say in a future version that running "rm -f" with no argument
528# is OK; and we want to be able to make that assumption in our Makefile
529# recipes.  So use an aggressive probe to check that the usage we want is
530# actually supported "in the wild" to an acceptable degree.
531# See automake bug#10828.
532# To make any issue more visible, cause the running configure to be aborted
533# by default if the 'rm' program in use doesn't match our expectations; the
534# user can still override this though.
535if rm -f && rm -fr && rm -rf; then : OK; else
536  cat >&2 <<'END'
537Oops!
538
539Your 'rm' program seems unable to run without file operands specified
540on the command line, even when the '-f' option is present.  This is contrary
541to the behaviour of most rm programs out there, and not conforming with
542the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
543
544Please tell bug-automake@gnu.org about your system, including the value
545of your $PATH and any error possibly output before this message.  This
546can help us improve future automake versions.
547
548END
549  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
550    echo 'Configuration will proceed anyway, since you have set the' >&2
551    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
552    echo >&2
553  else
554    cat >&2 <<'END'
555Aborting the configuration process, to ensure you take notice of the issue.
556
557You can download and install GNU coreutils to get an 'rm' implementation
558that behaves properly: <https://www.gnu.org/software/coreutils/>.
559
560If you want to complete the configuration process using your problematic
561'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
562to "yes", and re-run configure.
563
564END
565    AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
566  fi
567fi
568dnl The trailing newline in this macro's definition is deliberate, for
569dnl backward compatibility and to allow trailing 'dnl'-style comments
570dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
571])
572
573dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
574dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
575dnl mangled by Autoconf and run in a shell conditional statement.
576m4_define([_AC_COMPILER_EXEEXT],
577m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
578
579# When config.status generates a header, we must update the stamp-h file.
580# This file resides in the same directory as the config header
581# that is generated.  The stamp files are numbered to have different names.
582
583# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
584# loop where config.status creates the headers, so we can generate
585# our stamp files there.
586AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
587[# Compute $1's index in $config_headers.
588_am_arg=$1
589_am_stamp_count=1
590for _am_header in $config_headers :; do
591  case $_am_header in
592    $_am_arg | $_am_arg:* )
593      break ;;
594    * )
595      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
596  esac
597done
598echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
599
600# Copyright (C) 2001-2020 Free Software Foundation, Inc.
601#
602# This file is free software; the Free Software Foundation
603# gives unlimited permission to copy and/or distribute it,
604# with or without modifications, as long as this notice is preserved.
605
606# AM_PROG_INSTALL_SH
607# ------------------
608# Define $install_sh.
609AC_DEFUN([AM_PROG_INSTALL_SH],
610[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
611if test x"${install_sh+set}" != xset; then
612  case $am_aux_dir in
613  *\ * | *\	*)
614    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
615  *)
616    install_sh="\${SHELL} $am_aux_dir/install-sh"
617  esac
618fi
619AC_SUBST([install_sh])])
620
621# Copyright (C) 2003-2020 Free Software Foundation, Inc.
622#
623# This file is free software; the Free Software Foundation
624# gives unlimited permission to copy and/or distribute it,
625# with or without modifications, as long as this notice is preserved.
626
627# Check whether the underlying file-system supports filenames
628# with a leading dot.  For instance MS-DOS doesn't.
629AC_DEFUN([AM_SET_LEADING_DOT],
630[rm -rf .tst 2>/dev/null
631mkdir .tst 2>/dev/null
632if test -d .tst; then
633  am__leading_dot=.
634else
635  am__leading_dot=_
636fi
637rmdir .tst 2>/dev/null
638AC_SUBST([am__leading_dot])])
639
640# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
641# From Jim Meyering
642
643# Copyright (C) 1996-2020 Free Software Foundation, Inc.
644#
645# This file is free software; the Free Software Foundation
646# gives unlimited permission to copy and/or distribute it,
647# with or without modifications, as long as this notice is preserved.
648
649# AM_MAINTAINER_MODE([DEFAULT-MODE])
650# ----------------------------------
651# Control maintainer-specific portions of Makefiles.
652# Default is to disable them, unless 'enable' is passed literally.
653# For symmetry, 'disable' may be passed as well.  Anyway, the user
654# can override the default with the --enable/--disable switch.
655AC_DEFUN([AM_MAINTAINER_MODE],
656[m4_case(m4_default([$1], [disable]),
657       [enable], [m4_define([am_maintainer_other], [disable])],
658       [disable], [m4_define([am_maintainer_other], [enable])],
659       [m4_define([am_maintainer_other], [enable])
660        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
661AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
662  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
663  AC_ARG_ENABLE([maintainer-mode],
664    [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
665      am_maintainer_other[ make rules and dependencies not useful
666      (and sometimes confusing) to the casual installer])],
667    [USE_MAINTAINER_MODE=$enableval],
668    [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
669  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
670  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
671  MAINT=$MAINTAINER_MODE_TRUE
672  AC_SUBST([MAINT])dnl
673]
674)
675
676# Check to see how 'make' treats includes.	            -*- Autoconf -*-
677
678# Copyright (C) 2001-2020 Free Software Foundation, Inc.
679#
680# This file is free software; the Free Software Foundation
681# gives unlimited permission to copy and/or distribute it,
682# with or without modifications, as long as this notice is preserved.
683
684# AM_MAKE_INCLUDE()
685# -----------------
686# Check whether make has an 'include' directive that can support all
687# the idioms we need for our automatic dependency tracking code.
688AC_DEFUN([AM_MAKE_INCLUDE],
689[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive])
690cat > confinc.mk << 'END'
691am__doit:
692	@echo this is the am__doit target >confinc.out
693.PHONY: am__doit
694END
695am__include="#"
696am__quote=
697# BSD make does it like this.
698echo '.include "confinc.mk" # ignored' > confmf.BSD
699# Other make implementations (GNU, Solaris 10, AIX) do it like this.
700echo 'include confinc.mk # ignored' > confmf.GNU
701_am_result=no
702for s in GNU BSD; do
703  AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out])
704  AS_CASE([$?:`cat confinc.out 2>/dev/null`],
705      ['0:this is the am__doit target'],
706      [AS_CASE([$s],
707          [BSD], [am__include='.include' am__quote='"'],
708          [am__include='include' am__quote=''])])
709  if test "$am__include" != "#"; then
710    _am_result="yes ($s style)"
711    break
712  fi
713done
714rm -f confinc.* confmf.*
715AC_MSG_RESULT([${_am_result}])
716AC_SUBST([am__include])])
717AC_SUBST([am__quote])])
718
719# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
720
721# Copyright (C) 1997-2020 Free Software Foundation, Inc.
722#
723# This file is free software; the Free Software Foundation
724# gives unlimited permission to copy and/or distribute it,
725# with or without modifications, as long as this notice is preserved.
726
727# AM_MISSING_PROG(NAME, PROGRAM)
728# ------------------------------
729AC_DEFUN([AM_MISSING_PROG],
730[AC_REQUIRE([AM_MISSING_HAS_RUN])
731$1=${$1-"${am_missing_run}$2"}
732AC_SUBST($1)])
733
734# AM_MISSING_HAS_RUN
735# ------------------
736# Define MISSING if not defined so far and test if it is modern enough.
737# If it is, set am_missing_run to use it, otherwise, to nothing.
738AC_DEFUN([AM_MISSING_HAS_RUN],
739[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
740AC_REQUIRE_AUX_FILE([missing])dnl
741if test x"${MISSING+set}" != xset; then
742  case $am_aux_dir in
743  *\ * | *\	*)
744    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
745  *)
746    MISSING="\${SHELL} $am_aux_dir/missing" ;;
747  esac
748fi
749# Use eval to expand $SHELL
750if eval "$MISSING --is-lightweight"; then
751  am_missing_run="$MISSING "
752else
753  am_missing_run=
754  AC_MSG_WARN(['missing' script is too old or missing])
755fi
756])
757
758# Helper functions for option handling.                     -*- Autoconf -*-
759
760# Copyright (C) 2001-2020 Free Software Foundation, Inc.
761#
762# This file is free software; the Free Software Foundation
763# gives unlimited permission to copy and/or distribute it,
764# with or without modifications, as long as this notice is preserved.
765
766# _AM_MANGLE_OPTION(NAME)
767# -----------------------
768AC_DEFUN([_AM_MANGLE_OPTION],
769[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
770
771# _AM_SET_OPTION(NAME)
772# --------------------
773# Set option NAME.  Presently that only means defining a flag for this option.
774AC_DEFUN([_AM_SET_OPTION],
775[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
776
777# _AM_SET_OPTIONS(OPTIONS)
778# ------------------------
779# OPTIONS is a space-separated list of Automake options.
780AC_DEFUN([_AM_SET_OPTIONS],
781[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
782
783# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
784# -------------------------------------------
785# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
786AC_DEFUN([_AM_IF_OPTION],
787[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
788
789# Copyright (C) 1999-2020 Free Software Foundation, Inc.
790#
791# This file is free software; the Free Software Foundation
792# gives unlimited permission to copy and/or distribute it,
793# with or without modifications, as long as this notice is preserved.
794
795# _AM_PROG_CC_C_O
796# ---------------
797# Like AC_PROG_CC_C_O, but changed for automake.  We rewrite AC_PROG_CC
798# to automatically call this.
799AC_DEFUN([_AM_PROG_CC_C_O],
800[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
801AC_REQUIRE_AUX_FILE([compile])dnl
802AC_LANG_PUSH([C])dnl
803AC_CACHE_CHECK(
804  [whether $CC understands -c and -o together],
805  [am_cv_prog_cc_c_o],
806  [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
807  # Make sure it works both with $CC and with simple cc.
808  # Following AC_PROG_CC_C_O, we do the test twice because some
809  # compilers refuse to overwrite an existing .o file with -o,
810  # though they will create one.
811  am_cv_prog_cc_c_o=yes
812  for am_i in 1 2; do
813    if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
814         && test -f conftest2.$ac_objext; then
815      : OK
816    else
817      am_cv_prog_cc_c_o=no
818      break
819    fi
820  done
821  rm -f core conftest*
822  unset am_i])
823if test "$am_cv_prog_cc_c_o" != yes; then
824   # Losing compiler, so override with the script.
825   # FIXME: It is wrong to rewrite CC.
826   # But if we don't then we get into trouble of one sort or another.
827   # A longer-term fix would be to have automake use am__CC in this case,
828   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
829   CC="$am_aux_dir/compile $CC"
830fi
831AC_LANG_POP([C])])
832
833# For backward compatibility.
834AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
835
836# Copyright (C) 2001-2020 Free Software Foundation, Inc.
837#
838# This file is free software; the Free Software Foundation
839# gives unlimited permission to copy and/or distribute it,
840# with or without modifications, as long as this notice is preserved.
841
842# AM_RUN_LOG(COMMAND)
843# -------------------
844# Run COMMAND, save the exit status in ac_status, and log it.
845# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
846AC_DEFUN([AM_RUN_LOG],
847[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
848   ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
849   ac_status=$?
850   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
851   (exit $ac_status); }])
852
853# Check to make sure that the build environment is sane.    -*- Autoconf -*-
854
855# Copyright (C) 1996-2020 Free Software Foundation, Inc.
856#
857# This file is free software; the Free Software Foundation
858# gives unlimited permission to copy and/or distribute it,
859# with or without modifications, as long as this notice is preserved.
860
861# AM_SANITY_CHECK
862# ---------------
863AC_DEFUN([AM_SANITY_CHECK],
864[AC_MSG_CHECKING([whether build environment is sane])
865# Reject unsafe characters in $srcdir or the absolute working directory
866# name.  Accept space and tab only in the latter.
867am_lf='
868'
869case `pwd` in
870  *[[\\\"\#\$\&\'\`$am_lf]]*)
871    AC_MSG_ERROR([unsafe absolute working directory name]);;
872esac
873case $srcdir in
874  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
875    AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
876esac
877
878# Do 'set' in a subshell so we don't clobber the current shell's
879# arguments.  Must try -L first in case configure is actually a
880# symlink; some systems play weird games with the mod time of symlinks
881# (eg FreeBSD returns the mod time of the symlink's containing
882# directory).
883if (
884   am_has_slept=no
885   for am_try in 1 2; do
886     echo "timestamp, slept: $am_has_slept" > conftest.file
887     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
888     if test "$[*]" = "X"; then
889	# -L didn't work.
890	set X `ls -t "$srcdir/configure" conftest.file`
891     fi
892     if test "$[*]" != "X $srcdir/configure conftest.file" \
893	&& test "$[*]" != "X conftest.file $srcdir/configure"; then
894
895	# If neither matched, then we have a broken ls.  This can happen
896	# if, for instance, CONFIG_SHELL is bash and it inherits a
897	# broken ls alias from the environment.  This has actually
898	# happened.  Such a system could not be considered "sane".
899	AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
900  alias in your environment])
901     fi
902     if test "$[2]" = conftest.file || test $am_try -eq 2; then
903       break
904     fi
905     # Just in case.
906     sleep 1
907     am_has_slept=yes
908   done
909   test "$[2]" = conftest.file
910   )
911then
912   # Ok.
913   :
914else
915   AC_MSG_ERROR([newly created file is older than distributed files!
916Check your system clock])
917fi
918AC_MSG_RESULT([yes])
919# If we didn't sleep, we still need to ensure time stamps of config.status and
920# generated files are strictly newer.
921am_sleep_pid=
922if grep 'slept: no' conftest.file >/dev/null 2>&1; then
923  ( sleep 1 ) &
924  am_sleep_pid=$!
925fi
926AC_CONFIG_COMMANDS_PRE(
927  [AC_MSG_CHECKING([that generated files are newer than configure])
928   if test -n "$am_sleep_pid"; then
929     # Hide warnings about reused PIDs.
930     wait $am_sleep_pid 2>/dev/null
931   fi
932   AC_MSG_RESULT([done])])
933rm -f conftest.file
934])
935
936# Copyright (C) 2009-2020 Free Software Foundation, Inc.
937#
938# This file is free software; the Free Software Foundation
939# gives unlimited permission to copy and/or distribute it,
940# with or without modifications, as long as this notice is preserved.
941
942# AM_SILENT_RULES([DEFAULT])
943# --------------------------
944# Enable less verbose build rules; with the default set to DEFAULT
945# ("yes" being less verbose, "no" or empty being verbose).
946AC_DEFUN([AM_SILENT_RULES],
947[AC_ARG_ENABLE([silent-rules], [dnl
948AS_HELP_STRING(
949  [--enable-silent-rules],
950  [less verbose build output (undo: "make V=1")])
951AS_HELP_STRING(
952  [--disable-silent-rules],
953  [verbose build output (undo: "make V=0")])dnl
954])
955case $enable_silent_rules in @%:@ (((
956  yes) AM_DEFAULT_VERBOSITY=0;;
957   no) AM_DEFAULT_VERBOSITY=1;;
958    *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
959esac
960dnl
961dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
962dnl do not support nested variable expansions.
963dnl See automake bug#9928 and bug#10237.
964am_make=${MAKE-make}
965AC_CACHE_CHECK([whether $am_make supports nested variables],
966   [am_cv_make_support_nested_variables],
967   [if AS_ECHO([['TRUE=$(BAR$(V))
968BAR0=false
969BAR1=true
970V=1
971am__doit:
972	@$(TRUE)
973.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
974  am_cv_make_support_nested_variables=yes
975else
976  am_cv_make_support_nested_variables=no
977fi])
978if test $am_cv_make_support_nested_variables = yes; then
979  dnl Using '$V' instead of '$(V)' breaks IRIX make.
980  AM_V='$(V)'
981  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
982else
983  AM_V=$AM_DEFAULT_VERBOSITY
984  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
985fi
986AC_SUBST([AM_V])dnl
987AM_SUBST_NOTMAKE([AM_V])dnl
988AC_SUBST([AM_DEFAULT_V])dnl
989AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
990AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
991AM_BACKSLASH='\'
992AC_SUBST([AM_BACKSLASH])dnl
993_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
994])
995
996# Copyright (C) 2001-2020 Free Software Foundation, Inc.
997#
998# This file is free software; the Free Software Foundation
999# gives unlimited permission to copy and/or distribute it,
1000# with or without modifications, as long as this notice is preserved.
1001
1002# AM_PROG_INSTALL_STRIP
1003# ---------------------
1004# One issue with vendor 'install' (even GNU) is that you can't
1005# specify the program used to strip binaries.  This is especially
1006# annoying in cross-compiling environments, where the build's strip
1007# is unlikely to handle the host's binaries.
1008# Fortunately install-sh will honor a STRIPPROG variable, so we
1009# always use install-sh in "make install-strip", and initialize
1010# STRIPPROG with the value of the STRIP variable (set by the user).
1011AC_DEFUN([AM_PROG_INSTALL_STRIP],
1012[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1013# Installed binaries are usually stripped using 'strip' when the user
1014# run "make install-strip".  However 'strip' might not be the right
1015# tool to use in cross-compilation environments, therefore Automake
1016# will honor the 'STRIP' environment variable to overrule this program.
1017dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
1018if test "$cross_compiling" != no; then
1019  AC_CHECK_TOOL([STRIP], [strip], :)
1020fi
1021INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1022AC_SUBST([INSTALL_STRIP_PROGRAM])])
1023
1024# Copyright (C) 2006-2020 Free Software Foundation, Inc.
1025#
1026# This file is free software; the Free Software Foundation
1027# gives unlimited permission to copy and/or distribute it,
1028# with or without modifications, as long as this notice is preserved.
1029
1030# _AM_SUBST_NOTMAKE(VARIABLE)
1031# ---------------------------
1032# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1033# This macro is traced by Automake.
1034AC_DEFUN([_AM_SUBST_NOTMAKE])
1035
1036# AM_SUBST_NOTMAKE(VARIABLE)
1037# --------------------------
1038# Public sister of _AM_SUBST_NOTMAKE.
1039AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1040
1041# Check how to create a tarball.                            -*- Autoconf -*-
1042
1043# Copyright (C) 2004-2020 Free Software Foundation, Inc.
1044#
1045# This file is free software; the Free Software Foundation
1046# gives unlimited permission to copy and/or distribute it,
1047# with or without modifications, as long as this notice is preserved.
1048
1049# _AM_PROG_TAR(FORMAT)
1050# --------------------
1051# Check how to create a tarball in format FORMAT.
1052# FORMAT should be one of 'v7', 'ustar', or 'pax'.
1053#
1054# Substitute a variable $(am__tar) that is a command
1055# writing to stdout a FORMAT-tarball containing the directory
1056# $tardir.
1057#     tardir=directory && $(am__tar) > result.tar
1058#
1059# Substitute a variable $(am__untar) that extract such
1060# a tarball read from stdin.
1061#     $(am__untar) < result.tar
1062#
1063AC_DEFUN([_AM_PROG_TAR],
1064[# Always define AMTAR for backward compatibility.  Yes, it's still used
1065# in the wild :-(  We should find a proper way to deprecate it ...
1066AC_SUBST([AMTAR], ['$${TAR-tar}'])
1067
1068# We'll loop over all known methods to create a tar archive until one works.
1069_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1070
1071m4_if([$1], [v7],
1072  [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
1073
1074  [m4_case([$1],
1075    [ustar],
1076     [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
1077      # There is notably a 21 bits limit for the UID and the GID.  In fact,
1078      # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
1079      # and bug#13588).
1080      am_max_uid=2097151 # 2^21 - 1
1081      am_max_gid=$am_max_uid
1082      # The $UID and $GID variables are not portable, so we need to resort
1083      # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
1084      # below are definitely unexpected, so allow the users to see them
1085      # (that is, avoid stderr redirection).
1086      am_uid=`id -u || echo unknown`
1087      am_gid=`id -g || echo unknown`
1088      AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
1089      if test $am_uid -le $am_max_uid; then
1090         AC_MSG_RESULT([yes])
1091      else
1092         AC_MSG_RESULT([no])
1093         _am_tools=none
1094      fi
1095      AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
1096      if test $am_gid -le $am_max_gid; then
1097         AC_MSG_RESULT([yes])
1098      else
1099        AC_MSG_RESULT([no])
1100        _am_tools=none
1101      fi],
1102
1103  [pax],
1104    [],
1105
1106  [m4_fatal([Unknown tar format])])
1107
1108  AC_MSG_CHECKING([how to create a $1 tar archive])
1109
1110  # Go ahead even if we have the value already cached.  We do so because we
1111  # need to set the values for the 'am__tar' and 'am__untar' variables.
1112  _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1113
1114  for _am_tool in $_am_tools; do
1115    case $_am_tool in
1116    gnutar)
1117      for _am_tar in tar gnutar gtar; do
1118        AM_RUN_LOG([$_am_tar --version]) && break
1119      done
1120      am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1121      am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1122      am__untar="$_am_tar -xf -"
1123      ;;
1124    plaintar)
1125      # Must skip GNU tar: if it does not support --format= it doesn't create
1126      # ustar tarball either.
1127      (tar --version) >/dev/null 2>&1 && continue
1128      am__tar='tar chf - "$$tardir"'
1129      am__tar_='tar chf - "$tardir"'
1130      am__untar='tar xf -'
1131      ;;
1132    pax)
1133      am__tar='pax -L -x $1 -w "$$tardir"'
1134      am__tar_='pax -L -x $1 -w "$tardir"'
1135      am__untar='pax -r'
1136      ;;
1137    cpio)
1138      am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1139      am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1140      am__untar='cpio -i -H $1 -d'
1141      ;;
1142    none)
1143      am__tar=false
1144      am__tar_=false
1145      am__untar=false
1146      ;;
1147    esac
1148
1149    # If the value was cached, stop now.  We just wanted to have am__tar
1150    # and am__untar set.
1151    test -n "${am_cv_prog_tar_$1}" && break
1152
1153    # tar/untar a dummy directory, and stop if the command works.
1154    rm -rf conftest.dir
1155    mkdir conftest.dir
1156    echo GrepMe > conftest.dir/file
1157    AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1158    rm -rf conftest.dir
1159    if test -s conftest.tar; then
1160      AM_RUN_LOG([$am__untar <conftest.tar])
1161      AM_RUN_LOG([cat conftest.dir/file])
1162      grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1163    fi
1164  done
1165  rm -rf conftest.dir
1166
1167  AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1168  AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1169
1170AC_SUBST([am__tar])
1171AC_SUBST([am__untar])
1172]) # _AM_PROG_TAR
1173
1174# Copyright (C) 1995-2002 Free Software Foundation, Inc.
1175# Copyright (C) 2001-2003,2004 Red Hat, Inc.
1176#
1177# This file is free software, distributed under the terms of the GNU
1178# General Public License.  As a special exception to the GNU General
1179# Public License, this file may be distributed as part of a program
1180# that contains a configuration script generated by Autoconf, under
1181# the same distribution terms as the rest of that program.
1182#
1183# This file can be copied and used freely without restrictions.  It can
1184# be used in projects which are not available under the GNU Public License
1185# but which still want to provide support for the GNU gettext functionality.
1186#
1187# Macro to add for using GNU gettext.
1188# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
1189#
1190# Modified to never use included libintl.
1191# Owen Taylor <otaylor@redhat.com>, 12/15/1998
1192#
1193# Major rework to remove unused code
1194# Owen Taylor <otaylor@redhat.com>, 12/11/2002
1195#
1196# Added better handling of ALL_LINGUAS from GNU gettext version
1197# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
1198#
1199# Modified to require ngettext
1200# Matthias Clasen <mclasen@redhat.com> 08/06/2004
1201
1202# Increment this whenever this file is changed.
1203#serial 1
1204
1205# We need this here as well, since someone might use autoconf-2.5x
1206# to configure GLib then an older version to configure a package
1207# using AM_GLIB_GNU_GETTEXT
1208AC_PREREQ(2.53)
1209
1210dnl
1211dnl We go to great lengths to make sure that aclocal won't
1212dnl try to pull in the installed version of these macros
1213dnl when running aclocal in the glib directory.
1214dnl
1215m4_copy([AC_DEFUN],[glib_DEFUN])
1216m4_copy([AC_REQUIRE],[glib_REQUIRE])
1217dnl
1218dnl At the end, if we're not within glib, we'll define the public
1219dnl definitions in terms of our private definitions.
1220dnl
1221
1222# GLIB_LC_MESSAGES
1223#--------------------
1224glib_DEFUN([GLIB_LC_MESSAGES],
1225  [AC_CHECK_HEADERS([locale.h])
1226    if test $ac_cv_header_locale_h = yes; then
1227    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
1228      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
1229       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
1230    if test $am_cv_val_LC_MESSAGES = yes; then
1231      AC_DEFINE(HAVE_LC_MESSAGES, 1,
1232        [Define if your <locale.h> file defines LC_MESSAGES.])
1233    fi
1234  fi])
1235
1236# GLIB_PATH_PROG_WITH_TEST
1237#----------------------------
1238dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
1239dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
1240glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
1241[# Extract the first word of "$2", so it can be a program name with args.
1242set dummy $2; ac_word=[$]2
1243AC_MSG_CHECKING([for $ac_word])
1244AC_CACHE_VAL(ac_cv_path_$1,
1245[case "[$]$1" in
1246  /*)
1247  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
1248  ;;
1249  *)
1250  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1251  for ac_dir in ifelse([$5], , $PATH, [$5]); do
1252    test -z "$ac_dir" && ac_dir=.
1253    if test -f $ac_dir/$ac_word; then
1254      if [$3]; then
1255	ac_cv_path_$1="$ac_dir/$ac_word"
1256	break
1257      fi
1258    fi
1259  done
1260  IFS="$ac_save_ifs"
1261dnl If no 4th arg is given, leave the cache variable unset,
1262dnl so AC_PATH_PROGS will keep looking.
1263ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
1264])dnl
1265  ;;
1266esac])dnl
1267$1="$ac_cv_path_$1"
1268if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
1269  AC_MSG_RESULT([$]$1)
1270else
1271  AC_MSG_RESULT(no)
1272fi
1273AC_SUBST($1)dnl
1274])
1275
1276dnl Checks for special options needed on Mac OS X.
1277dnl Defines INTL_MACOSX_LIBS.
1278dnl
1279dnl Copied from intlmacosx.m4 in gettext, GPL.
1280dnl Copyright (C) 2004-2013 Free Software Foundation, Inc.
1281glib_DEFUN([glib_gt_INTL_MACOSX],
1282[
1283  dnl Check for API introduced in Mac OS X 10.2.
1284  AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
1285    [gt_cv_func_CFPreferencesCopyAppValue],
1286    [gt_save_LIBS="$LIBS"
1287     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
1288     AC_LINK_IFELSE(
1289       [AC_LANG_PROGRAM(
1290          [[#include <CoreFoundation/CFPreferences.h>]],
1291          [[CFPreferencesCopyAppValue(NULL, NULL)]])],
1292       [gt_cv_func_CFPreferencesCopyAppValue=yes],
1293       [gt_cv_func_CFPreferencesCopyAppValue=no])
1294     LIBS="$gt_save_LIBS"])
1295  if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
1296    AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1],
1297      [Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
1298  fi
1299  dnl Check for API introduced in Mac OS X 10.3.
1300  AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent],
1301    [gt_save_LIBS="$LIBS"
1302     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
1303     AC_LINK_IFELSE(
1304       [AC_LANG_PROGRAM(
1305          [[#include <CoreFoundation/CFLocale.h>]],
1306          [[CFLocaleCopyCurrent();]])],
1307       [gt_cv_func_CFLocaleCopyCurrent=yes],
1308       [gt_cv_func_CFLocaleCopyCurrent=no])
1309     LIBS="$gt_save_LIBS"])
1310  if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
1311    AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1],
1312      [Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
1313  fi
1314  INTL_MACOSX_LIBS=
1315  if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
1316    INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
1317  fi
1318  AC_SUBST([INTL_MACOSX_LIBS])
1319])
1320
1321# GLIB_WITH_NLS
1322#-----------------
1323glib_DEFUN([GLIB_WITH_NLS],
1324  dnl NLS is obligatory
1325  [USE_NLS=yes
1326    AC_SUBST(USE_NLS)
1327
1328    gt_cv_have_gettext=no
1329
1330    CATOBJEXT=NONE
1331    XGETTEXT=:
1332    INTLLIBS=
1333
1334    glib_gt_INTL_MACOSX
1335
1336    AC_CHECK_HEADER(libintl.h,
1337     [gt_cv_func_dgettext_libintl="no"
1338      libintl_extra_libs=""
1339
1340      #
1341      # First check in libc
1342      #
1343      AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
1344        [AC_TRY_LINK([
1345#include <libintl.h>
1346],
1347         [return !ngettext ("","", 1)],
1348	  gt_cv_func_ngettext_libc=yes,
1349          gt_cv_func_ngettext_libc=no)
1350        ])
1351
1352      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
1353	      AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
1354        	[AC_TRY_LINK([
1355#include <libintl.h>
1356],
1357	          [return !dgettext ("","")],
1358		  gt_cv_func_dgettext_libc=yes,
1359	          gt_cv_func_dgettext_libc=no)
1360        	])
1361      fi
1362
1363      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
1364        AC_CHECK_FUNCS(bind_textdomain_codeset)
1365      fi
1366
1367      #
1368      # If we don't have everything we want, check in libintl
1369      #
1370      if test "$gt_cv_func_dgettext_libc" != "yes" \
1371	 || test "$gt_cv_func_ngettext_libc" != "yes" \
1372         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
1373
1374        AC_CHECK_LIB(intl, bindtextdomain,
1375	    [AC_CHECK_LIB(intl, ngettext,
1376		    [AC_CHECK_LIB(intl, dgettext,
1377			          gt_cv_func_dgettext_libintl=yes)])])
1378
1379	if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
1380	  AC_MSG_CHECKING([if -liconv is needed to use gettext])
1381	  AC_MSG_RESULT([])
1382  	  AC_CHECK_LIB(intl, ngettext,
1383          	[AC_CHECK_LIB(intl, dcgettext,
1384		       [gt_cv_func_dgettext_libintl=yes
1385			libintl_extra_libs=-liconv],
1386			:,-liconv)],
1387		:,-liconv)
1388        fi
1389
1390        #
1391        # If we found libintl, then check in it for bind_textdomain_codeset();
1392        # we'll prefer libc if neither have bind_textdomain_codeset(),
1393        # and both have dgettext and ngettext
1394        #
1395        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
1396          glib_save_LIBS="$LIBS"
1397          LIBS="$LIBS -lintl $libintl_extra_libs"
1398          unset ac_cv_func_bind_textdomain_codeset
1399          AC_CHECK_FUNCS(bind_textdomain_codeset)
1400          LIBS="$glib_save_LIBS"
1401
1402          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
1403            gt_cv_func_dgettext_libc=no
1404          else
1405            if test "$gt_cv_func_dgettext_libc" = "yes" \
1406		&& test "$gt_cv_func_ngettext_libc" = "yes"; then
1407              gt_cv_func_dgettext_libintl=no
1408            fi
1409          fi
1410        fi
1411      fi
1412
1413      if test "$gt_cv_func_dgettext_libc" = "yes" \
1414	|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
1415        gt_cv_have_gettext=yes
1416      fi
1417
1418      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
1419        INTLLIBS="-lintl $libintl_extra_libs $INTL_MACOSX_LIBS"
1420      fi
1421
1422      if test "$gt_cv_have_gettext" = "yes"; then
1423	AC_DEFINE(HAVE_GETTEXT,1,
1424	  [Define if the GNU gettext() function is already present or preinstalled.])
1425	GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
1426	  [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
1427	if test "$MSGFMT" != "no"; then
1428          glib_save_LIBS="$LIBS"
1429          LIBS="$LIBS $INTLLIBS"
1430	  AC_CHECK_FUNCS(dcgettext)
1431	  MSGFMT_OPTS=
1432	  AC_MSG_CHECKING([if msgfmt accepts -c])
1433	  GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
1434msgid ""
1435msgstr ""
1436"Content-Type: text/plain; charset=UTF-8\n"
1437"Project-Id-Version: test 1.0\n"
1438"PO-Revision-Date: 2007-02-15 12:01+0100\n"
1439"Last-Translator: test <foo@bar.xx>\n"
1440"Language-Team: C <LL@li.org>\n"
1441"MIME-Version: 1.0\n"
1442"Content-Transfer-Encoding: 8bit\n"
1443], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
1444	  AC_SUBST(MSGFMT_OPTS)
1445	  AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
1446	  GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
1447	    [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
1448	  AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
1449			 return _nl_msg_cat_cntr],
1450	    [CATOBJEXT=.gmo
1451             DATADIRNAME=share],
1452	    [case $host in
1453	    *-*-solaris*)
1454	    dnl On Solaris, if bind_textdomain_codeset is in libc,
1455	    dnl GNU format message catalog is always supported,
1456            dnl since both are added to the libc all together.
1457	    dnl Hence, we'd like to go with DATADIRNAME=share and
1458	    dnl and CATOBJEXT=.gmo in this case.
1459            AC_CHECK_FUNC(bind_textdomain_codeset,
1460	      [CATOBJEXT=.gmo
1461               DATADIRNAME=share],
1462	      [CATOBJEXT=.mo
1463               DATADIRNAME=lib])
1464	    ;;
1465	    *-*-openbsd*)
1466	    CATOBJEXT=.mo
1467            DATADIRNAME=share
1468	    ;;
1469	    *)
1470	    CATOBJEXT=.mo
1471            DATADIRNAME=lib
1472	    ;;
1473	    esac])
1474          LIBS="$glib_save_LIBS"
1475	  INSTOBJEXT=.mo
1476	else
1477	  gt_cv_have_gettext=no
1478	fi
1479      fi
1480    ])
1481
1482    if test "$gt_cv_have_gettext" = "yes" ; then
1483      AC_DEFINE(ENABLE_NLS, 1,
1484        [always defined to indicate that i18n is enabled])
1485    fi
1486
1487    dnl Test whether we really found GNU xgettext.
1488    if test "$XGETTEXT" != ":"; then
1489      dnl If it is not GNU xgettext we define it as : so that the
1490      dnl Makefiles still can work.
1491      if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
1492        : ;
1493      else
1494        AC_MSG_RESULT(
1495	  [found xgettext program is not GNU xgettext; ignore it])
1496        XGETTEXT=":"
1497      fi
1498    fi
1499
1500    # We need to process the po/ directory.
1501    POSUB=po
1502
1503    AC_OUTPUT_COMMANDS(
1504      [case "$CONFIG_FILES" in *po/Makefile.in*)
1505        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
1506      esac])
1507
1508    dnl These rules are solely for the distribution goal.  While doing this
1509    dnl we only have to keep exactly one list of the available catalogs
1510    dnl in configure.ac.
1511    for lang in $ALL_LINGUAS; do
1512      GMOFILES="$GMOFILES $lang.gmo"
1513      POFILES="$POFILES $lang.po"
1514    done
1515
1516    dnl Make all variables we use known to autoconf.
1517    AC_SUBST(CATALOGS)
1518    AC_SUBST(CATOBJEXT)
1519    AC_SUBST(DATADIRNAME)
1520    AC_SUBST(GMOFILES)
1521    AC_SUBST(INSTOBJEXT)
1522    AC_SUBST(INTLLIBS)
1523    AC_SUBST(PO_IN_DATADIR_TRUE)
1524    AC_SUBST(PO_IN_DATADIR_FALSE)
1525    AC_SUBST(POFILES)
1526    AC_SUBST(POSUB)
1527  ])
1528
1529# AM_GLIB_GNU_GETTEXT
1530# -------------------
1531# Do checks necessary for use of gettext. If a suitable implementation
1532# of gettext is found in either in libintl or in the C library,
1533# it will set INTLLIBS to the libraries needed for use of gettext
1534# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
1535# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
1536# on various variables needed by the Makefile.in.in installed by
1537# glib-gettextize.
1538dnl
1539AU_DEFUN([GLIB_GNU_GETTEXT],
1540  [AC_REQUIRE([AC_PROG_CC])dnl
1541
1542   GLIB_LC_MESSAGES
1543   GLIB_WITH_NLS
1544
1545   if test "$gt_cv_have_gettext" = "yes"; then
1546     if test "x$ALL_LINGUAS" = "x"; then
1547       LINGUAS=
1548     else
1549       AC_MSG_CHECKING(for catalogs to be installed)
1550       NEW_LINGUAS=
1551       for presentlang in $ALL_LINGUAS; do
1552         useit=no
1553         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
1554           desiredlanguages="$LINGUAS"
1555         else
1556           desiredlanguages="$ALL_LINGUAS"
1557         fi
1558         for desiredlang in $desiredlanguages; do
1559 	   # Use the presentlang catalog if desiredlang is
1560           #   a. equal to presentlang, or
1561           #   b. a variant of presentlang (because in this case,
1562           #      presentlang can be used as a fallback for messages
1563           #      which are not translated in the desiredlang catalog).
1564           case "$desiredlang" in
1565             "$presentlang"*) useit=yes;;
1566           esac
1567         done
1568         if test $useit = yes; then
1569           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
1570         fi
1571       done
1572       LINGUAS=$NEW_LINGUAS
1573       AC_MSG_RESULT($LINGUAS)
1574     fi
1575
1576     dnl Construct list of names of catalog files to be constructed.
1577     if test -n "$LINGUAS"; then
1578       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
1579     fi
1580   fi
1581
1582   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
1583   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
1584   dnl Try to locate is.
1585   MKINSTALLDIRS=
1586   if test -n "$ac_aux_dir"; then
1587     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
1588   fi
1589   if test -z "$MKINSTALLDIRS"; then
1590     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
1591   fi
1592   AC_SUBST(MKINSTALLDIRS)
1593
1594   dnl Generate list of files to be processed by xgettext which will
1595   dnl be included in po/Makefile.
1596   test -d po || mkdir po
1597   if test "x$srcdir" != "x."; then
1598     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
1599       posrcprefix="$srcdir/"
1600     else
1601       posrcprefix="../$srcdir/"
1602     fi
1603   else
1604     posrcprefix="../"
1605   fi
1606   rm -f po/POTFILES
1607   sed -e "/^#/d" -e "/^\$/d" -e "s,.*,	$posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
1608	< $srcdir/po/POTFILES.in > po/POTFILES
1609  ],
1610  [[$0: This macro is deprecated. You should use upstream gettext instead.]])
1611
1612# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
1613# -------------------------------
1614# Define VARIABLE to the location where catalog files will
1615# be installed by po/Makefile.
1616glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
1617[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
1618glib_save_prefix="$prefix"
1619glib_save_exec_prefix="$exec_prefix"
1620glib_save_datarootdir="$datarootdir"
1621test "x$prefix" = xNONE && prefix=$ac_default_prefix
1622test "x$exec_prefix" = xNONE && exec_prefix=$prefix
1623datarootdir=`eval echo "${datarootdir}"`
1624if test "x$CATOBJEXT" = "x.mo" ; then
1625  localedir=`eval echo "${libdir}/locale"`
1626else
1627  localedir=`eval echo "${datadir}/locale"`
1628fi
1629prefix="$glib_save_prefix"
1630exec_prefix="$glib_save_exec_prefix"
1631datarootdir="$glib_save_datarootdir"
1632AC_DEFINE_UNQUOTED($1, "$localedir",
1633  [Define the location where the catalogs will be installed])
1634])
1635
1636dnl
1637dnl Now the definitions that aclocal will find
1638dnl
1639ifdef(glib_configure_ac,[],[
1640AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
1641AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
1642])dnl
1643
1644# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
1645#
1646# Create a temporary file with TEST-FILE as its contents and pass the
1647# file name to PROGRAM.  Perform ACTION-IF-PASS if PROGRAM exits with
1648# 0 and perform ACTION-IF-FAIL for any other exit status.
1649AC_DEFUN([GLIB_RUN_PROG],
1650[cat >conftest.foo <<_ACEOF
1651$2
1652_ACEOF
1653if AC_RUN_LOG([$1 conftest.foo]); then
1654  m4_ifval([$3], [$3], [:])
1655m4_ifvaln([$4], [else $4])dnl
1656echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
1657sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
1658fi])
1659
1660
1661# -*- mode: autoconf -*-
1662#
1663# gtk-doc.m4 - configure macro to check for gtk-doc
1664# Copyright (C) 2003 James Henstridge
1665#               2007-2017  Stefan Sauer
1666#
1667# This program is free software: you can redistribute it and/or modify
1668# it under the terms of the GNU General Public License as published by
1669# the Free Software Foundation, either version 3 of the License, or
1670# (at your option) any later version.
1671#
1672# This program is distributed in the hope that it will be useful,
1673# but WITHOUT ANY WARRANTY; without even the implied warranty of
1674# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1675# GNU General Public License for more details.
1676#
1677# You should have received a copy of the GNU General Public License
1678# along with this program.  If not, see <http://www.gnu.org/licenses/>.
1679#
1680# As a special exception, the above copyright owner gives unlimited
1681# permission to copy, distribute and modify the configure scripts that
1682# are the output of Autoconf when processing the Macro. You need not
1683# follow the terms of the GNU General Public License when using or
1684# distributing such scripts, even though portions of the text of the
1685# Macro appear in them. The GNU General Public License (GPL) does govern
1686# all other use of the material that constitutes the Autoconf Macro.
1687
1688# serial 2
1689
1690dnl Usage:
1691dnl   GTK_DOC_CHECK([minimum-gtk-doc-version])
1692AC_DEFUN([GTK_DOC_CHECK],
1693[
1694  AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1695  AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
1696  AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
1697
1698  ifelse([$1],[],[gtk_doc_requires="gtk-doc"],[gtk_doc_requires="gtk-doc >= $1"])
1699  AC_MSG_CHECKING([for gtk-doc])
1700  PKG_CHECK_EXISTS([$gtk_doc_requires],[have_gtk_doc=yes],[have_gtk_doc=no])
1701  AC_MSG_RESULT($have_gtk_doc)
1702
1703  if test "$have_gtk_doc" = "no"; then
1704      AC_MSG_WARN([
1705  You will not be able to create source packages with 'make dist'
1706  because $gtk_doc_requires is not found.])
1707  fi
1708
1709  dnl check for tools we added during development
1710  dnl Use AC_CHECK_PROG to avoid the check target using an absolute path that
1711  dnl may not be writable by the user. Currently, automake requires that the
1712  dnl test name must end in '.test'.
1713  dnl https://bugzilla.gnome.org/show_bug.cgi?id=701638
1714  AC_CHECK_PROG([GTKDOC_CHECK],[gtkdoc-check],[gtkdoc-check.test])
1715  AC_PATH_PROG([GTKDOC_CHECK_PATH],[gtkdoc-check])
1716  AC_PATH_PROGS([GTKDOC_REBASE],[gtkdoc-rebase],[true])
1717  AC_PATH_PROG([GTKDOC_MKPDF],[gtkdoc-mkpdf])
1718
1719  dnl for overriding the documentation installation directory
1720  AC_ARG_WITH([html-dir],
1721    AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),,
1722    [with_html_dir='${datadir}/gtk-doc/html'])
1723  HTML_DIR="$with_html_dir"
1724  AC_SUBST([HTML_DIR])
1725
1726  dnl enable/disable documentation building
1727  AC_ARG_ENABLE([gtk-doc],
1728    AS_HELP_STRING([--enable-gtk-doc],
1729                   [use gtk-doc to build documentation [[default=no]]]),,
1730    [enable_gtk_doc=no])
1731
1732  AC_MSG_CHECKING([whether to build gtk-doc documentation])
1733  AC_MSG_RESULT($enable_gtk_doc)
1734
1735  if test "x$enable_gtk_doc" = "xyes" && test "$have_gtk_doc" = "no"; then
1736    AC_MSG_ERROR([
1737  You must have $gtk_doc_requires installed to build documentation for
1738  $PACKAGE_NAME. Please install gtk-doc or disable building the
1739  documentation by adding '--disable-gtk-doc' to '[$]0'.])
1740  fi
1741
1742  dnl don't check for glib if we build glib
1743  if test "x$PACKAGE_NAME" != "xglib"; then
1744    dnl don't fail if someone does not have glib
1745    PKG_CHECK_MODULES(GTKDOC_DEPS, glib-2.0 >= 2.10.0 gobject-2.0  >= 2.10.0,,[:])
1746  fi
1747
1748  dnl enable/disable output formats
1749  AC_ARG_ENABLE([gtk-doc-html],
1750    AS_HELP_STRING([--enable-gtk-doc-html],
1751                   [build documentation in html format [[default=yes]]]),,
1752    [enable_gtk_doc_html=yes])
1753    AC_ARG_ENABLE([gtk-doc-pdf],
1754      AS_HELP_STRING([--enable-gtk-doc-pdf],
1755                     [build documentation in pdf format [[default=no]]]),,
1756      [enable_gtk_doc_pdf=no])
1757
1758  if test -z "$GTKDOC_MKPDF"; then
1759    enable_gtk_doc_pdf=no
1760  fi
1761
1762  if test -z "$AM_DEFAULT_VERBOSITY"; then
1763    AM_DEFAULT_VERBOSITY=1
1764  fi
1765  AC_SUBST([AM_DEFAULT_VERBOSITY])
1766
1767  AM_CONDITIONAL([HAVE_GTK_DOC], [test x$have_gtk_doc = xyes])
1768  AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes])
1769  AM_CONDITIONAL([GTK_DOC_BUILD_HTML], [test x$enable_gtk_doc_html = xyes])
1770  AM_CONDITIONAL([GTK_DOC_BUILD_PDF], [test x$enable_gtk_doc_pdf = xyes])
1771  AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"])
1772  AM_CONDITIONAL([GTK_DOC_USE_REBASE], [test -n "$GTKDOC_REBASE"])
1773])
1774
1775
1776dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
1777# serial 42 IT_PROG_INTLTOOL
1778AC_DEFUN([IT_PROG_INTLTOOL], [
1779AC_PREREQ([2.50])dnl
1780AC_REQUIRE([AM_NLS])dnl
1781
1782case "$am__api_version" in
1783    1.[01234])
1784	AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
1785    ;;
1786    *)
1787    ;;
1788esac
1789
1790INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
1791INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
1792INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
1793if test -n "$1"; then
1794    AC_MSG_CHECKING([for intltool >= $1])
1795    AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
1796    test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
1797	AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
1798fi
1799
1800AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
1801AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
1802AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
1803if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
1804    AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
1805fi
1806
1807if test -z "$AM_DEFAULT_VERBOSITY"; then
1808  AM_DEFAULT_VERBOSITY=1
1809fi
1810AC_SUBST([AM_DEFAULT_VERBOSITY])
1811
1812INTLTOOL_V_MERGE='$(INTLTOOL__v_MERGE_$(V))'
1813INTLTOOL__v_MERGE_='$(INTLTOOL__v_MERGE_$(AM_DEFAULT_VERBOSITY))'
1814INTLTOOL__v_MERGE_0='@echo "  ITMRG " [$]@;'
1815AC_SUBST(INTLTOOL_V_MERGE)
1816AC_SUBST(INTLTOOL__v_MERGE_)
1817AC_SUBST(INTLTOOL__v_MERGE_0)
1818
1819INTLTOOL_V_MERGE_OPTIONS='$(intltool__v_merge_options_$(V))'
1820intltool__v_merge_options_='$(intltool__v_merge_options_$(AM_DEFAULT_VERBOSITY))'
1821intltool__v_merge_options_0='-q'
1822AC_SUBST(INTLTOOL_V_MERGE_OPTIONS)
1823AC_SUBST(intltool__v_merge_options_)
1824AC_SUBST(intltool__v_merge_options_0)
1825
1826  INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1827INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1828     INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1829     INTLTOOL_PROP_RULE='%.prop:      %.prop.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1830      INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -p $(top_srcdir)/po $< [$]@'
1831     INTLTOOL_PONG_RULE='%.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1832   INTLTOOL_SERVER_RULE='%.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1833    INTLTOOL_SHEET_RULE='%.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1834INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1835       INTLTOOL_UI_RULE='%.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1836      INTLTOOL_XML_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1837if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge 5000; then
1838      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u --no-translations $< [$]@'
1839else
1840      INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)_it_tmp_dir=tmp.intltool.[$][$]RANDOM && mkdir [$][$]_it_tmp_dir && LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u [$][$]_it_tmp_dir $< [$]@ && rmdir [$][$]_it_tmp_dir'
1841fi
1842      INTLTOOL_XAM_RULE='%.xam:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1843      INTLTOOL_KBD_RULE='%.kbd:       %.kbd.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1844    INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1845  INTLTOOL_SCHEMAS_RULE='%.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1846    INTLTOOL_THEME_RULE='%.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1847    INTLTOOL_SERVICE_RULE='%.service: %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1848   INTLTOOL_POLICY_RULE='%.policy:    %.policy.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1849
1850_IT_SUBST(INTLTOOL_DESKTOP_RULE)
1851_IT_SUBST(INTLTOOL_DIRECTORY_RULE)
1852_IT_SUBST(INTLTOOL_KEYS_RULE)
1853_IT_SUBST(INTLTOOL_PROP_RULE)
1854_IT_SUBST(INTLTOOL_OAF_RULE)
1855_IT_SUBST(INTLTOOL_PONG_RULE)
1856_IT_SUBST(INTLTOOL_SERVER_RULE)
1857_IT_SUBST(INTLTOOL_SHEET_RULE)
1858_IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
1859_IT_SUBST(INTLTOOL_UI_RULE)
1860_IT_SUBST(INTLTOOL_XAM_RULE)
1861_IT_SUBST(INTLTOOL_KBD_RULE)
1862_IT_SUBST(INTLTOOL_XML_RULE)
1863_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
1864_IT_SUBST(INTLTOOL_CAVES_RULE)
1865_IT_SUBST(INTLTOOL_SCHEMAS_RULE)
1866_IT_SUBST(INTLTOOL_THEME_RULE)
1867_IT_SUBST(INTLTOOL_SERVICE_RULE)
1868_IT_SUBST(INTLTOOL_POLICY_RULE)
1869
1870# Check the gettext tools to make sure they are GNU
1871AC_PATH_PROG(XGETTEXT, xgettext)
1872AC_PATH_PROG(MSGMERGE, msgmerge)
1873AC_PATH_PROG(MSGFMT, msgfmt)
1874AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
1875if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
1876    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
1877fi
1878xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
1879mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
1880mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
1881if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
1882    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
1883fi
1884
1885AC_PATH_PROG(INTLTOOL_PERL, perl)
1886if test -z "$INTLTOOL_PERL"; then
1887   AC_MSG_ERROR([perl not found])
1888fi
1889AC_MSG_CHECKING([for perl >= 5.8.1])
1890$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
1891if test $? -ne 0; then
1892   AC_MSG_ERROR([perl 5.8.1 is required for intltool])
1893else
1894   IT_PERL_VERSION=`$INTLTOOL_PERL -e "printf '%vd', $^V"`
1895   AC_MSG_RESULT([$IT_PERL_VERSION])
1896fi
1897if test "x$2" != "xno-xml"; then
1898   AC_MSG_CHECKING([for XML::Parser])
1899   if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
1900       AC_MSG_RESULT([ok])
1901   else
1902       AC_MSG_ERROR([XML::Parser perl module is required for intltool])
1903   fi
1904fi
1905
1906# Substitute ALL_LINGUAS so we can use it in po/Makefile
1907AC_SUBST(ALL_LINGUAS)
1908
1909IT_PO_SUBDIR([po])
1910
1911])
1912
1913
1914# IT_PO_SUBDIR(DIRNAME)
1915# ---------------------
1916# All po subdirs have to be declared with this macro; the subdir "po" is
1917# declared by IT_PROG_INTLTOOL.
1918#
1919AC_DEFUN([IT_PO_SUBDIR],
1920[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
1921dnl
1922dnl The following CONFIG_COMMANDS should be executed at the very end
1923dnl of config.status.
1924AC_CONFIG_COMMANDS_PRE([
1925  AC_CONFIG_COMMANDS([$1/stamp-it], [
1926    if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
1927       AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
1928    fi
1929    rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
1930    >"$1/stamp-it.tmp"
1931    [sed '/^#/d
1932	 s/^[[].*] *//
1933	 /^[ 	]*$/d
1934	'"s|^|	$ac_top_srcdir/|" \
1935      "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
1936    ]
1937    [sed '/^POTFILES =/,/[^\\]$/ {
1938		/^POTFILES =/!d
1939		r $1/POTFILES
1940	  }
1941	 ' "$1/Makefile.in" >"$1/Makefile"]
1942    rm -f "$1/Makefile.tmp"
1943    mv "$1/stamp-it.tmp" "$1/stamp-it"
1944  ])
1945])dnl
1946])
1947
1948# _IT_SUBST(VARIABLE)
1949# -------------------
1950# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
1951#
1952AC_DEFUN([_IT_SUBST],
1953[
1954AC_SUBST([$1])
1955m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
1956]
1957)
1958
1959# deprecated macros
1960AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
1961# A hint is needed for aclocal from Automake <= 1.9.4:
1962# AC_DEFUN([AC_PROG_INTLTOOL], ...)
1963
1964
1965dnl -*- mode: autoconf -*-
1966dnl Copyright 2009 Johan Dahlin
1967dnl
1968dnl This file is free software; the author(s) gives unlimited
1969dnl permission to copy and/or distribute it, with or without
1970dnl modifications, as long as this notice is preserved.
1971dnl
1972
1973# serial 1
1974
1975dnl This is a copy of AS_AC_EXPAND
1976dnl
1977dnl (C) 2003, 2004, 2005 Thomas Vander Stichele <thomas at apestaart dot org>
1978dnl Copying and distribution of this file, with or without modification,
1979dnl are permitted in any medium without royalty provided the copyright
1980dnl notice and this notice are preserved.
1981m4_define([_GOBJECT_INTROSPECTION_AS_AC_EXPAND],
1982[
1983  EXP_VAR=[$1]
1984  FROM_VAR=[$2]
1985
1986  dnl first expand prefix and exec_prefix if necessary
1987  prefix_save=$prefix
1988  exec_prefix_save=$exec_prefix
1989
1990  dnl if no prefix given, then use /usr/local, the default prefix
1991  if test "x$prefix" = "xNONE"; then
1992    prefix="$ac_default_prefix"
1993  fi
1994  dnl if no exec_prefix given, then use prefix
1995  if test "x$exec_prefix" = "xNONE"; then
1996    exec_prefix=$prefix
1997  fi
1998
1999  full_var="$FROM_VAR"
2000  dnl loop until it doesn't change anymore
2001  while true; do
2002    new_full_var="`eval echo $full_var`"
2003    if test "x$new_full_var" = "x$full_var"; then break; fi
2004    full_var=$new_full_var
2005  done
2006
2007  dnl clean up
2008  full_var=$new_full_var
2009  AC_SUBST([$1], "$full_var")
2010
2011  dnl restore prefix and exec_prefix
2012  prefix=$prefix_save
2013  exec_prefix=$exec_prefix_save
2014])
2015
2016m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL],
2017[
2018    AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
2019    AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
2020    AC_BEFORE([LT_INIT],[$0])dnl setup libtool first
2021
2022    dnl enable/disable introspection
2023    m4_if([$2], [require],
2024    [dnl
2025        enable_introspection=yes
2026    ],[dnl
2027        AC_ARG_ENABLE(introspection,
2028                  AS_HELP_STRING([--enable-introspection[=@<:@no/auto/yes@:>@]],
2029                                 [Enable introspection for this build]),,
2030                                 [enable_introspection=auto])
2031    ])dnl
2032
2033    AC_MSG_CHECKING([for gobject-introspection])
2034
2035    dnl presence/version checking
2036    AS_CASE([$enable_introspection],
2037    [no], [dnl
2038        found_introspection="no (disabled, use --enable-introspection to enable)"
2039    ],dnl
2040    [yes],[dnl
2041        PKG_CHECK_EXISTS([gobject-introspection-1.0],,
2042                         AC_MSG_ERROR([gobject-introspection-1.0 is not installed]))
2043        PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1],
2044                         found_introspection=yes,
2045                         AC_MSG_ERROR([You need to have gobject-introspection >= $1 installed to build AC_PACKAGE_NAME]))
2046    ],dnl
2047    [auto],[dnl
2048        PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], found_introspection=yes, found_introspection=no)
2049	dnl Canonicalize enable_introspection
2050	enable_introspection=$found_introspection
2051    ],dnl
2052    [dnl
2053        AC_MSG_ERROR([invalid argument passed to --enable-introspection, should be one of @<:@no/auto/yes@:>@])
2054    ])dnl
2055
2056    AC_MSG_RESULT([$found_introspection])
2057
2058    dnl expand datadir/libdir so we can pass them to pkg-config
2059    dnl and get paths relative to our target directories
2060    _GOBJECT_INTROSPECTION_AS_AC_EXPAND(_GI_EXP_DATADIR, "$datadir")
2061    _GOBJECT_INTROSPECTION_AS_AC_EXPAND(_GI_EXP_LIBDIR, "$libdir")
2062
2063    INTROSPECTION_SCANNER=
2064    INTROSPECTION_COMPILER=
2065    INTROSPECTION_GENERATE=
2066    INTROSPECTION_GIRDIR=
2067    INTROSPECTION_TYPELIBDIR=
2068    if test "x$found_introspection" = "xyes"; then
2069       INTROSPECTION_SCANNER=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
2070       INTROSPECTION_COMPILER=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
2071       INTROSPECTION_GENERATE=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
2072       INTROSPECTION_GIRDIR=`$PKG_CONFIG --define-variable=datadir="${_GI_EXP_DATADIR}" --variable=girdir gobject-introspection-1.0`
2073       INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --define-variable=libdir="${_GI_EXP_LIBDIR}" --variable=typelibdir gobject-introspection-1.0)"
2074       INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0`
2075       INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0`
2076       INTROSPECTION_MAKEFILE=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
2077    fi
2078    AC_SUBST(INTROSPECTION_SCANNER)
2079    AC_SUBST(INTROSPECTION_COMPILER)
2080    AC_SUBST(INTROSPECTION_GENERATE)
2081    AC_SUBST(INTROSPECTION_GIRDIR)
2082    AC_SUBST(INTROSPECTION_TYPELIBDIR)
2083    AC_SUBST(INTROSPECTION_CFLAGS)
2084    AC_SUBST(INTROSPECTION_LIBS)
2085    AC_SUBST(INTROSPECTION_MAKEFILE)
2086
2087    AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes")
2088])
2089
2090
2091dnl Usage:
2092dnl   GOBJECT_INTROSPECTION_CHECK([minimum-g-i-version])
2093
2094AC_DEFUN([GOBJECT_INTROSPECTION_CHECK],
2095[
2096  _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1])
2097])
2098
2099dnl Usage:
2100dnl   GOBJECT_INTROSPECTION_REQUIRE([minimum-g-i-version])
2101
2102
2103AC_DEFUN([GOBJECT_INTROSPECTION_REQUIRE],
2104[
2105  _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1], [require])
2106])
2107
2108# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
2109#
2110#   Copyright (C) 1996-2001, 2003-2018 Free Software Foundation, Inc.
2111#   Written by Gordon Matzigkeit, 1996
2112#
2113# This file is free software; the Free Software Foundation gives
2114# unlimited permission to copy and/or distribute it, with or without
2115# modifications, as long as this notice is preserved.
2116
2117m4_define([_LT_COPYING], [dnl
2118# Copyright (C) 2014 Free Software Foundation, Inc.
2119# This is free software; see the source for copying conditions.  There is NO
2120# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
2121
2122# GNU Libtool is free software; you can redistribute it and/or modify
2123# it under the terms of the GNU General Public License as published by
2124# the Free Software Foundation; either version 2 of of the License, or
2125# (at your option) any later version.
2126#
2127# As a special exception to the GNU General Public License, if you
2128# distribute this file as part of a program or library that is built
2129# using GNU Libtool, you may include this file under the  same
2130# distribution terms that you use for the rest of that program.
2131#
2132# GNU Libtool is distributed in the hope that it will be useful, but
2133# WITHOUT ANY WARRANTY; without even the implied warranty of
2134# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2135# GNU General Public License for more details.
2136#
2137# You should have received a copy of the GNU General Public License
2138# along with this program.  If not, see <http://www.gnu.org/licenses/>.
2139])
2140
2141# serial 58 LT_INIT
2142
2143
2144# LT_PREREQ(VERSION)
2145# ------------------
2146# Complain and exit if this libtool version is less that VERSION.
2147m4_defun([LT_PREREQ],
2148[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
2149       [m4_default([$3],
2150		   [m4_fatal([Libtool version $1 or higher is required],
2151		             63)])],
2152       [$2])])
2153
2154
2155# _LT_CHECK_BUILDDIR
2156# ------------------
2157# Complain if the absolute build directory name contains unusual characters
2158m4_defun([_LT_CHECK_BUILDDIR],
2159[case `pwd` in
2160  *\ * | *\	*)
2161    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
2162esac
2163])
2164
2165
2166# LT_INIT([OPTIONS])
2167# ------------------
2168AC_DEFUN([LT_INIT],
2169[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
2170AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
2171AC_BEFORE([$0], [LT_LANG])dnl
2172AC_BEFORE([$0], [LT_OUTPUT])dnl
2173AC_BEFORE([$0], [LTDL_INIT])dnl
2174m4_require([_LT_CHECK_BUILDDIR])dnl
2175
2176dnl Autoconf doesn't catch unexpanded LT_ macros by default:
2177m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
2178m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
2179dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
2180dnl unless we require an AC_DEFUNed macro:
2181AC_REQUIRE([LTOPTIONS_VERSION])dnl
2182AC_REQUIRE([LTSUGAR_VERSION])dnl
2183AC_REQUIRE([LTVERSION_VERSION])dnl
2184AC_REQUIRE([LTOBSOLETE_VERSION])dnl
2185m4_require([_LT_PROG_LTMAIN])dnl
2186
2187_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
2188
2189dnl Parse OPTIONS
2190_LT_SET_OPTIONS([$0], [$1])
2191
2192# This can be used to rebuild libtool when needed
2193LIBTOOL_DEPS=$ltmain
2194
2195# Always use our own libtool.
2196LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2197AC_SUBST(LIBTOOL)dnl
2198
2199_LT_SETUP
2200
2201# Only expand once:
2202m4_define([LT_INIT])
2203])# LT_INIT
2204
2205# Old names:
2206AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
2207AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
2208dnl aclocal-1.4 backwards compatibility:
2209dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
2210dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
2211
2212
2213# _LT_PREPARE_CC_BASENAME
2214# -----------------------
2215m4_defun([_LT_PREPARE_CC_BASENAME], [
2216# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
2217func_cc_basename ()
2218{
2219    for cc_temp in @S|@*""; do
2220      case $cc_temp in
2221        compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
2222        distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
2223        \-*) ;;
2224        *) break;;
2225      esac
2226    done
2227    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
2228}
2229])# _LT_PREPARE_CC_BASENAME
2230
2231
2232# _LT_CC_BASENAME(CC)
2233# -------------------
2234# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
2235# but that macro is also expanded into generated libtool script, which
2236# arranges for $SED and $ECHO to be set by different means.
2237m4_defun([_LT_CC_BASENAME],
2238[m4_require([_LT_PREPARE_CC_BASENAME])dnl
2239AC_REQUIRE([_LT_DECL_SED])dnl
2240AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
2241func_cc_basename $1
2242cc_basename=$func_cc_basename_result
2243])
2244
2245
2246# _LT_FILEUTILS_DEFAULTS
2247# ----------------------
2248# It is okay to use these file commands and assume they have been set
2249# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
2250m4_defun([_LT_FILEUTILS_DEFAULTS],
2251[: ${CP="cp -f"}
2252: ${MV="mv -f"}
2253: ${RM="rm -f"}
2254])# _LT_FILEUTILS_DEFAULTS
2255
2256
2257# _LT_SETUP
2258# ---------
2259m4_defun([_LT_SETUP],
2260[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2261AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2262AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
2263AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
2264
2265_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
2266dnl
2267_LT_DECL([], [host_alias], [0], [The host system])dnl
2268_LT_DECL([], [host], [0])dnl
2269_LT_DECL([], [host_os], [0])dnl
2270dnl
2271_LT_DECL([], [build_alias], [0], [The build system])dnl
2272_LT_DECL([], [build], [0])dnl
2273_LT_DECL([], [build_os], [0])dnl
2274dnl
2275AC_REQUIRE([AC_PROG_CC])dnl
2276AC_REQUIRE([LT_PATH_LD])dnl
2277AC_REQUIRE([LT_PATH_NM])dnl
2278dnl
2279AC_REQUIRE([AC_PROG_LN_S])dnl
2280test -z "$LN_S" && LN_S="ln -s"
2281_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
2282dnl
2283AC_REQUIRE([LT_CMD_MAX_LEN])dnl
2284_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
2285_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
2286dnl
2287m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2288m4_require([_LT_CHECK_SHELL_FEATURES])dnl
2289m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
2290m4_require([_LT_CMD_RELOAD])dnl
2291m4_require([_LT_CHECK_MAGIC_METHOD])dnl
2292m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
2293m4_require([_LT_CMD_OLD_ARCHIVE])dnl
2294m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
2295m4_require([_LT_WITH_SYSROOT])dnl
2296m4_require([_LT_CMD_TRUNCATE])dnl
2297
2298_LT_CONFIG_LIBTOOL_INIT([
2299# See if we are running on zsh, and set the options that allow our
2300# commands through without removal of \ escapes INIT.
2301if test -n "\${ZSH_VERSION+set}"; then
2302   setopt NO_GLOB_SUBST
2303fi
2304])
2305if test -n "${ZSH_VERSION+set}"; then
2306   setopt NO_GLOB_SUBST
2307fi
2308
2309_LT_CHECK_OBJDIR
2310
2311m4_require([_LT_TAG_COMPILER])dnl
2312
2313case $host_os in
2314aix3*)
2315  # AIX sometimes has problems with the GCC collect2 program.  For some
2316  # reason, if we set the COLLECT_NAMES environment variable, the problems
2317  # vanish in a puff of smoke.
2318  if test set != "${COLLECT_NAMES+set}"; then
2319    COLLECT_NAMES=
2320    export COLLECT_NAMES
2321  fi
2322  ;;
2323esac
2324
2325# Global variables:
2326ofile=libtool
2327can_build_shared=yes
2328
2329# All known linkers require a '.a' archive for static linking (except MSVC and
2330# ICC, which need '.lib').
2331libext=a
2332
2333with_gnu_ld=$lt_cv_prog_gnu_ld
2334
2335old_CC=$CC
2336old_CFLAGS=$CFLAGS
2337
2338# Set sane defaults for various variables
2339test -z "$CC" && CC=cc
2340test -z "$LTCC" && LTCC=$CC
2341test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
2342test -z "$LD" && LD=ld
2343test -z "$ac_objext" && ac_objext=o
2344
2345_LT_CC_BASENAME([$compiler])
2346
2347# Only perform the check for file, if the check method requires it
2348test -z "$MAGIC_CMD" && MAGIC_CMD=file
2349case $deplibs_check_method in
2350file_magic*)
2351  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
2352    _LT_PATH_MAGIC
2353  fi
2354  ;;
2355esac
2356
2357# Use C for the default configuration in the libtool script
2358LT_SUPPORTED_TAG([CC])
2359_LT_LANG_C_CONFIG
2360_LT_LANG_DEFAULT_CONFIG
2361_LT_CONFIG_COMMANDS
2362])# _LT_SETUP
2363
2364
2365# _LT_PREPARE_SED_QUOTE_VARS
2366# --------------------------
2367# Define a few sed substitution that help us do robust quoting.
2368m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
2369[# Backslashify metacharacters that are still active within
2370# double-quoted strings.
2371sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
2372
2373# Same as above, but do not quote variable references.
2374double_quote_subst='s/\([["`\\]]\)/\\\1/g'
2375
2376# Sed substitution to delay expansion of an escaped shell variable in a
2377# double_quote_subst'ed string.
2378delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
2379
2380# Sed substitution to delay expansion of an escaped single quote.
2381delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
2382
2383# Sed substitution to avoid accidental globbing in evaled expressions
2384no_glob_subst='s/\*/\\\*/g'
2385])
2386
2387# _LT_PROG_LTMAIN
2388# ---------------
2389# Note that this code is called both from 'configure', and 'config.status'
2390# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
2391# 'config.status' has no value for ac_aux_dir unless we are using Automake,
2392# so we pass a copy along to make sure it has a sensible value anyway.
2393m4_defun([_LT_PROG_LTMAIN],
2394[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
2395_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
2396ltmain=$ac_aux_dir/ltmain.sh
2397])# _LT_PROG_LTMAIN
2398
2399
2400
2401# So that we can recreate a full libtool script including additional
2402# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
2403# in macros and then make a single call at the end using the 'libtool'
2404# label.
2405
2406
2407# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
2408# ----------------------------------------
2409# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
2410m4_define([_LT_CONFIG_LIBTOOL_INIT],
2411[m4_ifval([$1],
2412          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
2413                     [$1
2414])])])
2415
2416# Initialize.
2417m4_define([_LT_OUTPUT_LIBTOOL_INIT])
2418
2419
2420# _LT_CONFIG_LIBTOOL([COMMANDS])
2421# ------------------------------
2422# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
2423m4_define([_LT_CONFIG_LIBTOOL],
2424[m4_ifval([$1],
2425          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
2426                     [$1
2427])])])
2428
2429# Initialize.
2430m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
2431
2432
2433# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
2434# -----------------------------------------------------
2435m4_defun([_LT_CONFIG_SAVE_COMMANDS],
2436[_LT_CONFIG_LIBTOOL([$1])
2437_LT_CONFIG_LIBTOOL_INIT([$2])
2438])
2439
2440
2441# _LT_FORMAT_COMMENT([COMMENT])
2442# -----------------------------
2443# Add leading comment marks to the start of each line, and a trailing
2444# full-stop to the whole comment if one is not present already.
2445m4_define([_LT_FORMAT_COMMENT],
2446[m4_ifval([$1], [
2447m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
2448              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
2449)])
2450
2451
2452
2453
2454
2455# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
2456# -------------------------------------------------------------------
2457# CONFIGNAME is the name given to the value in the libtool script.
2458# VARNAME is the (base) name used in the configure script.
2459# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
2460# VARNAME.  Any other value will be used directly.
2461m4_define([_LT_DECL],
2462[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
2463    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
2464	[m4_ifval([$1], [$1], [$2])])
2465    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
2466    m4_ifval([$4],
2467	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
2468    lt_dict_add_subkey([lt_decl_dict], [$2],
2469	[tagged?], [m4_ifval([$5], [yes], [no])])])
2470])
2471
2472
2473# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
2474# --------------------------------------------------------
2475m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
2476
2477
2478# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
2479# ------------------------------------------------
2480m4_define([lt_decl_tag_varnames],
2481[_lt_decl_filter([tagged?], [yes], $@)])
2482
2483
2484# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
2485# ---------------------------------------------------------
2486m4_define([_lt_decl_filter],
2487[m4_case([$#],
2488  [0], [m4_fatal([$0: too few arguments: $#])],
2489  [1], [m4_fatal([$0: too few arguments: $#: $1])],
2490  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
2491  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
2492  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
2493])
2494
2495
2496# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
2497# --------------------------------------------------
2498m4_define([lt_decl_quote_varnames],
2499[_lt_decl_filter([value], [1], $@)])
2500
2501
2502# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
2503# ---------------------------------------------------
2504m4_define([lt_decl_dquote_varnames],
2505[_lt_decl_filter([value], [2], $@)])
2506
2507
2508# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
2509# ---------------------------------------------------
2510m4_define([lt_decl_varnames_tagged],
2511[m4_assert([$# <= 2])dnl
2512_$0(m4_quote(m4_default([$1], [[, ]])),
2513    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
2514    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
2515m4_define([_lt_decl_varnames_tagged],
2516[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
2517
2518
2519# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
2520# ------------------------------------------------
2521m4_define([lt_decl_all_varnames],
2522[_$0(m4_quote(m4_default([$1], [[, ]])),
2523     m4_if([$2], [],
2524	   m4_quote(lt_decl_varnames),
2525	m4_quote(m4_shift($@))))[]dnl
2526])
2527m4_define([_lt_decl_all_varnames],
2528[lt_join($@, lt_decl_varnames_tagged([$1],
2529			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
2530])
2531
2532
2533# _LT_CONFIG_STATUS_DECLARE([VARNAME])
2534# ------------------------------------
2535# Quote a variable value, and forward it to 'config.status' so that its
2536# declaration there will have the same value as in 'configure'.  VARNAME
2537# must have a single quote delimited value for this to work.
2538m4_define([_LT_CONFIG_STATUS_DECLARE],
2539[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
2540
2541
2542# _LT_CONFIG_STATUS_DECLARATIONS
2543# ------------------------------
2544# We delimit libtool config variables with single quotes, so when
2545# we write them to config.status, we have to be sure to quote all
2546# embedded single quotes properly.  In configure, this macro expands
2547# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
2548#
2549#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
2550m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
2551[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
2552    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
2553
2554
2555# _LT_LIBTOOL_TAGS
2556# ----------------
2557# Output comment and list of tags supported by the script
2558m4_defun([_LT_LIBTOOL_TAGS],
2559[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
2560available_tags='_LT_TAGS'dnl
2561])
2562
2563
2564# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
2565# -----------------------------------
2566# Extract the dictionary values for VARNAME (optionally with TAG) and
2567# expand to a commented shell variable setting:
2568#
2569#    # Some comment about what VAR is for.
2570#    visible_name=$lt_internal_name
2571m4_define([_LT_LIBTOOL_DECLARE],
2572[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
2573					   [description])))[]dnl
2574m4_pushdef([_libtool_name],
2575    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
2576m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
2577    [0], [_libtool_name=[$]$1],
2578    [1], [_libtool_name=$lt_[]$1],
2579    [2], [_libtool_name=$lt_[]$1],
2580    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
2581m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
2582])
2583
2584
2585# _LT_LIBTOOL_CONFIG_VARS
2586# -----------------------
2587# Produce commented declarations of non-tagged libtool config variables
2588# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
2589# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
2590# section) are produced by _LT_LIBTOOL_TAG_VARS.
2591m4_defun([_LT_LIBTOOL_CONFIG_VARS],
2592[m4_foreach([_lt_var],
2593    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
2594    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
2595
2596
2597# _LT_LIBTOOL_TAG_VARS(TAG)
2598# -------------------------
2599m4_define([_LT_LIBTOOL_TAG_VARS],
2600[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
2601    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
2602
2603
2604# _LT_TAGVAR(VARNAME, [TAGNAME])
2605# ------------------------------
2606m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
2607
2608
2609# _LT_CONFIG_COMMANDS
2610# -------------------
2611# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
2612# variables for single and double quote escaping we saved from calls
2613# to _LT_DECL, we can put quote escaped variables declarations
2614# into 'config.status', and then the shell code to quote escape them in
2615# for loops in 'config.status'.  Finally, any additional code accumulated
2616# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
2617m4_defun([_LT_CONFIG_COMMANDS],
2618[AC_PROVIDE_IFELSE([LT_OUTPUT],
2619	dnl If the libtool generation code has been placed in $CONFIG_LT,
2620	dnl instead of duplicating it all over again into config.status,
2621	dnl then we will have config.status run $CONFIG_LT later, so it
2622	dnl needs to know what name is stored there:
2623        [AC_CONFIG_COMMANDS([libtool],
2624            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
2625    dnl If the libtool generation code is destined for config.status,
2626    dnl expand the accumulated commands and init code now:
2627    [AC_CONFIG_COMMANDS([libtool],
2628        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
2629])#_LT_CONFIG_COMMANDS
2630
2631
2632# Initialize.
2633m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
2634[
2635
2636# The HP-UX ksh and POSIX shell print the target directory to stdout
2637# if CDPATH is set.
2638(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
2639
2640sed_quote_subst='$sed_quote_subst'
2641double_quote_subst='$double_quote_subst'
2642delay_variable_subst='$delay_variable_subst'
2643_LT_CONFIG_STATUS_DECLARATIONS
2644LTCC='$LTCC'
2645LTCFLAGS='$LTCFLAGS'
2646compiler='$compiler_DEFAULT'
2647
2648# A function that is used when there is no print builtin or printf.
2649func_fallback_echo ()
2650{
2651  eval 'cat <<_LTECHO_EOF
2652\$[]1
2653_LTECHO_EOF'
2654}
2655
2656# Quote evaled strings.
2657for var in lt_decl_all_varnames([[ \
2658]], lt_decl_quote_varnames); do
2659    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
2660    *[[\\\\\\\`\\"\\\$]]*)
2661      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
2662      ;;
2663    *)
2664      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
2665      ;;
2666    esac
2667done
2668
2669# Double-quote double-evaled strings.
2670for var in lt_decl_all_varnames([[ \
2671]], lt_decl_dquote_varnames); do
2672    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
2673    *[[\\\\\\\`\\"\\\$]]*)
2674      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
2675      ;;
2676    *)
2677      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
2678      ;;
2679    esac
2680done
2681
2682_LT_OUTPUT_LIBTOOL_INIT
2683])
2684
2685# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
2686# ------------------------------------
2687# Generate a child script FILE with all initialization necessary to
2688# reuse the environment learned by the parent script, and make the
2689# file executable.  If COMMENT is supplied, it is inserted after the
2690# '#!' sequence but before initialization text begins.  After this
2691# macro, additional text can be appended to FILE to form the body of
2692# the child script.  The macro ends with non-zero status if the
2693# file could not be fully written (such as if the disk is full).
2694m4_ifdef([AS_INIT_GENERATED],
2695[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
2696[m4_defun([_LT_GENERATED_FILE_INIT],
2697[m4_require([AS_PREPARE])]dnl
2698[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
2699[lt_write_fail=0
2700cat >$1 <<_ASEOF || lt_write_fail=1
2701#! $SHELL
2702# Generated by $as_me.
2703$2
2704SHELL=\${CONFIG_SHELL-$SHELL}
2705export SHELL
2706_ASEOF
2707cat >>$1 <<\_ASEOF || lt_write_fail=1
2708AS_SHELL_SANITIZE
2709_AS_PREPARE
2710exec AS_MESSAGE_FD>&1
2711_ASEOF
2712test 0 = "$lt_write_fail" && chmod +x $1[]dnl
2713m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
2714
2715# LT_OUTPUT
2716# ---------
2717# This macro allows early generation of the libtool script (before
2718# AC_OUTPUT is called), incase it is used in configure for compilation
2719# tests.
2720AC_DEFUN([LT_OUTPUT],
2721[: ${CONFIG_LT=./config.lt}
2722AC_MSG_NOTICE([creating $CONFIG_LT])
2723_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
2724[# Run this file to recreate a libtool stub with the current configuration.])
2725
2726cat >>"$CONFIG_LT" <<\_LTEOF
2727lt_cl_silent=false
2728exec AS_MESSAGE_LOG_FD>>config.log
2729{
2730  echo
2731  AS_BOX([Running $as_me.])
2732} >&AS_MESSAGE_LOG_FD
2733
2734lt_cl_help="\
2735'$as_me' creates a local libtool stub from the current configuration,
2736for use in further configure time tests before the real libtool is
2737generated.
2738
2739Usage: $[0] [[OPTIONS]]
2740
2741  -h, --help      print this help, then exit
2742  -V, --version   print version number, then exit
2743  -q, --quiet     do not print progress messages
2744  -d, --debug     don't remove temporary files
2745
2746Report bugs to <bug-libtool@gnu.org>."
2747
2748lt_cl_version="\
2749m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
2750m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
2751configured by $[0], generated by m4_PACKAGE_STRING.
2752
2753Copyright (C) 2011 Free Software Foundation, Inc.
2754This config.lt script is free software; the Free Software Foundation
2755gives unlimited permision to copy, distribute and modify it."
2756
2757while test 0 != $[#]
2758do
2759  case $[1] in
2760    --version | --v* | -V )
2761      echo "$lt_cl_version"; exit 0 ;;
2762    --help | --h* | -h )
2763      echo "$lt_cl_help"; exit 0 ;;
2764    --debug | --d* | -d )
2765      debug=: ;;
2766    --quiet | --q* | --silent | --s* | -q )
2767      lt_cl_silent=: ;;
2768
2769    -*) AC_MSG_ERROR([unrecognized option: $[1]
2770Try '$[0] --help' for more information.]) ;;
2771
2772    *) AC_MSG_ERROR([unrecognized argument: $[1]
2773Try '$[0] --help' for more information.]) ;;
2774  esac
2775  shift
2776done
2777
2778if $lt_cl_silent; then
2779  exec AS_MESSAGE_FD>/dev/null
2780fi
2781_LTEOF
2782
2783cat >>"$CONFIG_LT" <<_LTEOF
2784_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
2785_LTEOF
2786
2787cat >>"$CONFIG_LT" <<\_LTEOF
2788AC_MSG_NOTICE([creating $ofile])
2789_LT_OUTPUT_LIBTOOL_COMMANDS
2790AS_EXIT(0)
2791_LTEOF
2792chmod +x "$CONFIG_LT"
2793
2794# configure is writing to config.log, but config.lt does its own redirection,
2795# appending to config.log, which fails on DOS, as config.log is still kept
2796# open by configure.  Here we exec the FD to /dev/null, effectively closing
2797# config.log, so it can be properly (re)opened and appended to by config.lt.
2798lt_cl_success=:
2799test yes = "$silent" &&
2800  lt_config_lt_args="$lt_config_lt_args --quiet"
2801exec AS_MESSAGE_LOG_FD>/dev/null
2802$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
2803exec AS_MESSAGE_LOG_FD>>config.log
2804$lt_cl_success || AS_EXIT(1)
2805])# LT_OUTPUT
2806
2807
2808# _LT_CONFIG(TAG)
2809# ---------------
2810# If TAG is the built-in tag, create an initial libtool script with a
2811# default configuration from the untagged config vars.  Otherwise add code
2812# to config.status for appending the configuration named by TAG from the
2813# matching tagged config vars.
2814m4_defun([_LT_CONFIG],
2815[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2816_LT_CONFIG_SAVE_COMMANDS([
2817  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
2818  m4_if(_LT_TAG, [C], [
2819    # See if we are running on zsh, and set the options that allow our
2820    # commands through without removal of \ escapes.
2821    if test -n "${ZSH_VERSION+set}"; then
2822      setopt NO_GLOB_SUBST
2823    fi
2824
2825    cfgfile=${ofile}T
2826    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
2827    $RM "$cfgfile"
2828
2829    cat <<_LT_EOF >> "$cfgfile"
2830#! $SHELL
2831# Generated automatically by $as_me ($PACKAGE) $VERSION
2832# NOTE: Changes made to this file will be lost: look at ltmain.sh.
2833
2834# Provide generalized library-building support services.
2835# Written by Gordon Matzigkeit, 1996
2836
2837_LT_COPYING
2838_LT_LIBTOOL_TAGS
2839
2840# Configured defaults for sys_lib_dlsearch_path munging.
2841: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
2842
2843# ### BEGIN LIBTOOL CONFIG
2844_LT_LIBTOOL_CONFIG_VARS
2845_LT_LIBTOOL_TAG_VARS
2846# ### END LIBTOOL CONFIG
2847
2848_LT_EOF
2849
2850    cat <<'_LT_EOF' >> "$cfgfile"
2851
2852# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
2853
2854_LT_PREPARE_MUNGE_PATH_LIST
2855_LT_PREPARE_CC_BASENAME
2856
2857# ### END FUNCTIONS SHARED WITH CONFIGURE
2858
2859_LT_EOF
2860
2861  case $host_os in
2862  aix3*)
2863    cat <<\_LT_EOF >> "$cfgfile"
2864# AIX sometimes has problems with the GCC collect2 program.  For some
2865# reason, if we set the COLLECT_NAMES environment variable, the problems
2866# vanish in a puff of smoke.
2867if test set != "${COLLECT_NAMES+set}"; then
2868  COLLECT_NAMES=
2869  export COLLECT_NAMES
2870fi
2871_LT_EOF
2872    ;;
2873  esac
2874
2875  _LT_PROG_LTMAIN
2876
2877  # We use sed instead of cat because bash on DJGPP gets confused if
2878  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
2879  # text mode, it properly converts lines to CR/LF.  This bash problem
2880  # is reportedly fixed, but why not run on old versions too?
2881  sed '$q' "$ltmain" >> "$cfgfile" \
2882     || (rm -f "$cfgfile"; exit 1)
2883
2884   mv -f "$cfgfile" "$ofile" ||
2885    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
2886  chmod +x "$ofile"
2887],
2888[cat <<_LT_EOF >> "$ofile"
2889
2890dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
2891dnl in a comment (ie after a #).
2892# ### BEGIN LIBTOOL TAG CONFIG: $1
2893_LT_LIBTOOL_TAG_VARS(_LT_TAG)
2894# ### END LIBTOOL TAG CONFIG: $1
2895_LT_EOF
2896])dnl /m4_if
2897],
2898[m4_if([$1], [], [
2899    PACKAGE='$PACKAGE'
2900    VERSION='$VERSION'
2901    RM='$RM'
2902    ofile='$ofile'], [])
2903])dnl /_LT_CONFIG_SAVE_COMMANDS
2904])# _LT_CONFIG
2905
2906
2907# LT_SUPPORTED_TAG(TAG)
2908# ---------------------
2909# Trace this macro to discover what tags are supported by the libtool
2910# --tag option, using:
2911#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
2912AC_DEFUN([LT_SUPPORTED_TAG], [])
2913
2914
2915# C support is built-in for now
2916m4_define([_LT_LANG_C_enabled], [])
2917m4_define([_LT_TAGS], [])
2918
2919
2920# LT_LANG(LANG)
2921# -------------
2922# Enable libtool support for the given language if not already enabled.
2923AC_DEFUN([LT_LANG],
2924[AC_BEFORE([$0], [LT_OUTPUT])dnl
2925m4_case([$1],
2926  [C],			[_LT_LANG(C)],
2927  [C++],		[_LT_LANG(CXX)],
2928  [Go],			[_LT_LANG(GO)],
2929  [Java],		[_LT_LANG(GCJ)],
2930  [Fortran 77],		[_LT_LANG(F77)],
2931  [Fortran],		[_LT_LANG(FC)],
2932  [Windows Resource],	[_LT_LANG(RC)],
2933  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
2934    [_LT_LANG($1)],
2935    [m4_fatal([$0: unsupported language: "$1"])])])dnl
2936])# LT_LANG
2937
2938
2939# _LT_LANG(LANGNAME)
2940# ------------------
2941m4_defun([_LT_LANG],
2942[m4_ifdef([_LT_LANG_]$1[_enabled], [],
2943  [LT_SUPPORTED_TAG([$1])dnl
2944  m4_append([_LT_TAGS], [$1 ])dnl
2945  m4_define([_LT_LANG_]$1[_enabled], [])dnl
2946  _LT_LANG_$1_CONFIG($1)])dnl
2947])# _LT_LANG
2948
2949
2950m4_ifndef([AC_PROG_GO], [
2951# NOTE: This macro has been submitted for inclusion into   #
2952#  GNU Autoconf as AC_PROG_GO.  When it is available in    #
2953#  a released version of Autoconf we should remove this    #
2954#  macro and use it instead.                               #
2955m4_defun([AC_PROG_GO],
2956[AC_LANG_PUSH(Go)dnl
2957AC_ARG_VAR([GOC],     [Go compiler command])dnl
2958AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
2959_AC_ARG_VAR_LDFLAGS()dnl
2960AC_CHECK_TOOL(GOC, gccgo)
2961if test -z "$GOC"; then
2962  if test -n "$ac_tool_prefix"; then
2963    AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
2964  fi
2965fi
2966if test -z "$GOC"; then
2967  AC_CHECK_PROG(GOC, gccgo, gccgo, false)
2968fi
2969])#m4_defun
2970])#m4_ifndef
2971
2972
2973# _LT_LANG_DEFAULT_CONFIG
2974# -----------------------
2975m4_defun([_LT_LANG_DEFAULT_CONFIG],
2976[AC_PROVIDE_IFELSE([AC_PROG_CXX],
2977  [LT_LANG(CXX)],
2978  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
2979
2980AC_PROVIDE_IFELSE([AC_PROG_F77],
2981  [LT_LANG(F77)],
2982  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
2983
2984AC_PROVIDE_IFELSE([AC_PROG_FC],
2985  [LT_LANG(FC)],
2986  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
2987
2988dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
2989dnl pulling things in needlessly.
2990AC_PROVIDE_IFELSE([AC_PROG_GCJ],
2991  [LT_LANG(GCJ)],
2992  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
2993    [LT_LANG(GCJ)],
2994    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
2995      [LT_LANG(GCJ)],
2996      [m4_ifdef([AC_PROG_GCJ],
2997	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
2998       m4_ifdef([A][M_PROG_GCJ],
2999	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
3000       m4_ifdef([LT_PROG_GCJ],
3001	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
3002
3003AC_PROVIDE_IFELSE([AC_PROG_GO],
3004  [LT_LANG(GO)],
3005  [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
3006
3007AC_PROVIDE_IFELSE([LT_PROG_RC],
3008  [LT_LANG(RC)],
3009  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
3010])# _LT_LANG_DEFAULT_CONFIG
3011
3012# Obsolete macros:
3013AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
3014AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
3015AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
3016AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
3017AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
3018dnl aclocal-1.4 backwards compatibility:
3019dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
3020dnl AC_DEFUN([AC_LIBTOOL_F77], [])
3021dnl AC_DEFUN([AC_LIBTOOL_FC], [])
3022dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
3023dnl AC_DEFUN([AC_LIBTOOL_RC], [])
3024
3025
3026# _LT_TAG_COMPILER
3027# ----------------
3028m4_defun([_LT_TAG_COMPILER],
3029[AC_REQUIRE([AC_PROG_CC])dnl
3030
3031_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
3032_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
3033_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
3034_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
3035
3036# If no C compiler was specified, use CC.
3037LTCC=${LTCC-"$CC"}
3038
3039# If no C compiler flags were specified, use CFLAGS.
3040LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
3041
3042# Allow CC to be a program name with arguments.
3043compiler=$CC
3044])# _LT_TAG_COMPILER
3045
3046
3047# _LT_COMPILER_BOILERPLATE
3048# ------------------------
3049# Check for compiler boilerplate output or warnings with
3050# the simple compiler test code.
3051m4_defun([_LT_COMPILER_BOILERPLATE],
3052[m4_require([_LT_DECL_SED])dnl
3053ac_outfile=conftest.$ac_objext
3054echo "$lt_simple_compile_test_code" >conftest.$ac_ext
3055eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
3056_lt_compiler_boilerplate=`cat conftest.err`
3057$RM conftest*
3058])# _LT_COMPILER_BOILERPLATE
3059
3060
3061# _LT_LINKER_BOILERPLATE
3062# ----------------------
3063# Check for linker boilerplate output or warnings with
3064# the simple link test code.
3065m4_defun([_LT_LINKER_BOILERPLATE],
3066[m4_require([_LT_DECL_SED])dnl
3067ac_outfile=conftest.$ac_objext
3068echo "$lt_simple_link_test_code" >conftest.$ac_ext
3069eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
3070_lt_linker_boilerplate=`cat conftest.err`
3071$RM -r conftest*
3072])# _LT_LINKER_BOILERPLATE
3073
3074# _LT_REQUIRED_DARWIN_CHECKS
3075# -------------------------
3076m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
3077  case $host_os in
3078    rhapsody* | darwin*)
3079    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
3080    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
3081    AC_CHECK_TOOL([LIPO], [lipo], [:])
3082    AC_CHECK_TOOL([OTOOL], [otool], [:])
3083    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
3084    _LT_DECL([], [DSYMUTIL], [1],
3085      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
3086    _LT_DECL([], [NMEDIT], [1],
3087      [Tool to change global to local symbols on Mac OS X])
3088    _LT_DECL([], [LIPO], [1],
3089      [Tool to manipulate fat objects and archives on Mac OS X])
3090    _LT_DECL([], [OTOOL], [1],
3091      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
3092    _LT_DECL([], [OTOOL64], [1],
3093      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
3094
3095    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
3096      [lt_cv_apple_cc_single_mod=no
3097      if test -z "$LT_MULTI_MODULE"; then
3098	# By default we will add the -single_module flag. You can override
3099	# by either setting the environment variable LT_MULTI_MODULE
3100	# non-empty at configure time, or by adding -multi_module to the
3101	# link flags.
3102	rm -rf libconftest.dylib*
3103	echo "int foo(void){return 1;}" > conftest.c
3104	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
3105-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
3106	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
3107	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
3108        _lt_result=$?
3109	# If there is a non-empty error log, and "single_module"
3110	# appears in it, assume the flag caused a linker warning
3111        if test -s conftest.err && $GREP single_module conftest.err; then
3112	  cat conftest.err >&AS_MESSAGE_LOG_FD
3113	# Otherwise, if the output was created with a 0 exit code from
3114	# the compiler, it worked.
3115	elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
3116	  lt_cv_apple_cc_single_mod=yes
3117	else
3118	  cat conftest.err >&AS_MESSAGE_LOG_FD
3119	fi
3120	rm -rf libconftest.dylib*
3121	rm -f conftest.*
3122      fi])
3123
3124    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
3125      [lt_cv_ld_exported_symbols_list],
3126      [lt_cv_ld_exported_symbols_list=no
3127      save_LDFLAGS=$LDFLAGS
3128      echo "_main" > conftest.sym
3129      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
3130      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
3131	[lt_cv_ld_exported_symbols_list=yes],
3132	[lt_cv_ld_exported_symbols_list=no])
3133	LDFLAGS=$save_LDFLAGS
3134    ])
3135
3136    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
3137      [lt_cv_ld_force_load=no
3138      cat > conftest.c << _LT_EOF
3139int forced_loaded() { return 2;}
3140_LT_EOF
3141      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
3142      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
3143      echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
3144      $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
3145      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
3146      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
3147      cat > conftest.c << _LT_EOF
3148int main() { return 0;}
3149_LT_EOF
3150      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
3151      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
3152      _lt_result=$?
3153      if test -s conftest.err && $GREP force_load conftest.err; then
3154	cat conftest.err >&AS_MESSAGE_LOG_FD
3155      elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
3156	lt_cv_ld_force_load=yes
3157      else
3158	cat conftest.err >&AS_MESSAGE_LOG_FD
3159      fi
3160        rm -f conftest.err libconftest.a conftest conftest.c
3161        rm -rf conftest.dSYM
3162    ])
3163    case $host_os in
3164    rhapsody* | darwin1.[[012]])
3165      _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
3166    darwin1.*)
3167      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
3168    darwin*) # darwin 5.x on
3169      # if running on 10.5 or later, the deployment target defaults
3170      # to the OS version, if on x86, and 10.4, the deployment
3171      # target defaults to 10.4. Don't you love it?
3172      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
3173	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
3174	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
3175	10.[[012]][[,.]]*)
3176	  _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
3177	10.*)
3178	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
3179      esac
3180    ;;
3181  esac
3182    if test yes = "$lt_cv_apple_cc_single_mod"; then
3183      _lt_dar_single_mod='$single_module'
3184    fi
3185    if test yes = "$lt_cv_ld_exported_symbols_list"; then
3186      _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
3187    else
3188      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
3189    fi
3190    if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
3191      _lt_dsymutil='~$DSYMUTIL $lib || :'
3192    else
3193      _lt_dsymutil=
3194    fi
3195    ;;
3196  esac
3197])
3198
3199
3200# _LT_DARWIN_LINKER_FEATURES([TAG])
3201# ---------------------------------
3202# Checks for linker and compiler features on darwin
3203m4_defun([_LT_DARWIN_LINKER_FEATURES],
3204[
3205  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
3206  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
3207  _LT_TAGVAR(hardcode_direct, $1)=no
3208  _LT_TAGVAR(hardcode_automatic, $1)=yes
3209  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3210  if test yes = "$lt_cv_ld_force_load"; then
3211    _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\"`'
3212    m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
3213                  [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
3214  else
3215    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
3216  fi
3217  _LT_TAGVAR(link_all_deplibs, $1)=yes
3218  _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
3219  case $cc_basename in
3220     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
3221     *) _lt_dar_can_shared=$GCC ;;
3222  esac
3223  if test yes = "$_lt_dar_can_shared"; then
3224    output_verbose_link_cmd=func_echo_all
3225    _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"
3226    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
3227    _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"
3228    _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"
3229    m4_if([$1], [CXX],
3230[   if test yes != "$lt_cv_apple_cc_single_mod"; then
3231      _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"
3232      _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"
3233    fi
3234],[])
3235  else
3236  _LT_TAGVAR(ld_shlibs, $1)=no
3237  fi
3238])
3239
3240# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
3241# ----------------------------------
3242# Links a minimal program and checks the executable
3243# for the system default hardcoded library path. In most cases,
3244# this is /usr/lib:/lib, but when the MPI compilers are used
3245# the location of the communication and MPI libs are included too.
3246# If we don't find anything, use the default library path according
3247# to the aix ld manual.
3248# Store the results from the different compilers for each TAGNAME.
3249# Allow to override them for all tags through lt_cv_aix_libpath.
3250m4_defun([_LT_SYS_MODULE_PATH_AIX],
3251[m4_require([_LT_DECL_SED])dnl
3252if test set = "${lt_cv_aix_libpath+set}"; then
3253  aix_libpath=$lt_cv_aix_libpath
3254else
3255  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
3256  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
3257  lt_aix_libpath_sed='[
3258      /Import File Strings/,/^$/ {
3259	  /^0/ {
3260	      s/^0  *\([^ ]*\) *$/\1/
3261	      p
3262	  }
3263      }]'
3264  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
3265  # Check for a 64-bit object if we didn't find anything.
3266  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
3267    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
3268  fi],[])
3269  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
3270    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
3271  fi
3272  ])
3273  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
3274fi
3275])# _LT_SYS_MODULE_PATH_AIX
3276
3277
3278# _LT_SHELL_INIT(ARG)
3279# -------------------
3280m4_define([_LT_SHELL_INIT],
3281[m4_divert_text([M4SH-INIT], [$1
3282])])# _LT_SHELL_INIT
3283
3284
3285
3286# _LT_PROG_ECHO_BACKSLASH
3287# -----------------------
3288# Find how we can fake an echo command that does not interpret backslash.
3289# In particular, with Autoconf 2.60 or later we add some code to the start
3290# of the generated configure script that will find a shell with a builtin
3291# printf (that we can use as an echo command).
3292m4_defun([_LT_PROG_ECHO_BACKSLASH],
3293[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
3294ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
3295ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
3296
3297AC_MSG_CHECKING([how to print strings])
3298# Test print first, because it will be a builtin if present.
3299if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
3300   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
3301  ECHO='print -r --'
3302elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
3303  ECHO='printf %s\n'
3304else
3305  # Use this function as a fallback that always works.
3306  func_fallback_echo ()
3307  {
3308    eval 'cat <<_LTECHO_EOF
3309$[]1
3310_LTECHO_EOF'
3311  }
3312  ECHO='func_fallback_echo'
3313fi
3314
3315# func_echo_all arg...
3316# Invoke $ECHO with all args, space-separated.
3317func_echo_all ()
3318{
3319    $ECHO "$*"
3320}
3321
3322case $ECHO in
3323  printf*) AC_MSG_RESULT([printf]) ;;
3324  print*) AC_MSG_RESULT([print -r]) ;;
3325  *) AC_MSG_RESULT([cat]) ;;
3326esac
3327
3328m4_ifdef([_AS_DETECT_SUGGESTED],
3329[_AS_DETECT_SUGGESTED([
3330  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
3331    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
3332    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
3333    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
3334    PATH=/empty FPATH=/empty; export PATH FPATH
3335    test "X`printf %s $ECHO`" = "X$ECHO" \
3336      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
3337
3338_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
3339_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
3340])# _LT_PROG_ECHO_BACKSLASH
3341
3342
3343# _LT_WITH_SYSROOT
3344# ----------------
3345AC_DEFUN([_LT_WITH_SYSROOT],
3346[AC_MSG_CHECKING([for sysroot])
3347AC_ARG_WITH([sysroot],
3348[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
3349  [Search for dependent libraries within DIR (or the compiler's sysroot
3350   if not specified).])],
3351[], [with_sysroot=no])
3352
3353dnl lt_sysroot will always be passed unquoted.  We quote it here
3354dnl in case the user passed a directory name.
3355lt_sysroot=
3356case $with_sysroot in #(
3357 yes)
3358   if test yes = "$GCC"; then
3359     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
3360   fi
3361   ;; #(
3362 /*)
3363   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
3364   ;; #(
3365 no|'')
3366   ;; #(
3367 *)
3368   AC_MSG_RESULT([$with_sysroot])
3369   AC_MSG_ERROR([The sysroot must be an absolute path.])
3370   ;;
3371esac
3372
3373 AC_MSG_RESULT([${lt_sysroot:-no}])
3374_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
3375[dependent libraries, and where our libraries should be installed.])])
3376
3377# _LT_ENABLE_LOCK
3378# ---------------
3379m4_defun([_LT_ENABLE_LOCK],
3380[AC_ARG_ENABLE([libtool-lock],
3381  [AS_HELP_STRING([--disable-libtool-lock],
3382    [avoid locking (might break parallel builds)])])
3383test no = "$enable_libtool_lock" || enable_libtool_lock=yes
3384
3385# Some flags need to be propagated to the compiler or linker for good
3386# libtool support.
3387case $host in
3388ia64-*-hpux*)
3389  # Find out what ABI is being produced by ac_compile, and set mode
3390  # options accordingly.
3391  echo 'int i;' > conftest.$ac_ext
3392  if AC_TRY_EVAL(ac_compile); then
3393    case `/usr/bin/file conftest.$ac_objext` in
3394      *ELF-32*)
3395	HPUX_IA64_MODE=32
3396	;;
3397      *ELF-64*)
3398	HPUX_IA64_MODE=64
3399	;;
3400    esac
3401  fi
3402  rm -rf conftest*
3403  ;;
3404*-*-irix6*)
3405  # Find out what ABI is being produced by ac_compile, and set linker
3406  # options accordingly.
3407  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
3408  if AC_TRY_EVAL(ac_compile); then
3409    if test yes = "$lt_cv_prog_gnu_ld"; then
3410      case `/usr/bin/file conftest.$ac_objext` in
3411	*32-bit*)
3412	  LD="${LD-ld} -melf32bsmip"
3413	  ;;
3414	*N32*)
3415	  LD="${LD-ld} -melf32bmipn32"
3416	  ;;
3417	*64-bit*)
3418	  LD="${LD-ld} -melf64bmip"
3419	;;
3420      esac
3421    else
3422      case `/usr/bin/file conftest.$ac_objext` in
3423	*32-bit*)
3424	  LD="${LD-ld} -32"
3425	  ;;
3426	*N32*)
3427	  LD="${LD-ld} -n32"
3428	  ;;
3429	*64-bit*)
3430	  LD="${LD-ld} -64"
3431	  ;;
3432      esac
3433    fi
3434  fi
3435  rm -rf conftest*
3436  ;;
3437
3438mips64*-*linux*)
3439  # Find out what ABI is being produced by ac_compile, and set linker
3440  # options accordingly.
3441  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
3442  if AC_TRY_EVAL(ac_compile); then
3443    emul=elf
3444    case `/usr/bin/file conftest.$ac_objext` in
3445      *32-bit*)
3446	emul="${emul}32"
3447	;;
3448      *64-bit*)
3449	emul="${emul}64"
3450	;;
3451    esac
3452    case `/usr/bin/file conftest.$ac_objext` in
3453      *MSB*)
3454	emul="${emul}btsmip"
3455	;;
3456      *LSB*)
3457	emul="${emul}ltsmip"
3458	;;
3459    esac
3460    case `/usr/bin/file conftest.$ac_objext` in
3461      *N32*)
3462	emul="${emul}n32"
3463	;;
3464    esac
3465    LD="${LD-ld} -m $emul"
3466  fi
3467  rm -rf conftest*
3468  ;;
3469
3470x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
3471s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
3472  # Find out what ABI is being produced by ac_compile, and set linker
3473  # options accordingly.  Note that the listed cases only cover the
3474  # situations where additional linker options are needed (such as when
3475  # doing 32-bit compilation for a host where ld defaults to 64-bit, or
3476  # vice versa); the common cases where no linker options are needed do
3477  # not appear in the list.
3478  echo 'int i;' > conftest.$ac_ext
3479  if AC_TRY_EVAL(ac_compile); then
3480    case `/usr/bin/file conftest.o` in
3481      *32-bit*)
3482	case $host in
3483	  x86_64-*kfreebsd*-gnu)
3484	    LD="${LD-ld} -m elf_i386_fbsd"
3485	    ;;
3486	  x86_64-*linux*)
3487	    case `/usr/bin/file conftest.o` in
3488	      *x86-64*)
3489		LD="${LD-ld} -m elf32_x86_64"
3490		;;
3491	      *)
3492		LD="${LD-ld} -m elf_i386"
3493		;;
3494	    esac
3495	    ;;
3496	  powerpc64le-*linux*)
3497	    LD="${LD-ld} -m elf32lppclinux"
3498	    ;;
3499	  powerpc64-*linux*)
3500	    LD="${LD-ld} -m elf32ppclinux"
3501	    ;;
3502	  s390x-*linux*)
3503	    LD="${LD-ld} -m elf_s390"
3504	    ;;
3505	  sparc64-*linux*)
3506	    LD="${LD-ld} -m elf32_sparc"
3507	    ;;
3508	esac
3509	;;
3510      *64-bit*)
3511	case $host in
3512	  x86_64-*kfreebsd*-gnu)
3513	    LD="${LD-ld} -m elf_x86_64_fbsd"
3514	    ;;
3515	  x86_64-*linux*)
3516	    LD="${LD-ld} -m elf_x86_64"
3517	    ;;
3518	  powerpcle-*linux*)
3519	    LD="${LD-ld} -m elf64lppc"
3520	    ;;
3521	  powerpc-*linux*)
3522	    LD="${LD-ld} -m elf64ppc"
3523	    ;;
3524	  s390*-*linux*|s390*-*tpf*)
3525	    LD="${LD-ld} -m elf64_s390"
3526	    ;;
3527	  sparc*-*linux*)
3528	    LD="${LD-ld} -m elf64_sparc"
3529	    ;;
3530	esac
3531	;;
3532    esac
3533  fi
3534  rm -rf conftest*
3535  ;;
3536
3537*-*-sco3.2v5*)
3538  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3539  SAVE_CFLAGS=$CFLAGS
3540  CFLAGS="$CFLAGS -belf"
3541  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
3542    [AC_LANG_PUSH(C)
3543     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
3544     AC_LANG_POP])
3545  if test yes != "$lt_cv_cc_needs_belf"; then
3546    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3547    CFLAGS=$SAVE_CFLAGS
3548  fi
3549  ;;
3550*-*solaris*)
3551  # Find out what ABI is being produced by ac_compile, and set linker
3552  # options accordingly.
3553  echo 'int i;' > conftest.$ac_ext
3554  if AC_TRY_EVAL(ac_compile); then
3555    case `/usr/bin/file conftest.o` in
3556    *64-bit*)
3557      case $lt_cv_prog_gnu_ld in
3558      yes*)
3559        case $host in
3560        i?86-*-solaris*|x86_64-*-solaris*)
3561          LD="${LD-ld} -m elf_x86_64"
3562          ;;
3563        sparc*-*-solaris*)
3564          LD="${LD-ld} -m elf64_sparc"
3565          ;;
3566        esac
3567        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
3568        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
3569          LD=${LD-ld}_sol2
3570        fi
3571        ;;
3572      *)
3573	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
3574	  LD="${LD-ld} -64"
3575	fi
3576	;;
3577      esac
3578      ;;
3579    esac
3580  fi
3581  rm -rf conftest*
3582  ;;
3583esac
3584
3585need_locks=$enable_libtool_lock
3586])# _LT_ENABLE_LOCK
3587
3588
3589# _LT_PROG_AR
3590# -----------
3591m4_defun([_LT_PROG_AR],
3592[AC_CHECK_TOOLS(AR, [ar], false)
3593: ${AR=ar}
3594_LT_DECL([], [AR], [1], [The archiver])
3595
3596# Use ARFLAGS variable as AR's operation code to sync the variable naming with
3597# Automake.  If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have
3598# higher priority because thats what people were doing historically (setting
3599# ARFLAGS for automake and AR_FLAGS for libtool).  FIXME: Make the AR_FLAGS
3600# variable obsoleted/removed.
3601
3602test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr}
3603lt_ar_flags=$AR_FLAGS
3604_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)])
3605
3606# Make AR_FLAGS overridable by 'make ARFLAGS='.  Don't try to run-time override
3607# by AR_FLAGS because that was never working and AR_FLAGS is about to die.
3608_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}],
3609         [Flags to create an archive])
3610
3611AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
3612  [lt_cv_ar_at_file=no
3613   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
3614     [echo conftest.$ac_objext > conftest.lst
3615      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
3616      AC_TRY_EVAL([lt_ar_try])
3617      if test 0 -eq "$ac_status"; then
3618	# Ensure the archiver fails upon bogus file names.
3619	rm -f conftest.$ac_objext libconftest.a
3620	AC_TRY_EVAL([lt_ar_try])
3621	if test 0 -ne "$ac_status"; then
3622          lt_cv_ar_at_file=@
3623        fi
3624      fi
3625      rm -f conftest.* libconftest.a
3626     ])
3627  ])
3628
3629if test no = "$lt_cv_ar_at_file"; then
3630  archiver_list_spec=
3631else
3632  archiver_list_spec=$lt_cv_ar_at_file
3633fi
3634_LT_DECL([], [archiver_list_spec], [1],
3635  [How to feed a file listing to the archiver])
3636])# _LT_PROG_AR
3637
3638
3639# _LT_CMD_OLD_ARCHIVE
3640# -------------------
3641m4_defun([_LT_CMD_OLD_ARCHIVE],
3642[_LT_PROG_AR
3643
3644AC_CHECK_TOOL(STRIP, strip, :)
3645test -z "$STRIP" && STRIP=:
3646_LT_DECL([], [STRIP], [1], [A symbol stripping program])
3647
3648AC_CHECK_TOOL(RANLIB, ranlib, :)
3649test -z "$RANLIB" && RANLIB=:
3650_LT_DECL([], [RANLIB], [1],
3651    [Commands used to install an old-style archive])
3652
3653# Determine commands to create old-style static archives.
3654old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
3655old_postinstall_cmds='chmod 644 $oldlib'
3656old_postuninstall_cmds=
3657
3658if test -n "$RANLIB"; then
3659  case $host_os in
3660  bitrig* | openbsd*)
3661    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
3662    ;;
3663  *)
3664    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
3665    ;;
3666  esac
3667  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
3668fi
3669
3670case $host_os in
3671  darwin*)
3672    lock_old_archive_extraction=yes ;;
3673  *)
3674    lock_old_archive_extraction=no ;;
3675esac
3676_LT_DECL([], [old_postinstall_cmds], [2])
3677_LT_DECL([], [old_postuninstall_cmds], [2])
3678_LT_TAGDECL([], [old_archive_cmds], [2],
3679    [Commands used to build an old-style archive])
3680_LT_DECL([], [lock_old_archive_extraction], [0],
3681    [Whether to use a lock for old archive extraction])
3682])# _LT_CMD_OLD_ARCHIVE
3683
3684
3685# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
3686#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
3687# ----------------------------------------------------------------
3688# Check whether the given compiler option works
3689AC_DEFUN([_LT_COMPILER_OPTION],
3690[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3691m4_require([_LT_DECL_SED])dnl
3692AC_CACHE_CHECK([$1], [$2],
3693  [$2=no
3694   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
3695   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
3696   lt_compiler_flag="$3"  ## exclude from sc_useless_quotes_in_assignment
3697   # Insert the option either (1) after the last *FLAGS variable, or
3698   # (2) before a word containing "conftest.", or (3) at the end.
3699   # Note that $ac_compile itself does not contain backslashes and begins
3700   # with a dollar sign (not a hyphen), so the echo should work correctly.
3701   # The option is referenced via a variable to avoid confusing sed.
3702   lt_compile=`echo "$ac_compile" | $SED \
3703   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
3704   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
3705   -e 's:$: $lt_compiler_flag:'`
3706   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
3707   (eval "$lt_compile" 2>conftest.err)
3708   ac_status=$?
3709   cat conftest.err >&AS_MESSAGE_LOG_FD
3710   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
3711   if (exit $ac_status) && test -s "$ac_outfile"; then
3712     # The compiler can only warn and ignore the option if not recognized
3713     # So say no if there are warnings other than the usual output.
3714     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
3715     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
3716     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
3717       $2=yes
3718     fi
3719   fi
3720   $RM conftest*
3721])
3722
3723if test yes = "[$]$2"; then
3724    m4_if([$5], , :, [$5])
3725else
3726    m4_if([$6], , :, [$6])
3727fi
3728])# _LT_COMPILER_OPTION
3729
3730# Old name:
3731AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
3732dnl aclocal-1.4 backwards compatibility:
3733dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
3734
3735
3736# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
3737#                  [ACTION-SUCCESS], [ACTION-FAILURE])
3738# ----------------------------------------------------
3739# Check whether the given linker option works
3740AC_DEFUN([_LT_LINKER_OPTION],
3741[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3742m4_require([_LT_DECL_SED])dnl
3743AC_CACHE_CHECK([$1], [$2],
3744  [$2=no
3745   save_LDFLAGS=$LDFLAGS
3746   LDFLAGS="$LDFLAGS $3"
3747   echo "$lt_simple_link_test_code" > conftest.$ac_ext
3748   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
3749     # The linker can only warn and ignore the option if not recognized
3750     # So say no if there are warnings
3751     if test -s conftest.err; then
3752       # Append any errors to the config.log.
3753       cat conftest.err 1>&AS_MESSAGE_LOG_FD
3754       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
3755       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
3756       if diff conftest.exp conftest.er2 >/dev/null; then
3757         $2=yes
3758       fi
3759     else
3760       $2=yes
3761     fi
3762   fi
3763   $RM -r conftest*
3764   LDFLAGS=$save_LDFLAGS
3765])
3766
3767if test yes = "[$]$2"; then
3768    m4_if([$4], , :, [$4])
3769else
3770    m4_if([$5], , :, [$5])
3771fi
3772])# _LT_LINKER_OPTION
3773
3774# Old name:
3775AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
3776dnl aclocal-1.4 backwards compatibility:
3777dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
3778
3779
3780# LT_CMD_MAX_LEN
3781#---------------
3782AC_DEFUN([LT_CMD_MAX_LEN],
3783[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3784# find the maximum length of command line arguments
3785AC_MSG_CHECKING([the maximum length of command line arguments])
3786AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
3787  i=0
3788  teststring=ABCD
3789
3790  case $build_os in
3791  msdosdjgpp*)
3792    # On DJGPP, this test can blow up pretty badly due to problems in libc
3793    # (any single argument exceeding 2000 bytes causes a buffer overrun
3794    # during glob expansion).  Even if it were fixed, the result of this
3795    # check would be larger than it should be.
3796    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
3797    ;;
3798
3799  gnu*)
3800    # Under GNU Hurd, this test is not required because there is
3801    # no limit to the length of command line arguments.
3802    # Libtool will interpret -1 as no limit whatsoever
3803    lt_cv_sys_max_cmd_len=-1;
3804    ;;
3805
3806  cygwin* | mingw* | cegcc*)
3807    # On Win9x/ME, this test blows up -- it succeeds, but takes
3808    # about 5 minutes as the teststring grows exponentially.
3809    # Worse, since 9x/ME are not pre-emptively multitasking,
3810    # you end up with a "frozen" computer, even though with patience
3811    # the test eventually succeeds (with a max line length of 256k).
3812    # Instead, let's just punt: use the minimum linelength reported by
3813    # all of the supported platforms: 8192 (on NT/2K/XP).
3814    lt_cv_sys_max_cmd_len=8192;
3815    ;;
3816
3817  mint*)
3818    # On MiNT this can take a long time and run out of memory.
3819    lt_cv_sys_max_cmd_len=8192;
3820    ;;
3821
3822  amigaos*)
3823    # On AmigaOS with pdksh, this test takes hours, literally.
3824    # So we just punt and use a minimum line length of 8192.
3825    lt_cv_sys_max_cmd_len=8192;
3826    ;;
3827
3828  bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
3829    # This has been around since 386BSD, at least.  Likely further.
3830    if test -x /sbin/sysctl; then
3831      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
3832    elif test -x /usr/sbin/sysctl; then
3833      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
3834    else
3835      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
3836    fi
3837    # And add a safety zone
3838    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
3839    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
3840    ;;
3841
3842  interix*)
3843    # We know the value 262144 and hardcode it with a safety zone (like BSD)
3844    lt_cv_sys_max_cmd_len=196608
3845    ;;
3846
3847  os2*)
3848    # The test takes a long time on OS/2.
3849    lt_cv_sys_max_cmd_len=8192
3850    ;;
3851
3852  osf*)
3853    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
3854    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
3855    # nice to cause kernel panics so lets avoid the loop below.
3856    # First set a reasonable default.
3857    lt_cv_sys_max_cmd_len=16384
3858    #
3859    if test -x /sbin/sysconfig; then
3860      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
3861        *1*) lt_cv_sys_max_cmd_len=-1 ;;
3862      esac
3863    fi
3864    ;;
3865  sco3.2v5*)
3866    lt_cv_sys_max_cmd_len=102400
3867    ;;
3868  sysv5* | sco5v6* | sysv4.2uw2*)
3869    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
3870    if test -n "$kargmax"; then
3871      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
3872    else
3873      lt_cv_sys_max_cmd_len=32768
3874    fi
3875    ;;
3876  *)
3877    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
3878    if test -n "$lt_cv_sys_max_cmd_len" && \
3879       test undefined != "$lt_cv_sys_max_cmd_len"; then
3880      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
3881      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
3882    else
3883      # Make teststring a little bigger before we do anything with it.
3884      # a 1K string should be a reasonable start.
3885      for i in 1 2 3 4 5 6 7 8; do
3886        teststring=$teststring$teststring
3887      done
3888      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
3889      # If test is not a shell built-in, we'll probably end up computing a
3890      # maximum length that is only half of the actual maximum length, but
3891      # we can't tell.
3892      while { test X`env echo "$teststring$teststring" 2>/dev/null` \
3893	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
3894	      test 17 != "$i" # 1/2 MB should be enough
3895      do
3896        i=`expr $i + 1`
3897        teststring=$teststring$teststring
3898      done
3899      # Only check the string length outside the loop.
3900      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
3901      teststring=
3902      # Add a significant safety factor because C++ compilers can tack on
3903      # massive amounts of additional arguments before passing them to the
3904      # linker.  It appears as though 1/2 is a usable value.
3905      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
3906    fi
3907    ;;
3908  esac
3909])
3910if test -n "$lt_cv_sys_max_cmd_len"; then
3911  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
3912else
3913  AC_MSG_RESULT(none)
3914fi
3915max_cmd_len=$lt_cv_sys_max_cmd_len
3916_LT_DECL([], [max_cmd_len], [0],
3917    [What is the maximum length of a command?])
3918])# LT_CMD_MAX_LEN
3919
3920# Old name:
3921AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
3922dnl aclocal-1.4 backwards compatibility:
3923dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
3924
3925
3926# _LT_HEADER_DLFCN
3927# ----------------
3928m4_defun([_LT_HEADER_DLFCN],
3929[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
3930])# _LT_HEADER_DLFCN
3931
3932
3933# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
3934#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
3935# ----------------------------------------------------------------
3936m4_defun([_LT_TRY_DLOPEN_SELF],
3937[m4_require([_LT_HEADER_DLFCN])dnl
3938if test yes = "$cross_compiling"; then :
3939  [$4]
3940else
3941  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
3942  lt_status=$lt_dlunknown
3943  cat > conftest.$ac_ext <<_LT_EOF
3944[#line $LINENO "configure"
3945#include "confdefs.h"
3946
3947#if HAVE_DLFCN_H
3948#include <dlfcn.h>
3949#endif
3950
3951#include <stdio.h>
3952
3953#ifdef RTLD_GLOBAL
3954#  define LT_DLGLOBAL		RTLD_GLOBAL
3955#else
3956#  ifdef DL_GLOBAL
3957#    define LT_DLGLOBAL		DL_GLOBAL
3958#  else
3959#    define LT_DLGLOBAL		0
3960#  endif
3961#endif
3962
3963/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
3964   find out it does not work in some platform. */
3965#ifndef LT_DLLAZY_OR_NOW
3966#  ifdef RTLD_LAZY
3967#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
3968#  else
3969#    ifdef DL_LAZY
3970#      define LT_DLLAZY_OR_NOW		DL_LAZY
3971#    else
3972#      ifdef RTLD_NOW
3973#        define LT_DLLAZY_OR_NOW	RTLD_NOW
3974#      else
3975#        ifdef DL_NOW
3976#          define LT_DLLAZY_OR_NOW	DL_NOW
3977#        else
3978#          define LT_DLLAZY_OR_NOW	0
3979#        endif
3980#      endif
3981#    endif
3982#  endif
3983#endif
3984
3985/* When -fvisibility=hidden is used, assume the code has been annotated
3986   correspondingly for the symbols needed.  */
3987#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
3988int fnord () __attribute__((visibility("default")));
3989#endif
3990
3991int fnord () { return 42; }
3992int main ()
3993{
3994  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
3995  int status = $lt_dlunknown;
3996
3997  if (self)
3998    {
3999      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
4000      else
4001        {
4002	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
4003          else puts (dlerror ());
4004	}
4005      /* dlclose (self); */
4006    }
4007  else
4008    puts (dlerror ());
4009
4010  return status;
4011}]
4012_LT_EOF
4013  if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
4014    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
4015    lt_status=$?
4016    case x$lt_status in
4017      x$lt_dlno_uscore) $1 ;;
4018      x$lt_dlneed_uscore) $2 ;;
4019      x$lt_dlunknown|x*) $3 ;;
4020    esac
4021  else :
4022    # compilation failed
4023    $3
4024  fi
4025fi
4026rm -fr conftest*
4027])# _LT_TRY_DLOPEN_SELF
4028
4029
4030# LT_SYS_DLOPEN_SELF
4031# ------------------
4032AC_DEFUN([LT_SYS_DLOPEN_SELF],
4033[m4_require([_LT_HEADER_DLFCN])dnl
4034if test yes != "$enable_dlopen"; then
4035  enable_dlopen=unknown
4036  enable_dlopen_self=unknown
4037  enable_dlopen_self_static=unknown
4038else
4039  lt_cv_dlopen=no
4040  lt_cv_dlopen_libs=
4041
4042  case $host_os in
4043  beos*)
4044    lt_cv_dlopen=load_add_on
4045    lt_cv_dlopen_libs=
4046    lt_cv_dlopen_self=yes
4047    ;;
4048
4049  mingw* | pw32* | cegcc*)
4050    lt_cv_dlopen=LoadLibrary
4051    lt_cv_dlopen_libs=
4052    ;;
4053
4054  cygwin*)
4055    lt_cv_dlopen=dlopen
4056    lt_cv_dlopen_libs=
4057    ;;
4058
4059  darwin*)
4060    # if libdl is installed we need to link against it
4061    AC_CHECK_LIB([dl], [dlopen],
4062		[lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
4063    lt_cv_dlopen=dyld
4064    lt_cv_dlopen_libs=
4065    lt_cv_dlopen_self=yes
4066    ])
4067    ;;
4068
4069  tpf*)
4070    # Don't try to run any link tests for TPF.  We know it's impossible
4071    # because TPF is a cross-compiler, and we know how we open DSOs.
4072    lt_cv_dlopen=dlopen
4073    lt_cv_dlopen_libs=
4074    lt_cv_dlopen_self=no
4075    ;;
4076
4077  *)
4078    AC_CHECK_FUNC([shl_load],
4079	  [lt_cv_dlopen=shl_load],
4080      [AC_CHECK_LIB([dld], [shl_load],
4081	    [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
4082	[AC_CHECK_FUNC([dlopen],
4083	      [lt_cv_dlopen=dlopen],
4084	  [AC_CHECK_LIB([dl], [dlopen],
4085		[lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
4086	    [AC_CHECK_LIB([svld], [dlopen],
4087		  [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
4088	      [AC_CHECK_LIB([dld], [dld_link],
4089		    [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
4090	      ])
4091	    ])
4092	  ])
4093	])
4094      ])
4095    ;;
4096  esac
4097
4098  if test no = "$lt_cv_dlopen"; then
4099    enable_dlopen=no
4100  else
4101    enable_dlopen=yes
4102  fi
4103
4104  case $lt_cv_dlopen in
4105  dlopen)
4106    save_CPPFLAGS=$CPPFLAGS
4107    test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
4108
4109    save_LDFLAGS=$LDFLAGS
4110    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
4111
4112    save_LIBS=$LIBS
4113    LIBS="$lt_cv_dlopen_libs $LIBS"
4114
4115    AC_CACHE_CHECK([whether a program can dlopen itself],
4116	  lt_cv_dlopen_self, [dnl
4117	  _LT_TRY_DLOPEN_SELF(
4118	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
4119	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
4120    ])
4121
4122    if test yes = "$lt_cv_dlopen_self"; then
4123      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
4124      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
4125	  lt_cv_dlopen_self_static, [dnl
4126	  _LT_TRY_DLOPEN_SELF(
4127	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
4128	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
4129      ])
4130    fi
4131
4132    CPPFLAGS=$save_CPPFLAGS
4133    LDFLAGS=$save_LDFLAGS
4134    LIBS=$save_LIBS
4135    ;;
4136  esac
4137
4138  case $lt_cv_dlopen_self in
4139  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
4140  *) enable_dlopen_self=unknown ;;
4141  esac
4142
4143  case $lt_cv_dlopen_self_static in
4144  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
4145  *) enable_dlopen_self_static=unknown ;;
4146  esac
4147fi
4148_LT_DECL([dlopen_support], [enable_dlopen], [0],
4149	 [Whether dlopen is supported])
4150_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
4151	 [Whether dlopen of programs is supported])
4152_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
4153	 [Whether dlopen of statically linked programs is supported])
4154])# LT_SYS_DLOPEN_SELF
4155
4156# Old name:
4157AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
4158dnl aclocal-1.4 backwards compatibility:
4159dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
4160
4161
4162# _LT_COMPILER_C_O([TAGNAME])
4163# ---------------------------
4164# Check to see if options -c and -o are simultaneously supported by compiler.
4165# This macro does not hard code the compiler like AC_PROG_CC_C_O.
4166m4_defun([_LT_COMPILER_C_O],
4167[m4_require([_LT_DECL_SED])dnl
4168m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4169m4_require([_LT_TAG_COMPILER])dnl
4170AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
4171  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
4172  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
4173   $RM -r conftest 2>/dev/null
4174   mkdir conftest
4175   cd conftest
4176   mkdir out
4177   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
4178
4179   lt_compiler_flag="-o out/conftest2.$ac_objext"
4180   # Insert the option either (1) after the last *FLAGS variable, or
4181   # (2) before a word containing "conftest.", or (3) at the end.
4182   # Note that $ac_compile itself does not contain backslashes and begins
4183   # with a dollar sign (not a hyphen), so the echo should work correctly.
4184   lt_compile=`echo "$ac_compile" | $SED \
4185   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
4186   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
4187   -e 's:$: $lt_compiler_flag:'`
4188   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
4189   (eval "$lt_compile" 2>out/conftest.err)
4190   ac_status=$?
4191   cat out/conftest.err >&AS_MESSAGE_LOG_FD
4192   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
4193   if (exit $ac_status) && test -s out/conftest2.$ac_objext
4194   then
4195     # The compiler can only warn and ignore the option if not recognized
4196     # So say no if there are warnings
4197     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
4198     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
4199     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
4200       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
4201     fi
4202   fi
4203   chmod u+w . 2>&AS_MESSAGE_LOG_FD
4204   $RM conftest*
4205   # SGI C++ compiler will create directory out/ii_files/ for
4206   # template instantiation
4207   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
4208   $RM out/* && rmdir out
4209   cd ..
4210   $RM -r conftest
4211   $RM conftest*
4212])
4213_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
4214	[Does compiler simultaneously support -c and -o options?])
4215])# _LT_COMPILER_C_O
4216
4217
4218# _LT_COMPILER_FILE_LOCKS([TAGNAME])
4219# ----------------------------------
4220# Check to see if we can do hard links to lock some files if needed
4221m4_defun([_LT_COMPILER_FILE_LOCKS],
4222[m4_require([_LT_ENABLE_LOCK])dnl
4223m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4224_LT_COMPILER_C_O([$1])
4225
4226hard_links=nottested
4227if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
4228  # do not overwrite the value of need_locks provided by the user
4229  AC_MSG_CHECKING([if we can lock with hard links])
4230  hard_links=yes
4231  $RM conftest*
4232  ln conftest.a conftest.b 2>/dev/null && hard_links=no
4233  touch conftest.a
4234  ln conftest.a conftest.b 2>&5 || hard_links=no
4235  ln conftest.a conftest.b 2>/dev/null && hard_links=no
4236  AC_MSG_RESULT([$hard_links])
4237  if test no = "$hard_links"; then
4238    AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
4239    need_locks=warn
4240  fi
4241else
4242  need_locks=no
4243fi
4244_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
4245])# _LT_COMPILER_FILE_LOCKS
4246
4247
4248# _LT_CHECK_OBJDIR
4249# ----------------
4250m4_defun([_LT_CHECK_OBJDIR],
4251[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
4252[rm -f .libs 2>/dev/null
4253mkdir .libs 2>/dev/null
4254if test -d .libs; then
4255  lt_cv_objdir=.libs
4256else
4257  # MS-DOS does not allow filenames that begin with a dot.
4258  lt_cv_objdir=_libs
4259fi
4260rmdir .libs 2>/dev/null])
4261objdir=$lt_cv_objdir
4262_LT_DECL([], [objdir], [0],
4263         [The name of the directory that contains temporary libtool files])dnl
4264m4_pattern_allow([LT_OBJDIR])dnl
4265AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
4266  [Define to the sub-directory where libtool stores uninstalled libraries.])
4267])# _LT_CHECK_OBJDIR
4268
4269
4270# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
4271# --------------------------------------
4272# Check hardcoding attributes.
4273m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
4274[AC_MSG_CHECKING([how to hardcode library paths into programs])
4275_LT_TAGVAR(hardcode_action, $1)=
4276if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
4277   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
4278   test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
4279
4280  # We can hardcode non-existent directories.
4281  if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
4282     # If the only mechanism to avoid hardcoding is shlibpath_var, we
4283     # have to relink, otherwise we might link with an installed library
4284     # when we should be linking with a yet-to-be-installed one
4285     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
4286     test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
4287    # Linking always hardcodes the temporary library directory.
4288    _LT_TAGVAR(hardcode_action, $1)=relink
4289  else
4290    # We can link without hardcoding, and we can hardcode nonexisting dirs.
4291    _LT_TAGVAR(hardcode_action, $1)=immediate
4292  fi
4293else
4294  # We cannot hardcode anything, or else we can only hardcode existing
4295  # directories.
4296  _LT_TAGVAR(hardcode_action, $1)=unsupported
4297fi
4298AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
4299
4300if test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
4301   test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
4302  # Fast installation is not supported
4303  enable_fast_install=no
4304elif test yes = "$shlibpath_overrides_runpath" ||
4305     test no = "$enable_shared"; then
4306  # Fast installation is not necessary
4307  enable_fast_install=needless
4308fi
4309_LT_TAGDECL([], [hardcode_action], [0],
4310    [How to hardcode a shared library path into an executable])
4311])# _LT_LINKER_HARDCODE_LIBPATH
4312
4313
4314# _LT_CMD_STRIPLIB
4315# ----------------
4316m4_defun([_LT_CMD_STRIPLIB],
4317[m4_require([_LT_DECL_EGREP])
4318striplib=
4319old_striplib=
4320AC_MSG_CHECKING([whether stripping libraries is possible])
4321if test -z "$STRIP"; then
4322  AC_MSG_RESULT([no])
4323else
4324  if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
4325    old_striplib="$STRIP --strip-debug"
4326    striplib="$STRIP --strip-unneeded"
4327    AC_MSG_RESULT([yes])
4328  else
4329    case $host_os in
4330    darwin*)
4331      # FIXME - insert some real tests, host_os isn't really good enough
4332      striplib="$STRIP -x"
4333      old_striplib="$STRIP -S"
4334      AC_MSG_RESULT([yes])
4335      ;;
4336    freebsd*)
4337      if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then
4338        old_striplib="$STRIP --strip-debug"
4339        striplib="$STRIP --strip-unneeded"
4340        AC_MSG_RESULT([yes])
4341      else
4342        AC_MSG_RESULT([no])
4343      fi
4344      ;;
4345    *)
4346      AC_MSG_RESULT([no])
4347      ;;
4348    esac
4349  fi
4350fi
4351_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
4352_LT_DECL([], [striplib], [1])
4353])# _LT_CMD_STRIPLIB
4354
4355
4356# _LT_PREPARE_MUNGE_PATH_LIST
4357# ---------------------------
4358# Make sure func_munge_path_list() is defined correctly.
4359m4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
4360[[# func_munge_path_list VARIABLE PATH
4361# -----------------------------------
4362# VARIABLE is name of variable containing _space_ separated list of
4363# directories to be munged by the contents of PATH, which is string
4364# having a format:
4365# "DIR[:DIR]:"
4366#       string "DIR[ DIR]" will be prepended to VARIABLE
4367# ":DIR[:DIR]"
4368#       string "DIR[ DIR]" will be appended to VARIABLE
4369# "DIRP[:DIRP]::[DIRA:]DIRA"
4370#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
4371#       "DIRA[ DIRA]" will be appended to VARIABLE
4372# "DIR[:DIR]"
4373#       VARIABLE will be replaced by "DIR[ DIR]"
4374func_munge_path_list ()
4375{
4376    case x@S|@2 in
4377    x)
4378        ;;
4379    *:)
4380        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
4381        ;;
4382    x:*)
4383        eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
4384        ;;
4385    *::*)
4386        eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
4387        eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
4388        ;;
4389    *)
4390        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
4391        ;;
4392    esac
4393}
4394]])# _LT_PREPARE_PATH_LIST
4395
4396
4397# _LT_SYS_DYNAMIC_LINKER([TAG])
4398# -----------------------------
4399# PORTME Fill in your ld.so characteristics
4400m4_defun([_LT_SYS_DYNAMIC_LINKER],
4401[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4402m4_require([_LT_DECL_EGREP])dnl
4403m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4404m4_require([_LT_DECL_OBJDUMP])dnl
4405m4_require([_LT_DECL_SED])dnl
4406m4_require([_LT_CHECK_SHELL_FEATURES])dnl
4407m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
4408AC_MSG_CHECKING([dynamic linker characteristics])
4409m4_if([$1],
4410	[], [
4411if test yes = "$GCC"; then
4412  case $host_os in
4413    darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
4414    *) lt_awk_arg='/^libraries:/' ;;
4415  esac
4416  case $host_os in
4417    mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
4418    *) lt_sed_strip_eq='s|=/|/|g' ;;
4419  esac
4420  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
4421  case $lt_search_path_spec in
4422  *\;*)
4423    # if the path contains ";" then we assume it to be the separator
4424    # otherwise default to the standard path separator (i.e. ":") - it is
4425    # assumed that no part of a normal pathname contains ";" but that should
4426    # okay in the real world where ";" in dirpaths is itself problematic.
4427    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
4428    ;;
4429  *)
4430    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
4431    ;;
4432  esac
4433  # Ok, now we have the path, separated by spaces, we can step through it
4434  # and add multilib dir if necessary...
4435  lt_tmp_lt_search_path_spec=
4436  lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
4437  # ...but if some path component already ends with the multilib dir we assume
4438  # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
4439  case "$lt_multi_os_dir; $lt_search_path_spec " in
4440  "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
4441    lt_multi_os_dir=
4442    ;;
4443  esac
4444  for lt_sys_path in $lt_search_path_spec; do
4445    if test -d "$lt_sys_path$lt_multi_os_dir"; then
4446      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
4447    elif test -n "$lt_multi_os_dir"; then
4448      test -d "$lt_sys_path" && \
4449	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
4450    fi
4451  done
4452  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
4453BEGIN {RS = " "; FS = "/|\n";} {
4454  lt_foo = "";
4455  lt_count = 0;
4456  for (lt_i = NF; lt_i > 0; lt_i--) {
4457    if ($lt_i != "" && $lt_i != ".") {
4458      if ($lt_i == "..") {
4459        lt_count++;
4460      } else {
4461        if (lt_count == 0) {
4462          lt_foo = "/" $lt_i lt_foo;
4463        } else {
4464          lt_count--;
4465        }
4466      }
4467    }
4468  }
4469  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
4470  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
4471}'`
4472  # AWK program above erroneously prepends '/' to C:/dos/paths
4473  # for these hosts.
4474  case $host_os in
4475    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
4476      $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
4477  esac
4478  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
4479else
4480  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
4481fi])
4482library_names_spec=
4483libname_spec='lib$name'
4484soname_spec=
4485shrext_cmds=.so
4486postinstall_cmds=
4487postuninstall_cmds=
4488finish_cmds=
4489finish_eval=
4490shlibpath_var=
4491shlibpath_overrides_runpath=unknown
4492version_type=none
4493dynamic_linker="$host_os ld.so"
4494sys_lib_dlsearch_path_spec="/lib /usr/lib"
4495need_lib_prefix=unknown
4496hardcode_into_libs=no
4497
4498# when you set need_version to no, make sure it does not cause -set_version
4499# flags to be left without arguments
4500need_version=unknown
4501
4502AC_ARG_VAR([LT_SYS_LIBRARY_PATH],
4503[User-defined run-time library search path.])
4504
4505case $host_os in
4506aix3*)
4507  version_type=linux # correct to gnu/linux during the next big refactor
4508  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
4509  shlibpath_var=LIBPATH
4510
4511  # AIX 3 has no versioning support, so we append a major version to the name.
4512  soname_spec='$libname$release$shared_ext$major'
4513  ;;
4514
4515aix[[4-9]]*)
4516  version_type=linux # correct to gnu/linux during the next big refactor
4517  need_lib_prefix=no
4518  need_version=no
4519  hardcode_into_libs=yes
4520  if test ia64 = "$host_cpu"; then
4521    # AIX 5 supports IA64
4522    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
4523    shlibpath_var=LD_LIBRARY_PATH
4524  else
4525    # With GCC up to 2.95.x, collect2 would create an import file
4526    # for dependence libraries.  The import file would start with
4527    # the line '#! .'.  This would cause the generated library to
4528    # depend on '.', always an invalid library.  This was fixed in
4529    # development snapshots of GCC prior to 3.0.
4530    case $host_os in
4531      aix4 | aix4.[[01]] | aix4.[[01]].*)
4532      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
4533	   echo ' yes '
4534	   echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
4535	:
4536      else
4537	can_build_shared=no
4538      fi
4539      ;;
4540    esac
4541    # Using Import Files as archive members, it is possible to support
4542    # filename-based versioning of shared library archives on AIX. While
4543    # this would work for both with and without runtime linking, it will
4544    # prevent static linking of such archives. So we do filename-based
4545    # shared library versioning with .so extension only, which is used
4546    # when both runtime linking and shared linking is enabled.
4547    # Unfortunately, runtime linking may impact performance, so we do
4548    # not want this to be the default eventually. Also, we use the
4549    # versioned .so libs for executables only if there is the -brtl
4550    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
4551    # To allow for filename-based versioning support, we need to create
4552    # libNAME.so.V as an archive file, containing:
4553    # *) an Import File, referring to the versioned filename of the
4554    #    archive as well as the shared archive member, telling the
4555    #    bitwidth (32 or 64) of that shared object, and providing the
4556    #    list of exported symbols of that shared object, eventually
4557    #    decorated with the 'weak' keyword
4558    # *) the shared object with the F_LOADONLY flag set, to really avoid
4559    #    it being seen by the linker.
4560    # At run time we better use the real file rather than another symlink,
4561    # but for link time we create the symlink libNAME.so -> libNAME.so.V
4562
4563    case $with_aix_soname,$aix_use_runtimelinking in
4564    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
4565    # soname into executable. Probably we can add versioning support to
4566    # collect2, so additional links can be useful in future.
4567    aix,yes) # traditional libtool
4568      dynamic_linker='AIX unversionable lib.so'
4569      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
4570      # instead of lib<name>.a to let people know that these are not
4571      # typical AIX shared libraries.
4572      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
4573      ;;
4574    aix,no) # traditional AIX only
4575      dynamic_linker='AIX lib.a[(]lib.so.V[)]'
4576      # We preserve .a as extension for shared libraries through AIX4.2
4577      # and later when we are not doing run time linking.
4578      library_names_spec='$libname$release.a $libname.a'
4579      soname_spec='$libname$release$shared_ext$major'
4580      ;;
4581    svr4,*) # full svr4 only
4582      dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
4583      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
4584      # We do not specify a path in Import Files, so LIBPATH fires.
4585      shlibpath_overrides_runpath=yes
4586      ;;
4587    *,yes) # both, prefer svr4
4588      dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
4589      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
4590      # unpreferred sharedlib libNAME.a needs extra handling
4591      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"'
4592      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"'
4593      # We do not specify a path in Import Files, so LIBPATH fires.
4594      shlibpath_overrides_runpath=yes
4595      ;;
4596    *,no) # both, prefer aix
4597      dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
4598      library_names_spec='$libname$release.a $libname.a'
4599      soname_spec='$libname$release$shared_ext$major'
4600      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
4601      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)'
4602      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"'
4603      ;;
4604    esac
4605    shlibpath_var=LIBPATH
4606  fi
4607  ;;
4608
4609amigaos*)
4610  case $host_cpu in
4611  powerpc)
4612    # Since July 2007 AmigaOS4 officially supports .so libraries.
4613    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
4614    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
4615    ;;
4616  m68k)
4617    library_names_spec='$libname.ixlibrary $libname.a'
4618    # Create ${libname}_ixlibrary.a entries in /sys/libs.
4619    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'
4620    ;;
4621  esac
4622  ;;
4623
4624beos*)
4625  library_names_spec='$libname$shared_ext'
4626  dynamic_linker="$host_os ld.so"
4627  shlibpath_var=LIBRARY_PATH
4628  ;;
4629
4630bsdi[[45]]*)
4631  version_type=linux # correct to gnu/linux during the next big refactor
4632  need_version=no
4633  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
4634  soname_spec='$libname$release$shared_ext$major'
4635  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
4636  shlibpath_var=LD_LIBRARY_PATH
4637  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
4638  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
4639  # the default ld.so.conf also contains /usr/contrib/lib and
4640  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
4641  # libtool to hard-code these into programs
4642  ;;
4643
4644cygwin* | mingw* | pw32* | cegcc*)
4645  version_type=windows
4646  shrext_cmds=.dll
4647  need_version=no
4648  need_lib_prefix=no
4649
4650  case $GCC,$cc_basename in
4651  yes,*)
4652    # gcc
4653    library_names_spec='$libname.dll.a'
4654    # DLL is installed to $(libdir)/../bin by postinstall_cmds
4655    postinstall_cmds='base_file=`basename \$file`~
4656      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
4657      dldir=$destdir/`dirname \$dlpath`~
4658      test -d \$dldir || mkdir -p \$dldir~
4659      $install_prog $dir/$dlname \$dldir/$dlname~
4660      chmod a+x \$dldir/$dlname~
4661      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
4662        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
4663      fi'
4664    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
4665      dlpath=$dir/\$dldll~
4666       $RM \$dlpath'
4667    shlibpath_overrides_runpath=yes
4668
4669    case $host_os in
4670    cygwin*)
4671      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
4672      soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
4673m4_if([$1], [],[
4674      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
4675      ;;
4676    mingw* | cegcc*)
4677      # MinGW DLLs use traditional 'lib' prefix
4678      soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
4679      ;;
4680    pw32*)
4681      # pw32 DLLs use 'pw' prefix rather than 'lib'
4682      library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
4683      ;;
4684    esac
4685    dynamic_linker='Win32 ld.exe'
4686    ;;
4687
4688  *,cl* | *,icl*)
4689    # Native MSVC or ICC
4690    libname_spec='$name'
4691    soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
4692    library_names_spec='$libname.dll.lib'
4693
4694    case $build_os in
4695    mingw*)
4696      sys_lib_search_path_spec=
4697      lt_save_ifs=$IFS
4698      IFS=';'
4699      for lt_path in $LIB
4700      do
4701        IFS=$lt_save_ifs
4702        # Let DOS variable expansion print the short 8.3 style file name.
4703        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
4704        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
4705      done
4706      IFS=$lt_save_ifs
4707      # Convert to MSYS style.
4708      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
4709      ;;
4710    cygwin*)
4711      # Convert to unix form, then to dos form, then back to unix form
4712      # but this time dos style (no spaces!) so that the unix form looks
4713      # like /cygdrive/c/PROGRA~1:/cygdr...
4714      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
4715      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
4716      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
4717      ;;
4718    *)
4719      sys_lib_search_path_spec=$LIB
4720      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
4721        # It is most probably a Windows format PATH.
4722        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
4723      else
4724        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
4725      fi
4726      # FIXME: find the short name or the path components, as spaces are
4727      # common. (e.g. "Program Files" -> "PROGRA~1")
4728      ;;
4729    esac
4730
4731    # DLL is installed to $(libdir)/../bin by postinstall_cmds
4732    postinstall_cmds='base_file=`basename \$file`~
4733      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
4734      dldir=$destdir/`dirname \$dlpath`~
4735      test -d \$dldir || mkdir -p \$dldir~
4736      $install_prog $dir/$dlname \$dldir/$dlname'
4737    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
4738      dlpath=$dir/\$dldll~
4739       $RM \$dlpath'
4740    shlibpath_overrides_runpath=yes
4741    dynamic_linker='Win32 link.exe'
4742    ;;
4743
4744  *)
4745    # Assume MSVC and ICC wrapper
4746    library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
4747    dynamic_linker='Win32 ld.exe'
4748    ;;
4749  esac
4750  # FIXME: first we should search . and the directory the executable is in
4751  shlibpath_var=PATH
4752  ;;
4753
4754darwin* | rhapsody*)
4755  dynamic_linker="$host_os dyld"
4756  version_type=darwin
4757  need_lib_prefix=no
4758  need_version=no
4759  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
4760  soname_spec='$libname$release$major$shared_ext'
4761  shlibpath_overrides_runpath=yes
4762  shlibpath_var=DYLD_LIBRARY_PATH
4763  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
4764m4_if([$1], [],[
4765  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
4766  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
4767  ;;
4768
4769dgux*)
4770  version_type=linux # correct to gnu/linux during the next big refactor
4771  need_lib_prefix=no
4772  need_version=no
4773  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
4774  soname_spec='$libname$release$shared_ext$major'
4775  shlibpath_var=LD_LIBRARY_PATH
4776  ;;
4777
4778freebsd* | dragonfly*)
4779  # DragonFly does not have aout.  When/if they implement a new
4780  # versioning mechanism, adjust this.
4781  if test -x /usr/bin/objformat; then
4782    objformat=`/usr/bin/objformat`
4783  else
4784    case $host_os in
4785    freebsd[[23]].*) objformat=aout ;;
4786    *) objformat=elf ;;
4787    esac
4788  fi
4789  version_type=freebsd-$objformat
4790  case $version_type in
4791    freebsd-elf*)
4792      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
4793      soname_spec='$libname$release$shared_ext$major'
4794      need_version=no
4795      need_lib_prefix=no
4796      ;;
4797    freebsd-*)
4798      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
4799      need_version=yes
4800      ;;
4801  esac
4802  shlibpath_var=LD_LIBRARY_PATH
4803  case $host_os in
4804  freebsd2.*)
4805    shlibpath_overrides_runpath=yes
4806    ;;
4807  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
4808    shlibpath_overrides_runpath=yes
4809    hardcode_into_libs=yes
4810    ;;
4811  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
4812  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
4813    shlibpath_overrides_runpath=no
4814    hardcode_into_libs=yes
4815    ;;
4816  *) # from 4.6 on, and DragonFly
4817    shlibpath_overrides_runpath=yes
4818    hardcode_into_libs=yes
4819    ;;
4820  esac
4821  ;;
4822
4823haiku*)
4824  version_type=linux # correct to gnu/linux during the next big refactor
4825  need_lib_prefix=no
4826  need_version=no
4827  dynamic_linker="$host_os runtime_loader"
4828  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
4829  soname_spec='$libname$release$shared_ext$major'
4830  shlibpath_var=LIBRARY_PATH
4831  shlibpath_overrides_runpath=no
4832  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
4833  hardcode_into_libs=yes
4834  ;;
4835
4836hpux9* | hpux10* | hpux11*)
4837  # Give a soname corresponding to the major version so that dld.sl refuses to
4838  # link against other versions.
4839  version_type=sunos
4840  need_lib_prefix=no
4841  need_version=no
4842  case $host_cpu in
4843  ia64*)
4844    shrext_cmds='.so'
4845    hardcode_into_libs=yes
4846    dynamic_linker="$host_os dld.so"
4847    shlibpath_var=LD_LIBRARY_PATH
4848    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
4849    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
4850    soname_spec='$libname$release$shared_ext$major'
4851    if test 32 = "$HPUX_IA64_MODE"; then
4852      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
4853      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
4854    else
4855      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
4856      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
4857    fi
4858    ;;
4859  hppa*64*)
4860    shrext_cmds='.sl'
4861    hardcode_into_libs=yes
4862    dynamic_linker="$host_os dld.sl"
4863    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
4864    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
4865    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
4866    soname_spec='$libname$release$shared_ext$major'
4867    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
4868    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
4869    ;;
4870  *)
4871    shrext_cmds='.sl'
4872    dynamic_linker="$host_os dld.sl"
4873    shlibpath_var=SHLIB_PATH
4874    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
4875    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
4876    soname_spec='$libname$release$shared_ext$major'
4877    ;;
4878  esac
4879  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
4880  postinstall_cmds='chmod 555 $lib'
4881  # or fails outright, so override atomically:
4882  install_override_mode=555
4883  ;;
4884
4885interix[[3-9]]*)
4886  version_type=linux # correct to gnu/linux during the next big refactor
4887  need_lib_prefix=no
4888  need_version=no
4889  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
4890  soname_spec='$libname$release$shared_ext$major'
4891  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
4892  shlibpath_var=LD_LIBRARY_PATH
4893  shlibpath_overrides_runpath=no
4894  hardcode_into_libs=yes
4895  ;;
4896
4897irix5* | irix6* | nonstopux*)
4898  case $host_os in
4899    nonstopux*) version_type=nonstopux ;;
4900    *)
4901	if test yes = "$lt_cv_prog_gnu_ld"; then
4902		version_type=linux # correct to gnu/linux during the next big refactor
4903	else
4904		version_type=irix
4905	fi ;;
4906  esac
4907  need_lib_prefix=no
4908  need_version=no
4909  soname_spec='$libname$release$shared_ext$major'
4910  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
4911  case $host_os in
4912  irix5* | nonstopux*)
4913    libsuff= shlibsuff=
4914    ;;
4915  *)
4916    case $LD in # libtool.m4 will add one of these switches to LD
4917    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
4918      libsuff= shlibsuff= libmagic=32-bit;;
4919    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
4920      libsuff=32 shlibsuff=N32 libmagic=N32;;
4921    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
4922      libsuff=64 shlibsuff=64 libmagic=64-bit;;
4923    *) libsuff= shlibsuff= libmagic=never-match;;
4924    esac
4925    ;;
4926  esac
4927  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
4928  shlibpath_overrides_runpath=no
4929  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
4930  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
4931  hardcode_into_libs=yes
4932  ;;
4933
4934# No shared lib support for Linux oldld, aout, or coff.
4935linux*oldld* | linux*aout* | linux*coff*)
4936  dynamic_linker=no
4937  ;;
4938
4939linux*android*)
4940  version_type=none # Android doesn't support versioned libraries.
4941  need_lib_prefix=no
4942  need_version=no
4943  library_names_spec='$libname$release$shared_ext'
4944  soname_spec='$libname$release$shared_ext'
4945  finish_cmds=
4946  shlibpath_var=LD_LIBRARY_PATH
4947  shlibpath_overrides_runpath=yes
4948
4949  # This implies no fast_install, which is unacceptable.
4950  # Some rework will be needed to allow for fast_install
4951  # before this can be enabled.
4952  hardcode_into_libs=yes
4953
4954  dynamic_linker='Android linker'
4955  # Don't embed -rpath directories since the linker doesn't support them.
4956  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4957  ;;
4958
4959# This must be glibc/ELF.
4960linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
4961  version_type=linux # correct to gnu/linux during the next big refactor
4962  need_lib_prefix=no
4963  need_version=no
4964  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
4965  soname_spec='$libname$release$shared_ext$major'
4966  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
4967  shlibpath_var=LD_LIBRARY_PATH
4968  shlibpath_overrides_runpath=no
4969
4970  # Some binutils ld are patched to set DT_RUNPATH
4971  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
4972    [lt_cv_shlibpath_overrides_runpath=no
4973    save_LDFLAGS=$LDFLAGS
4974    save_libdir=$libdir
4975    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
4976	 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
4977    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
4978      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
4979	 [lt_cv_shlibpath_overrides_runpath=yes])])
4980    LDFLAGS=$save_LDFLAGS
4981    libdir=$save_libdir
4982    ])
4983  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
4984
4985  # This implies no fast_install, which is unacceptable.
4986  # Some rework will be needed to allow for fast_install
4987  # before this can be enabled.
4988  hardcode_into_libs=yes
4989
4990  # Ideally, we could use ldconfig to report *all* directores which are
4991  # searched for libraries, however this is still not possible.  Aside from not
4992  # being certain /sbin/ldconfig is available, command
4993  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
4994  # even though it is searched at run-time.  Try to do the best guess by
4995  # appending ld.so.conf contents (and includes) to the search path.
4996  if test -f /etc/ld.so.conf; then
4997    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' ' '`
4998    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
4999  fi
5000
5001  # We used to test for /lib/ld.so.1 and disable shared libraries on
5002  # powerpc, because MkLinux only supported shared libraries with the
5003  # GNU dynamic linker.  Since this was broken with cross compilers,
5004  # most powerpc-linux boxes support dynamic linking these days and
5005  # people can always --disable-shared, the test was removed, and we
5006  # assume the GNU/Linux dynamic linker is in use.
5007  dynamic_linker='GNU/Linux ld.so'
5008  ;;
5009
5010netbsd*)
5011  version_type=sunos
5012  need_lib_prefix=no
5013  need_version=no
5014  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5015    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
5016    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
5017    dynamic_linker='NetBSD (a.out) ld.so'
5018  else
5019    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
5020    soname_spec='$libname$release$shared_ext$major'
5021    dynamic_linker='NetBSD ld.elf_so'
5022  fi
5023  shlibpath_var=LD_LIBRARY_PATH
5024  shlibpath_overrides_runpath=yes
5025  hardcode_into_libs=yes
5026  ;;
5027
5028newsos6)
5029  version_type=linux # correct to gnu/linux during the next big refactor
5030  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
5031  shlibpath_var=LD_LIBRARY_PATH
5032  shlibpath_overrides_runpath=yes
5033  ;;
5034
5035*nto* | *qnx*)
5036  version_type=qnx
5037  need_lib_prefix=no
5038  need_version=no
5039  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
5040  soname_spec='$libname$release$shared_ext$major'
5041  shlibpath_var=LD_LIBRARY_PATH
5042  shlibpath_overrides_runpath=no
5043  hardcode_into_libs=yes
5044  dynamic_linker='ldqnx.so'
5045  ;;
5046
5047openbsd* | bitrig*)
5048  version_type=sunos
5049  sys_lib_dlsearch_path_spec=/usr/lib
5050  need_lib_prefix=no
5051  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
5052    need_version=no
5053  else
5054    need_version=yes
5055  fi
5056  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
5057  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
5058  shlibpath_var=LD_LIBRARY_PATH
5059  shlibpath_overrides_runpath=yes
5060  ;;
5061
5062os2*)
5063  libname_spec='$name'
5064  version_type=windows
5065  shrext_cmds=.dll
5066  need_version=no
5067  need_lib_prefix=no
5068  # OS/2 can only load a DLL with a base name of 8 characters or less.
5069  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
5070    v=$($ECHO $release$versuffix | tr -d .-);
5071    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
5072    $ECHO $n$v`$shared_ext'
5073  library_names_spec='${libname}_dll.$libext'
5074  dynamic_linker='OS/2 ld.exe'
5075  shlibpath_var=BEGINLIBPATH
5076  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
5077  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
5078  postinstall_cmds='base_file=`basename \$file`~
5079    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
5080    dldir=$destdir/`dirname \$dlpath`~
5081    test -d \$dldir || mkdir -p \$dldir~
5082    $install_prog $dir/$dlname \$dldir/$dlname~
5083    chmod a+x \$dldir/$dlname~
5084    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
5085      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
5086    fi'
5087  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
5088    dlpath=$dir/\$dldll~
5089    $RM \$dlpath'
5090  ;;
5091
5092osf3* | osf4* | osf5*)
5093  version_type=osf
5094  need_lib_prefix=no
5095  need_version=no
5096  soname_spec='$libname$release$shared_ext$major'
5097  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
5098  shlibpath_var=LD_LIBRARY_PATH
5099  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
5100  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
5101  ;;
5102
5103rdos*)
5104  dynamic_linker=no
5105  ;;
5106
5107solaris*)
5108  version_type=linux # correct to gnu/linux during the next big refactor
5109  need_lib_prefix=no
5110  need_version=no
5111  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
5112  soname_spec='$libname$release$shared_ext$major'
5113  shlibpath_var=LD_LIBRARY_PATH
5114  shlibpath_overrides_runpath=yes
5115  hardcode_into_libs=yes
5116  # ldd complains unless libraries are executable
5117  postinstall_cmds='chmod +x $lib'
5118  ;;
5119
5120sunos4*)
5121  version_type=sunos
5122  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
5123  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
5124  shlibpath_var=LD_LIBRARY_PATH
5125  shlibpath_overrides_runpath=yes
5126  if test yes = "$with_gnu_ld"; then
5127    need_lib_prefix=no
5128  fi
5129  need_version=yes
5130  ;;
5131
5132sysv4 | sysv4.3*)
5133  version_type=linux # correct to gnu/linux during the next big refactor
5134  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
5135  soname_spec='$libname$release$shared_ext$major'
5136  shlibpath_var=LD_LIBRARY_PATH
5137  case $host_vendor in
5138    sni)
5139      shlibpath_overrides_runpath=no
5140      need_lib_prefix=no
5141      runpath_var=LD_RUN_PATH
5142      ;;
5143    siemens)
5144      need_lib_prefix=no
5145      ;;
5146    motorola)
5147      need_lib_prefix=no
5148      need_version=no
5149      shlibpath_overrides_runpath=no
5150      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
5151      ;;
5152  esac
5153  ;;
5154
5155sysv4*MP*)
5156  if test -d /usr/nec; then
5157    version_type=linux # correct to gnu/linux during the next big refactor
5158    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
5159    soname_spec='$libname$shared_ext.$major'
5160    shlibpath_var=LD_LIBRARY_PATH
5161  fi
5162  ;;
5163
5164sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
5165  version_type=sco
5166  need_lib_prefix=no
5167  need_version=no
5168  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
5169  soname_spec='$libname$release$shared_ext$major'
5170  shlibpath_var=LD_LIBRARY_PATH
5171  shlibpath_overrides_runpath=yes
5172  hardcode_into_libs=yes
5173  if test yes = "$with_gnu_ld"; then
5174    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
5175  else
5176    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
5177    case $host_os in
5178      sco3.2v5*)
5179        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
5180	;;
5181    esac
5182  fi
5183  sys_lib_dlsearch_path_spec='/usr/lib'
5184  ;;
5185
5186tpf*)
5187  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
5188  version_type=linux # correct to gnu/linux during the next big refactor
5189  need_lib_prefix=no
5190  need_version=no
5191  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
5192  shlibpath_var=LD_LIBRARY_PATH
5193  shlibpath_overrides_runpath=no
5194  hardcode_into_libs=yes
5195  ;;
5196
5197uts4*)
5198  version_type=linux # correct to gnu/linux during the next big refactor
5199  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
5200  soname_spec='$libname$release$shared_ext$major'
5201  shlibpath_var=LD_LIBRARY_PATH
5202  ;;
5203
5204*)
5205  dynamic_linker=no
5206  ;;
5207esac
5208AC_MSG_RESULT([$dynamic_linker])
5209test no = "$dynamic_linker" && can_build_shared=no
5210
5211variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
5212if test yes = "$GCC"; then
5213  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
5214fi
5215
5216if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
5217  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
5218fi
5219
5220if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
5221  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
5222fi
5223
5224# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
5225configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
5226
5227# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
5228func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
5229
5230# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
5231configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
5232
5233_LT_DECL([], [variables_saved_for_relink], [1],
5234    [Variables whose values should be saved in libtool wrapper scripts and
5235    restored at link time])
5236_LT_DECL([], [need_lib_prefix], [0],
5237    [Do we need the "lib" prefix for modules?])
5238_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
5239_LT_DECL([], [version_type], [0], [Library versioning type])
5240_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
5241_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
5242_LT_DECL([], [shlibpath_overrides_runpath], [0],
5243    [Is shlibpath searched before the hard-coded library search path?])
5244_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
5245_LT_DECL([], [library_names_spec], [1],
5246    [[List of archive names.  First name is the real one, the rest are links.
5247    The last name is the one that the linker finds with -lNAME]])
5248_LT_DECL([], [soname_spec], [1],
5249    [[The coded name of the library, if different from the real name]])
5250_LT_DECL([], [install_override_mode], [1],
5251    [Permission mode override for installation of shared libraries])
5252_LT_DECL([], [postinstall_cmds], [2],
5253    [Command to use after installation of a shared archive])
5254_LT_DECL([], [postuninstall_cmds], [2],
5255    [Command to use after uninstallation of a shared archive])
5256_LT_DECL([], [finish_cmds], [2],
5257    [Commands used to finish a libtool library installation in a directory])
5258_LT_DECL([], [finish_eval], [1],
5259    [[As "finish_cmds", except a single script fragment to be evaled but
5260    not shown]])
5261_LT_DECL([], [hardcode_into_libs], [0],
5262    [Whether we should hardcode library paths into libraries])
5263_LT_DECL([], [sys_lib_search_path_spec], [2],
5264    [Compile-time system search path for libraries])
5265_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
5266    [Detected run-time system search path for libraries])
5267_LT_DECL([], [configure_time_lt_sys_library_path], [2],
5268    [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
5269])# _LT_SYS_DYNAMIC_LINKER
5270
5271
5272# _LT_PATH_TOOL_PREFIX(TOOL)
5273# --------------------------
5274# find a file program that can recognize shared library
5275AC_DEFUN([_LT_PATH_TOOL_PREFIX],
5276[m4_require([_LT_DECL_EGREP])dnl
5277AC_MSG_CHECKING([for $1])
5278AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
5279[case $MAGIC_CMD in
5280[[\\/*] |  ?:[\\/]*])
5281  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
5282  ;;
5283*)
5284  lt_save_MAGIC_CMD=$MAGIC_CMD
5285  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
5286dnl $ac_dummy forces splitting on constant user-supplied paths.
5287dnl POSIX.2 word splitting is done only on the output of word expansions,
5288dnl not every word.  This closes a longstanding sh security hole.
5289  ac_dummy="m4_if([$2], , $PATH, [$2])"
5290  for ac_dir in $ac_dummy; do
5291    IFS=$lt_save_ifs
5292    test -z "$ac_dir" && ac_dir=.
5293    if test -f "$ac_dir/$1"; then
5294      lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
5295      if test -n "$file_magic_test_file"; then
5296	case $deplibs_check_method in
5297	"file_magic "*)
5298	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
5299	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
5300	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
5301	    $EGREP "$file_magic_regex" > /dev/null; then
5302	    :
5303	  else
5304	    cat <<_LT_EOF 1>&2
5305
5306*** Warning: the command libtool uses to detect shared libraries,
5307*** $file_magic_cmd, produces output that libtool cannot recognize.
5308*** The result is that libtool may fail to recognize shared libraries
5309*** as such.  This will affect the creation of libtool libraries that
5310*** depend on shared libraries, but programs linked with such libtool
5311*** libraries will work regardless of this problem.  Nevertheless, you
5312*** may want to report the problem to your system manager and/or to
5313*** bug-libtool@gnu.org
5314
5315_LT_EOF
5316	  fi ;;
5317	esac
5318      fi
5319      break
5320    fi
5321  done
5322  IFS=$lt_save_ifs
5323  MAGIC_CMD=$lt_save_MAGIC_CMD
5324  ;;
5325esac])
5326MAGIC_CMD=$lt_cv_path_MAGIC_CMD
5327if test -n "$MAGIC_CMD"; then
5328  AC_MSG_RESULT($MAGIC_CMD)
5329else
5330  AC_MSG_RESULT(no)
5331fi
5332_LT_DECL([], [MAGIC_CMD], [0],
5333	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
5334])# _LT_PATH_TOOL_PREFIX
5335
5336# Old name:
5337AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
5338dnl aclocal-1.4 backwards compatibility:
5339dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
5340
5341
5342# _LT_PATH_MAGIC
5343# --------------
5344# find a file program that can recognize a shared library
5345m4_defun([_LT_PATH_MAGIC],
5346[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
5347if test -z "$lt_cv_path_MAGIC_CMD"; then
5348  if test -n "$ac_tool_prefix"; then
5349    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
5350  else
5351    MAGIC_CMD=:
5352  fi
5353fi
5354])# _LT_PATH_MAGIC
5355
5356
5357# LT_PATH_LD
5358# ----------
5359# find the pathname to the GNU or non-GNU linker
5360AC_DEFUN([LT_PATH_LD],
5361[AC_REQUIRE([AC_PROG_CC])dnl
5362AC_REQUIRE([AC_CANONICAL_HOST])dnl
5363AC_REQUIRE([AC_CANONICAL_BUILD])dnl
5364m4_require([_LT_DECL_SED])dnl
5365m4_require([_LT_DECL_EGREP])dnl
5366m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
5367
5368AC_ARG_WITH([gnu-ld],
5369    [AS_HELP_STRING([--with-gnu-ld],
5370	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
5371    [test no = "$withval" || with_gnu_ld=yes],
5372    [with_gnu_ld=no])dnl
5373
5374ac_prog=ld
5375if test yes = "$GCC"; then
5376  # Check if gcc -print-prog-name=ld gives a path.
5377  AC_MSG_CHECKING([for ld used by $CC])
5378  case $host in
5379  *-*-mingw*)
5380    # gcc leaves a trailing carriage return, which upsets mingw
5381    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
5382  *)
5383    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
5384  esac
5385  case $ac_prog in
5386    # Accept absolute paths.
5387    [[\\/]]* | ?:[[\\/]]*)
5388      re_direlt='/[[^/]][[^/]]*/\.\./'
5389      # Canonicalize the pathname of ld
5390      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
5391      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
5392	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
5393      done
5394      test -z "$LD" && LD=$ac_prog
5395      ;;
5396  "")
5397    # If it fails, then pretend we aren't using GCC.
5398    ac_prog=ld
5399    ;;
5400  *)
5401    # If it is relative, then search for the first ld in PATH.
5402    with_gnu_ld=unknown
5403    ;;
5404  esac
5405elif test yes = "$with_gnu_ld"; then
5406  AC_MSG_CHECKING([for GNU ld])
5407else
5408  AC_MSG_CHECKING([for non-GNU ld])
5409fi
5410AC_CACHE_VAL(lt_cv_path_LD,
5411[if test -z "$LD"; then
5412  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
5413  for ac_dir in $PATH; do
5414    IFS=$lt_save_ifs
5415    test -z "$ac_dir" && ac_dir=.
5416    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
5417      lt_cv_path_LD=$ac_dir/$ac_prog
5418      # Check to see if the program is GNU ld.  I'd rather use --version,
5419      # but apparently some variants of GNU ld only accept -v.
5420      # Break only if it was the GNU/non-GNU ld that we prefer.
5421      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
5422      *GNU* | *'with BFD'*)
5423	test no != "$with_gnu_ld" && break
5424	;;
5425      *)
5426	test yes != "$with_gnu_ld" && break
5427	;;
5428      esac
5429    fi
5430  done
5431  IFS=$lt_save_ifs
5432else
5433  lt_cv_path_LD=$LD # Let the user override the test with a path.
5434fi])
5435LD=$lt_cv_path_LD
5436if test -n "$LD"; then
5437  AC_MSG_RESULT($LD)
5438else
5439  AC_MSG_RESULT(no)
5440fi
5441test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
5442_LT_PATH_LD_GNU
5443AC_SUBST([LD])
5444
5445_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
5446])# LT_PATH_LD
5447
5448# Old names:
5449AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
5450AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
5451dnl aclocal-1.4 backwards compatibility:
5452dnl AC_DEFUN([AM_PROG_LD], [])
5453dnl AC_DEFUN([AC_PROG_LD], [])
5454
5455
5456# _LT_PATH_LD_GNU
5457#- --------------
5458m4_defun([_LT_PATH_LD_GNU],
5459[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
5460[# I'd rather use --version here, but apparently some GNU lds only accept -v.
5461case `$LD -v 2>&1 </dev/null` in
5462*GNU* | *'with BFD'*)
5463  lt_cv_prog_gnu_ld=yes
5464  ;;
5465*)
5466  lt_cv_prog_gnu_ld=no
5467  ;;
5468esac])
5469with_gnu_ld=$lt_cv_prog_gnu_ld
5470])# _LT_PATH_LD_GNU
5471
5472
5473# _LT_CMD_RELOAD
5474# --------------
5475# find reload flag for linker
5476#   -- PORTME Some linkers may need a different reload flag.
5477m4_defun([_LT_CMD_RELOAD],
5478[AC_CACHE_CHECK([for $LD option to reload object files],
5479  lt_cv_ld_reload_flag,
5480  [lt_cv_ld_reload_flag='-r'])
5481reload_flag=$lt_cv_ld_reload_flag
5482case $reload_flag in
5483"" | " "*) ;;
5484*) reload_flag=" $reload_flag" ;;
5485esac
5486reload_cmds='$LD$reload_flag -o $output$reload_objs'
5487case $host_os in
5488  cygwin* | mingw* | pw32* | cegcc*)
5489    if test yes != "$GCC"; then
5490      reload_cmds=false
5491    fi
5492    ;;
5493  darwin*)
5494    if test yes = "$GCC"; then
5495      reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
5496    else
5497      reload_cmds='$LD$reload_flag -o $output$reload_objs'
5498    fi
5499    ;;
5500esac
5501_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
5502_LT_TAGDECL([], [reload_cmds], [2])dnl
5503])# _LT_CMD_RELOAD
5504
5505
5506# _LT_PATH_DD
5507# -----------
5508# find a working dd
5509m4_defun([_LT_PATH_DD],
5510[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
5511[printf 0123456789abcdef0123456789abcdef >conftest.i
5512cat conftest.i conftest.i >conftest2.i
5513: ${lt_DD:=$DD}
5514AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
5515[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
5516  cmp -s conftest.i conftest.out \
5517  && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
5518fi])
5519rm -f conftest.i conftest2.i conftest.out])
5520])# _LT_PATH_DD
5521
5522
5523# _LT_CMD_TRUNCATE
5524# ----------------
5525# find command to truncate a binary pipe
5526m4_defun([_LT_CMD_TRUNCATE],
5527[m4_require([_LT_PATH_DD])
5528AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
5529[printf 0123456789abcdef0123456789abcdef >conftest.i
5530cat conftest.i conftest.i >conftest2.i
5531lt_cv_truncate_bin=
5532if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
5533  cmp -s conftest.i conftest.out \
5534  && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
5535fi
5536rm -f conftest.i conftest2.i conftest.out
5537test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
5538_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
5539  [Command to truncate a binary pipe])
5540])# _LT_CMD_TRUNCATE
5541
5542
5543# _LT_CHECK_MAGIC_METHOD
5544# ----------------------
5545# how to check for library dependencies
5546#  -- PORTME fill in with the dynamic library characteristics
5547m4_defun([_LT_CHECK_MAGIC_METHOD],
5548[m4_require([_LT_DECL_EGREP])
5549m4_require([_LT_DECL_OBJDUMP])
5550AC_CACHE_CHECK([how to recognize dependent libraries],
5551lt_cv_deplibs_check_method,
5552[lt_cv_file_magic_cmd='$MAGIC_CMD'
5553lt_cv_file_magic_test_file=
5554lt_cv_deplibs_check_method='unknown'
5555# Need to set the preceding variable on all platforms that support
5556# interlibrary dependencies.
5557# 'none' -- dependencies not supported.
5558# 'unknown' -- same as none, but documents that we really don't know.
5559# 'pass_all' -- all dependencies passed with no checks.
5560# 'test_compile' -- check by making test program.
5561# 'file_magic [[regex]]' -- check by looking for files in library path
5562# that responds to the $file_magic_cmd with a given extended regex.
5563# If you have 'file' or equivalent on your system and you're not sure
5564# whether 'pass_all' will *always* work, you probably want this one.
5565
5566case $host_os in
5567aix[[4-9]]*)
5568  lt_cv_deplibs_check_method=pass_all
5569  ;;
5570
5571beos*)
5572  lt_cv_deplibs_check_method=pass_all
5573  ;;
5574
5575bsdi[[45]]*)
5576  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
5577  lt_cv_file_magic_cmd='/usr/bin/file -L'
5578  lt_cv_file_magic_test_file=/shlib/libc.so
5579  ;;
5580
5581cygwin*)
5582  # func_win32_libid is a shell function defined in ltmain.sh
5583  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
5584  lt_cv_file_magic_cmd='func_win32_libid'
5585  ;;
5586
5587mingw* | pw32*)
5588  # Base MSYS/MinGW do not provide the 'file' command needed by
5589  # func_win32_libid shell function, so use a weaker test based on 'objdump',
5590  # unless we find 'file', for example because we are cross-compiling.
5591  if ( file / ) >/dev/null 2>&1; then
5592    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
5593    lt_cv_file_magic_cmd='func_win32_libid'
5594  else
5595    # Keep this pattern in sync with the one in func_win32_libid.
5596    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
5597    lt_cv_file_magic_cmd='$OBJDUMP -f'
5598  fi
5599  ;;
5600
5601cegcc*)
5602  # use the weaker test based on 'objdump'. See mingw*.
5603  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
5604  lt_cv_file_magic_cmd='$OBJDUMP -f'
5605  ;;
5606
5607darwin* | rhapsody*)
5608  lt_cv_deplibs_check_method=pass_all
5609  ;;
5610
5611freebsd* | dragonfly*)
5612  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
5613    case $host_cpu in
5614    i*86 )
5615      # Not sure whether the presence of OpenBSD here was a mistake.
5616      # Let's accept both of them until this is cleared up.
5617      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
5618      lt_cv_file_magic_cmd=/usr/bin/file
5619      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
5620      ;;
5621    esac
5622  else
5623    lt_cv_deplibs_check_method=pass_all
5624  fi
5625  ;;
5626
5627haiku*)
5628  lt_cv_deplibs_check_method=pass_all
5629  ;;
5630
5631hpux10.20* | hpux11*)
5632  lt_cv_file_magic_cmd=/usr/bin/file
5633  case $host_cpu in
5634  ia64*)
5635    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
5636    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
5637    ;;
5638  hppa*64*)
5639    [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]']
5640    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
5641    ;;
5642  *)
5643    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
5644    lt_cv_file_magic_test_file=/usr/lib/libc.sl
5645    ;;
5646  esac
5647  ;;
5648
5649interix[[3-9]]*)
5650  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
5651  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
5652  ;;
5653
5654irix5* | irix6* | nonstopux*)
5655  case $LD in
5656  *-32|*"-32 ") libmagic=32-bit;;
5657  *-n32|*"-n32 ") libmagic=N32;;
5658  *-64|*"-64 ") libmagic=64-bit;;
5659  *) libmagic=never-match;;
5660  esac
5661  lt_cv_deplibs_check_method=pass_all
5662  ;;
5663
5664# This must be glibc/ELF.
5665linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
5666  lt_cv_deplibs_check_method=pass_all
5667  ;;
5668
5669netbsd*)
5670  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
5671    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
5672  else
5673    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
5674  fi
5675  ;;
5676
5677newos6*)
5678  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
5679  lt_cv_file_magic_cmd=/usr/bin/file
5680  lt_cv_file_magic_test_file=/usr/lib/libnls.so
5681  ;;
5682
5683*nto* | *qnx*)
5684  lt_cv_deplibs_check_method=pass_all
5685  ;;
5686
5687openbsd* | bitrig*)
5688  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
5689    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
5690  else
5691    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
5692  fi
5693  ;;
5694
5695osf3* | osf4* | osf5*)
5696  lt_cv_deplibs_check_method=pass_all
5697  ;;
5698
5699rdos*)
5700  lt_cv_deplibs_check_method=pass_all
5701  ;;
5702
5703solaris*)
5704  lt_cv_deplibs_check_method=pass_all
5705  ;;
5706
5707sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
5708  lt_cv_deplibs_check_method=pass_all
5709  ;;
5710
5711sysv4 | sysv4.3*)
5712  case $host_vendor in
5713  motorola)
5714    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]]'
5715    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
5716    ;;
5717  ncr)
5718    lt_cv_deplibs_check_method=pass_all
5719    ;;
5720  sequent)
5721    lt_cv_file_magic_cmd='/bin/file'
5722    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
5723    ;;
5724  sni)
5725    lt_cv_file_magic_cmd='/bin/file'
5726    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
5727    lt_cv_file_magic_test_file=/lib/libc.so
5728    ;;
5729  siemens)
5730    lt_cv_deplibs_check_method=pass_all
5731    ;;
5732  pc)
5733    lt_cv_deplibs_check_method=pass_all
5734    ;;
5735  esac
5736  ;;
5737
5738tpf*)
5739  lt_cv_deplibs_check_method=pass_all
5740  ;;
5741os2*)
5742  lt_cv_deplibs_check_method=pass_all
5743  ;;
5744esac
5745])
5746
5747file_magic_glob=
5748want_nocaseglob=no
5749if test "$build" = "$host"; then
5750  case $host_os in
5751  mingw* | pw32*)
5752    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
5753      want_nocaseglob=yes
5754    else
5755      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
5756    fi
5757    ;;
5758  esac
5759fi
5760
5761file_magic_cmd=$lt_cv_file_magic_cmd
5762deplibs_check_method=$lt_cv_deplibs_check_method
5763test -z "$deplibs_check_method" && deplibs_check_method=unknown
5764
5765_LT_DECL([], [deplibs_check_method], [1],
5766    [Method to check whether dependent libraries are shared objects])
5767_LT_DECL([], [file_magic_cmd], [1],
5768    [Command to use when deplibs_check_method = "file_magic"])
5769_LT_DECL([], [file_magic_glob], [1],
5770    [How to find potential files when deplibs_check_method = "file_magic"])
5771_LT_DECL([], [want_nocaseglob], [1],
5772    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
5773])# _LT_CHECK_MAGIC_METHOD
5774
5775
5776# LT_PATH_NM
5777# ----------
5778# find the pathname to a BSD- or MS-compatible name lister
5779AC_DEFUN([LT_PATH_NM],
5780[AC_REQUIRE([AC_PROG_CC])dnl
5781AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
5782[if test -n "$NM"; then
5783  # Let the user override the test.
5784  lt_cv_path_NM=$NM
5785else
5786  lt_nm_to_check=${ac_tool_prefix}nm
5787  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
5788    lt_nm_to_check="$lt_nm_to_check nm"
5789  fi
5790  for lt_tmp_nm in $lt_nm_to_check; do
5791    lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
5792    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
5793      IFS=$lt_save_ifs
5794      test -z "$ac_dir" && ac_dir=.
5795      tmp_nm=$ac_dir/$lt_tmp_nm
5796      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
5797	# Check to see if the nm accepts a BSD-compat flag.
5798	# Adding the 'sed 1q' prevents false positives on HP-UX, which says:
5799	#   nm: unknown option "B" ignored
5800	# Tru64's nm complains that /dev/null is an invalid object file
5801	# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
5802	case $build_os in
5803	mingw*) lt_bad_file=conftest.nm/nofile ;;
5804	*) lt_bad_file=/dev/null ;;
5805	esac
5806	case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
5807	*$lt_bad_file* | *'Invalid file or object type'*)
5808	  lt_cv_path_NM="$tmp_nm -B"
5809	  break 2
5810	  ;;
5811	*)
5812	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
5813	  */dev/null*)
5814	    lt_cv_path_NM="$tmp_nm -p"
5815	    break 2
5816	    ;;
5817	  *)
5818	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
5819	    continue # so that we can try to find one that supports BSD flags
5820	    ;;
5821	  esac
5822	  ;;
5823	esac
5824      fi
5825    done
5826    IFS=$lt_save_ifs
5827  done
5828  : ${lt_cv_path_NM=no}
5829fi])
5830if test no != "$lt_cv_path_NM"; then
5831  NM=$lt_cv_path_NM
5832else
5833  # Didn't find any BSD compatible name lister, look for dumpbin.
5834  if test -n "$DUMPBIN"; then :
5835    # Let the user override the test.
5836  else
5837    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
5838    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
5839    *COFF*)
5840      DUMPBIN="$DUMPBIN -symbols -headers"
5841      ;;
5842    *)
5843      DUMPBIN=:
5844      ;;
5845    esac
5846  fi
5847  AC_SUBST([DUMPBIN])
5848  if test : != "$DUMPBIN"; then
5849    NM=$DUMPBIN
5850  fi
5851fi
5852test -z "$NM" && NM=nm
5853AC_SUBST([NM])
5854_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
5855
5856AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
5857  [lt_cv_nm_interface="BSD nm"
5858  echo "int some_variable = 0;" > conftest.$ac_ext
5859  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
5860  (eval "$ac_compile" 2>conftest.err)
5861  cat conftest.err >&AS_MESSAGE_LOG_FD
5862  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
5863  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
5864  cat conftest.err >&AS_MESSAGE_LOG_FD
5865  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
5866  cat conftest.out >&AS_MESSAGE_LOG_FD
5867  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
5868    lt_cv_nm_interface="MS dumpbin"
5869  fi
5870  rm -f conftest*])
5871])# LT_PATH_NM
5872
5873# Old names:
5874AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
5875AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
5876dnl aclocal-1.4 backwards compatibility:
5877dnl AC_DEFUN([AM_PROG_NM], [])
5878dnl AC_DEFUN([AC_PROG_NM], [])
5879
5880# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
5881# --------------------------------
5882# how to determine the name of the shared library
5883# associated with a specific link library.
5884#  -- PORTME fill in with the dynamic library characteristics
5885m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
5886[m4_require([_LT_DECL_EGREP])
5887m4_require([_LT_DECL_OBJDUMP])
5888m4_require([_LT_DECL_DLLTOOL])
5889AC_CACHE_CHECK([how to associate runtime and link libraries],
5890lt_cv_sharedlib_from_linklib_cmd,
5891[lt_cv_sharedlib_from_linklib_cmd='unknown'
5892
5893case $host_os in
5894cygwin* | mingw* | pw32* | cegcc*)
5895  # two different shell functions defined in ltmain.sh;
5896  # decide which one to use based on capabilities of $DLLTOOL
5897  case `$DLLTOOL --help 2>&1` in
5898  *--identify-strict*)
5899    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
5900    ;;
5901  *)
5902    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
5903    ;;
5904  esac
5905  ;;
5906*)
5907  # fallback: assume linklib IS sharedlib
5908  lt_cv_sharedlib_from_linklib_cmd=$ECHO
5909  ;;
5910esac
5911])
5912sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
5913test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
5914
5915_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
5916    [Command to associate shared and link libraries])
5917])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
5918
5919
5920# _LT_PATH_MANIFEST_TOOL
5921# ----------------------
5922# locate the manifest tool
5923m4_defun([_LT_PATH_MANIFEST_TOOL],
5924[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
5925test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
5926AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
5927  [lt_cv_path_mainfest_tool=no
5928  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
5929  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
5930  cat conftest.err >&AS_MESSAGE_LOG_FD
5931  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
5932    lt_cv_path_mainfest_tool=yes
5933  fi
5934  rm -f conftest*])
5935if test yes != "$lt_cv_path_mainfest_tool"; then
5936  MANIFEST_TOOL=:
5937fi
5938_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
5939])# _LT_PATH_MANIFEST_TOOL
5940
5941
5942# _LT_DLL_DEF_P([FILE])
5943# ---------------------
5944# True iff FILE is a Windows DLL '.def' file.
5945# Keep in sync with func_dll_def_p in the libtool script
5946AC_DEFUN([_LT_DLL_DEF_P],
5947[dnl
5948  test DEF = "`$SED -n dnl
5949    -e '\''s/^[[	 ]]*//'\'' dnl Strip leading whitespace
5950    -e '\''/^\(;.*\)*$/d'\'' dnl      Delete empty lines and comments
5951    -e '\''s/^\(EXPORTS\|LIBRARY\)\([[	 ]].*\)*$/DEF/p'\'' dnl
5952    -e q dnl                          Only consider the first "real" line
5953    $1`" dnl
5954])# _LT_DLL_DEF_P
5955
5956
5957# LT_LIB_M
5958# --------
5959# check for math library
5960AC_DEFUN([LT_LIB_M],
5961[AC_REQUIRE([AC_CANONICAL_HOST])dnl
5962LIBM=
5963case $host in
5964*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
5965  # These system don't have libm, or don't need it
5966  ;;
5967*-ncr-sysv4.3*)
5968  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
5969  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
5970  ;;
5971*)
5972  AC_CHECK_LIB(m, cos, LIBM=-lm)
5973  ;;
5974esac
5975AC_SUBST([LIBM])
5976])# LT_LIB_M
5977
5978# Old name:
5979AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
5980dnl aclocal-1.4 backwards compatibility:
5981dnl AC_DEFUN([AC_CHECK_LIBM], [])
5982
5983
5984# _LT_COMPILER_NO_RTTI([TAGNAME])
5985# -------------------------------
5986m4_defun([_LT_COMPILER_NO_RTTI],
5987[m4_require([_LT_TAG_COMPILER])dnl
5988
5989_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5990
5991if test yes = "$GCC"; then
5992  case $cc_basename in
5993  nvcc*)
5994    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
5995  *)
5996    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
5997  esac
5998
5999  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
6000    lt_cv_prog_compiler_rtti_exceptions,
6001    [-fno-rtti -fno-exceptions], [],
6002    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
6003fi
6004_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
6005	[Compiler flag to turn off builtin functions])
6006])# _LT_COMPILER_NO_RTTI
6007
6008
6009# _LT_CMD_GLOBAL_SYMBOLS
6010# ----------------------
6011m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
6012[AC_REQUIRE([AC_CANONICAL_HOST])dnl
6013AC_REQUIRE([AC_PROG_CC])dnl
6014AC_REQUIRE([AC_PROG_AWK])dnl
6015AC_REQUIRE([LT_PATH_NM])dnl
6016AC_REQUIRE([LT_PATH_LD])dnl
6017m4_require([_LT_DECL_SED])dnl
6018m4_require([_LT_DECL_EGREP])dnl
6019m4_require([_LT_TAG_COMPILER])dnl
6020
6021# Check for command to grab the raw symbol name followed by C symbol from nm.
6022AC_MSG_CHECKING([command to parse $NM output from $compiler object])
6023AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
6024[
6025# These are sane defaults that work on at least a few old systems.
6026# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
6027
6028# Character class describing NM global symbol codes.
6029symcode='[[BCDEGRST]]'
6030
6031# Regexp to match symbols that can be accessed directly from C.
6032sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
6033
6034# Define system-specific variables.
6035case $host_os in
6036aix*)
6037  symcode='[[BCDT]]'
6038  ;;
6039cygwin* | mingw* | pw32* | cegcc*)
6040  symcode='[[ABCDGISTW]]'
6041  ;;
6042hpux*)
6043  if test ia64 = "$host_cpu"; then
6044    symcode='[[ABCDEGRST]]'
6045  fi
6046  ;;
6047irix* | nonstopux*)
6048  symcode='[[BCDEGRST]]'
6049  ;;
6050osf*)
6051  symcode='[[BCDEGQRST]]'
6052  ;;
6053solaris*)
6054  symcode='[[BDRT]]'
6055  ;;
6056sco3.2v5*)
6057  symcode='[[DT]]'
6058  ;;
6059sysv4.2uw2*)
6060  symcode='[[DT]]'
6061  ;;
6062sysv5* | sco5v6* | unixware* | OpenUNIX*)
6063  symcode='[[ABDT]]'
6064  ;;
6065sysv4)
6066  symcode='[[DFNSTU]]'
6067  ;;
6068esac
6069
6070# If we're using GNU nm, then use its standard symbol codes.
6071case `$NM -V 2>&1` in
6072*GNU* | *'with BFD'*)
6073  symcode='[[ABCDGIRSTW]]' ;;
6074esac
6075
6076if test "$lt_cv_nm_interface" = "MS dumpbin"; then
6077  # Gets list of data symbols to import.
6078  lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
6079  # Adjust the below global symbol transforms to fixup imported variables.
6080  lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
6081  lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
6082  lt_c_name_lib_hook="\
6083  -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
6084  -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
6085else
6086  # Disable hooks by default.
6087  lt_cv_sys_global_symbol_to_import=
6088  lt_cdecl_hook=
6089  lt_c_name_hook=
6090  lt_c_name_lib_hook=
6091fi
6092
6093# Transform an extracted symbol line into a proper C declaration.
6094# Some systems (esp. on ia64) link data and code symbols differently,
6095# so use this general approach.
6096lt_cv_sys_global_symbol_to_cdecl="sed -n"\
6097$lt_cdecl_hook\
6098" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
6099" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
6100
6101# Transform an extracted symbol line into symbol name and symbol address
6102lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
6103$lt_c_name_hook\
6104" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
6105" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
6106
6107# Transform an extracted symbol line into symbol name with lib prefix and
6108# symbol address.
6109lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
6110$lt_c_name_lib_hook\
6111" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
6112" -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
6113" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
6114
6115# Handle CRLF in mingw tool chain
6116opt_cr=
6117case $build_os in
6118mingw*)
6119  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
6120  ;;
6121esac
6122
6123# Try without a prefix underscore, then with it.
6124for ac_symprfx in "" "_"; do
6125
6126  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
6127  symxfrm="\\1 $ac_symprfx\\2 \\2"
6128
6129  # Write the raw and C identifiers.
6130  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
6131    # Fake it for dumpbin and say T for any non-static function,
6132    # D for any global variable and I for any imported variable.
6133    # Also find C++ and __fastcall symbols from MSVC++ or ICC,
6134    # which start with @ or ?.
6135    lt_cv_sys_global_symbol_pipe="$AWK ['"\
6136"     {last_section=section; section=\$ 3};"\
6137"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
6138"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
6139"     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
6140"     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
6141"     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
6142"     \$ 0!~/External *\|/{next};"\
6143"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
6144"     {if(hide[section]) next};"\
6145"     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
6146"     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
6147"     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
6148"     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
6149"     ' prfx=^$ac_symprfx]"
6150  else
6151    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
6152  fi
6153  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
6154
6155  # Check to see that the pipe works correctly.
6156  pipe_works=no
6157
6158  rm -f conftest*
6159  cat > conftest.$ac_ext <<_LT_EOF
6160#ifdef __cplusplus
6161extern "C" {
6162#endif
6163char nm_test_var;
6164void nm_test_func(void);
6165void nm_test_func(void){}
6166#ifdef __cplusplus
6167}
6168#endif
6169int main(){nm_test_var='a';nm_test_func();return(0);}
6170_LT_EOF
6171
6172  if AC_TRY_EVAL(ac_compile); then
6173    # Now try to grab the symbols.
6174    nlist=conftest.nm
6175    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
6176      # Try sorting and uniquifying the output.
6177      if sort "$nlist" | uniq > "$nlist"T; then
6178	mv -f "$nlist"T "$nlist"
6179      else
6180	rm -f "$nlist"T
6181      fi
6182
6183      # Make sure that we snagged all the symbols we need.
6184      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
6185	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
6186	  cat <<_LT_EOF > conftest.$ac_ext
6187/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
6188#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
6189/* DATA imports from DLLs on WIN32 can't be const, because runtime
6190   relocations are performed -- see ld's documentation on pseudo-relocs.  */
6191# define LT@&t@_DLSYM_CONST
6192#elif defined __osf__
6193/* This system does not cope well with relocations in const data.  */
6194# define LT@&t@_DLSYM_CONST
6195#else
6196# define LT@&t@_DLSYM_CONST const
6197#endif
6198
6199#ifdef __cplusplus
6200extern "C" {
6201#endif
6202
6203_LT_EOF
6204	  # Now generate the symbol file.
6205	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
6206
6207	  cat <<_LT_EOF >> conftest.$ac_ext
6208
6209/* The mapping between symbol names and symbols.  */
6210LT@&t@_DLSYM_CONST struct {
6211  const char *name;
6212  void       *address;
6213}
6214lt__PROGRAM__LTX_preloaded_symbols[[]] =
6215{
6216  { "@PROGRAM@", (void *) 0 },
6217_LT_EOF
6218	  $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
6219	  cat <<\_LT_EOF >> conftest.$ac_ext
6220  {0, (void *) 0}
6221};
6222
6223/* This works around a problem in FreeBSD linker */
6224#ifdef FREEBSD_WORKAROUND
6225static const void *lt_preloaded_setup() {
6226  return lt__PROGRAM__LTX_preloaded_symbols;
6227}
6228#endif
6229
6230#ifdef __cplusplus
6231}
6232#endif
6233_LT_EOF
6234	  # Now try linking the two files.
6235	  mv conftest.$ac_objext conftstm.$ac_objext
6236	  lt_globsym_save_LIBS=$LIBS
6237	  lt_globsym_save_CFLAGS=$CFLAGS
6238	  LIBS=conftstm.$ac_objext
6239	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
6240	  if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
6241	    pipe_works=yes
6242	  fi
6243	  LIBS=$lt_globsym_save_LIBS
6244	  CFLAGS=$lt_globsym_save_CFLAGS
6245	else
6246	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
6247	fi
6248      else
6249	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
6250      fi
6251    else
6252      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
6253    fi
6254  else
6255    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
6256    cat conftest.$ac_ext >&5
6257  fi
6258  rm -rf conftest* conftst*
6259
6260  # Do not use the global_symbol_pipe unless it works.
6261  if test yes = "$pipe_works"; then
6262    break
6263  else
6264    lt_cv_sys_global_symbol_pipe=
6265  fi
6266done
6267])
6268if test -z "$lt_cv_sys_global_symbol_pipe"; then
6269  lt_cv_sys_global_symbol_to_cdecl=
6270fi
6271if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
6272  AC_MSG_RESULT(failed)
6273else
6274  AC_MSG_RESULT(ok)
6275fi
6276
6277# Response file support.
6278if test "$lt_cv_nm_interface" = "MS dumpbin"; then
6279  nm_file_list_spec='@'
6280elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
6281  nm_file_list_spec='@'
6282fi
6283
6284_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
6285    [Take the output of nm and produce a listing of raw symbols and C names])
6286_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
6287    [Transform the output of nm in a proper C declaration])
6288_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
6289    [Transform the output of nm into a list of symbols to manually relocate])
6290_LT_DECL([global_symbol_to_c_name_address],
6291    [lt_cv_sys_global_symbol_to_c_name_address], [1],
6292    [Transform the output of nm in a C name address pair])
6293_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
6294    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
6295    [Transform the output of nm in a C name address pair when lib prefix is needed])
6296_LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
6297    [The name lister interface])
6298_LT_DECL([], [nm_file_list_spec], [1],
6299    [Specify filename containing input files for $NM])
6300]) # _LT_CMD_GLOBAL_SYMBOLS
6301
6302
6303# _LT_COMPILER_PIC([TAGNAME])
6304# ---------------------------
6305m4_defun([_LT_COMPILER_PIC],
6306[m4_require([_LT_TAG_COMPILER])dnl
6307_LT_TAGVAR(lt_prog_compiler_wl, $1)=
6308_LT_TAGVAR(lt_prog_compiler_pic, $1)=
6309_LT_TAGVAR(lt_prog_compiler_static, $1)=
6310
6311m4_if([$1], [CXX], [
6312  # C++ specific cases for pic, static, wl, etc.
6313  if test yes = "$GXX"; then
6314    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6315    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6316
6317    case $host_os in
6318    aix*)
6319      # All AIX code is PIC.
6320      if test ia64 = "$host_cpu"; then
6321	# AIX 5 now supports IA64 processor
6322	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6323      fi
6324      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6325      ;;
6326
6327    amigaos*)
6328      case $host_cpu in
6329      powerpc)
6330            # see comment about AmigaOS4 .so support
6331            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6332        ;;
6333      m68k)
6334            # FIXME: we need at least 68020 code to build shared libraries, but
6335            # adding the '-m68020' flag to GCC prevents building anything better,
6336            # like '-m68040'.
6337            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
6338        ;;
6339      esac
6340      ;;
6341
6342    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
6343      # PIC is the default for these OSes.
6344      ;;
6345    mingw* | cygwin* | os2* | pw32* | cegcc*)
6346      # This hack is so that the source file can tell whether it is being
6347      # built for inclusion in a dll (and should export symbols for example).
6348      # Although the cygwin gcc ignores -fPIC, still need this for old-style
6349      # (--disable-auto-import) libraries
6350      m4_if([$1], [GCJ], [],
6351	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
6352      case $host_os in
6353      os2*)
6354	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
6355	;;
6356      esac
6357      ;;
6358    darwin* | rhapsody*)
6359      # PIC is the default on this platform
6360      # Common symbols not allowed in MH_DYLIB files
6361      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
6362      ;;
6363    *djgpp*)
6364      # DJGPP does not support shared libraries at all
6365      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
6366      ;;
6367    haiku*)
6368      # PIC is the default for Haiku.
6369      # The "-static" flag exists, but is broken.
6370      _LT_TAGVAR(lt_prog_compiler_static, $1)=
6371      ;;
6372    interix[[3-9]]*)
6373      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
6374      # Instead, we relocate shared libraries at runtime.
6375      ;;
6376    sysv4*MP*)
6377      if test -d /usr/nec; then
6378	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
6379      fi
6380      ;;
6381    hpux*)
6382      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
6383      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
6384      # sets the default TLS model and affects inlining.
6385      case $host_cpu in
6386      hppa*64*)
6387	;;
6388      *)
6389	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6390	;;
6391      esac
6392      ;;
6393    *qnx* | *nto*)
6394      # QNX uses GNU C++, but need to define -shared option too, otherwise
6395      # it will coredump.
6396      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
6397      ;;
6398    *)
6399      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6400      ;;
6401    esac
6402  else
6403    case $host_os in
6404      aix[[4-9]]*)
6405	# All AIX code is PIC.
6406	if test ia64 = "$host_cpu"; then
6407	  # AIX 5 now supports IA64 processor
6408	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6409	else
6410	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
6411	fi
6412	;;
6413      chorus*)
6414	case $cc_basename in
6415	cxch68*)
6416	  # Green Hills C++ Compiler
6417	  # _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"
6418	  ;;
6419	esac
6420	;;
6421      mingw* | cygwin* | os2* | pw32* | cegcc*)
6422	# This hack is so that the source file can tell whether it is being
6423	# built for inclusion in a dll (and should export symbols for example).
6424	m4_if([$1], [GCJ], [],
6425	  [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
6426	;;
6427      dgux*)
6428	case $cc_basename in
6429	  ec++*)
6430	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6431	    ;;
6432	  ghcx*)
6433	    # Green Hills C++ Compiler
6434	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6435	    ;;
6436	  *)
6437	    ;;
6438	esac
6439	;;
6440      freebsd* | dragonfly*)
6441	# FreeBSD uses GNU C++
6442	;;
6443      hpux9* | hpux10* | hpux11*)
6444	case $cc_basename in
6445	  CC*)
6446	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6447	    _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
6448	    if test ia64 != "$host_cpu"; then
6449	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6450	    fi
6451	    ;;
6452	  aCC*)
6453	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6454	    _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
6455	    case $host_cpu in
6456	    hppa*64*|ia64*)
6457	      # +Z the default
6458	      ;;
6459	    *)
6460	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6461	      ;;
6462	    esac
6463	    ;;
6464	  *)
6465	    ;;
6466	esac
6467	;;
6468      interix*)
6469	# This is c89, which is MS Visual C++ (no shared libs)
6470	# Anyone wants to do a port?
6471	;;
6472      irix5* | irix6* | nonstopux*)
6473	case $cc_basename in
6474	  CC*)
6475	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6476	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6477	    # CC pic flag -KPIC is the default.
6478	    ;;
6479	  *)
6480	    ;;
6481	esac
6482	;;
6483      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
6484	case $cc_basename in
6485	  KCC*)
6486	    # KAI C++ Compiler
6487	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
6488	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6489	    ;;
6490	  ecpc* )
6491	    # old Intel C++ for x86_64, which still supported -KPIC.
6492	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6493	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6494	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6495	    ;;
6496	  icpc* )
6497	    # Intel C++, used to be incompatible with GCC.
6498	    # ICC 10 doesn't accept -KPIC any more.
6499	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6500	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6501	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6502	    ;;
6503	  pgCC* | pgcpp*)
6504	    # Portland Group C++ compiler
6505	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6506	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6507	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6508	    ;;
6509	  cxx*)
6510	    # Compaq C++
6511	    # Make sure the PIC flag is empty.  It appears that all Alpha
6512	    # Linux and Compaq Tru64 Unix objects are PIC.
6513	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
6514	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6515	    ;;
6516	  xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
6517	    # IBM XL 8.0, 9.0 on PPC and BlueGene
6518	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6519	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
6520	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
6521	    ;;
6522	  *)
6523	    case `$CC -V 2>&1 | sed 5q` in
6524	    *Sun\ C*)
6525	      # Sun C++ 5.9
6526	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6527	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6528	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6529	      ;;
6530	    esac
6531	    ;;
6532	esac
6533	;;
6534      lynxos*)
6535	;;
6536      m88k*)
6537	;;
6538      mvs*)
6539	case $cc_basename in
6540	  cxx*)
6541	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
6542	    ;;
6543	  *)
6544	    ;;
6545	esac
6546	;;
6547      netbsd*)
6548	;;
6549      *qnx* | *nto*)
6550        # QNX uses GNU C++, but need to define -shared option too, otherwise
6551        # it will coredump.
6552        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
6553        ;;
6554      osf3* | osf4* | osf5*)
6555	case $cc_basename in
6556	  KCC*)
6557	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
6558	    ;;
6559	  RCC*)
6560	    # Rational C++ 2.4.1
6561	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6562	    ;;
6563	  cxx*)
6564	    # Digital/Compaq C++
6565	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6566	    # Make sure the PIC flag is empty.  It appears that all Alpha
6567	    # Linux and Compaq Tru64 Unix objects are PIC.
6568	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
6569	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6570	    ;;
6571	  *)
6572	    ;;
6573	esac
6574	;;
6575      psos*)
6576	;;
6577      solaris*)
6578	case $cc_basename in
6579	  CC* | sunCC*)
6580	    # Sun C++ 4.2, 5.x and Centerline C++
6581	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6582	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6583	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6584	    ;;
6585	  gcx*)
6586	    # Green Hills C++ Compiler
6587	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6588	    ;;
6589	  *)
6590	    ;;
6591	esac
6592	;;
6593      sunos4*)
6594	case $cc_basename in
6595	  CC*)
6596	    # Sun C++ 4.x
6597	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6598	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6599	    ;;
6600	  lcc*)
6601	    # Lucid
6602	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6603	    ;;
6604	  *)
6605	    ;;
6606	esac
6607	;;
6608      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
6609	case $cc_basename in
6610	  CC*)
6611	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6612	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6613	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6614	    ;;
6615	esac
6616	;;
6617      tandem*)
6618	case $cc_basename in
6619	  NCC*)
6620	    # NonStop-UX NCC 3.20
6621	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6622	    ;;
6623	  *)
6624	    ;;
6625	esac
6626	;;
6627      vxworks*)
6628	;;
6629      *)
6630	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6631	;;
6632    esac
6633  fi
6634],
6635[
6636  if test yes = "$GCC"; then
6637    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6638    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6639
6640    case $host_os in
6641      aix*)
6642      # All AIX code is PIC.
6643      if test ia64 = "$host_cpu"; then
6644	# AIX 5 now supports IA64 processor
6645	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6646      fi
6647      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6648      ;;
6649
6650    amigaos*)
6651      case $host_cpu in
6652      powerpc)
6653            # see comment about AmigaOS4 .so support
6654            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6655        ;;
6656      m68k)
6657            # FIXME: we need at least 68020 code to build shared libraries, but
6658            # adding the '-m68020' flag to GCC prevents building anything better,
6659            # like '-m68040'.
6660            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
6661        ;;
6662      esac
6663      ;;
6664
6665    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
6666      # PIC is the default for these OSes.
6667      ;;
6668
6669    mingw* | cygwin* | pw32* | os2* | cegcc*)
6670      # This hack is so that the source file can tell whether it is being
6671      # built for inclusion in a dll (and should export symbols for example).
6672      # Although the cygwin gcc ignores -fPIC, still need this for old-style
6673      # (--disable-auto-import) libraries
6674      m4_if([$1], [GCJ], [],
6675	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
6676      case $host_os in
6677      os2*)
6678	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
6679	;;
6680      esac
6681      ;;
6682
6683    darwin* | rhapsody*)
6684      # PIC is the default on this platform
6685      # Common symbols not allowed in MH_DYLIB files
6686      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
6687      ;;
6688
6689    haiku*)
6690      # PIC is the default for Haiku.
6691      # The "-static" flag exists, but is broken.
6692      _LT_TAGVAR(lt_prog_compiler_static, $1)=
6693      ;;
6694
6695    hpux*)
6696      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
6697      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
6698      # sets the default TLS model and affects inlining.
6699      case $host_cpu in
6700      hppa*64*)
6701	# +Z the default
6702	;;
6703      *)
6704	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6705	;;
6706      esac
6707      ;;
6708
6709    interix[[3-9]]*)
6710      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
6711      # Instead, we relocate shared libraries at runtime.
6712      ;;
6713
6714    msdosdjgpp*)
6715      # Just because we use GCC doesn't mean we suddenly get shared libraries
6716      # on systems that don't support them.
6717      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6718      enable_shared=no
6719      ;;
6720
6721    *nto* | *qnx*)
6722      # QNX uses GNU C++, but need to define -shared option too, otherwise
6723      # it will coredump.
6724      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
6725      ;;
6726
6727    sysv4*MP*)
6728      if test -d /usr/nec; then
6729	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
6730      fi
6731      ;;
6732
6733    *)
6734      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6735      ;;
6736    esac
6737
6738    case $cc_basename in
6739    nvcc*) # Cuda Compiler Driver 2.2
6740      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
6741      if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
6742        _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
6743      fi
6744      ;;
6745    esac
6746  else
6747    # PORTME Check for flag to pass linker flags through the system compiler.
6748    case $host_os in
6749    aix*)
6750      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6751      if test ia64 = "$host_cpu"; then
6752	# AIX 5 now supports IA64 processor
6753	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6754      else
6755	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
6756      fi
6757      ;;
6758
6759    darwin* | rhapsody*)
6760      # PIC is the default on this platform
6761      # Common symbols not allowed in MH_DYLIB files
6762      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
6763      case $cc_basename in
6764      nagfor*)
6765        # NAG Fortran compiler
6766        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
6767        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6768        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6769        ;;
6770      esac
6771      ;;
6772
6773    mingw* | cygwin* | pw32* | os2* | cegcc*)
6774      # This hack is so that the source file can tell whether it is being
6775      # built for inclusion in a dll (and should export symbols for example).
6776      m4_if([$1], [GCJ], [],
6777	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
6778      case $host_os in
6779      os2*)
6780	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
6781	;;
6782      esac
6783      ;;
6784
6785    hpux9* | hpux10* | hpux11*)
6786      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6787      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6788      # not for PA HP-UX.
6789      case $host_cpu in
6790      hppa*64*|ia64*)
6791	# +Z the default
6792	;;
6793      *)
6794	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6795	;;
6796      esac
6797      # Is there a better lt_prog_compiler_static that works with the bundled CC?
6798      _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
6799      ;;
6800
6801    irix5* | irix6* | nonstopux*)
6802      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6803      # PIC (with -KPIC) is the default.
6804      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6805      ;;
6806
6807    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
6808      case $cc_basename in
6809      # old Intel for x86_64, which still supported -KPIC.
6810      ecc*)
6811	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6812	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6813	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6814        ;;
6815      # icc used to be incompatible with GCC.
6816      # ICC 10 doesn't accept -KPIC any more.
6817      icc* | ifort*)
6818	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6819	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6820	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6821        ;;
6822      # Lahey Fortran 8.1.
6823      lf95*)
6824	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6825	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
6826	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
6827	;;
6828      nagfor*)
6829	# NAG Fortran compiler
6830	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
6831	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6832	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6833	;;
6834      tcc*)
6835	# Fabrice Bellard et al's Tiny C Compiler
6836	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6837	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6838	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6839	;;
6840      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
6841        # Portland Group compilers (*not* the Pentium gcc compiler,
6842	# which looks to be a dead project)
6843	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6844	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6845	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6846        ;;
6847      ccc*)
6848        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6849        # All Alpha code is PIC.
6850        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6851        ;;
6852      xl* | bgxl* | bgf* | mpixl*)
6853	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
6854	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6855	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
6856	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
6857	;;
6858      *)
6859	case `$CC -V 2>&1 | sed 5q` in
6860	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
6861	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
6862	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6863	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6864	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
6865	  ;;
6866	*Sun\ F* | *Sun*Fortran*)
6867	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6868	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6869	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6870	  ;;
6871	*Sun\ C*)
6872	  # Sun C 5.9
6873	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6874	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6875	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6876	  ;;
6877        *Intel*\ [[CF]]*Compiler*)
6878	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6879	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6880	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6881	  ;;
6882	*Portland\ Group*)
6883	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6884	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6885	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6886	  ;;
6887	esac
6888	;;
6889      esac
6890      ;;
6891
6892    newsos6)
6893      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6894      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6895      ;;
6896
6897    *nto* | *qnx*)
6898      # QNX uses GNU C++, but need to define -shared option too, otherwise
6899      # it will coredump.
6900      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
6901      ;;
6902
6903    osf3* | osf4* | osf5*)
6904      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6905      # All OSF/1 code is PIC.
6906      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6907      ;;
6908
6909    rdos*)
6910      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6911      ;;
6912
6913    solaris*)
6914      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6915      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6916      case $cc_basename in
6917      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
6918	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
6919      *)
6920	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
6921      esac
6922      ;;
6923
6924    sunos4*)
6925      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6926      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6927      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6928      ;;
6929
6930    sysv4 | sysv4.2uw2* | sysv4.3*)
6931      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6932      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6933      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6934      ;;
6935
6936    sysv4*MP*)
6937      if test -d /usr/nec; then
6938	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
6939	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6940      fi
6941      ;;
6942
6943    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
6944      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6945      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6946      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6947      ;;
6948
6949    unicos*)
6950      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6951      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6952      ;;
6953
6954    uts4*)
6955      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6956      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6957      ;;
6958
6959    *)
6960      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6961      ;;
6962    esac
6963  fi
6964])
6965case $host_os in
6966  # For platforms that do not support PIC, -DPIC is meaningless:
6967  *djgpp*)
6968    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
6969    ;;
6970  *)
6971    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
6972    ;;
6973esac
6974
6975AC_CACHE_CHECK([for $compiler option to produce PIC],
6976  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
6977  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
6978_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
6979
6980#
6981# Check to make sure the PIC flag actually works.
6982#
6983if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
6984  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
6985    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
6986    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
6987    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
6988     "" | " "*) ;;
6989     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
6990     esac],
6991    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
6992     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
6993fi
6994_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
6995	[Additional compiler flags for building library objects])
6996
6997_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
6998	[How to pass a linker flag through the compiler])
6999#
7000# Check to make sure the static flag actually works.
7001#
7002wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
7003_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
7004  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
7005  $lt_tmp_static_flag,
7006  [],
7007  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
7008_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
7009	[Compiler flag to prevent dynamic linking])
7010])# _LT_COMPILER_PIC
7011
7012
7013# _LT_LINKER_SHLIBS([TAGNAME])
7014# ----------------------------
7015# See if the linker supports building shared libraries.
7016m4_defun([_LT_LINKER_SHLIBS],
7017[AC_REQUIRE([LT_PATH_LD])dnl
7018AC_REQUIRE([LT_PATH_NM])dnl
7019m4_require([_LT_PATH_MANIFEST_TOOL])dnl
7020m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7021m4_require([_LT_DECL_EGREP])dnl
7022m4_require([_LT_DECL_SED])dnl
7023m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
7024m4_require([_LT_TAG_COMPILER])dnl
7025AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
7026m4_if([$1], [CXX], [
7027  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
7028  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
7029  case $host_os in
7030  aix[[4-9]]*)
7031    # If we're using GNU nm, then we don't want the "-C" option.
7032    # -C means demangle to GNU nm, but means don't demangle to AIX nm.
7033    # Without the "-l" option, or with the "-B" option, AIX nm treats
7034    # weak defined symbols like other global defined symbols, whereas
7035    # GNU nm marks them as "W".
7036    # While the 'weak' keyword is ignored in the Export File, we need
7037    # it in the Import File for the 'aix-soname' feature, so we have
7038    # to replace the "-B" option with "-P" for AIX nm.
7039    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
7040      _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'
7041    else
7042      _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'
7043    fi
7044    ;;
7045  pw32*)
7046    _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
7047    ;;
7048  cygwin* | mingw* | cegcc*)
7049    case $cc_basename in
7050    cl* | icl*)
7051      _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
7052      ;;
7053    *)
7054      _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'
7055      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
7056      ;;
7057    esac
7058    ;;
7059  *)
7060    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
7061    ;;
7062  esac
7063], [
7064  runpath_var=
7065  _LT_TAGVAR(allow_undefined_flag, $1)=
7066  _LT_TAGVAR(always_export_symbols, $1)=no
7067  _LT_TAGVAR(archive_cmds, $1)=
7068  _LT_TAGVAR(archive_expsym_cmds, $1)=
7069  _LT_TAGVAR(compiler_needs_object, $1)=no
7070  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7071  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7072  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
7073  _LT_TAGVAR(hardcode_automatic, $1)=no
7074  _LT_TAGVAR(hardcode_direct, $1)=no
7075  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7076  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7077  _LT_TAGVAR(hardcode_libdir_separator, $1)=
7078  _LT_TAGVAR(hardcode_minus_L, $1)=no
7079  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
7080  _LT_TAGVAR(inherit_rpath, $1)=no
7081  _LT_TAGVAR(link_all_deplibs, $1)=unknown
7082  _LT_TAGVAR(module_cmds, $1)=
7083  _LT_TAGVAR(module_expsym_cmds, $1)=
7084  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
7085  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
7086  _LT_TAGVAR(thread_safe_flag_spec, $1)=
7087  _LT_TAGVAR(whole_archive_flag_spec, $1)=
7088  # include_expsyms should be a list of space-separated symbols to be *always*
7089  # included in the symbol list
7090  _LT_TAGVAR(include_expsyms, $1)=
7091  # exclude_expsyms can be an extended regexp of symbols to exclude
7092  # it will be wrapped by ' (' and ')$', so one must not match beginning or
7093  # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
7094  # as well as any symbol that contains 'd'.
7095  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
7096  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
7097  # platforms (ab)use it in PIC code, but their linkers get confused if
7098  # the symbol is explicitly referenced.  Since portable code cannot
7099  # rely on this symbol name, it's probably fine to never include it in
7100  # preloaded symbol tables.
7101  # Exclude shared library initialization/finalization symbols.
7102dnl Note also adjust exclude_expsyms for C++ above.
7103  extract_expsyms_cmds=
7104
7105  case $host_os in
7106  cygwin* | mingw* | pw32* | cegcc*)
7107    # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
7108    # When not using gcc, we currently assume that we are using
7109    # Microsoft Visual C++ or Intel C++ Compiler.
7110    if test yes != "$GCC"; then
7111      with_gnu_ld=no
7112    fi
7113    ;;
7114  interix*)
7115    # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC)
7116    with_gnu_ld=yes
7117    ;;
7118  openbsd* | bitrig*)
7119    with_gnu_ld=no
7120    ;;
7121  esac
7122
7123  _LT_TAGVAR(ld_shlibs, $1)=yes
7124
7125  # On some targets, GNU ld is compatible enough with the native linker
7126  # that we're better off using the native interface for both.
7127  lt_use_gnu_ld_interface=no
7128  if test yes = "$with_gnu_ld"; then
7129    case $host_os in
7130      aix*)
7131	# The AIX port of GNU ld has always aspired to compatibility
7132	# with the native linker.  However, as the warning in the GNU ld
7133	# block says, versions before 2.19.5* couldn't really create working
7134	# shared libraries, regardless of the interface used.
7135	case `$LD -v 2>&1` in
7136	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
7137	  *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
7138	  *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
7139	  *)
7140	    lt_use_gnu_ld_interface=yes
7141	    ;;
7142	esac
7143	;;
7144      *)
7145	lt_use_gnu_ld_interface=yes
7146	;;
7147    esac
7148  fi
7149
7150  if test yes = "$lt_use_gnu_ld_interface"; then
7151    # If archive_cmds runs LD, not CC, wlarc should be empty
7152    wlarc='$wl'
7153
7154    # Set some defaults for GNU ld with shared library support. These
7155    # are reset later if shared libraries are not supported. Putting them
7156    # here allows them to be overridden if necessary.
7157    runpath_var=LD_RUN_PATH
7158    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7159    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7160    # ancient GNU ld didn't support --whole-archive et. al.
7161    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
7162      _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
7163    else
7164      _LT_TAGVAR(whole_archive_flag_spec, $1)=
7165    fi
7166    supports_anon_versioning=no
7167    case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
7168      *GNU\ gold*) supports_anon_versioning=yes ;;
7169      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
7170      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
7171      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
7172      *\ 2.11.*) ;; # other 2.11 versions
7173      *) supports_anon_versioning=yes ;;
7174    esac
7175
7176    # See if GNU ld supports shared libraries.
7177    case $host_os in
7178    aix[[3-9]]*)
7179      # On AIX/PPC, the GNU linker is very broken
7180      if test ia64 != "$host_cpu"; then
7181	_LT_TAGVAR(ld_shlibs, $1)=no
7182	cat <<_LT_EOF 1>&2
7183
7184*** Warning: the GNU linker, at least up to release 2.19, is reported
7185*** to be unable to reliably create shared libraries on AIX.
7186*** Therefore, libtool is disabling shared libraries support.  If you
7187*** really care for shared libraries, you may want to install binutils
7188*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
7189*** You will then need to restart the configuration process.
7190
7191_LT_EOF
7192      fi
7193      ;;
7194
7195    amigaos*)
7196      case $host_cpu in
7197      powerpc)
7198            # see comment about AmigaOS4 .so support
7199            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
7200            _LT_TAGVAR(archive_expsym_cmds, $1)=''
7201        ;;
7202      m68k)
7203            _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)'
7204            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7205            _LT_TAGVAR(hardcode_minus_L, $1)=yes
7206        ;;
7207      esac
7208      ;;
7209
7210    beos*)
7211      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
7212	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7213	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
7214	# support --undefined.  This deserves some investigation.  FIXME
7215	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
7216      else
7217	_LT_TAGVAR(ld_shlibs, $1)=no
7218      fi
7219      ;;
7220
7221    cygwin* | mingw* | pw32* | cegcc*)
7222      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
7223      # as there is no search path for DLLs.
7224      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7225      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
7226      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7227      _LT_TAGVAR(always_export_symbols, $1)=no
7228      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7229      _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'
7230      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
7231
7232      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
7233        _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'
7234	# If the export-symbols file already is a .def file, use it as
7235	# is; otherwise, prepend EXPORTS...
7236	_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
7237          cp $export_symbols $output_objdir/$soname.def;
7238        else
7239          echo EXPORTS > $output_objdir/$soname.def;
7240          cat $export_symbols >> $output_objdir/$soname.def;
7241        fi~
7242        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
7243      else
7244	_LT_TAGVAR(ld_shlibs, $1)=no
7245      fi
7246      ;;
7247
7248    haiku*)
7249      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
7250      _LT_TAGVAR(link_all_deplibs, $1)=yes
7251      ;;
7252
7253    os2*)
7254      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7255      _LT_TAGVAR(hardcode_minus_L, $1)=yes
7256      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7257      shrext_cmds=.dll
7258      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
7259	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
7260	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
7261	$ECHO EXPORTS >> $output_objdir/$libname.def~
7262	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
7263	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
7264	emximp -o $lib $output_objdir/$libname.def'
7265      _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
7266	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
7267	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
7268	$ECHO EXPORTS >> $output_objdir/$libname.def~
7269	prefix_cmds="$SED"~
7270	if test EXPORTS = "`$SED 1q $export_symbols`"; then
7271	  prefix_cmds="$prefix_cmds -e 1d";
7272	fi~
7273	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
7274	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
7275	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
7276	emximp -o $lib $output_objdir/$libname.def'
7277      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
7278      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7279      _LT_TAGVAR(file_list_spec, $1)='@'
7280      ;;
7281
7282    interix[[3-9]]*)
7283      _LT_TAGVAR(hardcode_direct, $1)=no
7284      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7285      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7286      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
7287      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
7288      # Instead, shared libraries are loaded at an image base (0x10000000 by
7289      # default) and relocated if they conflict, which is a slow very memory
7290      # consuming and fragmenting process.  To avoid this, we pick a random,
7291      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
7292      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
7293      _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'
7294      _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'
7295      ;;
7296
7297    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
7298      tmp_diet=no
7299      if test linux-dietlibc = "$host_os"; then
7300	case $cc_basename in
7301	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
7302	esac
7303      fi
7304      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
7305	 && test no = "$tmp_diet"
7306      then
7307	tmp_addflag=' $pic_flag'
7308	tmp_sharedflag='-shared'
7309	case $cc_basename,$host_cpu in
7310        pgcc*)				# Portland Group C compiler
7311	  _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'
7312	  tmp_addflag=' $pic_flag'
7313	  ;;
7314	pgf77* | pgf90* | pgf95* | pgfortran*)
7315					# Portland Group f77 and f90 compilers
7316	  _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'
7317	  tmp_addflag=' $pic_flag -Mnomain' ;;
7318	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
7319	  tmp_addflag=' -i_dynamic' ;;
7320	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
7321	  tmp_addflag=' -i_dynamic -nofor_main' ;;
7322	ifc* | ifort*)			# Intel Fortran compiler
7323	  tmp_addflag=' -nofor_main' ;;
7324	lf95*)				# Lahey Fortran 8.1
7325	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
7326	  tmp_sharedflag='--shared' ;;
7327        nagfor*)                        # NAGFOR 5.3
7328          tmp_sharedflag='-Wl,-shared' ;;
7329	xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
7330	  tmp_sharedflag='-qmkshrobj'
7331	  tmp_addflag= ;;
7332	nvcc*)	# Cuda Compiler Driver 2.2
7333	  _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'
7334	  _LT_TAGVAR(compiler_needs_object, $1)=yes
7335	  ;;
7336	esac
7337	case `$CC -V 2>&1 | sed 5q` in
7338	*Sun\ C*)			# Sun C 5.9
7339	  _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'
7340	  _LT_TAGVAR(compiler_needs_object, $1)=yes
7341	  tmp_sharedflag='-G' ;;
7342	*Sun\ F*)			# Sun Fortran 8.3
7343	  tmp_sharedflag='-G' ;;
7344	esac
7345	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
7346
7347        if test yes = "$supports_anon_versioning"; then
7348          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7349            cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7350            echo "local: *; };" >> $output_objdir/$libname.ver~
7351            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
7352        fi
7353
7354	case $cc_basename in
7355	tcc*)
7356	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
7357	  ;;
7358	xlf* | bgf* | bgxlf* | mpixlf*)
7359	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
7360	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
7361	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7362	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
7363	  if test yes = "$supports_anon_versioning"; then
7364	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7365              cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7366              echo "local: *; };" >> $output_objdir/$libname.ver~
7367              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
7368	  fi
7369	  ;;
7370	esac
7371      else
7372        _LT_TAGVAR(ld_shlibs, $1)=no
7373      fi
7374      ;;
7375
7376    netbsd*)
7377      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7378	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
7379	wlarc=
7380      else
7381	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
7382	_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'
7383      fi
7384      ;;
7385
7386    solaris*)
7387      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
7388	_LT_TAGVAR(ld_shlibs, $1)=no
7389	cat <<_LT_EOF 1>&2
7390
7391*** Warning: The releases 2.8.* of the GNU linker cannot reliably
7392*** create shared libraries on Solaris systems.  Therefore, libtool
7393*** is disabling shared libraries support.  We urge you to upgrade GNU
7394*** binutils to release 2.9.1 or newer.  Another option is to modify
7395*** your PATH or compiler configuration so that the native linker is
7396*** used, and then restart.
7397
7398_LT_EOF
7399      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
7400	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
7401	_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'
7402      else
7403	_LT_TAGVAR(ld_shlibs, $1)=no
7404      fi
7405      ;;
7406
7407    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
7408      case `$LD -v 2>&1` in
7409        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
7410	_LT_TAGVAR(ld_shlibs, $1)=no
7411	cat <<_LT_EOF 1>&2
7412
7413*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
7414*** reliably create shared libraries on SCO systems.  Therefore, libtool
7415*** is disabling shared libraries support.  We urge you to upgrade GNU
7416*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
7417*** your PATH or compiler configuration so that the native linker is
7418*** used, and then restart.
7419
7420_LT_EOF
7421	;;
7422	*)
7423	  # For security reasons, it is highly recommended that you always
7424	  # use absolute paths for naming shared libraries, and exclude the
7425	  # DT_RUNPATH tag from executables and libraries.  But doing so
7426	  # requires that you compile everything twice, which is a pain.
7427	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
7428	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7429	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
7430	    _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'
7431	  else
7432	    _LT_TAGVAR(ld_shlibs, $1)=no
7433	  fi
7434	;;
7435      esac
7436      ;;
7437
7438    sunos4*)
7439      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7440      wlarc=
7441      _LT_TAGVAR(hardcode_direct, $1)=yes
7442      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7443      ;;
7444
7445    *)
7446      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
7447	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
7448	_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'
7449      else
7450	_LT_TAGVAR(ld_shlibs, $1)=no
7451      fi
7452      ;;
7453    esac
7454
7455    if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
7456      runpath_var=
7457      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7458      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7459      _LT_TAGVAR(whole_archive_flag_spec, $1)=
7460    fi
7461  else
7462    # PORTME fill in a description of your system's linker (not GNU ld)
7463    case $host_os in
7464    aix3*)
7465      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7466      _LT_TAGVAR(always_export_symbols, $1)=yes
7467      _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'
7468      # Note: this linker hardcodes the directories in LIBPATH if there
7469      # are no directories specified by -L.
7470      _LT_TAGVAR(hardcode_minus_L, $1)=yes
7471      if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
7472	# Neither direct hardcoding nor static linking is supported with a
7473	# broken collect2.
7474	_LT_TAGVAR(hardcode_direct, $1)=unsupported
7475      fi
7476      ;;
7477
7478    aix[[4-9]]*)
7479      if test ia64 = "$host_cpu"; then
7480	# On IA64, the linker does run time linking by default, so we don't
7481	# have to do anything special.
7482	aix_use_runtimelinking=no
7483	exp_sym_flag='-Bexport'
7484	no_entry_flag=
7485      else
7486	# If we're using GNU nm, then we don't want the "-C" option.
7487	# -C means demangle to GNU nm, but means don't demangle to AIX nm.
7488	# Without the "-l" option, or with the "-B" option, AIX nm treats
7489	# weak defined symbols like other global defined symbols, whereas
7490	# GNU nm marks them as "W".
7491	# While the 'weak' keyword is ignored in the Export File, we need
7492	# it in the Import File for the 'aix-soname' feature, so we have
7493	# to replace the "-B" option with "-P" for AIX nm.
7494	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
7495	  _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'
7496	else
7497	  _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'
7498	fi
7499	aix_use_runtimelinking=no
7500
7501	# Test if we are trying to use run time linking or normal
7502	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
7503	# have runtime linking enabled, and use it for executables.
7504	# For shared libraries, we enable/disable runtime linking
7505	# depending on the kind of the shared library created -
7506	# when "with_aix_soname,aix_use_runtimelinking" is:
7507	# "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
7508	# "aix,yes"  lib.so          shared, rtl:yes, for executables
7509	#            lib.a           static archive
7510	# "both,no"  lib.so.V(shr.o) shared, rtl:yes
7511	#            lib.a(lib.so.V) shared, rtl:no,  for executables
7512	# "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
7513	#            lib.a(lib.so.V) shared, rtl:no
7514	# "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
7515	#            lib.a           static archive
7516	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
7517	  for ld_flag in $LDFLAGS; do
7518	  if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
7519	    aix_use_runtimelinking=yes
7520	    break
7521	  fi
7522	  done
7523	  if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
7524	    # With aix-soname=svr4, we create the lib.so.V shared archives only,
7525	    # so we don't have lib.a shared libs to link our executables.
7526	    # We have to force runtime linking in this case.
7527	    aix_use_runtimelinking=yes
7528	    LDFLAGS="$LDFLAGS -Wl,-brtl"
7529	  fi
7530	  ;;
7531	esac
7532
7533	exp_sym_flag='-bexport'
7534	no_entry_flag='-bnoentry'
7535      fi
7536
7537      # When large executables or shared objects are built, AIX ld can
7538      # have problems creating the table of contents.  If linking a library
7539      # or program results in "error TOC overflow" add -mminimal-toc to
7540      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
7541      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7542
7543      _LT_TAGVAR(archive_cmds, $1)=''
7544      _LT_TAGVAR(hardcode_direct, $1)=yes
7545      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7546      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7547      _LT_TAGVAR(link_all_deplibs, $1)=yes
7548      _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
7549      case $with_aix_soname,$aix_use_runtimelinking in
7550      aix,*) ;; # traditional, no import file
7551      svr4,* | *,yes) # use import file
7552	# The Import File defines what to hardcode.
7553	_LT_TAGVAR(hardcode_direct, $1)=no
7554	_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7555	;;
7556      esac
7557
7558      if test yes = "$GCC"; then
7559	case $host_os in aix4.[[012]]|aix4.[[012]].*)
7560	# We only want to do this on AIX 4.2 and lower, the check
7561	# below for broken collect2 doesn't work under 4.3+
7562	  collect2name=`$CC -print-prog-name=collect2`
7563	  if test -f "$collect2name" &&
7564	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
7565	  then
7566	  # We have reworked collect2
7567	  :
7568	  else
7569	  # We have old collect2
7570	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
7571	  # It fails to find uninstalled libraries when the uninstalled
7572	  # path is not listed in the libpath.  Setting hardcode_minus_L
7573	  # to unsupported forces relinking
7574	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
7575	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7576	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
7577	  fi
7578	  ;;
7579	esac
7580	shared_flag='-shared'
7581	if test yes = "$aix_use_runtimelinking"; then
7582	  shared_flag="$shared_flag "'$wl-G'
7583	fi
7584	# Need to ensure runtime linking is disabled for the traditional
7585	# shared library, or the linker may eventually find shared libraries
7586	# /with/ Import File - we do not want to mix them.
7587	shared_flag_aix='-shared'
7588	shared_flag_svr4='-shared $wl-G'
7589      else
7590	# not using gcc
7591	if test ia64 = "$host_cpu"; then
7592	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
7593	# chokes on -Wl,-G. The following line is correct:
7594	  shared_flag='-G'
7595	else
7596	  if test yes = "$aix_use_runtimelinking"; then
7597	    shared_flag='$wl-G'
7598	  else
7599	    shared_flag='$wl-bM:SRE'
7600	  fi
7601	  shared_flag_aix='$wl-bM:SRE'
7602	  shared_flag_svr4='$wl-G'
7603	fi
7604      fi
7605
7606      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
7607      # It seems that -bexpall does not export symbols beginning with
7608      # underscore (_), so it is better to generate a list of symbols to export.
7609      _LT_TAGVAR(always_export_symbols, $1)=yes
7610      if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
7611	# Warning - without using the other runtime loading flags (-brtl),
7612	# -berok will link without error, but may produce a broken library.
7613	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
7614        # Determine the default libpath from the value encoded in an
7615        # empty executable.
7616        _LT_SYS_MODULE_PATH_AIX([$1])
7617        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
7618        _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
7619      else
7620	if test ia64 = "$host_cpu"; then
7621	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
7622	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
7623	  _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"
7624	else
7625	 # Determine the default libpath from the value encoded in an
7626	 # empty executable.
7627	 _LT_SYS_MODULE_PATH_AIX([$1])
7628	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
7629	  # Warning - without using the other run time loading flags,
7630	  # -berok will link without error, but may produce a broken library.
7631	  _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
7632	  _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
7633	  if test yes = "$with_gnu_ld"; then
7634	    # We only use this code for GNU lds that support --whole-archive.
7635	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
7636	  else
7637	    # Exported symbols can be pulled into shared objects from archives
7638	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
7639	  fi
7640	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7641	  _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
7642	  # -brtl affects multiple linker settings, -berok does not and is overridden later
7643	  compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
7644	  if test svr4 != "$with_aix_soname"; then
7645	    # This is similar to how AIX traditionally builds its shared libraries.
7646	    _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'
7647	  fi
7648	  if test aix != "$with_aix_soname"; then
7649	    _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'
7650	  else
7651	    # used by -dlpreopen to get the symbols
7652	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
7653	  fi
7654	  _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
7655	fi
7656      fi
7657      ;;
7658
7659    amigaos*)
7660      case $host_cpu in
7661      powerpc)
7662            # see comment about AmigaOS4 .so support
7663            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
7664            _LT_TAGVAR(archive_expsym_cmds, $1)=''
7665        ;;
7666      m68k)
7667            _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)'
7668            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7669            _LT_TAGVAR(hardcode_minus_L, $1)=yes
7670        ;;
7671      esac
7672      ;;
7673
7674    bsdi[[45]]*)
7675      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
7676      ;;
7677
7678    cygwin* | mingw* | pw32* | cegcc*)
7679      # When not using gcc, we currently assume that we are using
7680      # Microsoft Visual C++ or Intel C++ Compiler.
7681      # hardcode_libdir_flag_spec is actually meaningless, as there is
7682      # no search path for DLLs.
7683      case $cc_basename in
7684      cl* | icl*)
7685	# Native MSVC or ICC
7686	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
7687	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7688	_LT_TAGVAR(always_export_symbols, $1)=yes
7689	_LT_TAGVAR(file_list_spec, $1)='@'
7690	# Tell ltmain to make .lib files, not .a files.
7691	libext=lib
7692	# Tell ltmain to make .dll files, not .so files.
7693	shrext_cmds=.dll
7694	# FIXME: Setting linknames here is a bad hack.
7695	_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
7696	_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
7697            cp "$export_symbols" "$output_objdir/$soname.def";
7698            echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
7699          else
7700            $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
7701          fi~
7702          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
7703          linknames='
7704	# The linker will not automatically build a static lib if we build a DLL.
7705	# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
7706	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7707	_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
7708	_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'
7709	# Don't use ranlib
7710	_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
7711	_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
7712          lt_tool_outputfile="@TOOL_OUTPUT@"~
7713          case $lt_outputfile in
7714            *.exe|*.EXE) ;;
7715            *)
7716              lt_outputfile=$lt_outputfile.exe
7717              lt_tool_outputfile=$lt_tool_outputfile.exe
7718              ;;
7719          esac~
7720          if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
7721            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
7722            $RM "$lt_outputfile.manifest";
7723          fi'
7724	;;
7725      *)
7726	# Assume MSVC and ICC wrapper
7727	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
7728	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7729	# Tell ltmain to make .lib files, not .a files.
7730	libext=lib
7731	# Tell ltmain to make .dll files, not .so files.
7732	shrext_cmds=.dll
7733	# FIXME: Setting linknames here is a bad hack.
7734	_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
7735	# The linker will automatically build a .lib file if we build a DLL.
7736	_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
7737	# FIXME: Should let the user specify the lib program.
7738	_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
7739	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7740	;;
7741      esac
7742      ;;
7743
7744    darwin* | rhapsody*)
7745      _LT_DARWIN_LINKER_FEATURES($1)
7746      ;;
7747
7748    dgux*)
7749      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7750      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7751      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7752      ;;
7753
7754    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
7755    # support.  Future versions do this automatically, but an explicit c++rt0.o
7756    # does not break anything, and helps significantly (at the cost of a little
7757    # extra space).
7758    freebsd2.2*)
7759      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
7760      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7761      _LT_TAGVAR(hardcode_direct, $1)=yes
7762      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7763      ;;
7764
7765    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
7766    freebsd2.*)
7767      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7768      _LT_TAGVAR(hardcode_direct, $1)=yes
7769      _LT_TAGVAR(hardcode_minus_L, $1)=yes
7770      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7771      ;;
7772
7773    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
7774    freebsd* | dragonfly*)
7775      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7776      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7777      _LT_TAGVAR(hardcode_direct, $1)=yes
7778      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7779      ;;
7780
7781    hpux9*)
7782      if test yes = "$GCC"; then
7783	_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'
7784      else
7785	_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'
7786      fi
7787      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
7788      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7789      _LT_TAGVAR(hardcode_direct, $1)=yes
7790
7791      # hardcode_minus_L: Not really in the search PATH,
7792      # but as the default location of the library.
7793      _LT_TAGVAR(hardcode_minus_L, $1)=yes
7794      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
7795      ;;
7796
7797    hpux10*)
7798      if test yes,no = "$GCC,$with_gnu_ld"; then
7799	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7800      else
7801	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
7802      fi
7803      if test no = "$with_gnu_ld"; then
7804	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
7805	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
7806	_LT_TAGVAR(hardcode_direct, $1)=yes
7807	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7808	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
7809	# hardcode_minus_L: Not really in the search PATH,
7810	# but as the default location of the library.
7811	_LT_TAGVAR(hardcode_minus_L, $1)=yes
7812      fi
7813      ;;
7814
7815    hpux11*)
7816      if test yes,no = "$GCC,$with_gnu_ld"; then
7817	case $host_cpu in
7818	hppa*64*)
7819	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
7820	  ;;
7821	ia64*)
7822	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
7823	  ;;
7824	*)
7825	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7826	  ;;
7827	esac
7828      else
7829	case $host_cpu in
7830	hppa*64*)
7831	  _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
7832	  ;;
7833	ia64*)
7834	  _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
7835	  ;;
7836	*)
7837	m4_if($1, [], [
7838	  # Older versions of the 11.00 compiler do not understand -b yet
7839	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
7840	  _LT_LINKER_OPTION([if $CC understands -b],
7841	    _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
7842	    [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
7843	    [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
7844	  [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
7845	  ;;
7846	esac
7847      fi
7848      if test no = "$with_gnu_ld"; then
7849	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
7850	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
7851
7852	case $host_cpu in
7853	hppa*64*|ia64*)
7854	  _LT_TAGVAR(hardcode_direct, $1)=no
7855	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7856	  ;;
7857	*)
7858	  _LT_TAGVAR(hardcode_direct, $1)=yes
7859	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7860	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
7861
7862	  # hardcode_minus_L: Not really in the search PATH,
7863	  # but as the default location of the library.
7864	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
7865	  ;;
7866	esac
7867      fi
7868      ;;
7869
7870    irix5* | irix6* | nonstopux*)
7871      if test yes = "$GCC"; then
7872	_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'
7873	# Try to use the -exported_symbol ld option, if it does not
7874	# work, assume that -exports_file does not work either and
7875	# implicitly export all symbols.
7876	# This should be the same for all languages, so no per-tag cache variable.
7877	AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
7878	  [lt_cv_irix_exported_symbol],
7879	  [save_LDFLAGS=$LDFLAGS
7880	   LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
7881	   AC_LINK_IFELSE(
7882	     [AC_LANG_SOURCE(
7883	        [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
7884			      [C++], [[int foo (void) { return 0; }]],
7885			      [Fortran 77], [[
7886      subroutine foo
7887      end]],
7888			      [Fortran], [[
7889      subroutine foo
7890      end]])])],
7891	      [lt_cv_irix_exported_symbol=yes],
7892	      [lt_cv_irix_exported_symbol=no])
7893           LDFLAGS=$save_LDFLAGS])
7894	if test yes = "$lt_cv_irix_exported_symbol"; then
7895          _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'
7896	fi
7897      else
7898	_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'
7899	_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'
7900      fi
7901      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
7902      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7903      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7904      _LT_TAGVAR(inherit_rpath, $1)=yes
7905      _LT_TAGVAR(link_all_deplibs, $1)=yes
7906      ;;
7907
7908    linux*)
7909      case $cc_basename in
7910      tcc*)
7911	# Fabrice Bellard et al's Tiny C Compiler
7912	_LT_TAGVAR(ld_shlibs, $1)=yes
7913	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7914	;;
7915      esac
7916      ;;
7917
7918    netbsd*)
7919      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7920	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
7921      else
7922	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
7923      fi
7924      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7925      _LT_TAGVAR(hardcode_direct, $1)=yes
7926      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7927      ;;
7928
7929    newsos6)
7930      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7931      _LT_TAGVAR(hardcode_direct, $1)=yes
7932      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7933      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7934      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7935      ;;
7936
7937    *nto* | *qnx*)
7938      ;;
7939
7940    openbsd* | bitrig*)
7941      if test -f /usr/libexec/ld.so; then
7942	_LT_TAGVAR(hardcode_direct, $1)=yes
7943	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7944	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7945	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
7946	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7947	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
7948	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7949	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
7950	else
7951	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7952	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7953	fi
7954      else
7955	_LT_TAGVAR(ld_shlibs, $1)=no
7956      fi
7957      ;;
7958
7959    os2*)
7960      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7961      _LT_TAGVAR(hardcode_minus_L, $1)=yes
7962      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7963      shrext_cmds=.dll
7964      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
7965	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
7966	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
7967	$ECHO EXPORTS >> $output_objdir/$libname.def~
7968	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
7969	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
7970	emximp -o $lib $output_objdir/$libname.def'
7971      _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
7972	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
7973	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
7974	$ECHO EXPORTS >> $output_objdir/$libname.def~
7975	prefix_cmds="$SED"~
7976	if test EXPORTS = "`$SED 1q $export_symbols`"; then
7977	  prefix_cmds="$prefix_cmds -e 1d";
7978	fi~
7979	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
7980	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
7981	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
7982	emximp -o $lib $output_objdir/$libname.def'
7983      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
7984      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7985      _LT_TAGVAR(file_list_spec, $1)='@'
7986      ;;
7987
7988    osf3*)
7989      if test yes = "$GCC"; then
7990	_LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
7991	_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'
7992      else
7993	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7994	_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'
7995      fi
7996      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
7997      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7998      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7999      ;;
8000
8001    osf4* | osf5*)	# as osf3* with the addition of -msym flag
8002      if test yes = "$GCC"; then
8003	_LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
8004	_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'
8005	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
8006      else
8007	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
8008	_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'
8009	_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~
8010          $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'
8011
8012	# Both c and cxx compiler support -rpath directly
8013	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
8014      fi
8015      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
8016      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8017      ;;
8018
8019    solaris*)
8020      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
8021      if test yes = "$GCC"; then
8022	wlarc='$wl'
8023	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
8024	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8025          $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'
8026      else
8027	case `$CC -V 2>&1` in
8028	*"Compilers 5.0"*)
8029	  wlarc=''
8030	  _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
8031	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8032            $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
8033	  ;;
8034	*)
8035	  wlarc='$wl'
8036	  _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
8037	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8038            $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
8039	  ;;
8040	esac
8041      fi
8042      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8043      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8044      case $host_os in
8045      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
8046      *)
8047	# The compiler driver will combine and reorder linker options,
8048	# but understands '-z linker_flag'.  GCC discards it without '$wl',
8049	# but is careful enough not to reorder.
8050	# Supported since Solaris 2.6 (maybe 2.5.1?)
8051	if test yes = "$GCC"; then
8052	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
8053	else
8054	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
8055	fi
8056	;;
8057      esac
8058      _LT_TAGVAR(link_all_deplibs, $1)=yes
8059      ;;
8060
8061    sunos4*)
8062      if test sequent = "$host_vendor"; then
8063	# Use $CC to link under sequent, because it throws in some extra .o
8064	# files that make .init and .fini sections work.
8065	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
8066      else
8067	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
8068      fi
8069      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8070      _LT_TAGVAR(hardcode_direct, $1)=yes
8071      _LT_TAGVAR(hardcode_minus_L, $1)=yes
8072      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8073      ;;
8074
8075    sysv4)
8076      case $host_vendor in
8077	sni)
8078	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8079	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
8080	;;
8081	siemens)
8082	  ## LD is ld it makes a PLAMLIB
8083	  ## CC just makes a GrossModule.
8084	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
8085	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
8086	  _LT_TAGVAR(hardcode_direct, $1)=no
8087        ;;
8088	motorola)
8089	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8090	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
8091	;;
8092      esac
8093      runpath_var='LD_RUN_PATH'
8094      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8095      ;;
8096
8097    sysv4.3*)
8098      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8099      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8100      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
8101      ;;
8102
8103    sysv4*MP*)
8104      if test -d /usr/nec; then
8105	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8106	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8107	runpath_var=LD_RUN_PATH
8108	hardcode_runpath_var=yes
8109	_LT_TAGVAR(ld_shlibs, $1)=yes
8110      fi
8111      ;;
8112
8113    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
8114      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
8115      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8116      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8117      runpath_var='LD_RUN_PATH'
8118
8119      if test yes = "$GCC"; then
8120	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8121	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8122      else
8123	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8124	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8125      fi
8126      ;;
8127
8128    sysv5* | sco3.2v5* | sco5v6*)
8129      # Note: We CANNOT use -z defs as we might desire, because we do not
8130      # link with -lc, and that would cause any symbols used from libc to
8131      # always be unresolved, which means just about no library would
8132      # ever link correctly.  If we're not using GNU ld we use -z text
8133      # though, which does catch some bad symbols but isn't as heavy-handed
8134      # as -z defs.
8135      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
8136      _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
8137      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8138      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8139      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
8140      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
8141      _LT_TAGVAR(link_all_deplibs, $1)=yes
8142      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
8143      runpath_var='LD_RUN_PATH'
8144
8145      if test yes = "$GCC"; then
8146	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8147	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8148      else
8149	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8150	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8151      fi
8152      ;;
8153
8154    uts4*)
8155      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8156      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8157      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8158      ;;
8159
8160    *)
8161      _LT_TAGVAR(ld_shlibs, $1)=no
8162      ;;
8163    esac
8164
8165    if test sni = "$host_vendor"; then
8166      case $host in
8167      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
8168	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
8169	;;
8170      esac
8171    fi
8172  fi
8173])
8174AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
8175test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
8176
8177_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
8178
8179_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
8180_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
8181_LT_DECL([], [extract_expsyms_cmds], [2],
8182    [The commands to extract the exported symbol list from a shared archive])
8183
8184#
8185# Do we need to explicitly link libc?
8186#
8187case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
8188x|xyes)
8189  # Assume -lc should be added
8190  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
8191
8192  if test yes,yes = "$GCC,$enable_shared"; then
8193    case $_LT_TAGVAR(archive_cmds, $1) in
8194    *'~'*)
8195      # FIXME: we may have to deal with multi-command sequences.
8196      ;;
8197    '$CC '*)
8198      # Test whether the compiler implicitly links with -lc since on some
8199      # systems, -lgcc has to come before -lc. If gcc already passes -lc
8200      # to ld, don't add -lc before -lgcc.
8201      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
8202	[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
8203	[$RM conftest*
8204	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
8205
8206	if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
8207	  soname=conftest
8208	  lib=conftest
8209	  libobjs=conftest.$ac_objext
8210	  deplibs=
8211	  wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
8212	  pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
8213	  compiler_flags=-v
8214	  linker_flags=-v
8215	  verstring=
8216	  output_objdir=.
8217	  libname=conftest
8218	  lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
8219	  _LT_TAGVAR(allow_undefined_flag, $1)=
8220	  if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
8221	  then
8222	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8223	  else
8224	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
8225	  fi
8226	  _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
8227	else
8228	  cat conftest.err 1>&5
8229	fi
8230	$RM conftest*
8231	])
8232      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
8233      ;;
8234    esac
8235  fi
8236  ;;
8237esac
8238
8239_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
8240    [Whether or not to add -lc for building shared libraries])
8241_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
8242    [enable_shared_with_static_runtimes], [0],
8243    [Whether or not to disallow shared libs when runtime libs are static])
8244_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
8245    [Compiler flag to allow reflexive dlopens])
8246_LT_TAGDECL([], [whole_archive_flag_spec], [1],
8247    [Compiler flag to generate shared objects directly from archives])
8248_LT_TAGDECL([], [compiler_needs_object], [1],
8249    [Whether the compiler copes with passing no objects directly])
8250_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
8251    [Create an old-style archive from a shared archive])
8252_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
8253    [Create a temporary old-style archive to link instead of a shared archive])
8254_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
8255_LT_TAGDECL([], [archive_expsym_cmds], [2])
8256_LT_TAGDECL([], [module_cmds], [2],
8257    [Commands used to build a loadable module if different from building
8258    a shared archive.])
8259_LT_TAGDECL([], [module_expsym_cmds], [2])
8260_LT_TAGDECL([], [with_gnu_ld], [1],
8261    [Whether we are building with GNU ld or not])
8262_LT_TAGDECL([], [allow_undefined_flag], [1],
8263    [Flag that allows shared libraries with undefined symbols to be built])
8264_LT_TAGDECL([], [no_undefined_flag], [1],
8265    [Flag that enforces no undefined symbols])
8266_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
8267    [Flag to hardcode $libdir into a binary during linking.
8268    This must work even if $libdir does not exist])
8269_LT_TAGDECL([], [hardcode_libdir_separator], [1],
8270    [Whether we need a single "-rpath" flag with a separated argument])
8271_LT_TAGDECL([], [hardcode_direct], [0],
8272    [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
8273    DIR into the resulting binary])
8274_LT_TAGDECL([], [hardcode_direct_absolute], [0],
8275    [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
8276    DIR into the resulting binary and the resulting library dependency is
8277    "absolute", i.e impossible to change by setting $shlibpath_var if the
8278    library is relocated])
8279_LT_TAGDECL([], [hardcode_minus_L], [0],
8280    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
8281    into the resulting binary])
8282_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
8283    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
8284    into the resulting binary])
8285_LT_TAGDECL([], [hardcode_automatic], [0],
8286    [Set to "yes" if building a shared library automatically hardcodes DIR
8287    into the library and all subsequent libraries and executables linked
8288    against it])
8289_LT_TAGDECL([], [inherit_rpath], [0],
8290    [Set to yes if linker adds runtime paths of dependent libraries
8291    to runtime path list])
8292_LT_TAGDECL([], [link_all_deplibs], [0],
8293    [Whether libtool must link a program against all its dependency libraries])
8294_LT_TAGDECL([], [always_export_symbols], [0],
8295    [Set to "yes" if exported symbols are required])
8296_LT_TAGDECL([], [export_symbols_cmds], [2],
8297    [The commands to list exported symbols])
8298_LT_TAGDECL([], [exclude_expsyms], [1],
8299    [Symbols that should not be listed in the preloaded symbols])
8300_LT_TAGDECL([], [include_expsyms], [1],
8301    [Symbols that must always be exported])
8302_LT_TAGDECL([], [prelink_cmds], [2],
8303    [Commands necessary for linking programs (against libraries) with templates])
8304_LT_TAGDECL([], [postlink_cmds], [2],
8305    [Commands necessary for finishing linking programs])
8306_LT_TAGDECL([], [file_list_spec], [1],
8307    [Specify filename containing input files])
8308dnl FIXME: Not yet implemented
8309dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
8310dnl    [Compiler flag to generate thread safe objects])
8311])# _LT_LINKER_SHLIBS
8312
8313
8314# _LT_LANG_C_CONFIG([TAG])
8315# ------------------------
8316# Ensure that the configuration variables for a C compiler are suitably
8317# defined.  These variables are subsequently used by _LT_CONFIG to write
8318# the compiler configuration to 'libtool'.
8319m4_defun([_LT_LANG_C_CONFIG],
8320[m4_require([_LT_DECL_EGREP])dnl
8321lt_save_CC=$CC
8322AC_LANG_PUSH(C)
8323
8324# Source file extension for C test sources.
8325ac_ext=c
8326
8327# Object file extension for compiled C test sources.
8328objext=o
8329_LT_TAGVAR(objext, $1)=$objext
8330
8331# Code to be used in simple compile tests
8332lt_simple_compile_test_code="int some_variable = 0;"
8333
8334# Code to be used in simple link tests
8335lt_simple_link_test_code='int main(){return(0);}'
8336
8337_LT_TAG_COMPILER
8338# Save the default compiler, since it gets overwritten when the other
8339# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
8340compiler_DEFAULT=$CC
8341
8342# save warnings/boilerplate of simple test code
8343_LT_COMPILER_BOILERPLATE
8344_LT_LINKER_BOILERPLATE
8345
8346if test -n "$compiler"; then
8347  _LT_COMPILER_NO_RTTI($1)
8348  _LT_COMPILER_PIC($1)
8349  _LT_COMPILER_C_O($1)
8350  _LT_COMPILER_FILE_LOCKS($1)
8351  _LT_LINKER_SHLIBS($1)
8352  _LT_SYS_DYNAMIC_LINKER($1)
8353  _LT_LINKER_HARDCODE_LIBPATH($1)
8354  LT_SYS_DLOPEN_SELF
8355  _LT_CMD_STRIPLIB
8356
8357  # Report what library types will actually be built
8358  AC_MSG_CHECKING([if libtool supports shared libraries])
8359  AC_MSG_RESULT([$can_build_shared])
8360
8361  AC_MSG_CHECKING([whether to build shared libraries])
8362  test no = "$can_build_shared" && enable_shared=no
8363
8364  # On AIX, shared libraries and static libraries use the same namespace, and
8365  # are all built from PIC.
8366  case $host_os in
8367  aix3*)
8368    test yes = "$enable_shared" && enable_static=no
8369    if test -n "$RANLIB"; then
8370      archive_cmds="$archive_cmds~\$RANLIB \$lib"
8371      postinstall_cmds='$RANLIB $lib'
8372    fi
8373    ;;
8374
8375  aix[[4-9]]*)
8376    if test ia64 != "$host_cpu"; then
8377      case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
8378      yes,aix,yes) ;;			# shared object as lib.so file only
8379      yes,svr4,*) ;;			# shared object as lib.so archive member only
8380      yes,*) enable_static=no ;;	# shared object in lib.a archive as well
8381      esac
8382    fi
8383    ;;
8384  esac
8385  AC_MSG_RESULT([$enable_shared])
8386
8387  AC_MSG_CHECKING([whether to build static libraries])
8388  # Make sure either enable_shared or enable_static is yes.
8389  test yes = "$enable_shared" || enable_static=yes
8390  AC_MSG_RESULT([$enable_static])
8391
8392  _LT_CONFIG($1)
8393fi
8394AC_LANG_POP
8395CC=$lt_save_CC
8396])# _LT_LANG_C_CONFIG
8397
8398
8399# _LT_LANG_CXX_CONFIG([TAG])
8400# --------------------------
8401# Ensure that the configuration variables for a C++ compiler are suitably
8402# defined.  These variables are subsequently used by _LT_CONFIG to write
8403# the compiler configuration to 'libtool'.
8404m4_defun([_LT_LANG_CXX_CONFIG],
8405[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
8406m4_require([_LT_DECL_EGREP])dnl
8407m4_require([_LT_PATH_MANIFEST_TOOL])dnl
8408if test -n "$CXX" && ( test no != "$CXX" &&
8409    ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
8410    (test g++ != "$CXX"))); then
8411  AC_PROG_CXXCPP
8412else
8413  _lt_caught_CXX_error=yes
8414fi
8415
8416AC_LANG_PUSH(C++)
8417_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8418_LT_TAGVAR(allow_undefined_flag, $1)=
8419_LT_TAGVAR(always_export_symbols, $1)=no
8420_LT_TAGVAR(archive_expsym_cmds, $1)=
8421_LT_TAGVAR(compiler_needs_object, $1)=no
8422_LT_TAGVAR(export_dynamic_flag_spec, $1)=
8423_LT_TAGVAR(hardcode_direct, $1)=no
8424_LT_TAGVAR(hardcode_direct_absolute, $1)=no
8425_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8426_LT_TAGVAR(hardcode_libdir_separator, $1)=
8427_LT_TAGVAR(hardcode_minus_L, $1)=no
8428_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
8429_LT_TAGVAR(hardcode_automatic, $1)=no
8430_LT_TAGVAR(inherit_rpath, $1)=no
8431_LT_TAGVAR(module_cmds, $1)=
8432_LT_TAGVAR(module_expsym_cmds, $1)=
8433_LT_TAGVAR(link_all_deplibs, $1)=unknown
8434_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8435_LT_TAGVAR(reload_flag, $1)=$reload_flag
8436_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8437_LT_TAGVAR(no_undefined_flag, $1)=
8438_LT_TAGVAR(whole_archive_flag_spec, $1)=
8439_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8440
8441# Source file extension for C++ test sources.
8442ac_ext=cpp
8443
8444# Object file extension for compiled C++ test sources.
8445objext=o
8446_LT_TAGVAR(objext, $1)=$objext
8447
8448# No sense in running all these tests if we already determined that
8449# the CXX compiler isn't working.  Some variables (like enable_shared)
8450# are currently assumed to apply to all compilers on this platform,
8451# and will be corrupted by setting them based on a non-working compiler.
8452if test yes != "$_lt_caught_CXX_error"; then
8453  # Code to be used in simple compile tests
8454  lt_simple_compile_test_code="int some_variable = 0;"
8455
8456  # Code to be used in simple link tests
8457  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
8458
8459  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8460  _LT_TAG_COMPILER
8461
8462  # save warnings/boilerplate of simple test code
8463  _LT_COMPILER_BOILERPLATE
8464  _LT_LINKER_BOILERPLATE
8465
8466  # Allow CC to be a program name with arguments.
8467  lt_save_CC=$CC
8468  lt_save_CFLAGS=$CFLAGS
8469  lt_save_LD=$LD
8470  lt_save_GCC=$GCC
8471  GCC=$GXX
8472  lt_save_with_gnu_ld=$with_gnu_ld
8473  lt_save_path_LD=$lt_cv_path_LD
8474  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
8475    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
8476  else
8477    $as_unset lt_cv_prog_gnu_ld
8478  fi
8479  if test -n "${lt_cv_path_LDCXX+set}"; then
8480    lt_cv_path_LD=$lt_cv_path_LDCXX
8481  else
8482    $as_unset lt_cv_path_LD
8483  fi
8484  test -z "${LDCXX+set}" || LD=$LDCXX
8485  CC=${CXX-"c++"}
8486  CFLAGS=$CXXFLAGS
8487  compiler=$CC
8488  _LT_TAGVAR(compiler, $1)=$CC
8489  _LT_CC_BASENAME([$compiler])
8490
8491  if test -n "$compiler"; then
8492    # We don't want -fno-exception when compiling C++ code, so set the
8493    # no_builtin_flag separately
8494    if test yes = "$GXX"; then
8495      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
8496    else
8497      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
8498    fi
8499
8500    if test yes = "$GXX"; then
8501      # Set up default GNU C++ configuration
8502
8503      LT_PATH_LD
8504
8505      # Check if GNU C++ uses GNU ld as the underlying linker, since the
8506      # archiving commands below assume that GNU ld is being used.
8507      if test yes = "$with_gnu_ld"; then
8508        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
8509        _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'
8510
8511        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
8512        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
8513
8514        # If archive_cmds runs LD, not CC, wlarc should be empty
8515        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
8516        #     investigate it a little bit more. (MM)
8517        wlarc='$wl'
8518
8519        # ancient GNU ld didn't support --whole-archive et. al.
8520        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
8521	  $GREP 'no-whole-archive' > /dev/null; then
8522          _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
8523        else
8524          _LT_TAGVAR(whole_archive_flag_spec, $1)=
8525        fi
8526      else
8527        with_gnu_ld=no
8528        wlarc=
8529
8530        # A generic and very simple default shared library creation
8531        # command for GNU C++ for the case where it uses the native
8532        # linker, instead of GNU ld.  If possible, this setting should
8533        # overridden to take advantage of the native linker features on
8534        # the platform it is being used on.
8535        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
8536      fi
8537
8538      # Commands to make compiler produce verbose output that lists
8539      # what "hidden" libraries, object files and flags are used when
8540      # linking a shared library.
8541      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
8542
8543    else
8544      GXX=no
8545      with_gnu_ld=no
8546      wlarc=
8547    fi
8548
8549    # PORTME: fill in a description of your system's C++ link characteristics
8550    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
8551    _LT_TAGVAR(ld_shlibs, $1)=yes
8552    case $host_os in
8553      aix3*)
8554        # FIXME: insert proper C++ library support
8555        _LT_TAGVAR(ld_shlibs, $1)=no
8556        ;;
8557      aix[[4-9]]*)
8558        if test ia64 = "$host_cpu"; then
8559          # On IA64, the linker does run time linking by default, so we don't
8560          # have to do anything special.
8561          aix_use_runtimelinking=no
8562          exp_sym_flag='-Bexport'
8563          no_entry_flag=
8564        else
8565          aix_use_runtimelinking=no
8566
8567          # Test if we are trying to use run time linking or normal
8568          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
8569          # have runtime linking enabled, and use it for executables.
8570          # For shared libraries, we enable/disable runtime linking
8571          # depending on the kind of the shared library created -
8572          # when "with_aix_soname,aix_use_runtimelinking" is:
8573          # "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
8574          # "aix,yes"  lib.so          shared, rtl:yes, for executables
8575          #            lib.a           static archive
8576          # "both,no"  lib.so.V(shr.o) shared, rtl:yes
8577          #            lib.a(lib.so.V) shared, rtl:no,  for executables
8578          # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
8579          #            lib.a(lib.so.V) shared, rtl:no
8580          # "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
8581          #            lib.a           static archive
8582          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
8583	    for ld_flag in $LDFLAGS; do
8584	      case $ld_flag in
8585	      *-brtl*)
8586	        aix_use_runtimelinking=yes
8587	        break
8588	        ;;
8589	      esac
8590	    done
8591	    if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
8592	      # With aix-soname=svr4, we create the lib.so.V shared archives only,
8593	      # so we don't have lib.a shared libs to link our executables.
8594	      # We have to force runtime linking in this case.
8595	      aix_use_runtimelinking=yes
8596	      LDFLAGS="$LDFLAGS -Wl,-brtl"
8597	    fi
8598	    ;;
8599          esac
8600
8601          exp_sym_flag='-bexport'
8602          no_entry_flag='-bnoentry'
8603        fi
8604
8605        # When large executables or shared objects are built, AIX ld can
8606        # have problems creating the table of contents.  If linking a library
8607        # or program results in "error TOC overflow" add -mminimal-toc to
8608        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
8609        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
8610
8611        _LT_TAGVAR(archive_cmds, $1)=''
8612        _LT_TAGVAR(hardcode_direct, $1)=yes
8613        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
8614        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
8615        _LT_TAGVAR(link_all_deplibs, $1)=yes
8616        _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
8617        case $with_aix_soname,$aix_use_runtimelinking in
8618        aix,*) ;;	# no import file
8619        svr4,* | *,yes) # use import file
8620          # The Import File defines what to hardcode.
8621          _LT_TAGVAR(hardcode_direct, $1)=no
8622          _LT_TAGVAR(hardcode_direct_absolute, $1)=no
8623          ;;
8624        esac
8625
8626        if test yes = "$GXX"; then
8627          case $host_os in aix4.[[012]]|aix4.[[012]].*)
8628          # We only want to do this on AIX 4.2 and lower, the check
8629          # below for broken collect2 doesn't work under 4.3+
8630	  collect2name=`$CC -print-prog-name=collect2`
8631	  if test -f "$collect2name" &&
8632	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
8633	  then
8634	    # We have reworked collect2
8635	    :
8636	  else
8637	    # We have old collect2
8638	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
8639	    # It fails to find uninstalled libraries when the uninstalled
8640	    # path is not listed in the libpath.  Setting hardcode_minus_L
8641	    # to unsupported forces relinking
8642	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
8643	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8644	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
8645	  fi
8646          esac
8647          shared_flag='-shared'
8648	  if test yes = "$aix_use_runtimelinking"; then
8649	    shared_flag=$shared_flag' $wl-G'
8650	  fi
8651	  # Need to ensure runtime linking is disabled for the traditional
8652	  # shared library, or the linker may eventually find shared libraries
8653	  # /with/ Import File - we do not want to mix them.
8654	  shared_flag_aix='-shared'
8655	  shared_flag_svr4='-shared $wl-G'
8656        else
8657          # not using gcc
8658          if test ia64 = "$host_cpu"; then
8659	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
8660	  # chokes on -Wl,-G. The following line is correct:
8661	  shared_flag='-G'
8662          else
8663	    if test yes = "$aix_use_runtimelinking"; then
8664	      shared_flag='$wl-G'
8665	    else
8666	      shared_flag='$wl-bM:SRE'
8667	    fi
8668	    shared_flag_aix='$wl-bM:SRE'
8669	    shared_flag_svr4='$wl-G'
8670          fi
8671        fi
8672
8673        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
8674        # It seems that -bexpall does not export symbols beginning with
8675        # underscore (_), so it is better to generate a list of symbols to
8676	# export.
8677        _LT_TAGVAR(always_export_symbols, $1)=yes
8678	if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
8679          # Warning - without using the other runtime loading flags (-brtl),
8680          # -berok will link without error, but may produce a broken library.
8681          # The "-G" linker flag allows undefined symbols.
8682          _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
8683          # Determine the default libpath from the value encoded in an empty
8684          # executable.
8685          _LT_SYS_MODULE_PATH_AIX([$1])
8686          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
8687
8688          _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
8689        else
8690          if test ia64 = "$host_cpu"; then
8691	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
8692	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
8693	    _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"
8694          else
8695	    # Determine the default libpath from the value encoded in an
8696	    # empty executable.
8697	    _LT_SYS_MODULE_PATH_AIX([$1])
8698	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
8699	    # Warning - without using the other run time loading flags,
8700	    # -berok will link without error, but may produce a broken library.
8701	    _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
8702	    _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
8703	    if test yes = "$with_gnu_ld"; then
8704	      # We only use this code for GNU lds that support --whole-archive.
8705	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
8706	    else
8707	      # Exported symbols can be pulled into shared objects from archives
8708	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
8709	    fi
8710	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
8711	    _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
8712	    # -brtl affects multiple linker settings, -berok does not and is overridden later
8713	    compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
8714	    if test svr4 != "$with_aix_soname"; then
8715	      # This is similar to how AIX traditionally builds its shared
8716	      # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
8717	      _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'
8718	    fi
8719	    if test aix != "$with_aix_soname"; then
8720	      _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'
8721	    else
8722	      # used by -dlpreopen to get the symbols
8723	      _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
8724	    fi
8725	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
8726          fi
8727        fi
8728        ;;
8729
8730      beos*)
8731	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
8732	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
8733	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
8734	  # support --undefined.  This deserves some investigation.  FIXME
8735	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
8736	else
8737	  _LT_TAGVAR(ld_shlibs, $1)=no
8738	fi
8739	;;
8740
8741      chorus*)
8742        case $cc_basename in
8743          *)
8744	  # FIXME: insert proper C++ library support
8745	  _LT_TAGVAR(ld_shlibs, $1)=no
8746	  ;;
8747        esac
8748        ;;
8749
8750      cygwin* | mingw* | pw32* | cegcc*)
8751	case $GXX,$cc_basename in
8752	,cl* | no,cl* | ,icl* | no,icl*)
8753	  # Native MSVC or ICC
8754	  # hardcode_libdir_flag_spec is actually meaningless, as there is
8755	  # no search path for DLLs.
8756	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
8757	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
8758	  _LT_TAGVAR(always_export_symbols, $1)=yes
8759	  _LT_TAGVAR(file_list_spec, $1)='@'
8760	  # Tell ltmain to make .lib files, not .a files.
8761	  libext=lib
8762	  # Tell ltmain to make .dll files, not .so files.
8763	  shrext_cmds=.dll
8764	  # FIXME: Setting linknames here is a bad hack.
8765	  _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
8766	  _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
8767              cp "$export_symbols" "$output_objdir/$soname.def";
8768              echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
8769            else
8770              $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
8771            fi~
8772            $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
8773            linknames='
8774	  # The linker will not automatically build a static lib if we build a DLL.
8775	  # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
8776	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
8777	  # Don't use ranlib
8778	  _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
8779	  _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
8780            lt_tool_outputfile="@TOOL_OUTPUT@"~
8781            case $lt_outputfile in
8782              *.exe|*.EXE) ;;
8783              *)
8784                lt_outputfile=$lt_outputfile.exe
8785                lt_tool_outputfile=$lt_tool_outputfile.exe
8786                ;;
8787            esac~
8788            func_to_tool_file "$lt_outputfile"~
8789            if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
8790              $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
8791              $RM "$lt_outputfile.manifest";
8792            fi'
8793	  ;;
8794	*)
8795	  # g++
8796	  # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
8797	  # as there is no search path for DLLs.
8798	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8799	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
8800	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
8801	  _LT_TAGVAR(always_export_symbols, $1)=no
8802	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
8803
8804	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
8805	    _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'
8806	    # If the export-symbols file already is a .def file, use it as
8807	    # is; otherwise, prepend EXPORTS...
8808	    _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
8809              cp $export_symbols $output_objdir/$soname.def;
8810            else
8811              echo EXPORTS > $output_objdir/$soname.def;
8812              cat $export_symbols >> $output_objdir/$soname.def;
8813            fi~
8814            $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'
8815	  else
8816	    _LT_TAGVAR(ld_shlibs, $1)=no
8817	  fi
8818	  ;;
8819	esac
8820	;;
8821      darwin* | rhapsody*)
8822        _LT_DARWIN_LINKER_FEATURES($1)
8823	;;
8824
8825      os2*)
8826	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8827	_LT_TAGVAR(hardcode_minus_L, $1)=yes
8828	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
8829	shrext_cmds=.dll
8830	_LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
8831	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
8832	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
8833	  $ECHO EXPORTS >> $output_objdir/$libname.def~
8834	  emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
8835	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
8836	  emximp -o $lib $output_objdir/$libname.def'
8837	_LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
8838	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
8839	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
8840	  $ECHO EXPORTS >> $output_objdir/$libname.def~
8841	  prefix_cmds="$SED"~
8842	  if test EXPORTS = "`$SED 1q $export_symbols`"; then
8843	    prefix_cmds="$prefix_cmds -e 1d";
8844	  fi~
8845	  prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
8846	  cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
8847	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
8848	  emximp -o $lib $output_objdir/$libname.def'
8849	_LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
8850	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
8851	_LT_TAGVAR(file_list_spec, $1)='@'
8852	;;
8853
8854      dgux*)
8855        case $cc_basename in
8856          ec++*)
8857	    # FIXME: insert proper C++ library support
8858	    _LT_TAGVAR(ld_shlibs, $1)=no
8859	    ;;
8860          ghcx*)
8861	    # Green Hills C++ Compiler
8862	    # FIXME: insert proper C++ library support
8863	    _LT_TAGVAR(ld_shlibs, $1)=no
8864	    ;;
8865          *)
8866	    # FIXME: insert proper C++ library support
8867	    _LT_TAGVAR(ld_shlibs, $1)=no
8868	    ;;
8869        esac
8870        ;;
8871
8872      freebsd2.*)
8873        # C++ shared libraries reported to be fairly broken before
8874	# switch to ELF
8875        _LT_TAGVAR(ld_shlibs, $1)=no
8876        ;;
8877
8878      freebsd-elf*)
8879        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8880        ;;
8881
8882      freebsd* | dragonfly*)
8883        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
8884        # conventions
8885        _LT_TAGVAR(ld_shlibs, $1)=yes
8886        ;;
8887
8888      haiku*)
8889        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
8890        _LT_TAGVAR(link_all_deplibs, $1)=yes
8891        ;;
8892
8893      hpux9*)
8894        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
8895        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8896        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
8897        _LT_TAGVAR(hardcode_direct, $1)=yes
8898        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
8899				             # but as the default
8900				             # location of the library.
8901
8902        case $cc_basename in
8903          CC*)
8904            # FIXME: insert proper C++ library support
8905            _LT_TAGVAR(ld_shlibs, $1)=no
8906            ;;
8907          aCC*)
8908            _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'
8909            # Commands to make compiler produce verbose output that lists
8910            # what "hidden" libraries, object files and flags are used when
8911            # linking a shared library.
8912            #
8913            # There doesn't appear to be a way to prevent this compiler from
8914            # explicitly linking system object files so we need to strip them
8915            # from the output so that they don't get included in the library
8916            # dependencies.
8917            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"'
8918            ;;
8919          *)
8920            if test yes = "$GXX"; then
8921              _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'
8922            else
8923              # FIXME: insert proper C++ library support
8924              _LT_TAGVAR(ld_shlibs, $1)=no
8925            fi
8926            ;;
8927        esac
8928        ;;
8929
8930      hpux10*|hpux11*)
8931        if test no = "$with_gnu_ld"; then
8932	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
8933	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8934
8935          case $host_cpu in
8936            hppa*64*|ia64*)
8937              ;;
8938            *)
8939	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
8940              ;;
8941          esac
8942        fi
8943        case $host_cpu in
8944          hppa*64*|ia64*)
8945            _LT_TAGVAR(hardcode_direct, $1)=no
8946            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8947            ;;
8948          *)
8949            _LT_TAGVAR(hardcode_direct, $1)=yes
8950            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
8951            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
8952					         # but as the default
8953					         # location of the library.
8954            ;;
8955        esac
8956
8957        case $cc_basename in
8958          CC*)
8959	    # FIXME: insert proper C++ library support
8960	    _LT_TAGVAR(ld_shlibs, $1)=no
8961	    ;;
8962          aCC*)
8963	    case $host_cpu in
8964	      hppa*64*)
8965	        _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8966	        ;;
8967	      ia64*)
8968	        _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8969	        ;;
8970	      *)
8971	        _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'
8972	        ;;
8973	    esac
8974	    # Commands to make compiler produce verbose output that lists
8975	    # what "hidden" libraries, object files and flags are used when
8976	    # linking a shared library.
8977	    #
8978	    # There doesn't appear to be a way to prevent this compiler from
8979	    # explicitly linking system object files so we need to strip them
8980	    # from the output so that they don't get included in the library
8981	    # dependencies.
8982	    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"'
8983	    ;;
8984          *)
8985	    if test yes = "$GXX"; then
8986	      if test no = "$with_gnu_ld"; then
8987	        case $host_cpu in
8988	          hppa*64*)
8989	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8990	            ;;
8991	          ia64*)
8992	            _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'
8993	            ;;
8994	          *)
8995	            _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'
8996	            ;;
8997	        esac
8998	      fi
8999	    else
9000	      # FIXME: insert proper C++ library support
9001	      _LT_TAGVAR(ld_shlibs, $1)=no
9002	    fi
9003	    ;;
9004        esac
9005        ;;
9006
9007      interix[[3-9]]*)
9008	_LT_TAGVAR(hardcode_direct, $1)=no
9009	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9010	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
9011	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
9012	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
9013	# Instead, shared libraries are loaded at an image base (0x10000000 by
9014	# default) and relocated if they conflict, which is a slow very memory
9015	# consuming and fragmenting process.  To avoid this, we pick a random,
9016	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
9017	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
9018	_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'
9019	_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'
9020	;;
9021      irix5* | irix6*)
9022        case $cc_basename in
9023          CC*)
9024	    # SGI C++
9025	    _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'
9026
9027	    # Archives containing C++ object files must be created using
9028	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
9029	    # necessary to make sure instantiated templates are included
9030	    # in the archive.
9031	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
9032	    ;;
9033          *)
9034	    if test yes = "$GXX"; then
9035	      if test no = "$with_gnu_ld"; then
9036	        _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'
9037	      else
9038	        _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'
9039	      fi
9040	    fi
9041	    _LT_TAGVAR(link_all_deplibs, $1)=yes
9042	    ;;
9043        esac
9044        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
9045        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
9046        _LT_TAGVAR(inherit_rpath, $1)=yes
9047        ;;
9048
9049      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
9050        case $cc_basename in
9051          KCC*)
9052	    # Kuck and Associates, Inc. (KAI) C++ Compiler
9053
9054	    # KCC will only create a shared library if the output file
9055	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
9056	    # to its proper name (with version) after linking.
9057	    _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'
9058	    _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'
9059	    # Commands to make compiler produce verbose output that lists
9060	    # what "hidden" libraries, object files and flags are used when
9061	    # linking a shared library.
9062	    #
9063	    # There doesn't appear to be a way to prevent this compiler from
9064	    # explicitly linking system object files so we need to strip them
9065	    # from the output so that they don't get included in the library
9066	    # dependencies.
9067	    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"'
9068
9069	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
9070	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
9071
9072	    # Archives containing C++ object files must be created using
9073	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
9074	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
9075	    ;;
9076	  icpc* | ecpc* )
9077	    # Intel C++
9078	    with_gnu_ld=yes
9079	    # version 8.0 and above of icpc choke on multiply defined symbols
9080	    # if we add $predep_objects and $postdep_objects, however 7.1 and
9081	    # earlier do not add the objects themselves.
9082	    case `$CC -V 2>&1` in
9083	      *"Version 7."*)
9084	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
9085		_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'
9086		;;
9087	      *)  # Version 8.0 or newer
9088	        tmp_idyn=
9089	        case $host_cpu in
9090		  ia64*) tmp_idyn=' -i_dynamic';;
9091		esac
9092	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
9093		_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'
9094		;;
9095	    esac
9096	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
9097	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
9098	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
9099	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
9100	    ;;
9101          pgCC* | pgcpp*)
9102            # Portland Group C++ compiler
9103	    case `$CC -V` in
9104	    *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
9105	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
9106               rm -rf $tpldir~
9107               $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
9108               compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
9109	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
9110                rm -rf $tpldir~
9111                $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
9112                $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
9113                $RANLIB $oldlib'
9114	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
9115                rm -rf $tpldir~
9116                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
9117                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
9118	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
9119                rm -rf $tpldir~
9120                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
9121                $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'
9122	      ;;
9123	    *) # Version 6 and above use weak symbols
9124	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
9125	      _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'
9126	      ;;
9127	    esac
9128
9129	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
9130	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
9131	    _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'
9132            ;;
9133	  cxx*)
9134	    # Compaq C++
9135	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
9136	    _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'
9137
9138	    runpath_var=LD_RUN_PATH
9139	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
9140	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
9141
9142	    # Commands to make compiler produce verbose output that lists
9143	    # what "hidden" libraries, object files and flags are used when
9144	    # linking a shared library.
9145	    #
9146	    # There doesn't appear to be a way to prevent this compiler from
9147	    # explicitly linking system object files so we need to strip them
9148	    # from the output so that they don't get included in the library
9149	    # dependencies.
9150	    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'
9151	    ;;
9152	  xl* | mpixl* | bgxl*)
9153	    # IBM XL 8.0 on PPC, with GNU ld
9154	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
9155	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
9156	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
9157	    if test yes = "$supports_anon_versioning"; then
9158	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
9159                cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
9160                echo "local: *; };" >> $output_objdir/$libname.ver~
9161                $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
9162	    fi
9163	    ;;
9164	  *)
9165	    case `$CC -V 2>&1 | sed 5q` in
9166	    *Sun\ C*)
9167	      # Sun C++ 5.9
9168	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
9169	      _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
9170	      _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'
9171	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
9172	      _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'
9173	      _LT_TAGVAR(compiler_needs_object, $1)=yes
9174
9175	      # Not sure whether something based on
9176	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
9177	      # would be better.
9178	      output_verbose_link_cmd='func_echo_all'
9179
9180	      # Archives containing C++ object files must be created using
9181	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
9182	      # necessary to make sure instantiated templates are included
9183	      # in the archive.
9184	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
9185	      ;;
9186	    esac
9187	    ;;
9188	esac
9189	;;
9190
9191      lynxos*)
9192        # FIXME: insert proper C++ library support
9193	_LT_TAGVAR(ld_shlibs, $1)=no
9194	;;
9195
9196      m88k*)
9197        # FIXME: insert proper C++ library support
9198        _LT_TAGVAR(ld_shlibs, $1)=no
9199	;;
9200
9201      mvs*)
9202        case $cc_basename in
9203          cxx*)
9204	    # FIXME: insert proper C++ library support
9205	    _LT_TAGVAR(ld_shlibs, $1)=no
9206	    ;;
9207	  *)
9208	    # FIXME: insert proper C++ library support
9209	    _LT_TAGVAR(ld_shlibs, $1)=no
9210	    ;;
9211	esac
9212	;;
9213
9214      netbsd*)
9215        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
9216	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
9217	  wlarc=
9218	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
9219	  _LT_TAGVAR(hardcode_direct, $1)=yes
9220	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9221	fi
9222	# Workaround some broken pre-1.5 toolchains
9223	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
9224	;;
9225
9226      *nto* | *qnx*)
9227        _LT_TAGVAR(ld_shlibs, $1)=yes
9228	;;
9229
9230      openbsd* | bitrig*)
9231	if test -f /usr/libexec/ld.so; then
9232	  _LT_TAGVAR(hardcode_direct, $1)=yes
9233	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9234	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
9235	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
9236	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
9237	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
9238	    _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'
9239	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
9240	    _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
9241	  fi
9242	  output_verbose_link_cmd=func_echo_all
9243	else
9244	  _LT_TAGVAR(ld_shlibs, $1)=no
9245	fi
9246	;;
9247
9248      osf3* | osf4* | osf5*)
9249        case $cc_basename in
9250          KCC*)
9251	    # Kuck and Associates, Inc. (KAI) C++ Compiler
9252
9253	    # KCC will only create a shared library if the output file
9254	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
9255	    # to its proper name (with version) after linking.
9256	    _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'
9257
9258	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
9259	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
9260
9261	    # Archives containing C++ object files must be created using
9262	    # the KAI C++ compiler.
9263	    case $host in
9264	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
9265	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
9266	    esac
9267	    ;;
9268          RCC*)
9269	    # Rational C++ 2.4.1
9270	    # FIXME: insert proper C++ library support
9271	    _LT_TAGVAR(ld_shlibs, $1)=no
9272	    ;;
9273          cxx*)
9274	    case $host in
9275	      osf3*)
9276	        _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
9277	        _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'
9278	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
9279		;;
9280	      *)
9281	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
9282	        _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'
9283	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
9284                  echo "-hidden">> $lib.exp~
9285                  $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~
9286                  $RM $lib.exp'
9287	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
9288		;;
9289	    esac
9290
9291	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
9292
9293	    # Commands to make compiler produce verbose output that lists
9294	    # what "hidden" libraries, object files and flags are used when
9295	    # linking a shared library.
9296	    #
9297	    # There doesn't appear to be a way to prevent this compiler from
9298	    # explicitly linking system object files so we need to strip them
9299	    # from the output so that they don't get included in the library
9300	    # dependencies.
9301	    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"'
9302	    ;;
9303	  *)
9304	    if test yes,no = "$GXX,$with_gnu_ld"; then
9305	      _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
9306	      case $host in
9307	        osf3*)
9308	          _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'
9309		  ;;
9310	        *)
9311	          _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'
9312		  ;;
9313	      esac
9314
9315	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
9316	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
9317
9318	      # Commands to make compiler produce verbose output that lists
9319	      # what "hidden" libraries, object files and flags are used when
9320	      # linking a shared library.
9321	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
9322
9323	    else
9324	      # FIXME: insert proper C++ library support
9325	      _LT_TAGVAR(ld_shlibs, $1)=no
9326	    fi
9327	    ;;
9328        esac
9329        ;;
9330
9331      psos*)
9332        # FIXME: insert proper C++ library support
9333        _LT_TAGVAR(ld_shlibs, $1)=no
9334        ;;
9335
9336      sunos4*)
9337        case $cc_basename in
9338          CC*)
9339	    # Sun C++ 4.x
9340	    # FIXME: insert proper C++ library support
9341	    _LT_TAGVAR(ld_shlibs, $1)=no
9342	    ;;
9343          lcc*)
9344	    # Lucid
9345	    # FIXME: insert proper C++ library support
9346	    _LT_TAGVAR(ld_shlibs, $1)=no
9347	    ;;
9348          *)
9349	    # FIXME: insert proper C++ library support
9350	    _LT_TAGVAR(ld_shlibs, $1)=no
9351	    ;;
9352        esac
9353        ;;
9354
9355      solaris*)
9356        case $cc_basename in
9357          CC* | sunCC*)
9358	    # Sun C++ 4.2, 5.x and Centerline C++
9359            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
9360	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
9361	    _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
9362	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
9363              $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'
9364
9365	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
9366	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9367	    case $host_os in
9368	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
9369	      *)
9370		# The compiler driver will combine and reorder linker options,
9371		# but understands '-z linker_flag'.
9372	        # Supported since Solaris 2.6 (maybe 2.5.1?)
9373		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
9374	        ;;
9375	    esac
9376	    _LT_TAGVAR(link_all_deplibs, $1)=yes
9377
9378	    output_verbose_link_cmd='func_echo_all'
9379
9380	    # Archives containing C++ object files must be created using
9381	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
9382	    # necessary to make sure instantiated templates are included
9383	    # in the archive.
9384	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
9385	    ;;
9386          gcx*)
9387	    # Green Hills C++ Compiler
9388	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
9389
9390	    # The C++ compiler must be used to create the archive.
9391	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
9392	    ;;
9393          *)
9394	    # GNU C++ compiler with Solaris linker
9395	    if test yes,no = "$GXX,$with_gnu_ld"; then
9396	      _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
9397	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
9398	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
9399	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
9400                  $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'
9401
9402	        # Commands to make compiler produce verbose output that lists
9403	        # what "hidden" libraries, object files and flags are used when
9404	        # linking a shared library.
9405	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
9406	      else
9407	        # g++ 2.7 appears to require '-G' NOT '-shared' on this
9408	        # platform.
9409	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
9410	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
9411                  $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'
9412
9413	        # Commands to make compiler produce verbose output that lists
9414	        # what "hidden" libraries, object files and flags are used when
9415	        # linking a shared library.
9416	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
9417	      fi
9418
9419	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
9420	      case $host_os in
9421		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
9422		*)
9423		  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
9424		  ;;
9425	      esac
9426	    fi
9427	    ;;
9428        esac
9429        ;;
9430
9431    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
9432      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
9433      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
9434      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9435      runpath_var='LD_RUN_PATH'
9436
9437      case $cc_basename in
9438        CC*)
9439	  _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9440	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9441	  ;;
9442	*)
9443	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9444	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9445	  ;;
9446      esac
9447      ;;
9448
9449      sysv5* | sco3.2v5* | sco5v6*)
9450	# Note: We CANNOT use -z defs as we might desire, because we do not
9451	# link with -lc, and that would cause any symbols used from libc to
9452	# always be unresolved, which means just about no library would
9453	# ever link correctly.  If we're not using GNU ld we use -z text
9454	# though, which does catch some bad symbols but isn't as heavy-handed
9455	# as -z defs.
9456	_LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
9457	_LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
9458	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
9459	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9460	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
9461	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
9462	_LT_TAGVAR(link_all_deplibs, $1)=yes
9463	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
9464	runpath_var='LD_RUN_PATH'
9465
9466	case $cc_basename in
9467          CC*)
9468	    _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9469	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9470	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
9471              '"$_LT_TAGVAR(old_archive_cmds, $1)"
9472	    _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
9473              '"$_LT_TAGVAR(reload_cmds, $1)"
9474	    ;;
9475	  *)
9476	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9477	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9478	    ;;
9479	esac
9480      ;;
9481
9482      tandem*)
9483        case $cc_basename in
9484          NCC*)
9485	    # NonStop-UX NCC 3.20
9486	    # FIXME: insert proper C++ library support
9487	    _LT_TAGVAR(ld_shlibs, $1)=no
9488	    ;;
9489          *)
9490	    # FIXME: insert proper C++ library support
9491	    _LT_TAGVAR(ld_shlibs, $1)=no
9492	    ;;
9493        esac
9494        ;;
9495
9496      vxworks*)
9497        # FIXME: insert proper C++ library support
9498        _LT_TAGVAR(ld_shlibs, $1)=no
9499        ;;
9500
9501      *)
9502        # FIXME: insert proper C++ library support
9503        _LT_TAGVAR(ld_shlibs, $1)=no
9504        ;;
9505    esac
9506
9507    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
9508    test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
9509
9510    _LT_TAGVAR(GCC, $1)=$GXX
9511    _LT_TAGVAR(LD, $1)=$LD
9512
9513    ## CAVEAT EMPTOR:
9514    ## There is no encapsulation within the following macros, do not change
9515    ## the running order or otherwise move them around unless you know exactly
9516    ## what you are doing...
9517    _LT_SYS_HIDDEN_LIBDEPS($1)
9518    _LT_COMPILER_PIC($1)
9519    _LT_COMPILER_C_O($1)
9520    _LT_COMPILER_FILE_LOCKS($1)
9521    _LT_LINKER_SHLIBS($1)
9522    _LT_SYS_DYNAMIC_LINKER($1)
9523    _LT_LINKER_HARDCODE_LIBPATH($1)
9524
9525    _LT_CONFIG($1)
9526  fi # test -n "$compiler"
9527
9528  CC=$lt_save_CC
9529  CFLAGS=$lt_save_CFLAGS
9530  LDCXX=$LD
9531  LD=$lt_save_LD
9532  GCC=$lt_save_GCC
9533  with_gnu_ld=$lt_save_with_gnu_ld
9534  lt_cv_path_LDCXX=$lt_cv_path_LD
9535  lt_cv_path_LD=$lt_save_path_LD
9536  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
9537  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
9538fi # test yes != "$_lt_caught_CXX_error"
9539
9540AC_LANG_POP
9541])# _LT_LANG_CXX_CONFIG
9542
9543
9544# _LT_FUNC_STRIPNAME_CNF
9545# ----------------------
9546# func_stripname_cnf prefix suffix name
9547# strip PREFIX and SUFFIX off of NAME.
9548# PREFIX and SUFFIX must not contain globbing or regex special
9549# characters, hashes, percent signs, but SUFFIX may contain a leading
9550# dot (in which case that matches only a dot).
9551#
9552# This function is identical to the (non-XSI) version of func_stripname,
9553# except this one can be used by m4 code that may be executed by configure,
9554# rather than the libtool script.
9555m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
9556AC_REQUIRE([_LT_DECL_SED])
9557AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
9558func_stripname_cnf ()
9559{
9560  case @S|@2 in
9561  .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
9562  *)  func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
9563  esac
9564} # func_stripname_cnf
9565])# _LT_FUNC_STRIPNAME_CNF
9566
9567
9568# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
9569# ---------------------------------
9570# Figure out "hidden" library dependencies from verbose
9571# compiler output when linking a shared library.
9572# Parse the compiler output and extract the necessary
9573# objects, libraries and library flags.
9574m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
9575[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
9576AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
9577# Dependencies to place before and after the object being linked:
9578_LT_TAGVAR(predep_objects, $1)=
9579_LT_TAGVAR(postdep_objects, $1)=
9580_LT_TAGVAR(predeps, $1)=
9581_LT_TAGVAR(postdeps, $1)=
9582_LT_TAGVAR(compiler_lib_search_path, $1)=
9583
9584dnl we can't use the lt_simple_compile_test_code here,
9585dnl because it contains code intended for an executable,
9586dnl not a library.  It's possible we should let each
9587dnl tag define a new lt_????_link_test_code variable,
9588dnl but it's only used here...
9589m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
9590int a;
9591void foo (void) { a = 0; }
9592_LT_EOF
9593], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
9594class Foo
9595{
9596public:
9597  Foo (void) { a = 0; }
9598private:
9599  int a;
9600};
9601_LT_EOF
9602], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
9603      subroutine foo
9604      implicit none
9605      integer*4 a
9606      a=0
9607      return
9608      end
9609_LT_EOF
9610], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
9611      subroutine foo
9612      implicit none
9613      integer a
9614      a=0
9615      return
9616      end
9617_LT_EOF
9618], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
9619public class foo {
9620  private int a;
9621  public void bar (void) {
9622    a = 0;
9623  }
9624};
9625_LT_EOF
9626], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
9627package foo
9628func foo() {
9629}
9630_LT_EOF
9631])
9632
9633_lt_libdeps_save_CFLAGS=$CFLAGS
9634case "$CC $CFLAGS " in #(
9635*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
9636*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
9637*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
9638esac
9639
9640dnl Parse the compiler output and extract the necessary
9641dnl objects, libraries and library flags.
9642if AC_TRY_EVAL(ac_compile); then
9643  # Parse the compiler output and extract the necessary
9644  # objects, libraries and library flags.
9645
9646  # Sentinel used to keep track of whether or not we are before
9647  # the conftest object file.
9648  pre_test_object_deps_done=no
9649
9650  for p in `eval "$output_verbose_link_cmd"`; do
9651    case $prev$p in
9652
9653    -L* | -R* | -l*)
9654       # Some compilers place space between "-{L,R}" and the path.
9655       # Remove the space.
9656       if test x-L = "$p" ||
9657          test x-R = "$p"; then
9658	 prev=$p
9659	 continue
9660       fi
9661
9662       # Expand the sysroot to ease extracting the directories later.
9663       if test -z "$prev"; then
9664         case $p in
9665         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
9666         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
9667         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
9668         esac
9669       fi
9670       case $p in
9671       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
9672       esac
9673       if test no = "$pre_test_object_deps_done"; then
9674	 case $prev in
9675	 -L | -R)
9676	   # Internal compiler library paths should come after those
9677	   # provided the user.  The postdeps already come after the
9678	   # user supplied libs so there is no need to process them.
9679	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
9680	     _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
9681	   else
9682	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
9683	   fi
9684	   ;;
9685	 # The "-l" case would never come before the object being
9686	 # linked, so don't bother handling this case.
9687	 esac
9688       else
9689	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
9690	   _LT_TAGVAR(postdeps, $1)=$prev$p
9691	 else
9692	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
9693	 fi
9694       fi
9695       prev=
9696       ;;
9697
9698    *.lto.$objext) ;; # Ignore GCC LTO objects
9699    *.$objext)
9700       # This assumes that the test object file only shows up
9701       # once in the compiler output.
9702       if test "$p" = "conftest.$objext"; then
9703	 pre_test_object_deps_done=yes
9704	 continue
9705       fi
9706
9707       if test no = "$pre_test_object_deps_done"; then
9708	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
9709	   _LT_TAGVAR(predep_objects, $1)=$p
9710	 else
9711	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
9712	 fi
9713       else
9714	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
9715	   _LT_TAGVAR(postdep_objects, $1)=$p
9716	 else
9717	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
9718	 fi
9719       fi
9720       ;;
9721
9722    *) ;; # Ignore the rest.
9723
9724    esac
9725  done
9726
9727  # Clean up.
9728  rm -f a.out a.exe
9729else
9730  echo "libtool.m4: error: problem compiling $1 test program"
9731fi
9732
9733$RM -f confest.$objext
9734CFLAGS=$_lt_libdeps_save_CFLAGS
9735
9736# PORTME: override above test on systems where it is broken
9737m4_if([$1], [CXX],
9738[case $host_os in
9739interix[[3-9]]*)
9740  # Interix 3.5 installs completely hosed .la files for C++, so rather than
9741  # hack all around it, let's just trust "g++" to DTRT.
9742  _LT_TAGVAR(predep_objects,$1)=
9743  _LT_TAGVAR(postdep_objects,$1)=
9744  _LT_TAGVAR(postdeps,$1)=
9745  ;;
9746esac
9747])
9748
9749case " $_LT_TAGVAR(postdeps, $1) " in
9750*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
9751esac
9752 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
9753if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
9754 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
9755fi
9756_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
9757    [The directories searched by this compiler when creating a shared library])
9758_LT_TAGDECL([], [predep_objects], [1],
9759    [Dependencies to place before and after the objects being linked to
9760    create a shared library])
9761_LT_TAGDECL([], [postdep_objects], [1])
9762_LT_TAGDECL([], [predeps], [1])
9763_LT_TAGDECL([], [postdeps], [1])
9764_LT_TAGDECL([], [compiler_lib_search_path], [1],
9765    [The library search path used internally by the compiler when linking
9766    a shared library])
9767])# _LT_SYS_HIDDEN_LIBDEPS
9768
9769
9770# _LT_LANG_F77_CONFIG([TAG])
9771# --------------------------
9772# Ensure that the configuration variables for a Fortran 77 compiler are
9773# suitably defined.  These variables are subsequently used by _LT_CONFIG
9774# to write the compiler configuration to 'libtool'.
9775m4_defun([_LT_LANG_F77_CONFIG],
9776[AC_LANG_PUSH(Fortran 77)
9777if test -z "$F77" || test no = "$F77"; then
9778  _lt_disable_F77=yes
9779fi
9780
9781_LT_TAGVAR(archive_cmds_need_lc, $1)=no
9782_LT_TAGVAR(allow_undefined_flag, $1)=
9783_LT_TAGVAR(always_export_symbols, $1)=no
9784_LT_TAGVAR(archive_expsym_cmds, $1)=
9785_LT_TAGVAR(export_dynamic_flag_spec, $1)=
9786_LT_TAGVAR(hardcode_direct, $1)=no
9787_LT_TAGVAR(hardcode_direct_absolute, $1)=no
9788_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
9789_LT_TAGVAR(hardcode_libdir_separator, $1)=
9790_LT_TAGVAR(hardcode_minus_L, $1)=no
9791_LT_TAGVAR(hardcode_automatic, $1)=no
9792_LT_TAGVAR(inherit_rpath, $1)=no
9793_LT_TAGVAR(module_cmds, $1)=
9794_LT_TAGVAR(module_expsym_cmds, $1)=
9795_LT_TAGVAR(link_all_deplibs, $1)=unknown
9796_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
9797_LT_TAGVAR(reload_flag, $1)=$reload_flag
9798_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
9799_LT_TAGVAR(no_undefined_flag, $1)=
9800_LT_TAGVAR(whole_archive_flag_spec, $1)=
9801_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
9802
9803# Source file extension for f77 test sources.
9804ac_ext=f
9805
9806# Object file extension for compiled f77 test sources.
9807objext=o
9808_LT_TAGVAR(objext, $1)=$objext
9809
9810# No sense in running all these tests if we already determined that
9811# the F77 compiler isn't working.  Some variables (like enable_shared)
9812# are currently assumed to apply to all compilers on this platform,
9813# and will be corrupted by setting them based on a non-working compiler.
9814if test yes != "$_lt_disable_F77"; then
9815  # Code to be used in simple compile tests
9816  lt_simple_compile_test_code="\
9817      subroutine t
9818      return
9819      end
9820"
9821
9822  # Code to be used in simple link tests
9823  lt_simple_link_test_code="\
9824      program t
9825      end
9826"
9827
9828  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
9829  _LT_TAG_COMPILER
9830
9831  # save warnings/boilerplate of simple test code
9832  _LT_COMPILER_BOILERPLATE
9833  _LT_LINKER_BOILERPLATE
9834
9835  # Allow CC to be a program name with arguments.
9836  lt_save_CC=$CC
9837  lt_save_GCC=$GCC
9838  lt_save_CFLAGS=$CFLAGS
9839  CC=${F77-"f77"}
9840  CFLAGS=$FFLAGS
9841  compiler=$CC
9842  _LT_TAGVAR(compiler, $1)=$CC
9843  _LT_CC_BASENAME([$compiler])
9844  GCC=$G77
9845  if test -n "$compiler"; then
9846    AC_MSG_CHECKING([if libtool supports shared libraries])
9847    AC_MSG_RESULT([$can_build_shared])
9848
9849    AC_MSG_CHECKING([whether to build shared libraries])
9850    test no = "$can_build_shared" && enable_shared=no
9851
9852    # On AIX, shared libraries and static libraries use the same namespace, and
9853    # are all built from PIC.
9854    case $host_os in
9855      aix3*)
9856        test yes = "$enable_shared" && enable_static=no
9857        if test -n "$RANLIB"; then
9858          archive_cmds="$archive_cmds~\$RANLIB \$lib"
9859          postinstall_cmds='$RANLIB $lib'
9860        fi
9861        ;;
9862      aix[[4-9]]*)
9863	if test ia64 != "$host_cpu"; then
9864	  case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
9865	  yes,aix,yes) ;;		# shared object as lib.so file only
9866	  yes,svr4,*) ;;		# shared object as lib.so archive member only
9867	  yes,*) enable_static=no ;;	# shared object in lib.a archive as well
9868	  esac
9869	fi
9870        ;;
9871    esac
9872    AC_MSG_RESULT([$enable_shared])
9873
9874    AC_MSG_CHECKING([whether to build static libraries])
9875    # Make sure either enable_shared or enable_static is yes.
9876    test yes = "$enable_shared" || enable_static=yes
9877    AC_MSG_RESULT([$enable_static])
9878
9879    _LT_TAGVAR(GCC, $1)=$G77
9880    _LT_TAGVAR(LD, $1)=$LD
9881
9882    ## CAVEAT EMPTOR:
9883    ## There is no encapsulation within the following macros, do not change
9884    ## the running order or otherwise move them around unless you know exactly
9885    ## what you are doing...
9886    _LT_COMPILER_PIC($1)
9887    _LT_COMPILER_C_O($1)
9888    _LT_COMPILER_FILE_LOCKS($1)
9889    _LT_LINKER_SHLIBS($1)
9890    _LT_SYS_DYNAMIC_LINKER($1)
9891    _LT_LINKER_HARDCODE_LIBPATH($1)
9892
9893    _LT_CONFIG($1)
9894  fi # test -n "$compiler"
9895
9896  GCC=$lt_save_GCC
9897  CC=$lt_save_CC
9898  CFLAGS=$lt_save_CFLAGS
9899fi # test yes != "$_lt_disable_F77"
9900
9901AC_LANG_POP
9902])# _LT_LANG_F77_CONFIG
9903
9904
9905# _LT_LANG_FC_CONFIG([TAG])
9906# -------------------------
9907# Ensure that the configuration variables for a Fortran compiler are
9908# suitably defined.  These variables are subsequently used by _LT_CONFIG
9909# to write the compiler configuration to 'libtool'.
9910m4_defun([_LT_LANG_FC_CONFIG],
9911[AC_LANG_PUSH(Fortran)
9912
9913if test -z "$FC" || test no = "$FC"; then
9914  _lt_disable_FC=yes
9915fi
9916
9917_LT_TAGVAR(archive_cmds_need_lc, $1)=no
9918_LT_TAGVAR(allow_undefined_flag, $1)=
9919_LT_TAGVAR(always_export_symbols, $1)=no
9920_LT_TAGVAR(archive_expsym_cmds, $1)=
9921_LT_TAGVAR(export_dynamic_flag_spec, $1)=
9922_LT_TAGVAR(hardcode_direct, $1)=no
9923_LT_TAGVAR(hardcode_direct_absolute, $1)=no
9924_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
9925_LT_TAGVAR(hardcode_libdir_separator, $1)=
9926_LT_TAGVAR(hardcode_minus_L, $1)=no
9927_LT_TAGVAR(hardcode_automatic, $1)=no
9928_LT_TAGVAR(inherit_rpath, $1)=no
9929_LT_TAGVAR(module_cmds, $1)=
9930_LT_TAGVAR(module_expsym_cmds, $1)=
9931_LT_TAGVAR(link_all_deplibs, $1)=unknown
9932_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
9933_LT_TAGVAR(reload_flag, $1)=$reload_flag
9934_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
9935_LT_TAGVAR(no_undefined_flag, $1)=
9936_LT_TAGVAR(whole_archive_flag_spec, $1)=
9937_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
9938
9939# Source file extension for fc test sources.
9940ac_ext=${ac_fc_srcext-f}
9941
9942# Object file extension for compiled fc test sources.
9943objext=o
9944_LT_TAGVAR(objext, $1)=$objext
9945
9946# No sense in running all these tests if we already determined that
9947# the FC compiler isn't working.  Some variables (like enable_shared)
9948# are currently assumed to apply to all compilers on this platform,
9949# and will be corrupted by setting them based on a non-working compiler.
9950if test yes != "$_lt_disable_FC"; then
9951  # Code to be used in simple compile tests
9952  lt_simple_compile_test_code="\
9953      subroutine t
9954      return
9955      end
9956"
9957
9958  # Code to be used in simple link tests
9959  lt_simple_link_test_code="\
9960      program t
9961      end
9962"
9963
9964  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
9965  _LT_TAG_COMPILER
9966
9967  # save warnings/boilerplate of simple test code
9968  _LT_COMPILER_BOILERPLATE
9969  _LT_LINKER_BOILERPLATE
9970
9971  # Allow CC to be a program name with arguments.
9972  lt_save_CC=$CC
9973  lt_save_GCC=$GCC
9974  lt_save_CFLAGS=$CFLAGS
9975  CC=${FC-"f95"}
9976  CFLAGS=$FCFLAGS
9977  compiler=$CC
9978  GCC=$ac_cv_fc_compiler_gnu
9979
9980  _LT_TAGVAR(compiler, $1)=$CC
9981  _LT_CC_BASENAME([$compiler])
9982
9983  if test -n "$compiler"; then
9984    AC_MSG_CHECKING([if libtool supports shared libraries])
9985    AC_MSG_RESULT([$can_build_shared])
9986
9987    AC_MSG_CHECKING([whether to build shared libraries])
9988    test no = "$can_build_shared" && enable_shared=no
9989
9990    # On AIX, shared libraries and static libraries use the same namespace, and
9991    # are all built from PIC.
9992    case $host_os in
9993      aix3*)
9994        test yes = "$enable_shared" && enable_static=no
9995        if test -n "$RANLIB"; then
9996          archive_cmds="$archive_cmds~\$RANLIB \$lib"
9997          postinstall_cmds='$RANLIB $lib'
9998        fi
9999        ;;
10000      aix[[4-9]]*)
10001	if test ia64 != "$host_cpu"; then
10002	  case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
10003	  yes,aix,yes) ;;		# shared object as lib.so file only
10004	  yes,svr4,*) ;;		# shared object as lib.so archive member only
10005	  yes,*) enable_static=no ;;	# shared object in lib.a archive as well
10006	  esac
10007	fi
10008        ;;
10009    esac
10010    AC_MSG_RESULT([$enable_shared])
10011
10012    AC_MSG_CHECKING([whether to build static libraries])
10013    # Make sure either enable_shared or enable_static is yes.
10014    test yes = "$enable_shared" || enable_static=yes
10015    AC_MSG_RESULT([$enable_static])
10016
10017    _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
10018    _LT_TAGVAR(LD, $1)=$LD
10019
10020    ## CAVEAT EMPTOR:
10021    ## There is no encapsulation within the following macros, do not change
10022    ## the running order or otherwise move them around unless you know exactly
10023    ## what you are doing...
10024    _LT_SYS_HIDDEN_LIBDEPS($1)
10025    _LT_COMPILER_PIC($1)
10026    _LT_COMPILER_C_O($1)
10027    _LT_COMPILER_FILE_LOCKS($1)
10028    _LT_LINKER_SHLIBS($1)
10029    _LT_SYS_DYNAMIC_LINKER($1)
10030    _LT_LINKER_HARDCODE_LIBPATH($1)
10031
10032    _LT_CONFIG($1)
10033  fi # test -n "$compiler"
10034
10035  GCC=$lt_save_GCC
10036  CC=$lt_save_CC
10037  CFLAGS=$lt_save_CFLAGS
10038fi # test yes != "$_lt_disable_FC"
10039
10040AC_LANG_POP
10041])# _LT_LANG_FC_CONFIG
10042
10043
10044# _LT_LANG_GCJ_CONFIG([TAG])
10045# --------------------------
10046# Ensure that the configuration variables for the GNU Java Compiler compiler
10047# are suitably defined.  These variables are subsequently used by _LT_CONFIG
10048# to write the compiler configuration to 'libtool'.
10049m4_defun([_LT_LANG_GCJ_CONFIG],
10050[AC_REQUIRE([LT_PROG_GCJ])dnl
10051AC_LANG_SAVE
10052
10053# Source file extension for Java test sources.
10054ac_ext=java
10055
10056# Object file extension for compiled Java test sources.
10057objext=o
10058_LT_TAGVAR(objext, $1)=$objext
10059
10060# Code to be used in simple compile tests
10061lt_simple_compile_test_code="class foo {}"
10062
10063# Code to be used in simple link tests
10064lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
10065
10066# ltmain only uses $CC for tagged configurations so make sure $CC is set.
10067_LT_TAG_COMPILER
10068
10069# save warnings/boilerplate of simple test code
10070_LT_COMPILER_BOILERPLATE
10071_LT_LINKER_BOILERPLATE
10072
10073# Allow CC to be a program name with arguments.
10074lt_save_CC=$CC
10075lt_save_CFLAGS=$CFLAGS
10076lt_save_GCC=$GCC
10077GCC=yes
10078CC=${GCJ-"gcj"}
10079CFLAGS=$GCJFLAGS
10080compiler=$CC
10081_LT_TAGVAR(compiler, $1)=$CC
10082_LT_TAGVAR(LD, $1)=$LD
10083_LT_CC_BASENAME([$compiler])
10084
10085# GCJ did not exist at the time GCC didn't implicitly link libc in.
10086_LT_TAGVAR(archive_cmds_need_lc, $1)=no
10087
10088_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
10089_LT_TAGVAR(reload_flag, $1)=$reload_flag
10090_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
10091
10092if test -n "$compiler"; then
10093  _LT_COMPILER_NO_RTTI($1)
10094  _LT_COMPILER_PIC($1)
10095  _LT_COMPILER_C_O($1)
10096  _LT_COMPILER_FILE_LOCKS($1)
10097  _LT_LINKER_SHLIBS($1)
10098  _LT_LINKER_HARDCODE_LIBPATH($1)
10099
10100  _LT_CONFIG($1)
10101fi
10102
10103AC_LANG_RESTORE
10104
10105GCC=$lt_save_GCC
10106CC=$lt_save_CC
10107CFLAGS=$lt_save_CFLAGS
10108])# _LT_LANG_GCJ_CONFIG
10109
10110
10111# _LT_LANG_GO_CONFIG([TAG])
10112# --------------------------
10113# Ensure that the configuration variables for the GNU Go compiler
10114# are suitably defined.  These variables are subsequently used by _LT_CONFIG
10115# to write the compiler configuration to 'libtool'.
10116m4_defun([_LT_LANG_GO_CONFIG],
10117[AC_REQUIRE([LT_PROG_GO])dnl
10118AC_LANG_SAVE
10119
10120# Source file extension for Go test sources.
10121ac_ext=go
10122
10123# Object file extension for compiled Go test sources.
10124objext=o
10125_LT_TAGVAR(objext, $1)=$objext
10126
10127# Code to be used in simple compile tests
10128lt_simple_compile_test_code="package main; func main() { }"
10129
10130# Code to be used in simple link tests
10131lt_simple_link_test_code='package main; func main() { }'
10132
10133# ltmain only uses $CC for tagged configurations so make sure $CC is set.
10134_LT_TAG_COMPILER
10135
10136# save warnings/boilerplate of simple test code
10137_LT_COMPILER_BOILERPLATE
10138_LT_LINKER_BOILERPLATE
10139
10140# Allow CC to be a program name with arguments.
10141lt_save_CC=$CC
10142lt_save_CFLAGS=$CFLAGS
10143lt_save_GCC=$GCC
10144GCC=yes
10145CC=${GOC-"gccgo"}
10146CFLAGS=$GOFLAGS
10147compiler=$CC
10148_LT_TAGVAR(compiler, $1)=$CC
10149_LT_TAGVAR(LD, $1)=$LD
10150_LT_CC_BASENAME([$compiler])
10151
10152# Go did not exist at the time GCC didn't implicitly link libc in.
10153_LT_TAGVAR(archive_cmds_need_lc, $1)=no
10154
10155_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
10156_LT_TAGVAR(reload_flag, $1)=$reload_flag
10157_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
10158
10159if test -n "$compiler"; then
10160  _LT_COMPILER_NO_RTTI($1)
10161  _LT_COMPILER_PIC($1)
10162  _LT_COMPILER_C_O($1)
10163  _LT_COMPILER_FILE_LOCKS($1)
10164  _LT_LINKER_SHLIBS($1)
10165  _LT_LINKER_HARDCODE_LIBPATH($1)
10166
10167  _LT_CONFIG($1)
10168fi
10169
10170AC_LANG_RESTORE
10171
10172GCC=$lt_save_GCC
10173CC=$lt_save_CC
10174CFLAGS=$lt_save_CFLAGS
10175])# _LT_LANG_GO_CONFIG
10176
10177
10178# _LT_LANG_RC_CONFIG([TAG])
10179# -------------------------
10180# Ensure that the configuration variables for the Windows resource compiler
10181# are suitably defined.  These variables are subsequently used by _LT_CONFIG
10182# to write the compiler configuration to 'libtool'.
10183m4_defun([_LT_LANG_RC_CONFIG],
10184[AC_REQUIRE([LT_PROG_RC])dnl
10185AC_LANG_SAVE
10186
10187# Source file extension for RC test sources.
10188ac_ext=rc
10189
10190# Object file extension for compiled RC test sources.
10191objext=o
10192_LT_TAGVAR(objext, $1)=$objext
10193
10194# Code to be used in simple compile tests
10195lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
10196
10197# Code to be used in simple link tests
10198lt_simple_link_test_code=$lt_simple_compile_test_code
10199
10200# ltmain only uses $CC for tagged configurations so make sure $CC is set.
10201_LT_TAG_COMPILER
10202
10203# save warnings/boilerplate of simple test code
10204_LT_COMPILER_BOILERPLATE
10205_LT_LINKER_BOILERPLATE
10206
10207# Allow CC to be a program name with arguments.
10208lt_save_CC=$CC
10209lt_save_CFLAGS=$CFLAGS
10210lt_save_GCC=$GCC
10211GCC=
10212CC=${RC-"windres"}
10213CFLAGS=
10214compiler=$CC
10215_LT_TAGVAR(compiler, $1)=$CC
10216_LT_CC_BASENAME([$compiler])
10217_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
10218
10219if test -n "$compiler"; then
10220  :
10221  _LT_CONFIG($1)
10222fi
10223
10224GCC=$lt_save_GCC
10225AC_LANG_RESTORE
10226CC=$lt_save_CC
10227CFLAGS=$lt_save_CFLAGS
10228])# _LT_LANG_RC_CONFIG
10229
10230
10231# LT_PROG_GCJ
10232# -----------
10233AC_DEFUN([LT_PROG_GCJ],
10234[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
10235  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
10236    [AC_CHECK_TOOL(GCJ, gcj,)
10237      test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
10238      AC_SUBST(GCJFLAGS)])])[]dnl
10239])
10240
10241# Old name:
10242AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
10243dnl aclocal-1.4 backwards compatibility:
10244dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
10245
10246
10247# LT_PROG_GO
10248# ----------
10249AC_DEFUN([LT_PROG_GO],
10250[AC_CHECK_TOOL(GOC, gccgo,)
10251])
10252
10253
10254# LT_PROG_RC
10255# ----------
10256AC_DEFUN([LT_PROG_RC],
10257[AC_CHECK_TOOL(RC, windres,)
10258])
10259
10260# Old name:
10261AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
10262dnl aclocal-1.4 backwards compatibility:
10263dnl AC_DEFUN([LT_AC_PROG_RC], [])
10264
10265
10266# _LT_DECL_EGREP
10267# --------------
10268# If we don't have a new enough Autoconf to choose the best grep
10269# available, choose the one first in the user's PATH.
10270m4_defun([_LT_DECL_EGREP],
10271[AC_REQUIRE([AC_PROG_EGREP])dnl
10272AC_REQUIRE([AC_PROG_FGREP])dnl
10273test -z "$GREP" && GREP=grep
10274_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
10275_LT_DECL([], [EGREP], [1], [An ERE matcher])
10276_LT_DECL([], [FGREP], [1], [A literal string matcher])
10277dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
10278AC_SUBST([GREP])
10279])
10280
10281
10282# _LT_DECL_OBJDUMP
10283# --------------
10284# If we don't have a new enough Autoconf to choose the best objdump
10285# available, choose the one first in the user's PATH.
10286m4_defun([_LT_DECL_OBJDUMP],
10287[AC_CHECK_TOOL(OBJDUMP, objdump, false)
10288test -z "$OBJDUMP" && OBJDUMP=objdump
10289_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
10290AC_SUBST([OBJDUMP])
10291])
10292
10293# _LT_DECL_DLLTOOL
10294# ----------------
10295# Ensure DLLTOOL variable is set.
10296m4_defun([_LT_DECL_DLLTOOL],
10297[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
10298test -z "$DLLTOOL" && DLLTOOL=dlltool
10299_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
10300AC_SUBST([DLLTOOL])
10301])
10302
10303# _LT_DECL_SED
10304# ------------
10305# Check for a fully-functional sed program, that truncates
10306# as few characters as possible.  Prefer GNU sed if found.
10307m4_defun([_LT_DECL_SED],
10308[AC_PROG_SED
10309test -z "$SED" && SED=sed
10310Xsed="$SED -e 1s/^X//"
10311_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
10312_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
10313    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
10314])# _LT_DECL_SED
10315
10316m4_ifndef([AC_PROG_SED], [
10317# NOTE: This macro has been submitted for inclusion into   #
10318#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
10319#  a released version of Autoconf we should remove this    #
10320#  macro and use it instead.                               #
10321
10322m4_defun([AC_PROG_SED],
10323[AC_MSG_CHECKING([for a sed that does not truncate output])
10324AC_CACHE_VAL(lt_cv_path_SED,
10325[# Loop through the user's path and test for sed and gsed.
10326# Then use that list of sed's as ones to test for truncation.
10327as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10328for as_dir in $PATH
10329do
10330  IFS=$as_save_IFS
10331  test -z "$as_dir" && as_dir=.
10332  for lt_ac_prog in sed gsed; do
10333    for ac_exec_ext in '' $ac_executable_extensions; do
10334      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
10335        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
10336      fi
10337    done
10338  done
10339done
10340IFS=$as_save_IFS
10341lt_ac_max=0
10342lt_ac_count=0
10343# Add /usr/xpg4/bin/sed as it is typically found on Solaris
10344# along with /bin/sed that truncates output.
10345for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
10346  test ! -f "$lt_ac_sed" && continue
10347  cat /dev/null > conftest.in
10348  lt_ac_count=0
10349  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
10350  # Check for GNU sed and select it if it is found.
10351  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
10352    lt_cv_path_SED=$lt_ac_sed
10353    break
10354  fi
10355  while true; do
10356    cat conftest.in conftest.in >conftest.tmp
10357    mv conftest.tmp conftest.in
10358    cp conftest.in conftest.nl
10359    echo >>conftest.nl
10360    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
10361    cmp -s conftest.out conftest.nl || break
10362    # 10000 chars as input seems more than enough
10363    test 10 -lt "$lt_ac_count" && break
10364    lt_ac_count=`expr $lt_ac_count + 1`
10365    if test "$lt_ac_count" -gt "$lt_ac_max"; then
10366      lt_ac_max=$lt_ac_count
10367      lt_cv_path_SED=$lt_ac_sed
10368    fi
10369  done
10370done
10371])
10372SED=$lt_cv_path_SED
10373AC_SUBST([SED])
10374AC_MSG_RESULT([$SED])
10375])#AC_PROG_SED
10376])#m4_ifndef
10377
10378# Old name:
10379AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
10380dnl aclocal-1.4 backwards compatibility:
10381dnl AC_DEFUN([LT_AC_PROG_SED], [])
10382
10383
10384# _LT_CHECK_SHELL_FEATURES
10385# ------------------------
10386# Find out whether the shell is Bourne or XSI compatible,
10387# or has some other useful features.
10388m4_defun([_LT_CHECK_SHELL_FEATURES],
10389[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
10390  lt_unset=unset
10391else
10392  lt_unset=false
10393fi
10394_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
10395
10396# test EBCDIC or ASCII
10397case `echo X|tr X '\101'` in
10398 A) # ASCII based system
10399    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
10400  lt_SP2NL='tr \040 \012'
10401  lt_NL2SP='tr \015\012 \040\040'
10402  ;;
10403 *) # EBCDIC based system
10404  lt_SP2NL='tr \100 \n'
10405  lt_NL2SP='tr \r\n \100\100'
10406  ;;
10407esac
10408_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
10409_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
10410])# _LT_CHECK_SHELL_FEATURES
10411
10412
10413# _LT_PATH_CONVERSION_FUNCTIONS
10414# -----------------------------
10415# Determine what file name conversion functions should be used by
10416# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
10417# for certain cross-compile configurations and native mingw.
10418m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
10419[AC_REQUIRE([AC_CANONICAL_HOST])dnl
10420AC_REQUIRE([AC_CANONICAL_BUILD])dnl
10421AC_MSG_CHECKING([how to convert $build file names to $host format])
10422AC_CACHE_VAL(lt_cv_to_host_file_cmd,
10423[case $host in
10424  *-*-mingw* )
10425    case $build in
10426      *-*-mingw* ) # actually msys
10427        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
10428        ;;
10429      *-*-cygwin* )
10430        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
10431        ;;
10432      * ) # otherwise, assume *nix
10433        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
10434        ;;
10435    esac
10436    ;;
10437  *-*-cygwin* )
10438    case $build in
10439      *-*-mingw* ) # actually msys
10440        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
10441        ;;
10442      *-*-cygwin* )
10443        lt_cv_to_host_file_cmd=func_convert_file_noop
10444        ;;
10445      * ) # otherwise, assume *nix
10446        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
10447        ;;
10448    esac
10449    ;;
10450  * ) # unhandled hosts (and "normal" native builds)
10451    lt_cv_to_host_file_cmd=func_convert_file_noop
10452    ;;
10453esac
10454])
10455to_host_file_cmd=$lt_cv_to_host_file_cmd
10456AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
10457_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
10458         [0], [convert $build file names to $host format])dnl
10459
10460AC_MSG_CHECKING([how to convert $build file names to toolchain format])
10461AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
10462[#assume ordinary cross tools, or native build.
10463lt_cv_to_tool_file_cmd=func_convert_file_noop
10464case $host in
10465  *-*-mingw* )
10466    case $build in
10467      *-*-mingw* ) # actually msys
10468        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
10469        ;;
10470    esac
10471    ;;
10472esac
10473])
10474to_tool_file_cmd=$lt_cv_to_tool_file_cmd
10475AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
10476_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
10477         [0], [convert $build files to toolchain format])dnl
10478])# _LT_PATH_CONVERSION_FUNCTIONS
10479
10480# Helper functions for option handling.                    -*- Autoconf -*-
10481#
10482#   Copyright (C) 2004-2005, 2007-2009, 2011-2018 Free Software
10483#   Foundation, Inc.
10484#   Written by Gary V. Vaughan, 2004
10485#
10486# This file is free software; the Free Software Foundation gives
10487# unlimited permission to copy and/or distribute it, with or without
10488# modifications, as long as this notice is preserved.
10489
10490# serial 8 ltoptions.m4
10491
10492# This is to help aclocal find these macros, as it can't see m4_define.
10493AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
10494
10495
10496# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
10497# ------------------------------------------
10498m4_define([_LT_MANGLE_OPTION],
10499[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
10500
10501
10502# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
10503# ---------------------------------------
10504# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
10505# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
10506# saved as a flag.
10507m4_define([_LT_SET_OPTION],
10508[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
10509m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
10510        _LT_MANGLE_DEFUN([$1], [$2]),
10511    [m4_warning([Unknown $1 option '$2'])])[]dnl
10512])
10513
10514
10515# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
10516# ------------------------------------------------------------
10517# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
10518m4_define([_LT_IF_OPTION],
10519[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
10520
10521
10522# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
10523# -------------------------------------------------------
10524# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
10525# are set.
10526m4_define([_LT_UNLESS_OPTIONS],
10527[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
10528	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
10529		      [m4_define([$0_found])])])[]dnl
10530m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
10531])[]dnl
10532])
10533
10534
10535# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
10536# ----------------------------------------
10537# OPTION-LIST is a space-separated list of Libtool options associated
10538# with MACRO-NAME.  If any OPTION has a matching handler declared with
10539# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
10540# the unknown option and exit.
10541m4_defun([_LT_SET_OPTIONS],
10542[# Set options
10543m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
10544    [_LT_SET_OPTION([$1], _LT_Option)])
10545
10546m4_if([$1],[LT_INIT],[
10547  dnl
10548  dnl Simply set some default values (i.e off) if boolean options were not
10549  dnl specified:
10550  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
10551  ])
10552  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
10553  ])
10554  dnl
10555  dnl If no reference was made to various pairs of opposing options, then
10556  dnl we run the default mode handler for the pair.  For example, if neither
10557  dnl 'shared' nor 'disable-shared' was passed, we enable building of shared
10558  dnl archives by default:
10559  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
10560  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
10561  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
10562  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
10563		   [_LT_ENABLE_FAST_INSTALL])
10564  _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4],
10565		   [_LT_WITH_AIX_SONAME([aix])])
10566  ])
10567])# _LT_SET_OPTIONS
10568
10569
10570
10571# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
10572# -----------------------------------------
10573m4_define([_LT_MANGLE_DEFUN],
10574[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
10575
10576
10577# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
10578# -----------------------------------------------
10579m4_define([LT_OPTION_DEFINE],
10580[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
10581])# LT_OPTION_DEFINE
10582
10583
10584# dlopen
10585# ------
10586LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
10587])
10588
10589AU_DEFUN([AC_LIBTOOL_DLOPEN],
10590[_LT_SET_OPTION([LT_INIT], [dlopen])
10591AC_DIAGNOSE([obsolete],
10592[$0: Remove this warning and the call to _LT_SET_OPTION when you
10593put the 'dlopen' option into LT_INIT's first parameter.])
10594])
10595
10596dnl aclocal-1.4 backwards compatibility:
10597dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
10598
10599
10600# win32-dll
10601# ---------
10602# Declare package support for building win32 dll's.
10603LT_OPTION_DEFINE([LT_INIT], [win32-dll],
10604[enable_win32_dll=yes
10605
10606case $host in
10607*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
10608  AC_CHECK_TOOL(AS, as, false)
10609  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
10610  AC_CHECK_TOOL(OBJDUMP, objdump, false)
10611  ;;
10612esac
10613
10614test -z "$AS" && AS=as
10615_LT_DECL([], [AS],      [1], [Assembler program])dnl
10616
10617test -z "$DLLTOOL" && DLLTOOL=dlltool
10618_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
10619
10620test -z "$OBJDUMP" && OBJDUMP=objdump
10621_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
10622])# win32-dll
10623
10624AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
10625[AC_REQUIRE([AC_CANONICAL_HOST])dnl
10626_LT_SET_OPTION([LT_INIT], [win32-dll])
10627AC_DIAGNOSE([obsolete],
10628[$0: Remove this warning and the call to _LT_SET_OPTION when you
10629put the 'win32-dll' option into LT_INIT's first parameter.])
10630])
10631
10632dnl aclocal-1.4 backwards compatibility:
10633dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
10634
10635
10636# _LT_ENABLE_SHARED([DEFAULT])
10637# ----------------------------
10638# implement the --enable-shared flag, and supports the 'shared' and
10639# 'disable-shared' LT_INIT options.
10640# DEFAULT is either 'yes' or 'no'.  If omitted, it defaults to 'yes'.
10641m4_define([_LT_ENABLE_SHARED],
10642[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
10643AC_ARG_ENABLE([shared],
10644    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
10645	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
10646    [p=${PACKAGE-default}
10647    case $enableval in
10648    yes) enable_shared=yes ;;
10649    no) enable_shared=no ;;
10650    *)
10651      enable_shared=no
10652      # Look at the argument we got.  We use all the common list separators.
10653      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10654      for pkg in $enableval; do
10655	IFS=$lt_save_ifs
10656	if test "X$pkg" = "X$p"; then
10657	  enable_shared=yes
10658	fi
10659      done
10660      IFS=$lt_save_ifs
10661      ;;
10662    esac],
10663    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
10664
10665    _LT_DECL([build_libtool_libs], [enable_shared], [0],
10666	[Whether or not to build shared libraries])
10667])# _LT_ENABLE_SHARED
10668
10669LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
10670LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
10671
10672# Old names:
10673AC_DEFUN([AC_ENABLE_SHARED],
10674[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
10675])
10676
10677AC_DEFUN([AC_DISABLE_SHARED],
10678[_LT_SET_OPTION([LT_INIT], [disable-shared])
10679])
10680
10681AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
10682AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
10683
10684dnl aclocal-1.4 backwards compatibility:
10685dnl AC_DEFUN([AM_ENABLE_SHARED], [])
10686dnl AC_DEFUN([AM_DISABLE_SHARED], [])
10687
10688
10689
10690# _LT_ENABLE_STATIC([DEFAULT])
10691# ----------------------------
10692# implement the --enable-static flag, and support the 'static' and
10693# 'disable-static' LT_INIT options.
10694# DEFAULT is either 'yes' or 'no'.  If omitted, it defaults to 'yes'.
10695m4_define([_LT_ENABLE_STATIC],
10696[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
10697AC_ARG_ENABLE([static],
10698    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
10699	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
10700    [p=${PACKAGE-default}
10701    case $enableval in
10702    yes) enable_static=yes ;;
10703    no) enable_static=no ;;
10704    *)
10705     enable_static=no
10706      # Look at the argument we got.  We use all the common list separators.
10707      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10708      for pkg in $enableval; do
10709	IFS=$lt_save_ifs
10710	if test "X$pkg" = "X$p"; then
10711	  enable_static=yes
10712	fi
10713      done
10714      IFS=$lt_save_ifs
10715      ;;
10716    esac],
10717    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
10718
10719    _LT_DECL([build_old_libs], [enable_static], [0],
10720	[Whether or not to build static libraries])
10721])# _LT_ENABLE_STATIC
10722
10723LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
10724LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
10725
10726# Old names:
10727AC_DEFUN([AC_ENABLE_STATIC],
10728[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
10729])
10730
10731AC_DEFUN([AC_DISABLE_STATIC],
10732[_LT_SET_OPTION([LT_INIT], [disable-static])
10733])
10734
10735AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
10736AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
10737
10738dnl aclocal-1.4 backwards compatibility:
10739dnl AC_DEFUN([AM_ENABLE_STATIC], [])
10740dnl AC_DEFUN([AM_DISABLE_STATIC], [])
10741
10742
10743
10744# _LT_ENABLE_FAST_INSTALL([DEFAULT])
10745# ----------------------------------
10746# implement the --enable-fast-install flag, and support the 'fast-install'
10747# and 'disable-fast-install' LT_INIT options.
10748# DEFAULT is either 'yes' or 'no'.  If omitted, it defaults to 'yes'.
10749m4_define([_LT_ENABLE_FAST_INSTALL],
10750[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
10751AC_ARG_ENABLE([fast-install],
10752    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
10753    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
10754    [p=${PACKAGE-default}
10755    case $enableval in
10756    yes) enable_fast_install=yes ;;
10757    no) enable_fast_install=no ;;
10758    *)
10759      enable_fast_install=no
10760      # Look at the argument we got.  We use all the common list separators.
10761      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10762      for pkg in $enableval; do
10763	IFS=$lt_save_ifs
10764	if test "X$pkg" = "X$p"; then
10765	  enable_fast_install=yes
10766	fi
10767      done
10768      IFS=$lt_save_ifs
10769      ;;
10770    esac],
10771    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
10772
10773_LT_DECL([fast_install], [enable_fast_install], [0],
10774	 [Whether or not to optimize for fast installation])dnl
10775])# _LT_ENABLE_FAST_INSTALL
10776
10777LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
10778LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
10779
10780# Old names:
10781AU_DEFUN([AC_ENABLE_FAST_INSTALL],
10782[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
10783AC_DIAGNOSE([obsolete],
10784[$0: Remove this warning and the call to _LT_SET_OPTION when you put
10785the 'fast-install' option into LT_INIT's first parameter.])
10786])
10787
10788AU_DEFUN([AC_DISABLE_FAST_INSTALL],
10789[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
10790AC_DIAGNOSE([obsolete],
10791[$0: Remove this warning and the call to _LT_SET_OPTION when you put
10792the 'disable-fast-install' option into LT_INIT's first parameter.])
10793])
10794
10795dnl aclocal-1.4 backwards compatibility:
10796dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
10797dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
10798
10799
10800# _LT_WITH_AIX_SONAME([DEFAULT])
10801# ----------------------------------
10802# implement the --with-aix-soname flag, and support the `aix-soname=aix'
10803# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT
10804# is either `aix', `both' or `svr4'.  If omitted, it defaults to `aix'.
10805m4_define([_LT_WITH_AIX_SONAME],
10806[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl
10807shared_archive_member_spec=
10808case $host,$enable_shared in
10809power*-*-aix[[5-9]]*,yes)
10810  AC_MSG_CHECKING([which variant of shared library versioning to provide])
10811  AC_ARG_WITH([aix-soname],
10812    [AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
10813      [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])],
10814    [case $withval in
10815    aix|svr4|both)
10816      ;;
10817    *)
10818      AC_MSG_ERROR([Unknown argument to --with-aix-soname])
10819      ;;
10820    esac
10821    lt_cv_with_aix_soname=$with_aix_soname],
10822    [AC_CACHE_VAL([lt_cv_with_aix_soname],
10823      [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)
10824    with_aix_soname=$lt_cv_with_aix_soname])
10825  AC_MSG_RESULT([$with_aix_soname])
10826  if test aix != "$with_aix_soname"; then
10827    # For the AIX way of multilib, we name the shared archive member
10828    # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
10829    # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
10830    # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
10831    # the AIX toolchain works better with OBJECT_MODE set (default 32).
10832    if test 64 = "${OBJECT_MODE-32}"; then
10833      shared_archive_member_spec=shr_64
10834    else
10835      shared_archive_member_spec=shr
10836    fi
10837  fi
10838  ;;
10839*)
10840  with_aix_soname=aix
10841  ;;
10842esac
10843
10844_LT_DECL([], [shared_archive_member_spec], [0],
10845    [Shared archive member basename, for filename based shared library versioning on AIX])dnl
10846])# _LT_WITH_AIX_SONAME
10847
10848LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])])
10849LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])])
10850LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])])
10851
10852
10853# _LT_WITH_PIC([MODE])
10854# --------------------
10855# implement the --with-pic flag, and support the 'pic-only' and 'no-pic'
10856# LT_INIT options.
10857# MODE is either 'yes' or 'no'.  If omitted, it defaults to 'both'.
10858m4_define([_LT_WITH_PIC],
10859[AC_ARG_WITH([pic],
10860    [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
10861	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
10862    [lt_p=${PACKAGE-default}
10863    case $withval in
10864    yes|no) pic_mode=$withval ;;
10865    *)
10866      pic_mode=default
10867      # Look at the argument we got.  We use all the common list separators.
10868      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10869      for lt_pkg in $withval; do
10870	IFS=$lt_save_ifs
10871	if test "X$lt_pkg" = "X$lt_p"; then
10872	  pic_mode=yes
10873	fi
10874      done
10875      IFS=$lt_save_ifs
10876      ;;
10877    esac],
10878    [pic_mode=m4_default([$1], [default])])
10879
10880_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
10881])# _LT_WITH_PIC
10882
10883LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
10884LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
10885
10886# Old name:
10887AU_DEFUN([AC_LIBTOOL_PICMODE],
10888[_LT_SET_OPTION([LT_INIT], [pic-only])
10889AC_DIAGNOSE([obsolete],
10890[$0: Remove this warning and the call to _LT_SET_OPTION when you
10891put the 'pic-only' option into LT_INIT's first parameter.])
10892])
10893
10894dnl aclocal-1.4 backwards compatibility:
10895dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
10896
10897
10898m4_define([_LTDL_MODE], [])
10899LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
10900		 [m4_define([_LTDL_MODE], [nonrecursive])])
10901LT_OPTION_DEFINE([LTDL_INIT], [recursive],
10902		 [m4_define([_LTDL_MODE], [recursive])])
10903LT_OPTION_DEFINE([LTDL_INIT], [subproject],
10904		 [m4_define([_LTDL_MODE], [subproject])])
10905
10906m4_define([_LTDL_TYPE], [])
10907LT_OPTION_DEFINE([LTDL_INIT], [installable],
10908		 [m4_define([_LTDL_TYPE], [installable])])
10909LT_OPTION_DEFINE([LTDL_INIT], [convenience],
10910		 [m4_define([_LTDL_TYPE], [convenience])])
10911
10912# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
10913#
10914# Copyright (C) 2004-2005, 2007-2008, 2011-2018 Free Software
10915# Foundation, Inc.
10916# Written by Gary V. Vaughan, 2004
10917#
10918# This file is free software; the Free Software Foundation gives
10919# unlimited permission to copy and/or distribute it, with or without
10920# modifications, as long as this notice is preserved.
10921
10922# serial 6 ltsugar.m4
10923
10924# This is to help aclocal find these macros, as it can't see m4_define.
10925AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
10926
10927
10928# lt_join(SEP, ARG1, [ARG2...])
10929# -----------------------------
10930# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
10931# associated separator.
10932# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
10933# versions in m4sugar had bugs.
10934m4_define([lt_join],
10935[m4_if([$#], [1], [],
10936       [$#], [2], [[$2]],
10937       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
10938m4_define([_lt_join],
10939[m4_if([$#$2], [2], [],
10940       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
10941
10942
10943# lt_car(LIST)
10944# lt_cdr(LIST)
10945# ------------
10946# Manipulate m4 lists.
10947# These macros are necessary as long as will still need to support
10948# Autoconf-2.59, which quotes differently.
10949m4_define([lt_car], [[$1]])
10950m4_define([lt_cdr],
10951[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
10952       [$#], 1, [],
10953       [m4_dquote(m4_shift($@))])])
10954m4_define([lt_unquote], $1)
10955
10956
10957# lt_append(MACRO-NAME, STRING, [SEPARATOR])
10958# ------------------------------------------
10959# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'.
10960# Note that neither SEPARATOR nor STRING are expanded; they are appended
10961# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
10962# No SEPARATOR is output if MACRO-NAME was previously undefined (different
10963# than defined and empty).
10964#
10965# This macro is needed until we can rely on Autoconf 2.62, since earlier
10966# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
10967m4_define([lt_append],
10968[m4_define([$1],
10969	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
10970
10971
10972
10973# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
10974# ----------------------------------------------------------
10975# Produce a SEP delimited list of all paired combinations of elements of
10976# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
10977# has the form PREFIXmINFIXSUFFIXn.
10978# Needed until we can rely on m4_combine added in Autoconf 2.62.
10979m4_define([lt_combine],
10980[m4_if(m4_eval([$# > 3]), [1],
10981       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
10982[[m4_foreach([_Lt_prefix], [$2],
10983	     [m4_foreach([_Lt_suffix],
10984		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
10985	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
10986
10987
10988# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
10989# -----------------------------------------------------------------------
10990# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
10991# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
10992m4_define([lt_if_append_uniq],
10993[m4_ifdef([$1],
10994	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
10995		 [lt_append([$1], [$2], [$3])$4],
10996		 [$5])],
10997	  [lt_append([$1], [$2], [$3])$4])])
10998
10999
11000# lt_dict_add(DICT, KEY, VALUE)
11001# -----------------------------
11002m4_define([lt_dict_add],
11003[m4_define([$1($2)], [$3])])
11004
11005
11006# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
11007# --------------------------------------------
11008m4_define([lt_dict_add_subkey],
11009[m4_define([$1($2:$3)], [$4])])
11010
11011
11012# lt_dict_fetch(DICT, KEY, [SUBKEY])
11013# ----------------------------------
11014m4_define([lt_dict_fetch],
11015[m4_ifval([$3],
11016	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
11017    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
11018
11019
11020# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
11021# -----------------------------------------------------------------
11022m4_define([lt_if_dict_fetch],
11023[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
11024	[$5],
11025    [$6])])
11026
11027
11028# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
11029# --------------------------------------------------------------
11030m4_define([lt_dict_filter],
11031[m4_if([$5], [], [],
11032  [lt_join(m4_quote(m4_default([$4], [[, ]])),
11033           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
11034		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
11035])
11036
11037# ltversion.m4 -- version numbers			-*- Autoconf -*-
11038#
11039#   Copyright (C) 2004, 2011-2018 Free Software Foundation, Inc.
11040#   Written by Scott James Remnant, 2004
11041#
11042# This file is free software; the Free Software Foundation gives
11043# unlimited permission to copy and/or distribute it, with or without
11044# modifications, as long as this notice is preserved.
11045
11046# @configure_input@
11047
11048# serial 4221 ltversion.m4
11049# This file is part of GNU Libtool
11050
11051m4_define([LT_PACKAGE_VERSION], [2.4.6.42-b88ce-dirty])
11052m4_define([LT_PACKAGE_REVISION], [2.4.6.42])
11053
11054AC_DEFUN([LTVERSION_VERSION],
11055[macro_version='2.4.6.42-b88ce-dirty'
11056macro_revision='2.4.6.42'
11057_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
11058_LT_DECL(, macro_revision, 0)
11059])
11060
11061# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
11062#
11063#   Copyright (C) 2004-2005, 2007, 2009, 2011-2018 Free Software
11064#   Foundation, Inc.
11065#   Written by Scott James Remnant, 2004.
11066#
11067# This file is free software; the Free Software Foundation gives
11068# unlimited permission to copy and/or distribute it, with or without
11069# modifications, as long as this notice is preserved.
11070
11071# serial 5 lt~obsolete.m4
11072
11073# These exist entirely to fool aclocal when bootstrapping libtool.
11074#
11075# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN),
11076# which have later been changed to m4_define as they aren't part of the
11077# exported API, or moved to Autoconf or Automake where they belong.
11078#
11079# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
11080# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
11081# using a macro with the same name in our local m4/libtool.m4 it'll
11082# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
11083# and doesn't know about Autoconf macros at all.)
11084#
11085# So we provide this file, which has a silly filename so it's always
11086# included after everything else.  This provides aclocal with the
11087# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
11088# because those macros already exist, or will be overwritten later.
11089# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
11090#
11091# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
11092# Yes, that means every name once taken will need to remain here until
11093# we give up compatibility with versions before 1.7, at which point
11094# we need to keep only those names which we still refer to.
11095
11096# This is to help aclocal find these macros, as it can't see m4_define.
11097AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
11098
11099m4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
11100m4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
11101m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
11102m4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
11103m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
11104m4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
11105m4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
11106m4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
11107m4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
11108m4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
11109m4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
11110m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
11111m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
11112m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
11113m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
11114m4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
11115m4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
11116m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
11117m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
11118m4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
11119m4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
11120m4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
11121m4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
11122m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
11123m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
11124m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
11125m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
11126m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
11127m4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
11128m4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
11129m4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
11130m4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
11131m4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
11132m4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
11133m4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
11134m4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
11135m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
11136m4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
11137m4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
11138m4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
11139m4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
11140m4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
11141m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
11142m4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
11143m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
11144m4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
11145m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
11146m4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
11147m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
11148m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
11149m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
11150m4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
11151m4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
11152m4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
11153m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS],	[AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
11154m4_ifndef([_LT_AC_PROG_CXXCPP],		[AC_DEFUN([_LT_AC_PROG_CXXCPP])])
11155m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS],	[AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
11156m4_ifndef([_LT_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
11157m4_ifndef([_LT_PROG_F77],		[AC_DEFUN([_LT_PROG_F77])])
11158m4_ifndef([_LT_PROG_FC],		[AC_DEFUN([_LT_PROG_FC])])
11159m4_ifndef([_LT_PROG_CXX],		[AC_DEFUN([_LT_PROG_CXX])])
11160
11161# nls.m4 serial 6 (gettext-0.20.2)
11162dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014, 2016, 2019-2020 Free
11163dnl Software Foundation, Inc.
11164dnl This file is free software; the Free Software Foundation
11165dnl gives unlimited permission to copy and/or distribute it,
11166dnl with or without modifications, as long as this notice is preserved.
11167dnl
11168dnl This file can be used in projects which are not available under
11169dnl the GNU General Public License or the GNU Lesser General Public
11170dnl License but which still want to provide support for the GNU gettext
11171dnl functionality.
11172dnl Please note that the actual code of the GNU gettext library is covered
11173dnl by the GNU Lesser General Public License, and the rest of the GNU
11174dnl gettext package is covered by the GNU General Public License.
11175dnl They are *not* in the public domain.
11176
11177dnl Authors:
11178dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
11179dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
11180
11181AC_PREREQ([2.50])
11182
11183AC_DEFUN([AM_NLS],
11184[
11185  AC_MSG_CHECKING([whether NLS is requested])
11186  dnl Default is enabled NLS
11187  AC_ARG_ENABLE([nls],
11188    [  --disable-nls           do not use Native Language Support],
11189    USE_NLS=$enableval, USE_NLS=yes)
11190  AC_MSG_RESULT([$USE_NLS])
11191  AC_SUBST([USE_NLS])
11192])
11193
11194# pkg.m4 - Macros to locate and utilise pkg-config.   -*- Autoconf -*-
11195# serial 11 (pkg-config-0.29.1)
11196
11197dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
11198dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
11199dnl
11200dnl This program is free software; you can redistribute it and/or modify
11201dnl it under the terms of the GNU General Public License as published by
11202dnl the Free Software Foundation; either version 2 of the License, or
11203dnl (at your option) any later version.
11204dnl
11205dnl This program is distributed in the hope that it will be useful, but
11206dnl WITHOUT ANY WARRANTY; without even the implied warranty of
11207dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11208dnl General Public License for more details.
11209dnl
11210dnl You should have received a copy of the GNU General Public License
11211dnl along with this program; if not, write to the Free Software
11212dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
11213dnl 02111-1307, USA.
11214dnl
11215dnl As a special exception to the GNU General Public License, if you
11216dnl distribute this file as part of a program that contains a
11217dnl configuration script generated by Autoconf, you may include it under
11218dnl the same distribution terms that you use for the rest of that
11219dnl program.
11220
11221dnl PKG_PREREQ(MIN-VERSION)
11222dnl -----------------------
11223dnl Since: 0.29
11224dnl
11225dnl Verify that the version of the pkg-config macros are at least
11226dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
11227dnl installed version of pkg-config, this checks the developer's version
11228dnl of pkg.m4 when generating configure.
11229dnl
11230dnl To ensure that this macro is defined, also add:
11231dnl m4_ifndef([PKG_PREREQ],
11232dnl     [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
11233dnl
11234dnl See the "Since" comment for each macro you use to see what version
11235dnl of the macros you require.
11236m4_defun([PKG_PREREQ],
11237[m4_define([PKG_MACROS_VERSION], [0.29.1])
11238m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
11239    [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
11240])dnl PKG_PREREQ
11241
11242dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
11243dnl ----------------------------------
11244dnl Since: 0.16
11245dnl
11246dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
11247dnl first found in the path. Checks that the version of pkg-config found
11248dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
11249dnl used since that's the first version where most current features of
11250dnl pkg-config existed.
11251AC_DEFUN([PKG_PROG_PKG_CONFIG],
11252[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
11253m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
11254m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
11255AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
11256AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
11257AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
11258
11259if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
11260	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
11261fi
11262if test -n "$PKG_CONFIG"; then
11263	_pkg_min_version=m4_default([$1], [0.9.0])
11264	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
11265	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
11266		AC_MSG_RESULT([yes])
11267	else
11268		AC_MSG_RESULT([no])
11269		PKG_CONFIG=""
11270	fi
11271fi[]dnl
11272])dnl PKG_PROG_PKG_CONFIG
11273
11274dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
11275dnl -------------------------------------------------------------------
11276dnl Since: 0.18
11277dnl
11278dnl Check to see whether a particular set of modules exists. Similar to
11279dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
11280dnl
11281dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
11282dnl only at the first occurence in configure.ac, so if the first place
11283dnl it's called might be skipped (such as if it is within an "if", you
11284dnl have to call PKG_CHECK_EXISTS manually
11285AC_DEFUN([PKG_CHECK_EXISTS],
11286[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
11287if test -n "$PKG_CONFIG" && \
11288    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
11289  m4_default([$2], [:])
11290m4_ifvaln([$3], [else
11291  $3])dnl
11292fi])
11293
11294dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
11295dnl ---------------------------------------------
11296dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
11297dnl pkg_failed based on the result.
11298m4_define([_PKG_CONFIG],
11299[if test -n "$$1"; then
11300    pkg_cv_[]$1="$$1"
11301 elif test -n "$PKG_CONFIG"; then
11302    PKG_CHECK_EXISTS([$3],
11303                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
11304		      test "x$?" != "x0" && pkg_failed=yes ],
11305		     [pkg_failed=yes])
11306 else
11307    pkg_failed=untried
11308fi[]dnl
11309])dnl _PKG_CONFIG
11310
11311dnl _PKG_SHORT_ERRORS_SUPPORTED
11312dnl ---------------------------
11313dnl Internal check to see if pkg-config supports short errors.
11314AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
11315[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
11316if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
11317        _pkg_short_errors_supported=yes
11318else
11319        _pkg_short_errors_supported=no
11320fi[]dnl
11321])dnl _PKG_SHORT_ERRORS_SUPPORTED
11322
11323
11324dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
11325dnl   [ACTION-IF-NOT-FOUND])
11326dnl --------------------------------------------------------------
11327dnl Since: 0.4.0
11328dnl
11329dnl Note that if there is a possibility the first call to
11330dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
11331dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
11332AC_DEFUN([PKG_CHECK_MODULES],
11333[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
11334AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
11335AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
11336
11337pkg_failed=no
11338AC_MSG_CHECKING([for $1])
11339
11340_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
11341_PKG_CONFIG([$1][_LIBS], [libs], [$2])
11342
11343m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
11344and $1[]_LIBS to avoid the need to call pkg-config.
11345See the pkg-config man page for more details.])
11346
11347if test $pkg_failed = yes; then
11348   	AC_MSG_RESULT([no])
11349        _PKG_SHORT_ERRORS_SUPPORTED
11350        if test $_pkg_short_errors_supported = yes; then
11351	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
11352        else
11353	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
11354        fi
11355	# Put the nasty error message in config.log where it belongs
11356	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
11357
11358	m4_default([$4], [AC_MSG_ERROR(
11359[Package requirements ($2) were not met:
11360
11361$$1_PKG_ERRORS
11362
11363Consider adjusting the PKG_CONFIG_PATH environment variable if you
11364installed software in a non-standard prefix.
11365
11366_PKG_TEXT])[]dnl
11367        ])
11368elif test $pkg_failed = untried; then
11369     	AC_MSG_RESULT([no])
11370	m4_default([$4], [AC_MSG_FAILURE(
11371[The pkg-config script could not be found or is too old.  Make sure it
11372is in your PATH or set the PKG_CONFIG environment variable to the full
11373path to pkg-config.
11374
11375_PKG_TEXT
11376
11377To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
11378        ])
11379else
11380	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
11381	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
11382        AC_MSG_RESULT([yes])
11383	$3
11384fi[]dnl
11385])dnl PKG_CHECK_MODULES
11386
11387
11388dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
11389dnl   [ACTION-IF-NOT-FOUND])
11390dnl ---------------------------------------------------------------------
11391dnl Since: 0.29
11392dnl
11393dnl Checks for existence of MODULES and gathers its build flags with
11394dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
11395dnl and VARIABLE-PREFIX_LIBS from --libs.
11396dnl
11397dnl Note that if there is a possibility the first call to
11398dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
11399dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
11400dnl configure.ac.
11401AC_DEFUN([PKG_CHECK_MODULES_STATIC],
11402[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
11403_save_PKG_CONFIG=$PKG_CONFIG
11404PKG_CONFIG="$PKG_CONFIG --static"
11405PKG_CHECK_MODULES($@)
11406PKG_CONFIG=$_save_PKG_CONFIG[]dnl
11407])dnl PKG_CHECK_MODULES_STATIC
11408
11409
11410dnl PKG_INSTALLDIR([DIRECTORY])
11411dnl -------------------------
11412dnl Since: 0.27
11413dnl
11414dnl Substitutes the variable pkgconfigdir as the location where a module
11415dnl should install pkg-config .pc files. By default the directory is
11416dnl $libdir/pkgconfig, but the default can be changed by passing
11417dnl DIRECTORY. The user can override through the --with-pkgconfigdir
11418dnl parameter.
11419AC_DEFUN([PKG_INSTALLDIR],
11420[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
11421m4_pushdef([pkg_description],
11422    [pkg-config installation directory @<:@]pkg_default[@:>@])
11423AC_ARG_WITH([pkgconfigdir],
11424    [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
11425    [with_pkgconfigdir=]pkg_default)
11426AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
11427m4_popdef([pkg_default])
11428m4_popdef([pkg_description])
11429])dnl PKG_INSTALLDIR
11430
11431
11432dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
11433dnl --------------------------------
11434dnl Since: 0.27
11435dnl
11436dnl Substitutes the variable noarch_pkgconfigdir as the location where a
11437dnl module should install arch-independent pkg-config .pc files. By
11438dnl default the directory is $datadir/pkgconfig, but the default can be
11439dnl changed by passing DIRECTORY. The user can override through the
11440dnl --with-noarch-pkgconfigdir parameter.
11441AC_DEFUN([PKG_NOARCH_INSTALLDIR],
11442[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
11443m4_pushdef([pkg_description],
11444    [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
11445AC_ARG_WITH([noarch-pkgconfigdir],
11446    [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
11447    [with_noarch_pkgconfigdir=]pkg_default)
11448AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
11449m4_popdef([pkg_default])
11450m4_popdef([pkg_description])
11451])dnl PKG_NOARCH_INSTALLDIR
11452
11453
11454dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
11455dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
11456dnl -------------------------------------------
11457dnl Since: 0.28
11458dnl
11459dnl Retrieves the value of the pkg-config variable for the given module.
11460AC_DEFUN([PKG_CHECK_VAR],
11461[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
11462AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
11463
11464_PKG_CONFIG([$1], [variable="][$3]["], [$2])
11465AS_VAR_COPY([$1], [pkg_cv_][$1])
11466
11467AS_VAR_IF([$1], [""], [$5], [$4])dnl
11468])dnl PKG_CHECK_VAR
11469
11470dnl PKG_WITH_MODULES(VARIABLE-PREFIX, MODULES,
11471dnl   [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND],
11472dnl   [DESCRIPTION], [DEFAULT])
11473dnl ------------------------------------------
11474dnl
11475dnl Prepare a "--with-" configure option using the lowercase
11476dnl [VARIABLE-PREFIX] name, merging the behaviour of AC_ARG_WITH and
11477dnl PKG_CHECK_MODULES in a single macro.
11478AC_DEFUN([PKG_WITH_MODULES],
11479[
11480m4_pushdef([with_arg], m4_tolower([$1]))
11481
11482m4_pushdef([description],
11483           [m4_default([$5], [build with ]with_arg[ support])])
11484
11485m4_pushdef([def_arg], [m4_default([$6], [auto])])
11486m4_pushdef([def_action_if_found], [AS_TR_SH([with_]with_arg)=yes])
11487m4_pushdef([def_action_if_not_found], [AS_TR_SH([with_]with_arg)=no])
11488
11489m4_case(def_arg,
11490            [yes],[m4_pushdef([with_without], [--without-]with_arg)],
11491            [m4_pushdef([with_without],[--with-]with_arg)])
11492
11493AC_ARG_WITH(with_arg,
11494     AS_HELP_STRING(with_without, description[ @<:@default=]def_arg[@:>@]),,
11495    [AS_TR_SH([with_]with_arg)=def_arg])
11496
11497AS_CASE([$AS_TR_SH([with_]with_arg)],
11498            [yes],[PKG_CHECK_MODULES([$1],[$2],$3,$4)],
11499            [auto],[PKG_CHECK_MODULES([$1],[$2],
11500                                        [m4_n([def_action_if_found]) $3],
11501                                        [m4_n([def_action_if_not_found]) $4])])
11502
11503m4_popdef([with_arg])
11504m4_popdef([description])
11505m4_popdef([def_arg])
11506
11507])dnl PKG_WITH_MODULES
11508
11509dnl PKG_HAVE_WITH_MODULES(VARIABLE-PREFIX, MODULES,
11510dnl   [DESCRIPTION], [DEFAULT])
11511dnl -----------------------------------------------
11512dnl
11513dnl Convenience macro to trigger AM_CONDITIONAL after PKG_WITH_MODULES
11514dnl check._[VARIABLE-PREFIX] is exported as make variable.
11515AC_DEFUN([PKG_HAVE_WITH_MODULES],
11516[
11517PKG_WITH_MODULES([$1],[$2],,,[$3],[$4])
11518
11519AM_CONDITIONAL([HAVE_][$1],
11520               [test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"])
11521])dnl PKG_HAVE_WITH_MODULES
11522
11523dnl PKG_HAVE_DEFINE_WITH_MODULES(VARIABLE-PREFIX, MODULES,
11524dnl   [DESCRIPTION], [DEFAULT])
11525dnl ------------------------------------------------------
11526dnl
11527dnl Convenience macro to run AM_CONDITIONAL and AC_DEFINE after
11528dnl PKG_WITH_MODULES check. HAVE_[VARIABLE-PREFIX] is exported as make
11529dnl and preprocessor variable.
11530AC_DEFUN([PKG_HAVE_DEFINE_WITH_MODULES],
11531[
11532PKG_HAVE_WITH_MODULES([$1],[$2],[$3],[$4])
11533
11534AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"],
11535        [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])])
11536])dnl PKG_HAVE_DEFINE_WITH_MODULES
11537
11538dnl vapigen.m4
11539dnl
11540dnl Copyright 2012 Evan Nemerson
11541dnl
11542dnl This library is free software; you can redistribute it and/or
11543dnl modify it under the terms of the GNU Lesser General Public
11544dnl License as published by the Free Software Foundation; either
11545dnl version 2.1 of the License, or (at your option) any later version.
11546dnl
11547dnl This library is distributed in the hope that it will be useful,
11548dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
11549dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11550dnl Lesser General Public License for more details.
11551dnl
11552dnl You should have received a copy of the GNU Lesser General Public
11553dnl License along with this library; if not, write to the Free Software
11554dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
11555
11556# VAPIGEN_CHECK([VERSION], [API_VERSION], [FOUND_INTROSPECTION], [DEFAULT])
11557# --------------------------------------
11558# Check vapigen existence and version
11559#
11560# See http://live.gnome.org/Vala/UpstreamGuide for detailed documentation
11561AC_DEFUN([VAPIGEN_CHECK],
11562[
11563  AS_IF([test "x$3" != "xyes"], [
11564      m4_provide_if([GOBJECT_INTROSPECTION_CHECK], [], [
11565          m4_provide_if([GOBJECT_INTROSPECTION_REQUIRE], [], [
11566              AC_MSG_ERROR([[You must call GOBJECT_INTROSPECTION_CHECK or GOBJECT_INTROSPECTION_REQUIRE before using VAPIGEN_CHECK unless using the FOUND_INTROSPECTION argument is "yes"]])
11567            ])
11568        ])
11569    ])
11570
11571  AC_ARG_ENABLE([vala],
11572    [AS_HELP_STRING([--enable-vala[=@<:@no/auto/yes@:>@]],[build Vala bindings @<:@default=]ifelse($4,,auto,$4)[@:>@])],,[
11573      AS_IF([test "x$4" = "x"], [
11574          enable_vala=auto
11575        ], [
11576          enable_vala=$4
11577        ])
11578    ])
11579
11580  AS_CASE([$enable_vala], [no], [enable_vala=no],
11581      [yes], [
11582        AS_IF([test "x$3" != "xyes" -a "x$found_introspection" != "xyes"], [
11583            AC_MSG_ERROR([Vala bindings require GObject Introspection])
11584          ])
11585      ], [auto], [
11586        AS_IF([test "x$3" != "xyes" -a "x$found_introspection" != "xyes"], [
11587            enable_vala=no
11588          ])
11589      ], [
11590        AC_MSG_ERROR([Invalid argument passed to --enable-vala, should be one of @<:@no/auto/yes@:>@])
11591      ])
11592
11593  AS_IF([test "x$2" = "x"], [
11594      vapigen_pkg_name=vapigen
11595    ], [
11596      vapigen_pkg_name=vapigen-$2
11597    ])
11598  AS_IF([test "x$1" = "x"], [
11599      vapigen_pkg="$vapigen_pkg_name"
11600    ], [
11601      vapigen_pkg="$vapigen_pkg_name >= $1"
11602    ])
11603
11604  PKG_PROG_PKG_CONFIG
11605
11606  PKG_CHECK_EXISTS([$vapigen_pkg], [
11607      AS_IF([test "$enable_vala" = "auto"], [
11608          enable_vala=yes
11609        ])
11610    ], [
11611      AS_CASE([$enable_vala], [yes], [
11612          AC_MSG_ERROR([$vapigen_pkg not found])
11613        ], [auto], [
11614          enable_vala=no
11615        ])
11616    ])
11617
11618  AC_MSG_CHECKING([for vapigen])
11619
11620  AS_CASE([$enable_vala],
11621    [yes], [
11622      VAPIGEN=`$PKG_CONFIG --variable=vapigen $vapigen_pkg_name`
11623      VAPIGEN_MAKEFILE=`$PKG_CONFIG --variable=datadir $vapigen_pkg_name`/vala/Makefile.vapigen
11624      AS_IF([test "x$2" = "x"], [
11625          VAPIGEN_VAPIDIR=`$PKG_CONFIG --variable=vapidir $vapigen_pkg_name`
11626        ], [
11627          VAPIGEN_VAPIDIR=`$PKG_CONFIG --variable=vapidir_versioned $vapigen_pkg_name`
11628        ])
11629    ])
11630
11631  AC_MSG_RESULT([$enable_vala])
11632
11633  AC_SUBST([VAPIGEN])
11634  AC_SUBST([VAPIGEN_VAPIDIR])
11635  AC_SUBST([VAPIGEN_MAKEFILE])
11636
11637  AM_CONDITIONAL(ENABLE_VAPIGEN, test "x$enable_vala" = "xyes")
11638])
11639
11640dnl Copyright (c) 2002-2015
11641dnl         The Xfce development team. All rights reserved.
11642dnl
11643dnl Written for Xfce by Benedikt Meurer <benny@xfce.org>.
11644dnl
11645dnl This program is free software; you can redistribute it and/or modify
11646dnl it under the terms of the GNU General Public License as published by
11647dnl the Free Software Foundation; either version 2 of the License, or
11648dnl (at your option) any later version.
11649dnl
11650dnl This program is distributed in the hope that it will be useful,
11651dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
11652dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11653dnl GNU General Public License for more details.
11654dnl
11655dnl You should have received a copy of the GNU General Public License along
11656dnl with this program; if not, write to the Free Software Foundation, Inc.,
11657dnl 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
11658dnl
11659dnl xdt-depends
11660dnl -----------
11661dnl  Contains M4 macros to check for software dependencies.
11662dnl  Partly based on prior work of the XDG contributors.
11663dnl
11664
11665
11666
11667dnl We need recent a autoconf version
11668AC_PREREQ([2.60])
11669
11670
11671
11672dnl XDT_PROG_PKG_CONFIG()
11673dnl
11674dnl Checks for the freedesktop.org pkg-config
11675dnl utility and sets the PKG_CONFIG environment
11676dnl variable to the full path if found.
11677dnl
11678AC_DEFUN([XDT_PROG_PKG_CONFIG],
11679[
11680  # minimum supported version of pkg-config
11681  xdt_cv_PKG_CONFIG_MIN_VERSION=0.9.0
11682
11683  m4_ifdef([PKG_PROG_PKG_CONFIG],
11684    [
11685      PKG_PROG_PKG_CONFIG([$xdt_cv_PKG_CONFIG_MIN_VERSION])
11686
11687      if test x"$PKG_CONFIG" = x""; then
11688        echo
11689        echo "*** Your version of pkg-config is too old. You need atleast"
11690        echo "*** pkg-config $xdt_cv_PKG_CONFIG_MIN_VERSION or newer. You can download pkg-config"
11691        echo "*** from the freedesktop.org software repository at"
11692        echo "***"
11693        echo "***    https://www.freedesktop.org/wiki/Software/pkg-config/"
11694        echo "***"
11695        exit 1;
11696      fi
11697    ],
11698    [
11699      echo
11700      echo "*** The pkg-config utility could not be found on your system."
11701      echo "*** Make sure it is in your path, or set the PKG_CONFIG"
11702      echo "*** environment variable to the full path to pkg-config."
11703      echo "*** You can download pkg-config from the freedesktop.org"
11704      echo "*** software repository at"
11705      echo "***"
11706      echo "***    https://www.freedesktop.org/wiki/Software/pkg-config/"
11707      echo "***"
11708      exit 1
11709    ])
11710])
11711
11712
11713
11714dnl XDT_CHECK_PACKAGE(varname, package, version, [action-if], [action-if-not])
11715dnl
11716dnl Checks if "package" >= "version" is installed on the
11717dnl target system, using the pkg-config utility. If the
11718dnl dependency is met, "varname"_CFLAGS, "varname"_LIBS,
11719dnl "varname"_VERSION and "varname"_REQUIRED_VERSION
11720dnl will be set and marked for substition.
11721dnl
11722dnl "varname"_REQUIRED_VERSION will be set to the value of
11723dnl "version". This is mostly useful to automatically
11724dnl place the correct version information into the RPM
11725dnl .spec file.
11726dnl
11727dnl In addition, if the dependency is met, "action-if" will
11728dnl be executed if given.
11729dnl
11730dnl If the package check fails, "action-if-not" will be
11731dnl executed. If this parameter isn't specified, a diagnostic
11732dnl message will be printed and the configure script will
11733dnl be terminated with exit code 1.
11734dnl
11735AC_DEFUN([XDT_CHECK_PACKAGE],
11736[
11737  XDT_PROG_PKG_CONFIG()
11738
11739  AC_MSG_CHECKING([for $2 >= $3])
11740  if $PKG_CONFIG "--atleast-version=$3" "$2" >/dev/null 2>&1; then
11741    $1_VERSION=`$PKG_CONFIG --modversion "$2"`
11742    AC_MSG_RESULT([$$1_VERSION])
11743
11744    AC_MSG_CHECKING([$1_CFLAGS])
11745    $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
11746    AC_MSG_RESULT([$$1_CFLAGS])
11747
11748    AC_MSG_CHECKING([$1_LIBS])
11749    $1_LIBS=`$PKG_CONFIG --libs "$2"`
11750    AC_MSG_RESULT([$$1_LIBS])
11751
11752    $1_REQUIRED_VERSION=$3
11753
11754    AC_SUBST([$1_VERSION])
11755    AC_SUBST([$1_CFLAGS])
11756    AC_SUBST([$1_LIBS])
11757    AC_SUBST([$1_REQUIRED_VERSION])
11758
11759    ifelse([$4], , , [$4])
11760  elif $PKG_CONFIG --exists "$2" >/dev/null 2>&1; then
11761    xdt_cv_version=`$PKG_CONFIG --modversion "$2"`
11762    AC_MSG_RESULT([found, but $xdt_cv_version])
11763
11764    ifelse([$5], ,
11765    [
11766      echo "*** The required package $2 was found on your system,"
11767      echo "*** but the installed version ($xdt_cv_version) is too old."
11768      echo "*** Please upgrade $2 to atleast version $3, or adjust"
11769      echo "*** the PKG_CONFIG_PATH environment variable if you installed"
11770      echo "*** the new version of the package in a nonstandard prefix so"
11771      echo "*** pkg-config is able to find it."
11772      exit 1
11773    ], [$5])
11774  else
11775    AC_MSG_RESULT([not found])
11776
11777    ifelse([$5], ,
11778    [
11779      echo "*** The required package $2 was not found on your system."
11780      echo "*** Please install $2 (atleast version $3) or adjust"
11781      echo "*** the PKG_CONFIG_PATH environment variable if you"
11782      echo "*** installed the package in a nonstandard prefix so that"
11783      echo "*** pkg-config is able to find it."
11784      exit 1
11785    ], [$5])
11786  fi
11787])
11788
11789
11790
11791dnl XDT_CHECK_OPTIONAL_PACKAGE(varname, package, version, optionname, helpstring, [default])
11792dnl
11793dnl Checks for an optional dependency on "package" >= "version". "default"
11794dnl can be "yes" or "no" (defaults to "yes" if not specified) and controls
11795dnl whether configure should check this dependency by default, or only if
11796dnl the user explicitly enables it using a command line switch.
11797dnl
11798dnl This macro automatically adds a commandline switch based on the "optionname"
11799dnl parameter (--enable-optionname/--disable-optionname), which allows the
11800dnl user to explicitly control whether this optional dependency should be
11801dnl enabled or not. The "helpstring" parameter gives a brief(!) description
11802dnl about this dependency.
11803dnl
11804dnl If the user chose to enable this dependency and the required package
11805dnl was found, this macro defines the variable "varname"_FOUND and sets it
11806dnl to the string "yes", in addition to the 4 variables set by XDT_CHECK_PACKAGE.
11807dnl But "varname"_FOUND will not be marked for substition. Furthermore,
11808dnl a CPP define HAVE_"varname" will be placed in config.h (or added to
11809dnl the cc command line, depending on your configure.ac) and set to
11810dnl 1.
11811dnl
11812AC_DEFUN([XDT_CHECK_OPTIONAL_PACKAGE],
11813[
11814  AC_REQUIRE([XDT_PROG_PKG_CONFIG])
11815
11816  AC_ARG_ENABLE([$4],
11817AC_HELP_STRING([--enable-$4], [Enable checking for $5 (default=m4_default([$6], [yes]))])
11818AC_HELP_STRING([--disable-$4], [Disable checking for $5]),
11819    [xdt_cv_$1_check=$enableval], [xdt_cv_$1_check=m4_default([$6], [yes])])
11820
11821  if test x"$xdt_cv_$1_check" = x"yes"; then
11822    if $PKG_CONFIG --exists "$2 >= $3" >/dev/null 2>&1; then
11823      XDT_CHECK_PACKAGE([$1], [$2], [$3],
11824      [
11825        AC_DEFINE([HAVE_$1], [1], [Define if $2 >= $3 present])
11826        $1_FOUND="yes"
11827      ])
11828    else
11829      AC_MSG_CHECKING([for optional package $2 >= $3])
11830      AC_MSG_RESULT([not found])
11831    fi
11832  else
11833    AC_MSG_CHECKING([for optional package $2])
11834    AC_MSG_RESULT([disabled])
11835  fi
11836
11837  AM_CONDITIONAL([HAVE_$1], [test x"$$1_FOUND" = x"yes"])
11838])
11839
11840
11841
11842dnl XDT_CHECK_LIBX11()
11843dnl
11844dnl Executes various checks for X11. Sets LIBX11_CFLAGS, LIBX11_LDFLAGS
11845dnl and LIBX11_LIBS (and marks them for substitution). In addition
11846dnl HAVE_LIBX11 is set to 1 in config.h, if the X window system and
11847dnl the development files are detected on the target system.
11848dnl
11849AC_DEFUN([XDT_CHECK_LIBX11],
11850[
11851  AC_REQUIRE([AC_PATH_XTRA])
11852
11853  LIBX11_CFLAGS= LIBX11_LDFLAGS= LIBX11_LIBS=
11854  if test x"$no_x" != x"yes"; then
11855    AC_CHECK_LIB([X11], [main],
11856    [
11857      AC_DEFINE([HAVE_LIBX11], [1], [Define if libX11 is available])
11858      LIBX11_CFLAGS="$X_CFLAGS"
11859      for option in $X_PRE_LIBS $X_EXTRA_LIBS $X_LIBS; do
11860      	case "$option" in
11861        -L*)
11862          path=`echo $option | sed 's/^-L//'`
11863          if test x"$path" != x""; then
11864            LIBX11_LDFLAGS="$LIBX11_LDFLAGS -L$path"
11865          fi
11866          ;;
11867        *)
11868          LIBX11_LIBS="$LIBX11_LIBS $option"
11869          ;;
11870        esac
11871      done
11872      if ! echo $LIBX11_LIBS | grep -- '-lX11' >/dev/null; then
11873        LIBX11_LIBS="$LIBX11_LIBS -lX11"
11874      fi
11875    ], [], [$X_CFLAGS $X_PRE_LIBS $X_EXTRA_LIBS $X_LIBS])
11876  fi
11877  AC_SUBST([LIBX11_CFLAGS])
11878  AC_SUBST([LIBX11_LDFLAGS])
11879  AC_SUBST([LIBX11_LIBS])
11880])
11881
11882
11883
11884dnl XDT_CHECK_LIBX11_REQUIRE()
11885dnl
11886dnl Similar to XDT_CHECK_LIBX11(), but terminates with an error if
11887dnl the X window system and development files aren't detected on the
11888dnl target system.
11889dnl
11890AC_DEFUN([XDT_CHECK_LIBX11_REQUIRE],
11891[
11892  AC_REQUIRE([XDT_CHECK_LIBX11])
11893
11894  if test x"$no_x" = x"yes"; then
11895    AC_MSG_ERROR([X Window system libraries and header files are required])
11896  fi
11897])
11898
11899
11900
11901dnl XDT_CHECK_LIBSM()
11902dnl
11903dnl Checks whether the session management library is present on the
11904dnl target system, and sets LIBSM_CFLAGS, LIBSM_LDFLAGS and LIBSM_LIBS
11905dnl properly. In addition, HAVE_LIBSM will be set to 1 in config.h
11906dnl if libSM is detected.
11907dnl
11908AC_DEFUN([XDT_CHECK_LIBSM],
11909[
11910  AC_REQUIRE([XDT_CHECK_LIBX11])
11911
11912  LIBSM_CFLAGS= LIBSM_LDFLAGS= LIBSM_LIBS=
11913  if test x"$no_x" != x"yes"; then
11914    AC_CHECK_LIB([SM], [SmcSaveYourselfDone],
11915    [
11916      AC_DEFINE([HAVE_LIBSM], [1], [Define if libSM is available])
11917      LIBSM_CFLAGS="$LIBX11_CFLAGS"
11918      LIBSM_LDFLAGS="$LIBX11_LDFLAGS"
11919      LIBSM_LIBS="$LIBX11_LIBS"
11920      if ! echo $LIBSM_LIBS | grep -- '-lSM' >/dev/null; then
11921        LIBSM_LIBS="$LIBSM_LIBS -lSM -lICE"
11922      fi
11923    ], [], [$LIBX11_CFLAGS $LIBX11_LDFLAGS $LIBX11_LIBS -lICE])
11924  fi
11925  AC_SUBST([LIBSM_CFLAGS])
11926  AC_SUBST([LIBSM_LDFLAGS])
11927  AC_SUBST([LIBSM_LIBS])
11928])
11929
11930
11931
11932dnl XDT_CHECK_LIBXPM()
11933dnl
11934dnl Checks if the Xpm library is present on the target system, and
11935dnl sets LIBXPM_CFLAGS, LIBXPM_LDFLAGS and LIBXPM_LIBS. In addition,
11936dnl HAVE_LIBXPM will be set to 1 in config.h if libXpm is detected.
11937dnl
11938AC_DEFUN([XDT_CHECK_LIBXPM],
11939[
11940  AC_REQUIRE([XDT_CHECK_LIBX11])
11941
11942  LIBXPM_CFLAGS= LIBXPM_LDFLAGS= LIBXPM_LIBS=
11943  if test "$no_x" != "yes"; then
11944    AC_CHECK_LIB([Xpm], [main],
11945    [
11946      AC_DEFINE([HAVE_LIBXPM], [1], [Define if libXpm is available])
11947      LIBXPM_CFLAGS="$LIBX11_CFLAGS"
11948      LIBXPM_LDFLAGS="$LIBX11_LDFLAGS"
11949      LIBXPM_LIBS="$LIBX11_LIBS"
11950      if ! echo $LIBXPM_LIBS | grep -- '-lXpm' >/dev/null; then
11951        LIBXPM_LIBS="$LIBXPM_LIBS -lXpm"
11952      fi
11953    ], [], [$LIBX11_CFLAGS $LIBX11_LDFLAGS $LIBX11_LIBS -lXpm])
11954  fi
11955  AC_SUBST([LIBXPM_CFLAGS])
11956  AC_SUBST([LIBXPM_LDFLAGS])
11957  AC_SUBST([LIBXPM_LIBS])
11958])
11959
11960
11961
11962dnl XDT_CHECK_LIBXPM_REQUIRE()
11963dnl
11964dnl Similar to XDT_CHECK_LIBXPM(), but fails if the Xpm library isn't
11965dnl present on the target system.
11966dnl
11967AC_DEFUN([XDT_CHECK_LIBXPM_REQUIRE],
11968[
11969  AC_REQUIRE([XDT_CHECK_LIBX11_REQUIRE])
11970  AC_REQUIRE([XDT_CHECK_LIBXPM])
11971
11972  if test x"$LIBXPM_LIBS" = x""; then
11973    AC_MSG_ERROR([The Xpm library was not found on your system])
11974  fi
11975])
11976
11977
11978dnl Copyright (c) 2002-2015
11979dnl         The Xfce development team. All rights reserved.
11980dnl
11981dnl Written for Xfce by Benedikt Meurer <benny@xfce.org>.
11982dnl
11983dnl This program is free software; you can redistribute it and/or modify
11984dnl it under the terms of the GNU General Public License as published by
11985dnl the Free Software Foundation; either version 2 of the License, or
11986dnl (at your option) any later version.
11987dnl
11988dnl This program is distributed in the hope that it will be useful,
11989dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
11990dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11991dnl GNU General Public License for more details.
11992dnl
11993dnl You should have received a copy of the GNU General Public License along
11994dnl with this program; if not, write to the Free Software Foundation, Inc.,
11995dnl 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
11996dnl
11997dnl xdt-depends
11998dnl -----------
11999dnl  Contains M4 macros to check for software dependencies.
12000dnl  Partly based on prior work of the XDG contributors.
12001dnl
12002
12003
12004
12005dnl We need recent a autoconf version
12006AC_PREREQ([2.60])
12007
12008
12009dnl XDT_SUPPORTED_FLAGS(VAR, FLAGS)
12010dnl
12011dnl For each token in FLAGS, checks to be sure the compiler supports
12012dnl the flag, and if so, adds each one to VAR.
12013dnl
12014AC_DEFUN([XDT_SUPPORTED_FLAGS],
12015[
12016  for flag in $2; do
12017    AC_MSG_CHECKING([if $CC supports $flag])
12018    saved_CFLAGS="$CFLAGS"
12019    CFLAGS="$CFLAGS $flag"
12020    AC_COMPILE_IFELSE([AC_LANG_SOURCE([ ])], [flag_supported=yes], [flag_supported=no])
12021    CFLAGS="$saved_CFLAGS"
12022    AC_MSG_RESULT([$flag_supported])
12023
12024    if test "x$flag_supported" = "xyes"; then
12025      $1="$$1 $flag"
12026    fi
12027  done
12028])
12029
12030
12031
12032dnl XDT_FEATURE_DEBUG(default_level=minimum)
12033dnl
12034AC_DEFUN([XDT_FEATURE_DEBUG],
12035[
12036  dnl weird indentation to keep output indentation correct
12037  AC_ARG_ENABLE([debug],
12038                AC_HELP_STRING([--enable-debug@<:@=no|minimum|yes|full@:>@],
12039                               [Build with debugging support @<:@default=m4_default([$1], [minimum])@:>@])
12040AC_HELP_STRING([--disable-debug], [Include no debugging support]),
12041                [enable_debug=$enableval], [enable_debug=m4_default([$1], [minimum])])
12042
12043  AC_MSG_CHECKING([whether to build with debugging support])
12044  if test x"$enable_debug" = x"full" -o x"$enable_debug" = x"yes"; then
12045    AC_DEFINE([DEBUG], [1], [Define for debugging support])
12046
12047    xdt_cv_additional_CFLAGS="-DXFCE_DISABLE_DEPRECATED \
12048                              -Wall -Wextra \
12049                              -Wno-missing-field-initializers \
12050                              -Wno-unused-parameter -Wold-style-definition \
12051                              -Wdeclaration-after-statement \
12052                              -Wmissing-declarations \
12053                              -Wmissing-noreturn -Wpointer-arith \
12054                              -Wcast-align -Wformat -Wformat-security -Wformat-y2k \
12055                              -Winit-self -Wmissing-include-dirs -Wundef \
12056                              -Wnested-externs"
12057    CPPFLAGS="$CPPFLAGS"
12058
12059    if test x`uname` = x"Linux"; then
12060      xdt_cv_additional_CFLAGS="$xdt_cv_additional_CFLAGS -fstack-protector"
12061    fi
12062
12063    dnl # signal.h inline is crapy on openbsd
12064    if test x`uname` != x"OpenBSD"; then
12065      xdt_cv_additional_CFLAGS="$xdt_cv_additional_CFLAGS -Wredundant-decls"
12066    fi
12067
12068    if test x"$enable_debug" = x"full"; then
12069      AC_DEFINE([DEBUG_TRACE], [1], [Define for tracing support])
12070      xdt_cv_additional_CFLAGS="$xdt_cv_additional_CFLAGS -O0 -g -Werror"
12071      CPPFLAGS="$CPPFLAGS -DG_ENABLE_DEBUG"
12072      AC_MSG_RESULT([full])
12073    else
12074      xdt_cv_additional_CFLAGS="$xdt_cv_additional_CFLAGS -g -Wshadow"
12075      AC_MSG_RESULT([yes])
12076    fi
12077
12078    XDT_SUPPORTED_FLAGS([supported_CFLAGS], [$xdt_cv_additional_CFLAGS])
12079
12080    ifelse([$CXX], , , [
12081      dnl FIXME: should test on c++ compiler, but the following line causes
12082      dnl        autoconf errors for projects that don't check for a
12083      dnl        c++ compiler at all.
12084      dnl AC_LANG_PUSH([C++])
12085      dnl XDT_SUPPORTED_FLAGS([supported_CXXFLAGS], [$xdt_cv_additional_CFLAGS])
12086      dnl AC_LANG_POP()
12087      dnl        instead, just use supported_CFLAGS...
12088      supported_CXXFLAGS="$supported_CFLAGS"
12089    ])
12090
12091    CFLAGS="$CFLAGS $supported_CFLAGS"
12092    CXXFLAGS="$CXXFLAGS $supported_CXXFLAGS"
12093  else
12094    CPPFLAGS="$CPPFLAGS -DNDEBUG"
12095
12096    if test x"$enable_debug" = x"no"; then
12097      CPPFLAGS="$CPPFLAGS -DG_DISABLE_CAST_CHECKS -DG_DISABLE_ASSERT"
12098      AC_MSG_RESULT([no])
12099    else
12100      AC_MSG_RESULT([minimum])
12101    fi
12102  fi
12103])
12104
12105
12106dnl XDT_FEATURE_VISIBILITY()
12107dnl
12108dnl Checks to see if the compiler supports the 'visibility' attribute
12109dnl If so, adds -DHAVE_GNUC_VISIBILTY to CPPFLAGS.  Also sets the
12110dnl automake conditional HAVE_GNUC_VISIBILITY.
12111dnl
12112AC_DEFUN([XDT_FEATURE_VISIBILITY],
12113[
12114  AC_ARG_ENABLE([visibility],
12115                AC_HELP_STRING([--disable-visibility],
12116                               [Don't use ELF visibility attributes]),
12117                [enable_visibility=$enableval], [enable_visibility=yes])
12118  have_gnuc_visibility=no
12119  if test "x$enable_visibility" != "xno"; then
12120    XDT_SUPPORTED_FLAGS([xdt_vis_test_cflags], [-Wall -Werror -Wno-unused-parameter])
12121    saved_CFLAGS="$CFLAGS"
12122    CFLAGS="$CFLAGS $xdt_vis_test_cflags"
12123    AC_MSG_CHECKING([whether $CC supports the GNUC visibility attribute])
12124    AC_COMPILE_IFELSE([AC_LANG_SOURCE(
12125    [
12126      void test_default (void);
12127      void test_hidden (void);
12128
12129      void __attribute__ ((visibility("default"))) test_default (void) {}
12130      void __attribute__ ((visibility("hidden"))) test_hidden (void) {}
12131
12132      int main (int argc, char **argv) {
12133        test_default ();
12134        test_hidden ();
12135        return 0;
12136      }
12137    ])],
12138    [
12139      have_gnuc_visibility=yes
12140      AC_MSG_RESULT([yes])
12141    ],
12142    [
12143      AC_MSG_RESULT([no])
12144    ])
12145    CFLAGS="$saved_CFLAGS"
12146  fi
12147
12148  if test "x$have_gnuc_visibility" = "xyes"; then
12149    CPPFLAGS="$CPPFLAGS -DHAVE_GNUC_VISIBILITY"
12150    xdt_vis_hidden_cflags=""
12151    XDT_SUPPORTED_FLAGS([xdt_vis_hidden_cflags], [-xldscope=hidden])
12152    if test "x$xdt_vis_hidden_cflags" = "x"; then
12153      XDT_SUPPORTED_FLAGS([xdt_vis_hidden_cflags], [-fvisibility=hidden])
12154    fi
12155    CFLAGS="$CFLAGS $xdt_vis_hidden_cflags"
12156  fi
12157
12158  AM_CONDITIONAL([HAVE_GNUC_VISIBILITY], [test "x$have_gnuc_visibility" = "xyes"])
12159])
12160
12161dnl XDT_FEATURE_LINKER_OPTS
12162dnl
12163dnl Checks for and enables any special linker optimizations.
12164dnl
12165AC_DEFUN([XDT_FEATURE_LINKER_OPTS],
12166[
12167  AC_ARG_ENABLE([linker-opts],
12168                AC_HELP_STRING([--disable-linker-opts],
12169                               [Disable linker optimizations]),
12170                [enable_linker_opts=$enableval], [enable_linker_opts=yes])
12171
12172  if test "x$enable_linker_opts" != "xno"; then
12173    if test x`uname` != x"OpenBSD"; then
12174      AC_MSG_CHECKING([whether $LD accepts --as-needed])
12175      case `$LD --as-needed -v 2>&1 </dev/null` in
12176      *GNU* | *'with BFD'*)
12177        LDFLAGS="$LDFLAGS -Wl,--as-needed"
12178        AC_MSG_RESULT([yes])
12179        ;;
12180      *)
12181        AC_MSG_RESULT([no])
12182        ;;
12183      esac
12184    fi
12185    AC_MSG_CHECKING([whether $LD accepts -O1])
12186    case `$LD -O1 -v 2>&1 </dev/null` in
12187    *GNU* | *'with BFD'*)
12188      LDFLAGS="$LDFLAGS -Wl,-O1"
12189      AC_MSG_RESULT([yes])
12190      ;;
12191    *)
12192      AC_MSG_RESULT([no])
12193      ;;
12194    esac
12195  fi
12196])
12197
12198dnl Copyright (c) 2002-2015
12199dnl         The Xfce development team. All rights reserved.
12200dnl
12201dnl Written for Xfce by Benedikt Meurer <benny@xfce.org>.
12202dnl
12203dnl This program is free software; you can redistribute it and/or modify
12204dnl it under the terms of the GNU General Public License as published by
12205dnl the Free Software Foundation; either version 2 of the License, or
12206dnl (at your option) any later version.
12207dnl
12208dnl This program is distributed in the hope that it will be useful,
12209dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
12210dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12211dnl GNU General Public License for more details.
12212dnl
12213dnl You should have received a copy of the GNU General Public License along
12214dnl with this program; if not, write to the Free Software Foundation, Inc.,
12215dnl 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
12216dnl
12217dnl xdt-i18n
12218dnl --------
12219dnl  Internalization M4 macros.
12220dnl
12221
12222
12223dnl XDT_I18N([LINGUAS][, PACKAGE])
12224dnl
12225dnl This macro takes care of setting up everything for i18n support.
12226dnl
12227dnl If LINGUAS isn't specified, it will automatically extract the linguas
12228dnl from po/*.po.
12229dnl
12230dnl If PACKAGE isn't specified, it defaults to the package tarname; see
12231dnl the description of AC_INIT() for an explanation of what makes up
12232dnl the package tarname. Normally, you don't need to specify PACKAGE,
12233dnl but you can stick with the default.
12234dnl
12235AC_DEFUN([XDT_I18N],
12236[
12237  dnl Substitute GETTEXT_PACKAGE variable
12238  GETTEXT_PACKAGE=m4_default([$2], [AC_PACKAGE_TARNAME()])
12239  AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"], [Name of default gettext domain])
12240  AC_SUBST([GETTEXT_PACKAGE])
12241
12242  dnl gettext and stuff
12243  ALL_LINGUAS="m4_ifblank(
12244    [$1],
12245    [esyscmd([echo $(for i in po/*.po; do test -e "$i" && basename -- "$i" .po; done) | tr -d '\n'])],
12246    [$1])"
12247  AM_GLIB_GNU_GETTEXT()
12248
12249  dnl This is required on some Linux systems
12250  AC_CHECK_FUNC([bind_textdomain_codeset])
12251
12252  dnl Determine where to install locale files
12253  AC_MSG_CHECKING([for locales directory])
12254  AC_ARG_WITH([locales-dir],
12255  [
12256    AC_HELP_STRING([--with-locales-dir=DIR], [Install locales into DIR])
12257  ], [localedir=$withval],
12258  [
12259    if test x"$CATOBJEXT" = x".mo"; then
12260      localedir=$libdir/locale
12261    else
12262      localedir=$datarootdir/locale
12263    fi
12264  ])
12265  AC_MSG_RESULT([$localedir])
12266  AC_SUBST([localedir])
12267
12268  dnl Determine additional xgettext flags
12269  AC_MSG_CHECKING([for additional xgettext flags])
12270  if test x"$XGETTEXT_ARGS" = x""; then
12271    XGETTEXT_ARGS="--keyword=Q_ --from-code=UTF-8";
12272  else
12273    XGETTEXT_ARGS="$XGETTEXT_ARGS --keyword=Q_ --from-code=UTF-8";
12274  fi
12275  AC_SUBST([XGETTEXT_ARGS])
12276  AC_MSG_RESULT([$XGETTEXT_ARGS])
12277])
12278
12279
12280