1# generated automatically by aclocal 1.16.1 -*- Autoconf -*-
2
3# Copyright (C) 1996-2018 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-2018 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.1], [],
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.1])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-2018 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-2018 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-2018 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-2018 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.  Try re-running configure with the
375    '--disable-dependency-tracking' option to at least be able to build
376    the package (albeit without support for automatic dependency tracking).])
377  fi
378  AS_UNSET([am_dirpart])
379  AS_UNSET([am_filepart])
380  AS_UNSET([am_mf])
381  AS_UNSET([am_rc])
382  rm -f conftest-deps.mk
383}
384])# _AM_OUTPUT_DEPENDENCY_COMMANDS
385
386
387# AM_OUTPUT_DEPENDENCY_COMMANDS
388# -----------------------------
389# This macro should only be invoked once -- use via AC_REQUIRE.
390#
391# This code is only required when automatic dependency tracking is enabled.
392# This creates each '.Po' and '.Plo' makefile fragment that we'll need in
393# order to bootstrap the dependency handling code.
394AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
395[AC_CONFIG_COMMANDS([depfiles],
396     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
397     [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])])
398
399# Do all the work for Automake.                             -*- Autoconf -*-
400
401# Copyright (C) 1996-2018 Free Software Foundation, Inc.
402#
403# This file is free software; the Free Software Foundation
404# gives unlimited permission to copy and/or distribute it,
405# with or without modifications, as long as this notice is preserved.
406
407# This macro actually does too much.  Some checks are only needed if
408# your package does certain things.  But this isn't really a big deal.
409
410dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
411m4_define([AC_PROG_CC],
412m4_defn([AC_PROG_CC])
413[_AM_PROG_CC_C_O
414])
415
416# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
417# AM_INIT_AUTOMAKE([OPTIONS])
418# -----------------------------------------------
419# The call with PACKAGE and VERSION arguments is the old style
420# call (pre autoconf-2.50), which is being phased out.  PACKAGE
421# and VERSION should now be passed to AC_INIT and removed from
422# the call to AM_INIT_AUTOMAKE.
423# We support both call styles for the transition.  After
424# the next Automake release, Autoconf can make the AC_INIT
425# arguments mandatory, and then we can depend on a new Autoconf
426# release and drop the old call support.
427AC_DEFUN([AM_INIT_AUTOMAKE],
428[AC_PREREQ([2.65])dnl
429dnl Autoconf wants to disallow AM_ names.  We explicitly allow
430dnl the ones we care about.
431m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
432AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
433AC_REQUIRE([AC_PROG_INSTALL])dnl
434if test "`cd $srcdir && pwd`" != "`pwd`"; then
435  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
436  # is not polluted with repeated "-I."
437  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
438  # test to see if srcdir already configured
439  if test -f $srcdir/config.status; then
440    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
441  fi
442fi
443
444# test whether we have cygpath
445if test -z "$CYGPATH_W"; then
446  if (cygpath --version) >/dev/null 2>/dev/null; then
447    CYGPATH_W='cygpath -w'
448  else
449    CYGPATH_W=echo
450  fi
451fi
452AC_SUBST([CYGPATH_W])
453
454# Define the identity of the package.
455dnl Distinguish between old-style and new-style calls.
456m4_ifval([$2],
457[AC_DIAGNOSE([obsolete],
458             [$0: two- and three-arguments forms are deprecated.])
459m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
460 AC_SUBST([PACKAGE], [$1])dnl
461 AC_SUBST([VERSION], [$2])],
462[_AM_SET_OPTIONS([$1])dnl
463dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
464m4_if(
465  m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
466  [ok:ok],,
467  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
468 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
469 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
470
471_AM_IF_OPTION([no-define],,
472[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
473 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
474
475# Some tools Automake needs.
476AC_REQUIRE([AM_SANITY_CHECK])dnl
477AC_REQUIRE([AC_ARG_PROGRAM])dnl
478AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
479AM_MISSING_PROG([AUTOCONF], [autoconf])
480AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
481AM_MISSING_PROG([AUTOHEADER], [autoheader])
482AM_MISSING_PROG([MAKEINFO], [makeinfo])
483AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
484AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
485AC_REQUIRE([AC_PROG_MKDIR_P])dnl
486# For better backward compatibility.  To be removed once Automake 1.9.x
487# dies out for good.  For more background, see:
488# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
489# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
490AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
491# We need awk for the "check" target (and possibly the TAP driver).  The
492# system "awk" is bad on some platforms.
493AC_REQUIRE([AC_PROG_AWK])dnl
494AC_REQUIRE([AC_PROG_MAKE_SET])dnl
495AC_REQUIRE([AM_SET_LEADING_DOT])dnl
496_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
497	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
498			     [_AM_PROG_TAR([v7])])])
499_AM_IF_OPTION([no-dependencies],,
500[AC_PROVIDE_IFELSE([AC_PROG_CC],
501		  [_AM_DEPENDENCIES([CC])],
502		  [m4_define([AC_PROG_CC],
503			     m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
504AC_PROVIDE_IFELSE([AC_PROG_CXX],
505		  [_AM_DEPENDENCIES([CXX])],
506		  [m4_define([AC_PROG_CXX],
507			     m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
508AC_PROVIDE_IFELSE([AC_PROG_OBJC],
509		  [_AM_DEPENDENCIES([OBJC])],
510		  [m4_define([AC_PROG_OBJC],
511			     m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
512AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
513		  [_AM_DEPENDENCIES([OBJCXX])],
514		  [m4_define([AC_PROG_OBJCXX],
515			     m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
516])
517AC_REQUIRE([AM_SILENT_RULES])dnl
518dnl The testsuite driver may need to know about EXEEXT, so add the
519dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
520dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
521AC_CONFIG_COMMANDS_PRE(dnl
522[m4_provide_if([_AM_COMPILER_EXEEXT],
523  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
524
525# POSIX will say in a future version that running "rm -f" with no argument
526# is OK; and we want to be able to make that assumption in our Makefile
527# recipes.  So use an aggressive probe to check that the usage we want is
528# actually supported "in the wild" to an acceptable degree.
529# See automake bug#10828.
530# To make any issue more visible, cause the running configure to be aborted
531# by default if the 'rm' program in use doesn't match our expectations; the
532# user can still override this though.
533if rm -f && rm -fr && rm -rf; then : OK; else
534  cat >&2 <<'END'
535Oops!
536
537Your 'rm' program seems unable to run without file operands specified
538on the command line, even when the '-f' option is present.  This is contrary
539to the behaviour of most rm programs out there, and not conforming with
540the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
541
542Please tell bug-automake@gnu.org about your system, including the value
543of your $PATH and any error possibly output before this message.  This
544can help us improve future automake versions.
545
546END
547  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
548    echo 'Configuration will proceed anyway, since you have set the' >&2
549    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
550    echo >&2
551  else
552    cat >&2 <<'END'
553Aborting the configuration process, to ensure you take notice of the issue.
554
555You can download and install GNU coreutils to get an 'rm' implementation
556that behaves properly: <https://www.gnu.org/software/coreutils/>.
557
558If you want to complete the configuration process using your problematic
559'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
560to "yes", and re-run configure.
561
562END
563    AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
564  fi
565fi
566dnl The trailing newline in this macro's definition is deliberate, for
567dnl backward compatibility and to allow trailing 'dnl'-style comments
568dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
569])
570
571dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
572dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
573dnl mangled by Autoconf and run in a shell conditional statement.
574m4_define([_AC_COMPILER_EXEEXT],
575m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
576
577# When config.status generates a header, we must update the stamp-h file.
578# This file resides in the same directory as the config header
579# that is generated.  The stamp files are numbered to have different names.
580
581# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
582# loop where config.status creates the headers, so we can generate
583# our stamp files there.
584AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
585[# Compute $1's index in $config_headers.
586_am_arg=$1
587_am_stamp_count=1
588for _am_header in $config_headers :; do
589  case $_am_header in
590    $_am_arg | $_am_arg:* )
591      break ;;
592    * )
593      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
594  esac
595done
596echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
597
598# Copyright (C) 2001-2018 Free Software Foundation, Inc.
599#
600# This file is free software; the Free Software Foundation
601# gives unlimited permission to copy and/or distribute it,
602# with or without modifications, as long as this notice is preserved.
603
604# AM_PROG_INSTALL_SH
605# ------------------
606# Define $install_sh.
607AC_DEFUN([AM_PROG_INSTALL_SH],
608[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
609if test x"${install_sh+set}" != xset; then
610  case $am_aux_dir in
611  *\ * | *\	*)
612    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
613  *)
614    install_sh="\${SHELL} $am_aux_dir/install-sh"
615  esac
616fi
617AC_SUBST([install_sh])])
618
619# Copyright (C) 2003-2018 Free Software Foundation, Inc.
620#
621# This file is free software; the Free Software Foundation
622# gives unlimited permission to copy and/or distribute it,
623# with or without modifications, as long as this notice is preserved.
624
625# Check whether the underlying file-system supports filenames
626# with a leading dot.  For instance MS-DOS doesn't.
627AC_DEFUN([AM_SET_LEADING_DOT],
628[rm -rf .tst 2>/dev/null
629mkdir .tst 2>/dev/null
630if test -d .tst; then
631  am__leading_dot=.
632else
633  am__leading_dot=_
634fi
635rmdir .tst 2>/dev/null
636AC_SUBST([am__leading_dot])])
637
638# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
639# From Jim Meyering
640
641# Copyright (C) 1996-2018 Free Software Foundation, Inc.
642#
643# This file is free software; the Free Software Foundation
644# gives unlimited permission to copy and/or distribute it,
645# with or without modifications, as long as this notice is preserved.
646
647# AM_MAINTAINER_MODE([DEFAULT-MODE])
648# ----------------------------------
649# Control maintainer-specific portions of Makefiles.
650# Default is to disable them, unless 'enable' is passed literally.
651# For symmetry, 'disable' may be passed as well.  Anyway, the user
652# can override the default with the --enable/--disable switch.
653AC_DEFUN([AM_MAINTAINER_MODE],
654[m4_case(m4_default([$1], [disable]),
655       [enable], [m4_define([am_maintainer_other], [disable])],
656       [disable], [m4_define([am_maintainer_other], [enable])],
657       [m4_define([am_maintainer_other], [enable])
658        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
659AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
660  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
661  AC_ARG_ENABLE([maintainer-mode],
662    [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
663      am_maintainer_other[ make rules and dependencies not useful
664      (and sometimes confusing) to the casual installer])],
665    [USE_MAINTAINER_MODE=$enableval],
666    [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
667  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
668  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
669  MAINT=$MAINTAINER_MODE_TRUE
670  AC_SUBST([MAINT])dnl
671]
672)
673
674# Check to see how 'make' treats includes.	            -*- Autoconf -*-
675
676# Copyright (C) 2001-2018 Free Software Foundation, Inc.
677#
678# This file is free software; the Free Software Foundation
679# gives unlimited permission to copy and/or distribute it,
680# with or without modifications, as long as this notice is preserved.
681
682# AM_MAKE_INCLUDE()
683# -----------------
684# Check whether make has an 'include' directive that can support all
685# the idioms we need for our automatic dependency tracking code.
686AC_DEFUN([AM_MAKE_INCLUDE],
687[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive])
688cat > confinc.mk << 'END'
689am__doit:
690	@echo this is the am__doit target >confinc.out
691.PHONY: am__doit
692END
693am__include="#"
694am__quote=
695# BSD make does it like this.
696echo '.include "confinc.mk" # ignored' > confmf.BSD
697# Other make implementations (GNU, Solaris 10, AIX) do it like this.
698echo 'include confinc.mk # ignored' > confmf.GNU
699_am_result=no
700for s in GNU BSD; do
701  AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out])
702  AS_CASE([$?:`cat confinc.out 2>/dev/null`],
703      ['0:this is the am__doit target'],
704      [AS_CASE([$s],
705          [BSD], [am__include='.include' am__quote='"'],
706          [am__include='include' am__quote=''])])
707  if test "$am__include" != "#"; then
708    _am_result="yes ($s style)"
709    break
710  fi
711done
712rm -f confinc.* confmf.*
713AC_MSG_RESULT([${_am_result}])
714AC_SUBST([am__include])])
715AC_SUBST([am__quote])])
716
717# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
718
719# Copyright (C) 1997-2018 Free Software Foundation, Inc.
720#
721# This file is free software; the Free Software Foundation
722# gives unlimited permission to copy and/or distribute it,
723# with or without modifications, as long as this notice is preserved.
724
725# AM_MISSING_PROG(NAME, PROGRAM)
726# ------------------------------
727AC_DEFUN([AM_MISSING_PROG],
728[AC_REQUIRE([AM_MISSING_HAS_RUN])
729$1=${$1-"${am_missing_run}$2"}
730AC_SUBST($1)])
731
732# AM_MISSING_HAS_RUN
733# ------------------
734# Define MISSING if not defined so far and test if it is modern enough.
735# If it is, set am_missing_run to use it, otherwise, to nothing.
736AC_DEFUN([AM_MISSING_HAS_RUN],
737[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
738AC_REQUIRE_AUX_FILE([missing])dnl
739if test x"${MISSING+set}" != xset; then
740  case $am_aux_dir in
741  *\ * | *\	*)
742    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
743  *)
744    MISSING="\${SHELL} $am_aux_dir/missing" ;;
745  esac
746fi
747# Use eval to expand $SHELL
748if eval "$MISSING --is-lightweight"; then
749  am_missing_run="$MISSING "
750else
751  am_missing_run=
752  AC_MSG_WARN(['missing' script is too old or missing])
753fi
754])
755
756#  -*- Autoconf -*-
757# Obsolete and "removed" macros, that must however still report explicit
758# error messages when used, to smooth transition.
759#
760# Copyright (C) 1996-2018 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
766AC_DEFUN([AM_CONFIG_HEADER],
767[AC_DIAGNOSE([obsolete],
768['$0': this macro is obsolete.
769You should use the 'AC][_CONFIG_HEADERS' macro instead.])dnl
770AC_CONFIG_HEADERS($@)])
771
772AC_DEFUN([AM_PROG_CC_STDC],
773[AC_PROG_CC
774am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
775AC_DIAGNOSE([obsolete],
776['$0': this macro is obsolete.
777You should simply use the 'AC][_PROG_CC' macro instead.
778Also, your code should no longer depend upon 'am_cv_prog_cc_stdc',
779but upon 'ac_cv_prog_cc_stdc'.])])
780
781AC_DEFUN([AM_C_PROTOTYPES],
782         [AC_FATAL([automatic de-ANSI-fication support has been removed])])
783AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES])
784
785# Helper functions for option handling.                     -*- Autoconf -*-
786
787# Copyright (C) 2001-2018 Free Software Foundation, Inc.
788#
789# This file is free software; the Free Software Foundation
790# gives unlimited permission to copy and/or distribute it,
791# with or without modifications, as long as this notice is preserved.
792
793# _AM_MANGLE_OPTION(NAME)
794# -----------------------
795AC_DEFUN([_AM_MANGLE_OPTION],
796[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
797
798# _AM_SET_OPTION(NAME)
799# --------------------
800# Set option NAME.  Presently that only means defining a flag for this option.
801AC_DEFUN([_AM_SET_OPTION],
802[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
803
804# _AM_SET_OPTIONS(OPTIONS)
805# ------------------------
806# OPTIONS is a space-separated list of Automake options.
807AC_DEFUN([_AM_SET_OPTIONS],
808[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
809
810# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
811# -------------------------------------------
812# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
813AC_DEFUN([_AM_IF_OPTION],
814[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
815
816# Copyright (C) 1999-2018 Free Software Foundation, Inc.
817#
818# This file is free software; the Free Software Foundation
819# gives unlimited permission to copy and/or distribute it,
820# with or without modifications, as long as this notice is preserved.
821
822# _AM_PROG_CC_C_O
823# ---------------
824# Like AC_PROG_CC_C_O, but changed for automake.  We rewrite AC_PROG_CC
825# to automatically call this.
826AC_DEFUN([_AM_PROG_CC_C_O],
827[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
828AC_REQUIRE_AUX_FILE([compile])dnl
829AC_LANG_PUSH([C])dnl
830AC_CACHE_CHECK(
831  [whether $CC understands -c and -o together],
832  [am_cv_prog_cc_c_o],
833  [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
834  # Make sure it works both with $CC and with simple cc.
835  # Following AC_PROG_CC_C_O, we do the test twice because some
836  # compilers refuse to overwrite an existing .o file with -o,
837  # though they will create one.
838  am_cv_prog_cc_c_o=yes
839  for am_i in 1 2; do
840    if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
841         && test -f conftest2.$ac_objext; then
842      : OK
843    else
844      am_cv_prog_cc_c_o=no
845      break
846    fi
847  done
848  rm -f core conftest*
849  unset am_i])
850if test "$am_cv_prog_cc_c_o" != yes; then
851   # Losing compiler, so override with the script.
852   # FIXME: It is wrong to rewrite CC.
853   # But if we don't then we get into trouble of one sort or another.
854   # A longer-term fix would be to have automake use am__CC in this case,
855   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
856   CC="$am_aux_dir/compile $CC"
857fi
858AC_LANG_POP([C])])
859
860# For backward compatibility.
861AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
862
863# Copyright (C) 2001-2018 Free Software Foundation, Inc.
864#
865# This file is free software; the Free Software Foundation
866# gives unlimited permission to copy and/or distribute it,
867# with or without modifications, as long as this notice is preserved.
868
869# AM_RUN_LOG(COMMAND)
870# -------------------
871# Run COMMAND, save the exit status in ac_status, and log it.
872# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
873AC_DEFUN([AM_RUN_LOG],
874[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
875   ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
876   ac_status=$?
877   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
878   (exit $ac_status); }])
879
880# Check to make sure that the build environment is sane.    -*- Autoconf -*-
881
882# Copyright (C) 1996-2018 Free Software Foundation, Inc.
883#
884# This file is free software; the Free Software Foundation
885# gives unlimited permission to copy and/or distribute it,
886# with or without modifications, as long as this notice is preserved.
887
888# AM_SANITY_CHECK
889# ---------------
890AC_DEFUN([AM_SANITY_CHECK],
891[AC_MSG_CHECKING([whether build environment is sane])
892# Reject unsafe characters in $srcdir or the absolute working directory
893# name.  Accept space and tab only in the latter.
894am_lf='
895'
896case `pwd` in
897  *[[\\\"\#\$\&\'\`$am_lf]]*)
898    AC_MSG_ERROR([unsafe absolute working directory name]);;
899esac
900case $srcdir in
901  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
902    AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
903esac
904
905# Do 'set' in a subshell so we don't clobber the current shell's
906# arguments.  Must try -L first in case configure is actually a
907# symlink; some systems play weird games with the mod time of symlinks
908# (eg FreeBSD returns the mod time of the symlink's containing
909# directory).
910if (
911   am_has_slept=no
912   for am_try in 1 2; do
913     echo "timestamp, slept: $am_has_slept" > conftest.file
914     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
915     if test "$[*]" = "X"; then
916	# -L didn't work.
917	set X `ls -t "$srcdir/configure" conftest.file`
918     fi
919     if test "$[*]" != "X $srcdir/configure conftest.file" \
920	&& test "$[*]" != "X conftest.file $srcdir/configure"; then
921
922	# If neither matched, then we have a broken ls.  This can happen
923	# if, for instance, CONFIG_SHELL is bash and it inherits a
924	# broken ls alias from the environment.  This has actually
925	# happened.  Such a system could not be considered "sane".
926	AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
927  alias in your environment])
928     fi
929     if test "$[2]" = conftest.file || test $am_try -eq 2; then
930       break
931     fi
932     # Just in case.
933     sleep 1
934     am_has_slept=yes
935   done
936   test "$[2]" = conftest.file
937   )
938then
939   # Ok.
940   :
941else
942   AC_MSG_ERROR([newly created file is older than distributed files!
943Check your system clock])
944fi
945AC_MSG_RESULT([yes])
946# If we didn't sleep, we still need to ensure time stamps of config.status and
947# generated files are strictly newer.
948am_sleep_pid=
949if grep 'slept: no' conftest.file >/dev/null 2>&1; then
950  ( sleep 1 ) &
951  am_sleep_pid=$!
952fi
953AC_CONFIG_COMMANDS_PRE(
954  [AC_MSG_CHECKING([that generated files are newer than configure])
955   if test -n "$am_sleep_pid"; then
956     # Hide warnings about reused PIDs.
957     wait $am_sleep_pid 2>/dev/null
958   fi
959   AC_MSG_RESULT([done])])
960rm -f conftest.file
961])
962
963# Copyright (C) 2009-2018 Free Software Foundation, Inc.
964#
965# This file is free software; the Free Software Foundation
966# gives unlimited permission to copy and/or distribute it,
967# with or without modifications, as long as this notice is preserved.
968
969# AM_SILENT_RULES([DEFAULT])
970# --------------------------
971# Enable less verbose build rules; with the default set to DEFAULT
972# ("yes" being less verbose, "no" or empty being verbose).
973AC_DEFUN([AM_SILENT_RULES],
974[AC_ARG_ENABLE([silent-rules], [dnl
975AS_HELP_STRING(
976  [--enable-silent-rules],
977  [less verbose build output (undo: "make V=1")])
978AS_HELP_STRING(
979  [--disable-silent-rules],
980  [verbose build output (undo: "make V=0")])dnl
981])
982case $enable_silent_rules in @%:@ (((
983  yes) AM_DEFAULT_VERBOSITY=0;;
984   no) AM_DEFAULT_VERBOSITY=1;;
985    *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
986esac
987dnl
988dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
989dnl do not support nested variable expansions.
990dnl See automake bug#9928 and bug#10237.
991am_make=${MAKE-make}
992AC_CACHE_CHECK([whether $am_make supports nested variables],
993   [am_cv_make_support_nested_variables],
994   [if AS_ECHO([['TRUE=$(BAR$(V))
995BAR0=false
996BAR1=true
997V=1
998am__doit:
999	@$(TRUE)
1000.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
1001  am_cv_make_support_nested_variables=yes
1002else
1003  am_cv_make_support_nested_variables=no
1004fi])
1005if test $am_cv_make_support_nested_variables = yes; then
1006  dnl Using '$V' instead of '$(V)' breaks IRIX make.
1007  AM_V='$(V)'
1008  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
1009else
1010  AM_V=$AM_DEFAULT_VERBOSITY
1011  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
1012fi
1013AC_SUBST([AM_V])dnl
1014AM_SUBST_NOTMAKE([AM_V])dnl
1015AC_SUBST([AM_DEFAULT_V])dnl
1016AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
1017AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
1018AM_BACKSLASH='\'
1019AC_SUBST([AM_BACKSLASH])dnl
1020_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
1021])
1022
1023# Copyright (C) 2001-2018 Free Software Foundation, Inc.
1024#
1025# This file is free software; the Free Software Foundation
1026# gives unlimited permission to copy and/or distribute it,
1027# with or without modifications, as long as this notice is preserved.
1028
1029# AM_PROG_INSTALL_STRIP
1030# ---------------------
1031# One issue with vendor 'install' (even GNU) is that you can't
1032# specify the program used to strip binaries.  This is especially
1033# annoying in cross-compiling environments, where the build's strip
1034# is unlikely to handle the host's binaries.
1035# Fortunately install-sh will honor a STRIPPROG variable, so we
1036# always use install-sh in "make install-strip", and initialize
1037# STRIPPROG with the value of the STRIP variable (set by the user).
1038AC_DEFUN([AM_PROG_INSTALL_STRIP],
1039[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1040# Installed binaries are usually stripped using 'strip' when the user
1041# run "make install-strip".  However 'strip' might not be the right
1042# tool to use in cross-compilation environments, therefore Automake
1043# will honor the 'STRIP' environment variable to overrule this program.
1044dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
1045if test "$cross_compiling" != no; then
1046  AC_CHECK_TOOL([STRIP], [strip], :)
1047fi
1048INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1049AC_SUBST([INSTALL_STRIP_PROGRAM])])
1050
1051# Copyright (C) 2006-2018 Free Software Foundation, Inc.
1052#
1053# This file is free software; the Free Software Foundation
1054# gives unlimited permission to copy and/or distribute it,
1055# with or without modifications, as long as this notice is preserved.
1056
1057# _AM_SUBST_NOTMAKE(VARIABLE)
1058# ---------------------------
1059# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1060# This macro is traced by Automake.
1061AC_DEFUN([_AM_SUBST_NOTMAKE])
1062
1063# AM_SUBST_NOTMAKE(VARIABLE)
1064# --------------------------
1065# Public sister of _AM_SUBST_NOTMAKE.
1066AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1067
1068# Check how to create a tarball.                            -*- Autoconf -*-
1069
1070# Copyright (C) 2004-2018 Free Software Foundation, Inc.
1071#
1072# This file is free software; the Free Software Foundation
1073# gives unlimited permission to copy and/or distribute it,
1074# with or without modifications, as long as this notice is preserved.
1075
1076# _AM_PROG_TAR(FORMAT)
1077# --------------------
1078# Check how to create a tarball in format FORMAT.
1079# FORMAT should be one of 'v7', 'ustar', or 'pax'.
1080#
1081# Substitute a variable $(am__tar) that is a command
1082# writing to stdout a FORMAT-tarball containing the directory
1083# $tardir.
1084#     tardir=directory && $(am__tar) > result.tar
1085#
1086# Substitute a variable $(am__untar) that extract such
1087# a tarball read from stdin.
1088#     $(am__untar) < result.tar
1089#
1090AC_DEFUN([_AM_PROG_TAR],
1091[# Always define AMTAR for backward compatibility.  Yes, it's still used
1092# in the wild :-(  We should find a proper way to deprecate it ...
1093AC_SUBST([AMTAR], ['$${TAR-tar}'])
1094
1095# We'll loop over all known methods to create a tar archive until one works.
1096_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1097
1098m4_if([$1], [v7],
1099  [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
1100
1101  [m4_case([$1],
1102    [ustar],
1103     [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
1104      # There is notably a 21 bits limit for the UID and the GID.  In fact,
1105      # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
1106      # and bug#13588).
1107      am_max_uid=2097151 # 2^21 - 1
1108      am_max_gid=$am_max_uid
1109      # The $UID and $GID variables are not portable, so we need to resort
1110      # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
1111      # below are definitely unexpected, so allow the users to see them
1112      # (that is, avoid stderr redirection).
1113      am_uid=`id -u || echo unknown`
1114      am_gid=`id -g || echo unknown`
1115      AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
1116      if test $am_uid -le $am_max_uid; then
1117         AC_MSG_RESULT([yes])
1118      else
1119         AC_MSG_RESULT([no])
1120         _am_tools=none
1121      fi
1122      AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
1123      if test $am_gid -le $am_max_gid; then
1124         AC_MSG_RESULT([yes])
1125      else
1126        AC_MSG_RESULT([no])
1127        _am_tools=none
1128      fi],
1129
1130  [pax],
1131    [],
1132
1133  [m4_fatal([Unknown tar format])])
1134
1135  AC_MSG_CHECKING([how to create a $1 tar archive])
1136
1137  # Go ahead even if we have the value already cached.  We do so because we
1138  # need to set the values for the 'am__tar' and 'am__untar' variables.
1139  _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1140
1141  for _am_tool in $_am_tools; do
1142    case $_am_tool in
1143    gnutar)
1144      for _am_tar in tar gnutar gtar; do
1145        AM_RUN_LOG([$_am_tar --version]) && break
1146      done
1147      am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1148      am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1149      am__untar="$_am_tar -xf -"
1150      ;;
1151    plaintar)
1152      # Must skip GNU tar: if it does not support --format= it doesn't create
1153      # ustar tarball either.
1154      (tar --version) >/dev/null 2>&1 && continue
1155      am__tar='tar chf - "$$tardir"'
1156      am__tar_='tar chf - "$tardir"'
1157      am__untar='tar xf -'
1158      ;;
1159    pax)
1160      am__tar='pax -L -x $1 -w "$$tardir"'
1161      am__tar_='pax -L -x $1 -w "$tardir"'
1162      am__untar='pax -r'
1163      ;;
1164    cpio)
1165      am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1166      am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1167      am__untar='cpio -i -H $1 -d'
1168      ;;
1169    none)
1170      am__tar=false
1171      am__tar_=false
1172      am__untar=false
1173      ;;
1174    esac
1175
1176    # If the value was cached, stop now.  We just wanted to have am__tar
1177    # and am__untar set.
1178    test -n "${am_cv_prog_tar_$1}" && break
1179
1180    # tar/untar a dummy directory, and stop if the command works.
1181    rm -rf conftest.dir
1182    mkdir conftest.dir
1183    echo GrepMe > conftest.dir/file
1184    AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1185    rm -rf conftest.dir
1186    if test -s conftest.tar; then
1187      AM_RUN_LOG([$am__untar <conftest.tar])
1188      AM_RUN_LOG([cat conftest.dir/file])
1189      grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1190    fi
1191  done
1192  rm -rf conftest.dir
1193
1194  AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1195  AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1196
1197AC_SUBST([am__tar])
1198AC_SUBST([am__untar])
1199]) # _AM_PROG_TAR
1200
1201# Copyright (C) 1995-2002 Free Software Foundation, Inc.
1202# Copyright (C) 2001-2003,2004 Red Hat, Inc.
1203#
1204# This file is free software, distributed under the terms of the GNU
1205# General Public License.  As a special exception to the GNU General
1206# Public License, this file may be distributed as part of a program
1207# that contains a configuration script generated by Autoconf, under
1208# the same distribution terms as the rest of that program.
1209#
1210# This file can be copied and used freely without restrictions.  It can
1211# be used in projects which are not available under the GNU Public License
1212# but which still want to provide support for the GNU gettext functionality.
1213#
1214# Macro to add for using GNU gettext.
1215# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
1216#
1217# Modified to never use included libintl.
1218# Owen Taylor <otaylor@redhat.com>, 12/15/1998
1219#
1220# Major rework to remove unused code
1221# Owen Taylor <otaylor@redhat.com>, 12/11/2002
1222#
1223# Added better handling of ALL_LINGUAS from GNU gettext version
1224# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
1225#
1226# Modified to require ngettext
1227# Matthias Clasen <mclasen@redhat.com> 08/06/2004
1228
1229# Increment this whenever this file is changed.
1230#serial 1
1231
1232# We need this here as well, since someone might use autoconf-2.5x
1233# to configure GLib then an older version to configure a package
1234# using AM_GLIB_GNU_GETTEXT
1235AC_PREREQ(2.53)
1236
1237dnl
1238dnl We go to great lengths to make sure that aclocal won't
1239dnl try to pull in the installed version of these macros
1240dnl when running aclocal in the glib directory.
1241dnl
1242m4_copy([AC_DEFUN],[glib_DEFUN])
1243m4_copy([AC_REQUIRE],[glib_REQUIRE])
1244dnl
1245dnl At the end, if we're not within glib, we'll define the public
1246dnl definitions in terms of our private definitions.
1247dnl
1248
1249# GLIB_LC_MESSAGES
1250#--------------------
1251glib_DEFUN([GLIB_LC_MESSAGES],
1252  [AC_CHECK_HEADERS([locale.h])
1253    if test $ac_cv_header_locale_h = yes; then
1254    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
1255      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
1256       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
1257    if test $am_cv_val_LC_MESSAGES = yes; then
1258      AC_DEFINE(HAVE_LC_MESSAGES, 1,
1259        [Define if your <locale.h> file defines LC_MESSAGES.])
1260    fi
1261  fi])
1262
1263# GLIB_PATH_PROG_WITH_TEST
1264#----------------------------
1265dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
1266dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
1267glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
1268[# Extract the first word of "$2", so it can be a program name with args.
1269set dummy $2; ac_word=[$]2
1270AC_MSG_CHECKING([for $ac_word])
1271AC_CACHE_VAL(ac_cv_path_$1,
1272[case "[$]$1" in
1273  /*)
1274  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
1275  ;;
1276  *)
1277  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1278  for ac_dir in ifelse([$5], , $PATH, [$5]); do
1279    test -z "$ac_dir" && ac_dir=.
1280    if test -f $ac_dir/$ac_word; then
1281      if [$3]; then
1282	ac_cv_path_$1="$ac_dir/$ac_word"
1283	break
1284      fi
1285    fi
1286  done
1287  IFS="$ac_save_ifs"
1288dnl If no 4th arg is given, leave the cache variable unset,
1289dnl so AC_PATH_PROGS will keep looking.
1290ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
1291])dnl
1292  ;;
1293esac])dnl
1294$1="$ac_cv_path_$1"
1295if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
1296  AC_MSG_RESULT([$]$1)
1297else
1298  AC_MSG_RESULT(no)
1299fi
1300AC_SUBST($1)dnl
1301])
1302
1303dnl Checks for special options needed on Mac OS X.
1304dnl Defines INTL_MACOSX_LIBS.
1305dnl
1306dnl Copied from intlmacosx.m4 in gettext, GPL.
1307dnl Copyright (C) 2004-2013 Free Software Foundation, Inc.
1308glib_DEFUN([glib_gt_INTL_MACOSX],
1309[
1310  dnl Check for API introduced in Mac OS X 10.2.
1311  AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
1312    [gt_cv_func_CFPreferencesCopyAppValue],
1313    [gt_save_LIBS="$LIBS"
1314     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
1315     AC_LINK_IFELSE(
1316       [AC_LANG_PROGRAM(
1317          [[#include <CoreFoundation/CFPreferences.h>]],
1318          [[CFPreferencesCopyAppValue(NULL, NULL)]])],
1319       [gt_cv_func_CFPreferencesCopyAppValue=yes],
1320       [gt_cv_func_CFPreferencesCopyAppValue=no])
1321     LIBS="$gt_save_LIBS"])
1322  if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
1323    AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1],
1324      [Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
1325  fi
1326  dnl Check for API introduced in Mac OS X 10.3.
1327  AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent],
1328    [gt_save_LIBS="$LIBS"
1329     LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
1330     AC_LINK_IFELSE(
1331       [AC_LANG_PROGRAM(
1332          [[#include <CoreFoundation/CFLocale.h>]],
1333          [[CFLocaleCopyCurrent();]])],
1334       [gt_cv_func_CFLocaleCopyCurrent=yes],
1335       [gt_cv_func_CFLocaleCopyCurrent=no])
1336     LIBS="$gt_save_LIBS"])
1337  if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
1338    AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1],
1339      [Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
1340  fi
1341  INTL_MACOSX_LIBS=
1342  if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
1343    INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
1344  fi
1345  AC_SUBST([INTL_MACOSX_LIBS])
1346])
1347
1348# GLIB_WITH_NLS
1349#-----------------
1350glib_DEFUN([GLIB_WITH_NLS],
1351  dnl NLS is obligatory
1352  [USE_NLS=yes
1353    AC_SUBST(USE_NLS)
1354
1355    gt_cv_have_gettext=no
1356
1357    CATOBJEXT=NONE
1358    XGETTEXT=:
1359    INTLLIBS=
1360
1361    glib_gt_INTL_MACOSX
1362
1363    AC_CHECK_HEADER(libintl.h,
1364     [gt_cv_func_dgettext_libintl="no"
1365      libintl_extra_libs=""
1366
1367      #
1368      # First check in libc
1369      #
1370      AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
1371        [AC_TRY_LINK([
1372#include <libintl.h>
1373],
1374         [return !ngettext ("","", 1)],
1375	  gt_cv_func_ngettext_libc=yes,
1376          gt_cv_func_ngettext_libc=no)
1377        ])
1378
1379      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
1380	      AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
1381        	[AC_TRY_LINK([
1382#include <libintl.h>
1383],
1384	          [return !dgettext ("","")],
1385		  gt_cv_func_dgettext_libc=yes,
1386	          gt_cv_func_dgettext_libc=no)
1387        	])
1388      fi
1389
1390      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
1391        AC_CHECK_FUNCS(bind_textdomain_codeset)
1392      fi
1393
1394      #
1395      # If we don't have everything we want, check in libintl
1396      #
1397      if test "$gt_cv_func_dgettext_libc" != "yes" \
1398	 || test "$gt_cv_func_ngettext_libc" != "yes" \
1399         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
1400
1401        AC_CHECK_LIB(intl, bindtextdomain,
1402	    [AC_CHECK_LIB(intl, ngettext,
1403		    [AC_CHECK_LIB(intl, dgettext,
1404			          gt_cv_func_dgettext_libintl=yes)])])
1405
1406	if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
1407	  AC_MSG_CHECKING([if -liconv is needed to use gettext])
1408	  AC_MSG_RESULT([])
1409  	  AC_CHECK_LIB(intl, ngettext,
1410          	[AC_CHECK_LIB(intl, dcgettext,
1411		       [gt_cv_func_dgettext_libintl=yes
1412			libintl_extra_libs=-liconv],
1413			:,-liconv)],
1414		:,-liconv)
1415        fi
1416
1417        #
1418        # If we found libintl, then check in it for bind_textdomain_codeset();
1419        # we'll prefer libc if neither have bind_textdomain_codeset(),
1420        # and both have dgettext and ngettext
1421        #
1422        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
1423          glib_save_LIBS="$LIBS"
1424          LIBS="$LIBS -lintl $libintl_extra_libs"
1425          unset ac_cv_func_bind_textdomain_codeset
1426          AC_CHECK_FUNCS(bind_textdomain_codeset)
1427          LIBS="$glib_save_LIBS"
1428
1429          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
1430            gt_cv_func_dgettext_libc=no
1431          else
1432            if test "$gt_cv_func_dgettext_libc" = "yes" \
1433		&& test "$gt_cv_func_ngettext_libc" = "yes"; then
1434              gt_cv_func_dgettext_libintl=no
1435            fi
1436          fi
1437        fi
1438      fi
1439
1440      if test "$gt_cv_func_dgettext_libc" = "yes" \
1441	|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
1442        gt_cv_have_gettext=yes
1443      fi
1444
1445      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
1446        INTLLIBS="-lintl $libintl_extra_libs $INTL_MACOSX_LIBS"
1447      fi
1448
1449      if test "$gt_cv_have_gettext" = "yes"; then
1450	AC_DEFINE(HAVE_GETTEXT,1,
1451	  [Define if the GNU gettext() function is already present or preinstalled.])
1452	GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
1453	  [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
1454	if test "$MSGFMT" != "no"; then
1455          glib_save_LIBS="$LIBS"
1456          LIBS="$LIBS $INTLLIBS"
1457	  AC_CHECK_FUNCS(dcgettext)
1458	  MSGFMT_OPTS=
1459	  AC_MSG_CHECKING([if msgfmt accepts -c])
1460	  GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
1461msgid ""
1462msgstr ""
1463"Content-Type: text/plain; charset=UTF-8\n"
1464"Project-Id-Version: test 1.0\n"
1465"PO-Revision-Date: 2007-02-15 12:01+0100\n"
1466"Last-Translator: test <foo@bar.xx>\n"
1467"Language-Team: C <LL@li.org>\n"
1468"MIME-Version: 1.0\n"
1469"Content-Transfer-Encoding: 8bit\n"
1470], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
1471	  AC_SUBST(MSGFMT_OPTS)
1472	  AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
1473	  GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
1474	    [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
1475	  AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
1476			 return _nl_msg_cat_cntr],
1477	    [CATOBJEXT=.gmo
1478             DATADIRNAME=share],
1479	    [case $host in
1480	    *-*-solaris*)
1481	    dnl On Solaris, if bind_textdomain_codeset is in libc,
1482	    dnl GNU format message catalog is always supported,
1483            dnl since both are added to the libc all together.
1484	    dnl Hence, we'd like to go with DATADIRNAME=share and
1485	    dnl and CATOBJEXT=.gmo in this case.
1486            AC_CHECK_FUNC(bind_textdomain_codeset,
1487	      [CATOBJEXT=.gmo
1488               DATADIRNAME=share],
1489	      [CATOBJEXT=.mo
1490               DATADIRNAME=lib])
1491	    ;;
1492	    *-*-openbsd*)
1493	    CATOBJEXT=.mo
1494            DATADIRNAME=share
1495	    ;;
1496	    *)
1497	    CATOBJEXT=.mo
1498            DATADIRNAME=lib
1499	    ;;
1500	    esac])
1501          LIBS="$glib_save_LIBS"
1502	  INSTOBJEXT=.mo
1503	else
1504	  gt_cv_have_gettext=no
1505	fi
1506      fi
1507    ])
1508
1509    if test "$gt_cv_have_gettext" = "yes" ; then
1510      AC_DEFINE(ENABLE_NLS, 1,
1511        [always defined to indicate that i18n is enabled])
1512    fi
1513
1514    dnl Test whether we really found GNU xgettext.
1515    if test "$XGETTEXT" != ":"; then
1516      dnl If it is not GNU xgettext we define it as : so that the
1517      dnl Makefiles still can work.
1518      if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
1519        : ;
1520      else
1521        AC_MSG_RESULT(
1522	  [found xgettext program is not GNU xgettext; ignore it])
1523        XGETTEXT=":"
1524      fi
1525    fi
1526
1527    # We need to process the po/ directory.
1528    POSUB=po
1529
1530    AC_OUTPUT_COMMANDS(
1531      [case "$CONFIG_FILES" in *po/Makefile.in*)
1532        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
1533      esac])
1534
1535    dnl These rules are solely for the distribution goal.  While doing this
1536    dnl we only have to keep exactly one list of the available catalogs
1537    dnl in configure.ac.
1538    for lang in $ALL_LINGUAS; do
1539      GMOFILES="$GMOFILES $lang.gmo"
1540      POFILES="$POFILES $lang.po"
1541    done
1542
1543    dnl Make all variables we use known to autoconf.
1544    AC_SUBST(CATALOGS)
1545    AC_SUBST(CATOBJEXT)
1546    AC_SUBST(DATADIRNAME)
1547    AC_SUBST(GMOFILES)
1548    AC_SUBST(INSTOBJEXT)
1549    AC_SUBST(INTLLIBS)
1550    AC_SUBST(PO_IN_DATADIR_TRUE)
1551    AC_SUBST(PO_IN_DATADIR_FALSE)
1552    AC_SUBST(POFILES)
1553    AC_SUBST(POSUB)
1554  ])
1555
1556# AM_GLIB_GNU_GETTEXT
1557# -------------------
1558# Do checks necessary for use of gettext. If a suitable implementation
1559# of gettext is found in either in libintl or in the C library,
1560# it will set INTLLIBS to the libraries needed for use of gettext
1561# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
1562# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
1563# on various variables needed by the Makefile.in.in installed by
1564# glib-gettextize.
1565dnl
1566AU_DEFUN([GLIB_GNU_GETTEXT],
1567  [AC_REQUIRE([AC_PROG_CC])dnl
1568
1569   GLIB_LC_MESSAGES
1570   GLIB_WITH_NLS
1571
1572   if test "$gt_cv_have_gettext" = "yes"; then
1573     if test "x$ALL_LINGUAS" = "x"; then
1574       LINGUAS=
1575     else
1576       AC_MSG_CHECKING(for catalogs to be installed)
1577       NEW_LINGUAS=
1578       for presentlang in $ALL_LINGUAS; do
1579         useit=no
1580         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
1581           desiredlanguages="$LINGUAS"
1582         else
1583           desiredlanguages="$ALL_LINGUAS"
1584         fi
1585         for desiredlang in $desiredlanguages; do
1586 	   # Use the presentlang catalog if desiredlang is
1587           #   a. equal to presentlang, or
1588           #   b. a variant of presentlang (because in this case,
1589           #      presentlang can be used as a fallback for messages
1590           #      which are not translated in the desiredlang catalog).
1591           case "$desiredlang" in
1592             "$presentlang"*) useit=yes;;
1593           esac
1594         done
1595         if test $useit = yes; then
1596           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
1597         fi
1598       done
1599       LINGUAS=$NEW_LINGUAS
1600       AC_MSG_RESULT($LINGUAS)
1601     fi
1602
1603     dnl Construct list of names of catalog files to be constructed.
1604     if test -n "$LINGUAS"; then
1605       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
1606     fi
1607   fi
1608
1609   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
1610   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
1611   dnl Try to locate is.
1612   MKINSTALLDIRS=
1613   if test -n "$ac_aux_dir"; then
1614     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
1615   fi
1616   if test -z "$MKINSTALLDIRS"; then
1617     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
1618   fi
1619   AC_SUBST(MKINSTALLDIRS)
1620
1621   dnl Generate list of files to be processed by xgettext which will
1622   dnl be included in po/Makefile.
1623   test -d po || mkdir po
1624   if test "x$srcdir" != "x."; then
1625     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
1626       posrcprefix="$srcdir/"
1627     else
1628       posrcprefix="../$srcdir/"
1629     fi
1630   else
1631     posrcprefix="../"
1632   fi
1633   rm -f po/POTFILES
1634   sed -e "/^#/d" -e "/^\$/d" -e "s,.*,	$posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
1635	< $srcdir/po/POTFILES.in > po/POTFILES
1636  ],
1637  [[$0: This macro is deprecated. You should use upstream gettext instead.]])
1638
1639# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
1640# -------------------------------
1641# Define VARIABLE to the location where catalog files will
1642# be installed by po/Makefile.
1643glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
1644[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
1645glib_save_prefix="$prefix"
1646glib_save_exec_prefix="$exec_prefix"
1647glib_save_datarootdir="$datarootdir"
1648test "x$prefix" = xNONE && prefix=$ac_default_prefix
1649test "x$exec_prefix" = xNONE && exec_prefix=$prefix
1650datarootdir=`eval echo "${datarootdir}"`
1651if test "x$CATOBJEXT" = "x.mo" ; then
1652  localedir=`eval echo "${libdir}/locale"`
1653else
1654  localedir=`eval echo "${datadir}/locale"`
1655fi
1656prefix="$glib_save_prefix"
1657exec_prefix="$glib_save_exec_prefix"
1658datarootdir="$glib_save_datarootdir"
1659AC_DEFINE_UNQUOTED($1, "$localedir",
1660  [Define the location where the catalogs will be installed])
1661])
1662
1663dnl
1664dnl Now the definitions that aclocal will find
1665dnl
1666ifdef(glib_configure_ac,[],[
1667AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
1668AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
1669])dnl
1670
1671# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
1672#
1673# Create a temporary file with TEST-FILE as its contents and pass the
1674# file name to PROGRAM.  Perform ACTION-IF-PASS if PROGRAM exits with
1675# 0 and perform ACTION-IF-FAIL for any other exit status.
1676AC_DEFUN([GLIB_RUN_PROG],
1677[cat >conftest.foo <<_ACEOF
1678$2
1679_ACEOF
1680if AC_RUN_LOG([$1 conftest.foo]); then
1681  m4_ifval([$3], [$3], [:])
1682m4_ifvaln([$4], [else $4])dnl
1683echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
1684sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
1685fi])
1686
1687
1688
1689dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
1690# serial 42 IT_PROG_INTLTOOL
1691AC_DEFUN([IT_PROG_INTLTOOL], [
1692AC_PREREQ([2.50])dnl
1693AC_REQUIRE([AM_NLS])dnl
1694
1695case "$am__api_version" in
1696    1.[01234])
1697	AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
1698    ;;
1699    *)
1700    ;;
1701esac
1702
1703INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
1704INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
1705INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
1706if test -n "$1"; then
1707    AC_MSG_CHECKING([for intltool >= $1])
1708    AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
1709    test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
1710	AC_MSG_ERROR([Your intltool is too old.  You need intltool $1 or later.])
1711fi
1712
1713AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
1714AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
1715AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
1716if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
1717    AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
1718fi
1719
1720if test -z "$AM_DEFAULT_VERBOSITY"; then
1721  AM_DEFAULT_VERBOSITY=1
1722fi
1723AC_SUBST([AM_DEFAULT_VERBOSITY])
1724
1725INTLTOOL_V_MERGE='$(INTLTOOL__v_MERGE_$(V))'
1726INTLTOOL__v_MERGE_='$(INTLTOOL__v_MERGE_$(AM_DEFAULT_VERBOSITY))'
1727INTLTOOL__v_MERGE_0='@echo "  ITMRG " [$]@;'
1728AC_SUBST(INTLTOOL_V_MERGE)
1729AC_SUBST(INTLTOOL__v_MERGE_)
1730AC_SUBST(INTLTOOL__v_MERGE_0)
1731
1732INTLTOOL_V_MERGE_OPTIONS='$(intltool__v_merge_options_$(V))'
1733intltool__v_merge_options_='$(intltool__v_merge_options_$(AM_DEFAULT_VERBOSITY))'
1734intltool__v_merge_options_0='-q'
1735AC_SUBST(INTLTOOL_V_MERGE_OPTIONS)
1736AC_SUBST(intltool__v_merge_options_)
1737AC_SUBST(intltool__v_merge_options_0)
1738
1739  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 $< [$]@'
1740INTLTOOL_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 $< [$]@'
1741     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 $< [$]@'
1742     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 $< [$]@'
1743      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 $< [$]@'
1744     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 $< [$]@'
1745   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 $< [$]@'
1746    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 $< [$]@'
1747INTLTOOL_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 $< [$]@'
1748       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 $< [$]@'
1749      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 $< [$]@'
1750if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge 5000; then
1751      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 $< [$]@'
1752else
1753      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'
1754fi
1755      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 $< [$]@'
1756      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 $< [$]@'
1757    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 $< [$]@'
1758  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 $< [$]@'
1759    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 $< [$]@'
1760    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 $< [$]@'
1761   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 $< [$]@'
1762
1763_IT_SUBST(INTLTOOL_DESKTOP_RULE)
1764_IT_SUBST(INTLTOOL_DIRECTORY_RULE)
1765_IT_SUBST(INTLTOOL_KEYS_RULE)
1766_IT_SUBST(INTLTOOL_PROP_RULE)
1767_IT_SUBST(INTLTOOL_OAF_RULE)
1768_IT_SUBST(INTLTOOL_PONG_RULE)
1769_IT_SUBST(INTLTOOL_SERVER_RULE)
1770_IT_SUBST(INTLTOOL_SHEET_RULE)
1771_IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
1772_IT_SUBST(INTLTOOL_UI_RULE)
1773_IT_SUBST(INTLTOOL_XAM_RULE)
1774_IT_SUBST(INTLTOOL_KBD_RULE)
1775_IT_SUBST(INTLTOOL_XML_RULE)
1776_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
1777_IT_SUBST(INTLTOOL_CAVES_RULE)
1778_IT_SUBST(INTLTOOL_SCHEMAS_RULE)
1779_IT_SUBST(INTLTOOL_THEME_RULE)
1780_IT_SUBST(INTLTOOL_SERVICE_RULE)
1781_IT_SUBST(INTLTOOL_POLICY_RULE)
1782
1783# Check the gettext tools to make sure they are GNU
1784AC_PATH_PROG(XGETTEXT, xgettext)
1785AC_PATH_PROG(MSGMERGE, msgmerge)
1786AC_PATH_PROG(MSGFMT, msgfmt)
1787AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
1788if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
1789    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
1790fi
1791xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
1792mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
1793mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
1794if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
1795    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
1796fi
1797
1798AC_PATH_PROG(INTLTOOL_PERL, perl)
1799if test -z "$INTLTOOL_PERL"; then
1800   AC_MSG_ERROR([perl not found])
1801fi
1802AC_MSG_CHECKING([for perl >= 5.8.1])
1803$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
1804if test $? -ne 0; then
1805   AC_MSG_ERROR([perl 5.8.1 is required for intltool])
1806else
1807   IT_PERL_VERSION=`$INTLTOOL_PERL -e "printf '%vd', $^V"`
1808   AC_MSG_RESULT([$IT_PERL_VERSION])
1809fi
1810if test "x$2" != "xno-xml"; then
1811   AC_MSG_CHECKING([for XML::Parser])
1812   if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
1813       AC_MSG_RESULT([ok])
1814   else
1815       AC_MSG_ERROR([XML::Parser perl module is required for intltool])
1816   fi
1817fi
1818
1819# Substitute ALL_LINGUAS so we can use it in po/Makefile
1820AC_SUBST(ALL_LINGUAS)
1821
1822IT_PO_SUBDIR([po])
1823
1824])
1825
1826
1827# IT_PO_SUBDIR(DIRNAME)
1828# ---------------------
1829# All po subdirs have to be declared with this macro; the subdir "po" is
1830# declared by IT_PROG_INTLTOOL.
1831#
1832AC_DEFUN([IT_PO_SUBDIR],
1833[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
1834dnl
1835dnl The following CONFIG_COMMANDS should be executed at the very end
1836dnl of config.status.
1837AC_CONFIG_COMMANDS_PRE([
1838  AC_CONFIG_COMMANDS([$1/stamp-it], [
1839    if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
1840       AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
1841    fi
1842    rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
1843    >"$1/stamp-it.tmp"
1844    [sed '/^#/d
1845	 s/^[[].*] *//
1846	 /^[ 	]*$/d
1847	'"s|^|	$ac_top_srcdir/|" \
1848      "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
1849    ]
1850    [sed '/^POTFILES =/,/[^\\]$/ {
1851		/^POTFILES =/!d
1852		r $1/POTFILES
1853	  }
1854	 ' "$1/Makefile.in" >"$1/Makefile"]
1855    rm -f "$1/Makefile.tmp"
1856    mv "$1/stamp-it.tmp" "$1/stamp-it"
1857  ])
1858])dnl
1859])
1860
1861# _IT_SUBST(VARIABLE)
1862# -------------------
1863# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
1864#
1865AC_DEFUN([_IT_SUBST],
1866[
1867AC_SUBST([$1])
1868m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
1869]
1870)
1871
1872# deprecated macros
1873AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
1874# A hint is needed for aclocal from Automake <= 1.9.4:
1875# AC_DEFUN([AC_PROG_INTLTOOL], ...)
1876
1877
1878# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1879#
1880#   Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc.
1881#   Written by Gordon Matzigkeit, 1996
1882#
1883# This file is free software; the Free Software Foundation gives
1884# unlimited permission to copy and/or distribute it, with or without
1885# modifications, as long as this notice is preserved.
1886
1887m4_define([_LT_COPYING], [dnl
1888# Copyright (C) 2014 Free Software Foundation, Inc.
1889# This is free software; see the source for copying conditions.  There is NO
1890# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1891
1892# GNU Libtool is free software; you can redistribute it and/or modify
1893# it under the terms of the GNU General Public License as published by
1894# the Free Software Foundation; either version 2 of of the License, or
1895# (at your option) any later version.
1896#
1897# As a special exception to the GNU General Public License, if you
1898# distribute this file as part of a program or library that is built
1899# using GNU Libtool, you may include this file under the  same
1900# distribution terms that you use for the rest of that program.
1901#
1902# GNU Libtool is distributed in the hope that it will be useful, but
1903# WITHOUT ANY WARRANTY; without even the implied warranty of
1904# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1905# GNU General Public License for more details.
1906#
1907# You should have received a copy of the GNU General Public License
1908# along with this program.  If not, see <http://www.gnu.org/licenses/>.
1909])
1910
1911# serial 58 LT_INIT
1912
1913
1914# LT_PREREQ(VERSION)
1915# ------------------
1916# Complain and exit if this libtool version is less that VERSION.
1917m4_defun([LT_PREREQ],
1918[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
1919       [m4_default([$3],
1920		   [m4_fatal([Libtool version $1 or higher is required],
1921		             63)])],
1922       [$2])])
1923
1924
1925# _LT_CHECK_BUILDDIR
1926# ------------------
1927# Complain if the absolute build directory name contains unusual characters
1928m4_defun([_LT_CHECK_BUILDDIR],
1929[case `pwd` in
1930  *\ * | *\	*)
1931    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
1932esac
1933])
1934
1935
1936# LT_INIT([OPTIONS])
1937# ------------------
1938AC_DEFUN([LT_INIT],
1939[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
1940AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
1941AC_BEFORE([$0], [LT_LANG])dnl
1942AC_BEFORE([$0], [LT_OUTPUT])dnl
1943AC_BEFORE([$0], [LTDL_INIT])dnl
1944m4_require([_LT_CHECK_BUILDDIR])dnl
1945
1946dnl Autoconf doesn't catch unexpanded LT_ macros by default:
1947m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
1948m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
1949dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
1950dnl unless we require an AC_DEFUNed macro:
1951AC_REQUIRE([LTOPTIONS_VERSION])dnl
1952AC_REQUIRE([LTSUGAR_VERSION])dnl
1953AC_REQUIRE([LTVERSION_VERSION])dnl
1954AC_REQUIRE([LTOBSOLETE_VERSION])dnl
1955m4_require([_LT_PROG_LTMAIN])dnl
1956
1957_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
1958
1959dnl Parse OPTIONS
1960_LT_SET_OPTIONS([$0], [$1])
1961
1962# This can be used to rebuild libtool when needed
1963LIBTOOL_DEPS=$ltmain
1964
1965# Always use our own libtool.
1966LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1967AC_SUBST(LIBTOOL)dnl
1968
1969_LT_SETUP
1970
1971# Only expand once:
1972m4_define([LT_INIT])
1973])# LT_INIT
1974
1975# Old names:
1976AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
1977AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
1978dnl aclocal-1.4 backwards compatibility:
1979dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
1980dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
1981
1982
1983# _LT_PREPARE_CC_BASENAME
1984# -----------------------
1985m4_defun([_LT_PREPARE_CC_BASENAME], [
1986# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
1987func_cc_basename ()
1988{
1989    for cc_temp in @S|@*""; do
1990      case $cc_temp in
1991        compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1992        distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1993        \-*) ;;
1994        *) break;;
1995      esac
1996    done
1997    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
1998}
1999])# _LT_PREPARE_CC_BASENAME
2000
2001
2002# _LT_CC_BASENAME(CC)
2003# -------------------
2004# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
2005# but that macro is also expanded into generated libtool script, which
2006# arranges for $SED and $ECHO to be set by different means.
2007m4_defun([_LT_CC_BASENAME],
2008[m4_require([_LT_PREPARE_CC_BASENAME])dnl
2009AC_REQUIRE([_LT_DECL_SED])dnl
2010AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
2011func_cc_basename $1
2012cc_basename=$func_cc_basename_result
2013])
2014
2015
2016# _LT_FILEUTILS_DEFAULTS
2017# ----------------------
2018# It is okay to use these file commands and assume they have been set
2019# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
2020m4_defun([_LT_FILEUTILS_DEFAULTS],
2021[: ${CP="cp -f"}
2022: ${MV="mv -f"}
2023: ${RM="rm -f"}
2024])# _LT_FILEUTILS_DEFAULTS
2025
2026
2027# _LT_SETUP
2028# ---------
2029m4_defun([_LT_SETUP],
2030[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2031AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2032AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
2033AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
2034
2035_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
2036dnl
2037_LT_DECL([], [host_alias], [0], [The host system])dnl
2038_LT_DECL([], [host], [0])dnl
2039_LT_DECL([], [host_os], [0])dnl
2040dnl
2041_LT_DECL([], [build_alias], [0], [The build system])dnl
2042_LT_DECL([], [build], [0])dnl
2043_LT_DECL([], [build_os], [0])dnl
2044dnl
2045AC_REQUIRE([AC_PROG_CC])dnl
2046AC_REQUIRE([LT_PATH_LD])dnl
2047AC_REQUIRE([LT_PATH_NM])dnl
2048dnl
2049AC_REQUIRE([AC_PROG_LN_S])dnl
2050test -z "$LN_S" && LN_S="ln -s"
2051_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
2052dnl
2053AC_REQUIRE([LT_CMD_MAX_LEN])dnl
2054_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
2055_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
2056dnl
2057m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2058m4_require([_LT_CHECK_SHELL_FEATURES])dnl
2059m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
2060m4_require([_LT_CMD_RELOAD])dnl
2061m4_require([_LT_CHECK_MAGIC_METHOD])dnl
2062m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
2063m4_require([_LT_CMD_OLD_ARCHIVE])dnl
2064m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
2065m4_require([_LT_WITH_SYSROOT])dnl
2066m4_require([_LT_CMD_TRUNCATE])dnl
2067
2068_LT_CONFIG_LIBTOOL_INIT([
2069# See if we are running on zsh, and set the options that allow our
2070# commands through without removal of \ escapes INIT.
2071if test -n "\${ZSH_VERSION+set}"; then
2072   setopt NO_GLOB_SUBST
2073fi
2074])
2075if test -n "${ZSH_VERSION+set}"; then
2076   setopt NO_GLOB_SUBST
2077fi
2078
2079_LT_CHECK_OBJDIR
2080
2081m4_require([_LT_TAG_COMPILER])dnl
2082
2083case $host_os in
2084aix3*)
2085  # AIX sometimes has problems with the GCC collect2 program.  For some
2086  # reason, if we set the COLLECT_NAMES environment variable, the problems
2087  # vanish in a puff of smoke.
2088  if test set != "${COLLECT_NAMES+set}"; then
2089    COLLECT_NAMES=
2090    export COLLECT_NAMES
2091  fi
2092  ;;
2093esac
2094
2095# Global variables:
2096ofile=libtool
2097can_build_shared=yes
2098
2099# All known linkers require a '.a' archive for static linking (except MSVC,
2100# which needs '.lib').
2101libext=a
2102
2103with_gnu_ld=$lt_cv_prog_gnu_ld
2104
2105old_CC=$CC
2106old_CFLAGS=$CFLAGS
2107
2108# Set sane defaults for various variables
2109test -z "$CC" && CC=cc
2110test -z "$LTCC" && LTCC=$CC
2111test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
2112test -z "$LD" && LD=ld
2113test -z "$ac_objext" && ac_objext=o
2114
2115_LT_CC_BASENAME([$compiler])
2116
2117# Only perform the check for file, if the check method requires it
2118test -z "$MAGIC_CMD" && MAGIC_CMD=file
2119case $deplibs_check_method in
2120file_magic*)
2121  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
2122    _LT_PATH_MAGIC
2123  fi
2124  ;;
2125esac
2126
2127# Use C for the default configuration in the libtool script
2128LT_SUPPORTED_TAG([CC])
2129_LT_LANG_C_CONFIG
2130_LT_LANG_DEFAULT_CONFIG
2131_LT_CONFIG_COMMANDS
2132])# _LT_SETUP
2133
2134
2135# _LT_PREPARE_SED_QUOTE_VARS
2136# --------------------------
2137# Define a few sed substitution that help us do robust quoting.
2138m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
2139[# Backslashify metacharacters that are still active within
2140# double-quoted strings.
2141sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
2142
2143# Same as above, but do not quote variable references.
2144double_quote_subst='s/\([["`\\]]\)/\\\1/g'
2145
2146# Sed substitution to delay expansion of an escaped shell variable in a
2147# double_quote_subst'ed string.
2148delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
2149
2150# Sed substitution to delay expansion of an escaped single quote.
2151delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
2152
2153# Sed substitution to avoid accidental globbing in evaled expressions
2154no_glob_subst='s/\*/\\\*/g'
2155])
2156
2157# _LT_PROG_LTMAIN
2158# ---------------
2159# Note that this code is called both from 'configure', and 'config.status'
2160# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
2161# 'config.status' has no value for ac_aux_dir unless we are using Automake,
2162# so we pass a copy along to make sure it has a sensible value anyway.
2163m4_defun([_LT_PROG_LTMAIN],
2164[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
2165_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
2166ltmain=$ac_aux_dir/ltmain.sh
2167])# _LT_PROG_LTMAIN
2168
2169
2170
2171# So that we can recreate a full libtool script including additional
2172# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
2173# in macros and then make a single call at the end using the 'libtool'
2174# label.
2175
2176
2177# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
2178# ----------------------------------------
2179# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
2180m4_define([_LT_CONFIG_LIBTOOL_INIT],
2181[m4_ifval([$1],
2182          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
2183                     [$1
2184])])])
2185
2186# Initialize.
2187m4_define([_LT_OUTPUT_LIBTOOL_INIT])
2188
2189
2190# _LT_CONFIG_LIBTOOL([COMMANDS])
2191# ------------------------------
2192# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
2193m4_define([_LT_CONFIG_LIBTOOL],
2194[m4_ifval([$1],
2195          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
2196                     [$1
2197])])])
2198
2199# Initialize.
2200m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
2201
2202
2203# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
2204# -----------------------------------------------------
2205m4_defun([_LT_CONFIG_SAVE_COMMANDS],
2206[_LT_CONFIG_LIBTOOL([$1])
2207_LT_CONFIG_LIBTOOL_INIT([$2])
2208])
2209
2210
2211# _LT_FORMAT_COMMENT([COMMENT])
2212# -----------------------------
2213# Add leading comment marks to the start of each line, and a trailing
2214# full-stop to the whole comment if one is not present already.
2215m4_define([_LT_FORMAT_COMMENT],
2216[m4_ifval([$1], [
2217m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
2218              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
2219)])
2220
2221
2222
2223
2224
2225# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
2226# -------------------------------------------------------------------
2227# CONFIGNAME is the name given to the value in the libtool script.
2228# VARNAME is the (base) name used in the configure script.
2229# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
2230# VARNAME.  Any other value will be used directly.
2231m4_define([_LT_DECL],
2232[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
2233    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
2234	[m4_ifval([$1], [$1], [$2])])
2235    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
2236    m4_ifval([$4],
2237	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
2238    lt_dict_add_subkey([lt_decl_dict], [$2],
2239	[tagged?], [m4_ifval([$5], [yes], [no])])])
2240])
2241
2242
2243# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
2244# --------------------------------------------------------
2245m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
2246
2247
2248# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
2249# ------------------------------------------------
2250m4_define([lt_decl_tag_varnames],
2251[_lt_decl_filter([tagged?], [yes], $@)])
2252
2253
2254# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
2255# ---------------------------------------------------------
2256m4_define([_lt_decl_filter],
2257[m4_case([$#],
2258  [0], [m4_fatal([$0: too few arguments: $#])],
2259  [1], [m4_fatal([$0: too few arguments: $#: $1])],
2260  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
2261  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
2262  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
2263])
2264
2265
2266# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
2267# --------------------------------------------------
2268m4_define([lt_decl_quote_varnames],
2269[_lt_decl_filter([value], [1], $@)])
2270
2271
2272# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
2273# ---------------------------------------------------
2274m4_define([lt_decl_dquote_varnames],
2275[_lt_decl_filter([value], [2], $@)])
2276
2277
2278# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
2279# ---------------------------------------------------
2280m4_define([lt_decl_varnames_tagged],
2281[m4_assert([$# <= 2])dnl
2282_$0(m4_quote(m4_default([$1], [[, ]])),
2283    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
2284    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
2285m4_define([_lt_decl_varnames_tagged],
2286[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
2287
2288
2289# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
2290# ------------------------------------------------
2291m4_define([lt_decl_all_varnames],
2292[_$0(m4_quote(m4_default([$1], [[, ]])),
2293     m4_if([$2], [],
2294	   m4_quote(lt_decl_varnames),
2295	m4_quote(m4_shift($@))))[]dnl
2296])
2297m4_define([_lt_decl_all_varnames],
2298[lt_join($@, lt_decl_varnames_tagged([$1],
2299			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
2300])
2301
2302
2303# _LT_CONFIG_STATUS_DECLARE([VARNAME])
2304# ------------------------------------
2305# Quote a variable value, and forward it to 'config.status' so that its
2306# declaration there will have the same value as in 'configure'.  VARNAME
2307# must have a single quote delimited value for this to work.
2308m4_define([_LT_CONFIG_STATUS_DECLARE],
2309[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
2310
2311
2312# _LT_CONFIG_STATUS_DECLARATIONS
2313# ------------------------------
2314# We delimit libtool config variables with single quotes, so when
2315# we write them to config.status, we have to be sure to quote all
2316# embedded single quotes properly.  In configure, this macro expands
2317# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
2318#
2319#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
2320m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
2321[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
2322    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
2323
2324
2325# _LT_LIBTOOL_TAGS
2326# ----------------
2327# Output comment and list of tags supported by the script
2328m4_defun([_LT_LIBTOOL_TAGS],
2329[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
2330available_tags='_LT_TAGS'dnl
2331])
2332
2333
2334# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
2335# -----------------------------------
2336# Extract the dictionary values for VARNAME (optionally with TAG) and
2337# expand to a commented shell variable setting:
2338#
2339#    # Some comment about what VAR is for.
2340#    visible_name=$lt_internal_name
2341m4_define([_LT_LIBTOOL_DECLARE],
2342[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
2343					   [description])))[]dnl
2344m4_pushdef([_libtool_name],
2345    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
2346m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
2347    [0], [_libtool_name=[$]$1],
2348    [1], [_libtool_name=$lt_[]$1],
2349    [2], [_libtool_name=$lt_[]$1],
2350    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
2351m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
2352])
2353
2354
2355# _LT_LIBTOOL_CONFIG_VARS
2356# -----------------------
2357# Produce commented declarations of non-tagged libtool config variables
2358# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
2359# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
2360# section) are produced by _LT_LIBTOOL_TAG_VARS.
2361m4_defun([_LT_LIBTOOL_CONFIG_VARS],
2362[m4_foreach([_lt_var],
2363    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
2364    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
2365
2366
2367# _LT_LIBTOOL_TAG_VARS(TAG)
2368# -------------------------
2369m4_define([_LT_LIBTOOL_TAG_VARS],
2370[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
2371    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
2372
2373
2374# _LT_TAGVAR(VARNAME, [TAGNAME])
2375# ------------------------------
2376m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
2377
2378
2379# _LT_CONFIG_COMMANDS
2380# -------------------
2381# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
2382# variables for single and double quote escaping we saved from calls
2383# to _LT_DECL, we can put quote escaped variables declarations
2384# into 'config.status', and then the shell code to quote escape them in
2385# for loops in 'config.status'.  Finally, any additional code accumulated
2386# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
2387m4_defun([_LT_CONFIG_COMMANDS],
2388[AC_PROVIDE_IFELSE([LT_OUTPUT],
2389	dnl If the libtool generation code has been placed in $CONFIG_LT,
2390	dnl instead of duplicating it all over again into config.status,
2391	dnl then we will have config.status run $CONFIG_LT later, so it
2392	dnl needs to know what name is stored there:
2393        [AC_CONFIG_COMMANDS([libtool],
2394            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
2395    dnl If the libtool generation code is destined for config.status,
2396    dnl expand the accumulated commands and init code now:
2397    [AC_CONFIG_COMMANDS([libtool],
2398        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
2399])#_LT_CONFIG_COMMANDS
2400
2401
2402# Initialize.
2403m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
2404[
2405
2406# The HP-UX ksh and POSIX shell print the target directory to stdout
2407# if CDPATH is set.
2408(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
2409
2410sed_quote_subst='$sed_quote_subst'
2411double_quote_subst='$double_quote_subst'
2412delay_variable_subst='$delay_variable_subst'
2413_LT_CONFIG_STATUS_DECLARATIONS
2414LTCC='$LTCC'
2415LTCFLAGS='$LTCFLAGS'
2416compiler='$compiler_DEFAULT'
2417
2418# A function that is used when there is no print builtin or printf.
2419func_fallback_echo ()
2420{
2421  eval 'cat <<_LTECHO_EOF
2422\$[]1
2423_LTECHO_EOF'
2424}
2425
2426# Quote evaled strings.
2427for var in lt_decl_all_varnames([[ \
2428]], lt_decl_quote_varnames); do
2429    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
2430    *[[\\\\\\\`\\"\\\$]]*)
2431      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
2432      ;;
2433    *)
2434      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
2435      ;;
2436    esac
2437done
2438
2439# Double-quote double-evaled strings.
2440for var in lt_decl_all_varnames([[ \
2441]], lt_decl_dquote_varnames); do
2442    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
2443    *[[\\\\\\\`\\"\\\$]]*)
2444      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
2445      ;;
2446    *)
2447      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
2448      ;;
2449    esac
2450done
2451
2452_LT_OUTPUT_LIBTOOL_INIT
2453])
2454
2455# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
2456# ------------------------------------
2457# Generate a child script FILE with all initialization necessary to
2458# reuse the environment learned by the parent script, and make the
2459# file executable.  If COMMENT is supplied, it is inserted after the
2460# '#!' sequence but before initialization text begins.  After this
2461# macro, additional text can be appended to FILE to form the body of
2462# the child script.  The macro ends with non-zero status if the
2463# file could not be fully written (such as if the disk is full).
2464m4_ifdef([AS_INIT_GENERATED],
2465[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
2466[m4_defun([_LT_GENERATED_FILE_INIT],
2467[m4_require([AS_PREPARE])]dnl
2468[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
2469[lt_write_fail=0
2470cat >$1 <<_ASEOF || lt_write_fail=1
2471#! $SHELL
2472# Generated by $as_me.
2473$2
2474SHELL=\${CONFIG_SHELL-$SHELL}
2475export SHELL
2476_ASEOF
2477cat >>$1 <<\_ASEOF || lt_write_fail=1
2478AS_SHELL_SANITIZE
2479_AS_PREPARE
2480exec AS_MESSAGE_FD>&1
2481_ASEOF
2482test 0 = "$lt_write_fail" && chmod +x $1[]dnl
2483m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
2484
2485# LT_OUTPUT
2486# ---------
2487# This macro allows early generation of the libtool script (before
2488# AC_OUTPUT is called), incase it is used in configure for compilation
2489# tests.
2490AC_DEFUN([LT_OUTPUT],
2491[: ${CONFIG_LT=./config.lt}
2492AC_MSG_NOTICE([creating $CONFIG_LT])
2493_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
2494[# Run this file to recreate a libtool stub with the current configuration.])
2495
2496cat >>"$CONFIG_LT" <<\_LTEOF
2497lt_cl_silent=false
2498exec AS_MESSAGE_LOG_FD>>config.log
2499{
2500  echo
2501  AS_BOX([Running $as_me.])
2502} >&AS_MESSAGE_LOG_FD
2503
2504lt_cl_help="\
2505'$as_me' creates a local libtool stub from the current configuration,
2506for use in further configure time tests before the real libtool is
2507generated.
2508
2509Usage: $[0] [[OPTIONS]]
2510
2511  -h, --help      print this help, then exit
2512  -V, --version   print version number, then exit
2513  -q, --quiet     do not print progress messages
2514  -d, --debug     don't remove temporary files
2515
2516Report bugs to <bug-libtool@gnu.org>."
2517
2518lt_cl_version="\
2519m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
2520m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
2521configured by $[0], generated by m4_PACKAGE_STRING.
2522
2523Copyright (C) 2011 Free Software Foundation, Inc.
2524This config.lt script is free software; the Free Software Foundation
2525gives unlimited permision to copy, distribute and modify it."
2526
2527while test 0 != $[#]
2528do
2529  case $[1] in
2530    --version | --v* | -V )
2531      echo "$lt_cl_version"; exit 0 ;;
2532    --help | --h* | -h )
2533      echo "$lt_cl_help"; exit 0 ;;
2534    --debug | --d* | -d )
2535      debug=: ;;
2536    --quiet | --q* | --silent | --s* | -q )
2537      lt_cl_silent=: ;;
2538
2539    -*) AC_MSG_ERROR([unrecognized option: $[1]
2540Try '$[0] --help' for more information.]) ;;
2541
2542    *) AC_MSG_ERROR([unrecognized argument: $[1]
2543Try '$[0] --help' for more information.]) ;;
2544  esac
2545  shift
2546done
2547
2548if $lt_cl_silent; then
2549  exec AS_MESSAGE_FD>/dev/null
2550fi
2551_LTEOF
2552
2553cat >>"$CONFIG_LT" <<_LTEOF
2554_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
2555_LTEOF
2556
2557cat >>"$CONFIG_LT" <<\_LTEOF
2558AC_MSG_NOTICE([creating $ofile])
2559_LT_OUTPUT_LIBTOOL_COMMANDS
2560AS_EXIT(0)
2561_LTEOF
2562chmod +x "$CONFIG_LT"
2563
2564# configure is writing to config.log, but config.lt does its own redirection,
2565# appending to config.log, which fails on DOS, as config.log is still kept
2566# open by configure.  Here we exec the FD to /dev/null, effectively closing
2567# config.log, so it can be properly (re)opened and appended to by config.lt.
2568lt_cl_success=:
2569test yes = "$silent" &&
2570  lt_config_lt_args="$lt_config_lt_args --quiet"
2571exec AS_MESSAGE_LOG_FD>/dev/null
2572$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
2573exec AS_MESSAGE_LOG_FD>>config.log
2574$lt_cl_success || AS_EXIT(1)
2575])# LT_OUTPUT
2576
2577
2578# _LT_CONFIG(TAG)
2579# ---------------
2580# If TAG is the built-in tag, create an initial libtool script with a
2581# default configuration from the untagged config vars.  Otherwise add code
2582# to config.status for appending the configuration named by TAG from the
2583# matching tagged config vars.
2584m4_defun([_LT_CONFIG],
2585[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2586_LT_CONFIG_SAVE_COMMANDS([
2587  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
2588  m4_if(_LT_TAG, [C], [
2589    # See if we are running on zsh, and set the options that allow our
2590    # commands through without removal of \ escapes.
2591    if test -n "${ZSH_VERSION+set}"; then
2592      setopt NO_GLOB_SUBST
2593    fi
2594
2595    cfgfile=${ofile}T
2596    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
2597    $RM "$cfgfile"
2598
2599    cat <<_LT_EOF >> "$cfgfile"
2600#! $SHELL
2601# Generated automatically by $as_me ($PACKAGE) $VERSION
2602# NOTE: Changes made to this file will be lost: look at ltmain.sh.
2603
2604# Provide generalized library-building support services.
2605# Written by Gordon Matzigkeit, 1996
2606
2607_LT_COPYING
2608_LT_LIBTOOL_TAGS
2609
2610# Configured defaults for sys_lib_dlsearch_path munging.
2611: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
2612
2613# ### BEGIN LIBTOOL CONFIG
2614_LT_LIBTOOL_CONFIG_VARS
2615_LT_LIBTOOL_TAG_VARS
2616# ### END LIBTOOL CONFIG
2617
2618_LT_EOF
2619
2620    cat <<'_LT_EOF' >> "$cfgfile"
2621
2622# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
2623
2624_LT_PREPARE_MUNGE_PATH_LIST
2625_LT_PREPARE_CC_BASENAME
2626
2627# ### END FUNCTIONS SHARED WITH CONFIGURE
2628
2629_LT_EOF
2630
2631  case $host_os in
2632  aix3*)
2633    cat <<\_LT_EOF >> "$cfgfile"
2634# AIX sometimes has problems with the GCC collect2 program.  For some
2635# reason, if we set the COLLECT_NAMES environment variable, the problems
2636# vanish in a puff of smoke.
2637if test set != "${COLLECT_NAMES+set}"; then
2638  COLLECT_NAMES=
2639  export COLLECT_NAMES
2640fi
2641_LT_EOF
2642    ;;
2643  esac
2644
2645  _LT_PROG_LTMAIN
2646
2647  # We use sed instead of cat because bash on DJGPP gets confused if
2648  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
2649  # text mode, it properly converts lines to CR/LF.  This bash problem
2650  # is reportedly fixed, but why not run on old versions too?
2651  sed '$q' "$ltmain" >> "$cfgfile" \
2652     || (rm -f "$cfgfile"; exit 1)
2653
2654   mv -f "$cfgfile" "$ofile" ||
2655    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
2656  chmod +x "$ofile"
2657],
2658[cat <<_LT_EOF >> "$ofile"
2659
2660dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
2661dnl in a comment (ie after a #).
2662# ### BEGIN LIBTOOL TAG CONFIG: $1
2663_LT_LIBTOOL_TAG_VARS(_LT_TAG)
2664# ### END LIBTOOL TAG CONFIG: $1
2665_LT_EOF
2666])dnl /m4_if
2667],
2668[m4_if([$1], [], [
2669    PACKAGE='$PACKAGE'
2670    VERSION='$VERSION'
2671    RM='$RM'
2672    ofile='$ofile'], [])
2673])dnl /_LT_CONFIG_SAVE_COMMANDS
2674])# _LT_CONFIG
2675
2676
2677# LT_SUPPORTED_TAG(TAG)
2678# ---------------------
2679# Trace this macro to discover what tags are supported by the libtool
2680# --tag option, using:
2681#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
2682AC_DEFUN([LT_SUPPORTED_TAG], [])
2683
2684
2685# C support is built-in for now
2686m4_define([_LT_LANG_C_enabled], [])
2687m4_define([_LT_TAGS], [])
2688
2689
2690# LT_LANG(LANG)
2691# -------------
2692# Enable libtool support for the given language if not already enabled.
2693AC_DEFUN([LT_LANG],
2694[AC_BEFORE([$0], [LT_OUTPUT])dnl
2695m4_case([$1],
2696  [C],			[_LT_LANG(C)],
2697  [C++],		[_LT_LANG(CXX)],
2698  [Go],			[_LT_LANG(GO)],
2699  [Java],		[_LT_LANG(GCJ)],
2700  [Fortran 77],		[_LT_LANG(F77)],
2701  [Fortran],		[_LT_LANG(FC)],
2702  [Windows Resource],	[_LT_LANG(RC)],
2703  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
2704    [_LT_LANG($1)],
2705    [m4_fatal([$0: unsupported language: "$1"])])])dnl
2706])# LT_LANG
2707
2708
2709# _LT_LANG(LANGNAME)
2710# ------------------
2711m4_defun([_LT_LANG],
2712[m4_ifdef([_LT_LANG_]$1[_enabled], [],
2713  [LT_SUPPORTED_TAG([$1])dnl
2714  m4_append([_LT_TAGS], [$1 ])dnl
2715  m4_define([_LT_LANG_]$1[_enabled], [])dnl
2716  _LT_LANG_$1_CONFIG($1)])dnl
2717])# _LT_LANG
2718
2719
2720m4_ifndef([AC_PROG_GO], [
2721# NOTE: This macro has been submitted for inclusion into   #
2722#  GNU Autoconf as AC_PROG_GO.  When it is available in    #
2723#  a released version of Autoconf we should remove this    #
2724#  macro and use it instead.                               #
2725m4_defun([AC_PROG_GO],
2726[AC_LANG_PUSH(Go)dnl
2727AC_ARG_VAR([GOC],     [Go compiler command])dnl
2728AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
2729_AC_ARG_VAR_LDFLAGS()dnl
2730AC_CHECK_TOOL(GOC, gccgo)
2731if test -z "$GOC"; then
2732  if test -n "$ac_tool_prefix"; then
2733    AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
2734  fi
2735fi
2736if test -z "$GOC"; then
2737  AC_CHECK_PROG(GOC, gccgo, gccgo, false)
2738fi
2739])#m4_defun
2740])#m4_ifndef
2741
2742
2743# _LT_LANG_DEFAULT_CONFIG
2744# -----------------------
2745m4_defun([_LT_LANG_DEFAULT_CONFIG],
2746[AC_PROVIDE_IFELSE([AC_PROG_CXX],
2747  [LT_LANG(CXX)],
2748  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
2749
2750AC_PROVIDE_IFELSE([AC_PROG_F77],
2751  [LT_LANG(F77)],
2752  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
2753
2754AC_PROVIDE_IFELSE([AC_PROG_FC],
2755  [LT_LANG(FC)],
2756  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
2757
2758dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
2759dnl pulling things in needlessly.
2760AC_PROVIDE_IFELSE([AC_PROG_GCJ],
2761  [LT_LANG(GCJ)],
2762  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
2763    [LT_LANG(GCJ)],
2764    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
2765      [LT_LANG(GCJ)],
2766      [m4_ifdef([AC_PROG_GCJ],
2767	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
2768       m4_ifdef([A][M_PROG_GCJ],
2769	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
2770       m4_ifdef([LT_PROG_GCJ],
2771	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
2772
2773AC_PROVIDE_IFELSE([AC_PROG_GO],
2774  [LT_LANG(GO)],
2775  [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
2776
2777AC_PROVIDE_IFELSE([LT_PROG_RC],
2778  [LT_LANG(RC)],
2779  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
2780])# _LT_LANG_DEFAULT_CONFIG
2781
2782# Obsolete macros:
2783AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
2784AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
2785AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
2786AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
2787AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
2788dnl aclocal-1.4 backwards compatibility:
2789dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
2790dnl AC_DEFUN([AC_LIBTOOL_F77], [])
2791dnl AC_DEFUN([AC_LIBTOOL_FC], [])
2792dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
2793dnl AC_DEFUN([AC_LIBTOOL_RC], [])
2794
2795
2796# _LT_TAG_COMPILER
2797# ----------------
2798m4_defun([_LT_TAG_COMPILER],
2799[AC_REQUIRE([AC_PROG_CC])dnl
2800
2801_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
2802_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
2803_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
2804_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
2805
2806# If no C compiler was specified, use CC.
2807LTCC=${LTCC-"$CC"}
2808
2809# If no C compiler flags were specified, use CFLAGS.
2810LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
2811
2812# Allow CC to be a program name with arguments.
2813compiler=$CC
2814])# _LT_TAG_COMPILER
2815
2816
2817# _LT_COMPILER_BOILERPLATE
2818# ------------------------
2819# Check for compiler boilerplate output or warnings with
2820# the simple compiler test code.
2821m4_defun([_LT_COMPILER_BOILERPLATE],
2822[m4_require([_LT_DECL_SED])dnl
2823ac_outfile=conftest.$ac_objext
2824echo "$lt_simple_compile_test_code" >conftest.$ac_ext
2825eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
2826_lt_compiler_boilerplate=`cat conftest.err`
2827$RM conftest*
2828])# _LT_COMPILER_BOILERPLATE
2829
2830
2831# _LT_LINKER_BOILERPLATE
2832# ----------------------
2833# Check for linker boilerplate output or warnings with
2834# the simple link test code.
2835m4_defun([_LT_LINKER_BOILERPLATE],
2836[m4_require([_LT_DECL_SED])dnl
2837ac_outfile=conftest.$ac_objext
2838echo "$lt_simple_link_test_code" >conftest.$ac_ext
2839eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
2840_lt_linker_boilerplate=`cat conftest.err`
2841$RM -r conftest*
2842])# _LT_LINKER_BOILERPLATE
2843
2844# _LT_REQUIRED_DARWIN_CHECKS
2845# -------------------------
2846m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
2847  case $host_os in
2848    rhapsody* | darwin*)
2849    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
2850    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
2851    AC_CHECK_TOOL([LIPO], [lipo], [:])
2852    AC_CHECK_TOOL([OTOOL], [otool], [:])
2853    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
2854    _LT_DECL([], [DSYMUTIL], [1],
2855      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
2856    _LT_DECL([], [NMEDIT], [1],
2857      [Tool to change global to local symbols on Mac OS X])
2858    _LT_DECL([], [LIPO], [1],
2859      [Tool to manipulate fat objects and archives on Mac OS X])
2860    _LT_DECL([], [OTOOL], [1],
2861      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
2862    _LT_DECL([], [OTOOL64], [1],
2863      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
2864
2865    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
2866      [lt_cv_apple_cc_single_mod=no
2867      if test -z "$LT_MULTI_MODULE"; then
2868	# By default we will add the -single_module flag. You can override
2869	# by either setting the environment variable LT_MULTI_MODULE
2870	# non-empty at configure time, or by adding -multi_module to the
2871	# link flags.
2872	rm -rf libconftest.dylib*
2873	echo "int foo(void){return 1;}" > conftest.c
2874	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
2875-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
2876	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
2877	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
2878        _lt_result=$?
2879	# If there is a non-empty error log, and "single_module"
2880	# appears in it, assume the flag caused a linker warning
2881        if test -s conftest.err && $GREP single_module conftest.err; then
2882	  cat conftest.err >&AS_MESSAGE_LOG_FD
2883	# Otherwise, if the output was created with a 0 exit code from
2884	# the compiler, it worked.
2885	elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
2886	  lt_cv_apple_cc_single_mod=yes
2887	else
2888	  cat conftest.err >&AS_MESSAGE_LOG_FD
2889	fi
2890	rm -rf libconftest.dylib*
2891	rm -f conftest.*
2892      fi])
2893
2894    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
2895      [lt_cv_ld_exported_symbols_list],
2896      [lt_cv_ld_exported_symbols_list=no
2897      save_LDFLAGS=$LDFLAGS
2898      echo "_main" > conftest.sym
2899      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
2900      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2901	[lt_cv_ld_exported_symbols_list=yes],
2902	[lt_cv_ld_exported_symbols_list=no])
2903	LDFLAGS=$save_LDFLAGS
2904    ])
2905
2906    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
2907      [lt_cv_ld_force_load=no
2908      cat > conftest.c << _LT_EOF
2909int forced_loaded() { return 2;}
2910_LT_EOF
2911      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
2912      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
2913      echo "$AR cr libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
2914      $AR cr libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
2915      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
2916      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
2917      cat > conftest.c << _LT_EOF
2918int main() { return 0;}
2919_LT_EOF
2920      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
2921      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
2922      _lt_result=$?
2923      if test -s conftest.err && $GREP force_load conftest.err; then
2924	cat conftest.err >&AS_MESSAGE_LOG_FD
2925      elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
2926	lt_cv_ld_force_load=yes
2927      else
2928	cat conftest.err >&AS_MESSAGE_LOG_FD
2929      fi
2930        rm -f conftest.err libconftest.a conftest conftest.c
2931        rm -rf conftest.dSYM
2932    ])
2933    case $host_os in
2934    rhapsody* | darwin1.[[012]])
2935      _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
2936    darwin1.*)
2937      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
2938    darwin*) # darwin 5.x on
2939      # if running on 10.5 or later, the deployment target defaults
2940      # to the OS version, if on x86, and 10.4, the deployment
2941      # target defaults to 10.4. Don't you love it?
2942      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
2943	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
2944	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
2945	10.[[012]][[,.]]*)
2946	  _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
2947	10.*)
2948	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
2949      esac
2950    ;;
2951  esac
2952    if test yes = "$lt_cv_apple_cc_single_mod"; then
2953      _lt_dar_single_mod='$single_module'
2954    fi
2955    if test yes = "$lt_cv_ld_exported_symbols_list"; then
2956      _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
2957    else
2958      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
2959    fi
2960    if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
2961      _lt_dsymutil='~$DSYMUTIL $lib || :'
2962    else
2963      _lt_dsymutil=
2964    fi
2965    ;;
2966  esac
2967])
2968
2969
2970# _LT_DARWIN_LINKER_FEATURES([TAG])
2971# ---------------------------------
2972# Checks for linker and compiler features on darwin
2973m4_defun([_LT_DARWIN_LINKER_FEATURES],
2974[
2975  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
2976  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
2977  _LT_TAGVAR(hardcode_direct, $1)=no
2978  _LT_TAGVAR(hardcode_automatic, $1)=yes
2979  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2980  if test yes = "$lt_cv_ld_force_load"; then
2981    _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\"`'
2982    m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
2983                  [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
2984  else
2985    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
2986  fi
2987  _LT_TAGVAR(link_all_deplibs, $1)=yes
2988  _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
2989  case $cc_basename in
2990     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
2991     *) _lt_dar_can_shared=$GCC ;;
2992  esac
2993  if test yes = "$_lt_dar_can_shared"; then
2994    output_verbose_link_cmd=func_echo_all
2995    _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"
2996    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
2997    _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"
2998    _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"
2999    m4_if([$1], [CXX],
3000[   if test yes != "$lt_cv_apple_cc_single_mod"; then
3001      _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"
3002      _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"
3003    fi
3004],[])
3005  else
3006  _LT_TAGVAR(ld_shlibs, $1)=no
3007  fi
3008])
3009
3010# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
3011# ----------------------------------
3012# Links a minimal program and checks the executable
3013# for the system default hardcoded library path. In most cases,
3014# this is /usr/lib:/lib, but when the MPI compilers are used
3015# the location of the communication and MPI libs are included too.
3016# If we don't find anything, use the default library path according
3017# to the aix ld manual.
3018# Store the results from the different compilers for each TAGNAME.
3019# Allow to override them for all tags through lt_cv_aix_libpath.
3020m4_defun([_LT_SYS_MODULE_PATH_AIX],
3021[m4_require([_LT_DECL_SED])dnl
3022if test set = "${lt_cv_aix_libpath+set}"; then
3023  aix_libpath=$lt_cv_aix_libpath
3024else
3025  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
3026  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
3027  lt_aix_libpath_sed='[
3028      /Import File Strings/,/^$/ {
3029	  /^0/ {
3030	      s/^0  *\([^ ]*\) *$/\1/
3031	      p
3032	  }
3033      }]'
3034  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
3035  # Check for a 64-bit object if we didn't find anything.
3036  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
3037    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
3038  fi],[])
3039  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
3040    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
3041  fi
3042  ])
3043  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
3044fi
3045])# _LT_SYS_MODULE_PATH_AIX
3046
3047
3048# _LT_SHELL_INIT(ARG)
3049# -------------------
3050m4_define([_LT_SHELL_INIT],
3051[m4_divert_text([M4SH-INIT], [$1
3052])])# _LT_SHELL_INIT
3053
3054
3055
3056# _LT_PROG_ECHO_BACKSLASH
3057# -----------------------
3058# Find how we can fake an echo command that does not interpret backslash.
3059# In particular, with Autoconf 2.60 or later we add some code to the start
3060# of the generated configure script that will find a shell with a builtin
3061# printf (that we can use as an echo command).
3062m4_defun([_LT_PROG_ECHO_BACKSLASH],
3063[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
3064ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
3065ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
3066
3067AC_MSG_CHECKING([how to print strings])
3068# Test print first, because it will be a builtin if present.
3069if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
3070   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
3071  ECHO='print -r --'
3072elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
3073  ECHO='printf %s\n'
3074else
3075  # Use this function as a fallback that always works.
3076  func_fallback_echo ()
3077  {
3078    eval 'cat <<_LTECHO_EOF
3079$[]1
3080_LTECHO_EOF'
3081  }
3082  ECHO='func_fallback_echo'
3083fi
3084
3085# func_echo_all arg...
3086# Invoke $ECHO with all args, space-separated.
3087func_echo_all ()
3088{
3089    $ECHO "$*"
3090}
3091
3092case $ECHO in
3093  printf*) AC_MSG_RESULT([printf]) ;;
3094  print*) AC_MSG_RESULT([print -r]) ;;
3095  *) AC_MSG_RESULT([cat]) ;;
3096esac
3097
3098m4_ifdef([_AS_DETECT_SUGGESTED],
3099[_AS_DETECT_SUGGESTED([
3100  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
3101    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
3102    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
3103    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
3104    PATH=/empty FPATH=/empty; export PATH FPATH
3105    test "X`printf %s $ECHO`" = "X$ECHO" \
3106      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
3107
3108_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
3109_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
3110])# _LT_PROG_ECHO_BACKSLASH
3111
3112
3113# _LT_WITH_SYSROOT
3114# ----------------
3115AC_DEFUN([_LT_WITH_SYSROOT],
3116[AC_MSG_CHECKING([for sysroot])
3117AC_ARG_WITH([sysroot],
3118[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
3119  [Search for dependent libraries within DIR (or the compiler's sysroot
3120   if not specified).])],
3121[], [with_sysroot=no])
3122
3123dnl lt_sysroot will always be passed unquoted.  We quote it here
3124dnl in case the user passed a directory name.
3125lt_sysroot=
3126case $with_sysroot in #(
3127 yes)
3128   if test yes = "$GCC"; then
3129     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
3130   fi
3131   ;; #(
3132 /*)
3133   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
3134   ;; #(
3135 no|'')
3136   ;; #(
3137 *)
3138   AC_MSG_RESULT([$with_sysroot])
3139   AC_MSG_ERROR([The sysroot must be an absolute path.])
3140   ;;
3141esac
3142
3143 AC_MSG_RESULT([${lt_sysroot:-no}])
3144_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
3145[dependent libraries, and where our libraries should be installed.])])
3146
3147# _LT_ENABLE_LOCK
3148# ---------------
3149m4_defun([_LT_ENABLE_LOCK],
3150[AC_ARG_ENABLE([libtool-lock],
3151  [AS_HELP_STRING([--disable-libtool-lock],
3152    [avoid locking (might break parallel builds)])])
3153test no = "$enable_libtool_lock" || enable_libtool_lock=yes
3154
3155# Some flags need to be propagated to the compiler or linker for good
3156# libtool support.
3157case $host in
3158ia64-*-hpux*)
3159  # Find out what ABI is being produced by ac_compile, and set mode
3160  # options accordingly.
3161  echo 'int i;' > conftest.$ac_ext
3162  if AC_TRY_EVAL(ac_compile); then
3163    case `/usr/bin/file conftest.$ac_objext` in
3164      *ELF-32*)
3165	HPUX_IA64_MODE=32
3166	;;
3167      *ELF-64*)
3168	HPUX_IA64_MODE=64
3169	;;
3170    esac
3171  fi
3172  rm -rf conftest*
3173  ;;
3174*-*-irix6*)
3175  # Find out what ABI is being produced by ac_compile, and set linker
3176  # options accordingly.
3177  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
3178  if AC_TRY_EVAL(ac_compile); then
3179    if test yes = "$lt_cv_prog_gnu_ld"; then
3180      case `/usr/bin/file conftest.$ac_objext` in
3181	*32-bit*)
3182	  LD="${LD-ld} -melf32bsmip"
3183	  ;;
3184	*N32*)
3185	  LD="${LD-ld} -melf32bmipn32"
3186	  ;;
3187	*64-bit*)
3188	  LD="${LD-ld} -melf64bmip"
3189	;;
3190      esac
3191    else
3192      case `/usr/bin/file conftest.$ac_objext` in
3193	*32-bit*)
3194	  LD="${LD-ld} -32"
3195	  ;;
3196	*N32*)
3197	  LD="${LD-ld} -n32"
3198	  ;;
3199	*64-bit*)
3200	  LD="${LD-ld} -64"
3201	  ;;
3202      esac
3203    fi
3204  fi
3205  rm -rf conftest*
3206  ;;
3207
3208mips64*-*linux*)
3209  # Find out what ABI is being produced by ac_compile, and set linker
3210  # options accordingly.
3211  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
3212  if AC_TRY_EVAL(ac_compile); then
3213    emul=elf
3214    case `/usr/bin/file conftest.$ac_objext` in
3215      *32-bit*)
3216	emul="${emul}32"
3217	;;
3218      *64-bit*)
3219	emul="${emul}64"
3220	;;
3221    esac
3222    case `/usr/bin/file conftest.$ac_objext` in
3223      *MSB*)
3224	emul="${emul}btsmip"
3225	;;
3226      *LSB*)
3227	emul="${emul}ltsmip"
3228	;;
3229    esac
3230    case `/usr/bin/file conftest.$ac_objext` in
3231      *N32*)
3232	emul="${emul}n32"
3233	;;
3234    esac
3235    LD="${LD-ld} -m $emul"
3236  fi
3237  rm -rf conftest*
3238  ;;
3239
3240x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
3241s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
3242  # Find out what ABI is being produced by ac_compile, and set linker
3243  # options accordingly.  Note that the listed cases only cover the
3244  # situations where additional linker options are needed (such as when
3245  # doing 32-bit compilation for a host where ld defaults to 64-bit, or
3246  # vice versa); the common cases where no linker options are needed do
3247  # not appear in the list.
3248  echo 'int i;' > conftest.$ac_ext
3249  if AC_TRY_EVAL(ac_compile); then
3250    case `/usr/bin/file conftest.o` in
3251      *32-bit*)
3252	case $host in
3253	  x86_64-*kfreebsd*-gnu)
3254	    LD="${LD-ld} -m elf_i386_fbsd"
3255	    ;;
3256	  x86_64-*linux*)
3257	    case `/usr/bin/file conftest.o` in
3258	      *x86-64*)
3259		LD="${LD-ld} -m elf32_x86_64"
3260		;;
3261	      *)
3262		LD="${LD-ld} -m elf_i386"
3263		;;
3264	    esac
3265	    ;;
3266	  powerpc64le-*linux*)
3267	    LD="${LD-ld} -m elf32lppclinux"
3268	    ;;
3269	  powerpc64-*linux*)
3270	    LD="${LD-ld} -m elf32ppclinux"
3271	    ;;
3272	  s390x-*linux*)
3273	    LD="${LD-ld} -m elf_s390"
3274	    ;;
3275	  sparc64-*linux*)
3276	    LD="${LD-ld} -m elf32_sparc"
3277	    ;;
3278	esac
3279	;;
3280      *64-bit*)
3281	case $host in
3282	  x86_64-*kfreebsd*-gnu)
3283	    LD="${LD-ld} -m elf_x86_64_fbsd"
3284	    ;;
3285	  x86_64-*linux*)
3286	    LD="${LD-ld} -m elf_x86_64"
3287	    ;;
3288	  powerpcle-*linux*)
3289	    LD="${LD-ld} -m elf64lppc"
3290	    ;;
3291	  powerpc-*linux*)
3292	    LD="${LD-ld} -m elf64ppc"
3293	    ;;
3294	  s390*-*linux*|s390*-*tpf*)
3295	    LD="${LD-ld} -m elf64_s390"
3296	    ;;
3297	  sparc*-*linux*)
3298	    LD="${LD-ld} -m elf64_sparc"
3299	    ;;
3300	esac
3301	;;
3302    esac
3303  fi
3304  rm -rf conftest*
3305  ;;
3306
3307*-*-sco3.2v5*)
3308  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3309  SAVE_CFLAGS=$CFLAGS
3310  CFLAGS="$CFLAGS -belf"
3311  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
3312    [AC_LANG_PUSH(C)
3313     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
3314     AC_LANG_POP])
3315  if test yes != "$lt_cv_cc_needs_belf"; then
3316    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3317    CFLAGS=$SAVE_CFLAGS
3318  fi
3319  ;;
3320*-*solaris*)
3321  # Find out what ABI is being produced by ac_compile, and set linker
3322  # options accordingly.
3323  echo 'int i;' > conftest.$ac_ext
3324  if AC_TRY_EVAL(ac_compile); then
3325    case `/usr/bin/file conftest.o` in
3326    *64-bit*)
3327      case $lt_cv_prog_gnu_ld in
3328      yes*)
3329        case $host in
3330        i?86-*-solaris*|x86_64-*-solaris*)
3331          LD="${LD-ld} -m elf_x86_64"
3332          ;;
3333        sparc*-*-solaris*)
3334          LD="${LD-ld} -m elf64_sparc"
3335          ;;
3336        esac
3337        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
3338        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
3339          LD=${LD-ld}_sol2
3340        fi
3341        ;;
3342      *)
3343	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
3344	  LD="${LD-ld} -64"
3345	fi
3346	;;
3347      esac
3348      ;;
3349    esac
3350  fi
3351  rm -rf conftest*
3352  ;;
3353esac
3354
3355need_locks=$enable_libtool_lock
3356])# _LT_ENABLE_LOCK
3357
3358
3359# _LT_PROG_AR
3360# -----------
3361m4_defun([_LT_PROG_AR],
3362[AC_CHECK_TOOLS(AR, [ar], false)
3363: ${AR=ar}
3364: ${AR_FLAGS=cr}
3365_LT_DECL([], [AR], [1], [The archiver])
3366_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
3367
3368AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
3369  [lt_cv_ar_at_file=no
3370   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
3371     [echo conftest.$ac_objext > conftest.lst
3372      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
3373      AC_TRY_EVAL([lt_ar_try])
3374      if test 0 -eq "$ac_status"; then
3375	# Ensure the archiver fails upon bogus file names.
3376	rm -f conftest.$ac_objext libconftest.a
3377	AC_TRY_EVAL([lt_ar_try])
3378	if test 0 -ne "$ac_status"; then
3379          lt_cv_ar_at_file=@
3380        fi
3381      fi
3382      rm -f conftest.* libconftest.a
3383     ])
3384  ])
3385
3386if test no = "$lt_cv_ar_at_file"; then
3387  archiver_list_spec=
3388else
3389  archiver_list_spec=$lt_cv_ar_at_file
3390fi
3391_LT_DECL([], [archiver_list_spec], [1],
3392  [How to feed a file listing to the archiver])
3393])# _LT_PROG_AR
3394
3395
3396# _LT_CMD_OLD_ARCHIVE
3397# -------------------
3398m4_defun([_LT_CMD_OLD_ARCHIVE],
3399[_LT_PROG_AR
3400
3401AC_CHECK_TOOL(STRIP, strip, :)
3402test -z "$STRIP" && STRIP=:
3403_LT_DECL([], [STRIP], [1], [A symbol stripping program])
3404
3405AC_CHECK_TOOL(RANLIB, ranlib, :)
3406test -z "$RANLIB" && RANLIB=:
3407_LT_DECL([], [RANLIB], [1],
3408    [Commands used to install an old-style archive])
3409
3410# Determine commands to create old-style static archives.
3411old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
3412old_postinstall_cmds='chmod 644 $oldlib'
3413old_postuninstall_cmds=
3414
3415if test -n "$RANLIB"; then
3416  case $host_os in
3417  bitrig* | openbsd*)
3418    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
3419    ;;
3420  *)
3421    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
3422    ;;
3423  esac
3424  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
3425fi
3426
3427case $host_os in
3428  darwin*)
3429    lock_old_archive_extraction=yes ;;
3430  *)
3431    lock_old_archive_extraction=no ;;
3432esac
3433_LT_DECL([], [old_postinstall_cmds], [2])
3434_LT_DECL([], [old_postuninstall_cmds], [2])
3435_LT_TAGDECL([], [old_archive_cmds], [2],
3436    [Commands used to build an old-style archive])
3437_LT_DECL([], [lock_old_archive_extraction], [0],
3438    [Whether to use a lock for old archive extraction])
3439])# _LT_CMD_OLD_ARCHIVE
3440
3441
3442# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
3443#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
3444# ----------------------------------------------------------------
3445# Check whether the given compiler option works
3446AC_DEFUN([_LT_COMPILER_OPTION],
3447[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3448m4_require([_LT_DECL_SED])dnl
3449AC_CACHE_CHECK([$1], [$2],
3450  [$2=no
3451   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
3452   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
3453   lt_compiler_flag="$3"  ## exclude from sc_useless_quotes_in_assignment
3454   # Insert the option either (1) after the last *FLAGS variable, or
3455   # (2) before a word containing "conftest.", or (3) at the end.
3456   # Note that $ac_compile itself does not contain backslashes and begins
3457   # with a dollar sign (not a hyphen), so the echo should work correctly.
3458   # The option is referenced via a variable to avoid confusing sed.
3459   lt_compile=`echo "$ac_compile" | $SED \
3460   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
3461   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
3462   -e 's:$: $lt_compiler_flag:'`
3463   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
3464   (eval "$lt_compile" 2>conftest.err)
3465   ac_status=$?
3466   cat conftest.err >&AS_MESSAGE_LOG_FD
3467   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
3468   if (exit $ac_status) && test -s "$ac_outfile"; then
3469     # The compiler can only warn and ignore the option if not recognized
3470     # So say no if there are warnings other than the usual output.
3471     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
3472     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
3473     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
3474       $2=yes
3475     fi
3476   fi
3477   $RM conftest*
3478])
3479
3480if test yes = "[$]$2"; then
3481    m4_if([$5], , :, [$5])
3482else
3483    m4_if([$6], , :, [$6])
3484fi
3485])# _LT_COMPILER_OPTION
3486
3487# Old name:
3488AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
3489dnl aclocal-1.4 backwards compatibility:
3490dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
3491
3492
3493# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
3494#                  [ACTION-SUCCESS], [ACTION-FAILURE])
3495# ----------------------------------------------------
3496# Check whether the given linker option works
3497AC_DEFUN([_LT_LINKER_OPTION],
3498[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3499m4_require([_LT_DECL_SED])dnl
3500AC_CACHE_CHECK([$1], [$2],
3501  [$2=no
3502   save_LDFLAGS=$LDFLAGS
3503   LDFLAGS="$LDFLAGS $3"
3504   echo "$lt_simple_link_test_code" > conftest.$ac_ext
3505   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
3506     # The linker can only warn and ignore the option if not recognized
3507     # So say no if there are warnings
3508     if test -s conftest.err; then
3509       # Append any errors to the config.log.
3510       cat conftest.err 1>&AS_MESSAGE_LOG_FD
3511       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
3512       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
3513       if diff conftest.exp conftest.er2 >/dev/null; then
3514         $2=yes
3515       fi
3516     else
3517       $2=yes
3518     fi
3519   fi
3520   $RM -r conftest*
3521   LDFLAGS=$save_LDFLAGS
3522])
3523
3524if test yes = "[$]$2"; then
3525    m4_if([$4], , :, [$4])
3526else
3527    m4_if([$5], , :, [$5])
3528fi
3529])# _LT_LINKER_OPTION
3530
3531# Old name:
3532AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
3533dnl aclocal-1.4 backwards compatibility:
3534dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
3535
3536
3537# LT_CMD_MAX_LEN
3538#---------------
3539AC_DEFUN([LT_CMD_MAX_LEN],
3540[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3541# find the maximum length of command line arguments
3542AC_MSG_CHECKING([the maximum length of command line arguments])
3543AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
3544  i=0
3545  teststring=ABCD
3546
3547  case $build_os in
3548  msdosdjgpp*)
3549    # On DJGPP, this test can blow up pretty badly due to problems in libc
3550    # (any single argument exceeding 2000 bytes causes a buffer overrun
3551    # during glob expansion).  Even if it were fixed, the result of this
3552    # check would be larger than it should be.
3553    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
3554    ;;
3555
3556  gnu*)
3557    # Under GNU Hurd, this test is not required because there is
3558    # no limit to the length of command line arguments.
3559    # Libtool will interpret -1 as no limit whatsoever
3560    lt_cv_sys_max_cmd_len=-1;
3561    ;;
3562
3563  cygwin* | mingw* | cegcc*)
3564    # On Win9x/ME, this test blows up -- it succeeds, but takes
3565    # about 5 minutes as the teststring grows exponentially.
3566    # Worse, since 9x/ME are not pre-emptively multitasking,
3567    # you end up with a "frozen" computer, even though with patience
3568    # the test eventually succeeds (with a max line length of 256k).
3569    # Instead, let's just punt: use the minimum linelength reported by
3570    # all of the supported platforms: 8192 (on NT/2K/XP).
3571    lt_cv_sys_max_cmd_len=8192;
3572    ;;
3573
3574  mint*)
3575    # On MiNT this can take a long time and run out of memory.
3576    lt_cv_sys_max_cmd_len=8192;
3577    ;;
3578
3579  amigaos*)
3580    # On AmigaOS with pdksh, this test takes hours, literally.
3581    # So we just punt and use a minimum line length of 8192.
3582    lt_cv_sys_max_cmd_len=8192;
3583    ;;
3584
3585  bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
3586    # This has been around since 386BSD, at least.  Likely further.
3587    if test -x /sbin/sysctl; then
3588      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
3589    elif test -x /usr/sbin/sysctl; then
3590      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
3591    else
3592      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
3593    fi
3594    # And add a safety zone
3595    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
3596    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
3597    ;;
3598
3599  interix*)
3600    # We know the value 262144 and hardcode it with a safety zone (like BSD)
3601    lt_cv_sys_max_cmd_len=196608
3602    ;;
3603
3604  os2*)
3605    # The test takes a long time on OS/2.
3606    lt_cv_sys_max_cmd_len=8192
3607    ;;
3608
3609  osf*)
3610    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
3611    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
3612    # nice to cause kernel panics so lets avoid the loop below.
3613    # First set a reasonable default.
3614    lt_cv_sys_max_cmd_len=16384
3615    #
3616    if test -x /sbin/sysconfig; then
3617      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
3618        *1*) lt_cv_sys_max_cmd_len=-1 ;;
3619      esac
3620    fi
3621    ;;
3622  sco3.2v5*)
3623    lt_cv_sys_max_cmd_len=102400
3624    ;;
3625  sysv5* | sco5v6* | sysv4.2uw2*)
3626    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
3627    if test -n "$kargmax"; then
3628      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
3629    else
3630      lt_cv_sys_max_cmd_len=32768
3631    fi
3632    ;;
3633  *)
3634    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
3635    if test -n "$lt_cv_sys_max_cmd_len" && \
3636       test undefined != "$lt_cv_sys_max_cmd_len"; then
3637      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
3638      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
3639    else
3640      # Make teststring a little bigger before we do anything with it.
3641      # a 1K string should be a reasonable start.
3642      for i in 1 2 3 4 5 6 7 8; do
3643        teststring=$teststring$teststring
3644      done
3645      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
3646      # If test is not a shell built-in, we'll probably end up computing a
3647      # maximum length that is only half of the actual maximum length, but
3648      # we can't tell.
3649      while { test X`env echo "$teststring$teststring" 2>/dev/null` \
3650	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
3651	      test 17 != "$i" # 1/2 MB should be enough
3652      do
3653        i=`expr $i + 1`
3654        teststring=$teststring$teststring
3655      done
3656      # Only check the string length outside the loop.
3657      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
3658      teststring=
3659      # Add a significant safety factor because C++ compilers can tack on
3660      # massive amounts of additional arguments before passing them to the
3661      # linker.  It appears as though 1/2 is a usable value.
3662      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
3663    fi
3664    ;;
3665  esac
3666])
3667if test -n "$lt_cv_sys_max_cmd_len"; then
3668  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
3669else
3670  AC_MSG_RESULT(none)
3671fi
3672max_cmd_len=$lt_cv_sys_max_cmd_len
3673_LT_DECL([], [max_cmd_len], [0],
3674    [What is the maximum length of a command?])
3675])# LT_CMD_MAX_LEN
3676
3677# Old name:
3678AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
3679dnl aclocal-1.4 backwards compatibility:
3680dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
3681
3682
3683# _LT_HEADER_DLFCN
3684# ----------------
3685m4_defun([_LT_HEADER_DLFCN],
3686[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
3687])# _LT_HEADER_DLFCN
3688
3689
3690# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
3691#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
3692# ----------------------------------------------------------------
3693m4_defun([_LT_TRY_DLOPEN_SELF],
3694[m4_require([_LT_HEADER_DLFCN])dnl
3695if test yes = "$cross_compiling"; then :
3696  [$4]
3697else
3698  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
3699  lt_status=$lt_dlunknown
3700  cat > conftest.$ac_ext <<_LT_EOF
3701[#line $LINENO "configure"
3702#include "confdefs.h"
3703
3704#if HAVE_DLFCN_H
3705#include <dlfcn.h>
3706#endif
3707
3708#include <stdio.h>
3709
3710#ifdef RTLD_GLOBAL
3711#  define LT_DLGLOBAL		RTLD_GLOBAL
3712#else
3713#  ifdef DL_GLOBAL
3714#    define LT_DLGLOBAL		DL_GLOBAL
3715#  else
3716#    define LT_DLGLOBAL		0
3717#  endif
3718#endif
3719
3720/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
3721   find out it does not work in some platform. */
3722#ifndef LT_DLLAZY_OR_NOW
3723#  ifdef RTLD_LAZY
3724#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
3725#  else
3726#    ifdef DL_LAZY
3727#      define LT_DLLAZY_OR_NOW		DL_LAZY
3728#    else
3729#      ifdef RTLD_NOW
3730#        define LT_DLLAZY_OR_NOW	RTLD_NOW
3731#      else
3732#        ifdef DL_NOW
3733#          define LT_DLLAZY_OR_NOW	DL_NOW
3734#        else
3735#          define LT_DLLAZY_OR_NOW	0
3736#        endif
3737#      endif
3738#    endif
3739#  endif
3740#endif
3741
3742/* When -fvisibility=hidden is used, assume the code has been annotated
3743   correspondingly for the symbols needed.  */
3744#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
3745int fnord () __attribute__((visibility("default")));
3746#endif
3747
3748int fnord () { return 42; }
3749int main ()
3750{
3751  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
3752  int status = $lt_dlunknown;
3753
3754  if (self)
3755    {
3756      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
3757      else
3758        {
3759	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
3760          else puts (dlerror ());
3761	}
3762      /* dlclose (self); */
3763    }
3764  else
3765    puts (dlerror ());
3766
3767  return status;
3768}]
3769_LT_EOF
3770  if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
3771    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
3772    lt_status=$?
3773    case x$lt_status in
3774      x$lt_dlno_uscore) $1 ;;
3775      x$lt_dlneed_uscore) $2 ;;
3776      x$lt_dlunknown|x*) $3 ;;
3777    esac
3778  else :
3779    # compilation failed
3780    $3
3781  fi
3782fi
3783rm -fr conftest*
3784])# _LT_TRY_DLOPEN_SELF
3785
3786
3787# LT_SYS_DLOPEN_SELF
3788# ------------------
3789AC_DEFUN([LT_SYS_DLOPEN_SELF],
3790[m4_require([_LT_HEADER_DLFCN])dnl
3791if test yes != "$enable_dlopen"; then
3792  enable_dlopen=unknown
3793  enable_dlopen_self=unknown
3794  enable_dlopen_self_static=unknown
3795else
3796  lt_cv_dlopen=no
3797  lt_cv_dlopen_libs=
3798
3799  case $host_os in
3800  beos*)
3801    lt_cv_dlopen=load_add_on
3802    lt_cv_dlopen_libs=
3803    lt_cv_dlopen_self=yes
3804    ;;
3805
3806  mingw* | pw32* | cegcc*)
3807    lt_cv_dlopen=LoadLibrary
3808    lt_cv_dlopen_libs=
3809    ;;
3810
3811  cygwin*)
3812    lt_cv_dlopen=dlopen
3813    lt_cv_dlopen_libs=
3814    ;;
3815
3816  darwin*)
3817    # if libdl is installed we need to link against it
3818    AC_CHECK_LIB([dl], [dlopen],
3819		[lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
3820    lt_cv_dlopen=dyld
3821    lt_cv_dlopen_libs=
3822    lt_cv_dlopen_self=yes
3823    ])
3824    ;;
3825
3826  tpf*)
3827    # Don't try to run any link tests for TPF.  We know it's impossible
3828    # because TPF is a cross-compiler, and we know how we open DSOs.
3829    lt_cv_dlopen=dlopen
3830    lt_cv_dlopen_libs=
3831    lt_cv_dlopen_self=no
3832    ;;
3833
3834  *)
3835    AC_CHECK_FUNC([shl_load],
3836	  [lt_cv_dlopen=shl_load],
3837      [AC_CHECK_LIB([dld], [shl_load],
3838	    [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
3839	[AC_CHECK_FUNC([dlopen],
3840	      [lt_cv_dlopen=dlopen],
3841	  [AC_CHECK_LIB([dl], [dlopen],
3842		[lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
3843	    [AC_CHECK_LIB([svld], [dlopen],
3844		  [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
3845	      [AC_CHECK_LIB([dld], [dld_link],
3846		    [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
3847	      ])
3848	    ])
3849	  ])
3850	])
3851      ])
3852    ;;
3853  esac
3854
3855  if test no = "$lt_cv_dlopen"; then
3856    enable_dlopen=no
3857  else
3858    enable_dlopen=yes
3859  fi
3860
3861  case $lt_cv_dlopen in
3862  dlopen)
3863    save_CPPFLAGS=$CPPFLAGS
3864    test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
3865
3866    save_LDFLAGS=$LDFLAGS
3867    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
3868
3869    save_LIBS=$LIBS
3870    LIBS="$lt_cv_dlopen_libs $LIBS"
3871
3872    AC_CACHE_CHECK([whether a program can dlopen itself],
3873	  lt_cv_dlopen_self, [dnl
3874	  _LT_TRY_DLOPEN_SELF(
3875	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
3876	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
3877    ])
3878
3879    if test yes = "$lt_cv_dlopen_self"; then
3880      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
3881      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
3882	  lt_cv_dlopen_self_static, [dnl
3883	  _LT_TRY_DLOPEN_SELF(
3884	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
3885	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
3886      ])
3887    fi
3888
3889    CPPFLAGS=$save_CPPFLAGS
3890    LDFLAGS=$save_LDFLAGS
3891    LIBS=$save_LIBS
3892    ;;
3893  esac
3894
3895  case $lt_cv_dlopen_self in
3896  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
3897  *) enable_dlopen_self=unknown ;;
3898  esac
3899
3900  case $lt_cv_dlopen_self_static in
3901  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
3902  *) enable_dlopen_self_static=unknown ;;
3903  esac
3904fi
3905_LT_DECL([dlopen_support], [enable_dlopen], [0],
3906	 [Whether dlopen is supported])
3907_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
3908	 [Whether dlopen of programs is supported])
3909_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
3910	 [Whether dlopen of statically linked programs is supported])
3911])# LT_SYS_DLOPEN_SELF
3912
3913# Old name:
3914AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
3915dnl aclocal-1.4 backwards compatibility:
3916dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
3917
3918
3919# _LT_COMPILER_C_O([TAGNAME])
3920# ---------------------------
3921# Check to see if options -c and -o are simultaneously supported by compiler.
3922# This macro does not hard code the compiler like AC_PROG_CC_C_O.
3923m4_defun([_LT_COMPILER_C_O],
3924[m4_require([_LT_DECL_SED])dnl
3925m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3926m4_require([_LT_TAG_COMPILER])dnl
3927AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
3928  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
3929  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
3930   $RM -r conftest 2>/dev/null
3931   mkdir conftest
3932   cd conftest
3933   mkdir out
3934   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
3935
3936   lt_compiler_flag="-o out/conftest2.$ac_objext"
3937   # Insert the option either (1) after the last *FLAGS variable, or
3938   # (2) before a word containing "conftest.", or (3) at the end.
3939   # Note that $ac_compile itself does not contain backslashes and begins
3940   # with a dollar sign (not a hyphen), so the echo should work correctly.
3941   lt_compile=`echo "$ac_compile" | $SED \
3942   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
3943   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
3944   -e 's:$: $lt_compiler_flag:'`
3945   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
3946   (eval "$lt_compile" 2>out/conftest.err)
3947   ac_status=$?
3948   cat out/conftest.err >&AS_MESSAGE_LOG_FD
3949   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
3950   if (exit $ac_status) && test -s out/conftest2.$ac_objext
3951   then
3952     # The compiler can only warn and ignore the option if not recognized
3953     # So say no if there are warnings
3954     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
3955     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
3956     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
3957       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
3958     fi
3959   fi
3960   chmod u+w . 2>&AS_MESSAGE_LOG_FD
3961   $RM conftest*
3962   # SGI C++ compiler will create directory out/ii_files/ for
3963   # template instantiation
3964   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
3965   $RM out/* && rmdir out
3966   cd ..
3967   $RM -r conftest
3968   $RM conftest*
3969])
3970_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
3971	[Does compiler simultaneously support -c and -o options?])
3972])# _LT_COMPILER_C_O
3973
3974
3975# _LT_COMPILER_FILE_LOCKS([TAGNAME])
3976# ----------------------------------
3977# Check to see if we can do hard links to lock some files if needed
3978m4_defun([_LT_COMPILER_FILE_LOCKS],
3979[m4_require([_LT_ENABLE_LOCK])dnl
3980m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3981_LT_COMPILER_C_O([$1])
3982
3983hard_links=nottested
3984if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
3985  # do not overwrite the value of need_locks provided by the user
3986  AC_MSG_CHECKING([if we can lock with hard links])
3987  hard_links=yes
3988  $RM conftest*
3989  ln conftest.a conftest.b 2>/dev/null && hard_links=no
3990  touch conftest.a
3991  ln conftest.a conftest.b 2>&5 || hard_links=no
3992  ln conftest.a conftest.b 2>/dev/null && hard_links=no
3993  AC_MSG_RESULT([$hard_links])
3994  if test no = "$hard_links"; then
3995    AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
3996    need_locks=warn
3997  fi
3998else
3999  need_locks=no
4000fi
4001_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
4002])# _LT_COMPILER_FILE_LOCKS
4003
4004
4005# _LT_CHECK_OBJDIR
4006# ----------------
4007m4_defun([_LT_CHECK_OBJDIR],
4008[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
4009[rm -f .libs 2>/dev/null
4010mkdir .libs 2>/dev/null
4011if test -d .libs; then
4012  lt_cv_objdir=.libs
4013else
4014  # MS-DOS does not allow filenames that begin with a dot.
4015  lt_cv_objdir=_libs
4016fi
4017rmdir .libs 2>/dev/null])
4018objdir=$lt_cv_objdir
4019_LT_DECL([], [objdir], [0],
4020         [The name of the directory that contains temporary libtool files])dnl
4021m4_pattern_allow([LT_OBJDIR])dnl
4022AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
4023  [Define to the sub-directory where libtool stores uninstalled libraries.])
4024])# _LT_CHECK_OBJDIR
4025
4026
4027# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
4028# --------------------------------------
4029# Check hardcoding attributes.
4030m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
4031[AC_MSG_CHECKING([how to hardcode library paths into programs])
4032_LT_TAGVAR(hardcode_action, $1)=
4033if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
4034   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
4035   test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
4036
4037  # We can hardcode non-existent directories.
4038  if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
4039     # If the only mechanism to avoid hardcoding is shlibpath_var, we
4040     # have to relink, otherwise we might link with an installed library
4041     # when we should be linking with a yet-to-be-installed one
4042     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
4043     test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
4044    # Linking always hardcodes the temporary library directory.
4045    _LT_TAGVAR(hardcode_action, $1)=relink
4046  else
4047    # We can link without hardcoding, and we can hardcode nonexisting dirs.
4048    _LT_TAGVAR(hardcode_action, $1)=immediate
4049  fi
4050else
4051  # We cannot hardcode anything, or else we can only hardcode existing
4052  # directories.
4053  _LT_TAGVAR(hardcode_action, $1)=unsupported
4054fi
4055AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
4056
4057if test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
4058   test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
4059  # Fast installation is not supported
4060  enable_fast_install=no
4061elif test yes = "$shlibpath_overrides_runpath" ||
4062     test no = "$enable_shared"; then
4063  # Fast installation is not necessary
4064  enable_fast_install=needless
4065fi
4066_LT_TAGDECL([], [hardcode_action], [0],
4067    [How to hardcode a shared library path into an executable])
4068])# _LT_LINKER_HARDCODE_LIBPATH
4069
4070
4071# _LT_CMD_STRIPLIB
4072# ----------------
4073m4_defun([_LT_CMD_STRIPLIB],
4074[m4_require([_LT_DECL_EGREP])
4075striplib=
4076old_striplib=
4077AC_MSG_CHECKING([whether stripping libraries is possible])
4078if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
4079  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
4080  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
4081  AC_MSG_RESULT([yes])
4082else
4083# FIXME - insert some real tests, host_os isn't really good enough
4084  case $host_os in
4085  darwin*)
4086    if test -n "$STRIP"; then
4087      striplib="$STRIP -x"
4088      old_striplib="$STRIP -S"
4089      AC_MSG_RESULT([yes])
4090    else
4091      AC_MSG_RESULT([no])
4092    fi
4093    ;;
4094  *)
4095    AC_MSG_RESULT([no])
4096    ;;
4097  esac
4098fi
4099_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
4100_LT_DECL([], [striplib], [1])
4101])# _LT_CMD_STRIPLIB
4102
4103
4104# _LT_PREPARE_MUNGE_PATH_LIST
4105# ---------------------------
4106# Make sure func_munge_path_list() is defined correctly.
4107m4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
4108[[# func_munge_path_list VARIABLE PATH
4109# -----------------------------------
4110# VARIABLE is name of variable containing _space_ separated list of
4111# directories to be munged by the contents of PATH, which is string
4112# having a format:
4113# "DIR[:DIR]:"
4114#       string "DIR[ DIR]" will be prepended to VARIABLE
4115# ":DIR[:DIR]"
4116#       string "DIR[ DIR]" will be appended to VARIABLE
4117# "DIRP[:DIRP]::[DIRA:]DIRA"
4118#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
4119#       "DIRA[ DIRA]" will be appended to VARIABLE
4120# "DIR[:DIR]"
4121#       VARIABLE will be replaced by "DIR[ DIR]"
4122func_munge_path_list ()
4123{
4124    case x@S|@2 in
4125    x)
4126        ;;
4127    *:)
4128        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
4129        ;;
4130    x:*)
4131        eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
4132        ;;
4133    *::*)
4134        eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
4135        eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
4136        ;;
4137    *)
4138        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
4139        ;;
4140    esac
4141}
4142]])# _LT_PREPARE_PATH_LIST
4143
4144
4145# _LT_SYS_DYNAMIC_LINKER([TAG])
4146# -----------------------------
4147# PORTME Fill in your ld.so characteristics
4148m4_defun([_LT_SYS_DYNAMIC_LINKER],
4149[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4150m4_require([_LT_DECL_EGREP])dnl
4151m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4152m4_require([_LT_DECL_OBJDUMP])dnl
4153m4_require([_LT_DECL_SED])dnl
4154m4_require([_LT_CHECK_SHELL_FEATURES])dnl
4155m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
4156AC_MSG_CHECKING([dynamic linker characteristics])
4157m4_if([$1],
4158	[], [
4159if test yes = "$GCC"; then
4160  case $host_os in
4161    darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
4162    *) lt_awk_arg='/^libraries:/' ;;
4163  esac
4164  case $host_os in
4165    mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
4166    *) lt_sed_strip_eq='s|=/|/|g' ;;
4167  esac
4168  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
4169  case $lt_search_path_spec in
4170  *\;*)
4171    # if the path contains ";" then we assume it to be the separator
4172    # otherwise default to the standard path separator (i.e. ":") - it is
4173    # assumed that no part of a normal pathname contains ";" but that should
4174    # okay in the real world where ";" in dirpaths is itself problematic.
4175    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
4176    ;;
4177  *)
4178    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
4179    ;;
4180  esac
4181  # Ok, now we have the path, separated by spaces, we can step through it
4182  # and add multilib dir if necessary...
4183  lt_tmp_lt_search_path_spec=
4184  lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
4185  # ...but if some path component already ends with the multilib dir we assume
4186  # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
4187  case "$lt_multi_os_dir; $lt_search_path_spec " in
4188  "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
4189    lt_multi_os_dir=
4190    ;;
4191  esac
4192  for lt_sys_path in $lt_search_path_spec; do
4193    if test -d "$lt_sys_path$lt_multi_os_dir"; then
4194      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
4195    elif test -n "$lt_multi_os_dir"; then
4196      test -d "$lt_sys_path" && \
4197	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
4198    fi
4199  done
4200  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
4201BEGIN {RS = " "; FS = "/|\n";} {
4202  lt_foo = "";
4203  lt_count = 0;
4204  for (lt_i = NF; lt_i > 0; lt_i--) {
4205    if ($lt_i != "" && $lt_i != ".") {
4206      if ($lt_i == "..") {
4207        lt_count++;
4208      } else {
4209        if (lt_count == 0) {
4210          lt_foo = "/" $lt_i lt_foo;
4211        } else {
4212          lt_count--;
4213        }
4214      }
4215    }
4216  }
4217  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
4218  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
4219}'`
4220  # AWK program above erroneously prepends '/' to C:/dos/paths
4221  # for these hosts.
4222  case $host_os in
4223    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
4224      $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
4225  esac
4226  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
4227else
4228  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
4229fi])
4230library_names_spec=
4231libname_spec='lib$name'
4232soname_spec=
4233shrext_cmds=.so
4234postinstall_cmds=
4235postuninstall_cmds=
4236finish_cmds=
4237finish_eval=
4238shlibpath_var=
4239shlibpath_overrides_runpath=unknown
4240version_type=none
4241dynamic_linker="$host_os ld.so"
4242sys_lib_dlsearch_path_spec="/lib /usr/lib"
4243need_lib_prefix=unknown
4244hardcode_into_libs=no
4245
4246# when you set need_version to no, make sure it does not cause -set_version
4247# flags to be left without arguments
4248need_version=unknown
4249
4250AC_ARG_VAR([LT_SYS_LIBRARY_PATH],
4251[User-defined run-time library search path.])
4252
4253case $host_os in
4254aix3*)
4255  version_type=linux # correct to gnu/linux during the next big refactor
4256  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
4257  shlibpath_var=LIBPATH
4258
4259  # AIX 3 has no versioning support, so we append a major version to the name.
4260  soname_spec='$libname$release$shared_ext$major'
4261  ;;
4262
4263aix[[4-9]]*)
4264  version_type=linux # correct to gnu/linux during the next big refactor
4265  need_lib_prefix=no
4266  need_version=no
4267  hardcode_into_libs=yes
4268  if test ia64 = "$host_cpu"; then
4269    # AIX 5 supports IA64
4270    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
4271    shlibpath_var=LD_LIBRARY_PATH
4272  else
4273    # With GCC up to 2.95.x, collect2 would create an import file
4274    # for dependence libraries.  The import file would start with
4275    # the line '#! .'.  This would cause the generated library to
4276    # depend on '.', always an invalid library.  This was fixed in
4277    # development snapshots of GCC prior to 3.0.
4278    case $host_os in
4279      aix4 | aix4.[[01]] | aix4.[[01]].*)
4280      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
4281	   echo ' yes '
4282	   echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
4283	:
4284      else
4285	can_build_shared=no
4286      fi
4287      ;;
4288    esac
4289    # Using Import Files as archive members, it is possible to support
4290    # filename-based versioning of shared library archives on AIX. While
4291    # this would work for both with and without runtime linking, it will
4292    # prevent static linking of such archives. So we do filename-based
4293    # shared library versioning with .so extension only, which is used
4294    # when both runtime linking and shared linking is enabled.
4295    # Unfortunately, runtime linking may impact performance, so we do
4296    # not want this to be the default eventually. Also, we use the
4297    # versioned .so libs for executables only if there is the -brtl
4298    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
4299    # To allow for filename-based versioning support, we need to create
4300    # libNAME.so.V as an archive file, containing:
4301    # *) an Import File, referring to the versioned filename of the
4302    #    archive as well as the shared archive member, telling the
4303    #    bitwidth (32 or 64) of that shared object, and providing the
4304    #    list of exported symbols of that shared object, eventually
4305    #    decorated with the 'weak' keyword
4306    # *) the shared object with the F_LOADONLY flag set, to really avoid
4307    #    it being seen by the linker.
4308    # At run time we better use the real file rather than another symlink,
4309    # but for link time we create the symlink libNAME.so -> libNAME.so.V
4310
4311    case $with_aix_soname,$aix_use_runtimelinking in
4312    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
4313    # soname into executable. Probably we can add versioning support to
4314    # collect2, so additional links can be useful in future.
4315    aix,yes) # traditional libtool
4316      dynamic_linker='AIX unversionable lib.so'
4317      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
4318      # instead of lib<name>.a to let people know that these are not
4319      # typical AIX shared libraries.
4320      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
4321      ;;
4322    aix,no) # traditional AIX only
4323      dynamic_linker='AIX lib.a[(]lib.so.V[)]'
4324      # We preserve .a as extension for shared libraries through AIX4.2
4325      # and later when we are not doing run time linking.
4326      library_names_spec='$libname$release.a $libname.a'
4327      soname_spec='$libname$release$shared_ext$major'
4328      ;;
4329    svr4,*) # full svr4 only
4330      dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
4331      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
4332      # We do not specify a path in Import Files, so LIBPATH fires.
4333      shlibpath_overrides_runpath=yes
4334      ;;
4335    *,yes) # both, prefer svr4
4336      dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
4337      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
4338      # unpreferred sharedlib libNAME.a needs extra handling
4339      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"'
4340      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"'
4341      # We do not specify a path in Import Files, so LIBPATH fires.
4342      shlibpath_overrides_runpath=yes
4343      ;;
4344    *,no) # both, prefer aix
4345      dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
4346      library_names_spec='$libname$release.a $libname.a'
4347      soname_spec='$libname$release$shared_ext$major'
4348      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
4349      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)'
4350      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"'
4351      ;;
4352    esac
4353    shlibpath_var=LIBPATH
4354  fi
4355  ;;
4356
4357amigaos*)
4358  case $host_cpu in
4359  powerpc)
4360    # Since July 2007 AmigaOS4 officially supports .so libraries.
4361    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
4362    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
4363    ;;
4364  m68k)
4365    library_names_spec='$libname.ixlibrary $libname.a'
4366    # Create ${libname}_ixlibrary.a entries in /sys/libs.
4367    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'
4368    ;;
4369  esac
4370  ;;
4371
4372beos*)
4373  library_names_spec='$libname$shared_ext'
4374  dynamic_linker="$host_os ld.so"
4375  shlibpath_var=LIBRARY_PATH
4376  ;;
4377
4378bsdi[[45]]*)
4379  version_type=linux # correct to gnu/linux during the next big refactor
4380  need_version=no
4381  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
4382  soname_spec='$libname$release$shared_ext$major'
4383  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
4384  shlibpath_var=LD_LIBRARY_PATH
4385  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
4386  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
4387  # the default ld.so.conf also contains /usr/contrib/lib and
4388  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
4389  # libtool to hard-code these into programs
4390  ;;
4391
4392cygwin* | mingw* | pw32* | cegcc*)
4393  version_type=windows
4394  shrext_cmds=.dll
4395  need_version=no
4396  need_lib_prefix=no
4397
4398  case $GCC,$cc_basename in
4399  yes,*)
4400    # gcc
4401    library_names_spec='$libname.dll.a'
4402    # DLL is installed to $(libdir)/../bin by postinstall_cmds
4403    postinstall_cmds='base_file=`basename \$file`~
4404      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
4405      dldir=$destdir/`dirname \$dlpath`~
4406      test -d \$dldir || mkdir -p \$dldir~
4407      $install_prog $dir/$dlname \$dldir/$dlname~
4408      chmod a+x \$dldir/$dlname~
4409      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
4410        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
4411      fi'
4412    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
4413      dlpath=$dir/\$dldll~
4414       $RM \$dlpath'
4415    shlibpath_overrides_runpath=yes
4416
4417    case $host_os in
4418    cygwin*)
4419      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
4420      soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
4421m4_if([$1], [],[
4422      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
4423      ;;
4424    mingw* | cegcc*)
4425      # MinGW DLLs use traditional 'lib' prefix
4426      soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
4427      ;;
4428    pw32*)
4429      # pw32 DLLs use 'pw' prefix rather than 'lib'
4430      library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
4431      ;;
4432    esac
4433    dynamic_linker='Win32 ld.exe'
4434    ;;
4435
4436  *,cl*)
4437    # Native MSVC
4438    libname_spec='$name'
4439    soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
4440    library_names_spec='$libname.dll.lib'
4441
4442    case $build_os in
4443    mingw*)
4444      sys_lib_search_path_spec=
4445      lt_save_ifs=$IFS
4446      IFS=';'
4447      for lt_path in $LIB
4448      do
4449        IFS=$lt_save_ifs
4450        # Let DOS variable expansion print the short 8.3 style file name.
4451        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
4452        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
4453      done
4454      IFS=$lt_save_ifs
4455      # Convert to MSYS style.
4456      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
4457      ;;
4458    cygwin*)
4459      # Convert to unix form, then to dos form, then back to unix form
4460      # but this time dos style (no spaces!) so that the unix form looks
4461      # like /cygdrive/c/PROGRA~1:/cygdr...
4462      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
4463      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
4464      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
4465      ;;
4466    *)
4467      sys_lib_search_path_spec=$LIB
4468      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
4469        # It is most probably a Windows format PATH.
4470        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
4471      else
4472        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
4473      fi
4474      # FIXME: find the short name or the path components, as spaces are
4475      # common. (e.g. "Program Files" -> "PROGRA~1")
4476      ;;
4477    esac
4478
4479    # DLL is installed to $(libdir)/../bin by postinstall_cmds
4480    postinstall_cmds='base_file=`basename \$file`~
4481      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
4482      dldir=$destdir/`dirname \$dlpath`~
4483      test -d \$dldir || mkdir -p \$dldir~
4484      $install_prog $dir/$dlname \$dldir/$dlname'
4485    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
4486      dlpath=$dir/\$dldll~
4487       $RM \$dlpath'
4488    shlibpath_overrides_runpath=yes
4489    dynamic_linker='Win32 link.exe'
4490    ;;
4491
4492  *)
4493    # Assume MSVC wrapper
4494    library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
4495    dynamic_linker='Win32 ld.exe'
4496    ;;
4497  esac
4498  # FIXME: first we should search . and the directory the executable is in
4499  shlibpath_var=PATH
4500  ;;
4501
4502darwin* | rhapsody*)
4503  dynamic_linker="$host_os dyld"
4504  version_type=darwin
4505  need_lib_prefix=no
4506  need_version=no
4507  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
4508  soname_spec='$libname$release$major$shared_ext'
4509  shlibpath_overrides_runpath=yes
4510  shlibpath_var=DYLD_LIBRARY_PATH
4511  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
4512m4_if([$1], [],[
4513  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
4514  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
4515  ;;
4516
4517dgux*)
4518  version_type=linux # correct to gnu/linux during the next big refactor
4519  need_lib_prefix=no
4520  need_version=no
4521  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
4522  soname_spec='$libname$release$shared_ext$major'
4523  shlibpath_var=LD_LIBRARY_PATH
4524  ;;
4525
4526freebsd* | dragonfly*)
4527  # DragonFly does not have aout.  When/if they implement a new
4528  # versioning mechanism, adjust this.
4529  if test -x /usr/bin/objformat; then
4530    objformat=`/usr/bin/objformat`
4531  else
4532    case $host_os in
4533    freebsd[[23]].*) objformat=aout ;;
4534    *) objformat=elf ;;
4535    esac
4536  fi
4537  version_type=freebsd-$objformat
4538  case $version_type in
4539    freebsd-elf*)
4540      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
4541      soname_spec='$libname$release$shared_ext$major'
4542      need_version=no
4543      need_lib_prefix=no
4544      ;;
4545    freebsd-*)
4546      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
4547      need_version=yes
4548      ;;
4549  esac
4550  shlibpath_var=LD_LIBRARY_PATH
4551  case $host_os in
4552  freebsd2.*)
4553    shlibpath_overrides_runpath=yes
4554    ;;
4555  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
4556    shlibpath_overrides_runpath=yes
4557    hardcode_into_libs=yes
4558    ;;
4559  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
4560  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
4561    shlibpath_overrides_runpath=no
4562    hardcode_into_libs=yes
4563    ;;
4564  *) # from 4.6 on, and DragonFly
4565    shlibpath_overrides_runpath=yes
4566    hardcode_into_libs=yes
4567    ;;
4568  esac
4569  ;;
4570
4571haiku*)
4572  version_type=linux # correct to gnu/linux during the next big refactor
4573  need_lib_prefix=no
4574  need_version=no
4575  dynamic_linker="$host_os runtime_loader"
4576  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
4577  soname_spec='$libname$release$shared_ext$major'
4578  shlibpath_var=LIBRARY_PATH
4579  shlibpath_overrides_runpath=no
4580  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
4581  hardcode_into_libs=yes
4582  ;;
4583
4584hpux9* | hpux10* | hpux11*)
4585  # Give a soname corresponding to the major version so that dld.sl refuses to
4586  # link against other versions.
4587  version_type=sunos
4588  need_lib_prefix=no
4589  need_version=no
4590  case $host_cpu in
4591  ia64*)
4592    shrext_cmds='.so'
4593    hardcode_into_libs=yes
4594    dynamic_linker="$host_os dld.so"
4595    shlibpath_var=LD_LIBRARY_PATH
4596    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
4597    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
4598    soname_spec='$libname$release$shared_ext$major'
4599    if test 32 = "$HPUX_IA64_MODE"; then
4600      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
4601      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
4602    else
4603      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
4604      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
4605    fi
4606    ;;
4607  hppa*64*)
4608    shrext_cmds='.sl'
4609    hardcode_into_libs=yes
4610    dynamic_linker="$host_os dld.sl"
4611    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
4612    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
4613    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
4614    soname_spec='$libname$release$shared_ext$major'
4615    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
4616    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
4617    ;;
4618  *)
4619    shrext_cmds='.sl'
4620    dynamic_linker="$host_os dld.sl"
4621    shlibpath_var=SHLIB_PATH
4622    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
4623    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
4624    soname_spec='$libname$release$shared_ext$major'
4625    ;;
4626  esac
4627  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
4628  postinstall_cmds='chmod 555 $lib'
4629  # or fails outright, so override atomically:
4630  install_override_mode=555
4631  ;;
4632
4633interix[[3-9]]*)
4634  version_type=linux # correct to gnu/linux during the next big refactor
4635  need_lib_prefix=no
4636  need_version=no
4637  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
4638  soname_spec='$libname$release$shared_ext$major'
4639  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
4640  shlibpath_var=LD_LIBRARY_PATH
4641  shlibpath_overrides_runpath=no
4642  hardcode_into_libs=yes
4643  ;;
4644
4645irix5* | irix6* | nonstopux*)
4646  case $host_os in
4647    nonstopux*) version_type=nonstopux ;;
4648    *)
4649	if test yes = "$lt_cv_prog_gnu_ld"; then
4650		version_type=linux # correct to gnu/linux during the next big refactor
4651	else
4652		version_type=irix
4653	fi ;;
4654  esac
4655  need_lib_prefix=no
4656  need_version=no
4657  soname_spec='$libname$release$shared_ext$major'
4658  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
4659  case $host_os in
4660  irix5* | nonstopux*)
4661    libsuff= shlibsuff=
4662    ;;
4663  *)
4664    case $LD in # libtool.m4 will add one of these switches to LD
4665    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
4666      libsuff= shlibsuff= libmagic=32-bit;;
4667    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
4668      libsuff=32 shlibsuff=N32 libmagic=N32;;
4669    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
4670      libsuff=64 shlibsuff=64 libmagic=64-bit;;
4671    *) libsuff= shlibsuff= libmagic=never-match;;
4672    esac
4673    ;;
4674  esac
4675  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
4676  shlibpath_overrides_runpath=no
4677  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
4678  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
4679  hardcode_into_libs=yes
4680  ;;
4681
4682# No shared lib support for Linux oldld, aout, or coff.
4683linux*oldld* | linux*aout* | linux*coff*)
4684  dynamic_linker=no
4685  ;;
4686
4687linux*android*)
4688  version_type=none # Android doesn't support versioned libraries.
4689  need_lib_prefix=no
4690  need_version=no
4691  library_names_spec='$libname$release$shared_ext'
4692  soname_spec='$libname$release$shared_ext'
4693  finish_cmds=
4694  shlibpath_var=LD_LIBRARY_PATH
4695  shlibpath_overrides_runpath=yes
4696
4697  # This implies no fast_install, which is unacceptable.
4698  # Some rework will be needed to allow for fast_install
4699  # before this can be enabled.
4700  hardcode_into_libs=yes
4701
4702  dynamic_linker='Android linker'
4703  # Don't embed -rpath directories since the linker doesn't support them.
4704  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4705  ;;
4706
4707# This must be glibc/ELF.
4708linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
4709  version_type=linux # correct to gnu/linux during the next big refactor
4710  need_lib_prefix=no
4711  need_version=no
4712  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
4713  soname_spec='$libname$release$shared_ext$major'
4714  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
4715  shlibpath_var=LD_LIBRARY_PATH
4716  shlibpath_overrides_runpath=no
4717
4718  # Some binutils ld are patched to set DT_RUNPATH
4719  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
4720    [lt_cv_shlibpath_overrides_runpath=no
4721    save_LDFLAGS=$LDFLAGS
4722    save_libdir=$libdir
4723    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
4724	 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
4725    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
4726      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
4727	 [lt_cv_shlibpath_overrides_runpath=yes])])
4728    LDFLAGS=$save_LDFLAGS
4729    libdir=$save_libdir
4730    ])
4731  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
4732
4733  # This implies no fast_install, which is unacceptable.
4734  # Some rework will be needed to allow for fast_install
4735  # before this can be enabled.
4736  hardcode_into_libs=yes
4737
4738  # Ideally, we could use ldconfig to report *all* directores which are
4739  # searched for libraries, however this is still not possible.  Aside from not
4740  # being certain /sbin/ldconfig is available, command
4741  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
4742  # even though it is searched at run-time.  Try to do the best guess by
4743  # appending ld.so.conf contents (and includes) to the search path.
4744  if test -f /etc/ld.so.conf; then
4745    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' ' '`
4746    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
4747  fi
4748
4749  # We used to test for /lib/ld.so.1 and disable shared libraries on
4750  # powerpc, because MkLinux only supported shared libraries with the
4751  # GNU dynamic linker.  Since this was broken with cross compilers,
4752  # most powerpc-linux boxes support dynamic linking these days and
4753  # people can always --disable-shared, the test was removed, and we
4754  # assume the GNU/Linux dynamic linker is in use.
4755  dynamic_linker='GNU/Linux ld.so'
4756  ;;
4757
4758netbsdelf*-gnu)
4759  version_type=linux
4760  need_lib_prefix=no
4761  need_version=no
4762  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
4763  soname_spec='${libname}${release}${shared_ext}$major'
4764  shlibpath_var=LD_LIBRARY_PATH
4765  shlibpath_overrides_runpath=no
4766  hardcode_into_libs=yes
4767  dynamic_linker='NetBSD ld.elf_so'
4768  ;;
4769
4770netbsd*)
4771  version_type=sunos
4772  need_lib_prefix=no
4773  need_version=no
4774  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4775    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
4776    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
4777    dynamic_linker='NetBSD (a.out) ld.so'
4778  else
4779    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
4780    soname_spec='$libname$release$shared_ext$major'
4781    dynamic_linker='NetBSD ld.elf_so'
4782  fi
4783  shlibpath_var=LD_LIBRARY_PATH
4784  shlibpath_overrides_runpath=yes
4785  hardcode_into_libs=yes
4786  ;;
4787
4788newsos6)
4789  version_type=linux # correct to gnu/linux during the next big refactor
4790  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
4791  shlibpath_var=LD_LIBRARY_PATH
4792  shlibpath_overrides_runpath=yes
4793  ;;
4794
4795*nto* | *qnx*)
4796  version_type=qnx
4797  need_lib_prefix=no
4798  need_version=no
4799  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
4800  soname_spec='$libname$release$shared_ext$major'
4801  shlibpath_var=LD_LIBRARY_PATH
4802  shlibpath_overrides_runpath=no
4803  hardcode_into_libs=yes
4804  dynamic_linker='ldqnx.so'
4805  ;;
4806
4807openbsd* | bitrig*)
4808  version_type=sunos
4809  sys_lib_dlsearch_path_spec=/usr/lib
4810  need_lib_prefix=no
4811  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
4812    need_version=no
4813  else
4814    need_version=yes
4815  fi
4816  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
4817  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
4818  shlibpath_var=LD_LIBRARY_PATH
4819  shlibpath_overrides_runpath=yes
4820  ;;
4821
4822os2*)
4823  libname_spec='$name'
4824  version_type=windows
4825  shrext_cmds=.dll
4826  need_version=no
4827  need_lib_prefix=no
4828  # OS/2 can only load a DLL with a base name of 8 characters or less.
4829  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
4830    v=$($ECHO $release$versuffix | tr -d .-);
4831    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
4832    $ECHO $n$v`$shared_ext'
4833  library_names_spec='${libname}_dll.$libext'
4834  dynamic_linker='OS/2 ld.exe'
4835  shlibpath_var=BEGINLIBPATH
4836  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
4837  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
4838  postinstall_cmds='base_file=`basename \$file`~
4839    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
4840    dldir=$destdir/`dirname \$dlpath`~
4841    test -d \$dldir || mkdir -p \$dldir~
4842    $install_prog $dir/$dlname \$dldir/$dlname~
4843    chmod a+x \$dldir/$dlname~
4844    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
4845      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
4846    fi'
4847  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
4848    dlpath=$dir/\$dldll~
4849    $RM \$dlpath'
4850  ;;
4851
4852osf3* | osf4* | osf5*)
4853  version_type=osf
4854  need_lib_prefix=no
4855  need_version=no
4856  soname_spec='$libname$release$shared_ext$major'
4857  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
4858  shlibpath_var=LD_LIBRARY_PATH
4859  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
4860  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
4861  ;;
4862
4863rdos*)
4864  dynamic_linker=no
4865  ;;
4866
4867solaris*)
4868  version_type=linux # correct to gnu/linux during the next big refactor
4869  need_lib_prefix=no
4870  need_version=no
4871  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
4872  soname_spec='$libname$release$shared_ext$major'
4873  shlibpath_var=LD_LIBRARY_PATH
4874  shlibpath_overrides_runpath=yes
4875  hardcode_into_libs=yes
4876  # ldd complains unless libraries are executable
4877  postinstall_cmds='chmod +x $lib'
4878  ;;
4879
4880sunos4*)
4881  version_type=sunos
4882  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
4883  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
4884  shlibpath_var=LD_LIBRARY_PATH
4885  shlibpath_overrides_runpath=yes
4886  if test yes = "$with_gnu_ld"; then
4887    need_lib_prefix=no
4888  fi
4889  need_version=yes
4890  ;;
4891
4892sysv4 | sysv4.3*)
4893  version_type=linux # correct to gnu/linux during the next big refactor
4894  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
4895  soname_spec='$libname$release$shared_ext$major'
4896  shlibpath_var=LD_LIBRARY_PATH
4897  case $host_vendor in
4898    sni)
4899      shlibpath_overrides_runpath=no
4900      need_lib_prefix=no
4901      runpath_var=LD_RUN_PATH
4902      ;;
4903    siemens)
4904      need_lib_prefix=no
4905      ;;
4906    motorola)
4907      need_lib_prefix=no
4908      need_version=no
4909      shlibpath_overrides_runpath=no
4910      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
4911      ;;
4912  esac
4913  ;;
4914
4915sysv4*MP*)
4916  if test -d /usr/nec; then
4917    version_type=linux # correct to gnu/linux during the next big refactor
4918    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
4919    soname_spec='$libname$shared_ext.$major'
4920    shlibpath_var=LD_LIBRARY_PATH
4921  fi
4922  ;;
4923
4924sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4925  version_type=sco
4926  need_lib_prefix=no
4927  need_version=no
4928  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
4929  soname_spec='$libname$release$shared_ext$major'
4930  shlibpath_var=LD_LIBRARY_PATH
4931  shlibpath_overrides_runpath=yes
4932  hardcode_into_libs=yes
4933  if test yes = "$with_gnu_ld"; then
4934    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
4935  else
4936    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
4937    case $host_os in
4938      sco3.2v5*)
4939        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
4940	;;
4941    esac
4942  fi
4943  sys_lib_dlsearch_path_spec='/usr/lib'
4944  ;;
4945
4946tpf*)
4947  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
4948  version_type=linux # correct to gnu/linux during the next big refactor
4949  need_lib_prefix=no
4950  need_version=no
4951  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
4952  shlibpath_var=LD_LIBRARY_PATH
4953  shlibpath_overrides_runpath=no
4954  hardcode_into_libs=yes
4955  ;;
4956
4957uts4*)
4958  version_type=linux # correct to gnu/linux during the next big refactor
4959  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
4960  soname_spec='$libname$release$shared_ext$major'
4961  shlibpath_var=LD_LIBRARY_PATH
4962  ;;
4963
4964*)
4965  dynamic_linker=no
4966  ;;
4967esac
4968AC_MSG_RESULT([$dynamic_linker])
4969test no = "$dynamic_linker" && can_build_shared=no
4970
4971variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
4972if test yes = "$GCC"; then
4973  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
4974fi
4975
4976if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
4977  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
4978fi
4979
4980if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
4981  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
4982fi
4983
4984# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
4985configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
4986
4987# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
4988func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
4989
4990# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
4991configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
4992
4993_LT_DECL([], [variables_saved_for_relink], [1],
4994    [Variables whose values should be saved in libtool wrapper scripts and
4995    restored at link time])
4996_LT_DECL([], [need_lib_prefix], [0],
4997    [Do we need the "lib" prefix for modules?])
4998_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
4999_LT_DECL([], [version_type], [0], [Library versioning type])
5000_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
5001_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
5002_LT_DECL([], [shlibpath_overrides_runpath], [0],
5003    [Is shlibpath searched before the hard-coded library search path?])
5004_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
5005_LT_DECL([], [library_names_spec], [1],
5006    [[List of archive names.  First name is the real one, the rest are links.
5007    The last name is the one that the linker finds with -lNAME]])
5008_LT_DECL([], [soname_spec], [1],
5009    [[The coded name of the library, if different from the real name]])
5010_LT_DECL([], [install_override_mode], [1],
5011    [Permission mode override for installation of shared libraries])
5012_LT_DECL([], [postinstall_cmds], [2],
5013    [Command to use after installation of a shared archive])
5014_LT_DECL([], [postuninstall_cmds], [2],
5015    [Command to use after uninstallation of a shared archive])
5016_LT_DECL([], [finish_cmds], [2],
5017    [Commands used to finish a libtool library installation in a directory])
5018_LT_DECL([], [finish_eval], [1],
5019    [[As "finish_cmds", except a single script fragment to be evaled but
5020    not shown]])
5021_LT_DECL([], [hardcode_into_libs], [0],
5022    [Whether we should hardcode library paths into libraries])
5023_LT_DECL([], [sys_lib_search_path_spec], [2],
5024    [Compile-time system search path for libraries])
5025_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
5026    [Detected run-time system search path for libraries])
5027_LT_DECL([], [configure_time_lt_sys_library_path], [2],
5028    [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
5029])# _LT_SYS_DYNAMIC_LINKER
5030
5031
5032# _LT_PATH_TOOL_PREFIX(TOOL)
5033# --------------------------
5034# find a file program that can recognize shared library
5035AC_DEFUN([_LT_PATH_TOOL_PREFIX],
5036[m4_require([_LT_DECL_EGREP])dnl
5037AC_MSG_CHECKING([for $1])
5038AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
5039[case $MAGIC_CMD in
5040[[\\/*] |  ?:[\\/]*])
5041  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
5042  ;;
5043*)
5044  lt_save_MAGIC_CMD=$MAGIC_CMD
5045  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
5046dnl $ac_dummy forces splitting on constant user-supplied paths.
5047dnl POSIX.2 word splitting is done only on the output of word expansions,
5048dnl not every word.  This closes a longstanding sh security hole.
5049  ac_dummy="m4_if([$2], , $PATH, [$2])"
5050  for ac_dir in $ac_dummy; do
5051    IFS=$lt_save_ifs
5052    test -z "$ac_dir" && ac_dir=.
5053    if test -f "$ac_dir/$1"; then
5054      lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
5055      if test -n "$file_magic_test_file"; then
5056	case $deplibs_check_method in
5057	"file_magic "*)
5058	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
5059	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
5060	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
5061	    $EGREP "$file_magic_regex" > /dev/null; then
5062	    :
5063	  else
5064	    cat <<_LT_EOF 1>&2
5065
5066*** Warning: the command libtool uses to detect shared libraries,
5067*** $file_magic_cmd, produces output that libtool cannot recognize.
5068*** The result is that libtool may fail to recognize shared libraries
5069*** as such.  This will affect the creation of libtool libraries that
5070*** depend on shared libraries, but programs linked with such libtool
5071*** libraries will work regardless of this problem.  Nevertheless, you
5072*** may want to report the problem to your system manager and/or to
5073*** bug-libtool@gnu.org
5074
5075_LT_EOF
5076	  fi ;;
5077	esac
5078      fi
5079      break
5080    fi
5081  done
5082  IFS=$lt_save_ifs
5083  MAGIC_CMD=$lt_save_MAGIC_CMD
5084  ;;
5085esac])
5086MAGIC_CMD=$lt_cv_path_MAGIC_CMD
5087if test -n "$MAGIC_CMD"; then
5088  AC_MSG_RESULT($MAGIC_CMD)
5089else
5090  AC_MSG_RESULT(no)
5091fi
5092_LT_DECL([], [MAGIC_CMD], [0],
5093	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
5094])# _LT_PATH_TOOL_PREFIX
5095
5096# Old name:
5097AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
5098dnl aclocal-1.4 backwards compatibility:
5099dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
5100
5101
5102# _LT_PATH_MAGIC
5103# --------------
5104# find a file program that can recognize a shared library
5105m4_defun([_LT_PATH_MAGIC],
5106[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
5107if test -z "$lt_cv_path_MAGIC_CMD"; then
5108  if test -n "$ac_tool_prefix"; then
5109    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
5110  else
5111    MAGIC_CMD=:
5112  fi
5113fi
5114])# _LT_PATH_MAGIC
5115
5116
5117# LT_PATH_LD
5118# ----------
5119# find the pathname to the GNU or non-GNU linker
5120AC_DEFUN([LT_PATH_LD],
5121[AC_REQUIRE([AC_PROG_CC])dnl
5122AC_REQUIRE([AC_CANONICAL_HOST])dnl
5123AC_REQUIRE([AC_CANONICAL_BUILD])dnl
5124m4_require([_LT_DECL_SED])dnl
5125m4_require([_LT_DECL_EGREP])dnl
5126m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
5127
5128AC_ARG_WITH([gnu-ld],
5129    [AS_HELP_STRING([--with-gnu-ld],
5130	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
5131    [test no = "$withval" || with_gnu_ld=yes],
5132    [with_gnu_ld=no])dnl
5133
5134ac_prog=ld
5135if test yes = "$GCC"; then
5136  # Check if gcc -print-prog-name=ld gives a path.
5137  AC_MSG_CHECKING([for ld used by $CC])
5138  case $host in
5139  *-*-mingw*)
5140    # gcc leaves a trailing carriage return, which upsets mingw
5141    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
5142  *)
5143    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
5144  esac
5145  case $ac_prog in
5146    # Accept absolute paths.
5147    [[\\/]]* | ?:[[\\/]]*)
5148      re_direlt='/[[^/]][[^/]]*/\.\./'
5149      # Canonicalize the pathname of ld
5150      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
5151      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
5152	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
5153      done
5154      test -z "$LD" && LD=$ac_prog
5155      ;;
5156  "")
5157    # If it fails, then pretend we aren't using GCC.
5158    ac_prog=ld
5159    ;;
5160  *)
5161    # If it is relative, then search for the first ld in PATH.
5162    with_gnu_ld=unknown
5163    ;;
5164  esac
5165elif test yes = "$with_gnu_ld"; then
5166  AC_MSG_CHECKING([for GNU ld])
5167else
5168  AC_MSG_CHECKING([for non-GNU ld])
5169fi
5170AC_CACHE_VAL(lt_cv_path_LD,
5171[if test -z "$LD"; then
5172  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
5173  for ac_dir in $PATH; do
5174    IFS=$lt_save_ifs
5175    test -z "$ac_dir" && ac_dir=.
5176    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
5177      lt_cv_path_LD=$ac_dir/$ac_prog
5178      # Check to see if the program is GNU ld.  I'd rather use --version,
5179      # but apparently some variants of GNU ld only accept -v.
5180      # Break only if it was the GNU/non-GNU ld that we prefer.
5181      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
5182      *GNU* | *'with BFD'*)
5183	test no != "$with_gnu_ld" && break
5184	;;
5185      *)
5186	test yes != "$with_gnu_ld" && break
5187	;;
5188      esac
5189    fi
5190  done
5191  IFS=$lt_save_ifs
5192else
5193  lt_cv_path_LD=$LD # Let the user override the test with a path.
5194fi])
5195LD=$lt_cv_path_LD
5196if test -n "$LD"; then
5197  AC_MSG_RESULT($LD)
5198else
5199  AC_MSG_RESULT(no)
5200fi
5201test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
5202_LT_PATH_LD_GNU
5203AC_SUBST([LD])
5204
5205_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
5206])# LT_PATH_LD
5207
5208# Old names:
5209AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
5210AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
5211dnl aclocal-1.4 backwards compatibility:
5212dnl AC_DEFUN([AM_PROG_LD], [])
5213dnl AC_DEFUN([AC_PROG_LD], [])
5214
5215
5216# _LT_PATH_LD_GNU
5217#- --------------
5218m4_defun([_LT_PATH_LD_GNU],
5219[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
5220[# I'd rather use --version here, but apparently some GNU lds only accept -v.
5221case `$LD -v 2>&1 </dev/null` in
5222*GNU* | *'with BFD'*)
5223  lt_cv_prog_gnu_ld=yes
5224  ;;
5225*)
5226  lt_cv_prog_gnu_ld=no
5227  ;;
5228esac])
5229with_gnu_ld=$lt_cv_prog_gnu_ld
5230])# _LT_PATH_LD_GNU
5231
5232
5233# _LT_CMD_RELOAD
5234# --------------
5235# find reload flag for linker
5236#   -- PORTME Some linkers may need a different reload flag.
5237m4_defun([_LT_CMD_RELOAD],
5238[AC_CACHE_CHECK([for $LD option to reload object files],
5239  lt_cv_ld_reload_flag,
5240  [lt_cv_ld_reload_flag='-r'])
5241reload_flag=$lt_cv_ld_reload_flag
5242case $reload_flag in
5243"" | " "*) ;;
5244*) reload_flag=" $reload_flag" ;;
5245esac
5246reload_cmds='$LD$reload_flag -o $output$reload_objs'
5247case $host_os in
5248  cygwin* | mingw* | pw32* | cegcc*)
5249    if test yes != "$GCC"; then
5250      reload_cmds=false
5251    fi
5252    ;;
5253  darwin*)
5254    if test yes = "$GCC"; then
5255      reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
5256    else
5257      reload_cmds='$LD$reload_flag -o $output$reload_objs'
5258    fi
5259    ;;
5260esac
5261_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
5262_LT_TAGDECL([], [reload_cmds], [2])dnl
5263])# _LT_CMD_RELOAD
5264
5265
5266# _LT_PATH_DD
5267# -----------
5268# find a working dd
5269m4_defun([_LT_PATH_DD],
5270[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
5271[printf 0123456789abcdef0123456789abcdef >conftest.i
5272cat conftest.i conftest.i >conftest2.i
5273: ${lt_DD:=$DD}
5274AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
5275[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
5276  cmp -s conftest.i conftest.out \
5277  && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
5278fi])
5279rm -f conftest.i conftest2.i conftest.out])
5280])# _LT_PATH_DD
5281
5282
5283# _LT_CMD_TRUNCATE
5284# ----------------
5285# find command to truncate a binary pipe
5286m4_defun([_LT_CMD_TRUNCATE],
5287[m4_require([_LT_PATH_DD])
5288AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
5289[printf 0123456789abcdef0123456789abcdef >conftest.i
5290cat conftest.i conftest.i >conftest2.i
5291lt_cv_truncate_bin=
5292if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
5293  cmp -s conftest.i conftest.out \
5294  && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
5295fi
5296rm -f conftest.i conftest2.i conftest.out
5297test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
5298_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
5299  [Command to truncate a binary pipe])
5300])# _LT_CMD_TRUNCATE
5301
5302
5303# _LT_CHECK_MAGIC_METHOD
5304# ----------------------
5305# how to check for library dependencies
5306#  -- PORTME fill in with the dynamic library characteristics
5307m4_defun([_LT_CHECK_MAGIC_METHOD],
5308[m4_require([_LT_DECL_EGREP])
5309m4_require([_LT_DECL_OBJDUMP])
5310AC_CACHE_CHECK([how to recognize dependent libraries],
5311lt_cv_deplibs_check_method,
5312[lt_cv_file_magic_cmd='$MAGIC_CMD'
5313lt_cv_file_magic_test_file=
5314lt_cv_deplibs_check_method='unknown'
5315# Need to set the preceding variable on all platforms that support
5316# interlibrary dependencies.
5317# 'none' -- dependencies not supported.
5318# 'unknown' -- same as none, but documents that we really don't know.
5319# 'pass_all' -- all dependencies passed with no checks.
5320# 'test_compile' -- check by making test program.
5321# 'file_magic [[regex]]' -- check by looking for files in library path
5322# that responds to the $file_magic_cmd with a given extended regex.
5323# If you have 'file' or equivalent on your system and you're not sure
5324# whether 'pass_all' will *always* work, you probably want this one.
5325
5326case $host_os in
5327aix[[4-9]]*)
5328  lt_cv_deplibs_check_method=pass_all
5329  ;;
5330
5331beos*)
5332  lt_cv_deplibs_check_method=pass_all
5333  ;;
5334
5335bsdi[[45]]*)
5336  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
5337  lt_cv_file_magic_cmd='/usr/bin/file -L'
5338  lt_cv_file_magic_test_file=/shlib/libc.so
5339  ;;
5340
5341cygwin*)
5342  # func_win32_libid is a shell function defined in ltmain.sh
5343  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
5344  lt_cv_file_magic_cmd='func_win32_libid'
5345  ;;
5346
5347mingw* | pw32*)
5348  # Base MSYS/MinGW do not provide the 'file' command needed by
5349  # func_win32_libid shell function, so use a weaker test based on 'objdump',
5350  # unless we find 'file', for example because we are cross-compiling.
5351  if ( file / ) >/dev/null 2>&1; then
5352    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
5353    lt_cv_file_magic_cmd='func_win32_libid'
5354  else
5355    # Keep this pattern in sync with the one in func_win32_libid.
5356    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
5357    lt_cv_file_magic_cmd='$OBJDUMP -f'
5358  fi
5359  ;;
5360
5361cegcc*)
5362  # use the weaker test based on 'objdump'. See mingw*.
5363  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
5364  lt_cv_file_magic_cmd='$OBJDUMP -f'
5365  ;;
5366
5367darwin* | rhapsody*)
5368  lt_cv_deplibs_check_method=pass_all
5369  ;;
5370
5371freebsd* | dragonfly*)
5372  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
5373    case $host_cpu in
5374    i*86 )
5375      # Not sure whether the presence of OpenBSD here was a mistake.
5376      # Let's accept both of them until this is cleared up.
5377      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
5378      lt_cv_file_magic_cmd=/usr/bin/file
5379      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
5380      ;;
5381    esac
5382  else
5383    lt_cv_deplibs_check_method=pass_all
5384  fi
5385  ;;
5386
5387haiku*)
5388  lt_cv_deplibs_check_method=pass_all
5389  ;;
5390
5391hpux10.20* | hpux11*)
5392  lt_cv_file_magic_cmd=/usr/bin/file
5393  case $host_cpu in
5394  ia64*)
5395    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
5396    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
5397    ;;
5398  hppa*64*)
5399    [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]']
5400    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
5401    ;;
5402  *)
5403    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
5404    lt_cv_file_magic_test_file=/usr/lib/libc.sl
5405    ;;
5406  esac
5407  ;;
5408
5409interix[[3-9]]*)
5410  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
5411  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
5412  ;;
5413
5414irix5* | irix6* | nonstopux*)
5415  case $LD in
5416  *-32|*"-32 ") libmagic=32-bit;;
5417  *-n32|*"-n32 ") libmagic=N32;;
5418  *-64|*"-64 ") libmagic=64-bit;;
5419  *) libmagic=never-match;;
5420  esac
5421  lt_cv_deplibs_check_method=pass_all
5422  ;;
5423
5424# This must be glibc/ELF.
5425linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
5426  lt_cv_deplibs_check_method=pass_all
5427  ;;
5428
5429netbsd* | netbsdelf*-gnu)
5430  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
5431    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
5432  else
5433    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
5434  fi
5435  ;;
5436
5437newos6*)
5438  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
5439  lt_cv_file_magic_cmd=/usr/bin/file
5440  lt_cv_file_magic_test_file=/usr/lib/libnls.so
5441  ;;
5442
5443*nto* | *qnx*)
5444  lt_cv_deplibs_check_method=pass_all
5445  ;;
5446
5447openbsd* | bitrig*)
5448  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
5449    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
5450  else
5451    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
5452  fi
5453  ;;
5454
5455osf3* | osf4* | osf5*)
5456  lt_cv_deplibs_check_method=pass_all
5457  ;;
5458
5459rdos*)
5460  lt_cv_deplibs_check_method=pass_all
5461  ;;
5462
5463solaris*)
5464  lt_cv_deplibs_check_method=pass_all
5465  ;;
5466
5467sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
5468  lt_cv_deplibs_check_method=pass_all
5469  ;;
5470
5471sysv4 | sysv4.3*)
5472  case $host_vendor in
5473  motorola)
5474    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]]'
5475    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
5476    ;;
5477  ncr)
5478    lt_cv_deplibs_check_method=pass_all
5479    ;;
5480  sequent)
5481    lt_cv_file_magic_cmd='/bin/file'
5482    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
5483    ;;
5484  sni)
5485    lt_cv_file_magic_cmd='/bin/file'
5486    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
5487    lt_cv_file_magic_test_file=/lib/libc.so
5488    ;;
5489  siemens)
5490    lt_cv_deplibs_check_method=pass_all
5491    ;;
5492  pc)
5493    lt_cv_deplibs_check_method=pass_all
5494    ;;
5495  esac
5496  ;;
5497
5498tpf*)
5499  lt_cv_deplibs_check_method=pass_all
5500  ;;
5501os2*)
5502  lt_cv_deplibs_check_method=pass_all
5503  ;;
5504esac
5505])
5506
5507file_magic_glob=
5508want_nocaseglob=no
5509if test "$build" = "$host"; then
5510  case $host_os in
5511  mingw* | pw32*)
5512    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
5513      want_nocaseglob=yes
5514    else
5515      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
5516    fi
5517    ;;
5518  esac
5519fi
5520
5521file_magic_cmd=$lt_cv_file_magic_cmd
5522deplibs_check_method=$lt_cv_deplibs_check_method
5523test -z "$deplibs_check_method" && deplibs_check_method=unknown
5524
5525_LT_DECL([], [deplibs_check_method], [1],
5526    [Method to check whether dependent libraries are shared objects])
5527_LT_DECL([], [file_magic_cmd], [1],
5528    [Command to use when deplibs_check_method = "file_magic"])
5529_LT_DECL([], [file_magic_glob], [1],
5530    [How to find potential files when deplibs_check_method = "file_magic"])
5531_LT_DECL([], [want_nocaseglob], [1],
5532    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
5533])# _LT_CHECK_MAGIC_METHOD
5534
5535
5536# LT_PATH_NM
5537# ----------
5538# find the pathname to a BSD- or MS-compatible name lister
5539AC_DEFUN([LT_PATH_NM],
5540[AC_REQUIRE([AC_PROG_CC])dnl
5541AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
5542[if test -n "$NM"; then
5543  # Let the user override the test.
5544  lt_cv_path_NM=$NM
5545else
5546  lt_nm_to_check=${ac_tool_prefix}nm
5547  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
5548    lt_nm_to_check="$lt_nm_to_check nm"
5549  fi
5550  for lt_tmp_nm in $lt_nm_to_check; do
5551    lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
5552    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
5553      IFS=$lt_save_ifs
5554      test -z "$ac_dir" && ac_dir=.
5555      tmp_nm=$ac_dir/$lt_tmp_nm
5556      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
5557	# Check to see if the nm accepts a BSD-compat flag.
5558	# Adding the 'sed 1q' prevents false positives on HP-UX, which says:
5559	#   nm: unknown option "B" ignored
5560	# Tru64's nm complains that /dev/null is an invalid object file
5561	# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
5562	case $build_os in
5563	mingw*) lt_bad_file=conftest.nm/nofile ;;
5564	*) lt_bad_file=/dev/null ;;
5565	esac
5566	case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
5567	*$lt_bad_file* | *'Invalid file or object type'*)
5568	  lt_cv_path_NM="$tmp_nm -B"
5569	  break 2
5570	  ;;
5571	*)
5572	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
5573	  */dev/null*)
5574	    lt_cv_path_NM="$tmp_nm -p"
5575	    break 2
5576	    ;;
5577	  *)
5578	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
5579	    continue # so that we can try to find one that supports BSD flags
5580	    ;;
5581	  esac
5582	  ;;
5583	esac
5584      fi
5585    done
5586    IFS=$lt_save_ifs
5587  done
5588  : ${lt_cv_path_NM=no}
5589fi])
5590if test no != "$lt_cv_path_NM"; then
5591  NM=$lt_cv_path_NM
5592else
5593  # Didn't find any BSD compatible name lister, look for dumpbin.
5594  if test -n "$DUMPBIN"; then :
5595    # Let the user override the test.
5596  else
5597    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
5598    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
5599    *COFF*)
5600      DUMPBIN="$DUMPBIN -symbols -headers"
5601      ;;
5602    *)
5603      DUMPBIN=:
5604      ;;
5605    esac
5606  fi
5607  AC_SUBST([DUMPBIN])
5608  if test : != "$DUMPBIN"; then
5609    NM=$DUMPBIN
5610  fi
5611fi
5612test -z "$NM" && NM=nm
5613AC_SUBST([NM])
5614_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
5615
5616AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
5617  [lt_cv_nm_interface="BSD nm"
5618  echo "int some_variable = 0;" > conftest.$ac_ext
5619  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
5620  (eval "$ac_compile" 2>conftest.err)
5621  cat conftest.err >&AS_MESSAGE_LOG_FD
5622  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
5623  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
5624  cat conftest.err >&AS_MESSAGE_LOG_FD
5625  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
5626  cat conftest.out >&AS_MESSAGE_LOG_FD
5627  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
5628    lt_cv_nm_interface="MS dumpbin"
5629  fi
5630  rm -f conftest*])
5631])# LT_PATH_NM
5632
5633# Old names:
5634AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
5635AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
5636dnl aclocal-1.4 backwards compatibility:
5637dnl AC_DEFUN([AM_PROG_NM], [])
5638dnl AC_DEFUN([AC_PROG_NM], [])
5639
5640# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
5641# --------------------------------
5642# how to determine the name of the shared library
5643# associated with a specific link library.
5644#  -- PORTME fill in with the dynamic library characteristics
5645m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
5646[m4_require([_LT_DECL_EGREP])
5647m4_require([_LT_DECL_OBJDUMP])
5648m4_require([_LT_DECL_DLLTOOL])
5649AC_CACHE_CHECK([how to associate runtime and link libraries],
5650lt_cv_sharedlib_from_linklib_cmd,
5651[lt_cv_sharedlib_from_linklib_cmd='unknown'
5652
5653case $host_os in
5654cygwin* | mingw* | pw32* | cegcc*)
5655  # two different shell functions defined in ltmain.sh;
5656  # decide which one to use based on capabilities of $DLLTOOL
5657  case `$DLLTOOL --help 2>&1` in
5658  *--identify-strict*)
5659    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
5660    ;;
5661  *)
5662    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
5663    ;;
5664  esac
5665  ;;
5666*)
5667  # fallback: assume linklib IS sharedlib
5668  lt_cv_sharedlib_from_linklib_cmd=$ECHO
5669  ;;
5670esac
5671])
5672sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
5673test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
5674
5675_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
5676    [Command to associate shared and link libraries])
5677])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
5678
5679
5680# _LT_PATH_MANIFEST_TOOL
5681# ----------------------
5682# locate the manifest tool
5683m4_defun([_LT_PATH_MANIFEST_TOOL],
5684[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
5685test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
5686AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
5687  [lt_cv_path_mainfest_tool=no
5688  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
5689  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
5690  cat conftest.err >&AS_MESSAGE_LOG_FD
5691  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
5692    lt_cv_path_mainfest_tool=yes
5693  fi
5694  rm -f conftest*])
5695if test yes != "$lt_cv_path_mainfest_tool"; then
5696  MANIFEST_TOOL=:
5697fi
5698_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
5699])# _LT_PATH_MANIFEST_TOOL
5700
5701
5702# _LT_DLL_DEF_P([FILE])
5703# ---------------------
5704# True iff FILE is a Windows DLL '.def' file.
5705# Keep in sync with func_dll_def_p in the libtool script
5706AC_DEFUN([_LT_DLL_DEF_P],
5707[dnl
5708  test DEF = "`$SED -n dnl
5709    -e '\''s/^[[	 ]]*//'\'' dnl Strip leading whitespace
5710    -e '\''/^\(;.*\)*$/d'\'' dnl      Delete empty lines and comments
5711    -e '\''s/^\(EXPORTS\|LIBRARY\)\([[	 ]].*\)*$/DEF/p'\'' dnl
5712    -e q dnl                          Only consider the first "real" line
5713    $1`" dnl
5714])# _LT_DLL_DEF_P
5715
5716
5717# LT_LIB_M
5718# --------
5719# check for math library
5720AC_DEFUN([LT_LIB_M],
5721[AC_REQUIRE([AC_CANONICAL_HOST])dnl
5722LIBM=
5723case $host in
5724*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
5725  # These system don't have libm, or don't need it
5726  ;;
5727*-ncr-sysv4.3*)
5728  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
5729  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
5730  ;;
5731*)
5732  AC_CHECK_LIB(m, cos, LIBM=-lm)
5733  ;;
5734esac
5735AC_SUBST([LIBM])
5736])# LT_LIB_M
5737
5738# Old name:
5739AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
5740dnl aclocal-1.4 backwards compatibility:
5741dnl AC_DEFUN([AC_CHECK_LIBM], [])
5742
5743
5744# _LT_COMPILER_NO_RTTI([TAGNAME])
5745# -------------------------------
5746m4_defun([_LT_COMPILER_NO_RTTI],
5747[m4_require([_LT_TAG_COMPILER])dnl
5748
5749_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5750
5751if test yes = "$GCC"; then
5752  case $cc_basename in
5753  nvcc*)
5754    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
5755  *)
5756    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
5757  esac
5758
5759  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
5760    lt_cv_prog_compiler_rtti_exceptions,
5761    [-fno-rtti -fno-exceptions], [],
5762    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
5763fi
5764_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
5765	[Compiler flag to turn off builtin functions])
5766])# _LT_COMPILER_NO_RTTI
5767
5768
5769# _LT_CMD_GLOBAL_SYMBOLS
5770# ----------------------
5771m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
5772[AC_REQUIRE([AC_CANONICAL_HOST])dnl
5773AC_REQUIRE([AC_PROG_CC])dnl
5774AC_REQUIRE([AC_PROG_AWK])dnl
5775AC_REQUIRE([LT_PATH_NM])dnl
5776AC_REQUIRE([LT_PATH_LD])dnl
5777m4_require([_LT_DECL_SED])dnl
5778m4_require([_LT_DECL_EGREP])dnl
5779m4_require([_LT_TAG_COMPILER])dnl
5780
5781# Check for command to grab the raw symbol name followed by C symbol from nm.
5782AC_MSG_CHECKING([command to parse $NM output from $compiler object])
5783AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
5784[
5785# These are sane defaults that work on at least a few old systems.
5786# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
5787
5788# Character class describing NM global symbol codes.
5789symcode='[[BCDEGRST]]'
5790
5791# Regexp to match symbols that can be accessed directly from C.
5792sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
5793
5794# Define system-specific variables.
5795case $host_os in
5796aix*)
5797  symcode='[[BCDT]]'
5798  ;;
5799cygwin* | mingw* | pw32* | cegcc*)
5800  symcode='[[ABCDGISTW]]'
5801  ;;
5802hpux*)
5803  if test ia64 = "$host_cpu"; then
5804    symcode='[[ABCDEGRST]]'
5805  fi
5806  ;;
5807irix* | nonstopux*)
5808  symcode='[[BCDEGRST]]'
5809  ;;
5810osf*)
5811  symcode='[[BCDEGQRST]]'
5812  ;;
5813solaris*)
5814  symcode='[[BDRT]]'
5815  ;;
5816sco3.2v5*)
5817  symcode='[[DT]]'
5818  ;;
5819sysv4.2uw2*)
5820  symcode='[[DT]]'
5821  ;;
5822sysv5* | sco5v6* | unixware* | OpenUNIX*)
5823  symcode='[[ABDT]]'
5824  ;;
5825sysv4)
5826  symcode='[[DFNSTU]]'
5827  ;;
5828esac
5829
5830# If we're using GNU nm, then use its standard symbol codes.
5831case `$NM -V 2>&1` in
5832*GNU* | *'with BFD'*)
5833  symcode='[[ABCDGIRSTW]]' ;;
5834esac
5835
5836if test "$lt_cv_nm_interface" = "MS dumpbin"; then
5837  # Gets list of data symbols to import.
5838  lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
5839  # Adjust the below global symbol transforms to fixup imported variables.
5840  lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
5841  lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
5842  lt_c_name_lib_hook="\
5843  -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
5844  -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
5845else
5846  # Disable hooks by default.
5847  lt_cv_sys_global_symbol_to_import=
5848  lt_cdecl_hook=
5849  lt_c_name_hook=
5850  lt_c_name_lib_hook=
5851fi
5852
5853# Transform an extracted symbol line into a proper C declaration.
5854# Some systems (esp. on ia64) link data and code symbols differently,
5855# so use this general approach.
5856lt_cv_sys_global_symbol_to_cdecl="sed -n"\
5857$lt_cdecl_hook\
5858" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
5859" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
5860
5861# Transform an extracted symbol line into symbol name and symbol address
5862lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
5863$lt_c_name_hook\
5864" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
5865" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
5866
5867# Transform an extracted symbol line into symbol name with lib prefix and
5868# symbol address.
5869lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
5870$lt_c_name_lib_hook\
5871" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
5872" -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
5873" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
5874
5875# Handle CRLF in mingw tool chain
5876opt_cr=
5877case $build_os in
5878mingw*)
5879  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
5880  ;;
5881esac
5882
5883# Try without a prefix underscore, then with it.
5884for ac_symprfx in "" "_"; do
5885
5886  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
5887  symxfrm="\\1 $ac_symprfx\\2 \\2"
5888
5889  # Write the raw and C identifiers.
5890  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
5891    # Fake it for dumpbin and say T for any non-static function,
5892    # D for any global variable and I for any imported variable.
5893    # Also find C++ and __fastcall symbols from MSVC++,
5894    # which start with @ or ?.
5895    lt_cv_sys_global_symbol_pipe="$AWK ['"\
5896"     {last_section=section; section=\$ 3};"\
5897"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
5898"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
5899"     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
5900"     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
5901"     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
5902"     \$ 0!~/External *\|/{next};"\
5903"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
5904"     {if(hide[section]) next};"\
5905"     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
5906"     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
5907"     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
5908"     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
5909"     ' prfx=^$ac_symprfx]"
5910  else
5911    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
5912  fi
5913  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
5914
5915  # Check to see that the pipe works correctly.
5916  pipe_works=no
5917
5918  rm -f conftest*
5919  cat > conftest.$ac_ext <<_LT_EOF
5920#ifdef __cplusplus
5921extern "C" {
5922#endif
5923char nm_test_var;
5924void nm_test_func(void);
5925void nm_test_func(void){}
5926#ifdef __cplusplus
5927}
5928#endif
5929int main(){nm_test_var='a';nm_test_func();return(0);}
5930_LT_EOF
5931
5932  if AC_TRY_EVAL(ac_compile); then
5933    # Now try to grab the symbols.
5934    nlist=conftest.nm
5935    $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&AS_MESSAGE_LOG_FD
5936    if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&AS_MESSAGE_LOG_FD && test -s "$nlist"; then
5937      # Try sorting and uniquifying the output.
5938      if sort "$nlist" | uniq > "$nlist"T; then
5939	mv -f "$nlist"T "$nlist"
5940      else
5941	rm -f "$nlist"T
5942      fi
5943
5944      # Make sure that we snagged all the symbols we need.
5945      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
5946	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
5947	  cat <<_LT_EOF > conftest.$ac_ext
5948/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
5949#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
5950/* DATA imports from DLLs on WIN32 can't be const, because runtime
5951   relocations are performed -- see ld's documentation on pseudo-relocs.  */
5952# define LT@&t@_DLSYM_CONST
5953#elif defined __osf__
5954/* This system does not cope well with relocations in const data.  */
5955# define LT@&t@_DLSYM_CONST
5956#else
5957# define LT@&t@_DLSYM_CONST const
5958#endif
5959
5960#ifdef __cplusplus
5961extern "C" {
5962#endif
5963
5964_LT_EOF
5965	  # Now generate the symbol file.
5966	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
5967
5968	  cat <<_LT_EOF >> conftest.$ac_ext
5969
5970/* The mapping between symbol names and symbols.  */
5971LT@&t@_DLSYM_CONST struct {
5972  const char *name;
5973  void       *address;
5974}
5975lt__PROGRAM__LTX_preloaded_symbols[[]] =
5976{
5977  { "@PROGRAM@", (void *) 0 },
5978_LT_EOF
5979	  $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
5980	  cat <<\_LT_EOF >> conftest.$ac_ext
5981  {0, (void *) 0}
5982};
5983
5984/* This works around a problem in FreeBSD linker */
5985#ifdef FREEBSD_WORKAROUND
5986static const void *lt_preloaded_setup() {
5987  return lt__PROGRAM__LTX_preloaded_symbols;
5988}
5989#endif
5990
5991#ifdef __cplusplus
5992}
5993#endif
5994_LT_EOF
5995	  # Now try linking the two files.
5996	  mv conftest.$ac_objext conftstm.$ac_objext
5997	  lt_globsym_save_LIBS=$LIBS
5998	  lt_globsym_save_CFLAGS=$CFLAGS
5999	  LIBS=conftstm.$ac_objext
6000	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
6001	  if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
6002	    pipe_works=yes
6003	  fi
6004	  LIBS=$lt_globsym_save_LIBS
6005	  CFLAGS=$lt_globsym_save_CFLAGS
6006	else
6007	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
6008	fi
6009      else
6010	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
6011      fi
6012    else
6013      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
6014    fi
6015  else
6016    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
6017    cat conftest.$ac_ext >&5
6018  fi
6019  rm -rf conftest* conftst*
6020
6021  # Do not use the global_symbol_pipe unless it works.
6022  if test yes = "$pipe_works"; then
6023    break
6024  else
6025    lt_cv_sys_global_symbol_pipe=
6026  fi
6027done
6028])
6029if test -z "$lt_cv_sys_global_symbol_pipe"; then
6030  lt_cv_sys_global_symbol_to_cdecl=
6031fi
6032if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
6033  AC_MSG_RESULT(failed)
6034else
6035  AC_MSG_RESULT(ok)
6036fi
6037
6038# Response file support.
6039if test "$lt_cv_nm_interface" = "MS dumpbin"; then
6040  nm_file_list_spec='@'
6041elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
6042  nm_file_list_spec='@'
6043fi
6044
6045_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
6046    [Take the output of nm and produce a listing of raw symbols and C names])
6047_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
6048    [Transform the output of nm in a proper C declaration])
6049_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
6050    [Transform the output of nm into a list of symbols to manually relocate])
6051_LT_DECL([global_symbol_to_c_name_address],
6052    [lt_cv_sys_global_symbol_to_c_name_address], [1],
6053    [Transform the output of nm in a C name address pair])
6054_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
6055    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
6056    [Transform the output of nm in a C name address pair when lib prefix is needed])
6057_LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
6058    [The name lister interface])
6059_LT_DECL([], [nm_file_list_spec], [1],
6060    [Specify filename containing input files for $NM])
6061]) # _LT_CMD_GLOBAL_SYMBOLS
6062
6063
6064# _LT_COMPILER_PIC([TAGNAME])
6065# ---------------------------
6066m4_defun([_LT_COMPILER_PIC],
6067[m4_require([_LT_TAG_COMPILER])dnl
6068_LT_TAGVAR(lt_prog_compiler_wl, $1)=
6069_LT_TAGVAR(lt_prog_compiler_pic, $1)=
6070_LT_TAGVAR(lt_prog_compiler_static, $1)=
6071
6072m4_if([$1], [CXX], [
6073  # C++ specific cases for pic, static, wl, etc.
6074  if test yes = "$GXX"; then
6075    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6076    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6077
6078    case $host_os in
6079    aix*)
6080      # All AIX code is PIC.
6081      if test ia64 = "$host_cpu"; then
6082	# AIX 5 now supports IA64 processor
6083	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6084      fi
6085      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6086      ;;
6087
6088    amigaos*)
6089      case $host_cpu in
6090      powerpc)
6091            # see comment about AmigaOS4 .so support
6092            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6093        ;;
6094      m68k)
6095            # FIXME: we need at least 68020 code to build shared libraries, but
6096            # adding the '-m68020' flag to GCC prevents building anything better,
6097            # like '-m68040'.
6098            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
6099        ;;
6100      esac
6101      ;;
6102
6103    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
6104      # PIC is the default for these OSes.
6105      ;;
6106    mingw* | cygwin* | os2* | pw32* | cegcc*)
6107      # This hack is so that the source file can tell whether it is being
6108      # built for inclusion in a dll (and should export symbols for example).
6109      # Although the cygwin gcc ignores -fPIC, still need this for old-style
6110      # (--disable-auto-import) libraries
6111      m4_if([$1], [GCJ], [],
6112	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
6113      case $host_os in
6114      os2*)
6115	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
6116	;;
6117      esac
6118      ;;
6119    darwin* | rhapsody*)
6120      # PIC is the default on this platform
6121      # Common symbols not allowed in MH_DYLIB files
6122      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
6123      ;;
6124    *djgpp*)
6125      # DJGPP does not support shared libraries at all
6126      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
6127      ;;
6128    haiku*)
6129      # PIC is the default for Haiku.
6130      # The "-static" flag exists, but is broken.
6131      _LT_TAGVAR(lt_prog_compiler_static, $1)=
6132      ;;
6133    interix[[3-9]]*)
6134      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
6135      # Instead, we relocate shared libraries at runtime.
6136      ;;
6137    sysv4*MP*)
6138      if test -d /usr/nec; then
6139	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
6140      fi
6141      ;;
6142    hpux*)
6143      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
6144      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
6145      # sets the default TLS model and affects inlining.
6146      case $host_cpu in
6147      hppa*64*)
6148	;;
6149      *)
6150	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6151	;;
6152      esac
6153      ;;
6154    *qnx* | *nto*)
6155      # QNX uses GNU C++, but need to define -shared option too, otherwise
6156      # it will coredump.
6157      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
6158      ;;
6159    *)
6160      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6161      ;;
6162    esac
6163  else
6164    case $host_os in
6165      aix[[4-9]]*)
6166	# All AIX code is PIC.
6167	if test ia64 = "$host_cpu"; then
6168	  # AIX 5 now supports IA64 processor
6169	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6170	else
6171	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
6172	fi
6173	;;
6174      chorus*)
6175	case $cc_basename in
6176	cxch68*)
6177	  # Green Hills C++ Compiler
6178	  # _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"
6179	  ;;
6180	esac
6181	;;
6182      mingw* | cygwin* | os2* | pw32* | cegcc*)
6183	# This hack is so that the source file can tell whether it is being
6184	# built for inclusion in a dll (and should export symbols for example).
6185	m4_if([$1], [GCJ], [],
6186	  [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
6187	;;
6188      dgux*)
6189	case $cc_basename in
6190	  ec++*)
6191	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6192	    ;;
6193	  ghcx*)
6194	    # Green Hills C++ Compiler
6195	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6196	    ;;
6197	  *)
6198	    ;;
6199	esac
6200	;;
6201      freebsd* | dragonfly*)
6202	# FreeBSD uses GNU C++
6203	;;
6204      hpux9* | hpux10* | hpux11*)
6205	case $cc_basename in
6206	  CC*)
6207	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6208	    _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
6209	    if test ia64 != "$host_cpu"; then
6210	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6211	    fi
6212	    ;;
6213	  aCC*)
6214	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6215	    _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
6216	    case $host_cpu in
6217	    hppa*64*|ia64*)
6218	      # +Z the default
6219	      ;;
6220	    *)
6221	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6222	      ;;
6223	    esac
6224	    ;;
6225	  *)
6226	    ;;
6227	esac
6228	;;
6229      interix*)
6230	# This is c89, which is MS Visual C++ (no shared libs)
6231	# Anyone wants to do a port?
6232	;;
6233      irix5* | irix6* | nonstopux*)
6234	case $cc_basename in
6235	  CC*)
6236	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6237	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6238	    # CC pic flag -KPIC is the default.
6239	    ;;
6240	  *)
6241	    ;;
6242	esac
6243	;;
6244      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
6245	case $cc_basename in
6246	  KCC*)
6247	    # KAI C++ Compiler
6248	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
6249	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6250	    ;;
6251	  ecpc* )
6252	    # old Intel C++ for x86_64, which still supported -KPIC.
6253	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6254	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6255	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6256	    ;;
6257	  icpc* )
6258	    # Intel C++, used to be incompatible with GCC.
6259	    # ICC 10 doesn't accept -KPIC any more.
6260	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6261	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6262	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6263	    ;;
6264	  pgCC* | pgcpp*)
6265	    # Portland Group C++ compiler
6266	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6267	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6268	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6269	    ;;
6270	  cxx*)
6271	    # Compaq C++
6272	    # Make sure the PIC flag is empty.  It appears that all Alpha
6273	    # Linux and Compaq Tru64 Unix objects are PIC.
6274	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
6275	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6276	    ;;
6277	  xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
6278	    # IBM XL 8.0, 9.0 on PPC and BlueGene
6279	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6280	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
6281	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
6282	    ;;
6283	  *)
6284	    case `$CC -V 2>&1 | sed 5q` in
6285	    *Sun\ C*)
6286	      # Sun C++ 5.9
6287	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6288	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6289	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6290	      ;;
6291	    esac
6292	    ;;
6293	esac
6294	;;
6295      lynxos*)
6296	;;
6297      m88k*)
6298	;;
6299      mvs*)
6300	case $cc_basename in
6301	  cxx*)
6302	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
6303	    ;;
6304	  *)
6305	    ;;
6306	esac
6307	;;
6308      netbsd* | netbsdelf*-gnu)
6309	;;
6310      *qnx* | *nto*)
6311        # QNX uses GNU C++, but need to define -shared option too, otherwise
6312        # it will coredump.
6313        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
6314        ;;
6315      osf3* | osf4* | osf5*)
6316	case $cc_basename in
6317	  KCC*)
6318	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
6319	    ;;
6320	  RCC*)
6321	    # Rational C++ 2.4.1
6322	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6323	    ;;
6324	  cxx*)
6325	    # Digital/Compaq C++
6326	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6327	    # Make sure the PIC flag is empty.  It appears that all Alpha
6328	    # Linux and Compaq Tru64 Unix objects are PIC.
6329	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
6330	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6331	    ;;
6332	  *)
6333	    ;;
6334	esac
6335	;;
6336      psos*)
6337	;;
6338      solaris*)
6339	case $cc_basename in
6340	  CC* | sunCC*)
6341	    # Sun C++ 4.2, 5.x and Centerline C++
6342	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6343	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6344	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6345	    ;;
6346	  gcx*)
6347	    # Green Hills C++ Compiler
6348	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6349	    ;;
6350	  *)
6351	    ;;
6352	esac
6353	;;
6354      sunos4*)
6355	case $cc_basename in
6356	  CC*)
6357	    # Sun C++ 4.x
6358	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6359	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6360	    ;;
6361	  lcc*)
6362	    # Lucid
6363	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6364	    ;;
6365	  *)
6366	    ;;
6367	esac
6368	;;
6369      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
6370	case $cc_basename in
6371	  CC*)
6372	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6373	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6374	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6375	    ;;
6376	esac
6377	;;
6378      tandem*)
6379	case $cc_basename in
6380	  NCC*)
6381	    # NonStop-UX NCC 3.20
6382	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6383	    ;;
6384	  *)
6385	    ;;
6386	esac
6387	;;
6388      vxworks*)
6389	;;
6390      *)
6391	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6392	;;
6393    esac
6394  fi
6395],
6396[
6397  if test yes = "$GCC"; then
6398    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6399    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6400
6401    case $host_os in
6402      aix*)
6403      # All AIX code is PIC.
6404      if test ia64 = "$host_cpu"; then
6405	# AIX 5 now supports IA64 processor
6406	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6407      fi
6408      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6409      ;;
6410
6411    amigaos*)
6412      case $host_cpu in
6413      powerpc)
6414            # see comment about AmigaOS4 .so support
6415            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6416        ;;
6417      m68k)
6418            # FIXME: we need at least 68020 code to build shared libraries, but
6419            # adding the '-m68020' flag to GCC prevents building anything better,
6420            # like '-m68040'.
6421            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
6422        ;;
6423      esac
6424      ;;
6425
6426    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
6427      # PIC is the default for these OSes.
6428      ;;
6429
6430    mingw* | cygwin* | pw32* | os2* | cegcc*)
6431      # This hack is so that the source file can tell whether it is being
6432      # built for inclusion in a dll (and should export symbols for example).
6433      # Although the cygwin gcc ignores -fPIC, still need this for old-style
6434      # (--disable-auto-import) libraries
6435      m4_if([$1], [GCJ], [],
6436	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
6437      case $host_os in
6438      os2*)
6439	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
6440	;;
6441      esac
6442      ;;
6443
6444    darwin* | rhapsody*)
6445      # PIC is the default on this platform
6446      # Common symbols not allowed in MH_DYLIB files
6447      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
6448      ;;
6449
6450    haiku*)
6451      # PIC is the default for Haiku.
6452      # The "-static" flag exists, but is broken.
6453      _LT_TAGVAR(lt_prog_compiler_static, $1)=
6454      ;;
6455
6456    hpux*)
6457      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
6458      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
6459      # sets the default TLS model and affects inlining.
6460      case $host_cpu in
6461      hppa*64*)
6462	# +Z the default
6463	;;
6464      *)
6465	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6466	;;
6467      esac
6468      ;;
6469
6470    interix[[3-9]]*)
6471      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
6472      # Instead, we relocate shared libraries at runtime.
6473      ;;
6474
6475    msdosdjgpp*)
6476      # Just because we use GCC doesn't mean we suddenly get shared libraries
6477      # on systems that don't support them.
6478      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6479      enable_shared=no
6480      ;;
6481
6482    *nto* | *qnx*)
6483      # QNX uses GNU C++, but need to define -shared option too, otherwise
6484      # it will coredump.
6485      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
6486      ;;
6487
6488    sysv4*MP*)
6489      if test -d /usr/nec; then
6490	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
6491      fi
6492      ;;
6493
6494    *)
6495      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6496      ;;
6497    esac
6498
6499    case $cc_basename in
6500    nvcc*) # Cuda Compiler Driver 2.2
6501      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
6502      if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
6503        _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
6504      fi
6505      ;;
6506    esac
6507  else
6508    # PORTME Check for flag to pass linker flags through the system compiler.
6509    case $host_os in
6510    aix*)
6511      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6512      if test ia64 = "$host_cpu"; then
6513	# AIX 5 now supports IA64 processor
6514	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6515      else
6516	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
6517      fi
6518      ;;
6519
6520    darwin* | rhapsody*)
6521      # PIC is the default on this platform
6522      # Common symbols not allowed in MH_DYLIB files
6523      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
6524      case $cc_basename in
6525      nagfor*)
6526        # NAG Fortran compiler
6527        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
6528        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6529        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6530        ;;
6531      esac
6532      ;;
6533
6534    mingw* | cygwin* | pw32* | os2* | cegcc*)
6535      # This hack is so that the source file can tell whether it is being
6536      # built for inclusion in a dll (and should export symbols for example).
6537      m4_if([$1], [GCJ], [],
6538	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
6539      case $host_os in
6540      os2*)
6541	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
6542	;;
6543      esac
6544      ;;
6545
6546    hpux9* | hpux10* | hpux11*)
6547      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6548      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6549      # not for PA HP-UX.
6550      case $host_cpu in
6551      hppa*64*|ia64*)
6552	# +Z the default
6553	;;
6554      *)
6555	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6556	;;
6557      esac
6558      # Is there a better lt_prog_compiler_static that works with the bundled CC?
6559      _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
6560      ;;
6561
6562    irix5* | irix6* | nonstopux*)
6563      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6564      # PIC (with -KPIC) is the default.
6565      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6566      ;;
6567
6568    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
6569      case $cc_basename in
6570      # old Intel for x86_64, which still supported -KPIC.
6571      ecc*)
6572	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6573	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6574	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6575        ;;
6576      # flang / f18. f95 an alias for gfortran or flang on Debian
6577      flang* | f18* | f95*)
6578	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6579	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6580	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6581        ;;
6582      # icc used to be incompatible with GCC.
6583      # ICC 10 doesn't accept -KPIC any more.
6584      icc* | ifort*)
6585	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6586	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6587	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6588        ;;
6589      # Lahey Fortran 8.1.
6590      lf95*)
6591	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6592	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
6593	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
6594	;;
6595      nagfor*)
6596	# NAG Fortran compiler
6597	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
6598	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6599	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6600	;;
6601      tcc*)
6602	# Fabrice Bellard et al's Tiny C Compiler
6603	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6604	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6605	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6606	;;
6607      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
6608        # Portland Group compilers (*not* the Pentium gcc compiler,
6609	# which looks to be a dead project)
6610	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6611	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6612	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6613        ;;
6614      ccc*)
6615        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6616        # All Alpha code is PIC.
6617        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6618        ;;
6619      xl* | bgxl* | bgf* | mpixl*)
6620	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
6621	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6622	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
6623	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
6624	;;
6625      *)
6626	case `$CC -V 2>&1 | sed 5q` in
6627	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
6628	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
6629	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6630	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6631	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
6632	  ;;
6633	*Sun\ F* | *Sun*Fortran*)
6634	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6635	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6636	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6637	  ;;
6638	*Sun\ C*)
6639	  # Sun C 5.9
6640	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6641	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6642	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6643	  ;;
6644        *Intel*\ [[CF]]*Compiler*)
6645	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6646	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6647	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6648	  ;;
6649	*Portland\ Group*)
6650	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6651	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6652	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6653	  ;;
6654	esac
6655	;;
6656      esac
6657      ;;
6658
6659    newsos6)
6660      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6661      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6662      ;;
6663
6664    *nto* | *qnx*)
6665      # QNX uses GNU C++, but need to define -shared option too, otherwise
6666      # it will coredump.
6667      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
6668      ;;
6669
6670    osf3* | osf4* | osf5*)
6671      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6672      # All OSF/1 code is PIC.
6673      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6674      ;;
6675
6676    rdos*)
6677      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6678      ;;
6679
6680    solaris*)
6681      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6682      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6683      case $cc_basename in
6684      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
6685	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
6686      *)
6687	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
6688      esac
6689      ;;
6690
6691    sunos4*)
6692      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6693      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6694      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6695      ;;
6696
6697    sysv4 | sysv4.2uw2* | sysv4.3*)
6698      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6699      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6700      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6701      ;;
6702
6703    sysv4*MP*)
6704      if test -d /usr/nec; then
6705	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
6706	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6707      fi
6708      ;;
6709
6710    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
6711      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6712      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6713      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6714      ;;
6715
6716    unicos*)
6717      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6718      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6719      ;;
6720
6721    uts4*)
6722      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6723      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6724      ;;
6725
6726    *)
6727      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6728      ;;
6729    esac
6730  fi
6731])
6732case $host_os in
6733  # For platforms that do not support PIC, -DPIC is meaningless:
6734  *djgpp*)
6735    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
6736    ;;
6737  *)
6738    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
6739    ;;
6740esac
6741
6742AC_CACHE_CHECK([for $compiler option to produce PIC],
6743  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
6744  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
6745_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
6746
6747#
6748# Check to make sure the PIC flag actually works.
6749#
6750if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
6751  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
6752    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
6753    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
6754    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
6755     "" | " "*) ;;
6756     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
6757     esac],
6758    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
6759     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
6760fi
6761_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
6762	[Additional compiler flags for building library objects])
6763
6764_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
6765	[How to pass a linker flag through the compiler])
6766#
6767# Check to make sure the static flag actually works.
6768#
6769wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
6770_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
6771  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
6772  $lt_tmp_static_flag,
6773  [],
6774  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
6775_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
6776	[Compiler flag to prevent dynamic linking])
6777])# _LT_COMPILER_PIC
6778
6779
6780# _LT_LINKER_SHLIBS([TAGNAME])
6781# ----------------------------
6782# See if the linker supports building shared libraries.
6783m4_defun([_LT_LINKER_SHLIBS],
6784[AC_REQUIRE([LT_PATH_LD])dnl
6785AC_REQUIRE([LT_PATH_NM])dnl
6786m4_require([_LT_PATH_MANIFEST_TOOL])dnl
6787m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6788m4_require([_LT_DECL_EGREP])dnl
6789m4_require([_LT_DECL_SED])dnl
6790m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
6791m4_require([_LT_TAG_COMPILER])dnl
6792AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6793m4_if([$1], [CXX], [
6794  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6795  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
6796  case $host_os in
6797  aix[[4-9]]*)
6798    # If we're using GNU nm, then we don't want the "-C" option.
6799    # -C means demangle to GNU nm, but means don't demangle to AIX nm.
6800    # Without the "-l" option, or with the "-B" option, AIX nm treats
6801    # weak defined symbols like other global defined symbols, whereas
6802    # GNU nm marks them as "W".
6803    # While the 'weak' keyword is ignored in the Export File, we need
6804    # it in the Import File for the 'aix-soname' feature, so we have
6805    # to replace the "-B" option with "-P" for AIX nm.
6806    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
6807      _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'
6808    else
6809      _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 == "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'
6810    fi
6811    ;;
6812  pw32*)
6813    _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
6814    ;;
6815  cygwin* | mingw* | cegcc*)
6816    case $cc_basename in
6817    cl*)
6818      _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
6819      ;;
6820    *)
6821      _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'
6822      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
6823      ;;
6824    esac
6825    ;;
6826  linux* | k*bsd*-gnu | gnu*)
6827    _LT_TAGVAR(link_all_deplibs, $1)=no
6828    ;;
6829  *)
6830    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6831    ;;
6832  esac
6833], [
6834  runpath_var=
6835  _LT_TAGVAR(allow_undefined_flag, $1)=
6836  _LT_TAGVAR(always_export_symbols, $1)=no
6837  _LT_TAGVAR(archive_cmds, $1)=
6838  _LT_TAGVAR(archive_expsym_cmds, $1)=
6839  _LT_TAGVAR(compiler_needs_object, $1)=no
6840  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6841  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6842  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6843  _LT_TAGVAR(hardcode_automatic, $1)=no
6844  _LT_TAGVAR(hardcode_direct, $1)=no
6845  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6846  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6847  _LT_TAGVAR(hardcode_libdir_separator, $1)=
6848  _LT_TAGVAR(hardcode_minus_L, $1)=no
6849  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6850  _LT_TAGVAR(inherit_rpath, $1)=no
6851  _LT_TAGVAR(link_all_deplibs, $1)=unknown
6852  _LT_TAGVAR(module_cmds, $1)=
6853  _LT_TAGVAR(module_expsym_cmds, $1)=
6854  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
6855  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
6856  _LT_TAGVAR(thread_safe_flag_spec, $1)=
6857  _LT_TAGVAR(whole_archive_flag_spec, $1)=
6858  # include_expsyms should be a list of space-separated symbols to be *always*
6859  # included in the symbol list
6860  _LT_TAGVAR(include_expsyms, $1)=
6861  # exclude_expsyms can be an extended regexp of symbols to exclude
6862  # it will be wrapped by ' (' and ')$', so one must not match beginning or
6863  # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
6864  # as well as any symbol that contains 'd'.
6865  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
6866  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
6867  # platforms (ab)use it in PIC code, but their linkers get confused if
6868  # the symbol is explicitly referenced.  Since portable code cannot
6869  # rely on this symbol name, it's probably fine to never include it in
6870  # preloaded symbol tables.
6871  # Exclude shared library initialization/finalization symbols.
6872dnl Note also adjust exclude_expsyms for C++ above.
6873  extract_expsyms_cmds=
6874
6875  case $host_os in
6876  cygwin* | mingw* | pw32* | cegcc*)
6877    # FIXME: the MSVC++ port hasn't been tested in a loooong time
6878    # When not using gcc, we currently assume that we are using
6879    # Microsoft Visual C++.
6880    if test yes != "$GCC"; then
6881      with_gnu_ld=no
6882    fi
6883    ;;
6884  interix*)
6885    # we just hope/assume this is gcc and not c89 (= MSVC++)
6886    with_gnu_ld=yes
6887    ;;
6888  openbsd* | bitrig*)
6889    with_gnu_ld=no
6890    ;;
6891  linux* | k*bsd*-gnu | gnu*)
6892    _LT_TAGVAR(link_all_deplibs, $1)=no
6893    ;;
6894  esac
6895
6896  _LT_TAGVAR(ld_shlibs, $1)=yes
6897
6898  # On some targets, GNU ld is compatible enough with the native linker
6899  # that we're better off using the native interface for both.
6900  lt_use_gnu_ld_interface=no
6901  if test yes = "$with_gnu_ld"; then
6902    case $host_os in
6903      aix*)
6904	# The AIX port of GNU ld has always aspired to compatibility
6905	# with the native linker.  However, as the warning in the GNU ld
6906	# block says, versions before 2.19.5* couldn't really create working
6907	# shared libraries, regardless of the interface used.
6908	case `$LD -v 2>&1` in
6909	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
6910	  *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
6911	  *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
6912	  *)
6913	    lt_use_gnu_ld_interface=yes
6914	    ;;
6915	esac
6916	;;
6917      *)
6918	lt_use_gnu_ld_interface=yes
6919	;;
6920    esac
6921  fi
6922
6923  if test yes = "$lt_use_gnu_ld_interface"; then
6924    # If archive_cmds runs LD, not CC, wlarc should be empty
6925    wlarc='$wl'
6926
6927    # Set some defaults for GNU ld with shared library support. These
6928    # are reset later if shared libraries are not supported. Putting them
6929    # here allows them to be overridden if necessary.
6930    runpath_var=LD_RUN_PATH
6931    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
6932    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
6933    # ancient GNU ld didn't support --whole-archive et. al.
6934    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
6935      _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
6936    else
6937      _LT_TAGVAR(whole_archive_flag_spec, $1)=
6938    fi
6939    supports_anon_versioning=no
6940    case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
6941      *GNU\ gold*) supports_anon_versioning=yes ;;
6942      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
6943      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
6944      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
6945      *\ 2.11.*) ;; # other 2.11 versions
6946      *) supports_anon_versioning=yes ;;
6947    esac
6948
6949    # See if GNU ld supports shared libraries.
6950    case $host_os in
6951    aix[[3-9]]*)
6952      # On AIX/PPC, the GNU linker is very broken
6953      if test ia64 != "$host_cpu"; then
6954	_LT_TAGVAR(ld_shlibs, $1)=no
6955	cat <<_LT_EOF 1>&2
6956
6957*** Warning: the GNU linker, at least up to release 2.19, is reported
6958*** to be unable to reliably create shared libraries on AIX.
6959*** Therefore, libtool is disabling shared libraries support.  If you
6960*** really care for shared libraries, you may want to install binutils
6961*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
6962*** You will then need to restart the configuration process.
6963
6964_LT_EOF
6965      fi
6966      ;;
6967
6968    amigaos*)
6969      case $host_cpu in
6970      powerpc)
6971            # see comment about AmigaOS4 .so support
6972            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6973            _LT_TAGVAR(archive_expsym_cmds, $1)=''
6974        ;;
6975      m68k)
6976            _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)'
6977            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6978            _LT_TAGVAR(hardcode_minus_L, $1)=yes
6979        ;;
6980      esac
6981      ;;
6982
6983    beos*)
6984      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6985	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6986	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6987	# support --undefined.  This deserves some investigation.  FIXME
6988	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6989      else
6990	_LT_TAGVAR(ld_shlibs, $1)=no
6991      fi
6992      ;;
6993
6994    cygwin* | mingw* | pw32* | cegcc*)
6995      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6996      # as there is no search path for DLLs.
6997      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6998      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
6999      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7000      _LT_TAGVAR(always_export_symbols, $1)=no
7001      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7002      _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'
7003      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
7004
7005      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
7006        _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'
7007	# If the export-symbols file already is a .def file, use it as
7008	# is; otherwise, prepend EXPORTS...
7009	_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
7010          cp $export_symbols $output_objdir/$soname.def;
7011        else
7012          echo EXPORTS > $output_objdir/$soname.def;
7013          cat $export_symbols >> $output_objdir/$soname.def;
7014        fi~
7015        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
7016      else
7017	_LT_TAGVAR(ld_shlibs, $1)=no
7018      fi
7019      ;;
7020
7021    haiku*)
7022      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
7023      _LT_TAGVAR(link_all_deplibs, $1)=yes
7024      ;;
7025
7026    os2*)
7027      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7028      _LT_TAGVAR(hardcode_minus_L, $1)=yes
7029      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7030      shrext_cmds=.dll
7031      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
7032	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
7033	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
7034	$ECHO EXPORTS >> $output_objdir/$libname.def~
7035	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
7036	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
7037	emximp -o $lib $output_objdir/$libname.def'
7038      _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
7039	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
7040	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
7041	$ECHO EXPORTS >> $output_objdir/$libname.def~
7042	prefix_cmds="$SED"~
7043	if test EXPORTS = "`$SED 1q $export_symbols`"; then
7044	  prefix_cmds="$prefix_cmds -e 1d";
7045	fi~
7046	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
7047	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
7048	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
7049	emximp -o $lib $output_objdir/$libname.def'
7050      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
7051      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7052      ;;
7053
7054    interix[[3-9]]*)
7055      _LT_TAGVAR(hardcode_direct, $1)=no
7056      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7057      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7058      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
7059      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
7060      # Instead, shared libraries are loaded at an image base (0x10000000 by
7061      # default) and relocated if they conflict, which is a slow very memory
7062      # consuming and fragmenting process.  To avoid this, we pick a random,
7063      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
7064      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
7065      _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'
7066      _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'
7067      ;;
7068
7069    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
7070      tmp_diet=no
7071      if test linux-dietlibc = "$host_os"; then
7072	case $cc_basename in
7073	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
7074	esac
7075      fi
7076      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
7077	 && test no = "$tmp_diet"
7078      then
7079	tmp_addflag=' $pic_flag'
7080	tmp_sharedflag='-shared'
7081	case $cc_basename,$host_cpu in
7082        pgcc*)				# Portland Group C compiler
7083	  _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'
7084	  tmp_addflag=' $pic_flag'
7085	  ;;
7086	pgf77* | pgf90* | pgf95* | pgfortran*)
7087					# Portland Group f77 and f90 compilers
7088	  _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'
7089	  tmp_addflag=' $pic_flag -Mnomain' ;;
7090	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
7091	  tmp_addflag=' -i_dynamic' ;;
7092	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
7093	  tmp_addflag=' -i_dynamic -nofor_main' ;;
7094	ifc* | ifort*)			# Intel Fortran compiler
7095	  tmp_addflag=' -nofor_main' ;;
7096	lf95*)				# Lahey Fortran 8.1
7097	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
7098	  tmp_sharedflag='--shared' ;;
7099        nagfor*)                        # NAGFOR 5.3
7100          tmp_sharedflag='-Wl,-shared' ;;
7101	xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
7102	  tmp_sharedflag='-qmkshrobj'
7103	  tmp_addflag= ;;
7104	nvcc*)	# Cuda Compiler Driver 2.2
7105	  _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'
7106	  _LT_TAGVAR(compiler_needs_object, $1)=yes
7107	  ;;
7108	esac
7109	case `$CC -V 2>&1 | sed 5q` in
7110	*Sun\ C*)			# Sun C 5.9
7111	  _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'
7112	  _LT_TAGVAR(compiler_needs_object, $1)=yes
7113	  tmp_sharedflag='-G' ;;
7114	*Sun\ F*)			# Sun Fortran 8.3
7115	  tmp_sharedflag='-G' ;;
7116	esac
7117	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
7118
7119        if test yes = "$supports_anon_versioning"; then
7120          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7121            cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7122            echo "local: *; };" >> $output_objdir/$libname.ver~
7123            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
7124        fi
7125
7126	case $cc_basename in
7127	tcc*)
7128	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
7129	  ;;
7130	xlf* | bgf* | bgxlf* | mpixlf*)
7131	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
7132	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
7133	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7134	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
7135	  if test yes = "$supports_anon_versioning"; then
7136	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7137              cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7138              echo "local: *; };" >> $output_objdir/$libname.ver~
7139              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
7140	  fi
7141	  ;;
7142	esac
7143      else
7144        _LT_TAGVAR(ld_shlibs, $1)=no
7145      fi
7146      ;;
7147
7148    netbsd* | netbsdelf*-gnu)
7149      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7150	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
7151	wlarc=
7152      else
7153	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
7154	_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'
7155      fi
7156      ;;
7157
7158    solaris*)
7159      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
7160	_LT_TAGVAR(ld_shlibs, $1)=no
7161	cat <<_LT_EOF 1>&2
7162
7163*** Warning: The releases 2.8.* of the GNU linker cannot reliably
7164*** create shared libraries on Solaris systems.  Therefore, libtool
7165*** is disabling shared libraries support.  We urge you to upgrade GNU
7166*** binutils to release 2.9.1 or newer.  Another option is to modify
7167*** your PATH or compiler configuration so that the native linker is
7168*** used, and then restart.
7169
7170_LT_EOF
7171      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
7172	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
7173	_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'
7174      else
7175	_LT_TAGVAR(ld_shlibs, $1)=no
7176      fi
7177      ;;
7178
7179    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
7180      case `$LD -v 2>&1` in
7181        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
7182	_LT_TAGVAR(ld_shlibs, $1)=no
7183	cat <<_LT_EOF 1>&2
7184
7185*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
7186*** reliably create shared libraries on SCO systems.  Therefore, libtool
7187*** is disabling shared libraries support.  We urge you to upgrade GNU
7188*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
7189*** your PATH or compiler configuration so that the native linker is
7190*** used, and then restart.
7191
7192_LT_EOF
7193	;;
7194	*)
7195	  # For security reasons, it is highly recommended that you always
7196	  # use absolute paths for naming shared libraries, and exclude the
7197	  # DT_RUNPATH tag from executables and libraries.  But doing so
7198	  # requires that you compile everything twice, which is a pain.
7199	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
7200	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7201	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
7202	    _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'
7203	  else
7204	    _LT_TAGVAR(ld_shlibs, $1)=no
7205	  fi
7206	;;
7207      esac
7208      ;;
7209
7210    sunos4*)
7211      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7212      wlarc=
7213      _LT_TAGVAR(hardcode_direct, $1)=yes
7214      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7215      ;;
7216
7217    *)
7218      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
7219	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
7220	_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'
7221      else
7222	_LT_TAGVAR(ld_shlibs, $1)=no
7223      fi
7224      ;;
7225    esac
7226
7227    if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
7228      runpath_var=
7229      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7230      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7231      _LT_TAGVAR(whole_archive_flag_spec, $1)=
7232    fi
7233  else
7234    # PORTME fill in a description of your system's linker (not GNU ld)
7235    case $host_os in
7236    aix3*)
7237      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7238      _LT_TAGVAR(always_export_symbols, $1)=yes
7239      _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'
7240      # Note: this linker hardcodes the directories in LIBPATH if there
7241      # are no directories specified by -L.
7242      _LT_TAGVAR(hardcode_minus_L, $1)=yes
7243      if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
7244	# Neither direct hardcoding nor static linking is supported with a
7245	# broken collect2.
7246	_LT_TAGVAR(hardcode_direct, $1)=unsupported
7247      fi
7248      ;;
7249
7250    aix[[4-9]]*)
7251      if test ia64 = "$host_cpu"; then
7252	# On IA64, the linker does run time linking by default, so we don't
7253	# have to do anything special.
7254	aix_use_runtimelinking=no
7255	exp_sym_flag='-Bexport'
7256	no_entry_flag=
7257      else
7258	# If we're using GNU nm, then we don't want the "-C" option.
7259	# -C means demangle to GNU nm, but means don't demangle to AIX nm.
7260	# Without the "-l" option, or with the "-B" option, AIX nm treats
7261	# weak defined symbols like other global defined symbols, whereas
7262	# GNU nm marks them as "W".
7263	# While the 'weak' keyword is ignored in the Export File, we need
7264	# it in the Import File for the 'aix-soname' feature, so we have
7265	# to replace the "-B" option with "-P" for AIX nm.
7266	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
7267	  _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'
7268	else
7269	  _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 == "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'
7270	fi
7271	aix_use_runtimelinking=no
7272
7273	# Test if we are trying to use run time linking or normal
7274	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
7275	# have runtime linking enabled, and use it for executables.
7276	# For shared libraries, we enable/disable runtime linking
7277	# depending on the kind of the shared library created -
7278	# when "with_aix_soname,aix_use_runtimelinking" is:
7279	# "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
7280	# "aix,yes"  lib.so          shared, rtl:yes, for executables
7281	#            lib.a           static archive
7282	# "both,no"  lib.so.V(shr.o) shared, rtl:yes
7283	#            lib.a(lib.so.V) shared, rtl:no,  for executables
7284	# "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
7285	#            lib.a(lib.so.V) shared, rtl:no
7286	# "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
7287	#            lib.a           static archive
7288	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
7289	  for ld_flag in $LDFLAGS; do
7290	  if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
7291	    aix_use_runtimelinking=yes
7292	    break
7293	  fi
7294	  done
7295	  if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
7296	    # With aix-soname=svr4, we create the lib.so.V shared archives only,
7297	    # so we don't have lib.a shared libs to link our executables.
7298	    # We have to force runtime linking in this case.
7299	    aix_use_runtimelinking=yes
7300	    LDFLAGS="$LDFLAGS -Wl,-brtl"
7301	  fi
7302	  ;;
7303	esac
7304
7305	exp_sym_flag='-bexport'
7306	no_entry_flag='-bnoentry'
7307      fi
7308
7309      # When large executables or shared objects are built, AIX ld can
7310      # have problems creating the table of contents.  If linking a library
7311      # or program results in "error TOC overflow" add -mminimal-toc to
7312      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
7313      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7314
7315      _LT_TAGVAR(archive_cmds, $1)=''
7316      _LT_TAGVAR(hardcode_direct, $1)=yes
7317      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7318      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7319      _LT_TAGVAR(link_all_deplibs, $1)=yes
7320      _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
7321      case $with_aix_soname,$aix_use_runtimelinking in
7322      aix,*) ;; # traditional, no import file
7323      svr4,* | *,yes) # use import file
7324	# The Import File defines what to hardcode.
7325	_LT_TAGVAR(hardcode_direct, $1)=no
7326	_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7327	;;
7328      esac
7329
7330      if test yes = "$GCC"; then
7331	case $host_os in aix4.[[012]]|aix4.[[012]].*)
7332	# We only want to do this on AIX 4.2 and lower, the check
7333	# below for broken collect2 doesn't work under 4.3+
7334	  collect2name=`$CC -print-prog-name=collect2`
7335	  if test -f "$collect2name" &&
7336	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
7337	  then
7338	  # We have reworked collect2
7339	  :
7340	  else
7341	  # We have old collect2
7342	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
7343	  # It fails to find uninstalled libraries when the uninstalled
7344	  # path is not listed in the libpath.  Setting hardcode_minus_L
7345	  # to unsupported forces relinking
7346	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
7347	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7348	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
7349	  fi
7350	  ;;
7351	esac
7352	shared_flag='-shared'
7353	if test yes = "$aix_use_runtimelinking"; then
7354	  shared_flag="$shared_flag "'$wl-G'
7355	fi
7356	# Need to ensure runtime linking is disabled for the traditional
7357	# shared library, or the linker may eventually find shared libraries
7358	# /with/ Import File - we do not want to mix them.
7359	shared_flag_aix='-shared'
7360	shared_flag_svr4='-shared $wl-G'
7361      else
7362	# not using gcc
7363	if test ia64 = "$host_cpu"; then
7364	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
7365	# chokes on -Wl,-G. The following line is correct:
7366	  shared_flag='-G'
7367	else
7368	  if test yes = "$aix_use_runtimelinking"; then
7369	    shared_flag='$wl-G'
7370	  else
7371	    shared_flag='$wl-bM:SRE'
7372	  fi
7373	  shared_flag_aix='$wl-bM:SRE'
7374	  shared_flag_svr4='$wl-G'
7375	fi
7376      fi
7377
7378      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
7379      # It seems that -bexpall does not export symbols beginning with
7380      # underscore (_), so it is better to generate a list of symbols to export.
7381      _LT_TAGVAR(always_export_symbols, $1)=yes
7382      if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
7383	# Warning - without using the other runtime loading flags (-brtl),
7384	# -berok will link without error, but may produce a broken library.
7385	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
7386        # Determine the default libpath from the value encoded in an
7387        # empty executable.
7388        _LT_SYS_MODULE_PATH_AIX([$1])
7389        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
7390        _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
7391      else
7392	if test ia64 = "$host_cpu"; then
7393	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
7394	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
7395	  _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"
7396	else
7397	 # Determine the default libpath from the value encoded in an
7398	 # empty executable.
7399	 _LT_SYS_MODULE_PATH_AIX([$1])
7400	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
7401	  # Warning - without using the other run time loading flags,
7402	  # -berok will link without error, but may produce a broken library.
7403	  _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
7404	  _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
7405	  if test yes = "$with_gnu_ld"; then
7406	    # We only use this code for GNU lds that support --whole-archive.
7407	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
7408	  else
7409	    # Exported symbols can be pulled into shared objects from archives
7410	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
7411	  fi
7412	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7413	  _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
7414	  # -brtl affects multiple linker settings, -berok does not and is overridden later
7415	  compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
7416	  if test svr4 != "$with_aix_soname"; then
7417	    # This is similar to how AIX traditionally builds its shared libraries.
7418	    _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'
7419	  fi
7420	  if test aix != "$with_aix_soname"; then
7421	    _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'
7422	  else
7423	    # used by -dlpreopen to get the symbols
7424	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
7425	  fi
7426	  _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
7427	fi
7428      fi
7429      ;;
7430
7431    amigaos*)
7432      case $host_cpu in
7433      powerpc)
7434            # see comment about AmigaOS4 .so support
7435            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
7436            _LT_TAGVAR(archive_expsym_cmds, $1)=''
7437        ;;
7438      m68k)
7439            _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)'
7440            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7441            _LT_TAGVAR(hardcode_minus_L, $1)=yes
7442        ;;
7443      esac
7444      ;;
7445
7446    bsdi[[45]]*)
7447      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
7448      ;;
7449
7450    cygwin* | mingw* | pw32* | cegcc*)
7451      # When not using gcc, we currently assume that we are using
7452      # Microsoft Visual C++.
7453      # hardcode_libdir_flag_spec is actually meaningless, as there is
7454      # no search path for DLLs.
7455      case $cc_basename in
7456      cl*)
7457	# Native MSVC
7458	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
7459	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7460	_LT_TAGVAR(always_export_symbols, $1)=yes
7461	_LT_TAGVAR(file_list_spec, $1)='@'
7462	# Tell ltmain to make .lib files, not .a files.
7463	libext=lib
7464	# Tell ltmain to make .dll files, not .so files.
7465	shrext_cmds=.dll
7466	# FIXME: Setting linknames here is a bad hack.
7467	_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
7468	_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
7469            cp "$export_symbols" "$output_objdir/$soname.def";
7470            echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
7471          else
7472            $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
7473          fi~
7474          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
7475          linknames='
7476	# The linker will not automatically build a static lib if we build a DLL.
7477	# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
7478	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7479	_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
7480	_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'
7481	# Don't use ranlib
7482	_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
7483	_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
7484          lt_tool_outputfile="@TOOL_OUTPUT@"~
7485          case $lt_outputfile in
7486            *.exe|*.EXE) ;;
7487            *)
7488              lt_outputfile=$lt_outputfile.exe
7489              lt_tool_outputfile=$lt_tool_outputfile.exe
7490              ;;
7491          esac~
7492          if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
7493            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
7494            $RM "$lt_outputfile.manifest";
7495          fi'
7496	;;
7497      *)
7498	# Assume MSVC wrapper
7499	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
7500	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7501	# Tell ltmain to make .lib files, not .a files.
7502	libext=lib
7503	# Tell ltmain to make .dll files, not .so files.
7504	shrext_cmds=.dll
7505	# FIXME: Setting linknames here is a bad hack.
7506	_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
7507	# The linker will automatically build a .lib file if we build a DLL.
7508	_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
7509	# FIXME: Should let the user specify the lib program.
7510	_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
7511	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7512	;;
7513      esac
7514      ;;
7515
7516    darwin* | rhapsody*)
7517      _LT_DARWIN_LINKER_FEATURES($1)
7518      ;;
7519
7520    dgux*)
7521      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7522      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7523      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7524      ;;
7525
7526    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
7527    # support.  Future versions do this automatically, but an explicit c++rt0.o
7528    # does not break anything, and helps significantly (at the cost of a little
7529    # extra space).
7530    freebsd2.2*)
7531      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
7532      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7533      _LT_TAGVAR(hardcode_direct, $1)=yes
7534      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7535      ;;
7536
7537    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
7538    freebsd2.*)
7539      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7540      _LT_TAGVAR(hardcode_direct, $1)=yes
7541      _LT_TAGVAR(hardcode_minus_L, $1)=yes
7542      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7543      ;;
7544
7545    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
7546    freebsd* | dragonfly*)
7547      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7548      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7549      _LT_TAGVAR(hardcode_direct, $1)=yes
7550      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7551      ;;
7552
7553    hpux9*)
7554      if test yes = "$GCC"; then
7555	_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'
7556      else
7557	_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'
7558      fi
7559      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
7560      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7561      _LT_TAGVAR(hardcode_direct, $1)=yes
7562
7563      # hardcode_minus_L: Not really in the search PATH,
7564      # but as the default location of the library.
7565      _LT_TAGVAR(hardcode_minus_L, $1)=yes
7566      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
7567      ;;
7568
7569    hpux10*)
7570      if test yes,no = "$GCC,$with_gnu_ld"; then
7571	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7572      else
7573	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
7574      fi
7575      if test no = "$with_gnu_ld"; then
7576	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
7577	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
7578	_LT_TAGVAR(hardcode_direct, $1)=yes
7579	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7580	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
7581	# hardcode_minus_L: Not really in the search PATH,
7582	# but as the default location of the library.
7583	_LT_TAGVAR(hardcode_minus_L, $1)=yes
7584      fi
7585      ;;
7586
7587    hpux11*)
7588      if test yes,no = "$GCC,$with_gnu_ld"; then
7589	case $host_cpu in
7590	hppa*64*)
7591	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
7592	  ;;
7593	ia64*)
7594	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
7595	  ;;
7596	*)
7597	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7598	  ;;
7599	esac
7600      else
7601	case $host_cpu in
7602	hppa*64*)
7603	  _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
7604	  ;;
7605	ia64*)
7606	  _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
7607	  ;;
7608	*)
7609	m4_if($1, [], [
7610	  # Older versions of the 11.00 compiler do not understand -b yet
7611	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
7612	  _LT_LINKER_OPTION([if $CC understands -b],
7613	    _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
7614	    [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
7615	    [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
7616	  [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
7617	  ;;
7618	esac
7619      fi
7620      if test no = "$with_gnu_ld"; then
7621	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
7622	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
7623
7624	case $host_cpu in
7625	hppa*64*|ia64*)
7626	  _LT_TAGVAR(hardcode_direct, $1)=no
7627	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7628	  ;;
7629	*)
7630	  _LT_TAGVAR(hardcode_direct, $1)=yes
7631	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7632	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
7633
7634	  # hardcode_minus_L: Not really in the search PATH,
7635	  # but as the default location of the library.
7636	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
7637	  ;;
7638	esac
7639      fi
7640      ;;
7641
7642    irix5* | irix6* | nonstopux*)
7643      if test yes = "$GCC"; then
7644	_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'
7645	# Try to use the -exported_symbol ld option, if it does not
7646	# work, assume that -exports_file does not work either and
7647	# implicitly export all symbols.
7648	# This should be the same for all languages, so no per-tag cache variable.
7649	AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
7650	  [lt_cv_irix_exported_symbol],
7651	  [save_LDFLAGS=$LDFLAGS
7652	   LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
7653	   AC_LINK_IFELSE(
7654	     [AC_LANG_SOURCE(
7655	        [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
7656			      [C++], [[int foo (void) { return 0; }]],
7657			      [Fortran 77], [[
7658      subroutine foo
7659      end]],
7660			      [Fortran], [[
7661      subroutine foo
7662      end]])])],
7663	      [lt_cv_irix_exported_symbol=yes],
7664	      [lt_cv_irix_exported_symbol=no])
7665           LDFLAGS=$save_LDFLAGS])
7666	if test yes = "$lt_cv_irix_exported_symbol"; then
7667          _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'
7668	fi
7669	_LT_TAGVAR(link_all_deplibs, $1)=no
7670      else
7671	_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'
7672	_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'
7673      fi
7674      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
7675      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7676      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7677      _LT_TAGVAR(inherit_rpath, $1)=yes
7678      _LT_TAGVAR(link_all_deplibs, $1)=yes
7679      ;;
7680
7681    linux*)
7682      case $cc_basename in
7683      tcc*)
7684	# Fabrice Bellard et al's Tiny C Compiler
7685	_LT_TAGVAR(ld_shlibs, $1)=yes
7686	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7687	;;
7688      esac
7689      ;;
7690
7691    netbsd* | netbsdelf*-gnu)
7692      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7693	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
7694      else
7695	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
7696      fi
7697      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7698      _LT_TAGVAR(hardcode_direct, $1)=yes
7699      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7700      ;;
7701
7702    newsos6)
7703      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7704      _LT_TAGVAR(hardcode_direct, $1)=yes
7705      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7706      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7707      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7708      ;;
7709
7710    *nto* | *qnx*)
7711      ;;
7712
7713    openbsd* | bitrig*)
7714      if test -f /usr/libexec/ld.so; then
7715	_LT_TAGVAR(hardcode_direct, $1)=yes
7716	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7717	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7718	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
7719	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7720	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
7721	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7722	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
7723	else
7724	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7725	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7726	fi
7727      else
7728	_LT_TAGVAR(ld_shlibs, $1)=no
7729      fi
7730      ;;
7731
7732    os2*)
7733      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7734      _LT_TAGVAR(hardcode_minus_L, $1)=yes
7735      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7736      shrext_cmds=.dll
7737      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
7738	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
7739	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
7740	$ECHO EXPORTS >> $output_objdir/$libname.def~
7741	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
7742	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
7743	emximp -o $lib $output_objdir/$libname.def'
7744      _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
7745	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
7746	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
7747	$ECHO EXPORTS >> $output_objdir/$libname.def~
7748	prefix_cmds="$SED"~
7749	if test EXPORTS = "`$SED 1q $export_symbols`"; then
7750	  prefix_cmds="$prefix_cmds -e 1d";
7751	fi~
7752	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
7753	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
7754	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
7755	emximp -o $lib $output_objdir/$libname.def'
7756      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
7757      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7758      ;;
7759
7760    osf3*)
7761      if test yes = "$GCC"; then
7762	_LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
7763	_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'
7764      else
7765	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7766	_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'
7767      fi
7768      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
7769      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7770      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7771      ;;
7772
7773    osf4* | osf5*)	# as osf3* with the addition of -msym flag
7774      if test yes = "$GCC"; then
7775	_LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
7776	_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'
7777	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7778      else
7779	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7780	_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'
7781	_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~
7782          $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'
7783
7784	# Both c and cxx compiler support -rpath directly
7785	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7786      fi
7787      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
7788      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7789      ;;
7790
7791    solaris*)
7792      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
7793      if test yes = "$GCC"; then
7794	wlarc='$wl'
7795	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
7796	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7797          $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'
7798      else
7799	case `$CC -V 2>&1` in
7800	*"Compilers 5.0"*)
7801	  wlarc=''
7802	  _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
7803	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7804            $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
7805	  ;;
7806	*)
7807	  wlarc='$wl'
7808	  _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
7809	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7810            $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
7811	  ;;
7812	esac
7813      fi
7814      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7815      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7816      case $host_os in
7817      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7818      *)
7819	# The compiler driver will combine and reorder linker options,
7820	# but understands '-z linker_flag'.  GCC discards it without '$wl',
7821	# but is careful enough not to reorder.
7822	# Supported since Solaris 2.6 (maybe 2.5.1?)
7823	if test yes = "$GCC"; then
7824	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
7825	else
7826	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7827	fi
7828	;;
7829      esac
7830      _LT_TAGVAR(link_all_deplibs, $1)=yes
7831      ;;
7832
7833    sunos4*)
7834      if test sequent = "$host_vendor"; then
7835	# Use $CC to link under sequent, because it throws in some extra .o
7836	# files that make .init and .fini sections work.
7837	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
7838      else
7839	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
7840      fi
7841      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7842      _LT_TAGVAR(hardcode_direct, $1)=yes
7843      _LT_TAGVAR(hardcode_minus_L, $1)=yes
7844      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7845      ;;
7846
7847    sysv4)
7848      case $host_vendor in
7849	sni)
7850	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7851	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
7852	;;
7853	siemens)
7854	  ## LD is ld it makes a PLAMLIB
7855	  ## CC just makes a GrossModule.
7856	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
7857	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
7858	  _LT_TAGVAR(hardcode_direct, $1)=no
7859        ;;
7860	motorola)
7861	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7862	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
7863	;;
7864      esac
7865      runpath_var='LD_RUN_PATH'
7866      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7867      ;;
7868
7869    sysv4.3*)
7870      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7871      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7872      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
7873      ;;
7874
7875    sysv4*MP*)
7876      if test -d /usr/nec; then
7877	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7878	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7879	runpath_var=LD_RUN_PATH
7880	hardcode_runpath_var=yes
7881	_LT_TAGVAR(ld_shlibs, $1)=yes
7882      fi
7883      ;;
7884
7885    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7886      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
7887      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7888      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7889      runpath_var='LD_RUN_PATH'
7890
7891      if test yes = "$GCC"; then
7892	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7893	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7894      else
7895	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7896	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7897      fi
7898      ;;
7899
7900    sysv5* | sco3.2v5* | sco5v6*)
7901      # Note: We CANNOT use -z defs as we might desire, because we do not
7902      # link with -lc, and that would cause any symbols used from libc to
7903      # always be unresolved, which means just about no library would
7904      # ever link correctly.  If we're not using GNU ld we use -z text
7905      # though, which does catch some bad symbols but isn't as heavy-handed
7906      # as -z defs.
7907      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
7908      _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
7909      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7910      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7911      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
7912      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7913      _LT_TAGVAR(link_all_deplibs, $1)=yes
7914      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
7915      runpath_var='LD_RUN_PATH'
7916
7917      if test yes = "$GCC"; then
7918	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7919	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7920      else
7921	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7922	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7923      fi
7924      ;;
7925
7926    uts4*)
7927      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7928      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7929      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7930      ;;
7931
7932    *)
7933      _LT_TAGVAR(ld_shlibs, $1)=no
7934      ;;
7935    esac
7936
7937    if test sni = "$host_vendor"; then
7938      case $host in
7939      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
7940	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
7941	;;
7942      esac
7943    fi
7944  fi
7945])
7946AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7947test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
7948
7949_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
7950
7951_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
7952_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
7953_LT_DECL([], [extract_expsyms_cmds], [2],
7954    [The commands to extract the exported symbol list from a shared archive])
7955
7956#
7957# Do we need to explicitly link libc?
7958#
7959case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
7960x|xyes)
7961  # Assume -lc should be added
7962  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7963
7964  if test yes,yes = "$GCC,$enable_shared"; then
7965    case $_LT_TAGVAR(archive_cmds, $1) in
7966    *'~'*)
7967      # FIXME: we may have to deal with multi-command sequences.
7968      ;;
7969    '$CC '*)
7970      # Test whether the compiler implicitly links with -lc since on some
7971      # systems, -lgcc has to come before -lc. If gcc already passes -lc
7972      # to ld, don't add -lc before -lgcc.
7973      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
7974	[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
7975	[$RM conftest*
7976	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
7977
7978	if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
7979	  soname=conftest
7980	  lib=conftest
7981	  libobjs=conftest.$ac_objext
7982	  deplibs=
7983	  wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
7984	  pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
7985	  compiler_flags=-v
7986	  linker_flags=-v
7987	  verstring=
7988	  output_objdir=.
7989	  libname=conftest
7990	  lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
7991	  _LT_TAGVAR(allow_undefined_flag, $1)=
7992	  if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
7993	  then
7994	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7995	  else
7996	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7997	  fi
7998	  _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
7999	else
8000	  cat conftest.err 1>&5
8001	fi
8002	$RM conftest*
8003	])
8004      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
8005      ;;
8006    esac
8007  fi
8008  ;;
8009esac
8010
8011_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
8012    [Whether or not to add -lc for building shared libraries])
8013_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
8014    [enable_shared_with_static_runtimes], [0],
8015    [Whether or not to disallow shared libs when runtime libs are static])
8016_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
8017    [Compiler flag to allow reflexive dlopens])
8018_LT_TAGDECL([], [whole_archive_flag_spec], [1],
8019    [Compiler flag to generate shared objects directly from archives])
8020_LT_TAGDECL([], [compiler_needs_object], [1],
8021    [Whether the compiler copes with passing no objects directly])
8022_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
8023    [Create an old-style archive from a shared archive])
8024_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
8025    [Create a temporary old-style archive to link instead of a shared archive])
8026_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
8027_LT_TAGDECL([], [archive_expsym_cmds], [2])
8028_LT_TAGDECL([], [module_cmds], [2],
8029    [Commands used to build a loadable module if different from building
8030    a shared archive.])
8031_LT_TAGDECL([], [module_expsym_cmds], [2])
8032_LT_TAGDECL([], [with_gnu_ld], [1],
8033    [Whether we are building with GNU ld or not])
8034_LT_TAGDECL([], [allow_undefined_flag], [1],
8035    [Flag that allows shared libraries with undefined symbols to be built])
8036_LT_TAGDECL([], [no_undefined_flag], [1],
8037    [Flag that enforces no undefined symbols])
8038_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
8039    [Flag to hardcode $libdir into a binary during linking.
8040    This must work even if $libdir does not exist])
8041_LT_TAGDECL([], [hardcode_libdir_separator], [1],
8042    [Whether we need a single "-rpath" flag with a separated argument])
8043_LT_TAGDECL([], [hardcode_direct], [0],
8044    [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
8045    DIR into the resulting binary])
8046_LT_TAGDECL([], [hardcode_direct_absolute], [0],
8047    [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
8048    DIR into the resulting binary and the resulting library dependency is
8049    "absolute", i.e impossible to change by setting $shlibpath_var if the
8050    library is relocated])
8051_LT_TAGDECL([], [hardcode_minus_L], [0],
8052    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
8053    into the resulting binary])
8054_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
8055    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
8056    into the resulting binary])
8057_LT_TAGDECL([], [hardcode_automatic], [0],
8058    [Set to "yes" if building a shared library automatically hardcodes DIR
8059    into the library and all subsequent libraries and executables linked
8060    against it])
8061_LT_TAGDECL([], [inherit_rpath], [0],
8062    [Set to yes if linker adds runtime paths of dependent libraries
8063    to runtime path list])
8064_LT_TAGDECL([], [link_all_deplibs], [0],
8065    [Whether libtool must link a program against all its dependency libraries])
8066_LT_TAGDECL([], [always_export_symbols], [0],
8067    [Set to "yes" if exported symbols are required])
8068_LT_TAGDECL([], [export_symbols_cmds], [2],
8069    [The commands to list exported symbols])
8070_LT_TAGDECL([], [exclude_expsyms], [1],
8071    [Symbols that should not be listed in the preloaded symbols])
8072_LT_TAGDECL([], [include_expsyms], [1],
8073    [Symbols that must always be exported])
8074_LT_TAGDECL([], [prelink_cmds], [2],
8075    [Commands necessary for linking programs (against libraries) with templates])
8076_LT_TAGDECL([], [postlink_cmds], [2],
8077    [Commands necessary for finishing linking programs])
8078_LT_TAGDECL([], [file_list_spec], [1],
8079    [Specify filename containing input files])
8080dnl FIXME: Not yet implemented
8081dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
8082dnl    [Compiler flag to generate thread safe objects])
8083])# _LT_LINKER_SHLIBS
8084
8085
8086# _LT_LANG_C_CONFIG([TAG])
8087# ------------------------
8088# Ensure that the configuration variables for a C compiler are suitably
8089# defined.  These variables are subsequently used by _LT_CONFIG to write
8090# the compiler configuration to 'libtool'.
8091m4_defun([_LT_LANG_C_CONFIG],
8092[m4_require([_LT_DECL_EGREP])dnl
8093lt_save_CC=$CC
8094AC_LANG_PUSH(C)
8095
8096# Source file extension for C test sources.
8097ac_ext=c
8098
8099# Object file extension for compiled C test sources.
8100objext=o
8101_LT_TAGVAR(objext, $1)=$objext
8102
8103# Code to be used in simple compile tests
8104lt_simple_compile_test_code="int some_variable = 0;"
8105
8106# Code to be used in simple link tests
8107lt_simple_link_test_code='int main(){return(0);}'
8108
8109_LT_TAG_COMPILER
8110# Save the default compiler, since it gets overwritten when the other
8111# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
8112compiler_DEFAULT=$CC
8113
8114# save warnings/boilerplate of simple test code
8115_LT_COMPILER_BOILERPLATE
8116_LT_LINKER_BOILERPLATE
8117
8118if test -n "$compiler"; then
8119  _LT_COMPILER_NO_RTTI($1)
8120  _LT_COMPILER_PIC($1)
8121  _LT_COMPILER_C_O($1)
8122  _LT_COMPILER_FILE_LOCKS($1)
8123  _LT_LINKER_SHLIBS($1)
8124  _LT_SYS_DYNAMIC_LINKER($1)
8125  _LT_LINKER_HARDCODE_LIBPATH($1)
8126  LT_SYS_DLOPEN_SELF
8127  _LT_CMD_STRIPLIB
8128
8129  # Report what library types will actually be built
8130  AC_MSG_CHECKING([if libtool supports shared libraries])
8131  AC_MSG_RESULT([$can_build_shared])
8132
8133  AC_MSG_CHECKING([whether to build shared libraries])
8134  test no = "$can_build_shared" && enable_shared=no
8135
8136  # On AIX, shared libraries and static libraries use the same namespace, and
8137  # are all built from PIC.
8138  case $host_os in
8139  aix3*)
8140    test yes = "$enable_shared" && enable_static=no
8141    if test -n "$RANLIB"; then
8142      archive_cmds="$archive_cmds~\$RANLIB \$lib"
8143      postinstall_cmds='$RANLIB $lib'
8144    fi
8145    ;;
8146
8147  aix[[4-9]]*)
8148    if test ia64 != "$host_cpu"; then
8149      case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
8150      yes,aix,yes) ;;			# shared object as lib.so file only
8151      yes,svr4,*) ;;			# shared object as lib.so archive member only
8152      yes,*) enable_static=no ;;	# shared object in lib.a archive as well
8153      esac
8154    fi
8155    ;;
8156  esac
8157  AC_MSG_RESULT([$enable_shared])
8158
8159  AC_MSG_CHECKING([whether to build static libraries])
8160  # Make sure either enable_shared or enable_static is yes.
8161  test yes = "$enable_shared" || enable_static=yes
8162  AC_MSG_RESULT([$enable_static])
8163
8164  _LT_CONFIG($1)
8165fi
8166AC_LANG_POP
8167CC=$lt_save_CC
8168])# _LT_LANG_C_CONFIG
8169
8170
8171# _LT_LANG_CXX_CONFIG([TAG])
8172# --------------------------
8173# Ensure that the configuration variables for a C++ compiler are suitably
8174# defined.  These variables are subsequently used by _LT_CONFIG to write
8175# the compiler configuration to 'libtool'.
8176m4_defun([_LT_LANG_CXX_CONFIG],
8177[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
8178m4_require([_LT_DECL_EGREP])dnl
8179m4_require([_LT_PATH_MANIFEST_TOOL])dnl
8180if test -n "$CXX" && ( test no != "$CXX" &&
8181    ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
8182    (test g++ != "$CXX"))); then
8183  AC_PROG_CXXCPP
8184else
8185  _lt_caught_CXX_error=yes
8186fi
8187
8188AC_LANG_PUSH(C++)
8189_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8190_LT_TAGVAR(allow_undefined_flag, $1)=
8191_LT_TAGVAR(always_export_symbols, $1)=no
8192_LT_TAGVAR(archive_expsym_cmds, $1)=
8193_LT_TAGVAR(compiler_needs_object, $1)=no
8194_LT_TAGVAR(export_dynamic_flag_spec, $1)=
8195_LT_TAGVAR(hardcode_direct, $1)=no
8196_LT_TAGVAR(hardcode_direct_absolute, $1)=no
8197_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8198_LT_TAGVAR(hardcode_libdir_separator, $1)=
8199_LT_TAGVAR(hardcode_minus_L, $1)=no
8200_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
8201_LT_TAGVAR(hardcode_automatic, $1)=no
8202_LT_TAGVAR(inherit_rpath, $1)=no
8203_LT_TAGVAR(module_cmds, $1)=
8204_LT_TAGVAR(module_expsym_cmds, $1)=
8205_LT_TAGVAR(link_all_deplibs, $1)=unknown
8206_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8207_LT_TAGVAR(reload_flag, $1)=$reload_flag
8208_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8209_LT_TAGVAR(no_undefined_flag, $1)=
8210_LT_TAGVAR(whole_archive_flag_spec, $1)=
8211_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8212
8213# Source file extension for C++ test sources.
8214ac_ext=cpp
8215
8216# Object file extension for compiled C++ test sources.
8217objext=o
8218_LT_TAGVAR(objext, $1)=$objext
8219
8220# No sense in running all these tests if we already determined that
8221# the CXX compiler isn't working.  Some variables (like enable_shared)
8222# are currently assumed to apply to all compilers on this platform,
8223# and will be corrupted by setting them based on a non-working compiler.
8224if test yes != "$_lt_caught_CXX_error"; then
8225  # Code to be used in simple compile tests
8226  lt_simple_compile_test_code="int some_variable = 0;"
8227
8228  # Code to be used in simple link tests
8229  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
8230
8231  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8232  _LT_TAG_COMPILER
8233
8234  # save warnings/boilerplate of simple test code
8235  _LT_COMPILER_BOILERPLATE
8236  _LT_LINKER_BOILERPLATE
8237
8238  # Allow CC to be a program name with arguments.
8239  lt_save_CC=$CC
8240  lt_save_CFLAGS=$CFLAGS
8241  lt_save_LD=$LD
8242  lt_save_GCC=$GCC
8243  GCC=$GXX
8244  lt_save_with_gnu_ld=$with_gnu_ld
8245  lt_save_path_LD=$lt_cv_path_LD
8246  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
8247    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
8248  else
8249    $as_unset lt_cv_prog_gnu_ld
8250  fi
8251  if test -n "${lt_cv_path_LDCXX+set}"; then
8252    lt_cv_path_LD=$lt_cv_path_LDCXX
8253  else
8254    $as_unset lt_cv_path_LD
8255  fi
8256  test -z "${LDCXX+set}" || LD=$LDCXX
8257  CC=${CXX-"c++"}
8258  CFLAGS=$CXXFLAGS
8259  compiler=$CC
8260  _LT_TAGVAR(compiler, $1)=$CC
8261  _LT_CC_BASENAME([$compiler])
8262
8263  if test -n "$compiler"; then
8264    # We don't want -fno-exception when compiling C++ code, so set the
8265    # no_builtin_flag separately
8266    if test yes = "$GXX"; then
8267      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
8268    else
8269      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
8270    fi
8271
8272    if test yes = "$GXX"; then
8273      # Set up default GNU C++ configuration
8274
8275      LT_PATH_LD
8276
8277      # Check if GNU C++ uses GNU ld as the underlying linker, since the
8278      # archiving commands below assume that GNU ld is being used.
8279      if test yes = "$with_gnu_ld"; then
8280        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
8281        _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'
8282
8283        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
8284        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
8285
8286        # If archive_cmds runs LD, not CC, wlarc should be empty
8287        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
8288        #     investigate it a little bit more. (MM)
8289        wlarc='$wl'
8290
8291        # ancient GNU ld didn't support --whole-archive et. al.
8292        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
8293	  $GREP 'no-whole-archive' > /dev/null; then
8294          _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
8295        else
8296          _LT_TAGVAR(whole_archive_flag_spec, $1)=
8297        fi
8298      else
8299        with_gnu_ld=no
8300        wlarc=
8301
8302        # A generic and very simple default shared library creation
8303        # command for GNU C++ for the case where it uses the native
8304        # linker, instead of GNU ld.  If possible, this setting should
8305        # overridden to take advantage of the native linker features on
8306        # the platform it is being used on.
8307        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
8308      fi
8309
8310      # Commands to make compiler produce verbose output that lists
8311      # what "hidden" libraries, object files and flags are used when
8312      # linking a shared library.
8313      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
8314
8315    else
8316      GXX=no
8317      with_gnu_ld=no
8318      wlarc=
8319    fi
8320
8321    # PORTME: fill in a description of your system's C++ link characteristics
8322    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
8323    _LT_TAGVAR(ld_shlibs, $1)=yes
8324    case $host_os in
8325      aix3*)
8326        # FIXME: insert proper C++ library support
8327        _LT_TAGVAR(ld_shlibs, $1)=no
8328        ;;
8329      aix[[4-9]]*)
8330        if test ia64 = "$host_cpu"; then
8331          # On IA64, the linker does run time linking by default, so we don't
8332          # have to do anything special.
8333          aix_use_runtimelinking=no
8334          exp_sym_flag='-Bexport'
8335          no_entry_flag=
8336        else
8337          aix_use_runtimelinking=no
8338
8339          # Test if we are trying to use run time linking or normal
8340          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
8341          # have runtime linking enabled, and use it for executables.
8342          # For shared libraries, we enable/disable runtime linking
8343          # depending on the kind of the shared library created -
8344          # when "with_aix_soname,aix_use_runtimelinking" is:
8345          # "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
8346          # "aix,yes"  lib.so          shared, rtl:yes, for executables
8347          #            lib.a           static archive
8348          # "both,no"  lib.so.V(shr.o) shared, rtl:yes
8349          #            lib.a(lib.so.V) shared, rtl:no,  for executables
8350          # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
8351          #            lib.a(lib.so.V) shared, rtl:no
8352          # "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
8353          #            lib.a           static archive
8354          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
8355	    for ld_flag in $LDFLAGS; do
8356	      case $ld_flag in
8357	      *-brtl*)
8358	        aix_use_runtimelinking=yes
8359	        break
8360	        ;;
8361	      esac
8362	    done
8363	    if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
8364	      # With aix-soname=svr4, we create the lib.so.V shared archives only,
8365	      # so we don't have lib.a shared libs to link our executables.
8366	      # We have to force runtime linking in this case.
8367	      aix_use_runtimelinking=yes
8368	      LDFLAGS="$LDFLAGS -Wl,-brtl"
8369	    fi
8370	    ;;
8371          esac
8372
8373          exp_sym_flag='-bexport'
8374          no_entry_flag='-bnoentry'
8375        fi
8376
8377        # When large executables or shared objects are built, AIX ld can
8378        # have problems creating the table of contents.  If linking a library
8379        # or program results in "error TOC overflow" add -mminimal-toc to
8380        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
8381        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
8382
8383        _LT_TAGVAR(archive_cmds, $1)=''
8384        _LT_TAGVAR(hardcode_direct, $1)=yes
8385        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
8386        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
8387        _LT_TAGVAR(link_all_deplibs, $1)=yes
8388        _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
8389        case $with_aix_soname,$aix_use_runtimelinking in
8390        aix,*) ;;	# no import file
8391        svr4,* | *,yes) # use import file
8392          # The Import File defines what to hardcode.
8393          _LT_TAGVAR(hardcode_direct, $1)=no
8394          _LT_TAGVAR(hardcode_direct_absolute, $1)=no
8395          ;;
8396        esac
8397
8398        if test yes = "$GXX"; then
8399          case $host_os in aix4.[[012]]|aix4.[[012]].*)
8400          # We only want to do this on AIX 4.2 and lower, the check
8401          # below for broken collect2 doesn't work under 4.3+
8402	  collect2name=`$CC -print-prog-name=collect2`
8403	  if test -f "$collect2name" &&
8404	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
8405	  then
8406	    # We have reworked collect2
8407	    :
8408	  else
8409	    # We have old collect2
8410	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
8411	    # It fails to find uninstalled libraries when the uninstalled
8412	    # path is not listed in the libpath.  Setting hardcode_minus_L
8413	    # to unsupported forces relinking
8414	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
8415	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8416	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
8417	  fi
8418          esac
8419          shared_flag='-shared'
8420	  if test yes = "$aix_use_runtimelinking"; then
8421	    shared_flag=$shared_flag' $wl-G'
8422	  fi
8423	  # Need to ensure runtime linking is disabled for the traditional
8424	  # shared library, or the linker may eventually find shared libraries
8425	  # /with/ Import File - we do not want to mix them.
8426	  shared_flag_aix='-shared'
8427	  shared_flag_svr4='-shared $wl-G'
8428        else
8429          # not using gcc
8430          if test ia64 = "$host_cpu"; then
8431	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
8432	  # chokes on -Wl,-G. The following line is correct:
8433	  shared_flag='-G'
8434          else
8435	    if test yes = "$aix_use_runtimelinking"; then
8436	      shared_flag='$wl-G'
8437	    else
8438	      shared_flag='$wl-bM:SRE'
8439	    fi
8440	    shared_flag_aix='$wl-bM:SRE'
8441	    shared_flag_svr4='$wl-G'
8442          fi
8443        fi
8444
8445        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
8446        # It seems that -bexpall does not export symbols beginning with
8447        # underscore (_), so it is better to generate a list of symbols to
8448	# export.
8449        _LT_TAGVAR(always_export_symbols, $1)=yes
8450	if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
8451          # Warning - without using the other runtime loading flags (-brtl),
8452          # -berok will link without error, but may produce a broken library.
8453          # The "-G" linker flag allows undefined symbols.
8454          _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
8455          # Determine the default libpath from the value encoded in an empty
8456          # executable.
8457          _LT_SYS_MODULE_PATH_AIX([$1])
8458          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
8459
8460          _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
8461        else
8462          if test ia64 = "$host_cpu"; then
8463	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
8464	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
8465	    _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"
8466          else
8467	    # Determine the default libpath from the value encoded in an
8468	    # empty executable.
8469	    _LT_SYS_MODULE_PATH_AIX([$1])
8470	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
8471	    # Warning - without using the other run time loading flags,
8472	    # -berok will link without error, but may produce a broken library.
8473	    _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
8474	    _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
8475	    if test yes = "$with_gnu_ld"; then
8476	      # We only use this code for GNU lds that support --whole-archive.
8477	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
8478	    else
8479	      # Exported symbols can be pulled into shared objects from archives
8480	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
8481	    fi
8482	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
8483	    _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
8484	    # -brtl affects multiple linker settings, -berok does not and is overridden later
8485	    compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
8486	    if test svr4 != "$with_aix_soname"; then
8487	      # This is similar to how AIX traditionally builds its shared
8488	      # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
8489	      _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'
8490	    fi
8491	    if test aix != "$with_aix_soname"; then
8492	      _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'
8493	    else
8494	      # used by -dlpreopen to get the symbols
8495	      _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
8496	    fi
8497	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
8498          fi
8499        fi
8500        ;;
8501
8502      beos*)
8503	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
8504	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
8505	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
8506	  # support --undefined.  This deserves some investigation.  FIXME
8507	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
8508	else
8509	  _LT_TAGVAR(ld_shlibs, $1)=no
8510	fi
8511	;;
8512
8513      chorus*)
8514        case $cc_basename in
8515          *)
8516	  # FIXME: insert proper C++ library support
8517	  _LT_TAGVAR(ld_shlibs, $1)=no
8518	  ;;
8519        esac
8520        ;;
8521
8522      cygwin* | mingw* | pw32* | cegcc*)
8523	case $GXX,$cc_basename in
8524	,cl* | no,cl*)
8525	  # Native MSVC
8526	  # hardcode_libdir_flag_spec is actually meaningless, as there is
8527	  # no search path for DLLs.
8528	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
8529	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
8530	  _LT_TAGVAR(always_export_symbols, $1)=yes
8531	  _LT_TAGVAR(file_list_spec, $1)='@'
8532	  # Tell ltmain to make .lib files, not .a files.
8533	  libext=lib
8534	  # Tell ltmain to make .dll files, not .so files.
8535	  shrext_cmds=.dll
8536	  # FIXME: Setting linknames here is a bad hack.
8537	  _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
8538	  _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
8539              cp "$export_symbols" "$output_objdir/$soname.def";
8540              echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
8541            else
8542              $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
8543            fi~
8544            $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
8545            linknames='
8546	  # The linker will not automatically build a static lib if we build a DLL.
8547	  # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
8548	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
8549	  # Don't use ranlib
8550	  _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
8551	  _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
8552            lt_tool_outputfile="@TOOL_OUTPUT@"~
8553            case $lt_outputfile in
8554              *.exe|*.EXE) ;;
8555              *)
8556                lt_outputfile=$lt_outputfile.exe
8557                lt_tool_outputfile=$lt_tool_outputfile.exe
8558                ;;
8559            esac~
8560            func_to_tool_file "$lt_outputfile"~
8561            if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
8562              $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
8563              $RM "$lt_outputfile.manifest";
8564            fi'
8565	  ;;
8566	*)
8567	  # g++
8568	  # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
8569	  # as there is no search path for DLLs.
8570	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8571	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
8572	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
8573	  _LT_TAGVAR(always_export_symbols, $1)=no
8574	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
8575
8576	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
8577	    _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'
8578	    # If the export-symbols file already is a .def file, use it as
8579	    # is; otherwise, prepend EXPORTS...
8580	    _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
8581              cp $export_symbols $output_objdir/$soname.def;
8582            else
8583              echo EXPORTS > $output_objdir/$soname.def;
8584              cat $export_symbols >> $output_objdir/$soname.def;
8585            fi~
8586            $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'
8587	  else
8588	    _LT_TAGVAR(ld_shlibs, $1)=no
8589	  fi
8590	  ;;
8591	esac
8592	;;
8593      darwin* | rhapsody*)
8594        _LT_DARWIN_LINKER_FEATURES($1)
8595	;;
8596
8597      os2*)
8598	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8599	_LT_TAGVAR(hardcode_minus_L, $1)=yes
8600	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
8601	shrext_cmds=.dll
8602	_LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
8603	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
8604	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
8605	  $ECHO EXPORTS >> $output_objdir/$libname.def~
8606	  emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
8607	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
8608	  emximp -o $lib $output_objdir/$libname.def'
8609	_LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
8610	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
8611	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
8612	  $ECHO EXPORTS >> $output_objdir/$libname.def~
8613	  prefix_cmds="$SED"~
8614	  if test EXPORTS = "`$SED 1q $export_symbols`"; then
8615	    prefix_cmds="$prefix_cmds -e 1d";
8616	  fi~
8617	  prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
8618	  cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
8619	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
8620	  emximp -o $lib $output_objdir/$libname.def'
8621	_LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
8622	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
8623	;;
8624
8625      dgux*)
8626        case $cc_basename in
8627          ec++*)
8628	    # FIXME: insert proper C++ library support
8629	    _LT_TAGVAR(ld_shlibs, $1)=no
8630	    ;;
8631          ghcx*)
8632	    # Green Hills C++ Compiler
8633	    # FIXME: insert proper C++ library support
8634	    _LT_TAGVAR(ld_shlibs, $1)=no
8635	    ;;
8636          *)
8637	    # FIXME: insert proper C++ library support
8638	    _LT_TAGVAR(ld_shlibs, $1)=no
8639	    ;;
8640        esac
8641        ;;
8642
8643      freebsd2.*)
8644        # C++ shared libraries reported to be fairly broken before
8645	# switch to ELF
8646        _LT_TAGVAR(ld_shlibs, $1)=no
8647        ;;
8648
8649      freebsd-elf*)
8650        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8651        ;;
8652
8653      freebsd* | dragonfly*)
8654        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
8655        # conventions
8656        _LT_TAGVAR(ld_shlibs, $1)=yes
8657        ;;
8658
8659      haiku*)
8660        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
8661        _LT_TAGVAR(link_all_deplibs, $1)=yes
8662        ;;
8663
8664      hpux9*)
8665        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
8666        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8667        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
8668        _LT_TAGVAR(hardcode_direct, $1)=yes
8669        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
8670				             # but as the default
8671				             # location of the library.
8672
8673        case $cc_basename in
8674          CC*)
8675            # FIXME: insert proper C++ library support
8676            _LT_TAGVAR(ld_shlibs, $1)=no
8677            ;;
8678          aCC*)
8679            _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'
8680            # Commands to make compiler produce verbose output that lists
8681            # what "hidden" libraries, object files and flags are used when
8682            # linking a shared library.
8683            #
8684            # There doesn't appear to be a way to prevent this compiler from
8685            # explicitly linking system object files so we need to strip them
8686            # from the output so that they don't get included in the library
8687            # dependencies.
8688            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"'
8689            ;;
8690          *)
8691            if test yes = "$GXX"; then
8692              _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'
8693            else
8694              # FIXME: insert proper C++ library support
8695              _LT_TAGVAR(ld_shlibs, $1)=no
8696            fi
8697            ;;
8698        esac
8699        ;;
8700
8701      hpux10*|hpux11*)
8702        if test no = "$with_gnu_ld"; then
8703	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
8704	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8705
8706          case $host_cpu in
8707            hppa*64*|ia64*)
8708              ;;
8709            *)
8710	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
8711              ;;
8712          esac
8713        fi
8714        case $host_cpu in
8715          hppa*64*|ia64*)
8716            _LT_TAGVAR(hardcode_direct, $1)=no
8717            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8718            ;;
8719          *)
8720            _LT_TAGVAR(hardcode_direct, $1)=yes
8721            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
8722            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
8723					         # but as the default
8724					         # location of the library.
8725            ;;
8726        esac
8727
8728        case $cc_basename in
8729          CC*)
8730	    # FIXME: insert proper C++ library support
8731	    _LT_TAGVAR(ld_shlibs, $1)=no
8732	    ;;
8733          aCC*)
8734	    case $host_cpu in
8735	      hppa*64*)
8736	        _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8737	        ;;
8738	      ia64*)
8739	        _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8740	        ;;
8741	      *)
8742	        _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'
8743	        ;;
8744	    esac
8745	    # Commands to make compiler produce verbose output that lists
8746	    # what "hidden" libraries, object files and flags are used when
8747	    # linking a shared library.
8748	    #
8749	    # There doesn't appear to be a way to prevent this compiler from
8750	    # explicitly linking system object files so we need to strip them
8751	    # from the output so that they don't get included in the library
8752	    # dependencies.
8753	    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"'
8754	    ;;
8755          *)
8756	    if test yes = "$GXX"; then
8757	      if test no = "$with_gnu_ld"; then
8758	        case $host_cpu in
8759	          hppa*64*)
8760	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8761	            ;;
8762	          ia64*)
8763	            _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'
8764	            ;;
8765	          *)
8766	            _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'
8767	            ;;
8768	        esac
8769	      fi
8770	    else
8771	      # FIXME: insert proper C++ library support
8772	      _LT_TAGVAR(ld_shlibs, $1)=no
8773	    fi
8774	    ;;
8775        esac
8776        ;;
8777
8778      interix[[3-9]]*)
8779	_LT_TAGVAR(hardcode_direct, $1)=no
8780	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8781	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
8782	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
8783	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
8784	# Instead, shared libraries are loaded at an image base (0x10000000 by
8785	# default) and relocated if they conflict, which is a slow very memory
8786	# consuming and fragmenting process.  To avoid this, we pick a random,
8787	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
8788	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
8789	_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'
8790	_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'
8791	;;
8792      irix5* | irix6*)
8793        case $cc_basename in
8794          CC*)
8795	    # SGI C++
8796	    _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'
8797
8798	    # Archives containing C++ object files must be created using
8799	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
8800	    # necessary to make sure instantiated templates are included
8801	    # in the archive.
8802	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
8803	    ;;
8804          *)
8805	    if test yes = "$GXX"; then
8806	      if test no = "$with_gnu_ld"; then
8807	        _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'
8808	      else
8809	        _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'
8810	      fi
8811	    fi
8812	    _LT_TAGVAR(link_all_deplibs, $1)=yes
8813	    ;;
8814        esac
8815        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
8816        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8817        _LT_TAGVAR(inherit_rpath, $1)=yes
8818        ;;
8819
8820      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
8821        case $cc_basename in
8822          KCC*)
8823	    # Kuck and Associates, Inc. (KAI) C++ Compiler
8824
8825	    # KCC will only create a shared library if the output file
8826	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
8827	    # to its proper name (with version) after linking.
8828	    _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'
8829	    _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'
8830	    # Commands to make compiler produce verbose output that lists
8831	    # what "hidden" libraries, object files and flags are used when
8832	    # linking a shared library.
8833	    #
8834	    # There doesn't appear to be a way to prevent this compiler from
8835	    # explicitly linking system object files so we need to strip them
8836	    # from the output so that they don't get included in the library
8837	    # dependencies.
8838	    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"'
8839
8840	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
8841	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
8842
8843	    # Archives containing C++ object files must be created using
8844	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
8845	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
8846	    ;;
8847	  icpc* | ecpc* )
8848	    # Intel C++
8849	    with_gnu_ld=yes
8850	    # version 8.0 and above of icpc choke on multiply defined symbols
8851	    # if we add $predep_objects and $postdep_objects, however 7.1 and
8852	    # earlier do not add the objects themselves.
8853	    case `$CC -V 2>&1` in
8854	      *"Version 7."*)
8855	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
8856		_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'
8857		;;
8858	      *)  # Version 8.0 or newer
8859	        tmp_idyn=
8860	        case $host_cpu in
8861		  ia64*) tmp_idyn=' -i_dynamic';;
8862		esac
8863	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
8864		_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'
8865		;;
8866	    esac
8867	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8868	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
8869	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
8870	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
8871	    ;;
8872          pgCC* | pgcpp*)
8873            # Portland Group C++ compiler
8874	    case `$CC -V` in
8875	    *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
8876	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
8877               rm -rf $tpldir~
8878               $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
8879               compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
8880	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
8881                rm -rf $tpldir~
8882                $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
8883                $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
8884                $RANLIB $oldlib'
8885	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
8886                rm -rf $tpldir~
8887                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
8888                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
8889	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
8890                rm -rf $tpldir~
8891                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
8892                $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'
8893	      ;;
8894	    *) # Version 6 and above use weak symbols
8895	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
8896	      _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'
8897	      ;;
8898	    esac
8899
8900	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
8901	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
8902	    _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'
8903            ;;
8904	  cxx*)
8905	    # Compaq C++
8906	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
8907	    _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'
8908
8909	    runpath_var=LD_RUN_PATH
8910	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
8911	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8912
8913	    # Commands to make compiler produce verbose output that lists
8914	    # what "hidden" libraries, object files and flags are used when
8915	    # linking a shared library.
8916	    #
8917	    # There doesn't appear to be a way to prevent this compiler from
8918	    # explicitly linking system object files so we need to strip them
8919	    # from the output so that they don't get included in the library
8920	    # dependencies.
8921	    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'
8922	    ;;
8923	  xl* | mpixl* | bgxl*)
8924	    # IBM XL 8.0 on PPC, with GNU ld
8925	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
8926	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
8927	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
8928	    if test yes = "$supports_anon_versioning"; then
8929	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
8930                cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
8931                echo "local: *; };" >> $output_objdir/$libname.ver~
8932                $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
8933	    fi
8934	    ;;
8935	  *)
8936	    case `$CC -V 2>&1 | sed 5q` in
8937	    *Sun\ C*)
8938	      # Sun C++ 5.9
8939	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
8940	      _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8941	      _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'
8942	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8943	      _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'
8944	      _LT_TAGVAR(compiler_needs_object, $1)=yes
8945
8946	      # Not sure whether something based on
8947	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
8948	      # would be better.
8949	      output_verbose_link_cmd='func_echo_all'
8950
8951	      # Archives containing C++ object files must be created using
8952	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
8953	      # necessary to make sure instantiated templates are included
8954	      # in the archive.
8955	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
8956	      ;;
8957	    esac
8958	    ;;
8959	esac
8960	;;
8961
8962      lynxos*)
8963        # FIXME: insert proper C++ library support
8964	_LT_TAGVAR(ld_shlibs, $1)=no
8965	;;
8966
8967      m88k*)
8968        # FIXME: insert proper C++ library support
8969        _LT_TAGVAR(ld_shlibs, $1)=no
8970	;;
8971
8972      mvs*)
8973        case $cc_basename in
8974          cxx*)
8975	    # FIXME: insert proper C++ library support
8976	    _LT_TAGVAR(ld_shlibs, $1)=no
8977	    ;;
8978	  *)
8979	    # FIXME: insert proper C++ library support
8980	    _LT_TAGVAR(ld_shlibs, $1)=no
8981	    ;;
8982	esac
8983	;;
8984
8985      netbsd*)
8986        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
8987	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
8988	  wlarc=
8989	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8990	  _LT_TAGVAR(hardcode_direct, $1)=yes
8991	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8992	fi
8993	# Workaround some broken pre-1.5 toolchains
8994	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
8995	;;
8996
8997      *nto* | *qnx*)
8998        _LT_TAGVAR(ld_shlibs, $1)=yes
8999	;;
9000
9001      openbsd* | bitrig*)
9002	if test -f /usr/libexec/ld.so; then
9003	  _LT_TAGVAR(hardcode_direct, $1)=yes
9004	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9005	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
9006	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
9007	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
9008	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
9009	    _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'
9010	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
9011	    _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
9012	  fi
9013	  output_verbose_link_cmd=func_echo_all
9014	else
9015	  _LT_TAGVAR(ld_shlibs, $1)=no
9016	fi
9017	;;
9018
9019      osf3* | osf4* | osf5*)
9020        case $cc_basename in
9021          KCC*)
9022	    # Kuck and Associates, Inc. (KAI) C++ Compiler
9023
9024	    # KCC will only create a shared library if the output file
9025	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
9026	    # to its proper name (with version) after linking.
9027	    _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'
9028
9029	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
9030	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
9031
9032	    # Archives containing C++ object files must be created using
9033	    # the KAI C++ compiler.
9034	    case $host in
9035	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
9036	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
9037	    esac
9038	    ;;
9039          RCC*)
9040	    # Rational C++ 2.4.1
9041	    # FIXME: insert proper C++ library support
9042	    _LT_TAGVAR(ld_shlibs, $1)=no
9043	    ;;
9044          cxx*)
9045	    case $host in
9046	      osf3*)
9047	        _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
9048	        _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'
9049	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
9050		;;
9051	      *)
9052	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
9053	        _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'
9054	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
9055                  echo "-hidden">> $lib.exp~
9056                  $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~
9057                  $RM $lib.exp'
9058	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
9059		;;
9060	    esac
9061
9062	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
9063
9064	    # Commands to make compiler produce verbose output that lists
9065	    # what "hidden" libraries, object files and flags are used when
9066	    # linking a shared library.
9067	    #
9068	    # There doesn't appear to be a way to prevent this compiler from
9069	    # explicitly linking system object files so we need to strip them
9070	    # from the output so that they don't get included in the library
9071	    # dependencies.
9072	    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"'
9073	    ;;
9074	  *)
9075	    if test yes,no = "$GXX,$with_gnu_ld"; then
9076	      _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
9077	      case $host in
9078	        osf3*)
9079	          _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'
9080		  ;;
9081	        *)
9082	          _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'
9083		  ;;
9084	      esac
9085
9086	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
9087	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
9088
9089	      # Commands to make compiler produce verbose output that lists
9090	      # what "hidden" libraries, object files and flags are used when
9091	      # linking a shared library.
9092	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
9093
9094	    else
9095	      # FIXME: insert proper C++ library support
9096	      _LT_TAGVAR(ld_shlibs, $1)=no
9097	    fi
9098	    ;;
9099        esac
9100        ;;
9101
9102      psos*)
9103        # FIXME: insert proper C++ library support
9104        _LT_TAGVAR(ld_shlibs, $1)=no
9105        ;;
9106
9107      sunos4*)
9108        case $cc_basename in
9109          CC*)
9110	    # Sun C++ 4.x
9111	    # FIXME: insert proper C++ library support
9112	    _LT_TAGVAR(ld_shlibs, $1)=no
9113	    ;;
9114          lcc*)
9115	    # Lucid
9116	    # FIXME: insert proper C++ library support
9117	    _LT_TAGVAR(ld_shlibs, $1)=no
9118	    ;;
9119          *)
9120	    # FIXME: insert proper C++ library support
9121	    _LT_TAGVAR(ld_shlibs, $1)=no
9122	    ;;
9123        esac
9124        ;;
9125
9126      solaris*)
9127        case $cc_basename in
9128          CC* | sunCC*)
9129	    # Sun C++ 4.2, 5.x and Centerline C++
9130            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
9131	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
9132	    _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
9133	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
9134              $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'
9135
9136	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
9137	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9138	    case $host_os in
9139	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
9140	      *)
9141		# The compiler driver will combine and reorder linker options,
9142		# but understands '-z linker_flag'.
9143	        # Supported since Solaris 2.6 (maybe 2.5.1?)
9144		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
9145	        ;;
9146	    esac
9147	    _LT_TAGVAR(link_all_deplibs, $1)=yes
9148
9149	    output_verbose_link_cmd='func_echo_all'
9150
9151	    # Archives containing C++ object files must be created using
9152	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
9153	    # necessary to make sure instantiated templates are included
9154	    # in the archive.
9155	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
9156	    ;;
9157          gcx*)
9158	    # Green Hills C++ Compiler
9159	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
9160
9161	    # The C++ compiler must be used to create the archive.
9162	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
9163	    ;;
9164          *)
9165	    # GNU C++ compiler with Solaris linker
9166	    if test yes,no = "$GXX,$with_gnu_ld"; then
9167	      _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
9168	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
9169	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
9170	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
9171                  $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'
9172
9173	        # Commands to make compiler produce verbose output that lists
9174	        # what "hidden" libraries, object files and flags are used when
9175	        # linking a shared library.
9176	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
9177	      else
9178	        # g++ 2.7 appears to require '-G' NOT '-shared' on this
9179	        # platform.
9180	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
9181	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
9182                  $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'
9183
9184	        # Commands to make compiler produce verbose output that lists
9185	        # what "hidden" libraries, object files and flags are used when
9186	        # linking a shared library.
9187	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
9188	      fi
9189
9190	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
9191	      case $host_os in
9192		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
9193		*)
9194		  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
9195		  ;;
9196	      esac
9197	    fi
9198	    ;;
9199        esac
9200        ;;
9201
9202    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
9203      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
9204      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
9205      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9206      runpath_var='LD_RUN_PATH'
9207
9208      case $cc_basename in
9209        CC*)
9210	  _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9211	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9212	  ;;
9213	*)
9214	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9215	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9216	  ;;
9217      esac
9218      ;;
9219
9220      sysv5* | sco3.2v5* | sco5v6*)
9221	# Note: We CANNOT use -z defs as we might desire, because we do not
9222	# link with -lc, and that would cause any symbols used from libc to
9223	# always be unresolved, which means just about no library would
9224	# ever link correctly.  If we're not using GNU ld we use -z text
9225	# though, which does catch some bad symbols but isn't as heavy-handed
9226	# as -z defs.
9227	_LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
9228	_LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
9229	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
9230	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9231	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
9232	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
9233	_LT_TAGVAR(link_all_deplibs, $1)=yes
9234	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
9235	runpath_var='LD_RUN_PATH'
9236
9237	case $cc_basename in
9238          CC*)
9239	    _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9240	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9241	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
9242              '"$_LT_TAGVAR(old_archive_cmds, $1)"
9243	    _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
9244              '"$_LT_TAGVAR(reload_cmds, $1)"
9245	    ;;
9246	  *)
9247	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9248	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9249	    ;;
9250	esac
9251      ;;
9252
9253      tandem*)
9254        case $cc_basename in
9255          NCC*)
9256	    # NonStop-UX NCC 3.20
9257	    # FIXME: insert proper C++ library support
9258	    _LT_TAGVAR(ld_shlibs, $1)=no
9259	    ;;
9260          *)
9261	    # FIXME: insert proper C++ library support
9262	    _LT_TAGVAR(ld_shlibs, $1)=no
9263	    ;;
9264        esac
9265        ;;
9266
9267      vxworks*)
9268        # FIXME: insert proper C++ library support
9269        _LT_TAGVAR(ld_shlibs, $1)=no
9270        ;;
9271
9272      *)
9273        # FIXME: insert proper C++ library support
9274        _LT_TAGVAR(ld_shlibs, $1)=no
9275        ;;
9276    esac
9277
9278    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
9279    test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
9280
9281    _LT_TAGVAR(GCC, $1)=$GXX
9282    _LT_TAGVAR(LD, $1)=$LD
9283
9284    ## CAVEAT EMPTOR:
9285    ## There is no encapsulation within the following macros, do not change
9286    ## the running order or otherwise move them around unless you know exactly
9287    ## what you are doing...
9288    _LT_SYS_HIDDEN_LIBDEPS($1)
9289    _LT_COMPILER_PIC($1)
9290    _LT_COMPILER_C_O($1)
9291    _LT_COMPILER_FILE_LOCKS($1)
9292    _LT_LINKER_SHLIBS($1)
9293    _LT_SYS_DYNAMIC_LINKER($1)
9294    _LT_LINKER_HARDCODE_LIBPATH($1)
9295
9296    _LT_CONFIG($1)
9297  fi # test -n "$compiler"
9298
9299  CC=$lt_save_CC
9300  CFLAGS=$lt_save_CFLAGS
9301  LDCXX=$LD
9302  LD=$lt_save_LD
9303  GCC=$lt_save_GCC
9304  with_gnu_ld=$lt_save_with_gnu_ld
9305  lt_cv_path_LDCXX=$lt_cv_path_LD
9306  lt_cv_path_LD=$lt_save_path_LD
9307  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
9308  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
9309fi # test yes != "$_lt_caught_CXX_error"
9310
9311AC_LANG_POP
9312])# _LT_LANG_CXX_CONFIG
9313
9314
9315# _LT_FUNC_STRIPNAME_CNF
9316# ----------------------
9317# func_stripname_cnf prefix suffix name
9318# strip PREFIX and SUFFIX off of NAME.
9319# PREFIX and SUFFIX must not contain globbing or regex special
9320# characters, hashes, percent signs, but SUFFIX may contain a leading
9321# dot (in which case that matches only a dot).
9322#
9323# This function is identical to the (non-XSI) version of func_stripname,
9324# except this one can be used by m4 code that may be executed by configure,
9325# rather than the libtool script.
9326m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
9327AC_REQUIRE([_LT_DECL_SED])
9328AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
9329func_stripname_cnf ()
9330{
9331  case @S|@2 in
9332  .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
9333  *)  func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
9334  esac
9335} # func_stripname_cnf
9336])# _LT_FUNC_STRIPNAME_CNF
9337
9338
9339# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
9340# ---------------------------------
9341# Figure out "hidden" library dependencies from verbose
9342# compiler output when linking a shared library.
9343# Parse the compiler output and extract the necessary
9344# objects, libraries and library flags.
9345m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
9346[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
9347AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
9348# Dependencies to place before and after the object being linked:
9349_LT_TAGVAR(predep_objects, $1)=
9350_LT_TAGVAR(postdep_objects, $1)=
9351_LT_TAGVAR(predeps, $1)=
9352_LT_TAGVAR(postdeps, $1)=
9353_LT_TAGVAR(compiler_lib_search_path, $1)=
9354
9355dnl we can't use the lt_simple_compile_test_code here,
9356dnl because it contains code intended for an executable,
9357dnl not a library.  It's possible we should let each
9358dnl tag define a new lt_????_link_test_code variable,
9359dnl but it's only used here...
9360m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
9361int a;
9362void foo (void) { a = 0; }
9363_LT_EOF
9364], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
9365class Foo
9366{
9367public:
9368  Foo (void) { a = 0; }
9369private:
9370  int a;
9371};
9372_LT_EOF
9373], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
9374      subroutine foo
9375      implicit none
9376      integer*4 a
9377      a=0
9378      return
9379      end
9380_LT_EOF
9381], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
9382      subroutine foo
9383      implicit none
9384      integer a
9385      a=0
9386      return
9387      end
9388_LT_EOF
9389], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
9390public class foo {
9391  private int a;
9392  public void bar (void) {
9393    a = 0;
9394  }
9395};
9396_LT_EOF
9397], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
9398package foo
9399func foo() {
9400}
9401_LT_EOF
9402])
9403
9404_lt_libdeps_save_CFLAGS=$CFLAGS
9405case "$CC $CFLAGS " in #(
9406*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
9407*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
9408*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
9409esac
9410
9411dnl Parse the compiler output and extract the necessary
9412dnl objects, libraries and library flags.
9413if AC_TRY_EVAL(ac_compile); then
9414  # Parse the compiler output and extract the necessary
9415  # objects, libraries and library flags.
9416
9417  # Sentinel used to keep track of whether or not we are before
9418  # the conftest object file.
9419  pre_test_object_deps_done=no
9420
9421  for p in `eval "$output_verbose_link_cmd"`; do
9422    case $prev$p in
9423
9424    -L* | -R* | -l*)
9425       # Some compilers place space between "-{L,R}" and the path.
9426       # Remove the space.
9427       if test x-L = "$p" ||
9428          test x-R = "$p"; then
9429	 prev=$p
9430	 continue
9431       fi
9432
9433       # Expand the sysroot to ease extracting the directories later.
9434       if test -z "$prev"; then
9435         case $p in
9436         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
9437         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
9438         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
9439         esac
9440       fi
9441       case $p in
9442       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
9443       esac
9444       if test no = "$pre_test_object_deps_done"; then
9445	 case $prev in
9446	 -L | -R)
9447	   # Internal compiler library paths should come after those
9448	   # provided the user.  The postdeps already come after the
9449	   # user supplied libs so there is no need to process them.
9450	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
9451	     _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
9452	   else
9453	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
9454	   fi
9455	   ;;
9456	 # The "-l" case would never come before the object being
9457	 # linked, so don't bother handling this case.
9458	 esac
9459       else
9460	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
9461	   _LT_TAGVAR(postdeps, $1)=$prev$p
9462	 else
9463	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
9464	 fi
9465       fi
9466       prev=
9467       ;;
9468
9469    *.lto.$objext) ;; # Ignore GCC LTO objects
9470    *.$objext)
9471       # This assumes that the test object file only shows up
9472       # once in the compiler output.
9473       if test "$p" = "conftest.$objext"; then
9474	 pre_test_object_deps_done=yes
9475	 continue
9476       fi
9477
9478       if test no = "$pre_test_object_deps_done"; then
9479	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
9480	   _LT_TAGVAR(predep_objects, $1)=$p
9481	 else
9482	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
9483	 fi
9484       else
9485	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
9486	   _LT_TAGVAR(postdep_objects, $1)=$p
9487	 else
9488	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
9489	 fi
9490       fi
9491       ;;
9492
9493    *) ;; # Ignore the rest.
9494
9495    esac
9496  done
9497
9498  # Clean up.
9499  rm -f a.out a.exe
9500else
9501  echo "libtool.m4: error: problem compiling $1 test program"
9502fi
9503
9504$RM -f confest.$objext
9505CFLAGS=$_lt_libdeps_save_CFLAGS
9506
9507# PORTME: override above test on systems where it is broken
9508m4_if([$1], [CXX],
9509[case $host_os in
9510interix[[3-9]]*)
9511  # Interix 3.5 installs completely hosed .la files for C++, so rather than
9512  # hack all around it, let's just trust "g++" to DTRT.
9513  _LT_TAGVAR(predep_objects,$1)=
9514  _LT_TAGVAR(postdep_objects,$1)=
9515  _LT_TAGVAR(postdeps,$1)=
9516  ;;
9517esac
9518])
9519
9520case " $_LT_TAGVAR(postdeps, $1) " in
9521*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
9522esac
9523 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
9524if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
9525 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
9526fi
9527_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
9528    [The directories searched by this compiler when creating a shared library])
9529_LT_TAGDECL([], [predep_objects], [1],
9530    [Dependencies to place before and after the objects being linked to
9531    create a shared library])
9532_LT_TAGDECL([], [postdep_objects], [1])
9533_LT_TAGDECL([], [predeps], [1])
9534_LT_TAGDECL([], [postdeps], [1])
9535_LT_TAGDECL([], [compiler_lib_search_path], [1],
9536    [The library search path used internally by the compiler when linking
9537    a shared library])
9538])# _LT_SYS_HIDDEN_LIBDEPS
9539
9540
9541# _LT_LANG_F77_CONFIG([TAG])
9542# --------------------------
9543# Ensure that the configuration variables for a Fortran 77 compiler are
9544# suitably defined.  These variables are subsequently used by _LT_CONFIG
9545# to write the compiler configuration to 'libtool'.
9546m4_defun([_LT_LANG_F77_CONFIG],
9547[AC_LANG_PUSH(Fortran 77)
9548if test -z "$F77" || test no = "$F77"; then
9549  _lt_disable_F77=yes
9550fi
9551
9552_LT_TAGVAR(archive_cmds_need_lc, $1)=no
9553_LT_TAGVAR(allow_undefined_flag, $1)=
9554_LT_TAGVAR(always_export_symbols, $1)=no
9555_LT_TAGVAR(archive_expsym_cmds, $1)=
9556_LT_TAGVAR(export_dynamic_flag_spec, $1)=
9557_LT_TAGVAR(hardcode_direct, $1)=no
9558_LT_TAGVAR(hardcode_direct_absolute, $1)=no
9559_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
9560_LT_TAGVAR(hardcode_libdir_separator, $1)=
9561_LT_TAGVAR(hardcode_minus_L, $1)=no
9562_LT_TAGVAR(hardcode_automatic, $1)=no
9563_LT_TAGVAR(inherit_rpath, $1)=no
9564_LT_TAGVAR(module_cmds, $1)=
9565_LT_TAGVAR(module_expsym_cmds, $1)=
9566_LT_TAGVAR(link_all_deplibs, $1)=unknown
9567_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
9568_LT_TAGVAR(reload_flag, $1)=$reload_flag
9569_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
9570_LT_TAGVAR(no_undefined_flag, $1)=
9571_LT_TAGVAR(whole_archive_flag_spec, $1)=
9572_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
9573
9574# Source file extension for f77 test sources.
9575ac_ext=f
9576
9577# Object file extension for compiled f77 test sources.
9578objext=o
9579_LT_TAGVAR(objext, $1)=$objext
9580
9581# No sense in running all these tests if we already determined that
9582# the F77 compiler isn't working.  Some variables (like enable_shared)
9583# are currently assumed to apply to all compilers on this platform,
9584# and will be corrupted by setting them based on a non-working compiler.
9585if test yes != "$_lt_disable_F77"; then
9586  # Code to be used in simple compile tests
9587  lt_simple_compile_test_code="\
9588      subroutine t
9589      return
9590      end
9591"
9592
9593  # Code to be used in simple link tests
9594  lt_simple_link_test_code="\
9595      program t
9596      end
9597"
9598
9599  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
9600  _LT_TAG_COMPILER
9601
9602  # save warnings/boilerplate of simple test code
9603  _LT_COMPILER_BOILERPLATE
9604  _LT_LINKER_BOILERPLATE
9605
9606  # Allow CC to be a program name with arguments.
9607  lt_save_CC=$CC
9608  lt_save_GCC=$GCC
9609  lt_save_CFLAGS=$CFLAGS
9610  CC=${F77-"f77"}
9611  CFLAGS=$FFLAGS
9612  compiler=$CC
9613  _LT_TAGVAR(compiler, $1)=$CC
9614  _LT_CC_BASENAME([$compiler])
9615  GCC=$G77
9616  if test -n "$compiler"; then
9617    AC_MSG_CHECKING([if libtool supports shared libraries])
9618    AC_MSG_RESULT([$can_build_shared])
9619
9620    AC_MSG_CHECKING([whether to build shared libraries])
9621    test no = "$can_build_shared" && enable_shared=no
9622
9623    # On AIX, shared libraries and static libraries use the same namespace, and
9624    # are all built from PIC.
9625    case $host_os in
9626      aix3*)
9627        test yes = "$enable_shared" && enable_static=no
9628        if test -n "$RANLIB"; then
9629          archive_cmds="$archive_cmds~\$RANLIB \$lib"
9630          postinstall_cmds='$RANLIB $lib'
9631        fi
9632        ;;
9633      aix[[4-9]]*)
9634	if test ia64 != "$host_cpu"; then
9635	  case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
9636	  yes,aix,yes) ;;		# shared object as lib.so file only
9637	  yes,svr4,*) ;;		# shared object as lib.so archive member only
9638	  yes,*) enable_static=no ;;	# shared object in lib.a archive as well
9639	  esac
9640	fi
9641        ;;
9642    esac
9643    AC_MSG_RESULT([$enable_shared])
9644
9645    AC_MSG_CHECKING([whether to build static libraries])
9646    # Make sure either enable_shared or enable_static is yes.
9647    test yes = "$enable_shared" || enable_static=yes
9648    AC_MSG_RESULT([$enable_static])
9649
9650    _LT_TAGVAR(GCC, $1)=$G77
9651    _LT_TAGVAR(LD, $1)=$LD
9652
9653    ## CAVEAT EMPTOR:
9654    ## There is no encapsulation within the following macros, do not change
9655    ## the running order or otherwise move them around unless you know exactly
9656    ## what you are doing...
9657    _LT_COMPILER_PIC($1)
9658    _LT_COMPILER_C_O($1)
9659    _LT_COMPILER_FILE_LOCKS($1)
9660    _LT_LINKER_SHLIBS($1)
9661    _LT_SYS_DYNAMIC_LINKER($1)
9662    _LT_LINKER_HARDCODE_LIBPATH($1)
9663
9664    _LT_CONFIG($1)
9665  fi # test -n "$compiler"
9666
9667  GCC=$lt_save_GCC
9668  CC=$lt_save_CC
9669  CFLAGS=$lt_save_CFLAGS
9670fi # test yes != "$_lt_disable_F77"
9671
9672AC_LANG_POP
9673])# _LT_LANG_F77_CONFIG
9674
9675
9676# _LT_LANG_FC_CONFIG([TAG])
9677# -------------------------
9678# Ensure that the configuration variables for a Fortran compiler are
9679# suitably defined.  These variables are subsequently used by _LT_CONFIG
9680# to write the compiler configuration to 'libtool'.
9681m4_defun([_LT_LANG_FC_CONFIG],
9682[AC_LANG_PUSH(Fortran)
9683
9684if test -z "$FC" || test no = "$FC"; then
9685  _lt_disable_FC=yes
9686fi
9687
9688_LT_TAGVAR(archive_cmds_need_lc, $1)=no
9689_LT_TAGVAR(allow_undefined_flag, $1)=
9690_LT_TAGVAR(always_export_symbols, $1)=no
9691_LT_TAGVAR(archive_expsym_cmds, $1)=
9692_LT_TAGVAR(export_dynamic_flag_spec, $1)=
9693_LT_TAGVAR(hardcode_direct, $1)=no
9694_LT_TAGVAR(hardcode_direct_absolute, $1)=no
9695_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
9696_LT_TAGVAR(hardcode_libdir_separator, $1)=
9697_LT_TAGVAR(hardcode_minus_L, $1)=no
9698_LT_TAGVAR(hardcode_automatic, $1)=no
9699_LT_TAGVAR(inherit_rpath, $1)=no
9700_LT_TAGVAR(module_cmds, $1)=
9701_LT_TAGVAR(module_expsym_cmds, $1)=
9702_LT_TAGVAR(link_all_deplibs, $1)=unknown
9703_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
9704_LT_TAGVAR(reload_flag, $1)=$reload_flag
9705_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
9706_LT_TAGVAR(no_undefined_flag, $1)=
9707_LT_TAGVAR(whole_archive_flag_spec, $1)=
9708_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
9709
9710# Source file extension for fc test sources.
9711ac_ext=${ac_fc_srcext-f}
9712
9713# Object file extension for compiled fc test sources.
9714objext=o
9715_LT_TAGVAR(objext, $1)=$objext
9716
9717# No sense in running all these tests if we already determined that
9718# the FC compiler isn't working.  Some variables (like enable_shared)
9719# are currently assumed to apply to all compilers on this platform,
9720# and will be corrupted by setting them based on a non-working compiler.
9721if test yes != "$_lt_disable_FC"; then
9722  # Code to be used in simple compile tests
9723  lt_simple_compile_test_code="\
9724      subroutine t
9725      return
9726      end
9727"
9728
9729  # Code to be used in simple link tests
9730  lt_simple_link_test_code="\
9731      program t
9732      end
9733"
9734
9735  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
9736  _LT_TAG_COMPILER
9737
9738  # save warnings/boilerplate of simple test code
9739  _LT_COMPILER_BOILERPLATE
9740  _LT_LINKER_BOILERPLATE
9741
9742  # Allow CC to be a program name with arguments.
9743  lt_save_CC=$CC
9744  lt_save_GCC=$GCC
9745  lt_save_CFLAGS=$CFLAGS
9746  CC=${FC-"f95"}
9747  CFLAGS=$FCFLAGS
9748  compiler=$CC
9749  GCC=$ac_cv_fc_compiler_gnu
9750
9751  _LT_TAGVAR(compiler, $1)=$CC
9752  _LT_CC_BASENAME([$compiler])
9753
9754  if test -n "$compiler"; then
9755    AC_MSG_CHECKING([if libtool supports shared libraries])
9756    AC_MSG_RESULT([$can_build_shared])
9757
9758    AC_MSG_CHECKING([whether to build shared libraries])
9759    test no = "$can_build_shared" && enable_shared=no
9760
9761    # On AIX, shared libraries and static libraries use the same namespace, and
9762    # are all built from PIC.
9763    case $host_os in
9764      aix3*)
9765        test yes = "$enable_shared" && enable_static=no
9766        if test -n "$RANLIB"; then
9767          archive_cmds="$archive_cmds~\$RANLIB \$lib"
9768          postinstall_cmds='$RANLIB $lib'
9769        fi
9770        ;;
9771      aix[[4-9]]*)
9772	if test ia64 != "$host_cpu"; then
9773	  case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
9774	  yes,aix,yes) ;;		# shared object as lib.so file only
9775	  yes,svr4,*) ;;		# shared object as lib.so archive member only
9776	  yes,*) enable_static=no ;;	# shared object in lib.a archive as well
9777	  esac
9778	fi
9779        ;;
9780    esac
9781    AC_MSG_RESULT([$enable_shared])
9782
9783    AC_MSG_CHECKING([whether to build static libraries])
9784    # Make sure either enable_shared or enable_static is yes.
9785    test yes = "$enable_shared" || enable_static=yes
9786    AC_MSG_RESULT([$enable_static])
9787
9788    _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
9789    _LT_TAGVAR(LD, $1)=$LD
9790
9791    ## CAVEAT EMPTOR:
9792    ## There is no encapsulation within the following macros, do not change
9793    ## the running order or otherwise move them around unless you know exactly
9794    ## what you are doing...
9795    _LT_SYS_HIDDEN_LIBDEPS($1)
9796    _LT_COMPILER_PIC($1)
9797    _LT_COMPILER_C_O($1)
9798    _LT_COMPILER_FILE_LOCKS($1)
9799    _LT_LINKER_SHLIBS($1)
9800    _LT_SYS_DYNAMIC_LINKER($1)
9801    _LT_LINKER_HARDCODE_LIBPATH($1)
9802
9803    _LT_CONFIG($1)
9804  fi # test -n "$compiler"
9805
9806  GCC=$lt_save_GCC
9807  CC=$lt_save_CC
9808  CFLAGS=$lt_save_CFLAGS
9809fi # test yes != "$_lt_disable_FC"
9810
9811AC_LANG_POP
9812])# _LT_LANG_FC_CONFIG
9813
9814
9815# _LT_LANG_GCJ_CONFIG([TAG])
9816# --------------------------
9817# Ensure that the configuration variables for the GNU Java Compiler compiler
9818# are suitably defined.  These variables are subsequently used by _LT_CONFIG
9819# to write the compiler configuration to 'libtool'.
9820m4_defun([_LT_LANG_GCJ_CONFIG],
9821[AC_REQUIRE([LT_PROG_GCJ])dnl
9822AC_LANG_SAVE
9823
9824# Source file extension for Java test sources.
9825ac_ext=java
9826
9827# Object file extension for compiled Java test sources.
9828objext=o
9829_LT_TAGVAR(objext, $1)=$objext
9830
9831# Code to be used in simple compile tests
9832lt_simple_compile_test_code="class foo {}"
9833
9834# Code to be used in simple link tests
9835lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
9836
9837# ltmain only uses $CC for tagged configurations so make sure $CC is set.
9838_LT_TAG_COMPILER
9839
9840# save warnings/boilerplate of simple test code
9841_LT_COMPILER_BOILERPLATE
9842_LT_LINKER_BOILERPLATE
9843
9844# Allow CC to be a program name with arguments.
9845lt_save_CC=$CC
9846lt_save_CFLAGS=$CFLAGS
9847lt_save_GCC=$GCC
9848GCC=yes
9849CC=${GCJ-"gcj"}
9850CFLAGS=$GCJFLAGS
9851compiler=$CC
9852_LT_TAGVAR(compiler, $1)=$CC
9853_LT_TAGVAR(LD, $1)=$LD
9854_LT_CC_BASENAME([$compiler])
9855
9856# GCJ did not exist at the time GCC didn't implicitly link libc in.
9857_LT_TAGVAR(archive_cmds_need_lc, $1)=no
9858
9859_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
9860_LT_TAGVAR(reload_flag, $1)=$reload_flag
9861_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
9862
9863if test -n "$compiler"; then
9864  _LT_COMPILER_NO_RTTI($1)
9865  _LT_COMPILER_PIC($1)
9866  _LT_COMPILER_C_O($1)
9867  _LT_COMPILER_FILE_LOCKS($1)
9868  _LT_LINKER_SHLIBS($1)
9869  _LT_LINKER_HARDCODE_LIBPATH($1)
9870
9871  _LT_CONFIG($1)
9872fi
9873
9874AC_LANG_RESTORE
9875
9876GCC=$lt_save_GCC
9877CC=$lt_save_CC
9878CFLAGS=$lt_save_CFLAGS
9879])# _LT_LANG_GCJ_CONFIG
9880
9881
9882# _LT_LANG_GO_CONFIG([TAG])
9883# --------------------------
9884# Ensure that the configuration variables for the GNU Go compiler
9885# are suitably defined.  These variables are subsequently used by _LT_CONFIG
9886# to write the compiler configuration to 'libtool'.
9887m4_defun([_LT_LANG_GO_CONFIG],
9888[AC_REQUIRE([LT_PROG_GO])dnl
9889AC_LANG_SAVE
9890
9891# Source file extension for Go test sources.
9892ac_ext=go
9893
9894# Object file extension for compiled Go test sources.
9895objext=o
9896_LT_TAGVAR(objext, $1)=$objext
9897
9898# Code to be used in simple compile tests
9899lt_simple_compile_test_code="package main; func main() { }"
9900
9901# Code to be used in simple link tests
9902lt_simple_link_test_code='package main; func main() { }'
9903
9904# ltmain only uses $CC for tagged configurations so make sure $CC is set.
9905_LT_TAG_COMPILER
9906
9907# save warnings/boilerplate of simple test code
9908_LT_COMPILER_BOILERPLATE
9909_LT_LINKER_BOILERPLATE
9910
9911# Allow CC to be a program name with arguments.
9912lt_save_CC=$CC
9913lt_save_CFLAGS=$CFLAGS
9914lt_save_GCC=$GCC
9915GCC=yes
9916CC=${GOC-"gccgo"}
9917CFLAGS=$GOFLAGS
9918compiler=$CC
9919_LT_TAGVAR(compiler, $1)=$CC
9920_LT_TAGVAR(LD, $1)=$LD
9921_LT_CC_BASENAME([$compiler])
9922
9923# Go did not exist at the time GCC didn't implicitly link libc in.
9924_LT_TAGVAR(archive_cmds_need_lc, $1)=no
9925
9926_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
9927_LT_TAGVAR(reload_flag, $1)=$reload_flag
9928_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
9929
9930if test -n "$compiler"; then
9931  _LT_COMPILER_NO_RTTI($1)
9932  _LT_COMPILER_PIC($1)
9933  _LT_COMPILER_C_O($1)
9934  _LT_COMPILER_FILE_LOCKS($1)
9935  _LT_LINKER_SHLIBS($1)
9936  _LT_LINKER_HARDCODE_LIBPATH($1)
9937
9938  _LT_CONFIG($1)
9939fi
9940
9941AC_LANG_RESTORE
9942
9943GCC=$lt_save_GCC
9944CC=$lt_save_CC
9945CFLAGS=$lt_save_CFLAGS
9946])# _LT_LANG_GO_CONFIG
9947
9948
9949# _LT_LANG_RC_CONFIG([TAG])
9950# -------------------------
9951# Ensure that the configuration variables for the Windows resource compiler
9952# are suitably defined.  These variables are subsequently used by _LT_CONFIG
9953# to write the compiler configuration to 'libtool'.
9954m4_defun([_LT_LANG_RC_CONFIG],
9955[AC_REQUIRE([LT_PROG_RC])dnl
9956AC_LANG_SAVE
9957
9958# Source file extension for RC test sources.
9959ac_ext=rc
9960
9961# Object file extension for compiled RC test sources.
9962objext=o
9963_LT_TAGVAR(objext, $1)=$objext
9964
9965# Code to be used in simple compile tests
9966lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
9967
9968# Code to be used in simple link tests
9969lt_simple_link_test_code=$lt_simple_compile_test_code
9970
9971# ltmain only uses $CC for tagged configurations so make sure $CC is set.
9972_LT_TAG_COMPILER
9973
9974# save warnings/boilerplate of simple test code
9975_LT_COMPILER_BOILERPLATE
9976_LT_LINKER_BOILERPLATE
9977
9978# Allow CC to be a program name with arguments.
9979lt_save_CC=$CC
9980lt_save_CFLAGS=$CFLAGS
9981lt_save_GCC=$GCC
9982GCC=
9983CC=${RC-"windres"}
9984CFLAGS=
9985compiler=$CC
9986_LT_TAGVAR(compiler, $1)=$CC
9987_LT_CC_BASENAME([$compiler])
9988_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
9989
9990if test -n "$compiler"; then
9991  :
9992  _LT_CONFIG($1)
9993fi
9994
9995GCC=$lt_save_GCC
9996AC_LANG_RESTORE
9997CC=$lt_save_CC
9998CFLAGS=$lt_save_CFLAGS
9999])# _LT_LANG_RC_CONFIG
10000
10001
10002# LT_PROG_GCJ
10003# -----------
10004AC_DEFUN([LT_PROG_GCJ],
10005[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
10006  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
10007    [AC_CHECK_TOOL(GCJ, gcj,)
10008      test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
10009      AC_SUBST(GCJFLAGS)])])[]dnl
10010])
10011
10012# Old name:
10013AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
10014dnl aclocal-1.4 backwards compatibility:
10015dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
10016
10017
10018# LT_PROG_GO
10019# ----------
10020AC_DEFUN([LT_PROG_GO],
10021[AC_CHECK_TOOL(GOC, gccgo,)
10022])
10023
10024
10025# LT_PROG_RC
10026# ----------
10027AC_DEFUN([LT_PROG_RC],
10028[AC_CHECK_TOOL(RC, windres,)
10029])
10030
10031# Old name:
10032AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
10033dnl aclocal-1.4 backwards compatibility:
10034dnl AC_DEFUN([LT_AC_PROG_RC], [])
10035
10036
10037# _LT_DECL_EGREP
10038# --------------
10039# If we don't have a new enough Autoconf to choose the best grep
10040# available, choose the one first in the user's PATH.
10041m4_defun([_LT_DECL_EGREP],
10042[AC_REQUIRE([AC_PROG_EGREP])dnl
10043AC_REQUIRE([AC_PROG_FGREP])dnl
10044test -z "$GREP" && GREP=grep
10045_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
10046_LT_DECL([], [EGREP], [1], [An ERE matcher])
10047_LT_DECL([], [FGREP], [1], [A literal string matcher])
10048dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
10049AC_SUBST([GREP])
10050])
10051
10052
10053# _LT_DECL_OBJDUMP
10054# --------------
10055# If we don't have a new enough Autoconf to choose the best objdump
10056# available, choose the one first in the user's PATH.
10057m4_defun([_LT_DECL_OBJDUMP],
10058[AC_CHECK_TOOL(OBJDUMP, objdump, false)
10059test -z "$OBJDUMP" && OBJDUMP=objdump
10060_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
10061AC_SUBST([OBJDUMP])
10062])
10063
10064# _LT_DECL_DLLTOOL
10065# ----------------
10066# Ensure DLLTOOL variable is set.
10067m4_defun([_LT_DECL_DLLTOOL],
10068[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
10069test -z "$DLLTOOL" && DLLTOOL=dlltool
10070_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
10071AC_SUBST([DLLTOOL])
10072])
10073
10074# _LT_DECL_SED
10075# ------------
10076# Check for a fully-functional sed program, that truncates
10077# as few characters as possible.  Prefer GNU sed if found.
10078m4_defun([_LT_DECL_SED],
10079[AC_PROG_SED
10080test -z "$SED" && SED=sed
10081Xsed="$SED -e 1s/^X//"
10082_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
10083_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
10084    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
10085])# _LT_DECL_SED
10086
10087m4_ifndef([AC_PROG_SED], [
10088# NOTE: This macro has been submitted for inclusion into   #
10089#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
10090#  a released version of Autoconf we should remove this    #
10091#  macro and use it instead.                               #
10092
10093m4_defun([AC_PROG_SED],
10094[AC_MSG_CHECKING([for a sed that does not truncate output])
10095AC_CACHE_VAL(lt_cv_path_SED,
10096[# Loop through the user's path and test for sed and gsed.
10097# Then use that list of sed's as ones to test for truncation.
10098as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10099for as_dir in $PATH
10100do
10101  IFS=$as_save_IFS
10102  test -z "$as_dir" && as_dir=.
10103  for lt_ac_prog in sed gsed; do
10104    for ac_exec_ext in '' $ac_executable_extensions; do
10105      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
10106        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
10107      fi
10108    done
10109  done
10110done
10111IFS=$as_save_IFS
10112lt_ac_max=0
10113lt_ac_count=0
10114# Add /usr/xpg4/bin/sed as it is typically found on Solaris
10115# along with /bin/sed that truncates output.
10116for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
10117  test ! -f "$lt_ac_sed" && continue
10118  cat /dev/null > conftest.in
10119  lt_ac_count=0
10120  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
10121  # Check for GNU sed and select it if it is found.
10122  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
10123    lt_cv_path_SED=$lt_ac_sed
10124    break
10125  fi
10126  while true; do
10127    cat conftest.in conftest.in >conftest.tmp
10128    mv conftest.tmp conftest.in
10129    cp conftest.in conftest.nl
10130    echo >>conftest.nl
10131    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
10132    cmp -s conftest.out conftest.nl || break
10133    # 10000 chars as input seems more than enough
10134    test 10 -lt "$lt_ac_count" && break
10135    lt_ac_count=`expr $lt_ac_count + 1`
10136    if test "$lt_ac_count" -gt "$lt_ac_max"; then
10137      lt_ac_max=$lt_ac_count
10138      lt_cv_path_SED=$lt_ac_sed
10139    fi
10140  done
10141done
10142])
10143SED=$lt_cv_path_SED
10144AC_SUBST([SED])
10145AC_MSG_RESULT([$SED])
10146])#AC_PROG_SED
10147])#m4_ifndef
10148
10149# Old name:
10150AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
10151dnl aclocal-1.4 backwards compatibility:
10152dnl AC_DEFUN([LT_AC_PROG_SED], [])
10153
10154
10155# _LT_CHECK_SHELL_FEATURES
10156# ------------------------
10157# Find out whether the shell is Bourne or XSI compatible,
10158# or has some other useful features.
10159m4_defun([_LT_CHECK_SHELL_FEATURES],
10160[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
10161  lt_unset=unset
10162else
10163  lt_unset=false
10164fi
10165_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
10166
10167# test EBCDIC or ASCII
10168case `echo X|tr X '\101'` in
10169 A) # ASCII based system
10170    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
10171  lt_SP2NL='tr \040 \012'
10172  lt_NL2SP='tr \015\012 \040\040'
10173  ;;
10174 *) # EBCDIC based system
10175  lt_SP2NL='tr \100 \n'
10176  lt_NL2SP='tr \r\n \100\100'
10177  ;;
10178esac
10179_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
10180_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
10181])# _LT_CHECK_SHELL_FEATURES
10182
10183
10184# _LT_PATH_CONVERSION_FUNCTIONS
10185# -----------------------------
10186# Determine what file name conversion functions should be used by
10187# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
10188# for certain cross-compile configurations and native mingw.
10189m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
10190[AC_REQUIRE([AC_CANONICAL_HOST])dnl
10191AC_REQUIRE([AC_CANONICAL_BUILD])dnl
10192AC_MSG_CHECKING([how to convert $build file names to $host format])
10193AC_CACHE_VAL(lt_cv_to_host_file_cmd,
10194[case $host in
10195  *-*-mingw* )
10196    case $build in
10197      *-*-mingw* ) # actually msys
10198        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
10199        ;;
10200      *-*-cygwin* )
10201        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
10202        ;;
10203      * ) # otherwise, assume *nix
10204        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
10205        ;;
10206    esac
10207    ;;
10208  *-*-cygwin* )
10209    case $build in
10210      *-*-mingw* ) # actually msys
10211        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
10212        ;;
10213      *-*-cygwin* )
10214        lt_cv_to_host_file_cmd=func_convert_file_noop
10215        ;;
10216      * ) # otherwise, assume *nix
10217        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
10218        ;;
10219    esac
10220    ;;
10221  * ) # unhandled hosts (and "normal" native builds)
10222    lt_cv_to_host_file_cmd=func_convert_file_noop
10223    ;;
10224esac
10225])
10226to_host_file_cmd=$lt_cv_to_host_file_cmd
10227AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
10228_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
10229         [0], [convert $build file names to $host format])dnl
10230
10231AC_MSG_CHECKING([how to convert $build file names to toolchain format])
10232AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
10233[#assume ordinary cross tools, or native build.
10234lt_cv_to_tool_file_cmd=func_convert_file_noop
10235case $host in
10236  *-*-mingw* )
10237    case $build in
10238      *-*-mingw* ) # actually msys
10239        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
10240        ;;
10241    esac
10242    ;;
10243esac
10244])
10245to_tool_file_cmd=$lt_cv_to_tool_file_cmd
10246AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
10247_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
10248         [0], [convert $build files to toolchain format])dnl
10249])# _LT_PATH_CONVERSION_FUNCTIONS
10250
10251# Helper functions for option handling.                    -*- Autoconf -*-
10252#
10253#   Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software
10254#   Foundation, Inc.
10255#   Written by Gary V. Vaughan, 2004
10256#
10257# This file is free software; the Free Software Foundation gives
10258# unlimited permission to copy and/or distribute it, with or without
10259# modifications, as long as this notice is preserved.
10260
10261# serial 8 ltoptions.m4
10262
10263# This is to help aclocal find these macros, as it can't see m4_define.
10264AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
10265
10266
10267# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
10268# ------------------------------------------
10269m4_define([_LT_MANGLE_OPTION],
10270[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
10271
10272
10273# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
10274# ---------------------------------------
10275# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
10276# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
10277# saved as a flag.
10278m4_define([_LT_SET_OPTION],
10279[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
10280m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
10281        _LT_MANGLE_DEFUN([$1], [$2]),
10282    [m4_warning([Unknown $1 option '$2'])])[]dnl
10283])
10284
10285
10286# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
10287# ------------------------------------------------------------
10288# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
10289m4_define([_LT_IF_OPTION],
10290[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
10291
10292
10293# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
10294# -------------------------------------------------------
10295# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
10296# are set.
10297m4_define([_LT_UNLESS_OPTIONS],
10298[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
10299	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
10300		      [m4_define([$0_found])])])[]dnl
10301m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
10302])[]dnl
10303])
10304
10305
10306# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
10307# ----------------------------------------
10308# OPTION-LIST is a space-separated list of Libtool options associated
10309# with MACRO-NAME.  If any OPTION has a matching handler declared with
10310# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
10311# the unknown option and exit.
10312m4_defun([_LT_SET_OPTIONS],
10313[# Set options
10314m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
10315    [_LT_SET_OPTION([$1], _LT_Option)])
10316
10317m4_if([$1],[LT_INIT],[
10318  dnl
10319  dnl Simply set some default values (i.e off) if boolean options were not
10320  dnl specified:
10321  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
10322  ])
10323  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
10324  ])
10325  dnl
10326  dnl If no reference was made to various pairs of opposing options, then
10327  dnl we run the default mode handler for the pair.  For example, if neither
10328  dnl 'shared' nor 'disable-shared' was passed, we enable building of shared
10329  dnl archives by default:
10330  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
10331  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
10332  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
10333  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
10334		   [_LT_ENABLE_FAST_INSTALL])
10335  _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4],
10336		   [_LT_WITH_AIX_SONAME([aix])])
10337  ])
10338])# _LT_SET_OPTIONS
10339
10340
10341
10342# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
10343# -----------------------------------------
10344m4_define([_LT_MANGLE_DEFUN],
10345[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
10346
10347
10348# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
10349# -----------------------------------------------
10350m4_define([LT_OPTION_DEFINE],
10351[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
10352])# LT_OPTION_DEFINE
10353
10354
10355# dlopen
10356# ------
10357LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
10358])
10359
10360AU_DEFUN([AC_LIBTOOL_DLOPEN],
10361[_LT_SET_OPTION([LT_INIT], [dlopen])
10362AC_DIAGNOSE([obsolete],
10363[$0: Remove this warning and the call to _LT_SET_OPTION when you
10364put the 'dlopen' option into LT_INIT's first parameter.])
10365])
10366
10367dnl aclocal-1.4 backwards compatibility:
10368dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
10369
10370
10371# win32-dll
10372# ---------
10373# Declare package support for building win32 dll's.
10374LT_OPTION_DEFINE([LT_INIT], [win32-dll],
10375[enable_win32_dll=yes
10376
10377case $host in
10378*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
10379  AC_CHECK_TOOL(AS, as, false)
10380  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
10381  AC_CHECK_TOOL(OBJDUMP, objdump, false)
10382  ;;
10383esac
10384
10385test -z "$AS" && AS=as
10386_LT_DECL([], [AS],      [1], [Assembler program])dnl
10387
10388test -z "$DLLTOOL" && DLLTOOL=dlltool
10389_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
10390
10391test -z "$OBJDUMP" && OBJDUMP=objdump
10392_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
10393])# win32-dll
10394
10395AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
10396[AC_REQUIRE([AC_CANONICAL_HOST])dnl
10397_LT_SET_OPTION([LT_INIT], [win32-dll])
10398AC_DIAGNOSE([obsolete],
10399[$0: Remove this warning and the call to _LT_SET_OPTION when you
10400put the 'win32-dll' option into LT_INIT's first parameter.])
10401])
10402
10403dnl aclocal-1.4 backwards compatibility:
10404dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
10405
10406
10407# _LT_ENABLE_SHARED([DEFAULT])
10408# ----------------------------
10409# implement the --enable-shared flag, and supports the 'shared' and
10410# 'disable-shared' LT_INIT options.
10411# DEFAULT is either 'yes' or 'no'.  If omitted, it defaults to 'yes'.
10412m4_define([_LT_ENABLE_SHARED],
10413[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
10414AC_ARG_ENABLE([shared],
10415    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
10416	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
10417    [p=${PACKAGE-default}
10418    case $enableval in
10419    yes) enable_shared=yes ;;
10420    no) enable_shared=no ;;
10421    *)
10422      enable_shared=no
10423      # Look at the argument we got.  We use all the common list separators.
10424      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10425      for pkg in $enableval; do
10426	IFS=$lt_save_ifs
10427	if test "X$pkg" = "X$p"; then
10428	  enable_shared=yes
10429	fi
10430      done
10431      IFS=$lt_save_ifs
10432      ;;
10433    esac],
10434    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
10435
10436    _LT_DECL([build_libtool_libs], [enable_shared], [0],
10437	[Whether or not to build shared libraries])
10438])# _LT_ENABLE_SHARED
10439
10440LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
10441LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
10442
10443# Old names:
10444AC_DEFUN([AC_ENABLE_SHARED],
10445[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
10446])
10447
10448AC_DEFUN([AC_DISABLE_SHARED],
10449[_LT_SET_OPTION([LT_INIT], [disable-shared])
10450])
10451
10452AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
10453AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
10454
10455dnl aclocal-1.4 backwards compatibility:
10456dnl AC_DEFUN([AM_ENABLE_SHARED], [])
10457dnl AC_DEFUN([AM_DISABLE_SHARED], [])
10458
10459
10460
10461# _LT_ENABLE_STATIC([DEFAULT])
10462# ----------------------------
10463# implement the --enable-static flag, and support the 'static' and
10464# 'disable-static' LT_INIT options.
10465# DEFAULT is either 'yes' or 'no'.  If omitted, it defaults to 'yes'.
10466m4_define([_LT_ENABLE_STATIC],
10467[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
10468AC_ARG_ENABLE([static],
10469    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
10470	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
10471    [p=${PACKAGE-default}
10472    case $enableval in
10473    yes) enable_static=yes ;;
10474    no) enable_static=no ;;
10475    *)
10476     enable_static=no
10477      # Look at the argument we got.  We use all the common list separators.
10478      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10479      for pkg in $enableval; do
10480	IFS=$lt_save_ifs
10481	if test "X$pkg" = "X$p"; then
10482	  enable_static=yes
10483	fi
10484      done
10485      IFS=$lt_save_ifs
10486      ;;
10487    esac],
10488    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
10489
10490    _LT_DECL([build_old_libs], [enable_static], [0],
10491	[Whether or not to build static libraries])
10492])# _LT_ENABLE_STATIC
10493
10494LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
10495LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
10496
10497# Old names:
10498AC_DEFUN([AC_ENABLE_STATIC],
10499[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
10500])
10501
10502AC_DEFUN([AC_DISABLE_STATIC],
10503[_LT_SET_OPTION([LT_INIT], [disable-static])
10504])
10505
10506AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
10507AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
10508
10509dnl aclocal-1.4 backwards compatibility:
10510dnl AC_DEFUN([AM_ENABLE_STATIC], [])
10511dnl AC_DEFUN([AM_DISABLE_STATIC], [])
10512
10513
10514
10515# _LT_ENABLE_FAST_INSTALL([DEFAULT])
10516# ----------------------------------
10517# implement the --enable-fast-install flag, and support the 'fast-install'
10518# and 'disable-fast-install' LT_INIT options.
10519# DEFAULT is either 'yes' or 'no'.  If omitted, it defaults to 'yes'.
10520m4_define([_LT_ENABLE_FAST_INSTALL],
10521[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
10522AC_ARG_ENABLE([fast-install],
10523    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
10524    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
10525    [p=${PACKAGE-default}
10526    case $enableval in
10527    yes) enable_fast_install=yes ;;
10528    no) enable_fast_install=no ;;
10529    *)
10530      enable_fast_install=no
10531      # Look at the argument we got.  We use all the common list separators.
10532      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10533      for pkg in $enableval; do
10534	IFS=$lt_save_ifs
10535	if test "X$pkg" = "X$p"; then
10536	  enable_fast_install=yes
10537	fi
10538      done
10539      IFS=$lt_save_ifs
10540      ;;
10541    esac],
10542    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
10543
10544_LT_DECL([fast_install], [enable_fast_install], [0],
10545	 [Whether or not to optimize for fast installation])dnl
10546])# _LT_ENABLE_FAST_INSTALL
10547
10548LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
10549LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
10550
10551# Old names:
10552AU_DEFUN([AC_ENABLE_FAST_INSTALL],
10553[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
10554AC_DIAGNOSE([obsolete],
10555[$0: Remove this warning and the call to _LT_SET_OPTION when you put
10556the 'fast-install' option into LT_INIT's first parameter.])
10557])
10558
10559AU_DEFUN([AC_DISABLE_FAST_INSTALL],
10560[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
10561AC_DIAGNOSE([obsolete],
10562[$0: Remove this warning and the call to _LT_SET_OPTION when you put
10563the 'disable-fast-install' option into LT_INIT's first parameter.])
10564])
10565
10566dnl aclocal-1.4 backwards compatibility:
10567dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
10568dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
10569
10570
10571# _LT_WITH_AIX_SONAME([DEFAULT])
10572# ----------------------------------
10573# implement the --with-aix-soname flag, and support the `aix-soname=aix'
10574# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT
10575# is either `aix', `both' or `svr4'.  If omitted, it defaults to `aix'.
10576m4_define([_LT_WITH_AIX_SONAME],
10577[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl
10578shared_archive_member_spec=
10579case $host,$enable_shared in
10580power*-*-aix[[5-9]]*,yes)
10581  AC_MSG_CHECKING([which variant of shared library versioning to provide])
10582  AC_ARG_WITH([aix-soname],
10583    [AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
10584      [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])],
10585    [case $withval in
10586    aix|svr4|both)
10587      ;;
10588    *)
10589      AC_MSG_ERROR([Unknown argument to --with-aix-soname])
10590      ;;
10591    esac
10592    lt_cv_with_aix_soname=$with_aix_soname],
10593    [AC_CACHE_VAL([lt_cv_with_aix_soname],
10594      [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)
10595    with_aix_soname=$lt_cv_with_aix_soname])
10596  AC_MSG_RESULT([$with_aix_soname])
10597  if test aix != "$with_aix_soname"; then
10598    # For the AIX way of multilib, we name the shared archive member
10599    # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
10600    # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
10601    # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
10602    # the AIX toolchain works better with OBJECT_MODE set (default 32).
10603    if test 64 = "${OBJECT_MODE-32}"; then
10604      shared_archive_member_spec=shr_64
10605    else
10606      shared_archive_member_spec=shr
10607    fi
10608  fi
10609  ;;
10610*)
10611  with_aix_soname=aix
10612  ;;
10613esac
10614
10615_LT_DECL([], [shared_archive_member_spec], [0],
10616    [Shared archive member basename, for filename based shared library versioning on AIX])dnl
10617])# _LT_WITH_AIX_SONAME
10618
10619LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])])
10620LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])])
10621LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])])
10622
10623
10624# _LT_WITH_PIC([MODE])
10625# --------------------
10626# implement the --with-pic flag, and support the 'pic-only' and 'no-pic'
10627# LT_INIT options.
10628# MODE is either 'yes' or 'no'.  If omitted, it defaults to 'both'.
10629m4_define([_LT_WITH_PIC],
10630[AC_ARG_WITH([pic],
10631    [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
10632	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
10633    [lt_p=${PACKAGE-default}
10634    case $withval in
10635    yes|no) pic_mode=$withval ;;
10636    *)
10637      pic_mode=default
10638      # Look at the argument we got.  We use all the common list separators.
10639      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10640      for lt_pkg in $withval; do
10641	IFS=$lt_save_ifs
10642	if test "X$lt_pkg" = "X$lt_p"; then
10643	  pic_mode=yes
10644	fi
10645      done
10646      IFS=$lt_save_ifs
10647      ;;
10648    esac],
10649    [pic_mode=m4_default([$1], [default])])
10650
10651_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
10652])# _LT_WITH_PIC
10653
10654LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
10655LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
10656
10657# Old name:
10658AU_DEFUN([AC_LIBTOOL_PICMODE],
10659[_LT_SET_OPTION([LT_INIT], [pic-only])
10660AC_DIAGNOSE([obsolete],
10661[$0: Remove this warning and the call to _LT_SET_OPTION when you
10662put the 'pic-only' option into LT_INIT's first parameter.])
10663])
10664
10665dnl aclocal-1.4 backwards compatibility:
10666dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
10667
10668
10669m4_define([_LTDL_MODE], [])
10670LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
10671		 [m4_define([_LTDL_MODE], [nonrecursive])])
10672LT_OPTION_DEFINE([LTDL_INIT], [recursive],
10673		 [m4_define([_LTDL_MODE], [recursive])])
10674LT_OPTION_DEFINE([LTDL_INIT], [subproject],
10675		 [m4_define([_LTDL_MODE], [subproject])])
10676
10677m4_define([_LTDL_TYPE], [])
10678LT_OPTION_DEFINE([LTDL_INIT], [installable],
10679		 [m4_define([_LTDL_TYPE], [installable])])
10680LT_OPTION_DEFINE([LTDL_INIT], [convenience],
10681		 [m4_define([_LTDL_TYPE], [convenience])])
10682
10683# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
10684#
10685# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software
10686# Foundation, Inc.
10687# Written by Gary V. Vaughan, 2004
10688#
10689# This file is free software; the Free Software Foundation gives
10690# unlimited permission to copy and/or distribute it, with or without
10691# modifications, as long as this notice is preserved.
10692
10693# serial 6 ltsugar.m4
10694
10695# This is to help aclocal find these macros, as it can't see m4_define.
10696AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
10697
10698
10699# lt_join(SEP, ARG1, [ARG2...])
10700# -----------------------------
10701# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
10702# associated separator.
10703# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
10704# versions in m4sugar had bugs.
10705m4_define([lt_join],
10706[m4_if([$#], [1], [],
10707       [$#], [2], [[$2]],
10708       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
10709m4_define([_lt_join],
10710[m4_if([$#$2], [2], [],
10711       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
10712
10713
10714# lt_car(LIST)
10715# lt_cdr(LIST)
10716# ------------
10717# Manipulate m4 lists.
10718# These macros are necessary as long as will still need to support
10719# Autoconf-2.59, which quotes differently.
10720m4_define([lt_car], [[$1]])
10721m4_define([lt_cdr],
10722[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
10723       [$#], 1, [],
10724       [m4_dquote(m4_shift($@))])])
10725m4_define([lt_unquote], $1)
10726
10727
10728# lt_append(MACRO-NAME, STRING, [SEPARATOR])
10729# ------------------------------------------
10730# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'.
10731# Note that neither SEPARATOR nor STRING are expanded; they are appended
10732# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
10733# No SEPARATOR is output if MACRO-NAME was previously undefined (different
10734# than defined and empty).
10735#
10736# This macro is needed until we can rely on Autoconf 2.62, since earlier
10737# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
10738m4_define([lt_append],
10739[m4_define([$1],
10740	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
10741
10742
10743
10744# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
10745# ----------------------------------------------------------
10746# Produce a SEP delimited list of all paired combinations of elements of
10747# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
10748# has the form PREFIXmINFIXSUFFIXn.
10749# Needed until we can rely on m4_combine added in Autoconf 2.62.
10750m4_define([lt_combine],
10751[m4_if(m4_eval([$# > 3]), [1],
10752       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
10753[[m4_foreach([_Lt_prefix], [$2],
10754	     [m4_foreach([_Lt_suffix],
10755		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
10756	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
10757
10758
10759# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
10760# -----------------------------------------------------------------------
10761# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
10762# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
10763m4_define([lt_if_append_uniq],
10764[m4_ifdef([$1],
10765	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
10766		 [lt_append([$1], [$2], [$3])$4],
10767		 [$5])],
10768	  [lt_append([$1], [$2], [$3])$4])])
10769
10770
10771# lt_dict_add(DICT, KEY, VALUE)
10772# -----------------------------
10773m4_define([lt_dict_add],
10774[m4_define([$1($2)], [$3])])
10775
10776
10777# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
10778# --------------------------------------------
10779m4_define([lt_dict_add_subkey],
10780[m4_define([$1($2:$3)], [$4])])
10781
10782
10783# lt_dict_fetch(DICT, KEY, [SUBKEY])
10784# ----------------------------------
10785m4_define([lt_dict_fetch],
10786[m4_ifval([$3],
10787	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
10788    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
10789
10790
10791# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
10792# -----------------------------------------------------------------
10793m4_define([lt_if_dict_fetch],
10794[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
10795	[$5],
10796    [$6])])
10797
10798
10799# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
10800# --------------------------------------------------------------
10801m4_define([lt_dict_filter],
10802[m4_if([$5], [], [],
10803  [lt_join(m4_quote(m4_default([$4], [[, ]])),
10804           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
10805		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
10806])
10807
10808# ltversion.m4 -- version numbers			-*- Autoconf -*-
10809#
10810#   Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc.
10811#   Written by Scott James Remnant, 2004
10812#
10813# This file is free software; the Free Software Foundation gives
10814# unlimited permission to copy and/or distribute it, with or without
10815# modifications, as long as this notice is preserved.
10816
10817# @configure_input@
10818
10819# serial 4179 ltversion.m4
10820# This file is part of GNU Libtool
10821
10822m4_define([LT_PACKAGE_VERSION], [2.4.6])
10823m4_define([LT_PACKAGE_REVISION], [2.4.6])
10824
10825AC_DEFUN([LTVERSION_VERSION],
10826[macro_version='2.4.6'
10827macro_revision='2.4.6'
10828_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
10829_LT_DECL(, macro_revision, 0)
10830])
10831
10832# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
10833#
10834#   Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software
10835#   Foundation, Inc.
10836#   Written by Scott James Remnant, 2004.
10837#
10838# This file is free software; the Free Software Foundation gives
10839# unlimited permission to copy and/or distribute it, with or without
10840# modifications, as long as this notice is preserved.
10841
10842# serial 5 lt~obsolete.m4
10843
10844# These exist entirely to fool aclocal when bootstrapping libtool.
10845#
10846# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN),
10847# which have later been changed to m4_define as they aren't part of the
10848# exported API, or moved to Autoconf or Automake where they belong.
10849#
10850# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
10851# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
10852# using a macro with the same name in our local m4/libtool.m4 it'll
10853# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
10854# and doesn't know about Autoconf macros at all.)
10855#
10856# So we provide this file, which has a silly filename so it's always
10857# included after everything else.  This provides aclocal with the
10858# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
10859# because those macros already exist, or will be overwritten later.
10860# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
10861#
10862# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
10863# Yes, that means every name once taken will need to remain here until
10864# we give up compatibility with versions before 1.7, at which point
10865# we need to keep only those names which we still refer to.
10866
10867# This is to help aclocal find these macros, as it can't see m4_define.
10868AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
10869
10870m4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
10871m4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
10872m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
10873m4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
10874m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
10875m4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
10876m4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
10877m4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
10878m4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
10879m4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
10880m4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
10881m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
10882m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
10883m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
10884m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
10885m4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
10886m4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
10887m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
10888m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
10889m4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
10890m4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
10891m4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
10892m4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
10893m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
10894m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
10895m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
10896m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
10897m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
10898m4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
10899m4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
10900m4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
10901m4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
10902m4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
10903m4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
10904m4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
10905m4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
10906m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
10907m4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
10908m4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
10909m4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
10910m4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
10911m4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
10912m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
10913m4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
10914m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
10915m4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
10916m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
10917m4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
10918m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
10919m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
10920m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
10921m4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
10922m4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
10923m4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
10924m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS],	[AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
10925m4_ifndef([_LT_AC_PROG_CXXCPP],		[AC_DEFUN([_LT_AC_PROG_CXXCPP])])
10926m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS],	[AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
10927m4_ifndef([_LT_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
10928m4_ifndef([_LT_PROG_F77],		[AC_DEFUN([_LT_PROG_F77])])
10929m4_ifndef([_LT_PROG_FC],		[AC_DEFUN([_LT_PROG_FC])])
10930m4_ifndef([_LT_PROG_CXX],		[AC_DEFUN([_LT_PROG_CXX])])
10931
10932# nls.m4 serial 5 (gettext-0.18)
10933dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014, 2016 Free Software
10934dnl Foundation, Inc.
10935dnl This file is free software; the Free Software Foundation
10936dnl gives unlimited permission to copy and/or distribute it,
10937dnl with or without modifications, as long as this notice is preserved.
10938dnl
10939dnl This file can be used in projects which are not available under
10940dnl the GNU General Public License or the GNU Library General Public
10941dnl License but which still want to provide support for the GNU gettext
10942dnl functionality.
10943dnl Please note that the actual code of the GNU gettext library is covered
10944dnl by the GNU Library General Public License, and the rest of the GNU
10945dnl gettext package is covered by the GNU General Public License.
10946dnl They are *not* in the public domain.
10947
10948dnl Authors:
10949dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
10950dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
10951
10952AC_PREREQ([2.50])
10953
10954AC_DEFUN([AM_NLS],
10955[
10956  AC_MSG_CHECKING([whether NLS is requested])
10957  dnl Default is enabled NLS
10958  AC_ARG_ENABLE([nls],
10959    [  --disable-nls           do not use Native Language Support],
10960    USE_NLS=$enableval, USE_NLS=yes)
10961  AC_MSG_RESULT([$USE_NLS])
10962  AC_SUBST([USE_NLS])
10963])
10964
10965dnl pkg.m4 - Macros to locate and utilise pkg-config.   -*- Autoconf -*-
10966dnl serial 11 (pkg-config-0.29.1)
10967dnl
10968dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
10969dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
10970dnl
10971dnl This program is free software; you can redistribute it and/or modify
10972dnl it under the terms of the GNU General Public License as published by
10973dnl the Free Software Foundation; either version 2 of the License, or
10974dnl (at your option) any later version.
10975dnl
10976dnl This program is distributed in the hope that it will be useful, but
10977dnl WITHOUT ANY WARRANTY; without even the implied warranty of
10978dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10979dnl General Public License for more details.
10980dnl
10981dnl You should have received a copy of the GNU General Public License
10982dnl along with this program; if not, write to the Free Software
10983dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
10984dnl 02111-1307, USA.
10985dnl
10986dnl As a special exception to the GNU General Public License, if you
10987dnl distribute this file as part of a program that contains a
10988dnl configuration script generated by Autoconf, you may include it under
10989dnl the same distribution terms that you use for the rest of that
10990dnl program.
10991
10992dnl PKG_PREREQ(MIN-VERSION)
10993dnl -----------------------
10994dnl Since: 0.29
10995dnl
10996dnl Verify that the version of the pkg-config macros are at least
10997dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
10998dnl installed version of pkg-config, this checks the developer's version
10999dnl of pkg.m4 when generating configure.
11000dnl
11001dnl To ensure that this macro is defined, also add:
11002dnl m4_ifndef([PKG_PREREQ],
11003dnl     [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
11004dnl
11005dnl See the "Since" comment for each macro you use to see what version
11006dnl of the macros you require.
11007m4_defun([PKG_PREREQ],
11008[m4_define([PKG_MACROS_VERSION], [0.29.1])
11009m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
11010    [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
11011])dnl PKG_PREREQ
11012
11013dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
11014dnl ----------------------------------
11015dnl Since: 0.16
11016dnl
11017dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
11018dnl first found in the path. Checks that the version of pkg-config found
11019dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
11020dnl used since that's the first version where most current features of
11021dnl pkg-config existed.
11022AC_DEFUN([PKG_PROG_PKG_CONFIG],
11023[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
11024m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
11025m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
11026AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
11027AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
11028AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
11029
11030if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
11031	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
11032fi
11033if test -n "$PKG_CONFIG"; then
11034	_pkg_min_version=m4_default([$1], [0.9.0])
11035	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
11036	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
11037		AC_MSG_RESULT([yes])
11038	else
11039		AC_MSG_RESULT([no])
11040		PKG_CONFIG=""
11041	fi
11042fi[]dnl
11043])dnl PKG_PROG_PKG_CONFIG
11044
11045dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
11046dnl -------------------------------------------------------------------
11047dnl Since: 0.18
11048dnl
11049dnl Check to see whether a particular set of modules exists. Similar to
11050dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
11051dnl
11052dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
11053dnl only at the first occurence in configure.ac, so if the first place
11054dnl it's called might be skipped (such as if it is within an "if", you
11055dnl have to call PKG_CHECK_EXISTS manually
11056AC_DEFUN([PKG_CHECK_EXISTS],
11057[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
11058if test -n "$PKG_CONFIG" && \
11059    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
11060  m4_default([$2], [:])
11061m4_ifvaln([$3], [else
11062  $3])dnl
11063fi])
11064
11065dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
11066dnl ---------------------------------------------
11067dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
11068dnl pkg_failed based on the result.
11069m4_define([_PKG_CONFIG],
11070[if test -n "$$1"; then
11071    pkg_cv_[]$1="$$1"
11072 elif test -n "$PKG_CONFIG"; then
11073    PKG_CHECK_EXISTS([$3],
11074                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
11075		      test "x$?" != "x0" && pkg_failed=yes ],
11076		     [pkg_failed=yes])
11077 else
11078    pkg_failed=untried
11079fi[]dnl
11080])dnl _PKG_CONFIG
11081
11082dnl _PKG_SHORT_ERRORS_SUPPORTED
11083dnl ---------------------------
11084dnl Internal check to see if pkg-config supports short errors.
11085AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
11086[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
11087if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
11088        _pkg_short_errors_supported=yes
11089else
11090        _pkg_short_errors_supported=no
11091fi[]dnl
11092])dnl _PKG_SHORT_ERRORS_SUPPORTED
11093
11094
11095dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
11096dnl   [ACTION-IF-NOT-FOUND])
11097dnl --------------------------------------------------------------
11098dnl Since: 0.4.0
11099dnl
11100dnl Note that if there is a possibility the first call to
11101dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
11102dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
11103AC_DEFUN([PKG_CHECK_MODULES],
11104[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
11105AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
11106AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
11107
11108pkg_failed=no
11109AC_MSG_CHECKING([for $1])
11110
11111_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
11112_PKG_CONFIG([$1][_LIBS], [libs], [$2])
11113
11114m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
11115and $1[]_LIBS to avoid the need to call pkg-config.
11116See the pkg-config man page for more details.])
11117
11118if test $pkg_failed = yes; then
11119   	AC_MSG_RESULT([no])
11120        _PKG_SHORT_ERRORS_SUPPORTED
11121        if test $_pkg_short_errors_supported = yes; then
11122	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
11123        else
11124	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
11125        fi
11126	# Put the nasty error message in config.log where it belongs
11127	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
11128
11129	m4_default([$4], [AC_MSG_ERROR(
11130[Package requirements ($2) were not met:
11131
11132$$1_PKG_ERRORS
11133
11134Consider adjusting the PKG_CONFIG_PATH environment variable if you
11135installed software in a non-standard prefix.
11136
11137_PKG_TEXT])[]dnl
11138        ])
11139elif test $pkg_failed = untried; then
11140     	AC_MSG_RESULT([no])
11141	m4_default([$4], [AC_MSG_FAILURE(
11142[The pkg-config script could not be found or is too old.  Make sure it
11143is in your PATH or set the PKG_CONFIG environment variable to the full
11144path to pkg-config.
11145
11146_PKG_TEXT
11147
11148To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
11149        ])
11150else
11151	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
11152	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
11153        AC_MSG_RESULT([yes])
11154	$3
11155fi[]dnl
11156])dnl PKG_CHECK_MODULES
11157
11158
11159dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
11160dnl   [ACTION-IF-NOT-FOUND])
11161dnl ---------------------------------------------------------------------
11162dnl Since: 0.29
11163dnl
11164dnl Checks for existence of MODULES and gathers its build flags with
11165dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
11166dnl and VARIABLE-PREFIX_LIBS from --libs.
11167dnl
11168dnl Note that if there is a possibility the first call to
11169dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
11170dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
11171dnl configure.ac.
11172AC_DEFUN([PKG_CHECK_MODULES_STATIC],
11173[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
11174_save_PKG_CONFIG=$PKG_CONFIG
11175PKG_CONFIG="$PKG_CONFIG --static"
11176PKG_CHECK_MODULES($@)
11177PKG_CONFIG=$_save_PKG_CONFIG[]dnl
11178])dnl PKG_CHECK_MODULES_STATIC
11179
11180
11181dnl PKG_INSTALLDIR([DIRECTORY])
11182dnl -------------------------
11183dnl Since: 0.27
11184dnl
11185dnl Substitutes the variable pkgconfigdir as the location where a module
11186dnl should install pkg-config .pc files. By default the directory is
11187dnl $libdir/pkgconfig, but the default can be changed by passing
11188dnl DIRECTORY. The user can override through the --with-pkgconfigdir
11189dnl parameter.
11190AC_DEFUN([PKG_INSTALLDIR],
11191[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
11192m4_pushdef([pkg_description],
11193    [pkg-config installation directory @<:@]pkg_default[@:>@])
11194AC_ARG_WITH([pkgconfigdir],
11195    [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
11196    [with_pkgconfigdir=]pkg_default)
11197AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
11198m4_popdef([pkg_default])
11199m4_popdef([pkg_description])
11200])dnl PKG_INSTALLDIR
11201
11202
11203dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
11204dnl --------------------------------
11205dnl Since: 0.27
11206dnl
11207dnl Substitutes the variable noarch_pkgconfigdir as the location where a
11208dnl module should install arch-independent pkg-config .pc files. By
11209dnl default the directory is $datadir/pkgconfig, but the default can be
11210dnl changed by passing DIRECTORY. The user can override through the
11211dnl --with-noarch-pkgconfigdir parameter.
11212AC_DEFUN([PKG_NOARCH_INSTALLDIR],
11213[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
11214m4_pushdef([pkg_description],
11215    [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
11216AC_ARG_WITH([noarch-pkgconfigdir],
11217    [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
11218    [with_noarch_pkgconfigdir=]pkg_default)
11219AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
11220m4_popdef([pkg_default])
11221m4_popdef([pkg_description])
11222])dnl PKG_NOARCH_INSTALLDIR
11223
11224
11225dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
11226dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
11227dnl -------------------------------------------
11228dnl Since: 0.28
11229dnl
11230dnl Retrieves the value of the pkg-config variable for the given module.
11231AC_DEFUN([PKG_CHECK_VAR],
11232[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
11233AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
11234
11235_PKG_CONFIG([$1], [variable="][$3]["], [$2])
11236AS_VAR_COPY([$1], [pkg_cv_][$1])
11237
11238AS_VAR_IF([$1], [""], [$5], [$4])dnl
11239])dnl PKG_CHECK_VAR
11240
11241dnl Copyright (c) 2002-2015
11242dnl         The Xfce development team. All rights reserved.
11243dnl
11244dnl Written for Xfce by Benedikt Meurer <benny@xfce.org>.
11245dnl
11246dnl This program is free software; you can redistribute it and/or modify
11247dnl it under the terms of the GNU General Public License as published by
11248dnl the Free Software Foundation; either version 2 of the License, or
11249dnl (at your option) any later version.
11250dnl
11251dnl This program is distributed in the hope that it will be useful,
11252dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
11253dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11254dnl GNU General Public License for more details.
11255dnl
11256dnl You should have received a copy of the GNU General Public License along
11257dnl with this program; if not, write to the Free Software Foundation, Inc.,
11258dnl 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
11259dnl
11260dnl xdt-depends
11261dnl -----------
11262dnl  Contains M4 macros to check for software dependencies.
11263dnl  Partly based on prior work of the XDG contributors.
11264dnl
11265
11266
11267
11268dnl We need recent a autoconf version
11269AC_PREREQ([2.60])
11270
11271
11272
11273dnl XDT_PROG_PKG_CONFIG()
11274dnl
11275dnl Checks for the freedesktop.org pkg-config
11276dnl utility and sets the PKG_CONFIG environment
11277dnl variable to the full path if found.
11278dnl
11279AC_DEFUN([XDT_PROG_PKG_CONFIG],
11280[
11281  # minimum supported version of pkg-config
11282  xdt_cv_PKG_CONFIG_MIN_VERSION=0.9.0
11283
11284  m4_ifdef([PKG_PROG_PKG_CONFIG],
11285    [
11286      PKG_PROG_PKG_CONFIG([$xdt_cv_PKG_CONFIG_MIN_VERSION])
11287
11288      if test x"$PKG_CONFIG" = x""; then
11289        echo
11290        echo "*** Your version of pkg-config is too old. You need atleast"
11291        echo "*** pkg-config $xdt_cv_PKG_CONFIG_MIN_VERSION or newer. You can download pkg-config"
11292        echo "*** from the freedesktop.org software repository at"
11293        echo "***"
11294        echo "***    https://www.freedesktop.org/wiki/Software/pkg-config/"
11295        echo "***"
11296        exit 1;
11297      fi
11298    ],
11299    [
11300      echo
11301      echo "*** The pkg-config utility could not be found on your system."
11302      echo "*** Make sure it is in your path, or set the PKG_CONFIG"
11303      echo "*** environment variable to the full path to pkg-config."
11304      echo "*** You can download pkg-config from the freedesktop.org"
11305      echo "*** software repository at"
11306      echo "***"
11307      echo "***    https://www.freedesktop.org/wiki/Software/pkg-config/"
11308      echo "***"
11309      exit 1
11310    ])
11311])
11312
11313
11314
11315dnl XDT_CHECK_PACKAGE(varname, package, version, [action-if], [action-if-not])
11316dnl
11317dnl Checks if "package" >= "version" is installed on the
11318dnl target system, using the pkg-config utility. If the
11319dnl dependency is met, "varname"_CFLAGS, "varname"_LIBS,
11320dnl "varname"_VERSION and "varname"_REQUIRED_VERSION
11321dnl will be set and marked for substition.
11322dnl
11323dnl "varname"_REQUIRED_VERSION will be set to the value of
11324dnl "version". This is mostly useful to automatically
11325dnl place the correct version information into the RPM
11326dnl .spec file.
11327dnl
11328dnl In addition, if the dependency is met, "action-if" will
11329dnl be executed if given.
11330dnl
11331dnl If the package check fails, "action-if-not" will be
11332dnl executed. If this parameter isn't specified, a diagnostic
11333dnl message will be printed and the configure script will
11334dnl be terminated with exit code 1.
11335dnl
11336AC_DEFUN([XDT_CHECK_PACKAGE],
11337[
11338  XDT_PROG_PKG_CONFIG()
11339
11340  AC_MSG_CHECKING([for $2 >= $3])
11341  if $PKG_CONFIG "--atleast-version=$3" "$2" >/dev/null 2>&1; then
11342    $1_VERSION=`$PKG_CONFIG --modversion "$2"`
11343    AC_MSG_RESULT([$$1_VERSION])
11344
11345    AC_MSG_CHECKING([$1_CFLAGS])
11346    $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
11347    AC_MSG_RESULT([$$1_CFLAGS])
11348
11349    AC_MSG_CHECKING([$1_LIBS])
11350    $1_LIBS=`$PKG_CONFIG --libs "$2"`
11351    AC_MSG_RESULT([$$1_LIBS])
11352
11353    $1_REQUIRED_VERSION=$3
11354
11355    AC_SUBST([$1_VERSION])
11356    AC_SUBST([$1_CFLAGS])
11357    AC_SUBST([$1_LIBS])
11358    AC_SUBST([$1_REQUIRED_VERSION])
11359
11360    ifelse([$4], , , [$4])
11361  elif $PKG_CONFIG --exists "$2" >/dev/null 2>&1; then
11362    xdt_cv_version=`$PKG_CONFIG --modversion "$2"`
11363    AC_MSG_RESULT([found, but $xdt_cv_version])
11364
11365    ifelse([$5], ,
11366    [
11367      echo "*** The required package $2 was found on your system,"
11368      echo "*** but the installed version ($xdt_cv_version) is too old."
11369      echo "*** Please upgrade $2 to atleast version $3, or adjust"
11370      echo "*** the PKG_CONFIG_PATH environment variable if you installed"
11371      echo "*** the new version of the package in a nonstandard prefix so"
11372      echo "*** pkg-config is able to find it."
11373      exit 1
11374    ], [$5])
11375  else
11376    AC_MSG_RESULT([not found])
11377
11378    ifelse([$5], ,
11379    [
11380      echo "*** The required package $2 was not found on your system."
11381      echo "*** Please install $2 (atleast version $3) or adjust"
11382      echo "*** the PKG_CONFIG_PATH environment variable if you"
11383      echo "*** installed the package in a nonstandard prefix so that"
11384      echo "*** pkg-config is able to find it."
11385      exit 1
11386    ], [$5])
11387  fi
11388])
11389
11390
11391
11392dnl XDT_CHECK_OPTIONAL_PACKAGE(varname, package, version, optionname, helpstring, [default])
11393dnl
11394dnl Checks for an optional dependency on "package" >= "version". "default"
11395dnl can be "yes" or "no" (defaults to "yes" if not specified) and controls
11396dnl whether configure should check this dependency by default, or only if
11397dnl the user explicitly enables it using a command line switch.
11398dnl
11399dnl This macro automatically adds a commandline switch based on the "optionname"
11400dnl parameter (--enable-optionname/--disable-optionname), which allows the
11401dnl user to explicitly control whether this optional dependency should be
11402dnl enabled or not. The "helpstring" parameter gives a brief(!) description
11403dnl about this dependency.
11404dnl
11405dnl If the user chose to enable this dependency and the required package
11406dnl was found, this macro defines the variable "varname"_FOUND and sets it
11407dnl to the string "yes", in addition to the 4 variables set by XDT_CHECK_PACKAGE.
11408dnl But "varname"_FOUND will not be marked for substition. Furthermore,
11409dnl a CPP define HAVE_"varname" will be placed in config.h (or added to
11410dnl the cc command line, depending on your configure.ac) and set to
11411dnl 1.
11412dnl
11413AC_DEFUN([XDT_CHECK_OPTIONAL_PACKAGE],
11414[
11415  AC_REQUIRE([XDT_PROG_PKG_CONFIG])
11416
11417  AC_ARG_ENABLE([$4],
11418AC_HELP_STRING([--enable-$4], [Enable checking for $5 (default=m4_default([$6], [yes]))])
11419AC_HELP_STRING([--disable-$4], [Disable checking for $5]),
11420    [xdt_cv_$1_check=$enableval], [xdt_cv_$1_check=m4_default([$6], [yes])])
11421
11422  if test x"$xdt_cv_$1_check" = x"yes"; then
11423    if $PKG_CONFIG --exists "$2 >= $3" >/dev/null 2>&1; then
11424      XDT_CHECK_PACKAGE([$1], [$2], [$3],
11425      [
11426        AC_DEFINE([HAVE_$1], [1], [Define if $2 >= $3 present])
11427        $1_FOUND="yes"
11428      ])
11429    else
11430      AC_MSG_CHECKING([for optional package $2 >= $3])
11431      AC_MSG_RESULT([not found])
11432    fi
11433  else
11434    AC_MSG_CHECKING([for optional package $2])
11435    AC_MSG_RESULT([disabled])
11436  fi
11437
11438  AM_CONDITIONAL([HAVE_$1], [test x"$$1_FOUND" = x"yes"])
11439])
11440
11441
11442
11443dnl XDT_CHECK_LIBX11()
11444dnl
11445dnl Executes various checks for X11. Sets LIBX11_CFLAGS, LIBX11_LDFLAGS
11446dnl and LIBX11_LIBS (and marks them for substitution). In addition
11447dnl HAVE_LIBX11 is set to 1 in config.h, if the X window system and
11448dnl the development files are detected on the target system.
11449dnl
11450AC_DEFUN([XDT_CHECK_LIBX11],
11451[
11452  AC_REQUIRE([AC_PATH_XTRA])
11453
11454  LIBX11_CFLAGS= LIBX11_LDFLAGS= LIBX11_LIBS=
11455  if test x"$no_x" != x"yes"; then
11456    AC_CHECK_LIB([X11], [main],
11457    [
11458      AC_DEFINE([HAVE_LIBX11], [1], [Define if libX11 is available])
11459      LIBX11_CFLAGS="$X_CFLAGS"
11460      for option in $X_PRE_LIBS $X_EXTRA_LIBS $X_LIBS; do
11461      	case "$option" in
11462        -L*)
11463          path=`echo $option | sed 's/^-L//'`
11464          if test x"$path" != x""; then
11465            LIBX11_LDFLAGS="$LIBX11_LDFLAGS -L$path"
11466          fi
11467          ;;
11468        *)
11469          LIBX11_LIBS="$LIBX11_LIBS $option"
11470          ;;
11471        esac
11472      done
11473      if ! echo $LIBX11_LIBS | grep -- '-lX11' >/dev/null; then
11474        LIBX11_LIBS="$LIBX11_LIBS -lX11"
11475      fi
11476    ], [], [$X_CFLAGS $X_PRE_LIBS $X_EXTRA_LIBS $X_LIBS])
11477  fi
11478  AC_SUBST([LIBX11_CFLAGS])
11479  AC_SUBST([LIBX11_LDFLAGS])
11480  AC_SUBST([LIBX11_LIBS])
11481])
11482
11483
11484
11485dnl XDT_CHECK_LIBX11_REQUIRE()
11486dnl
11487dnl Similar to XDT_CHECK_LIBX11(), but terminates with an error if
11488dnl the X window system and development files aren't detected on the
11489dnl target system.
11490dnl
11491AC_DEFUN([XDT_CHECK_LIBX11_REQUIRE],
11492[
11493  AC_REQUIRE([XDT_CHECK_LIBX11])
11494
11495  if test x"$no_x" = x"yes"; then
11496    AC_MSG_ERROR([X Window system libraries and header files are required])
11497  fi
11498])
11499
11500
11501
11502dnl XDT_CHECK_LIBSM()
11503dnl
11504dnl Checks whether the session management library is present on the
11505dnl target system, and sets LIBSM_CFLAGS, LIBSM_LDFLAGS and LIBSM_LIBS
11506dnl properly. In addition, HAVE_LIBSM will be set to 1 in config.h
11507dnl if libSM is detected.
11508dnl
11509AC_DEFUN([XDT_CHECK_LIBSM],
11510[
11511  AC_REQUIRE([XDT_CHECK_LIBX11])
11512
11513  LIBSM_CFLAGS= LIBSM_LDFLAGS= LIBSM_LIBS=
11514  if test x"$no_x" != x"yes"; then
11515    AC_CHECK_LIB([SM], [SmcSaveYourselfDone],
11516    [
11517      AC_DEFINE([HAVE_LIBSM], [1], [Define if libSM is available])
11518      LIBSM_CFLAGS="$LIBX11_CFLAGS"
11519      LIBSM_LDFLAGS="$LIBX11_LDFLAGS"
11520      LIBSM_LIBS="$LIBX11_LIBS"
11521      if ! echo $LIBSM_LIBS | grep -- '-lSM' >/dev/null; then
11522        LIBSM_LIBS="$LIBSM_LIBS -lSM -lICE"
11523      fi
11524    ], [], [$LIBX11_CFLAGS $LIBX11_LDFLAGS $LIBX11_LIBS -lICE])
11525  fi
11526  AC_SUBST([LIBSM_CFLAGS])
11527  AC_SUBST([LIBSM_LDFLAGS])
11528  AC_SUBST([LIBSM_LIBS])
11529])
11530
11531
11532
11533dnl XDT_CHECK_LIBXPM()
11534dnl
11535dnl Checks if the Xpm library is present on the target system, and
11536dnl sets LIBXPM_CFLAGS, LIBXPM_LDFLAGS and LIBXPM_LIBS. In addition,
11537dnl HAVE_LIBXPM will be set to 1 in config.h if libXpm is detected.
11538dnl
11539AC_DEFUN([XDT_CHECK_LIBXPM],
11540[
11541  AC_REQUIRE([XDT_CHECK_LIBX11])
11542
11543  LIBXPM_CFLAGS= LIBXPM_LDFLAGS= LIBXPM_LIBS=
11544  if test "$no_x" != "yes"; then
11545    AC_CHECK_LIB([Xpm], [main],
11546    [
11547      AC_DEFINE([HAVE_LIBXPM], [1], [Define if libXpm is available])
11548      LIBXPM_CFLAGS="$LIBX11_CFLAGS"
11549      LIBXPM_LDFLAGS="$LIBX11_LDFLAGS"
11550      LIBXPM_LIBS="$LIBX11_LIBS"
11551      if ! echo $LIBXPM_LIBS | grep -- '-lXpm' >/dev/null; then
11552        LIBXPM_LIBS="$LIBXPM_LIBS -lXpm"
11553      fi
11554    ], [], [$LIBX11_CFLAGS $LIBX11_LDFLAGS $LIBX11_LIBS -lXpm])
11555  fi
11556  AC_SUBST([LIBXPM_CFLAGS])
11557  AC_SUBST([LIBXPM_LDFLAGS])
11558  AC_SUBST([LIBXPM_LIBS])
11559])
11560
11561
11562
11563dnl XDT_CHECK_LIBXPM_REQUIRE()
11564dnl
11565dnl Similar to XDT_CHECK_LIBXPM(), but fails if the Xpm library isn't
11566dnl present on the target system.
11567dnl
11568AC_DEFUN([XDT_CHECK_LIBXPM_REQUIRE],
11569[
11570  AC_REQUIRE([XDT_CHECK_LIBX11_REQUIRE])
11571  AC_REQUIRE([XDT_CHECK_LIBXPM])
11572
11573  if test x"$LIBXPM_LIBS" = x""; then
11574    AC_MSG_ERROR([The Xpm library was not found on your system])
11575  fi
11576])
11577
11578
11579dnl Copyright (c) 2002-2015
11580dnl         The Xfce development team. All rights reserved.
11581dnl
11582dnl Written for Xfce by Benedikt Meurer <benny@xfce.org>.
11583dnl
11584dnl This program is free software; you can redistribute it and/or modify
11585dnl it under the terms of the GNU General Public License as published by
11586dnl the Free Software Foundation; either version 2 of the License, or
11587dnl (at your option) any later version.
11588dnl
11589dnl This program is distributed in the hope that it will be useful,
11590dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
11591dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11592dnl GNU General Public License for more details.
11593dnl
11594dnl You should have received a copy of the GNU General Public License along
11595dnl with this program; if not, write to the Free Software Foundation, Inc.,
11596dnl 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
11597dnl
11598dnl xdt-depends
11599dnl -----------
11600dnl  Contains M4 macros to check for software dependencies.
11601dnl  Partly based on prior work of the XDG contributors.
11602dnl
11603
11604
11605
11606dnl We need recent a autoconf version
11607AC_PREREQ([2.60])
11608
11609
11610dnl XDT_SUPPORTED_FLAGS(VAR, FLAGS)
11611dnl
11612dnl For each token in FLAGS, checks to be sure the compiler supports
11613dnl the flag, and if so, adds each one to VAR.
11614dnl
11615AC_DEFUN([XDT_SUPPORTED_FLAGS],
11616[
11617  for flag in $2; do
11618    AC_MSG_CHECKING([if $CC supports $flag])
11619    saved_CFLAGS="$CFLAGS"
11620    CFLAGS="$CFLAGS $flag"
11621    AC_COMPILE_IFELSE([AC_LANG_SOURCE([ ])], [flag_supported=yes], [flag_supported=no])
11622    CFLAGS="$saved_CFLAGS"
11623    AC_MSG_RESULT([$flag_supported])
11624
11625    if test "x$flag_supported" = "xyes"; then
11626      $1="$$1 $flag"
11627    fi
11628  done
11629])
11630
11631
11632
11633dnl XDT_FEATURE_DEBUG(default_level=minimum)
11634dnl
11635AC_DEFUN([XDT_FEATURE_DEBUG],
11636[
11637  dnl weird indentation to keep output indentation correct
11638  AC_ARG_ENABLE([debug],
11639                AC_HELP_STRING([--enable-debug@<:@=no|minimum|yes|full@:>@],
11640                               [Build with debugging support @<:@default=m4_default([$1], [minimum])@:>@])
11641AC_HELP_STRING([--disable-debug], [Include no debugging support]),
11642                [enable_debug=$enableval], [enable_debug=m4_default([$1], [minimum])])
11643
11644  AC_MSG_CHECKING([whether to build with debugging support])
11645  if test x"$enable_debug" = x"full" -o x"$enable_debug" = x"yes"; then
11646    AC_DEFINE([DEBUG], [1], [Define for debugging support])
11647
11648    xdt_cv_additional_CFLAGS="-DXFCE_DISABLE_DEPRECATED \
11649                              -Wall -Wextra \
11650                              -Wno-missing-field-initializers \
11651                              -Wno-unused-parameter -Wold-style-definition \
11652                              -Wdeclaration-after-statement \
11653                              -Wmissing-declarations \
11654                              -Wmissing-noreturn -Wpointer-arith \
11655                              -Wcast-align -Wformat -Wformat-security -Wformat-y2k \
11656                              -Winit-self -Wmissing-include-dirs -Wundef \
11657                              -Wnested-externs"
11658    CPPFLAGS="$CPPFLAGS"
11659
11660    if test x`uname` = x"Linux"; then
11661      xdt_cv_additional_CFLAGS="$xdt_cv_additional_CFLAGS -fstack-protector"
11662    fi
11663
11664    dnl # signal.h inline is crapy on openbsd
11665    if test x`uname` != x"OpenBSD"; then
11666      xdt_cv_additional_CFLAGS="$xdt_cv_additional_CFLAGS -Wredundant-decls"
11667    fi
11668
11669    if test x"$enable_debug" = x"full"; then
11670      AC_DEFINE([DEBUG_TRACE], [1], [Define for tracing support])
11671      xdt_cv_additional_CFLAGS="$xdt_cv_additional_CFLAGS -O0 -g -Werror"
11672      CPPFLAGS="$CPPFLAGS -DG_ENABLE_DEBUG"
11673      AC_MSG_RESULT([full])
11674    else
11675      xdt_cv_additional_CFLAGS="$xdt_cv_additional_CFLAGS -g -Wshadow"
11676      AC_MSG_RESULT([yes])
11677    fi
11678
11679    XDT_SUPPORTED_FLAGS([supported_CFLAGS], [$xdt_cv_additional_CFLAGS])
11680
11681    ifelse([$CXX], , , [
11682      dnl FIXME: should test on c++ compiler, but the following line causes
11683      dnl        autoconf errors for projects that don't check for a
11684      dnl        c++ compiler at all.
11685      dnl AC_LANG_PUSH([C++])
11686      dnl XDT_SUPPORTED_FLAGS([supported_CXXFLAGS], [$xdt_cv_additional_CFLAGS])
11687      dnl AC_LANG_POP()
11688      dnl        instead, just use supported_CFLAGS...
11689      supported_CXXFLAGS="$supported_CFLAGS"
11690    ])
11691
11692    CFLAGS="$CFLAGS $supported_CFLAGS"
11693    CXXFLAGS="$CXXFLAGS $supported_CXXFLAGS"
11694  else
11695    CPPFLAGS="$CPPFLAGS -DNDEBUG"
11696
11697    if test x"$enable_debug" = x"no"; then
11698      CPPFLAGS="$CPPFLAGS -DG_DISABLE_CAST_CHECKS -DG_DISABLE_ASSERT"
11699      AC_MSG_RESULT([no])
11700    else
11701      AC_MSG_RESULT([minimum])
11702    fi
11703  fi
11704])
11705
11706
11707dnl XDT_FEATURE_VISIBILITY()
11708dnl
11709dnl Checks to see if the compiler supports the 'visibility' attribute
11710dnl If so, adds -DHAVE_GNUC_VISIBILTY to CPPFLAGS.  Also sets the
11711dnl automake conditional HAVE_GNUC_VISIBILITY.
11712dnl
11713AC_DEFUN([XDT_FEATURE_VISIBILITY],
11714[
11715  AC_ARG_ENABLE([visibility],
11716                AC_HELP_STRING([--disable-visibility],
11717                               [Don't use ELF visibility attributes]),
11718                [enable_visibility=$enableval], [enable_visibility=yes])
11719  have_gnuc_visibility=no
11720  if test "x$enable_visibility" != "xno"; then
11721    XDT_SUPPORTED_FLAGS([xdt_vis_test_cflags], [-Wall -Werror -Wno-unused-parameter])
11722    saved_CFLAGS="$CFLAGS"
11723    CFLAGS="$CFLAGS $xdt_vis_test_cflags"
11724    AC_MSG_CHECKING([whether $CC supports the GNUC visibility attribute])
11725    AC_COMPILE_IFELSE([AC_LANG_SOURCE(
11726    [
11727      void test_default (void);
11728      void test_hidden (void);
11729
11730      void __attribute__ ((visibility("default"))) test_default (void) {}
11731      void __attribute__ ((visibility("hidden"))) test_hidden (void) {}
11732
11733      int main (int argc, char **argv) {
11734        test_default ();
11735        test_hidden ();
11736        return 0;
11737      }
11738    ])],
11739    [
11740      have_gnuc_visibility=yes
11741      AC_MSG_RESULT([yes])
11742    ],
11743    [
11744      AC_MSG_RESULT([no])
11745    ])
11746    CFLAGS="$saved_CFLAGS"
11747  fi
11748
11749  if test "x$have_gnuc_visibility" = "xyes"; then
11750    CPPFLAGS="$CPPFLAGS -DHAVE_GNUC_VISIBILITY"
11751    xdt_vis_hidden_cflags=""
11752    XDT_SUPPORTED_FLAGS([xdt_vis_hidden_cflags], [-xldscope=hidden])
11753    if test "x$xdt_vis_hidden_cflags" = "x"; then
11754      XDT_SUPPORTED_FLAGS([xdt_vis_hidden_cflags], [-fvisibility=hidden])
11755    fi
11756    CFLAGS="$CFLAGS $xdt_vis_hidden_cflags"
11757  fi
11758
11759  AM_CONDITIONAL([HAVE_GNUC_VISIBILITY], [test "x$have_gnuc_visibility" = "xyes"])
11760])
11761
11762dnl XDT_FEATURE_LINKER_OPTS
11763dnl
11764dnl Checks for and enables any special linker optimizations.
11765dnl
11766AC_DEFUN([XDT_FEATURE_LINKER_OPTS],
11767[
11768  AC_ARG_ENABLE([linker-opts],
11769                AC_HELP_STRING([--disable-linker-opts],
11770                               [Disable linker optimizations]),
11771                [enable_linker_opts=$enableval], [enable_linker_opts=yes])
11772
11773  if test "x$enable_linker_opts" != "xno"; then
11774    if test x`uname` != x"OpenBSD"; then
11775      AC_MSG_CHECKING([whether $LD accepts --as-needed])
11776      case `$LD --as-needed -v 2>&1 </dev/null` in
11777      *GNU* | *'with BFD'*)
11778        LDFLAGS="$LDFLAGS -Wl,--as-needed"
11779        AC_MSG_RESULT([yes])
11780        ;;
11781      *)
11782        AC_MSG_RESULT([no])
11783        ;;
11784      esac
11785    fi
11786    AC_MSG_CHECKING([whether $LD accepts -O1])
11787    case `$LD -O1 -v 2>&1 </dev/null` in
11788    *GNU* | *'with BFD'*)
11789      LDFLAGS="$LDFLAGS -Wl,-O1"
11790      AC_MSG_RESULT([yes])
11791      ;;
11792    *)
11793      AC_MSG_RESULT([no])
11794      ;;
11795    esac
11796  fi
11797])
11798
11799dnl Copyright (c) 2002-2015
11800dnl         The Xfce development team. All rights reserved.
11801dnl
11802dnl Written for Xfce by Benedikt Meurer <benny@xfce.org>.
11803dnl
11804dnl This program is free software; you can redistribute it and/or modify
11805dnl it under the terms of the GNU General Public License as published by
11806dnl the Free Software Foundation; either version 2 of the License, or
11807dnl (at your option) any later version.
11808dnl
11809dnl This program is distributed in the hope that it will be useful,
11810dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
11811dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11812dnl GNU General Public License for more details.
11813dnl
11814dnl You should have received a copy of the GNU General Public License along
11815dnl with this program; if not, write to the Free Software Foundation, Inc.,
11816dnl 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
11817dnl
11818dnl xdt-i18n
11819dnl --------
11820dnl  Internalization M4 macros.
11821dnl
11822
11823
11824dnl XDT_I18N([LINGUAS][, PACKAGE])
11825dnl
11826dnl This macro takes care of setting up everything for i18n support.
11827dnl
11828dnl If LINGUAS isn't specified, it will automatically extract the linguas
11829dnl from po/*.po.
11830dnl
11831dnl If PACKAGE isn't specified, it defaults to the package tarname; see
11832dnl the description of AC_INIT() for an explanation of what makes up
11833dnl the package tarname. Normally, you don't need to specify PACKAGE,
11834dnl but you can stick with the default.
11835dnl
11836AC_DEFUN([XDT_I18N],
11837[
11838  dnl Substitute GETTEXT_PACKAGE variable
11839  GETTEXT_PACKAGE=m4_default([$2], [AC_PACKAGE_TARNAME()])
11840  AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"], [Name of default gettext domain])
11841  AC_SUBST([GETTEXT_PACKAGE])
11842
11843  dnl gettext and stuff
11844  ALL_LINGUAS="m4_ifblank(
11845    [$1],
11846    [esyscmd([echo $(for i in po/*.po; do test -e "$i" && basename -- "$i" .po; done) | tr -d '\n'])],
11847    [$1])"
11848  AM_GLIB_GNU_GETTEXT()
11849
11850  dnl This is required on some Linux systems
11851  AC_CHECK_FUNC([bind_textdomain_codeset])
11852
11853  dnl Determine where to install locale files
11854  AC_MSG_CHECKING([for locales directory])
11855  AC_ARG_WITH([locales-dir],
11856  [
11857    AC_HELP_STRING([--with-locales-dir=DIR], [Install locales into DIR])
11858  ], [localedir=$withval],
11859  [
11860    if test x"$CATOBJEXT" = x".mo"; then
11861      localedir=$libdir/locale
11862    else
11863      localedir=$datarootdir/locale
11864    fi
11865  ])
11866  AC_MSG_RESULT([$localedir])
11867  AC_SUBST([localedir])
11868
11869  dnl Determine additional xgettext flags
11870  AC_MSG_CHECKING([for additional xgettext flags])
11871  if test x"$XGETTEXT_ARGS" = x""; then
11872    XGETTEXT_ARGS="--keyword=Q_ --from-code=UTF-8";
11873  else
11874    XGETTEXT_ARGS="$XGETTEXT_ARGS --keyword=Q_ --from-code=UTF-8";
11875  fi
11876  AC_SUBST([XGETTEXT_ARGS])
11877  AC_MSG_RESULT([$XGETTEXT_ARGS])
11878])
11879
11880
11881